@sakoa/ui 0.1.1 → 0.2.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.
Files changed (49) hide show
  1. package/dist/cli/index.js +8 -0
  2. package/dist/components/ui/SAlert.d.ts +3 -2
  3. package/dist/components/ui/SButton.d.ts +6 -5
  4. package/dist/components/ui/SCheckbox.d.ts +4 -3
  5. package/dist/components/ui/SDatePicker.d.ts +3 -3
  6. package/dist/components/ui/SGlassButton.d.ts +6 -5
  7. package/dist/components/ui/SInput.d.ts +6 -5
  8. package/dist/components/ui/SSelect.d.ts +5 -4
  9. package/dist/components/ui/SSwitch.d.ts +6 -5
  10. package/dist/components/ui/accordion/SAccordionItem.d.ts +7 -6
  11. package/dist/components/ui/card/SCardHeader.d.ts +4 -3
  12. package/dist/components/ui/dropdown/SDropdownGroup.d.ts +3 -2
  13. package/dist/components/ui/dropdown/SDropdownItem.d.ts +7 -6
  14. package/dist/components/ui/option/SOption.d.ts +3 -2
  15. package/dist/components/ui/otp/SOTP.d.ts +1 -1
  16. package/dist/components/ui/pagination/SPagination.d.ts +1 -1
  17. package/dist/components/ui/progress/SProgress.d.ts +1 -1
  18. package/dist/components/ui/progress/SProgressRange.d.ts +1 -1
  19. package/dist/components/ui/radio/SRadio.d.ts +4 -3
  20. package/dist/components/ui/radio/SRadioGroup.d.ts +1 -1
  21. package/dist/components/ui/stepper/SStepper.d.ts +1 -1
  22. package/dist/index.d.ts +1 -0
  23. package/dist/lib/icon.d.ts +10 -0
  24. package/dist/saka-ui.css +1 -1
  25. package/dist/saka-ui.js +5355 -5252
  26. package/dist/saka-ui.umd.cjs +11 -11
  27. package/dist/views/docs/CLIView.d.ts +2 -0
  28. package/dist/views/docs/GettingStartedView.d.ts +2 -0
  29. package/dist/views/docs/IconsGuideView.d.ts +2 -0
  30. package/dist/views/docs/UseClickOutsideView.d.ts +9 -9
  31. package/dist/views/docs/UseHotkeyView.d.ts +10 -10
  32. package/dist/views/ui/OTPView.d.ts +3 -3
  33. package/package.json +1 -1
  34. package/registry/source/components/ui/SAlert.vue +9 -5
  35. package/registry/source/components/ui/SButton.vue +12 -10
  36. package/registry/source/components/ui/SCheckbox.vue +4 -2
  37. package/registry/source/components/ui/SGlassButton.vue +11 -10
  38. package/registry/source/components/ui/SInput.vue +12 -4
  39. package/registry/source/components/ui/SSelect.vue +30 -8
  40. package/registry/source/components/ui/SSwitch.vue +7 -4
  41. package/registry/source/components/ui/accordion/SAccordionItem.vue +19 -5
  42. package/registry/source/components/ui/card/SCardHeader.vue +8 -5
  43. package/registry/source/components/ui/drawer/SDrawerClose.vue +4 -2
  44. package/registry/source/components/ui/dropdown/SDropdown.vue +11 -7
  45. package/registry/source/components/ui/dropdown/SDropdownGroup.vue +4 -2
  46. package/registry/source/components/ui/dropdown/SDropdownItem.vue +10 -7
  47. package/registry/source/components/ui/option/SOption.vue +9 -2
  48. package/registry/source/components/ui/radio/SRadio.vue +11 -3
  49. package/registry/source/components/ui/tabs/STabs.vue +5 -2
package/dist/cli/index.js CHANGED
@@ -8425,6 +8425,12 @@ async function initCommand() {
8425
8425
  message: "Composable directory:",
8426
8426
  initial: DEFAULT_CONFIG.composableDir
8427
8427
  },
