Closed novacbn closed 2 years ago
DataSelect
Added new Component! Similar to DataTable, allows you to provide a list of data structures to create a dropdown of selectable options.
DataTable
<svelte:fragment slot="default" let:index={number} let:item={IDataSelectItem}> — Allows for overriding of the default display option text.
<svelte:fragment slot="default" let:index={number} let:item={IDataSelectItem}>
<DataSelect items={IDataSelectItem[]}> — Sets the options displayed to the user.
<DataSelect items={IDataSelectItem[]}>
IDataSelectItem.disabled: boolean
IDataSelectItem.id: string
<input />
IDataSelectItem.palette: "auto" | "inverse" | "accent" | "dark" | "light" | "alert" | "affirmative" | "informative" | "negative"
<Check>
<Radio>
IDataSelectItem.text: string
IDataSelectItem.value: string
IDataSelectItem.id
<DataSelect multiple={boolean}> — Controls whether multiple options can be selected by the user.
<DataSelect multiple={boolean}>
<DataSelect max={number}>
<DataSelect logic_name={string}> — Controls the form name that prefixes all options.
<DataSelect logic_name={string}>
<DataSelect logic_state={string | string[]}> — Controls which options are selected.
<DataSelect logic_state={string | string[]}>
<DataSelect searching={string}> — Controls the current searching filter in the inner TextInput value.
<DataSelect searching={string}>
TextInput
<DataSelect searching_algorithm={(item: IDataSelectItem, searching?: string) => boolean}>
<DataSelect placeholder={string}> — Alters displayed text while closed or if no options are selected.
<DataSelect placeholder={string}>
<DataSelect palette={"auto" | "inverse" | "accent" | "dark" | "light" | "alert" | "affirmative" | "informative" | "negative"}> — Alters the color palette of the inner TextInput Component.
<DataSelect palette={"auto" | "inverse" | "accent" | "dark" | "light" | "alert" | "affirmative" | "informative" | "negative"}>
<DataSelect sizing={"nano", "tiny", "small", "medium", "large", "huge", "massive", "${VIEWPORT}:${SIZE}"}>— Alters the sizing of the innerTextInput Component.
<DataSelect sizing={"nano", "tiny", "small", "medium", "large", "huge", "massive", "${VIEWPORT}:${SIZE}"}>
<DataSelect variation={"flush"}> — Alters to render the choices inline instead of a Popover.
<DataSelect variation={"flush"}>
Popover
<DataTable searching_algorithm> — Updated to provide <DataTable searching> instead of needing to bind to retrieve value.
<DataTable searching_algorithm>
<DataTable searching>
<DataTable searching_algorithm={(item: IDataSelectItem) => boolean}>
<DataTable searching_algorithm={(item: IDataSelectItem, searching?: string) => boolean}>
<Popover.Container variation="control">
<Popover.Section>
Preview: https://novacbn-kahi-ui-pr-125-run-799.surge.sh
Preview: https://novacbn-kahi-ui-pr-125-run-801.surge.sh
Preview: https://novacbn-kahi-ui-pr-125-run-803.surge.sh
Preview: https://novacbn-kahi-ui-pr-125-run-808.surge.sh
CHANGELOG
DataSelect
Added new Component! Similar to
DataTable
, allows you to provide a list of data structures to create a dropdown of selectable options.<svelte:fragment slot="default" let:index={number} let:item={IDataSelectItem}>
— Allows for overriding of the default display option text.<DataSelect items={IDataSelectItem[]}>
— Sets the options displayed to the user.IDataSelectItem.disabled: boolean
— Controls if the specific option is disabled.IDataSelectItem.id: string
— Controls the element ID assigned to the option's<input />
element.IDataSelectItem.palette: "auto" | "inverse" | "accent" | "dark" | "light" | "alert" | "affirmative" | "informative" | "negative"
— Alters the color palette of the inner<Check>
or<Radio>
Component.IDataSelectItem.text: string
— Controls the text displayed to the user for the option.IDataSelectItem.value: string
— Controls the form value associated with the option. If unset,IDataSelectItem.id
will be used.<DataSelect multiple={boolean}>
— Controls whether multiple options can be selected by the user.<DataSelect max={number}>
— Controls how many multiple choices a user can select when enabled.<DataSelect logic_name={string}>
— Controls the form name that prefixes all options.<DataSelect logic_state={string | string[]}>
— Controls which options are selected.<DataSelect searching={string}>
— Controls the current searching filter in the innerTextInput
value.<DataSelect searching_algorithm={(item: IDataSelectItem, searching?: string) => boolean}>
— Allows implementing of custom search filtering.<DataSelect placeholder={string}>
— Alters displayed text while closed or if no options are selected.<DataSelect palette={"auto" | "inverse" | "accent" | "dark" | "light" | "alert" | "affirmative" | "informative" | "negative"}>
— Alters the color palette of the innerTextInput
Component.<DataSelect sizing={"nano", "tiny", "small", "medium", "large", "huge", "massive", "${VIEWPORT}:${SIZE}"}>
— Alters the sizing of the innerTextInput
Component.<DataSelect variation={"flush"}>
— Alters to render the choices inline instead of aPopover
.DataTable
<DataTable searching_algorithm>
— Updated to provide<DataTable searching>
instead of needing to bind to retrieve value.<DataTable searching_algorithm={(item: IDataSelectItem) => boolean}>
-><DataTable searching_algorithm={(item: IDataSelectItem, searching?: string) => boolean}>
Popover
<Popover.Container variation="control">
— Activates the<Popover.Section>
content when sibling content is focused.