2.6.1 • Published 2 years ago

custom-uikit-svelte v2.6.1

Weekly downloads
58
License
MIT
Repository
github
Last release
2 years ago

custom-uikit-svelte

Unofficial Svelte Component Library for the UIkit framework

 

Install from npm

npm i custom-uikit-svelte

You can find the published package here

 

Demo with examples

The demo included in this repo shows some components in action with examples

You can have a look at it here: custom-uikit-svelte demo

The demo files can be found in src/

 

Components

Alert

This alert can be used to display success, warning and error messages      

Slots

namedescription
-The content of the alert

 

Custom Events

nametypedescription
hideArrayFires after the alert is hidden
beforehideArrayFires before hiding the alert. If preventDefault is called on this event, the alert will not be hidden

 

Props

nametypedefaultdescription
closablebooleantrueWhether the alert is dismissible
variant'primary'|'success'|'danger'|'warning'|undefinedundefinedSpecifies the look of the component
animationboolean|stringtrueFade out or use the uikit Animation component
animationDurationnumber150Animation duration in milliseconds
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefinedA string containing any additional classes to apply to the component
ref (readonly)HTMLDivElementundefinedThe HTML reference of the component

     

Article

Useful to display content such as blog entries or articles      

Slots

namedescription
-The content of the article

 

Props

nametypedefaultdescription
classNamestring|undefinedundefinedA string containing any additional classes to apply to the component
stylestring|undefinedundefinedA string specifying custom style properties for the component
titleAsHtmlstring|undefined""A string that can contain HTML content which represents the title of the article. If omitted, the space dedicated to the title won't be displayed
articleMetaAsHtmlstring|undefined""A string that can contain HTML content with meta information about the article. If omitted, the space dedicated to the meta content won't be displayed
ref (readonly)HTMLElementundefinedThe HTML reference of the component

     

AsyncDataTable

     

Props

nametypedefaultdescription
columnsArray.<{label: string, key: string, className: (string|undefined), textAlign: ('center'|'right'|'left'|undefined), orderable: (boolean|undefined), searchable: (boolean|undefined), render: (DataTableRenderer|undefined)}>[]
sizeundefined|'small'undefined
classNameundefined|stringundefined
stylestring|undefinedundefinedA string specifying custom style properties for the component
appearance'divider'|'striped'"divider"
searchButtonVariant'default'|'primary'|'secondary'|'danger'|'text'|'link'"default"
stickyHeaderbooleanfalse
placeholderstring""
noResultTextstring|undefinedundefined
refHTMLTableElementundefined
instantSearchbooleantrue
querystring""
orderByArray.<{key: string, direction: ('desc'|'asc')}>[]
horizontalScrollbooleantrue
dataProviderAsyncDataTableDataProvider-
dataProviderErrorHandlerCallableFunction(err) => console.error(err)
recordsPerPagenumber25
numbersPerSidenumber4
pageIndexnumber0
totalnumber0@readonly
filterednumber0@readonly
loadingbooleanfalse@readonly
debounceMsnumber200
rowsArray.<Record.<string, any>>|nullnullContains the current visible rows

     

Badge

This component can be used as a notification badge or as a general purpose chip      

Slots

namedescription
-The content of the badge

 

Forwarded Events

namesource
clickHTMLSpanElement

 

Props

nametypedefaultdescription
classNamestring|undefinedundefinedA string containing any additional classes to apply to the component
stylestring|undefinedundefinedA string specifying custom style properties for the component
ref (readonly)HTMLSpanElementundefinedThe HTML reference of the component

     

Breadcrumb

A breadcrumb can be added to the page to help the user find where they are in the website and easily go back and forth between pages      

Props

nametypedefaultdescription
pathArray.<{href: string, label: string}>[]An array containing the various steps composing the path of the current page. Each step should have an href property, which is the URL to which the user will be redirected, and a label property, which is displayed. The last element of the array represents the current page and its href property will be ignored
classNamestring|undefinedundefinedA string containing any additional classes to apply to the component
stylestring|undefinedundefinedA string specifying custom style properties for the component
ref (readonly)HTMLUListElementundefinedThe HTML reference of the component

     

Button

This component represents a general purpose button, which can be customized according to its usage      

Slots

namedescription
-The content of the button

 

Forwarded Events

namesource
clickHTMLButtonElement

 

Props

nametypedefaultdescription
idstring|undefinedundefined
classNamestring|undefinedundefinedA string containing any additional classes to apply to the component
stylestring|undefinedundefinedA string specifying custom style properties for the component
type'button'|'submit'"button"The type property of the native HTML button
disabledbooleanfalseThe disabled property of the native HTML button
loadingbooleanfalseWhether the button has been used to retrieve some content that is still being loaded. If true, an icon with a spinner will appear next to the text and the button will also be temporarily disabled
variant'default'|'primary'|'secondary'|'danger'|'text'|'link'type === "submit" ? "primary" : "default"This property is used to style the button with one of the base uikit classes for button appearance
iconstring|undefinedtype === "submit" ? "newline" : undefinedIf present, the uikit icon with the given name will be added next to the text of the button
iconPosition'right'|'left''right'If the icon is set, this property let you decide its position, left or right
sizeundefined|'small'|'large'undefinedSpecifies the size of the button. If undefined, the button will be of regular size
tooltipstring|undefinedundefinedSpecifies the uk-tooltip attribute. If undefined, no tooltip will be added to the button
ref (readonly)HTMLButtonElementundefinedThe HTML reference of the component

     