8428
+ {
8429
+ type: "text",
8430
+ name: "libDir",
8431
+ message: "Lib/utils directory:",
8432
+ initial: DEFAULT_CONFIG.libDir
8433
+ },
8428
8434
  {
8429
8435
  type: "confirm",
8430
8436
  name: "typescript",
@@ -8445,6 +8451,7 @@ async function initCommand() {
8445
8451
  const config = {
8446
8452
  componentDir: response.componentDir,
8447
8453
  composableDir: response.composableDir,
8454
+ libDir: response.libDir,
8448
8455
  typescript: response.typescript,
8449
8456
  overwrite: response.overwriteFiles
8450
8457
  };
@@ -8453,6 +8460,7 @@ async function initCommand() {
8453
8460
  log.success("Created saka-ui.json");
8454
8461
  log.dim(` Component dir: ${config.componentDir}`);
8455
8462
  log.dim(` Composable dir: ${config.composableDir}`);
8463
+ log.dim(` Lib dir: ${config.libDir}`);
8456
8464
  log.dim(` TypeScript: ${config.typescript}`);
8457
8465
  log.blank();
8458
8466
  log.info('Next: run "saka-ui add button" to add your first component.');
@@ -1,4 +1,5 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
+ import { IconProp } from '../../lib/icon';
2
3
  declare const alertVariants: (props?: ({
3
4
  variant?: "custom" | "error" | "success" | "warning" | "info" | null | undefined;
4
5
  size?: "small" | "medium" | "large" | null | undefined;
@@ -9,7 +10,7 @@ export interface Props {
9
10
  size?: 'small' | 'medium' | 'large';
10
11
  title?: string;
11
12
  description?: string;
12
- icon?: string | boolean;
13
+ icon?: IconProp | boolean;
13
14
  closable?: boolean;
14
15
  autoDismiss?: boolean;
15
16
  duration?: number;
@@ -51,7 +52,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
51
52
  }>, {
52
53
  size: "small" | "medium" | "large";
53
54
  closable: boolean;
54
- icon: string | boolean;
55
+ icon: IconProp | boolean;
55
56
  title: string;
56
57
  position: "static" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
57
58
  duration: number;
@@ -1,4 +1,5 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
+ import { IconProp } from '../../lib/icon';
2
3
  export declare const buttonVariants: (props?: ({
3
4
  variant?: "link" | "filled" | "outlined" | "light" | "ghost" | null | undefined;
4
5
  size?: "small" | "medium" | "large" | "xs" | "xl" | null | undefined;
@@ -14,8 +15,8 @@ export interface Props {
14
15
  preserveSize?: boolean;
15
16
  block?: boolean;
16
17
  rounded?: 'none' | 'sm' | 'md' | 'lg' | 'full';
17
- iconLeft?: string;
18
- iconRight?: string;
18
+ iconLeft?: IconProp;
19
+ iconRight?: IconProp;
19
20
  iconOnly?: boolean;
20
21
  tag?: string;
21
22
  href?: string;
@@ -32,8 +33,8 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Pr
32
33
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
33
34
  onClick?: ((event: MouseEvent) => any) | undefined;
34
35
  }>, {
35
- type: "button" | "submit" | "reset";
36
36
  size: "xs" | "small" | "medium" | "large" | "xl";
37
+ type: "button" | "submit" | "reset";
37
38
  disabled: boolean;
38
39
  color: string;
39
40
  variant: "filled" | "outlined" | "light" | "ghost" | "link";
@@ -42,8 +43,8 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Pr
42
43
  rounded: "none" | "sm" | "md" | "lg" | "full";
43
44
  preserveSize: boolean;
44
45
  block: boolean;
45
- iconLeft: string;
46
- iconRight: string;
46
+ iconLeft: IconProp;
47
+ iconRight: IconProp;
47
48
  iconOnly: boolean;
48
49
  tag: string;
49
50
  href: string;
@@ -1,4 +1,5 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
+ import { IconProp } from '../../lib/icon';
2
3
  declare const checkboxVariants: (props?: ({
3
4
  size?: "small" | "medium" | "large" | null | undefined;
4
5
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -14,7 +15,7 @@ export interface Props {
14
15
  label?: string;
15
16
  labelPosition?: 'left' | 'right';
16
17
  rounded?: boolean;
17
- icon?: string;
18
+ icon?: IconProp;
18
19
  required?: boolean;
19
20
  name?: string;
20
21
  error?: string;
@@ -38,10 +39,10 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
38
39
  "onUpdate:modelValue"?: ((value: string | number | boolean | any[]) => any) | undefined;
39
40
  onChange?: ((value: string | number | boolean | any[], event: Event) => any) | undefined;
40
41
  }>, {
41
- modelValue: boolean | string | number | any[];
42
42
  size: "small" | "medium" | "large";
43
+ modelValue: boolean | string | number | any[];
43
44
  name: string;
44
- icon: string;
45
+ icon: IconProp;
45
46
  disabled: boolean;
46
47
  label: string;
47
48
  value: any;
@@ -28,22 +28,22 @@ export interface Props {
28
28
  labelPlacement?: 'top' | 'left';
29
29
  }
30
30
  declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
31
+ clear: () => any;
31
32
  "update:modelValue": (value: Date | [Date, Date] | Date[] | null) => any;
32
33
  close: () => any;
33
- clear: () => any;
34
34
  open: () => any;
35
35
  monthChange: (month: number, year: number) => any;
36
36
  yearChange: (year: number) => any;
37
37
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
38
+ onClear?: (() => any) | undefined;
38
39
  "onUpdate:modelValue"?: ((value: Date | [Date, Date] | Date[] | null) => any) | undefined;
39
40
  onClose?: (() => any) | undefined;
40
- onClear?: (() => any) | undefined;
41
41
  onOpen?: (() => any) | undefined;
42
42
  onMonthChange?: ((month: number, year: number) => any) | undefined;
43
43
  onYearChange?: ((year: number) => any) | undefined;
44
44
  }>, {
45
- modelValue: Date | Date[] | [Date, Date] | null;
46
45
  size: "small" | "medium" | "large";
46
+ modelValue: Date | Date[] | [Date, Date] | null;
47
47
  disabled: boolean;
48
48
  label: string;
49
49
  mode: "single" | "range" | "multiple";
@@ -1,3 +1,4 @@
1
+ import { IconProp } from '../../lib/icon';
1
2
  export interface Props {
2
3
  size?: 'xs' | 'small' | 'medium' | 'large' | 'xl';
3
4
  disabled?: boolean;
@@ -5,8 +6,8 @@ export interface Props {
5
6
  preserveSize?: boolean;
6
7
  block?: boolean;
7
8
  rounded?: 'none' | 'sm' | 'md' | 'lg' | 'full';
8
- iconLeft?: string;
9
- iconRight?: string;
9
+ iconLeft?: IconProp;
10
+ iconRight?: IconProp;
10
11
  iconOnly?: boolean;
11
12
  tag?: string;
12
13
  href?: string;
@@ -39,16 +40,16 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
39
40
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
40
41
  onClick?: ((event: MouseEvent) => any) | undefined;
41
42
  }>, {
42
- type: "button" | "submit" | "reset";
43
43
  size: "xs" | "small" | "medium" | "large" | "xl";
44
+ type: "button" | "submit" | "reset";
44
45
  disabled: boolean;
45
46
  color: string;
46
47
  loading: boolean;
47
48
  rounded: "none" | "sm" | "md" | "lg" | "full";
48
49
  preserveSize: boolean;
49
50
  block: boolean;
50
- iconLeft: string;
51
- iconRight: string;
51
+ iconLeft: IconProp;
52
+ iconRight: IconProp;
52
53
  iconOnly: boolean;
53
54
  tag: string;
54
55
  href: string;
@@ -1,3 +1,4 @@
1
+ import { IconProp } from '../../lib/icon';
1
2
  export interface Props {
2
3
  modelValue?: string | number;
3
4
  type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search' | 'textarea';
@@ -9,8 +10,8 @@ export interface Props {
9
10
  placeholder?: string;
10
11
  labelPlacement?: 'top' | 'top-left' | 'top-center' | 'top-right' | 'bottom' | 'left' | 'right' | 'floating' | 'inside';
11
12
  labelAnimation?: 'morph' | 'slide' | 'fade' | 'none';
12
- iconLeft?: string;
13
- iconRight?: string;
13
+ iconLeft?: IconProp;
14
+ iconRight?: IconProp;
14
15
  iconColor?: string;
15
16
  disabled?: boolean;
16
17
  readonly?: boolean;
@@ -70,8 +71,8 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
70
71
  validate: () => Promise<void>;
71
72
  inputElement: import('vue').Ref<HTMLInputElement | HTMLTextAreaElement | null, HTMLInputElement | HTMLTextAreaElement | null>;
72
73
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
73
- "update:modelValue": (value: string | number) => any;
74
74
  clear: () => any;
75
+ "update:modelValue": (value: string | number) => any;
75
76
  input: (event: Event) => any;
76
77
  change: (value: string | number, event: Event) => any;
77
78
  blur: (event: FocusEvent) => any;
@@ -81,8 +82,8 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
81
82
  validate: (isValid: boolean, error: string | null) => any;
82
83
  "select-suggestion": (suggestion: string) => any;
83
84
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
84
- "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
85
85
  onClear?: (() => any) | undefined;
86
+ "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
86
87
  onInput?: ((event: Event) => any) | undefined;
87
88
  onChange?: ((value: string | number, event: Event) => any) | undefined;
88
89
  onBlur?: ((event: FocusEvent) => any) | undefined;
@@ -92,9 +93,9 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
92
93
  onValidate?: ((isValid: boolean, error: string | null) => any) | undefined;
93
94
  "onSelect-suggestion"?: ((suggestion: string) => any) | undefined;
94
95
  }>, {
96
+ size: "small" | "medium" | "large";
95
97
  modelValue: string | number;
96
98
  type: "text" | "email" | "password" | "number" | "tel" | "url" | "search" | "textarea";
97
- size: "small" | "medium" | "large";
98
99
  disabled: boolean;
99
100
  required: boolean;
100
101
  color: string;
@@ -1,8 +1,9 @@
1
+ import { IconProp } from '../../lib/icon';
1
2
  export interface SelectOption {
2
3
  value: any;
3
4
  label?: string;
4
5
  disabled?: boolean;
5
- icon?: string;
6
+ icon?: IconProp;
6
7
  image?: string;
7
8
  description?: string;
8
9
  color?: string;
@@ -32,7 +33,7 @@ export interface Props {
32
33
  required?: boolean;
33
34
  teleport?: boolean | string;
34
35
  placement?: 'bottom' | 'top' | 'auto';
35
- arrowIcon?: string;
36
+ arrowIcon?: IconProp;
36
37
  menuWidth?: string | number;
37
38
  menuAlign?: 'start' | 'end' | 'center';
38
39
  creatable?: boolean;
@@ -102,8 +103,8 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
102
103
  onOpen?: (() => any) | undefined;
103
104
  onCreate?: ((value: string) => any) | undefined;
104
105
  }>, {
105
- modelValue: any | any[];
106
106
  size: "small" | "medium" | "large";
107
+ modelValue: any | any[];
107
108
  placement: "bottom" | "top" | "auto";
108
109
  filter: boolean;
109
110
  disabled: boolean;
@@ -126,7 +127,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
126
127
  noOptionsText: string;
127
128
  noResultsText: string;
128
129
  hint: string;
129
- arrowIcon: string;
130
+ arrowIcon: IconProp;
130
131
  menuWidth: string | number;
131
132
  menuAlign: "start" | "end" | "center";
132
133
  creatable: boolean;
@@ -1,3 +1,4 @@
1
+ import { IconProp } from '../../lib/icon';
1
2
  export interface Props {
2
3
  modelValue?: boolean | string | number;
3
4
  type?: 'inset' | 'outset';
@@ -9,8 +10,8 @@ export interface Props {
9
10
  uncheckedValue?: boolean | string | number;
10
11
  labelBefore?: string;
11
12
  labelAfter?: string;
12
- checkedIcon?: string;
13
- uncheckedIcon?: string;
13
+ checkedIcon?: IconProp;
14
+ uncheckedIcon?: IconProp;
14
15
  checkedText?: string;
15
16
  uncheckedText?: string;
16
17
  trackClass?: string;
@@ -34,9 +35,9 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
34
35
  "onUpdate:modelValue"?: ((value: string | number | boolean) => any) | undefined;
35
36
  onChange?: ((value: string | number | boolean) => any) | undefined;
36
37
  }>, {
38
+ size: "small" | "medium" | "large";
37
39
  modelValue: boolean | string | number;
38
40
  type: "inset" | "outset";
39
- size: "small" | "medium" | "large";
40
41
  disabled: boolean;
41
42
  color: string;
42
43
  loading: boolean;
@@ -44,8 +45,8 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
44
45
  uncheckedValue: boolean | string | number;
45
46
  labelBefore: string;
46
47
  labelAfter: string;
47
- checkedIcon: string;
48
- uncheckedIcon: string;
48
+ checkedIcon: IconProp;
49
+ uncheckedIcon: IconProp;
49
50
  checkedText: string;
50
51
  uncheckedText: string;
51
52
  trackClass: string;
@@ -1,3 +1,4 @@
1
+ import { IconProp } from '../../../lib/icon';
1
2
  export interface Props {
2
3
  /** Unique identifier for this item */
3
4
  name: string | number;
@@ -5,10 +6,10 @@ export interface Props {
5
6
  title?: string;
6
7
  /** Optional subtitle text */
7
8
  subtitle?: string;
8
- /** MDI icon name for header */
9
- icon?: string;
10
- /** Custom expand icon (MDI icon name, replaces default chevron) */
11
- expandIcon?: string;
9
+ /** MDI icon name or Vue component for header */
10
+ icon?: IconProp;
11
+ /** Custom expand icon (MDI icon name or Vue component, replaces default chevron) */
12
+ expandIcon?: IconProp;
12
13
  /** Disable this item */
13
14
  disabled?: boolean;
14
15
  /** Lazy render content */
@@ -50,13 +51,13 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
50
51
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
51
52
  onToggle?: ((expanded: boolean) => any) | undefined;
52
53
  }>, {
53
- icon: string;
54
+ icon: IconProp;
54
55
  disabled: boolean;
55
56
  title: string;
56
57
  contentClass: string;
57
58
  lazy: boolean;
58
59
  subtitle: string;
59
- expandIcon: string;
60
+ expandIcon: IconProp;
60
61
  headerClass: string;
61
62
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
62
63
  contentRef: HTMLDivElement;
@@ -1,3 +1,4 @@
1
+ import { IconProp } from '../../../lib/icon';
1
2
  export interface Props {
2
3
  /** Title text */
3
4
  title?: string;
@@ -7,8 +8,8 @@ export interface Props {
7
8
  avatar?: string;
8
9
  /** Avatar fallback text (initials) */
9
10
  avatarFallback?: string;
10
- /** Icon name (MDI) */
11
- icon?: string;
11
+ /** Icon name (MDI) or Vue component */
12
+ icon?: IconProp;
12
13
  /** Icon color */
13
14
  iconColor?: string;
14
15
  /** Show divider below header */
@@ -34,7 +35,7 @@ declare function __VLS_template(): {
34
35
  };
35
36
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
36
37
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
37
- icon: string;
38
+ icon: IconProp;
38
39
  title: string;
39
40
  layout: "horizontal" | "vertical";
40
41
  align: "start" | "center" | "end";
@@ -1,8 +1,9 @@
1
+ import { IconProp } from '../../../lib/icon';
1
2
  export interface Props {
2
3
  /** Group header label */
3
4
  label: string;
4
5
  /** Icon for the header */
5
- icon?: string;
6
+ icon?: IconProp;
6
7
  }
7
8
  declare function __VLS_template(): {
8
9
  attrs: Partial<{}>;
@@ -14,7 +15,7 @@ declare function __VLS_template(): {
14
15
  };
15
16
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
17
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
17
- icon: string;
18
+ icon: IconProp;
18
19
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
19
20
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
20
21
  export default _default;
@@ -1,12 +1,13 @@
1
+ import { IconProp } from '../../../lib/icon';
1
2
  export interface Props {
2
3
  /** Unique key for the item */
3
4
  itemKey: string;
4
5
  /** Item label text */
5
6
  label?: string;
6
- /** Leading icon (MDI icon name) */
7
- icon?: string;
8
- /** Trailing icon */
9
- trailingIcon?: string;
7
+ /** Leading icon (MDI icon name or Vue component) */
8
+ icon?: IconProp;
9
+ /** Trailing icon (MDI icon name or Vue component) */
10
+ trailingIcon?: IconProp;
10
11
  /** Description text below label */
11
12
  description?: string;
12
13
  /** Keyboard shortcut display */
@@ -37,13 +38,13 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
37
38
  onClick?: ((event: MouseEvent) => any) | undefined;
38
39
  "onUpdate:checked"?: ((checked: boolean) => any) | undefined;
39
40
  }>, {
40
- icon: string;
41
+ icon: IconProp;
41
42
  disabled: boolean;
42
43
  label: string;
43
44
  color: string;
44
45
  description: string;
45
46
  checked: boolean;
46
- trailingIcon: string;
47
+ trailingIcon: IconProp;
47
48
  shortcut: string;
48
49
  danger: boolean;
49
50
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -1,8 +1,9 @@
1
+ import { IconProp } from '../../../lib/icon';
1
2
  export interface Props {
2
3
  value: any;
3
4
  label?: string;
4
5
  disabled?: boolean;
5
- icon?: string;
6
+ icon?: IconProp;
6
7
  description?: string;
7
8
  color?: string;
8
9
  }
@@ -17,7 +18,7 @@ declare function __VLS_template(): {
17
18
  };
18
19
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
20
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
20
- icon: string;
21
+ icon: IconProp;
21
22
  disabled: boolean;
22
23
  label: string;
23
24
  color: string;
@@ -81,8 +81,8 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
81
81
  onComplete?: ((value: string) => any) | undefined;
82
82
  onResend?: (() => any) | undefined;
83
83
  }>, {
84
- modelValue: string;
85
84
  size: SOTPSize;
85
+ modelValue: string;
86
86
  disabled: boolean;
87
87
  mode: SOTPMode;
88
88
  animation: SOTPAnimation;
@@ -111,8 +111,8 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
111
111
  "onUpdate:pageSize"?: ((size: number) => any) | undefined;
112
112
  onPageSizeChange?: ((size: number) => any) | undefined;
113
113
  }>, {
114
- modelValue: number;
115
114
  size: PaginationSize;
115
+ modelValue: number;
116
116
  disabled: boolean;
117
117
  animation: AnimationType;
118
118
  color: string;
@@ -31,8 +31,8 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
31
31
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
32
32
  "onUpdate:modelValue"?: ((value: number) => any) | undefined;
33
33
  }>, {
34
- modelValue: number;
35
34
  size: "xs" | "small" | "medium" | "large" | "xl";
35
+ modelValue: number;
36
36
  animated: boolean;
37
37
  disabled: boolean;
38
38
  width: string;
@@ -50,8 +50,8 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
50
50
  "onDrag-start"?: ((handle: "max" | "single" | "min") => any) | undefined;
51
51
  "onDrag-end"?: ((value: number | RangeValue) => any) | undefined;
52
52
  }>, {
53
- modelValue: number | RangeValue;
54
53
  size: "small" | "medium" | "large";
54
+ modelValue: number | RangeValue;
55
55
  disabled: boolean;
56
56
  label: string;
57
57
  color: string;
@@ -1,3 +1,4 @@
1
+ import { IconProp } from '../../../lib/icon';
1
2
  export interface Props {
2
3
  modelValue?: any;
3
4
  value?: any;
@@ -8,7 +9,7 @@ export interface Props {
8
9
  label?: string;
9
10
  labelPosition?: 'left' | 'right';
10
11
  variant?: 'default' | 'filled' | 'outlined' | 'button';
11
- icon?: string;
12
+ icon?: IconProp;
12
13
  required?: boolean;
13
14
  name?: string;
14
15
  error?: string;
@@ -33,10 +34,10 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
33
34
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
34
35
  onChange?: ((value: any, event: Event) => any) | undefined;
35
36
  }>, {
36
- modelValue: any;
37
37
  size: "small" | "medium" | "large";
38
+ modelValue: any;
38
39
  name: string;
39
- icon: string;
40
+ icon: IconProp;
40
41
  disabled: boolean;
41
42
  label: string;
42
43
  value: any;
@@ -32,8 +32,8 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
32
32
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
33
33
  onChange?: ((value: any) => any) | undefined;
34
34
  }>, {
35
- modelValue: any;
36
35
  size: "small" | "medium" | "large";
36
+ modelValue: any;
37
37
  name: string;
38
38
  disabled: boolean;
39
39
  color: string;
@@ -51,8 +51,8 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Pr
51
51
  "onUpdate:modelValue"?: ((value: number) => any) | undefined;
52
52
  onChange?: ((value: number, oldValue: number) => any) | undefined;
53
53
  }>, {
54
- modelValue: number;
55
54
  size: StepperSize;
55
+ modelValue: number;
56
56
  animated: boolean;
57
57
  linear: boolean;
58
58
  color: string;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { cn } from './lib/utils';
2
+ export { type IconProp, isIconComponent } from './lib/icon';
2
3
  export { STabs, STabPane, STabsList, STabsTrigger, STabsContent, STabsIndicator } from './components/ui/tabs';
3
4
  export { default as SIcon } from './components/ui/SIcon';
4
5
  export { default as SChip } from './components/ui/SChip';
@@ -0,0 +1,10 @@
1
+ import { Component } from 'vue';
2
+ /**
3
+ * Icon prop type: accepts either an MDI icon name string (e.g. "home")
4
+ * or a Vue component (e.g. a Lucide icon component).
5
+ */
6
+ export type IconProp = string | Component;
7
+ /**
8
+ * Check if an icon prop value is a Vue component (not a string).
9
+ */
10
+ export declare function isIconComponent(icon: IconProp): icon is Component;