@skewedaspect/sleekspace-ui 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/context.d.ts +4 -0
- package/dist/components/Autocomplete/SkAutocomplete.vue.d.ts +87 -0
- package/dist/components/Autocomplete/SkAutocompleteEmpty.vue.d.ts +17 -0
- package/dist/components/Autocomplete/SkAutocompleteGroup.vue.d.ts +17 -0
- package/dist/components/Autocomplete/SkAutocompleteGroupLabel.vue.d.ts +17 -0
- package/dist/components/Autocomplete/SkAutocompleteItem.vue.d.ts +39 -0
- package/dist/components/Autocomplete/SkAutocompleteSeparator.vue.d.ts +2 -0
- package/dist/components/Autocomplete/index.d.ts +7 -0
- package/dist/components/Autocomplete/types.d.ts +3 -0
- package/dist/components/Breadcrumbs/context.d.ts +4 -0
- package/dist/components/Button/SkButton.vue.d.ts +8 -1
- package/dist/components/Button/types.d.ts +2 -0
- package/dist/components/Card/SkCard.vue.d.ts +1 -1
- package/dist/components/ContextMenu/context.d.ts +3 -0
- package/dist/components/Dropdown/SkDropdown.vue.d.ts +1 -1
- package/dist/components/Dropdown/context.d.ts +3 -0
- package/dist/components/Field/SkField.vue.d.ts +7 -6
- package/dist/components/Input/SkInput.vue.d.ts +9 -2
- package/dist/components/Input/types.d.ts +2 -0
- package/dist/components/InputGroup/SkInputGroup.vue.d.ts +23 -0
- package/dist/components/InputGroup/SkInputGroupAddon.vue.d.ts +33 -0
- package/dist/components/InputGroup/types.d.ts +13 -0
- package/dist/components/NumberInput/SkNumberInput.vue.d.ts +15 -1
- package/dist/components/NumberInput/types.d.ts +2 -0
- package/dist/components/Pagination/context.d.ts +5 -0
- package/dist/components/Panel/SkPanel.vue.d.ts +1 -1
- package/dist/components/Panel/types.d.ts +2 -1
- package/dist/components/Radio/context.d.ts +4 -0
- package/dist/components/Select/SkSelect.vue.d.ts +7 -1
- package/dist/components/Select/types.d.ts +2 -0
- package/dist/components/Sidebar/SkSidebar.vue.d.ts +1 -1
- package/dist/components/Tabs/context.d.ts +6 -0
- package/dist/components/Textarea/SkTextarea.vue.d.ts +1 -1
- package/dist/components/Tooltip/SkTooltip.vue.d.ts +1 -1
- package/dist/composables/injectionKeys.d.ts +9 -0
- package/dist/global.d.ts +4 -0
- package/dist/index.d.ts +18 -0
- package/dist/sleekspace-ui.css +836 -280
- package/dist/sleekspace-ui.es.js +3759 -2545
- package/dist/sleekspace-ui.umd.js +3765 -2543
- package/dist/static/components/alert.d.ts +2 -1
- package/dist/static/components/avatar.d.ts +2 -1
- package/dist/static/components/breadcrumbs.d.ts +2 -1
- package/dist/static/components/button.d.ts +4 -2
- package/dist/static/components/card.d.ts +2 -1
- package/dist/static/components/checkbox.d.ts +2 -1
- package/dist/static/components/colorPicker.d.ts +2 -1
- package/dist/static/components/divider.d.ts +2 -1
- package/dist/static/components/dropdown.d.ts +2 -1
- package/dist/static/components/field.d.ts +2 -1
- package/dist/static/components/group.d.ts +2 -1
- package/dist/static/components/input.d.ts +4 -2
- package/dist/static/components/inputGroup.d.ts +8 -0
- package/dist/static/components/inputGroupAddon.d.ts +7 -0
- package/dist/static/components/navBar.d.ts +2 -1
- package/dist/static/components/numberInput.d.ts +4 -2
- package/dist/static/components/page.d.ts +2 -1
- package/dist/static/components/pagination.d.ts +2 -1
- package/dist/static/components/panel.d.ts +2 -1
- package/dist/static/components/progress.d.ts +2 -1
- package/dist/static/components/radio.d.ts +2 -1
- package/dist/static/components/select.d.ts +4 -2
- package/dist/static/components/sidebar.d.ts +2 -1
- package/dist/static/components/skeleton.d.ts +2 -1
- package/dist/static/components/slider.d.ts +2 -1
- package/dist/static/components/spinner.d.ts +2 -1
- package/dist/static/components/switchInput.d.ts +2 -1
- package/dist/static/components/table.d.ts +2 -1
- package/dist/static/components/tag.d.ts +2 -1
- package/dist/static/components/tagsInput.d.ts +2 -1
- package/dist/static/components/textarea.d.ts +2 -1
- package/dist/static/components/toolbar.d.ts +2 -1
- package/dist/static/components/tooltip.d.ts +2 -1
- package/dist/static/h.d.ts +2 -0
- package/dist/static/index.cjs.js +1 -1
- package/dist/static/index.d.ts +6 -0
- package/dist/static/index.es.js +366 -216
- package/dist/static/render.d.ts +2 -1
- package/dist/static/stringH.d.ts +2 -0
- package/dist/static/types.d.ts +5 -0
- package/dist/tailwind.css +222 -0
- package/dist/tokens.css +0 -223
- package/dist/types/corners.d.ts +1 -0
- package/dist/utils/slots.d.ts +6 -0
- package/llms-full.txt +17 -9
- package/package.json +9 -3
- package/src/components/Accordion/SkAccordion.vue +5 -2
- package/src/components/Accordion/SkAccordionItem.vue +7 -4
- package/src/components/Accordion/context.ts +23 -0
- package/src/components/Alert/SkAlert.vue +4 -2
- package/src/components/Autocomplete/SkAutocomplete.test.ts +83 -0
- package/src/components/Autocomplete/SkAutocomplete.vue +305 -0
- package/src/components/Autocomplete/SkAutocompleteEmpty.vue +39 -0
- package/src/components/Autocomplete/SkAutocompleteGroup.vue +46 -0
- package/src/components/Autocomplete/SkAutocompleteGroupLabel.vue +39 -0
- package/src/components/Autocomplete/SkAutocompleteItem.vue +85 -0
- package/src/components/Autocomplete/SkAutocompleteSeparator.vue +39 -0
- package/src/components/Autocomplete/index.ts +13 -0
- package/src/components/Autocomplete/types.ts +10 -0
- package/src/components/Breadcrumbs/SkBreadcrumbItem.vue +8 -3
- package/src/components/Breadcrumbs/SkBreadcrumbSeparator.vue +8 -2
- package/src/components/Breadcrumbs/SkBreadcrumbs.vue +11 -14
- package/src/components/Breadcrumbs/context.ts +20 -0
- package/src/components/Button/SkButton.vue +54 -11
- package/src/components/Button/types.ts +6 -0
- package/src/components/Card/SkCard.vue +12 -5
- package/src/components/Checkbox/SkCheckbox.vue +9 -2
- package/src/components/ColorPicker/SkColorPicker.vue +27 -5
- package/src/components/ContextMenu/SkContextMenu.vue +4 -1
- package/src/components/ContextMenu/SkContextMenuSubmenu.vue +5 -2
- package/src/components/ContextMenu/context.ts +17 -0
- package/src/components/Dropdown/SkDropdown.vue +2 -1
- package/src/components/Dropdown/SkDropdownSubmenu.vue +4 -3
- package/src/components/Dropdown/context.ts +16 -0
- package/src/components/Field/SkField.test.ts +88 -0
- package/src/components/Field/SkField.vue +15 -7
- package/src/components/Input/SkInput.test.ts +61 -0
- package/src/components/Input/SkInput.vue +42 -7
- package/src/components/Input/types.ts +2 -0
- package/src/components/InputGroup/SkInputGroup.test.ts +171 -0
- package/src/components/InputGroup/SkInputGroup.vue +131 -0
- package/src/components/InputGroup/SkInputGroupAddon.test.ts +104 -0
- package/src/components/InputGroup/SkInputGroupAddon.vue +107 -0
- package/src/components/InputGroup/types.ts +27 -0
- package/src/components/Listbox/SkListbox.vue +27 -6
- package/src/components/Modal/SkModal.vue +11 -4
- package/src/components/NavBar/SkNavBar.vue +5 -4
- package/src/components/NumberInput/SkNumberInput.vue +49 -8
- package/src/components/NumberInput/types.ts +2 -0
- package/src/components/Page/SkPage.vue +18 -15
- package/src/components/Pagination/SkPagination.vue +6 -3
- package/src/components/Pagination/SkPaginationItem.vue +8 -5
- package/src/components/Pagination/context.ts +19 -0
- package/src/components/Panel/types.ts +3 -2
- package/src/components/Popover/SkPopover.vue +11 -4
- package/src/components/Radio/SkRadio.vue +14 -4
- package/src/components/Radio/SkRadioGroup.vue +4 -2
- package/src/components/Radio/context.ts +17 -0
- package/src/components/Select/SkSelect.vue +39 -7
- package/src/components/Select/types.ts +2 -0
- package/src/components/Switch/SkSwitch.vue +14 -13
- package/src/components/Tabs/SkTab.vue +10 -3
- package/src/components/Tabs/SkTabList.vue +4 -2
- package/src/components/Tabs/SkTabs.vue +5 -3
- package/src/components/Tabs/context.ts +19 -0
- package/src/components/TagsInput/SkTagsInput.vue +28 -7
- package/src/components/Textarea/SkTextarea.vue +27 -6
- package/src/components/TreeView/SkTreeItem.vue +10 -2
- package/src/composables/injectionKeys.ts +52 -0
- package/src/index.ts +28 -0
- package/src/static/__tests__/parity.test.ts +2 -1
- package/src/static/__tests__/parityHarness.ts +5 -2
- package/src/static/components/__tests__/helpers.test.ts +191 -99
- package/src/static/components/alert.ts +12 -11
- package/src/static/components/avatar.ts +15 -16
- package/src/static/components/breadcrumbs.ts +3 -2
- package/src/static/components/button.ts +23 -27
- package/src/static/components/card.ts +3 -2
- package/src/static/components/checkbox.ts +11 -14
- package/src/static/components/colorPicker.ts +7 -9
- package/src/static/components/divider.ts +4 -3
- package/src/static/components/dropdown.ts +15 -6
- package/src/static/components/field.ts +32 -15
- package/src/static/components/group.ts +3 -2
- package/src/static/components/input.ts +20 -15
- package/src/static/components/inputGroup.ts +30 -0
- package/src/static/components/inputGroupAddon.ts +29 -0
- package/src/static/components/navBar.ts +30 -17
- package/src/static/components/numberInput.ts +17 -17
- package/src/static/components/page.ts +3 -2
- package/src/static/components/pagination.ts +3 -2
- package/src/static/components/panel.ts +3 -2
- package/src/static/components/progress.ts +3 -2
- package/src/static/components/radio.ts +14 -20
- package/src/static/components/select.ts +18 -15
- package/src/static/components/sidebar.ts +9 -13
- package/src/static/components/skeleton.ts +7 -10
- package/src/static/components/slider.ts +7 -9
- package/src/static/components/spinner.ts +22 -22
- package/src/static/components/switchInput.ts +12 -14
- package/src/static/components/table.ts +8 -10
- package/src/static/components/tag.ts +17 -11
- package/src/static/components/tagsInput.ts +3 -3
- package/src/static/components/textarea.ts +8 -13
- package/src/static/components/toolbar.ts +7 -10
- package/src/static/components/tooltip.ts +3 -2
- package/src/static/generated/defaults.ts +25 -9
- package/src/static/generated/propTypes.ts +19 -2
- package/src/static/h.ts +16 -0
- package/src/static/index.ts +8 -0
- package/src/static/render.test.ts +14 -10
- package/src/static/render.ts +33 -18
- package/src/static/specs.test.ts +1 -0
- package/src/static/specs.ts +22 -2
- package/src/static/stringH.ts +104 -0
- package/src/static/types.ts +25 -0
- package/src/styles/components/_autocomplete.scss +498 -0
- package/src/styles/components/_button.scss +55 -6
- package/src/styles/components/_index.scss +2 -0
- package/src/styles/components/_input-group.scss +292 -0
- package/src/styles/components/_input.scss +57 -9
- package/src/styles/components/_number-input.scss +88 -14
- package/src/styles/components/_select.scss +56 -9
- package/src/styles/mixins/_cut-border.scss +83 -0
- package/src/styles/tailwind.scss +262 -0
- package/src/styles/tokens.scss +8 -255
- package/src/types/corners.ts +10 -0
- package/src/utils/slots.test.ts +89 -0
- package/src/utils/slots.ts +80 -0
- package/web-types.json +392 -12
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AlertKind, StaticCustomColors } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface AlertStaticProps extends StaticCustomColors {
|
|
3
4
|
kind?: AlertKind;
|
|
4
5
|
subtle?: boolean;
|
|
@@ -9,4 +10,4 @@ export interface AlertStaticProps extends StaticCustomColors {
|
|
|
9
10
|
*/
|
|
10
11
|
icon?: string | false;
|
|
11
12
|
}
|
|
12
|
-
export declare function alert(props?: AlertStaticProps, children?:
|
|
13
|
+
export declare function alert<T>(h: H<T>, props?: AlertStaticProps, children?: T | T[]): T;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AvatarSize, ComponentKind, StaticCustomColors } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface AvatarStaticProps extends StaticCustomColors {
|
|
3
4
|
kind?: ComponentKind;
|
|
4
5
|
size?: AvatarSize;
|
|
@@ -6,4 +7,4 @@ export interface AvatarStaticProps extends StaticCustomColors {
|
|
|
6
7
|
alt?: string;
|
|
7
8
|
initials?: string;
|
|
8
9
|
}
|
|
9
|
-
export declare function avatar(props?: AvatarStaticProps):
|
|
10
|
+
export declare function avatar<T>(h: H<T>, props?: AvatarStaticProps): T;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BreadcrumbsKind, StaticCustomColors } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface BreadcrumbsStaticProps extends StaticCustomColors {
|
|
3
4
|
kind?: BreadcrumbsKind;
|
|
4
5
|
separator?: string;
|
|
5
6
|
}
|
|
6
|
-
export declare function breadcrumbs(props?: BreadcrumbsStaticProps, children?:
|
|
7
|
+
export declare function breadcrumbs<T>(h: H<T>, props?: BreadcrumbsStaticProps, children?: T | T[]): T;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ButtonKind, ButtonSize, ButtonType, ButtonVariant, StaticCustomColors } from '../types';
|
|
1
|
+
import { ButtonCorner, ButtonKind, ButtonSize, ButtonType, ButtonVariant, StaticCustomColors } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface ButtonStaticProps extends StaticCustomColors {
|
|
3
4
|
type?: ButtonType;
|
|
4
5
|
kind?: ButtonKind;
|
|
@@ -8,6 +9,7 @@ export interface ButtonStaticProps extends StaticCustomColors {
|
|
|
8
9
|
loading?: boolean;
|
|
9
10
|
pressed?: boolean;
|
|
10
11
|
dense?: boolean;
|
|
12
|
+
corners?: ButtonCorner[];
|
|
11
13
|
href?: string;
|
|
12
14
|
}
|
|
13
|
-
export declare function button(props?: ButtonStaticProps, children?:
|
|
15
|
+
export declare function button<T>(h: H<T>, props?: ButtonStaticProps, children?: T | T[]): T;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CardKind, StaticCustomColors } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface CardStaticProps extends StaticCustomColors {
|
|
3
4
|
kind?: CardKind;
|
|
4
5
|
}
|
|
5
|
-
export declare function card(props?: CardStaticProps, children?:
|
|
6
|
+
export declare function card<T>(h: H<T>, props?: CardStaticProps, children?: T | T[]): T;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentKind, ComponentSize } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface CheckboxStaticProps {
|
|
3
4
|
kind?: ComponentKind;
|
|
4
5
|
size?: ComponentSize;
|
|
@@ -7,4 +8,4 @@ export interface CheckboxStaticProps {
|
|
|
7
8
|
required?: boolean;
|
|
8
9
|
name?: string;
|
|
9
10
|
}
|
|
10
|
-
export declare function checkbox(props?: CheckboxStaticProps, children?:
|
|
11
|
+
export declare function checkbox<T>(h: H<T>, props?: CheckboxStaticProps, children?: T | T[]): T;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ComponentSize } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface ColorPickerStaticProps {
|
|
3
4
|
size?: ComponentSize;
|
|
4
5
|
value?: string;
|
|
5
6
|
name?: string;
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
}
|
|
8
|
-
export declare function colorPicker(props?: ColorPickerStaticProps):
|
|
9
|
+
export declare function colorPicker<T>(h: H<T>, props?: ColorPickerStaticProps): T;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ComponentKind, ComponentSize, DividerOrientation, DividerVariant } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface DividerStaticProps {
|
|
3
4
|
orientation?: DividerOrientation;
|
|
4
5
|
kind?: ComponentKind;
|
|
5
6
|
variant?: DividerVariant;
|
|
6
7
|
size?: ComponentSize;
|
|
7
8
|
}
|
|
8
|
-
export declare function divider(props?: DividerStaticProps):
|
|
9
|
+
export declare function divider<T>(h: H<T>, props?: DividerStaticProps): T;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { SemanticKind } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface DropdownStaticProps {
|
|
3
4
|
summary: string;
|
|
4
5
|
kind?: SemanticKind;
|
|
5
6
|
size?: 'sm' | 'md' | 'lg';
|
|
6
7
|
open?: boolean;
|
|
7
8
|
}
|
|
8
|
-
export declare function dropdown(props: DropdownStaticProps, children?:
|
|
9
|
+
export declare function dropdown<T>(h: H<T>, props: DropdownStaticProps, children?: T | T[]): T;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FieldLabelPosition } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface FieldStaticProps {
|
|
3
4
|
label?: string;
|
|
4
5
|
description?: string;
|
|
@@ -12,4 +13,4 @@ export interface FieldStaticProps {
|
|
|
12
13
|
*/
|
|
13
14
|
id?: string;
|
|
14
15
|
}
|
|
15
|
-
export declare function field(props?: FieldStaticProps, children?:
|
|
16
|
+
export declare function field<T>(h: H<T>, props?: FieldStaticProps, children?: T | T[]): T;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GroupOrientation } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface GroupStaticProps {
|
|
3
4
|
orientation?: GroupOrientation;
|
|
4
5
|
}
|
|
5
|
-
export declare function group(props?: GroupStaticProps, children?:
|
|
6
|
+
export declare function group<T>(h: H<T>, props?: GroupStaticProps, children?: T | T[]): T;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { ComponentKind, ComponentSize } from '../types';
|
|
1
|
+
import { ComponentKind, ComponentSize, InputCorner } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface InputStaticProps {
|
|
3
4
|
kind?: ComponentKind;
|
|
4
5
|
size?: ComponentSize;
|
|
6
|
+
corners?: InputCorner[];
|
|
5
7
|
type?: string;
|
|
6
8
|
value?: string;
|
|
7
9
|
placeholder?: string;
|
|
@@ -11,4 +13,4 @@ export interface InputStaticProps {
|
|
|
11
13
|
readonly?: boolean;
|
|
12
14
|
required?: boolean;
|
|
13
15
|
}
|
|
14
|
-
export declare function input(props?: InputStaticProps):
|
|
16
|
+
export declare function input<T>(h: H<T>, props?: InputStaticProps): T;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentKind, ComponentSize, InputGroupCorner, StaticCustomColors } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
3
|
+
export interface InputGroupStaticProps extends StaticCustomColors {
|
|
4
|
+
kind?: ComponentKind;
|
|
5
|
+
size?: ComponentSize;
|
|
6
|
+
corners?: InputGroupCorner[];
|
|
7
|
+
}
|
|
8
|
+
export declare function inputGroup<T>(h: H<T>, props?: InputGroupStaticProps, children?: T | T[]): T;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentKind, ComponentSize } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
3
|
+
export interface InputGroupAddonStaticProps {
|
|
4
|
+
kind?: ComponentKind;
|
|
5
|
+
size?: ComponentSize;
|
|
6
|
+
}
|
|
7
|
+
export declare function inputGroupAddon<T>(h: H<T>, props?: InputGroupAddonStaticProps, children?: T | T[]): T;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NavBarKind, StaticCustomColors } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface NavBarStaticProps extends StaticCustomColors {
|
|
3
4
|
kind?: NavBarKind;
|
|
4
5
|
/**
|
|
@@ -13,4 +14,4 @@ export interface NavBarStaticProps extends StaticCustomColors {
|
|
|
13
14
|
/** HTML for the actions slot (right-aligned CTAs / user menu). */
|
|
14
15
|
actions?: string;
|
|
15
16
|
}
|
|
16
|
-
export declare function navBar(props?: NavBarStaticProps, children?:
|
|
17
|
+
export declare function navBar<T>(h: H<T>, props?: NavBarStaticProps, children?: T | T[]): T;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { ComponentKind, ComponentSize } from '../types';
|
|
1
|
+
import { ComponentKind, ComponentSize, NumberInputCorner } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface NumberInputStaticProps {
|
|
3
4
|
kind?: ComponentKind;
|
|
4
5
|
size?: ComponentSize;
|
|
6
|
+
corners?: NumberInputCorner[];
|
|
5
7
|
value?: string;
|
|
6
8
|
min?: string;
|
|
7
9
|
max?: string;
|
|
@@ -12,4 +14,4 @@ export interface NumberInputStaticProps {
|
|
|
12
14
|
readonly?: boolean;
|
|
13
15
|
required?: boolean;
|
|
14
16
|
}
|
|
15
|
-
export declare function numberInput(props?: NumberInputStaticProps):
|
|
17
|
+
export declare function numberInput<T>(h: H<T>, props?: NumberInputStaticProps): T;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PagePanelMode } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface PageStaticProps {
|
|
3
4
|
fixedHeader?: boolean;
|
|
4
5
|
fixedFooter?: boolean;
|
|
@@ -6,4 +7,4 @@ export interface PageStaticProps {
|
|
|
6
7
|
sidebarMode?: PagePanelMode;
|
|
7
8
|
asideMode?: PagePanelMode;
|
|
8
9
|
}
|
|
9
|
-
export declare function page(props?: PageStaticProps, children?:
|
|
10
|
+
export declare function page<T>(h: H<T>, props?: PageStaticProps, children?: T | T[]): T;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PaginationKind, StaticCustomColors } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface PaginationStaticProps extends StaticCustomColors {
|
|
3
4
|
kind?: PaginationKind;
|
|
4
5
|
}
|
|
5
|
-
export declare function pagination(props?: PaginationStaticProps, children?:
|
|
6
|
+
export declare function pagination<T>(h: H<T>, props?: PaginationStaticProps, children?: T | T[]): T;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PanelCorner, PanelKind, PanelSize, StaticCustomColors } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface PanelStaticProps extends StaticCustomColors {
|
|
3
4
|
kind?: PanelKind;
|
|
4
5
|
size?: PanelSize;
|
|
@@ -8,4 +9,4 @@ export interface PanelStaticProps extends StaticCustomColors {
|
|
|
8
9
|
corners?: PanelCorner[];
|
|
9
10
|
decorationCorner?: PanelCorner;
|
|
10
11
|
}
|
|
11
|
-
export declare function panel(props?: PanelStaticProps, children?:
|
|
12
|
+
export declare function panel<T>(h: H<T>, props?: PanelStaticProps, children?: T | T[]): T;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentKind, ProgressSize } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface ProgressStaticProps {
|
|
3
4
|
kind?: ComponentKind;
|
|
4
5
|
size?: ProgressSize;
|
|
@@ -6,4 +7,4 @@ export interface ProgressStaticProps {
|
|
|
6
7
|
value?: number | null;
|
|
7
8
|
max?: number;
|
|
8
9
|
}
|
|
9
|
-
export declare function progress(props?: ProgressStaticProps, children?:
|
|
10
|
+
export declare function progress<T>(h: H<T>, props?: ProgressStaticProps, children?: T | T[]): T;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentKind, ComponentSize } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface RadioStaticProps {
|
|
3
4
|
kind?: ComponentKind;
|
|
4
5
|
size?: ComponentSize;
|
|
@@ -8,4 +9,4 @@ export interface RadioStaticProps {
|
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
required?: boolean;
|
|
10
11
|
}
|
|
11
|
-
export declare function radio(props?: RadioStaticProps, children?:
|
|
12
|
+
export declare function radio<T>(h: H<T>, props?: RadioStaticProps, children?: T | T[]): T;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { ComponentKind, ComponentSize } from '../types';
|
|
1
|
+
import { ComponentKind, ComponentSize, SelectCorner } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface SelectStaticProps {
|
|
3
4
|
kind?: ComponentKind;
|
|
4
5
|
size?: ComponentSize;
|
|
6
|
+
corners?: SelectCorner[];
|
|
5
7
|
name?: string;
|
|
6
8
|
id?: string;
|
|
7
9
|
disabled?: boolean;
|
|
8
10
|
required?: boolean;
|
|
9
11
|
}
|
|
10
|
-
export declare function select(props?: SelectStaticProps, children?:
|
|
12
|
+
export declare function select<T>(h: H<T>, props?: SelectStaticProps, children?: T | T[]): T;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SidebarKind, SidebarSide, StaticCustomColors } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface SidebarStaticProps extends StaticCustomColors {
|
|
3
4
|
kind?: SidebarKind;
|
|
4
5
|
side?: SidebarSide;
|
|
@@ -6,4 +7,4 @@ export interface SidebarStaticProps extends StaticCustomColors {
|
|
|
6
7
|
/** CSS width of the sidebar (not used for class output; here for completeness). */
|
|
7
8
|
width?: string;
|
|
8
9
|
}
|
|
9
|
-
export declare function sidebar(props?: SidebarStaticProps, children?:
|
|
10
|
+
export declare function sidebar<T>(h: H<T>, props?: SidebarStaticProps, children?: T | T[]): T;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { H } from '../h';
|
|
1
2
|
export type SkeletonVariant = 'text' | 'circular' | 'rectangular' | 'square';
|
|
2
3
|
export type SkeletonAnimation = 'shimmer' | 'pulse' | 'none';
|
|
3
4
|
export interface SkeletonStaticProps {
|
|
@@ -8,4 +9,4 @@ export interface SkeletonStaticProps {
|
|
|
8
9
|
/** CSS height value. Emitted as inline style when set. */
|
|
9
10
|
height?: string;
|
|
10
11
|
}
|
|
11
|
-
export declare function skeleton(props?: SkeletonStaticProps):
|
|
12
|
+
export declare function skeleton<T>(h: H<T>, props?: SkeletonStaticProps): T;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentKind, ComponentSize } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface SliderStaticProps {
|
|
3
4
|
kind?: ComponentKind;
|
|
4
5
|
size?: ComponentSize;
|
|
@@ -9,4 +10,4 @@ export interface SliderStaticProps {
|
|
|
9
10
|
name?: string;
|
|
10
11
|
disabled?: boolean;
|
|
11
12
|
}
|
|
12
|
-
export declare function slider(props?: SliderStaticProps):
|
|
13
|
+
export declare function slider<T>(h: H<T>, props?: SliderStaticProps): T;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentKind, SpinnerSize, SpinnerVariant } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface SpinnerStaticProps {
|
|
3
4
|
kind?: ComponentKind;
|
|
4
5
|
size?: SpinnerSize;
|
|
@@ -9,4 +10,4 @@ export interface SpinnerStaticProps {
|
|
|
9
10
|
*/
|
|
10
11
|
color?: string;
|
|
11
12
|
}
|
|
12
|
-
export declare function spinner(props?: SpinnerStaticProps):
|
|
13
|
+
export declare function spinner<T>(h: H<T>, props?: SpinnerStaticProps): T;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentKind, ComponentSize } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface SwitchStaticProps {
|
|
3
4
|
kind?: ComponentKind;
|
|
4
5
|
size?: ComponentSize;
|
|
@@ -7,4 +8,4 @@ export interface SwitchStaticProps {
|
|
|
7
8
|
disabled?: boolean;
|
|
8
9
|
required?: boolean;
|
|
9
10
|
}
|
|
10
|
-
export declare function switchInput(props?: SwitchStaticProps, children?:
|
|
11
|
+
export declare function switchInput<T>(h: H<T>, props?: SwitchStaticProps, children?: T | T[]): T;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { StaticCustomColors, TableKind, TableVariant } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface TableStaticProps extends StaticCustomColors {
|
|
3
4
|
kind?: TableKind;
|
|
4
5
|
variant?: TableVariant;
|
|
@@ -9,4 +10,4 @@ export interface TableStaticProps extends StaticCustomColors {
|
|
|
9
10
|
darkBackground?: boolean;
|
|
10
11
|
subtle?: boolean;
|
|
11
12
|
}
|
|
12
|
-
export declare function table(props?: TableStaticProps, children?:
|
|
13
|
+
export declare function table<T>(h: H<T>, props?: TableStaticProps, children?: T | T[]): T;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ComponentKind, StaticCustomColors, TagSize, TagVariant } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface TagStaticProps extends StaticCustomColors {
|
|
3
4
|
kind?: ComponentKind;
|
|
4
5
|
variant?: TagVariant;
|
|
5
6
|
size?: TagSize;
|
|
6
7
|
removable?: boolean;
|
|
7
8
|
}
|
|
8
|
-
export declare function tag(props?: TagStaticProps, children?:
|
|
9
|
+
export declare function tag<T>(h: H<T>, props?: TagStaticProps, children?: T | T[]): T;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ComponentKind, ComponentSize } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface TagsInputStaticProps {
|
|
3
4
|
kind?: ComponentKind;
|
|
4
5
|
size?: ComponentSize;
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
}
|
|
7
|
-
export declare function tagsInput(props?: TagsInputStaticProps, children?:
|
|
8
|
+
export declare function tagsInput<T>(h: H<T>, props?: TagsInputStaticProps, children?: T | T[]): T;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentKind, ComponentSize } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface TextareaStaticProps {
|
|
3
4
|
kind?: ComponentKind;
|
|
4
5
|
size?: ComponentSize;
|
|
@@ -9,4 +10,4 @@ export interface TextareaStaticProps {
|
|
|
9
10
|
readonly?: boolean;
|
|
10
11
|
required?: boolean;
|
|
11
12
|
}
|
|
12
|
-
export declare function textarea(props?: TextareaStaticProps, children?:
|
|
13
|
+
export declare function textarea<T>(h: H<T>, props?: TextareaStaticProps, children?: T | T[]): T;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { StaticCustomColors, ToolbarCorner, ToolbarKind, ToolbarOrientation } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface ToolbarStaticProps extends StaticCustomColors {
|
|
3
4
|
kind?: ToolbarKind;
|
|
4
5
|
orientation?: ToolbarOrientation;
|
|
@@ -9,4 +10,4 @@ export interface ToolbarStaticProps extends StaticCustomColors {
|
|
|
9
10
|
*/
|
|
10
11
|
corners?: ToolbarCorner[];
|
|
11
12
|
}
|
|
12
|
-
export declare function toolbar(props?: ToolbarStaticProps, children?:
|
|
13
|
+
export declare function toolbar<T>(h: H<T>, props?: ToolbarStaticProps, children?: T | T[]): T;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { StaticCustomColors, TooltipKind, TooltipSide, TooltipVariant } from '../types';
|
|
2
|
+
import { H } from '../h';
|
|
2
3
|
export interface TooltipStaticProps extends StaticCustomColors {
|
|
3
4
|
kind?: TooltipKind;
|
|
4
5
|
variant?: TooltipVariant;
|
|
5
6
|
placement?: TooltipSide;
|
|
6
7
|
}
|
|
7
|
-
export declare function tooltip(props?: TooltipStaticProps, children?:
|
|
8
|
+
export declare function tooltip<T>(h: H<T>, props?: TooltipStaticProps, children?: T | T[]): T;
|
package/dist/static/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}function t(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function n(e){return e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function r(e,t){let r=[e.base];if(e.kind&&typeof t.kind==`string`&&r.push(`sk-${t.kind}`),e.size&&typeof t.size==`string`&&(r.push(`sk-${t.size}`),r.push(`sk-size-${t.size}`)),e.variant&&typeof t.variant==`string`&&r.push(`sk-${t.variant}`),e.booleanFlags)for(let i of e.booleanFlags)t[n(i)]===!0&&r.push(`sk-${i}`);if(e.listFlags)for(let{prop:n,family:i}of e.listFlags){let e=t[n];if(Array.isArray(e))for(let t of e)typeof t==`string`&&r.push(`sk-${i}-${t}`)}if(e.singleChoiceFlags)for(let{prop:n,family:i}of e.singleChoiceFlags){let e=t[n];typeof e==`string`&&r.push(`sk-${i}-${e}`)}return r.join(` `)}function i(t,n,i){let a=[`class="${e(r(t.classSpec,n))}"`];if(t.tag===`button`&&a.push(`type="button"`),t.extraAttrs)for(let[n,r]of Object.entries(t.extraAttrs))a.push(`${n}="${e(r)}"`);let o=[];if(t.customColorVars){let{base:r,text:i}=t.customColorVars;r&&typeof n.baseColor==`string`&&o.push(`${r}: ${e(n.baseColor)};`),i&&typeof n.textColor==`string`&&o.push(`${i}: ${e(n.textColor)};`)}o.length>0&&a.push(`style="${o.join(` `)}"`);let s=a.join(` `);return t.void?`<${t.tag} ${s} />`:`<${t.tag} ${s}>${i}</${t.tag}>`}var a={panel:{tag:`div`,classSpec:{base:`sk-panel`,kind:!0,size:!0,booleanFlags:[`no-border`,`no-decoration`],listFlags:[{prop:`corners`,family:`cut`}],singleChoiceFlags:[{prop:`decorationCorner`,family:`decoration`}]},customColorVars:{base:`--sk-panel-color-base`,text:`--sk-panel-fg`}},card:{tag:`div`,classSpec:{base:`sk-card`,kind:!0},customColorVars:{base:`--sk-panel-color-base`,text:`--sk-panel-fg`}},alert:{tag:`div`,classSpec:{base:`sk-alert`,kind:!0,booleanFlags:[`subtle`]},extraAttrs:{role:`alert`},customColorVars:{base:`--sk-alert-color-base`,text:`--sk-alert-fg`}},divider:{tag:`div`,classSpec:{base:`sk-divider`,kind:!0,booleanFlags:[`subtle`],singleChoiceFlags:[{prop:`orientation`,family:`orientation`}]},extraAttrs:{role:`separator`}},page:{tag:`div`,classSpec:{base:`sk-page`,booleanFlags:[`flush`,`fixed-header`,`fixed-footer`]}},group:{tag:`div`,classSpec:{base:`sk-group`,singleChoiceFlags:[{prop:`orientation`,family:`orientation`}]}},skeleton:{tag:`div`,classSpec:{base:`sk-skeleton`,singleChoiceFlags:[{prop:`variant`,family:`shape`}],booleanFlags:[`shimmer`,`pulse`]}},progress:{tag:`progress`,classSpec:{base:`sk-progress`,kind:!0,size:!0,booleanFlags:[`indeterminate`]},void:!0},spinner:{tag:`div`,classSpec:{base:`sk-spinner`,kind:!0,size:!0}},navBar:{tag:`nav`,classSpec:{base:`sk-navbar`,kind:!0,booleanFlags:[`sticky`]}},toolbar:{tag:`div`,classSpec:{base:`sk-toolbar`,kind:!0,singleChoiceFlags:[{prop:`orientation`,family:`orientation`}]},extraAttrs:{role:`toolbar`}},sidebar:{tag:`aside`,classSpec:{base:`sk-sidebar`,kind:!0,booleanFlags:[`dense`]}},breadcrumbs:{tag:`nav`,classSpec:{base:`sk-breadcrumbs`,kind:!0},extraAttrs:{"aria-label":`Breadcrumbs`}},pagination:{tag:`nav`,classSpec:{base:`sk-pagination`,kind:!0},extraAttrs:{"aria-label":`Pagination`}},tag:{tag:`span`,classSpec:{base:`sk-tag`,kind:!0,size:!0,variant:!0,booleanFlags:[`removable`]}},avatar:{tag:`div`,classSpec:{base:`sk-avatar`,kind:!0,size:!0,singleChoiceFlags:[{prop:`shape`,family:`shape`}]}},field:{tag:`div`,classSpec:{base:`sk-field`,booleanFlags:[`has-error`],singleChoiceFlags:[{prop:`labelPosition`,family:`label-position`}]}},table:{tag:`table`,classSpec:{base:`sk-table`,kind:!0,variant:!0,booleanFlags:[`striped`,`bordered`,`compact`,`comfortable`]}},tooltip:{tag:`div`,classSpec:{base:`sk-tooltip`,kind:!0,variant:!0,singleChoiceFlags:[{prop:`placement`,family:`placement`}]},extraAttrs:{role:`tooltip`}},input:{tag:`input`,classSpec:{base:`sk-input`,kind:!0,size:!0},void:!0},textarea:{tag:`textarea`,classSpec:{base:`sk-textarea`,kind:!0,size:!0}},select:{tag:`select`,classSpec:{base:`sk-select`,kind:!0,size:!0}},slider:{tag:`input`,classSpec:{base:`sk-slider`,kind:!0,size:!0,singleChoiceFlags:[{prop:`orientation`,family:`orientation`}]},void:!0,extraAttrs:{type:`range`}},colorPicker:{tag:`input`,classSpec:{base:`sk-color-picker`,size:!0},void:!0,extraAttrs:{type:`color`}},dropdown:{tag:`details`,classSpec:{base:`sk-dropdown`,kind:!0,size:!0}}};function o(e={},t=``){return i(a.panel,e,t)}function s(e={},t=``){return i(a.card,e,t)}var c=new Set([`info`,`success`,`warning`,`danger`]),l={info:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><circle cx="12" cy="8" r="0.5" fill="currentColor"></circle></svg>`,success:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>`,warning:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><circle cx="12" cy="17" r="0.5" fill="currentColor"></circle></svg>`,danger:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>`};function u(t={},n=``){let i=t.kind??`info`,a=[`class="${e(r({base:`sk-alert`,kind:!0,booleanFlags:[`subtle`]},{...t,kind:i}))}"`,`role="alert"`],o=[];typeof t.baseColor==`string`&&o.push(`--sk-alert-color-base: ${e(t.baseColor)};`),typeof t.textColor==`string`&&o.push(`--sk-alert-fg: ${e(t.textColor)};`),o.length>0&&a.push(`style="${o.join(` `)}"`);let s=``;if(t.icon!==!1){let e=typeof t.icon==`string`?t.icon:c.has(i)?l[i]??``:null;e!==null&&(s=`<div class="sk-alert-icon">${e}</div>`)}let u=`<div class="sk-alert-content">${n}</div>`;return`<div ${a.join(` `)}>${s}${u}</div>`}function d(t={}){let n=t.orientation??`horizontal`,r=t.kind??`neutral`,i=t.size??`md`,a=[`sk-divider`,`sk-${n}`,`sk-${r}`,`sk-${i}`];return t.variant===`subtle`&&a.push(`sk-subtle`),`<hr class="${e(a.join(` `))}" role="separator">`}function f(e={},t=``){return i(a.page,e,t)}function p(e={},t=``){return i(a.group,e,t)}function m(t={}){let n=t.variant??`text`,r=t.animation??`shimmer`,i=[`sk-skeleton`,`sk-${n}`];r!==`none`&&i.push(`sk-${r}`);let a=[`class="${e(i.join(` `))}"`],o=[],s=t.height??((n===`circular`||n===`square`)&&t.width?t.width:void 0);return typeof t.width==`string`&&o.push(`width: ${e(t.width)};`),typeof s==`string`&&o.push(`height: ${e(s)};`),o.length>0&&a.push(`style="${o.join(` `)}"`),`<div ${a.join(` `)}></div>`}function h(e={},t=``){return i(a.progress,e,t)}function g(e){switch(e){case`circular`:return`<div class="sk-spinner-circular"><div class="sk-arc sk-arc-large"></div><div class="sk-arc sk-arc-small"></div></div>`;case`dots`:return`<div class="sk-spinner-dots"><div class="sk-dot"></div><div class="sk-dot"></div><div class="sk-dot"></div></div>`;case`crosshair`:return`<div class="sk-crosshair-loader"></div>`}}function _(t={}){let n=t.kind??`primary`,r=t.size??`md`,i=t.variant??`circular`,a=[`class="${e([`sk-spinner`,`sk-${n}`,`sk-${r}`,`sk-variant-${i}`].join(` `))}"`,`role="status"`,`aria-live="polite"`,`aria-label="Loading"`];return typeof t.color==`string`&&a.push(`style="--sk-spinner-color: ${e(t.color)};"`),`<div ${a.join(` `)}>${g(i)}</div>`}function v(t={},n=``){let i=t.sticky!==!1,a=r({base:`sk-navbar`,kind:!0},t),o=[`class="${e(i?`${a} sk-sticky`:a)}"`],s=[];typeof t.baseColor==`string`&&s.push(`--sk-navbar-color-base: ${e(t.baseColor)};`),typeof t.textColor==`string`&&s.push(`--sk-navbar-fg: ${e(t.textColor)};`),s.length>0&&o.push(`style="${s.join(` `)}"`);let c=``;t.leading&&(c+=`<div class="sk-navbar-leading">${t.leading}</div>`),t.brand&&(c+=`<div class="sk-navbar-brand">${t.brand}</div>`),n&&(c+=`<div class="sk-navbar-nav">${n}</div>`),t.actions&&(c+=`<div class="sk-navbar-actions">${t.actions}</div>`);let l=`<div class="sk-navbar-content">${c}</div>`;return`<nav ${o.join(` `)}>${l}</nav>`}var y=[`top-left`,`top-right`,`bottom-right`,`bottom-left`];function b(t={},n=``){let r=t.kind,i=t.orientation??`horizontal`,a=t.corners??y,o=[`sk-toolbar`];typeof r==`string`&&o.push(`sk-${r}`),o.push(`sk-${i}`);for(let e of a)o.push(`sk-cut-${e}`);let s=[`class="${e(o.join(` `))}"`,`role="toolbar"`],c=[];return typeof t.baseColor==`string`&&c.push(`--sk-toolbar-color-base: ${e(t.baseColor)};`),typeof t.textColor==`string`&&c.push(`--sk-toolbar-fg: ${e(t.textColor)};`),c.length>0&&s.push(`style="${c.join(` `)}"`),`<div ${s.join(` `)}>${n}</div>`}function x(t={},n=``){let r=t.kind??`neutral`,i=t.side??`left`,a=[`sk-sidebar`,`sk-${r}`];i===`right`&&a.push(`sk-sidebar-right`),t.dense===!0&&a.push(`sk-dense`);let o=i===`right`?`bottom-left`:`bottom-right`,s=[`sk-panel`,`sk-${r}`,`sk-md`,`sk-cut-${o}`,`sk-decoration-${o}`,`sk-sidebar-panel`],c=`class="${e(a.join(` `))}"`,l=`class="${e(s.join(` `))}"`,u=[];return typeof t.baseColor==`string`&&u.push(`--sk-sidebar-color-base: ${e(t.baseColor)};`),`<aside ${c}${u.length>0?` style="${u.join(` `)}"`:``}><div ${l}>${`<div class="sk-panel-scroll-content"><nav class="sk-sidebar-nav">${n}</nav></div>`}</div></aside>`}function S(e={},t=``){return i(a.breadcrumbs,e,t)}function C(e={},t=``){return i(a.pagination,e,t)}var w=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>`;function T(t={},n=``){let r=t.kind??`neutral`,i=t.variant??`solid`,a=t.size??`md`,o=[`sk-tag`,`sk-${r}`,`sk-${i}`,`sk-${a}`];t.removable&&o.push(`sk-removable`);let s=[`class="${e(o.join(` `))}"`],c=[];typeof t.baseColor==`string`&&c.push(`--sk-tag-color-base: ${e(t.baseColor)};`),typeof t.textColor==`string`&&c.push(`--sk-tag-fg: ${e(t.textColor)};`),c.length>0&&s.push(`style="${c.join(` `)}"`);let l=`<span class="sk-tag-content">${n}</span>`,u=t.removable?`<button type="button" class="sk-tag-remove" aria-label="Remove">${w}</button>`:``;return`<span ${s.join(` `)}>${l}${u}</span>`}var E=`<svg class="sk-avatar-icon" viewBox="0 0 24 24" fill="currentColor"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"></path></svg>`;function D(t={}){let n=t.kind??`neutral`,r=t.size??`md`,i=[`class="${e([`sk-avatar`,`sk-${n}`,`sk-${r}`].join(` `))}"`],a=[];typeof t.baseColor==`string`&&a.push(`--sk-avatar-color-base: ${e(t.baseColor)};`),typeof t.textColor==`string`&&a.push(`--sk-avatar-fg: ${e(t.textColor)};`),a.length>0&&i.push(`style="${a.join(` `)}"`);let o;if(t.src){let n=t.alt??``;o=`<img src="${e(t.src)}" alt="${e(n)}" class="sk-avatar-image">`}else o=t.initials?`<span class="sk-avatar-initials">${e(t.initials.slice(0,2).toUpperCase())}</span>`:E;return`<div ${i.join(` `)}>${o}</div>`}function O(t={},n=``){let r=[`sk-field`,`sk-label-${t.labelPosition??`top`}`];t.error&&r.push(`sk-has-error`);let i=`class="${e(r.join(` `))}"`,a=``;if(t.label){let n=t.id?` for="${e(t.id)}"`:``,r=t.required?`<span class="sk-field-required">*</span>`:``;a=`<label${n} class="sk-field-label">${e(t.label)}${r}</label>`}let o=`<div class="sk-field-input-wrapper">${n}</div>`,s=``;t.description&&!t.error&&(s=`<p${t.id?` id="${e(t.id)}-description"`:``} class="sk-field-description">${e(t.description)}</p>`);let c=``;return t.error&&(c=`<p${t.id?` id="${e(t.id)}-error"`:``} class="sk-field-error">${e(t.error)}</p>`),`<div ${i}>${a}${o}${s}${c}</div>`}function k(t={},n=``){let r=t.kind??`neutral`,i=t.variant??`default`,a=t.hoverable!==!1,o=t.bordered!==!1,s=t.innerBorders===!0,c=t.subtle===!0,l=t.darkBackground===!0,u=t.striped===!0,d=[`sk-table-wrapper`,`sk-table-wrapper-${r}`];l&&d.push(`sk-dark-background`),c&&d.push(`sk-subtle`);let f=[`sk-table`,`sk-${r}`,`sk-${i}`];u&&f.push(`sk-striped`),a&&f.push(`sk-hoverable`),o&&f.push(`sk-bordered`),s||f.push(`sk-no-inner-borders`),c&&f.push(`sk-subtle`);let p=[`class="${e(f.join(` `))}"`],m=[];return typeof t.baseColor==`string`&&m.push(`--sk-table-color-base: ${e(t.baseColor)};`),typeof t.textColor==`string`&&m.push(`--sk-table-fg: ${e(t.textColor)};`),m.length>0&&p.push(`style="${m.join(` `)}"`),`<div ${`class="${e(d.join(` `))}"`}><table ${p.join(` `)}>${n}</table></div>`}function A(e={},t=``){return i(a.tooltip,e,t)}function j(t={},n=``){let i=[`class="${e(r({base:`sk-button`,kind:!0,size:!0,variant:!0,booleanFlags:[`loading`,`pressed`,`dense`]},t))}"`],a=typeof t.href==`string`;if(a)i.push(`href="${e(t.href??``)}"`);else{let n=t.type??`button`;i.push(`type="${e(n)}"`)}t.disabled&&i.push(a?`aria-disabled="true"`:`disabled`),t.loading&&i.push(`aria-busy="true"`),t.pressed&&i.push(`aria-pressed="true"`);let o=a?`a`:`button`,s=`<span class="sk-button-chrome">${n}</span>`;return`<${o} ${i.join(` `)}>${s}</${o}>`}function M(t={}){let n=[`class="${e(r({base:`sk-input`,kind:!0,size:!0},t))}"`];for(let r of[`type`,`value`,`placeholder`,`name`,`id`]){let i=t[r];typeof i==`string`&&n.push(`${r}="${e(i)}"`)}for(let e of[`disabled`,`readonly`,`required`])t[e]===!0&&n.push(e);return`<input ${n.join(` `)} />`}function N(t={},n=``){let i=[`class="${e(r({base:`sk-textarea`,kind:!0,size:!0},t))}"`];for(let n of[`placeholder`,`name`,`id`]){let r=t[n];typeof r==`string`&&i.push(`${n}="${e(r)}"`)}for(let e of[`disabled`,`readonly`,`required`])t[e]===!0&&i.push(e);return`<textarea ${i.join(` `)}>${n}</textarea>`}function P(t={},n=``){let i=[`class="${e(r({base:`sk-select`,kind:!0,size:!0},t))}"`];for(let n of[`name`,`id`]){let r=t[n];typeof r==`string`&&i.push(`${n}="${e(r)}"`)}for(let e of[`disabled`,`required`])t[e]===!0&&i.push(e);return`<select ${i.join(` `)}>${n}</select>`}function F(t={}){let n=[`class="${e(r({base:`sk-slider`,kind:!0,size:!0},t))}"`,`type="range"`];for(let r of[`min`,`max`,`step`,`value`,`name`]){let i=t[r];typeof i==`string`&&n.push(`${r}="${e(i)}"`)}return t.disabled===!0&&n.push(`disabled`),`<input ${n.join(` `)} />`}function I(t={}){let n=[`class="${e(r({base:`sk-color-picker`,size:!0},t))}"`,`type="color"`];for(let r of[`value`,`name`]){let i=t[r];typeof i==`string`&&n.push(`${r}="${e(i)}"`)}return t.disabled===!0&&n.push(`disabled`),`<input ${n.join(` `)} />`}function L(t={},n=``){let i=r({base:`sk-checkbox`,kind:!0,size:!0},t),a=[`type="checkbox"`];t.name&&a.push(`name="${e(t.name)}"`),t.checked===!0&&a.push(`checked`),t.disabled===!0&&a.push(`disabled`),t.required===!0&&a.push(`required`);let o=`<input ${a.join(` `)} />`,s=`<span class="sk-checkbox-label">${n}</span>`;return`<label class="${e(i)}">${o}<span class="sk-checkbox-box"></span>${s}</label>`}function R(t={},n=``){let i=r({base:`sk-radio`,kind:!0,size:!0},t),a=[`type="radio"`];t.name&&a.push(`name="${e(t.name)}"`),t.value!==void 0&&a.push(`value="${e(t.value)}"`),t.checked===!0&&a.push(`checked`),t.disabled===!0&&a.push(`disabled`),t.required===!0&&a.push(`required`);let o=`<input ${a.join(` `)} />`,s=`<span class="sk-radio-label">${n}</span>`;return`<label class="${e(i)}">${o}<span class="sk-radio-dot"></span>${s}</label>`}function z(t={},n=``){let i=r({base:`sk-switch`,kind:!0,size:!0},t),a=[`type="checkbox"`];t.name&&a.push(`name="${e(t.name)}"`),t.checked===!0&&a.push(`checked`),t.disabled===!0&&a.push(`disabled`),t.required===!0&&a.push(`required`);let o=`<input ${a.join(` `)} />`,s=`<span class="sk-switch-label">${n}</span>`;return`<label class="${e(i)}">${o}<span class="sk-switch-track"><span class="sk-switch-thumb"></span></span>${s}</label>`}function B(t={}){let n=r({base:`sk-number-input-wrapper`,kind:!0,size:!0},t),i=[`class="sk-number-input-field"`,`type="number"`];for(let n of[`value`,`min`,`max`,`step`,`name`,`placeholder`]){let r=t[n];typeof r==`string`&&i.push(`${n}="${e(r)}"`)}for(let e of[`disabled`,`readonly`,`required`])t[e]===!0&&i.push(e);let a=`<input ${i.join(` `)} />`;return`<div class="${e(n)}">${a}</div>`}function V(t={},n=``){return`<div class="${e(r({base:`sk-tags-input`,kind:!0,size:!0},t))}">${n}</div>`}function H(t,n=``){let i=[`class="${e(r({base:`sk-dropdown`,kind:!0,size:!0},t))}"`];return t.open&&i.push(`open`),`<details ${i.join(` `)}><summary>${e(t.summary)}</summary>${n}</details>`}exports.alert=u,exports.avatar=D,exports.breadcrumbs=S,exports.button=j,exports.card=s,exports.checkbox=L,exports.colorPicker=I,exports.composeClasses=r,exports.divider=d,exports.dropdown=H,exports.escapeAttr=e,exports.field=O,exports.group=p,exports.input=M,exports.navBar=v,exports.numberInput=B,exports.page=f,exports.pagination=C,exports.panel=o,exports.progress=h,exports.radio=R,exports.render=i,exports.select=P,exports.sidebar=x,exports.skeleton=m,exports.slider=F,exports.spinner=_,exports.switchInput=z,exports.table=k,exports.tag=T,exports.tagsInput=V,exports.text=t,exports.textarea=N,exports.toolbar=b,exports.tooltip=A;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}function t(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function n(e){return e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function r(e,t){let r=[e.base];if(e.kind&&typeof t.kind==`string`&&r.push(`sk-${t.kind}`),e.size&&typeof t.size==`string`&&(r.push(`sk-${t.size}`),r.push(`sk-size-${t.size}`)),e.variant&&typeof t.variant==`string`&&r.push(`sk-${t.variant}`),e.booleanFlags)for(let i of e.booleanFlags)t[n(i)]===!0&&r.push(`sk-${i}`);if(e.listFlags)for(let{prop:n,family:i}of e.listFlags){let e=t[n];if(Array.isArray(e))for(let t of e)typeof t==`string`&&r.push(`sk-${i}-${t}`)}if(e.singleChoiceFlags)for(let{prop:n,family:i}of e.singleChoiceFlags){let e=t[n];typeof e==`string`&&r.push(`sk-${i}-${e}`)}return r.join(` `)}function i(e,t){let n={class:r(e.classSpec,t)};if(e.tag===`button`&&(n.type=`button`),e.extraAttrs)for(let[t,r]of Object.entries(e.extraAttrs))n[t]=r;if(e.customColorVars){let r=[],{base:i,text:a}=e.customColorVars;i&&typeof t.baseColor==`string`&&r.push(`${i}: ${t.baseColor};`),a&&typeof t.textColor==`string`&&r.push(`${a}: ${t.textColor};`),r.length>0&&(n.style=r.join(` `))}return n}function a(e,t,n,r){let a=i(t,n);return t.void?e(t.tag,a):e(t.tag,a,r)}var o=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`progress`,`source`,`track`,`wbr`]);function s(t,n){return n==null||n===!1?null:n===!0?t:`${t}="${e(String(n))}"`}function c(e){if(!e)return``;let t=[];for(let[n,r]of Object.entries(e)){let e=s(n,r);e!==null&&t.push(e)}return t.length>0?` ${t.join(` `)}`:``}var l=(e,t,n)=>{if(t&&typeof t.innerHTML==`string`){let n=t.innerHTML,r={...t};return delete r.innerHTML,`<${e}${c(r)}>${n}</${e}>`}let r=c(t),i=n===void 0||n===``||Array.isArray(n)&&n.length===0;return o.has(e)&&i?`<${e}${r} />`:`<${e}${r}>${n===void 0?``:Array.isArray(n)?n.join(``):n}</${e}>`},u={panel:{tag:`div`,classSpec:{base:`sk-panel`,kind:!0,size:!0,booleanFlags:[`no-border`,`no-decoration`],listFlags:[{prop:`corners`,family:`cut`}],singleChoiceFlags:[{prop:`decorationCorner`,family:`decoration`}]},customColorVars:{base:`--sk-panel-color-base`,text:`--sk-panel-fg`}},card:{tag:`div`,classSpec:{base:`sk-card`,kind:!0},customColorVars:{base:`--sk-panel-color-base`,text:`--sk-panel-fg`}},alert:{tag:`div`,classSpec:{base:`sk-alert`,kind:!0,booleanFlags:[`subtle`]},extraAttrs:{role:`alert`},customColorVars:{base:`--sk-alert-color-base`,text:`--sk-alert-fg`}},divider:{tag:`div`,classSpec:{base:`sk-divider`,kind:!0,booleanFlags:[`subtle`],singleChoiceFlags:[{prop:`orientation`,family:`orientation`}]},extraAttrs:{role:`separator`}},page:{tag:`div`,classSpec:{base:`sk-page`,booleanFlags:[`flush`,`fixed-header`,`fixed-footer`]}},group:{tag:`div`,classSpec:{base:`sk-group`,singleChoiceFlags:[{prop:`orientation`,family:`orientation`}]}},skeleton:{tag:`div`,classSpec:{base:`sk-skeleton`,singleChoiceFlags:[{prop:`variant`,family:`shape`}],booleanFlags:[`shimmer`,`pulse`]}},progress:{tag:`progress`,classSpec:{base:`sk-progress`,kind:!0,size:!0,booleanFlags:[`indeterminate`]},void:!0},spinner:{tag:`div`,classSpec:{base:`sk-spinner`,kind:!0,size:!0}},navBar:{tag:`nav`,classSpec:{base:`sk-navbar`,kind:!0,booleanFlags:[`sticky`]}},toolbar:{tag:`div`,classSpec:{base:`sk-toolbar`,kind:!0,singleChoiceFlags:[{prop:`orientation`,family:`orientation`}]},extraAttrs:{role:`toolbar`}},sidebar:{tag:`aside`,classSpec:{base:`sk-sidebar`,kind:!0,booleanFlags:[`dense`]}},breadcrumbs:{tag:`nav`,classSpec:{base:`sk-breadcrumbs`,kind:!0},extraAttrs:{"aria-label":`Breadcrumbs`}},pagination:{tag:`nav`,classSpec:{base:`sk-pagination`,kind:!0},extraAttrs:{"aria-label":`Pagination`}},tag:{tag:`span`,classSpec:{base:`sk-tag`,kind:!0,size:!0,variant:!0,booleanFlags:[`removable`]}},avatar:{tag:`div`,classSpec:{base:`sk-avatar`,kind:!0,size:!0,singleChoiceFlags:[{prop:`shape`,family:`shape`}]}},field:{tag:`div`,classSpec:{base:`sk-field`,booleanFlags:[`has-error`],singleChoiceFlags:[{prop:`labelPosition`,family:`label-position`}]}},table:{tag:`table`,classSpec:{base:`sk-table`,kind:!0,variant:!0,booleanFlags:[`striped`,`bordered`,`compact`,`comfortable`]}},tooltip:{tag:`div`,classSpec:{base:`sk-tooltip`,kind:!0,variant:!0,singleChoiceFlags:[{prop:`placement`,family:`placement`}]},extraAttrs:{role:`tooltip`}},input:{tag:`input`,classSpec:{base:`sk-input`,kind:!0,size:!0,listFlags:[{prop:`corners`,family:`cut`}]},void:!0},textarea:{tag:`textarea`,classSpec:{base:`sk-textarea`,kind:!0,size:!0}},select:{tag:`select`,classSpec:{base:`sk-select`,kind:!0,size:!0,listFlags:[{prop:`corners`,family:`cut`}]}},slider:{tag:`input`,classSpec:{base:`sk-slider`,kind:!0,size:!0,singleChoiceFlags:[{prop:`orientation`,family:`orientation`}]},void:!0,extraAttrs:{type:`range`}},colorPicker:{tag:`input`,classSpec:{base:`sk-color-picker`,size:!0},void:!0,extraAttrs:{type:`color`}},inputGroup:{tag:`div`,classSpec:{base:`sk-input-group`,kind:!0,size:!0,listFlags:[{prop:`corners`,family:`cut`}]},customColorVars:{base:`--sk-input-group-color-base`,text:`--sk-input-group-fg`}},inputGroupAddon:{tag:`span`,classSpec:{base:`sk-input-group-addon`,kind:!0,size:!0}},dropdown:{tag:`details`,classSpec:{base:`sk-dropdown`,kind:!0,size:!0}}};function d(e,t={},n){return a(e,u.panel,t,n)}function f(e,t={},n){return a(e,u.card,t,n)}var p=new Set([`info`,`success`,`warning`,`danger`]),m={info:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><circle cx="12" cy="8" r="0.5" fill="currentColor"></circle></svg>`,success:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>`,warning:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><circle cx="12" cy="17" r="0.5" fill="currentColor"></circle></svg>`,danger:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>`};function h(e,t={},n){let i=t.kind??`info`,a={class:r({base:`sk-alert`,kind:!0,booleanFlags:[`subtle`]},{...t,kind:i}),role:`alert`},o=[];typeof t.baseColor==`string`&&o.push(`--sk-alert-color-base: ${t.baseColor};`),typeof t.textColor==`string`&&o.push(`--sk-alert-fg: ${t.textColor};`),o.length>0&&(a.style=o.join(` `));let s=null;if(t.icon!==!1){let n=typeof t.icon==`string`?t.icon:p.has(i)?m[i]??``:null;n!==null&&(s=e(`div`,{class:`sk-alert-icon`,innerHTML:n}))}let c=e(`div`,{class:`sk-alert-content`},n);return e(`div`,a,s===null?[c]:[s,c])}function g(e,t={}){let n=t.orientation??`horizontal`,r=t.kind??`neutral`,i=t.size??`md`,a=[`sk-divider`,`sk-${n}`,`sk-${r}`,`sk-${i}`];return t.variant===`subtle`&&a.push(`sk-subtle`),e(`hr`,{class:a.join(` `),role:`separator`})}function _(e,t={},n){return a(e,u.page,t,n)}function v(e,t={},n){return a(e,u.group,t,n)}function y(e,t={}){let n=t.variant??`text`,r=t.animation??`shimmer`,i=[`sk-skeleton`,`sk-${n}`];r!==`none`&&i.push(`sk-${r}`);let a={class:i.join(` `)},o=[],s=t.height??((n===`circular`||n===`square`)&&t.width?t.width:void 0);return typeof t.width==`string`&&o.push(`width: ${t.width};`),typeof s==`string`&&o.push(`height: ${s};`),o.length>0&&(a.style=o.join(` `)),e(`div`,a)}function b(e,t={},n){return a(e,u.progress,t,n)}function x(e,t){switch(t){case`circular`:return e(`div`,{class:`sk-spinner-circular`},[e(`div`,{class:`sk-arc sk-arc-large`}),e(`div`,{class:`sk-arc sk-arc-small`})]);case`dots`:return e(`div`,{class:`sk-spinner-dots`},[e(`div`,{class:`sk-dot`}),e(`div`,{class:`sk-dot`}),e(`div`,{class:`sk-dot`})]);case`crosshair`:return e(`div`,{class:`sk-crosshair-loader`})}}function S(e,t={}){let n=t.kind??`primary`,r=t.size??`md`,i=t.variant??`circular`,a={class:[`sk-spinner`,`sk-${n}`,`sk-${r}`,`sk-variant-${i}`].join(` `),role:`status`,"aria-live":`polite`,"aria-label":`Loading`};return typeof t.color==`string`&&(a.style=`--sk-spinner-color: ${t.color};`),e(`div`,a,x(e,i))}function C(e,t={},n){let i=t.sticky!==!1,a=r({base:`sk-navbar`,kind:!0},t),o={class:i?`${a} sk-sticky`:a},s=[];typeof t.baseColor==`string`&&s.push(`--sk-navbar-color-base: ${t.baseColor};`),typeof t.textColor==`string`&&s.push(`--sk-navbar-fg: ${t.textColor};`),s.length>0&&(o.style=s.join(` `));let c=[];return t.leading&&c.push(e(`div`,{class:`sk-navbar-leading`,innerHTML:t.leading})),t.brand&&c.push(e(`div`,{class:`sk-navbar-brand`,innerHTML:t.brand})),n!==void 0&&(Array.isArray(n)?n.length>0:n)&&c.push(e(`div`,{class:`sk-navbar-nav`},n)),t.actions&&c.push(e(`div`,{class:`sk-navbar-actions`,innerHTML:t.actions})),e(`nav`,o,e(`div`,{class:`sk-navbar-content`},c))}var w=[`top-left`,`top-right`,`bottom-right`,`bottom-left`];function T(e,t={},n){let r=t.kind,i=t.orientation??`horizontal`,a=t.corners??w,o=[`sk-toolbar`];typeof r==`string`&&o.push(`sk-${r}`),o.push(`sk-${i}`);for(let e of a)o.push(`sk-cut-${e}`);let s={class:o.join(` `),role:`toolbar`},c=[];return typeof t.baseColor==`string`&&c.push(`--sk-toolbar-color-base: ${t.baseColor};`),typeof t.textColor==`string`&&c.push(`--sk-toolbar-fg: ${t.textColor};`),c.length>0&&(s.style=c.join(` `)),e(`div`,s,n)}function E(e,t={},n){let r=t.kind??`neutral`,i=t.side??`left`,a=[`sk-sidebar`,`sk-${r}`];i===`right`&&a.push(`sk-sidebar-right`),t.dense===!0&&a.push(`sk-dense`);let o=i===`right`?`bottom-left`:`bottom-right`,s=[`sk-panel`,`sk-${r}`,`sk-md`,`sk-cut-${o}`,`sk-decoration-${o}`,`sk-sidebar-panel`],c={class:a.join(` `)},l=[];typeof t.baseColor==`string`&&l.push(`--sk-sidebar-color-base: ${t.baseColor};`),l.length>0&&(c.style=l.join(` `));let u=e(`div`,{class:`sk-panel-scroll-content`},e(`nav`,{class:`sk-sidebar-nav`},n));return e(`aside`,c,e(`div`,{class:s.join(` `)},u))}function D(e,t={},n){return a(e,u.breadcrumbs,t,n)}function O(e,t={},n){return a(e,u.pagination,t,n)}var k=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>`;function A(e,t={},n){let r=t.kind??`neutral`,i=t.variant??`solid`,a=t.size??`md`,o=[`sk-tag`,`sk-${r}`,`sk-${i}`,`sk-${a}`];t.removable&&o.push(`sk-removable`);let s={class:o.join(` `)},c=[];typeof t.baseColor==`string`&&c.push(`--sk-tag-color-base: ${t.baseColor};`),typeof t.textColor==`string`&&c.push(`--sk-tag-fg: ${t.textColor};`),c.length>0&&(s.style=c.join(` `));let l=[e(`span`,{class:`sk-tag-content`},n)];if(t.removable){let t=e(`button`,{type:`button`,class:`sk-tag-remove`,"aria-label":`Remove`,innerHTML:k});l.push(t)}return e(`span`,s,l)}var j=`<svg class="sk-avatar-icon" viewBox="0 0 24 24" fill="currentColor"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"></path></svg>`;function M(e,n={}){let r=n.kind??`neutral`,i=n.size??`md`,a={class:[`sk-avatar`,`sk-${r}`,`sk-${i}`].join(` `)},o=[];if(typeof n.baseColor==`string`&&o.push(`--sk-avatar-color-base: ${n.baseColor};`),typeof n.textColor==`string`&&o.push(`--sk-avatar-fg: ${n.textColor};`),o.length>0&&(a.style=o.join(` `)),n.src){let t=n.alt??``;return e(`div`,a,e(`img`,{src:n.src,alt:t,class:`sk-avatar-image`}))}return n.initials?e(`div`,a,e(`span`,{class:`sk-avatar-initials`,innerHTML:t(n.initials.slice(0,2).toUpperCase())})):e(`div`,{...a,innerHTML:j})}function N(e,n={},r){let i=[`sk-field`,`sk-label-${n.labelPosition??`top`}`];n.error&&i.push(`sk-has-error`);let a={class:i.join(` `)},o=[];if(n.label){let r={class:`sk-field-label`};n.id&&(r.for=n.id),n.required?(r.innerHTML=`${t(n.label)}<span class="sk-field-required">*</span>`,o.push(e(`label`,r))):(r.innerHTML=t(n.label),o.push(e(`label`,r)))}if(o.push(e(`div`,{class:`sk-field-input-wrapper`},r)),n.description&&!n.error){let r={class:`sk-field-description`,innerHTML:t(n.description)};n.id&&(r.id=`${n.id}-description`),o.push(e(`p`,r))}if(n.error){let r={class:`sk-field-error`,innerHTML:t(n.error)};n.id&&(r.id=`${n.id}-error`),o.push(e(`p`,r))}return e(`div`,a,o)}function P(e,t={},n){let r=t.kind??`neutral`,i=t.variant??`default`,a=t.hoverable!==!1,o=t.bordered!==!1,s=t.innerBorders===!0,c=t.subtle===!0,l=t.darkBackground===!0,u=t.striped===!0,d=[`sk-table-wrapper`,`sk-table-wrapper-${r}`];l&&d.push(`sk-dark-background`),c&&d.push(`sk-subtle`);let f=[`sk-table`,`sk-${r}`,`sk-${i}`];u&&f.push(`sk-striped`),a&&f.push(`sk-hoverable`),o&&f.push(`sk-bordered`),s||f.push(`sk-no-inner-borders`),c&&f.push(`sk-subtle`);let p={class:f.join(` `)},m=[];return typeof t.baseColor==`string`&&m.push(`--sk-table-color-base: ${t.baseColor};`),typeof t.textColor==`string`&&m.push(`--sk-table-fg: ${t.textColor};`),m.length>0&&(p.style=m.join(` `)),e(`div`,{class:d.join(` `)},e(`table`,p,n))}function F(e,t={},n){return a(e,u.tooltip,t,n)}function I(e,t={},n){let i=r({base:`sk-button`,kind:!0,size:!0,variant:!0,booleanFlags:[`loading`,`pressed`,`dense`],listFlags:[{prop:`corners`,family:`cut`}]},t),a=typeof t.href==`string`,o={class:i};return a?o.href=t.href??``:o.type=t.type??`button`,t.disabled&&(a?o[`aria-disabled`]=`true`:o.disabled=!0),t.loading&&(o[`aria-busy`]=`true`),t.pressed&&(o[`aria-pressed`]=`true`),e(a?`a`:`button`,o,e(`span`,{class:`sk-button-chrome`},n))}function L(e,t={}){let n={class:r({base:`sk-input`,kind:!0,size:!0,listFlags:[{prop:`corners`,family:`cut`}]},t)};for(let e of[`type`,`value`,`placeholder`,`name`,`id`]){let r=t[e];typeof r==`string`&&(n[e]=r)}return t.disabled===!0&&(n.disabled=!0),t.readonly===!0&&(n.readonly=!0),t.required===!0&&(n.required=!0),e(`input`,n)}function R(e,t={},n){return a(e,u.inputGroup,t,n)}function z(e,t={},n){return a(e,u.inputGroupAddon,t,n)}function B(e,t={},n){let i={class:r({base:`sk-textarea`,kind:!0,size:!0},t)};for(let e of[`placeholder`,`name`,`id`]){let n=t[e];typeof n==`string`&&(i[e]=n)}return t.disabled===!0&&(i.disabled=!0),t.readonly===!0&&(i.readonly=!0),t.required===!0&&(i.required=!0),e(`textarea`,i,n)}function V(e,t={},n){let i={class:r({base:`sk-select`,kind:!0,size:!0,listFlags:[{prop:`corners`,family:`cut`}]},t)};for(let e of[`name`,`id`]){let n=t[e];typeof n==`string`&&(i[e]=n)}return t.disabled===!0&&(i.disabled=!0),t.required===!0&&(i.required=!0),e(`select`,i,n)}function H(e,t={}){let n={class:r({base:`sk-slider`,kind:!0,size:!0},t),type:`range`};for(let e of[`min`,`max`,`step`,`value`,`name`]){let r=t[e];typeof r==`string`&&(n[e]=r)}return t.disabled===!0&&(n.disabled=!0),e(`input`,n)}function U(e,t={}){let n={class:r({base:`sk-color-picker`,size:!0},t),type:`color`};for(let e of[`value`,`name`]){let r=t[e];typeof r==`string`&&(n[e]=r)}return t.disabled===!0&&(n.disabled=!0),e(`input`,n)}function W(e,t={},n){let i=r({base:`sk-checkbox`,kind:!0,size:!0},t),a={type:`checkbox`};t.name&&(a.name=t.name),t.checked===!0&&(a.checked=!0),t.disabled===!0&&(a.disabled=!0),t.required===!0&&(a.required=!0);let o=e(`input`,a),s=e(`span`,{class:`sk-checkbox-box`}),c=e(`span`,{class:`sk-checkbox-label`},n);return e(`label`,{class:i},[o,s,c])}function G(e,t={},n){let i=r({base:`sk-radio`,kind:!0,size:!0},t),a={type:`radio`};t.name&&(a.name=t.name),t.value!==void 0&&(a.value=t.value),t.checked===!0&&(a.checked=!0),t.disabled===!0&&(a.disabled=!0),t.required===!0&&(a.required=!0);let o=e(`input`,a),s=e(`span`,{class:`sk-radio-dot`}),c=e(`span`,{class:`sk-radio-label`},n);return e(`label`,{class:i},[o,s,c])}function K(e,t={},n){let i=r({base:`sk-switch`,kind:!0,size:!0},t),a={type:`checkbox`};t.name&&(a.name=t.name),t.checked===!0&&(a.checked=!0),t.disabled===!0&&(a.disabled=!0),t.required===!0&&(a.required=!0);let o=e(`input`,a),s=e(`span`,{class:`sk-switch-track`},e(`span`,{class:`sk-switch-thumb`})),c=e(`span`,{class:`sk-switch-label`},n);return e(`label`,{class:i},[o,s,c])}function q(e,t={}){let n=r({base:`sk-number-input-wrapper`,kind:!0,size:!0,listFlags:[{prop:`corners`,family:`cut`}]},t),i={class:`sk-number-input-field`,type:`number`};for(let e of[`value`,`min`,`max`,`step`,`name`,`placeholder`]){let n=t[e];typeof n==`string`&&(i[e]=n)}t.disabled===!0&&(i.disabled=!0),t.readonly===!0&&(i.readonly=!0),t.required===!0&&(i.required=!0);let a=e(`input`,i);return e(`div`,{class:n},a)}function J(e,t={},n){return e(`div`,{class:r({base:`sk-tags-input`,kind:!0,size:!0},t)},n)}function Y(e,n,i){let a={class:r({base:`sk-dropdown`,kind:!0,size:!0},n)};n.open&&(a.open=!0);let o=[e(`summary`,{innerHTML:t(n.summary)})];return i!==void 0&&(Array.isArray(i)?o.push(...i):o.push(i)),e(`details`,a,o)}exports.alert=h,exports.avatar=M,exports.breadcrumbs=D,exports.button=I,exports.card=f,exports.checkbox=W,exports.colorPicker=U,exports.composeClasses=r,exports.divider=g,exports.dropdown=Y,exports.escapeAttr=e,exports.field=N,exports.group=v,exports.input=L,exports.inputGroup=R,exports.inputGroupAddon=z,exports.navBar=C,exports.numberInput=q,exports.page=_,exports.pagination=O,exports.panel=d,exports.progress=b,exports.radio=G,exports.render=a,exports.select=V,exports.sidebar=E,exports.skeleton=y,exports.slider=H,exports.spinner=S,exports.stringH=l,exports.switchInput=K,exports.table=P,exports.tag=A,exports.tagsInput=J,exports.text=t,exports.textarea=B,exports.toolbar=T,exports.tooltip=F;
|
package/dist/static/index.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export { composeClasses } from './classes';
|
|
|
3
3
|
export type { ClassSpec, ListFlagSpec, SingleChoiceFlagSpec } from './classes';
|
|
4
4
|
export { render } from './render';
|
|
5
5
|
export type { RenderSpec } from './render';
|
|
6
|
+
export { stringH } from './stringH';
|
|
7
|
+
export type { H, HAttrs } from './h';
|
|
6
8
|
export type * from './types';
|
|
7
9
|
export { panel } from './components/panel';
|
|
8
10
|
export type { PanelStaticProps } from './components/panel';
|
|
@@ -46,6 +48,10 @@ export { button } from './components/button';
|
|
|
46
48
|
export type { ButtonStaticProps } from './components/button';
|
|
47
49
|
export { input } from './components/input';
|
|
48
50
|
export type { InputStaticProps } from './components/input';
|
|
51
|
+
export { inputGroup } from './components/inputGroup';
|
|
52
|
+
export type { InputGroupStaticProps } from './components/inputGroup';
|
|
53
|
+
export { inputGroupAddon } from './components/inputGroupAddon';
|
|
54
|
+
export type { InputGroupAddonStaticProps } from './components/inputGroupAddon';
|
|
49
55
|
export { textarea } from './components/textarea';
|
|
50
56
|
export type { TextareaStaticProps } from './components/textarea';
|
|
51
57
|
export { select } from './components/select';
|