Card

The card component allows you to create nice box layouts      

Slots

namedescription
headerThe content to be put inside the header ('uk-card-header') of the card. Leave empty if no header is wanted
media-topThe content to be put inside the 'uk-card-media-top' class. This is useful if you want to add an image to your card which is supposed to take up the top half of the card. Leave empty if you don't want the card to have this layout
horizontal-mediaFor more complex layouts (e.g. an horizontal card with an image to the right/left) you can use this slot, which is placed before the card body. Leave empty if this is not needed
-The content of the card
media-bottomThe content to be put inside the 'uk-card-media-bottom' class. This is useful if you want to add an image to your card which is supposed to take up the bottom half of the card. Leave empty if you don't want the card to have this layout
footerFill this slot if you want your card to have a footer. The content will be put inside the 'uk-card-footer' section

 

Props

nametypedefaultdescription
variant'default'|'primary'|'secondary'|'hover'"default"Used to style the card. If set to hover, the card will appear flat unless it's being hovered
classNamestring|undefinedundefinedA string containing any additional classes to apply to the component
hoverbooleanfalseAdd a hover animation to the card
size'small'|'large'|undefinedundefinedDefines the padding of the card. In undefined, default values will be applied
titlestring|undefinedundefinedThe title of the card. This will be represented inside the body of the card. If you have defined a custom header slot, you should manually specify the title inside it and not use this property
badgestring|undefinedundefinedThe text content of the card badge, which is displayed in the top right angle of the card. If undefined no badge will be added
stylestring|undefinedundefinedA string specifying custom style properties for the component
ref (readonly)HTMLDivElementundefinedThe HTML reference of the component

     

Comment

     

Props

nametypedefaultdescription
avatarSourcestring|undefinedundefinedThe path to the avatar that will be added to the comment. For optimal results, use a square image. Only specify this property if you are not using a custom header, otherwise it will be ignored
avatarSizenumber80Change the size of the avatar.
avatarAltstring""The alt property of the avatar image
commentTitleAsHtmlstring""The title of the comment that will be added to the header. It can contain HTML tags. Do not use this property if you are specifying a custom header
primarybooleanfalseTrue to add a different style to this comment (e.g. if it's made by the author)
ref (readonly)HTMLElementundefinedThe HTML reference of the component
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefinedA string containing any additional classes to apply to the component

     

DataTable

     

Props

nametypedefaultdescription
columnsArray.<{label: string, key: string, className: (string|undefined), textAlign: ('center'|'right'|'left'|undefined), orderable: (boolean|Comparator|undefined), searchable: (boolean|DataTableSearchCallback|undefined), render: (DataTableRenderer|undefined)}>[]
rowsArray.<Record.<string, any>>[]
visibleRowsArray.<Record.<string, any>>[]
sizeundefined|'small'undefined
classNameundefined|stringundefined
stylestring|undefinedundefinedA string specifying custom style properties for the component
appearance'divider'|'striped'"divider"
searchButtonVariant'default'|'primary'|'secondary'|'danger'|'text'|'link'"default"
stickyHeaderbooleanfalse
placeholderstring""
noResultTextstring|undefinedundefined
refHTMLTableElementundefined
instantSearchbooleantrue
querystring""
orderByArray.<{key: string, direction: ('desc'|'asc')}>[]
horizontalScrollbooleantrue
recordsPerPagenumber25
numbersPerSidenumber4
pageIndexnumber0
totalnumber0@readonly
filterednumber0@readonly

     

DescriptionList

Create an already styled description list, perfect for describing key-value properties      

Slots

namedescription
-If you need to add components in the titles or descriptions, use the default slot to specify the content of the description terms and description details

 

Props

nametypedefaultdescription
showDividerbooleanfalseIf true a divider will be shown between two items
classNamestring|undefinedundefinedA string containing any additional classes to apply to the component
stylestring|undefinedundefinedA string specifying custom style properties for the component
ref (readonly)HTMLDListElementundefinedThe HTML reference of the component
termsAreHtmlbooleanfalseWhether the terms of your list should be treated as HTML
detailsAreHtmlbooleanfalseWhether the details of your list should be treated as HTML
listArray.<{term: string, details: string}>[]An array containing the term-details pairs of the description list. Can be text only or html

     

Divider

     

Props

nametypedefaultdescription
withIconbooleanfalse
smallbooleanfalse
verticalbooleanfalse
refHTMLHRElementundefined
stylestring|undefinedundefined
classNamestring|undefinedundefined

     

Dropdown

     

Props

nametypedefaultdescription
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefined
mode'click'|'hover'"hover"
labelstring""
isLabelHtmlbooleanfalse
variant'default'|'primary'|'secondary'|'danger'|'text'|'link'|null"default"This property is used to style the button with one of the base uikit classes for button appearance. Setting this to null will hide the button
refHTMLDivElementundefined

     

Form

     

Props

nametypedefaultdescription
submitAsyncFormSubmitCallback-
disabledbooleanfalse
state'initial'|'invalid'|'valid'|'loading'|'error'|'success'"initial"
validbooleantrueIndicates the validity of this form. Its value is updated using formRef.checkValdity(), that gets called each time an element inside this form triggers a bubbling 'change' event
refHTMLFormElementundefined
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefined
variant'stacked'|'horizontal'"stacked"

     

FormModal

     

Props

nametypedefaultdescription
idstring|undefinedundefined
stylestring|undefinedundefined
classNamestring|undefinedundefined
titlestring|undefinedundefined
expandbooleanfalse
fullScreenbooleanfalse
closeablebooleantrue
closeButton'default'|'outside'"default"
verticallyCenteredbooleantrue
refHTMLDivElementundefined
showbooleanfalse
shownbooleanfalse@readonly
stackbooleantrue
formSubmitAsyncFormSubmitCallback-
formDisabledbooleanfalse
formState'initial'|'invalid'|'valid'|'loading'|'error'|'success'"initial"
formValidbooleantrue
formRefHTMLFormElementundefined
formStylestring|undefinedundefinedA string specifying custom style properties for the component
formClassNamestring|undefined''
formVariant'stacked'|'horizontal'"stacked"

     

Loader

     

Props

nametypedefaultdescription
classNamestring|undefinedundefined
rationumber1
stylestring|undefinedundefined
refHTMLDivElementundefined

     

LoaderOverlay

     

Props

nametypedefaultdescription
classNamestring|undefinedundefined
rationumber1
stylestring|undefinedundefined
refHTMLDivElementundefined
opacitynumber0.8
loadingbooleantrue
background'default'|'muted'|'primary'|'secondary'"default"
backgroundClassNamestring|undefinedundefined
backgroundStylestring|undefinedundefined
slotPosition'bottom'|'right'|'top'|'left'"bottom"

     

LoaderOverlayScoped

     

Props

nametypedefaultdescription
classNamestring|undefinedundefined
rationumber1
stylestring|undefinedundefined
refHTMLDivElementundefined
opacitynumber0.8
loadingbooleantrue
background'default'|'muted'|'primary'|'secondary''default'
backgroundClassNamestring|undefinedundefined
backgroundStylestring|undefinedundefined
slotPosition'bottom'|'right'|'top'|'left'"bottom"

     

LoaderWrapper

     

Props

nametypedefaultdescription
loadingbooleantrue
classNamestring|undefinedundefined
rationumber1
stylestring|undefinedundefined
refHTMLDivElementundefined
centerbooleantrue
slotPosition'bottom'|'right'|'top'|'left'"bottom"

     

Modal

     

Props

nametypedefaultdescription
idstring|undefinedundefined
stylestring|undefinedundefined
classNamestring|undefinedundefined
titlestring|undefinedundefined
expandbooleanfalse
fullScreenbooleanfalse
closeablebooleantrue
closeButton'default'|'outside'"default"
verticallyCenteredbooleantrue
refHTMLDivElementundefined
showbooleanfalse
shownbooleanfalse@readonly
stackbooleantrue

     

Nav

     

Props

nametypedefaultdescription
ref (readonly)HTMLDivElementundefinedThe HTML reference of the component
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefinedA string containing any additional classes to apply to the component

     

Offcanvas

     

Props

nametypedefaultdescription
idstringgenerateId()
showbooleanfalse
shownbooleanfalse@readonly
refHTMLDivElementundefined
side'left'|'right'"left"

     

OrderableList

     

Props

nametypedefaultdescription
itemsArray.<{text: (string|undefined), html: (string|undefined), props: (Record.<string, any>|undefined), component: (SvelteComponent|undefined)}>[]
componentSvelteComponent|undefinedundefined
refHTMLUListElementundefined@readonly
animationDurationnumber200
moveToBoundariesbooleanfalseWhether to show or hide the move-to-top and move-to-bottom buttons
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefinedA string containing any additional classes to apply to the component

     

Pagination

     

Props

nametypedefaultdescription
classNamestring|undefined""
stylestring|undefinedundefined
centerbooleantrue
pageIndexnumber0
numberOfPagesnumber0
numbersPerSidenumber4

     

ScrollableNav

     

Props

nametypedefaultdescription
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefinedA string containing any additional classes to apply to the component
navStylestring|undefinedundefinedA string specifying custom style properties for the contained Nav component
navClassNamestring|undefinedundefinedA string containing any additional classes to apply to the contained Nav component
ref (readonly)HTMLDivElementundefinedThe HTML reference of the component
height (readonly)number0The current height of this component
spacerbooleantrueWhether to add a spacer underneath this component or not

     

Switcher

     

Props

nametypedefaultdescription
connectstring"~.uk-switcher"
togglestring"> * > :first-child"
animationstring|falsefalse
durationnumber200
swipingbooleantrue
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefined
titlesArray.[]
htmlTitlebooleanfalse
refHTMLUListElementundefined
indexnumber0

     

Tab

     

Props

nametypedefaultdescription
connectstring"~.uk-switcher"
togglestring"> *"
animationstring|falsefalse
durationnumber200
swipingbooleantrue
medianumber|string200
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefined
titlesArray.[]
htmlTitlebooleanfalse
refHTMLDivElementundefined
indexnumber0

     

Table

     

Props

nametypedefaultdescription
headingArray.<(string|{label: string, className: (string|undefined), textAlign: ('center'|'right'|'left'|undefined)})>[]
size'small'|undefinedundefined
classNamestring|undefinedundefined
stylestring|undefinedundefined
appearance'divider'|'striped'|undefinedundefined
stickyHeaderbooleanfalse
refHTMLTableElementundefined
captionstring|undefinedundefined

     

Accordion

     

Props

nametypedefaultdescription
animationbooleantrue
collapsiblebooleantrue
durationnumber200
multibooleanfalse
indexnumber|false|Array.multi ? [] : false
transitionstring"ease"
refHTMLUListElementundefined
classNamestring|undefinedundefined
stylestring|undefinedundefined

     

AccordionItem

   

     

AsyncAutocomplete

     

Props

nametypedefaultdescription
idstringgenerateId()
multibooleanfalseWhether or not the autocomplete supports multiple values selected at the same time
valueany|null|Array.!multi ? null : []If not in multi-mode (default): the current selected value or null if no value is selected Else: the list of currently selected values
labelstring""Label of this component
classNamestring|undefinedundefinedA string containing any additional classes to apply to the component
stylestring|undefinedundefinedA string specifying custom style properties for the component
textIfNoResultstring""Text to show when the applied filter doesn't return any result
textIfInvalidstring""Text to show when the field is required but no value has been chosen
disabledbooleanfalseControl whether the component is disabled or not
tooltipstring|undefinedundefinedUIkit tooltip
placeholderstring|undefinedundefinedInput placeholder
optionalbooleanfalse
refHTMLDivElementundefinedReference to the div that wraps this component
autocapitalizestring|undefinedundefinedAutocapitalize setting of the input tag
autocompletestring|undefined"off"Autocomplete setting of the input tag
autocorrectstring|undefinedundefinedAutocorrect setting of the input tag
spellcheckstring|undefinedundefined
animationDurationnumber100In/Out fly animation duration (in milliseconds)
state'initial'|'valid'|'invalid'"initial"
querystring""The current search string
selectedOptionsArray.<{label: string, value: any}>[]Currently selected options
dataProviderAsyncAutocompleteDataProvider-
dataProviderErrorHandlerCallableFunction(err) => console.error(err)
loadingbooleanfalse@readonly
debounceMsnumber200
maxSuggestionsnumber5
requiredMarkerstring|undefinedundefined
optionalMarkerstring|undefinedundefined

     

Autocomplete

     

Props

nametypedefaultdescription
idstringgenerateId()
optionsArray.<{label: string, value: any}>[]Autocomplete options, the value must be unique
multibooleanfalseWhether or not the autocomplete supports multiple values selected at the same time
valueany|null|Array.!multi ? null : []If not in multi-mode (default): the current selected value or null if no value is selected Else: the list of currently selected values
labelstring""Label of this component
classNamestring|undefinedundefinedA string containing any additional classes to apply to the component
stylestring|undefinedundefinedA string specifying custom style properties for the component
textIfNoResultstring""Text to show when the applied filter doesn't return any result
textIfInvalidstring""Text to show when the field is required but no value has been chosen
disabledbooleanfalseControl whether the component is disabled or not
tooltipstring|undefinedundefinedUIkit tooltip
placeholderstring|undefinedundefinedInput placeholder
optionalbooleanfalse
refHTMLDivElementundefinedReference to the div that wraps this component
autocapitalizestring|undefinedundefinedAutocapitalize setting of the input tag
autocompletestring|undefined"off"Autocomplete setting of the input tag
autocorrectstring|undefinedundefinedAutocorrect setting of the input tag
spellcheckstring|undefinedundefined
animationDurationnumber100In/Out fly animation duration (in milliseconds)
state'initial'|'valid'|'invalid'"initial"
querystring""The current search string
selectedOptionsArray.<{label: string, value: any}>[]Currently selected options
requiredMarkerstring|undefinedundefined
optionalMarkerstring|undefinedundefined

     

Checkbox

     

Props

nametypedefaultdescription
idstringgenerateId()
labelstring""
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefined
namestring|undefinedundefined
textIfInvalidstring|undefinedundefined
textIfValidstring|undefinedundefined
helperTextstring|undefinedundefined
optionalbooleanfalse
valueboolean-
refHTMLInputElementundefined
disabledbooleanfalse
tooltipstring|undefinedundefined
requiredMarkerstring|undefinedundefined
optionalMarkerstring|undefinedundefined
state'initial'|'valid'|'invalid'"initial"

     

DatePicker

     

Props

nametypedefaultdescription
idstringgenerateId()
labelstring""
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefined
namestring|undefinedundefined
textIfInvalidstring|undefinedundefined
textIfValidstring|undefinedundefined
helperTextstring|undefinedundefined
placeholderstring""
optionalbooleanfalse
valuestring-
refHTMLInputElementundefined
disabledbooleanfalse
tooltipstring|undefinedundefined
minstring|undefinedundefined
maxstring|undefinedundefined
autocapitalizestring|undefinedundefined
autocompletestring|undefinedundefined
autocorrectstring|undefinedundefined
spellcheckstring|undefinedundefined
requiredMarkerstring|undefinedundefined
optionalMarkerstring|undefinedundefined
state'initial'|'valid'|'invalid'"initial"

     

EmailInput

     

Props

nametypedefaultdescription
idstringgenerateId()
labelstring""
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefined
namestring|undefinedundefined
textIfInvalidstring|undefinedundefined
textIfValidstring|undefinedundefined
helperTextstring|undefinedundefined
placeholderstring""
optionalbooleanfalse
valuestring-
refHTMLInputElementundefined
disabledbooleanfalse
tooltipstring|undefinedundefined
autocapitalizestring|undefined'off'
autocompletestring|undefinedundefined
autocorrectstring|undefined'off'
spellcheckstring|undefined'off'
requiredMarkerstring|undefinedundefined
optionalMarkerstring|undefinedundefined
state'initial'|'valid'|'invalid'"initial"

     

Field

     

Props

nametypedefaultdescription
stylestring|undefinedundefinedA string specifying custom style properties for the component
state'initial'|'valid'|'invalid'"initial"
requiredMarkerstring|undefinedundefined
optionalMarkerstring|undefinedundefined

     

FixedPointInput

     

Props

nametypedefaultdescription
idstringgenerateId()
decimalPlacesnumber2
inhibitDecimalSeparatorKeybooleanfalse
labelstring""
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefined
textIfInvalidstring|undefinedundefined
textIfValidstring|undefinedundefined
helperTextstring|undefinedundefined
optionalbooleanfalse
valuestring-
minstring|numberundefined
maxstring|numberundefined
refHTMLInputElementundefined
disabledbooleanfalse
tooltipstring|undefinedundefined
iconstring|undefinedundefined
iconPosition'left'|'right'"left"
state'initial'|'valid'|'invalid'"initial"

     

MonthPicker

     

Props

nametypedefaultdescription
idstringgenerateId()
labelstring""
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefined
namestring|undefinedundefined
textIfInvalidstring|undefinedundefined
textIfValidstring|undefinedundefined
helperTextstring|undefinedundefined
placeholderstring""
optionalbooleanfalse
valuestring-
refHTMLInputElementundefined
disabledbooleanfalse
tooltipstring|undefinedundefined
autocapitalizestring|undefinedundefined
autocompletestring|undefinedundefined
autocorrectstring|undefinedundefined
spellcheckstring|undefinedundefined
requiredMarkerstring|undefinedundefined
optionalMarkerstring|undefinedundefined
state'initial'|'valid'|'invalid'"initial"

     

NumberInput

     

Props

nametypedefaultdescription
idstringgenerateId()
labelstring""
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefined
namestring|undefinedundefined
textIfInvalidstring|undefinedundefined
textIfValidstring|undefinedundefined
helperTextstring|undefinedundefined
placeholderstring""
optionalbooleanfalse
valuestring-
refHTMLInputElementundefined
minnumber|stringundefined
maxnumber|stringundefined
stepnumber|stringundefined
disabledbooleanfalse
tooltipstring|undefinedundefined
iconstring|undefinedundefined
iconPosition'left'|'right'"left"
autocapitalizestring|undefinedundefined
autocompletestring|undefinedundefined
autocorrectstring|undefinedundefined
spellcheckstring|undefinedundefined
requiredMarkerstring|undefinedundefined
optionalMarkerstring|undefinedundefined
state'initial'|'valid'|'invalid'"initial"

     

PasswordInput

     

Props

nametypedefaultdescription
idstringgenerateId()
labelstring""
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefined
namestring|undefinedundefined
textIfInvalidstring|undefinedundefined
textIfValidstring|undefinedundefined
helperTextstring|undefinedundefined
placeholderstring""
optionalbooleanfalse
valuestring-
refHTMLInputElementundefined
disabledbooleanfalse
tooltipstring|undefinedundefined
autocapitalizestring|undefined"off"
autocompletestring|undefinedundefined
autocorrectstring|undefined"off"
spellcheckstring|undefined"off"
minlengthnumber|undefinedundefined
maxlengthstring|undefinedundefined
requiredMarkerstring|undefinedundefined
optionalMarkerstring|undefinedundefined
state'initial'|'valid'|'invalid'"initial"

     

PasswordInputAlt

     

Props

nametypedefaultdescription
idstringgenerateId()
labelstring""
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefined
namestring|undefinedundefined
textIfInvalidstring|undefinedundefined
textIfValidstring|undefinedundefined
helperTextstring|undefinedundefined
placeholderstring""
optionalbooleanfalse
valuestring-
refHTMLInputElementundefined
disabledbooleanfalse
tooltipstring|undefinedundefined
autocapitalizestring|undefined"off"
autocompletestring|undefinedundefined
autocorrectstring|undefined"off"
spellcheckstring|undefined"off"
minlengthnumber|undefinedundefined
maxlengthstring|undefinedundefined
requiredMarkerstring|undefinedundefined
optionalMarkerstring|undefinedundefined
state'initial'|'valid'|'invalid'"initial"

     

PercentageInput

     

Props

nametypedefaultdescription
stylestring|undefinedundefinedA string specifying custom style properties for the component
autocapitalizestring|undefinedundefined
autocompletestring|undefinedundefined
autocorrectstring|undefinedundefined
spellcheckstring|undefinedundefined

     

Radio

     

Props

nametypedefaultdescription
idstringgenerateId()
labelstring|undefinedundefined
namestring|undefinedundefined
valueany|undefinedundefined
optionsArray.<{value: any, label: string, disabled: (boolean|undefined)}>[]
disabledbooleanfalse
optionalbooleanfalse
tooltipstring|undefinedundefined
refHTMLDivElementundefined
sizeundefined|'small'|'large'undefined
classNamestring|undefinedundefined
variant'primary'|'secondary'|'danger'"primary"This property is used to style the button corresponding to the selected value with one of the base uikit classes for button appearance
stylestring|undefinedundefinedA string specifying custom style properties for the component
requiredMarkerstring|undefinedundefined
optionalMarkerstring|undefinedundefined

     

SearchInput

     

Props

nametypedefaultdescription
idstringgenerateId()
labelstring""
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefined
namestring|undefinedundefined
textIfInvalidstring|undefinedundefined
textIfValidstring|undefinedundefined
helperTextstring|undefinedundefined
placeholderstring""
optionalbooleanfalse
valuestring-
refHTMLInputElementundefined
disabledbooleanfalse
tooltipstring|undefinedundefined
iconstring|undefinedundefined
iconPosition'left'|'right'"left"
inputmodestring|undefinedundefined
patternstring|undefinedundefined
autocapitalizestring|undefinedundefined
autocompletestring|undefinedundefined
autocorrectstring|undefinedundefined
spellcheckstring|undefinedundefined
minlengthnumber|undefinedundefined
maxlengthstring|undefinedundefined
requiredMarkerstring|undefinedundefined
optionalMarkerstring|undefinedundefined
state'initial'|'valid'|'invalid'"initial"

     

Select

     

Props

nametypedefaultdescription
idstringgenerateId()
labelstring""
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefined
textIfInvalidstring|undefinedundefined
textIfValidstring|undefinedundefined
helperTextstring|undefinedundefined
placeholderstring""
optionalbooleanfalse
valueany-Current value of the select. Setting it to undefined sets the selected index to 0, choosing the first option, whether it's disabled, the placeholder, or a valid option
optionsArray.<{label: string, value: any, disabled: (boolean|undefined)}>[]
refHTMLSelectElementundefined
disabledbooleanfalse
tooltipstring|undefinedundefined
requiredMarkerstring|undefinedundefined
optionalMarkerstring|undefinedundefined
state'initial'|'valid'|'invalid'"initial"

     

TelInput

     

Props

nametypedefaultdescription
idstringgenerateId()
labelstring""
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefined
namestring|undefinedundefined
textIfInvalidstring|undefinedundefined
textIfValidstring|undefinedundefined
helperTextstring|undefinedundefined
placeholderstring""
optionalbooleanfalse
valuestring-
refHTMLInputElementundefined
disabledbooleanfalse
tooltipstring|undefinedundefined
autocapitalizestring|undefinedundefined
autocompletestring|undefinedundefined
autocorrectstring|undefinedundefined
spellcheckstring|undefinedundefined
minlengthnumber|undefinedundefined
maxlengthstring|undefinedundefined
requiredMarkerstring|undefinedundefined
optionalMarkerstring|undefinedundefined
state'initial'|'valid'|'invalid'"initial"

     

TextInput

     

Props

nametypedefaultdescription
idstringgenerateId()
labelstring""
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefined
namestring|undefinedundefined
textIfInvalidstring|undefinedundefined
textIfValidstring|undefinedundefined
helperTextstring|undefinedundefined
placeholderstring""
optionalbooleanfalse
valuestring-
refHTMLInputElementundefined
disabledbooleanfalse
tooltipstring|undefinedundefined
iconstring|undefinedundefined
iconPosition'left'|'right'"left"
inputmodestring|undefinedundefined
patternstring|undefinedundefined
autocapitalizestring|undefinedundefined
autocompletestring|undefinedundefined
autocorrectstring|undefinedundefined
spellcheckstring|undefinedundefined
minlengthnumber|undefinedundefined
maxlengthstring|undefinedundefined
requiredMarkerstring|undefinedundefined
optionalMarkerstring|undefinedundefined
state'initial'|'valid'|'invalid'"initial"

     

Textarea

     

Props

nametypedefaultdescription
idstringgenerateId()
labelstring""
namestring|undefinedundefined
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefined
textIfInvalidstring|undefinedundefined
textIfValidstring|undefinedundefined
helperTextstring|undefinedundefined
placeholderstring""
optionalbooleanfalse
valuestring-
refHTMLTextAreaElementundefined
rowsnumber5
disabledbooleanfalse
tooltipstring|undefinedundefined
autocapitalizestring|undefinedundefined
autocompletestring|undefinedundefined
autocorrectstring|undefinedundefined
spellcheckstring|undefinedundefined
minlengthnumber|undefinedundefined
maxlengthstring|undefinedundefined
requiredMarkerstring|undefinedundefined
optionalMarkerstring|undefinedundefined
state'initial'|'valid'|'invalid'"initial"

     

TimePicker

     

Props

nametypedefaultdescription
idstringgenerateId()
labelstring""
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefined
namestring|undefinedundefined
textIfInvalidstring|undefinedundefined
textIfValidstring|undefinedundefined
helperTextstring|undefinedundefined
placeholderstring""
optionalbooleanfalse
valuestring-
refHTMLInputElementundefined
disabledbooleanfalse
tooltipstring|undefinedundefined
autocapitalizestring|undefinedundefined
autocompletestring|undefinedundefined
autocorrectstring|undefinedundefined
spellcheckstring|undefinedundefined
requiredMarkerstring|undefinedundefined
optionalMarkerstring|undefinedundefined
state'initial'|'valid'|'invalid'"initial"

     

WeekPicker

     

Props

nametypedefaultdescription
idstringgenerateId()
labelstring""
stylestring|undefinedundefinedA string specifying custom style properties for the component
classNamestring|undefinedundefined
namestring|undefinedundefined
textIfInvalidstring|undefinedundefined
textIfValidstring|undefinedundefined
helperTextstring|undefinedundefined
placeholderstring""
optionalbooleanfalse
valuestring-
refHTMLInputElementundefined
disabledbooleanfalse
tooltipstring|undefinedundefined
autocapitalizestring|undefinedundefined
autocompletestring|undefinedundefined
autocorrectstring|undefinedundefined
spellcheckstring|undefinedundefined
requiredMarkerstring|undefinedundefined
optionalMarkerstring|undefinedundefined
state'initial'|'valid'|'invalid'"initial"

 

Special Types

/**
 * Compares two values
 */
export type Comparator = (v1: any, v2: any) => number;

/**
 * Returns a Promise that will contain an array of options (label + value) given a query string
 */
export type AsyncAutocompleteDataProvider = (query: string) => Promise<Array<{ label: string, value: any }>>;


/**
 * Returns a Promise that will contain an object describing the result given a query string
 */
export type AsyncDataTableDataProvider =
	(query: string, orderBy: Array<{ key: string, direction: 'asc' | 'desc' }>, recordsPerPage: number, pageIndex: number) => Promise<AsyncDataTableDataProviderResult>;

export interface AsyncDataTableDataProviderResult {
	/** (optional) the number of available records */
	total: number|undefined,
	/** the number of records, filtered by the given query. This is used to create the pagination buttons of the table */
	filtered: number,
	/** the chunk of records to display */
	records: Array<Record<string, any>>
}


/**
 * Given the column value and its current row object, this function returns a representation of that cell
 */
export type DataTableRenderer = (value: any, row: Record<string, any>) => string | DataTableRenderWithComponent
export interface DataTableRenderWithComponent {
	/** The Svelte component that will render the cell */
	component: SvelteComponent,
	/** Props passed to the Svelte component */
	props: Record<string, any> | undefined,
	/** An "on:click" handler. Note that this handler will stop the propagation of the click event to the entire row */
	onClick: (e) => any,
	/** The text content that will be passed to the default slot of the Svelte component */
	textContent: string | undefined
}


/**
 * Given the current query, the column value and the entire row that column is part of, returns a boolean indicating
 * whether or not the current row should be displayed
 */
export type DataTableSearchCallback = (query: string, columnValue: any, row: Record<string, any>) => boolean;


/**
 * Once called, returns a Promise. While waiting for the Promise to settle (either by resolving or rejecting) the form will show a loading state
 */
export type FormSubmitCallback = () => Promise<any>;
2.6.1

2 years ago

2.6.0

3 years ago

2.5.1

3 years ago

2.5.0

3 years ago

2.4.1

3 years ago

2.4.0

3 years ago

2.3.10

3 years ago

2.3.9

3 years ago

2.3.8

3 years ago

2.3.6

3 years ago

2.3.5

3 years ago

2.3.7

3 years ago

2.3.0

3 years ago

2.3.2

3 years ago

2.3.1

3 years ago

2.3.4

3 years ago

2.3.3

3 years ago

2.1.4

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.3

3 years ago

2.1.0

3 years ago

1.10.5

3 years ago

1.10.4

3 years ago

1.10.3

3 years ago

1.10.2

3 years ago

1.10.9

3 years ago

1.10.8

3 years ago

1.10.7

3 years ago

1.10.6

3 years ago

1.11.2

3 years ago

1.11.1

3 years ago

1.10.1

3 years ago

1.10.0

3 years ago

1.12.3

3 years ago

1.12.2

3 years ago

1.12.1

3 years ago

1.12.0

3 years ago

1.11.0

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.4

3 years ago

2.0.0

3 years ago

1.9.1

3 years ago

1.9.0

3 years ago

1.8.2

3 years ago

1.8.1

3 years ago

1.9.2

3 years ago

1.8.0

3 years ago

1.7.1

3 years ago

1.7.0

3 years ago

1.6.4

3 years ago

1.6.3

3 years ago

1.6.2

3 years ago

1.6.1

3 years ago

1.6.0

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.23

4 years ago

1.3.22

4 years ago

1.3.21

4 years ago

1.3.20

4 years ago

1.3.19

4 years ago

1.3.17

4 years ago

1.3.18

4 years ago

1.3.15

4 years ago

1.3.16

4 years ago

1.3.14

4 years ago

1.3.13

4 years ago

1.3.12

4 years ago

1.3.11

4 years ago

1.3.10

4 years ago

1.3.9

4 years ago

1.3.8

4 years ago

1.3.7

4 years ago

1.3.6

4 years ago

1.3.5

4 years ago

1.3.4

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.2.2

4 years ago

1.3.0

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.99

4 years ago

1.1.98

4 years ago

1.1.97

4 years ago

1.1.96

4 years ago

1.1.95

4 years ago

1.1.94

4 years ago

1.1.93

4 years ago

1.1.92

4 years ago

1.1.91

4 years ago

1.1.90

4 years ago

1.1.89

4 years ago

1.1.88

4 years ago

1.1.85

4 years ago

1.1.87

4 years ago

1.1.86

4 years ago

1.1.84

4 years ago

1.1.83

4 years ago

1.1.82

4 years ago

1.1.81

4 years ago

1.1.80

4 years ago

1.1.79

4 years ago

1.1.78

4 years ago

1.1.77

4 years ago

1.1.76

4 years ago

1.1.75

4 years ago

1.1.74

4 years ago

1.1.73

4 years ago

1.1.72

4 years ago

1.1.71

4 years ago

1.1.69

4 years ago

1.1.68

4 years ago

1.1.67

4 years ago

1.1.66

4 years ago

1.1.65

4 years ago

1.1.64

4 years ago

1.1.63

4 years ago

1.1.59

4 years ago

1.1.58

4 years ago

1.1.57

4 years ago

1.1.62

4 years ago

1.1.61

4 years ago

1.1.60

4 years ago

1.1.56

4 years ago

1.1.55

4 years ago

1.1.49

4 years ago

1.1.52

4 years ago

1.1.51

4 years ago

1.1.50

4 years ago

1.1.54

4 years ago

1.1.53

4 years ago

1.1.48

4 years ago

1.1.47

4 years ago

1.1.46

4 years ago

1.1.45

4 years ago

1.1.44

4 years ago

1.1.43

4 years ago

1.1.41

4 years ago

1.1.42

4 years ago

1.1.39

4 years ago

1.1.40

4 years ago

1.1.38

4 years ago

1.1.37

4 years ago

1.1.36

4 years ago

1.1.35

4 years ago

1.1.34

4 years ago

1.1.33

4 years ago

1.1.32

4 years ago

1.1.30

4 years ago

1.1.31

4 years ago

1.1.29

4 years ago

1.1.28

4 years ago

1.1.27

4 years ago

1.1.26

4 years ago

1.1.25

4 years ago

1.1.24

4 years ago

1.1.23

4 years ago

1.1.22

4 years ago

1.1.21

4 years ago

1.1.19

4 years ago

1.1.20

4 years ago

1.1.18

4 years ago

1.1.16

4 years ago

1.1.15

4 years ago

1.1.17

4 years ago

1.1.14

4 years ago

1.1.12

4 years ago

1.1.11

4 years ago

1.1.13

4 years ago

1.1.9

4 years ago

1.1.10

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.0.59

4 years ago

1.0.58

4 years ago

1.0.57

4 years ago

1.0.51

4 years ago

1.0.55

4 years ago

1.0.54

4 years ago

1.0.53

4 years ago

1.0.52

4 years ago

1.0.56

4 years ago

1.0.49

4 years ago

1.0.50

4 years ago

1.0.48

4 years ago

1.0.47

4 years ago

1.0.46

4 years ago

1.0.45

4 years ago

1.0.44

4 years ago

1.0.43

4 years ago

1.0.42

4 years ago

1.0.41

4 years ago

1.0.40

4 years ago

1.0.39

4 years ago

1.0.38

4 years ago

1.0.37

4 years ago

1.0.36

4 years ago

1.0.35

4 years ago

1.0.34

4 years ago

1.0.33

4 years ago

1.0.32

4 years ago

1.0.31

4 years ago

1.0.30

4 years ago

1.0.29

4 years ago

1.0.28

4 years ago

1.0.27

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.22

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago