kosui 0.0.27 → 0.0.29

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 (157) hide show
  1. package/dist/alert/alert.svelte +174 -19
  2. package/dist/alert/alert.svelte.d.ts +26 -3
  3. package/dist/alert/index.d.ts +1 -1
  4. package/dist/alert/index.js +1 -1
  5. package/dist/autocomplete/autocomplete-content.svelte +2 -2
  6. package/dist/autocomplete/autocomplete-content.svelte.d.ts +2 -2
  7. package/dist/autocomplete/autocomplete-item.svelte +3 -3
  8. package/dist/autocomplete/autocomplete-item.svelte.d.ts +3 -3
  9. package/dist/autocomplete/autocomplete.svelte +2 -2
  10. package/dist/autocomplete/autocomplete.svelte.d.ts +2 -2
  11. package/dist/base.d.ts +3 -3
  12. package/dist/base.js +3 -2
  13. package/dist/box/box.svelte +2 -2
  14. package/dist/box/box.svelte.d.ts +2 -2
  15. package/dist/breadcrumbs/breadcrumbs.svelte +1 -1
  16. package/dist/breadcrumbs/breadcrumbs.svelte.d.ts +1 -1
  17. package/dist/button/button.svelte +3 -3
  18. package/dist/button/button.svelte.d.ts +3 -3
  19. package/dist/chip/chip.svelte +1 -1
  20. package/dist/chip/chip.svelte.d.ts +1 -1
  21. package/dist/command/action.svelte.d.ts +1 -1
  22. package/dist/command/action.svelte.js +0 -1
  23. package/dist/command/command-content.svelte +2 -2
  24. package/dist/command/command-content.svelte.d.ts +2 -2
  25. package/dist/command/command-input.svelte +2 -2
  26. package/dist/command/command-input.svelte.d.ts +2 -2
  27. package/dist/command/command-item.svelte +3 -3
  28. package/dist/command/command-item.svelte.d.ts +3 -3
  29. package/dist/command/command.svelte +2 -2
  30. package/dist/command/command.svelte.d.ts +2 -2
  31. package/dist/common/divider.svelte +2 -2
  32. package/dist/common/divider.svelte.d.ts +2 -2
  33. package/dist/common/header.svelte +3 -3
  34. package/dist/common/header.svelte.d.ts +3 -3
  35. package/dist/dialog/dialog-button.svelte +1 -1
  36. package/dist/dialog/dialog-button.svelte.d.ts +1 -1
  37. package/dist/dialog/dialog.svelte +2 -2
  38. package/dist/dialog/dialog.svelte.d.ts +2 -2
  39. package/dist/dialog/dialoguer-context.svelte.d.ts +3 -3
  40. package/dist/dialog/dialoguer-context.svelte.js +0 -3
  41. package/dist/dialog/dialoguer.svelte +1 -1
  42. package/dist/dialog/dialoguer.svelte.d.ts +1 -1
  43. package/dist/fab/fab.svelte +1 -1
  44. package/dist/fab/fab.svelte.d.ts +1 -1
  45. package/dist/index.d.ts +1 -0
  46. package/dist/index.js +1 -0
  47. package/dist/input/input.svelte +1 -1
  48. package/dist/input/input.svelte.d.ts +4 -4
  49. package/dist/link/link.svelte +1 -1
  50. package/dist/link/link.svelte.d.ts +1 -1
  51. package/dist/markdown/markdown-blockquote.svelte +3 -3
  52. package/dist/markdown/markdown-blockquote.svelte.d.ts +3 -3
  53. package/dist/markdown/markdown-br.svelte +3 -3
  54. package/dist/markdown/markdown-br.svelte.d.ts +3 -3
  55. package/dist/markdown/markdown-code.svelte +3 -3
  56. package/dist/markdown/markdown-code.svelte.d.ts +3 -3
  57. package/dist/markdown/markdown-codespan.svelte +3 -3
  58. package/dist/markdown/markdown-codespan.svelte.d.ts +3 -3
  59. package/dist/markdown/markdown-context.svelte.d.ts +1 -1
  60. package/dist/markdown/markdown-context.svelte.js +0 -1
  61. package/dist/markdown/markdown-def.svelte +3 -3
  62. package/dist/markdown/markdown-def.svelte.d.ts +3 -3
  63. package/dist/markdown/markdown-del.svelte +3 -3
  64. package/dist/markdown/markdown-del.svelte.d.ts +3 -3
  65. package/dist/markdown/markdown-em.svelte +3 -3
  66. package/dist/markdown/markdown-em.svelte.d.ts +3 -3
  67. package/dist/markdown/markdown-escape.svelte +2 -2
  68. package/dist/markdown/markdown-escape.svelte.d.ts +2 -2
  69. package/dist/markdown/markdown-heading.svelte +3 -3
  70. package/dist/markdown/markdown-heading.svelte.d.ts +3 -3
  71. package/dist/markdown/markdown-hr.svelte +3 -3
  72. package/dist/markdown/markdown-hr.svelte.d.ts +3 -3
  73. package/dist/markdown/markdown-html.svelte +2 -2
  74. package/dist/markdown/markdown-html.svelte.d.ts +2 -2
  75. package/dist/markdown/markdown-image.svelte +3 -3
  76. package/dist/markdown/markdown-image.svelte.d.ts +3 -3
  77. package/dist/markdown/markdown-link.svelte +3 -3
  78. package/dist/markdown/markdown-link.svelte.d.ts +3 -3
  79. package/dist/markdown/markdown-list-item.svelte +3 -3
  80. package/dist/markdown/markdown-list-item.svelte.d.ts +3 -3
  81. package/dist/markdown/markdown-list.svelte +3 -3
  82. package/dist/markdown/markdown-list.svelte.d.ts +3 -3
  83. package/dist/markdown/markdown-paragraph.svelte +3 -3
  84. package/dist/markdown/markdown-paragraph.svelte.d.ts +3 -3
  85. package/dist/markdown/markdown-space.svelte +2 -2
  86. package/dist/markdown/markdown-space.svelte.d.ts +2 -2
  87. package/dist/markdown/markdown-strong.svelte +3 -3
  88. package/dist/markdown/markdown-strong.svelte.d.ts +3 -3
  89. package/dist/markdown/markdown-table-cell.svelte +3 -6
  90. package/dist/markdown/markdown-table-cell.svelte.d.ts +3 -3
  91. package/dist/markdown/markdown-table.svelte +2 -2
  92. package/dist/markdown/markdown-table.svelte.d.ts +2 -2
  93. package/dist/markdown/markdown-text.svelte +2 -2
  94. package/dist/markdown/markdown-text.svelte.d.ts +2 -2
  95. package/dist/markdown/markdown-token.svelte +1 -1
  96. package/dist/markdown/markdown-token.svelte.d.ts +1 -1
  97. package/dist/markdown/markdown-tokens.svelte +1 -1
  98. package/dist/markdown/markdown-tokens.svelte.d.ts +1 -1
  99. package/dist/markdown/markdown.svelte +1 -1
  100. package/dist/markdown/markdown.svelte.d.ts +1 -1
  101. package/dist/menu/menu-actions.svelte +1 -1
  102. package/dist/menu/menu-actions.svelte.d.ts +1 -1
  103. package/dist/menu/menu-content.svelte +2 -2
  104. package/dist/menu/menu-content.svelte.d.ts +2 -2
  105. package/dist/menu/menu-item.svelte +3 -3
  106. package/dist/menu/menu-item.svelte.d.ts +3 -3
  107. package/dist/menu/menu-trigger.svelte +4 -4
  108. package/dist/menu/menu-trigger.svelte.d.ts +4 -4
  109. package/dist/menu/menu.svelte +2 -2
  110. package/dist/menu/menu.svelte.d.ts +2 -2
  111. package/dist/modal/modal.svelte +3 -3
  112. package/dist/modal/modal.svelte.d.ts +3 -3
  113. package/dist/popover/popover.svelte +2 -2
  114. package/dist/popover/popover.svelte.d.ts +2 -2
  115. package/dist/portal/proxy.svelte +1 -1
  116. package/dist/portal/proxy.svelte.d.ts +1 -1
  117. package/dist/progress/circular-progress.svelte +1 -1
  118. package/dist/progress/circular-progress.svelte.d.ts +1 -1
  119. package/dist/shortcut/shortcut-badge.svelte +2 -2
  120. package/dist/shortcut/shortcut-badge.svelte.d.ts +2 -2
  121. package/dist/shortcut/shortcut.d.ts +2 -0
  122. package/dist/shortcut/shortcut.js +2 -0
  123. package/dist/skeleton/skeleton.svelte +1 -1
  124. package/dist/skeleton/skeleton.svelte.d.ts +1 -1
  125. package/dist/slider/index.d.ts +8 -0
  126. package/dist/slider/index.js +8 -0
  127. package/dist/slider/slider-context.svelte.d.ts +50 -0
  128. package/dist/slider/slider-context.svelte.js +198 -0
  129. package/dist/slider/slider-handle-label-arrow.svelte +18 -0
  130. package/dist/slider/slider-handle-label-arrow.svelte.d.ts +6 -0
  131. package/dist/slider/slider-handle-label.svelte +35 -0
  132. package/dist/slider/slider-handle-label.svelte.d.ts +6 -0
  133. package/dist/slider/slider-handle.svelte +54 -0
  134. package/dist/slider/slider-handle.svelte.d.ts +6 -0
  135. package/dist/slider/slider-mark-dot.svelte +25 -0
  136. package/dist/slider/slider-mark-dot.svelte.d.ts +6 -0
  137. package/dist/slider/slider-mark-label.svelte +37 -0
  138. package/dist/slider/slider-mark-label.svelte.d.ts +9 -0
  139. package/dist/slider/slider-mark.svelte +33 -0
  140. package/dist/slider/slider-mark.svelte.d.ts +9 -0
  141. package/dist/slider/slider.svelte +249 -0
  142. package/dist/slider/slider.svelte.d.ts +41 -0
  143. package/dist/switch/switch-thumb.svelte +2 -2
  144. package/dist/switch/switch-thumb.svelte.d.ts +2 -2
  145. package/dist/switch/switch.svelte +3 -3
  146. package/dist/switch/switch.svelte.d.ts +6 -6
  147. package/dist/textarea/textarea.svelte +2 -2
  148. package/dist/textarea/textarea.svelte.d.ts +5 -5
  149. package/dist/toggle/toggle-button.svelte +3 -3
  150. package/dist/toggle/toggle-button.svelte.d.ts +3 -3
  151. package/dist/toggle/toggle-group.svelte +2 -2
  152. package/dist/toggle/toggle-group.svelte.d.ts +2 -2
  153. package/dist/tooltip/tooltip.svelte +6 -5
  154. package/dist/tooltip/tooltip.svelte.d.ts +2 -2
  155. package/dist/utils.d.ts +1 -1
  156. package/dist/utils.js +0 -1
  157. package/package.json +5 -5
@@ -1,28 +1,183 @@
1
1
  <script lang="ts" module>
2
- import { Box, type BoxProps } from "../box/index.js";
3
- import { twMerge } from "tailwind-merge";
2
+ import {
3
+ COLORS,
4
+ RADII,
5
+ type Color,
6
+ type ColorProp,
7
+ type Radius,
8
+ type RadiusProp,
9
+ } from "../base.js";
10
+ import { mergeProps } from "../merge-props.js";
11
+ import type { Snippet } from "svelte";
12
+ import type { HTMLAttributes } from "svelte/elements";
4
13
 
5
- export type AlertProps = BoxProps;
14
+ export const ALERT_VARIANT = ["filled", "tonal", "plain"] as const;
15
+ export type AlertVariant = (typeof ALERT_VARIANT)[number];
16
+ export type AlertVariantProp = { variant?: AlertVariant };
17
+
18
+ export const ALERT_COLORS = COLORS;
19
+ export type AlertColor = Color;
20
+ export type AlertColorProp = ColorProp;
21
+
22
+ export type AlertOutlined = boolean;
23
+ export type AlertOutlinedProp = { outlined?: AlertOutlined };
24
+
25
+ export type AlertElevated = boolean;
26
+ export type AlertElevatedProp = { elevated?: AlertElevated };
27
+
28
+ export const ALERT_RADII = RADII;
29
+ export type AlertRadius = Radius;
30
+ export type AlertRadiusProp = RadiusProp;
31
+
32
+ export type AlertProps = {
33
+ children: Snippet<[]>;
34
+ } & AlertVariantProp &
35
+ AlertColorProp &
36
+ AlertRadiusProp &
37
+ AlertOutlinedProp &
38
+ AlertElevatedProp &
39
+ HTMLAttributes<HTMLDivElement>;
6
40
  </script>
7
41
 
8
42
  <script lang="ts">
9
- let {
10
- el = $bindable(),
11
- class: className,
12
- variant = "elevated",
43
+ const {
44
+ variant = "tonal",
13
45
  color = "primary",
14
- shape = "rounded",
15
- backdrop = true,
16
- ...restProps
46
+ radius = "sm",
47
+ outlined = false,
48
+ elevated = false,
49
+ children,
50
+ ...props
17
51
  }: AlertProps = $props();
18
52
  </script>
19
53
 
20
- <Box
21
- bind:el
22
- {variant}
23
- {color}
24
- {shape}
25
- {backdrop}
26
- class={twMerge("p-3", className)}
27
- {...restProps}
28
- />
54
+ <div
55
+ {...mergeProps(props, {
56
+ class: [
57
+ "base",
58
+ `radius-${radius}`,
59
+ `variant-${variant}`,
60
+ `color-${color}`,
61
+ outlined && "outlined",
62
+ elevated && "elevated",
63
+ ],
64
+ })}
65
+ >
66
+ {@render children()}
67
+ </div>
68
+
69
+ <style>
70
+ .base {
71
+ padding: calc(var(--spacing) * 4);
72
+ }
73
+
74
+ .elevated {
75
+ box-shadow:
76
+ 0 1px 3px 0 rgb(from var(--md-sys-color-shadow, rgb(0 0 0)) r g b / 0.2),
77
+ 0 1px 2px -1px
78
+ rgb(from var(--md-sys-color-shadow, rgb(0 0 0)) r g b / 0.2);
79
+ }
80
+
81
+ .variant-filled.color-primary {
82
+ background-color: var(--md-sys-color-primary);
83
+ color: var(--md-sys-color-on-primary);
84
+ }
85
+
86
+ .variant-filled.color-secondary {
87
+ background-color: var(--md-sys-color-secondary);
88
+ color: var(--md-sys-color-on-secondary);
89
+ }
90
+
91
+ .variant-filled.color-tertiary {
92
+ background-color: var(--md-sys-color-tertiary);
93
+ color: var(--md-sys-color-on-tertiary);
94
+ }
95
+
96
+ .variant-filled.color-error {
97
+ background-color: var(--md-sys-color-error);
98
+ color: var(--md-sys-color-on-error);
99
+ }
100
+
101
+ .variant-filled.color-plain {
102
+ background-color: var(--md-sys-color-inverse-surface);
103
+ color: var(--md-sys-color-inverse-on-surface);
104
+ }
105
+
106
+ .variant-tonal.color-primary {
107
+ background-color: var(--md-sys-color-primary-container);
108
+ color: var(--md-sys-color-on-primary-container);
109
+ }
110
+
111
+ .variant-tonal.color-secondary {
112
+ background-color: var(--md-sys-color-secondary-container);
113
+ color: var(--md-sys-color-on-secondary-container);
114
+ }
115
+
116
+ .variant-tonal.color-tertiary {
117
+ background-color: var(--md-sys-color-tertiary-container);
118
+ color: var(--md-sys-color-on-tertiary-container);
119
+ }
120
+
121
+ .variant-tonal.color-error {
122
+ background-color: var(--md-sys-color-error-container);
123
+ color: var(--md-sys-color-on-error-container);
124
+ }
125
+
126
+ .variant-tonal.color-plain {
127
+ background-color: var(--md-sys-color-surface-variant);
128
+ color: var(--md-sys-color-on-surface-variant);
129
+ }
130
+
131
+ .outlined {
132
+ border-width: 1px;
133
+ border-style: solid;
134
+ }
135
+
136
+ .outlined.color-primary {
137
+ border-color: var(--md-sys-color-primary);
138
+ }
139
+
140
+ .outlined.color-secondary {
141
+ border-color: var(--md-sys-color-secondary);
142
+ }
143
+
144
+ .outlined.color-tertiary {
145
+ border-color: var(--md-sys-color-tertiary);
146
+ }
147
+
148
+ .outlined.color-error {
149
+ border-color: var(--md-sys-color-error);
150
+ }
151
+
152
+ .outlined.color-plain {
153
+ border-color: var(--md-sys-color-outline);
154
+ }
155
+
156
+ .radius-none {
157
+ border-radius: 0;
158
+ }
159
+
160
+ .radius-xs {
161
+ border-radius: var(--radius-xs);
162
+ }
163
+
164
+ .radius-sm {
165
+ border-radius: var(--radius-sm);
166
+ }
167
+
168
+ .radius-md {
169
+ border-radius: var(--radius-lg);
170
+ }
171
+
172
+ .radius-lg {
173
+ border-radius: var(--radius-2xl);
174
+ }
175
+
176
+ .radius-xl {
177
+ border-radius: var(--radius-4xl);
178
+ }
179
+
180
+ .radius-full {
181
+ border-radius: calc(infinity * 1px);
182
+ }
183
+ </style>
@@ -1,5 +1,28 @@
1
- import { type BoxProps } from "../box/index.js";
2
- export type AlertProps = BoxProps;
3
- declare const Alert: import("svelte").Component<BoxProps, {}, "el">;
1
+ import { type Color, type ColorProp, type Radius, type RadiusProp } from "../base.js";
2
+ import type { Snippet } from "svelte";
3
+ import type { HTMLAttributes } from "svelte/elements";
4
+ export declare const ALERT_VARIANT: readonly ["filled", "tonal", "plain"];
5
+ export type AlertVariant = (typeof ALERT_VARIANT)[number];
6
+ export type AlertVariantProp = {
7
+ variant?: AlertVariant;
8
+ };
9
+ export declare const ALERT_COLORS: readonly ["primary", "secondary", "tertiary", "error", "plain", "inherit"];
10
+ export type AlertColor = Color;
11
+ export type AlertColorProp = ColorProp;
12
+ export type AlertOutlined = boolean;
13
+ export type AlertOutlinedProp = {
14
+ outlined?: AlertOutlined;
15
+ };
16
+ export type AlertElevated = boolean;
17
+ export type AlertElevatedProp = {
18
+ elevated?: AlertElevated;
19
+ };
20
+ export declare const ALERT_RADII: readonly ["none", "xs", "sm", "md", "lg", "xl", "full"];
21
+ export type AlertRadius = Radius;
22
+ export type AlertRadiusProp = RadiusProp;
23
+ export type AlertProps = {
24
+ children: Snippet<[]>;
25
+ } & AlertVariantProp & AlertColorProp & AlertRadiusProp & AlertOutlinedProp & AlertElevatedProp & HTMLAttributes<HTMLDivElement>;
26
+ declare const Alert: import("svelte").Component<AlertProps, {}, "">;
4
27
  type Alert = ReturnType<typeof Alert>;
5
28
  export default Alert;
@@ -1 +1 @@
1
- export { default as Alert, type AlertProps } from "./alert.svelte";
1
+ export { default as Alert, ALERT_COLORS, ALERT_RADII, ALERT_VARIANT, type AlertColor, type AlertColorProp, type AlertElevated, type AlertElevatedProp, type AlertOutlined, type AlertOutlinedProp, type AlertProps, type AlertRadius, type AlertRadiusProp, type AlertVariant, type AlertVariantProp, } from "./alert.svelte";
@@ -1 +1 @@
1
- export { default as Alert } from "./alert.svelte";
1
+ export { default as Alert, ALERT_COLORS, ALERT_RADII, ALERT_VARIANT, } from "./alert.svelte";
@@ -2,8 +2,8 @@
2
2
  import { getAutocompleteContext } from "./index.js";
3
3
  import { baseClasses, type Variants } from "../base.js";
4
4
  import { Popover, type PopoverProps } from "../popover/index.js";
5
- import { type ClassName } from "../utils.js";
6
- import { type Snippet } from "svelte";
5
+ import type { ClassName } from "../utils.js";
6
+ import type { Snippet } from "svelte";
7
7
  import { twMerge } from "tailwind-merge";
8
8
 
9
9
  export type AutocompleteProps = {
@@ -1,7 +1,7 @@
1
1
  import { type Variants } from "../base.js";
2
2
  import { type PopoverProps } from "../popover/index.js";
3
- import { type ClassName } from "../utils.js";
4
- import { type Snippet } from "svelte";
3
+ import type { ClassName } from "../utils.js";
4
+ import type { Snippet } from "svelte";
5
5
  export type AutocompleteProps = {
6
6
  children: Snippet;
7
7
  } & ClassName & Variants & Omit<PopoverProps, "children">;
@@ -2,9 +2,9 @@
2
2
  import { getAutocompleteContext } from "./index.js";
3
3
  import { baseClasses, type Variants } from "../base.js";
4
4
  import { mergeProps } from "../merge-props.js";
5
- import { type ClassName, type ElementRef } from "../utils.js";
6
- import { type Snippet } from "svelte";
7
- import { type HTMLAttributes } from "svelte/elements";
5
+ import type { ClassName, ElementRef } from "../utils.js";
6
+ import type { Snippet } from "svelte";
7
+ import type { HTMLAttributes } from "svelte/elements";
8
8
  import { twMerge } from "tailwind-merge";
9
9
 
10
10
  export type AutocompleteItemProps = {
@@ -1,7 +1,7 @@
1
1
  import { type Variants } from "../base.js";
2
- import { type ClassName, type ElementRef } from "../utils.js";
3
- import { type Snippet } from "svelte";
4
- import { type HTMLAttributes } from "svelte/elements";
2
+ import type { ClassName, ElementRef } from "../utils.js";
3
+ import type { Snippet } from "svelte";
4
+ import type { HTMLAttributes } from "svelte/elements";
5
5
  export type AutocompleteItemProps = {
6
6
  onSelect?: (el: HTMLElement) => void;
7
7
  children: Snippet;
@@ -3,8 +3,8 @@
3
3
  AutocompleteContext,
4
4
  setAutocompleteContext,
5
5
  } from "./index.js";
6
- import { type ClassName } from "../utils.js";
7
- import { type Snippet } from "svelte";
6
+ import type { ClassName } from "../utils.js";
7
+ import type { Snippet } from "svelte";
8
8
 
9
9
  export type AutocompleteProps = {
10
10
  children: Snippet;
@@ -1,5 +1,5 @@
1
- import { type ClassName } from "../utils.js";
2
- import { type Snippet } from "svelte";
1
+ import type { ClassName } from "../utils.js";
2
+ import type { Snippet } from "svelte";
3
3
  export type AutocompleteProps = {
4
4
  children: Snippet;
5
5
  } & ClassName;
package/dist/base.d.ts CHANGED
@@ -3,7 +3,7 @@ export type Variant = (typeof VARIANTS)[number];
3
3
  export type VariantProp = {
4
4
  variant?: Variant;
5
5
  };
6
- export declare const COLORS: readonly ["primary", "secondary", "tertiary", "error", "inherit"];
6
+ export declare const COLORS: readonly ["primary", "secondary", "tertiary", "error", "plain", "inherit"];
7
7
  export type Color = (typeof COLORS)[number];
8
8
  export type ColorProp = {
9
9
  color?: Color;
@@ -13,12 +13,12 @@ export type Shape = (typeof SHAPES)[number];
13
13
  export type ShapeProp = {
14
14
  shape?: Shape;
15
15
  };
16
- export declare const SIZES: readonly ["xs", "sm", "md", "lg", "xl", "inherit"];
16
+ export declare const SIZES: readonly ["xs", "sm", "md", "lg", "xl"];
17
17
  export type Size = (typeof SIZES)[number];
18
18
  export type SizeProp = {
19
19
  size?: Size;
20
20
  };
21
- export declare const RADII: readonly ["xs", "sm", "md", "lg", "xl", "inherit"];
21
+ export declare const RADII: readonly ["none", "xs", "sm", "md", "lg", "xl", "full"];
22
22
  export type Radius = (typeof RADII)[number];
23
23
  export type RadiusProp = {
24
24
  radius?: Radius;
package/dist/base.js CHANGED
@@ -12,11 +12,12 @@ export const COLORS = [
12
12
  "secondary",
13
13
  "tertiary",
14
14
  "error",
15
+ "plain",
15
16
  "inherit",
16
17
  ];
17
18
  export const SHAPES = ["square", "rounded", "circle"];
18
- export const SIZES = ["xs", "sm", "md", "lg", "xl", "inherit"];
19
- export const RADII = ["xs", "sm", "md", "lg", "xl", "inherit"];
19
+ export const SIZES = ["xs", "sm", "md", "lg", "xl"];
20
+ export const RADII = ["none", "xs", "sm", "md", "lg", "xl", "full"];
20
21
  export const UNDERLINES = ["always", "hover", "none"];
21
22
  const hoverBaseClasses = ({ variant, color }) => twMerge("disabled:text-m3-on-surface/38 disabled:bg-m3-on-surface/12 disabled:cursor-not-allowed", variant === "filled" && "hover:opacity-90", variant === "tonal" && "hover:opacity-80", variant === "text" && "hover:opacity-80", variant === "elevated" &&
22
23
  color === "primary" &&
@@ -1,8 +1,8 @@
1
1
  <script lang="ts">
2
2
  import { baseClasses, type Variants } from "../base.js";
3
3
  import { noop, type ClassName, type ElementRef } from "../utils.js";
4
- import { type Snippet } from "svelte";
5
- import { type HTMLAttributes } from "svelte/elements";
4
+ import type { Snippet } from "svelte";
5
+ import type { HTMLAttributes } from "svelte/elements";
6
6
  import { twMerge } from "tailwind-merge";
7
7
 
8
8
  export type BoxProps = {
@@ -1,7 +1,7 @@
1
1
  import { type Variants } from "../base.js";
2
2
  import { type ClassName, type ElementRef } from "../utils.js";
3
- import { type Snippet } from "svelte";
4
- import { type HTMLAttributes } from "svelte/elements";
3
+ import type { Snippet } from "svelte";
4
+ import type { HTMLAttributes } from "svelte/elements";
5
5
  export type BoxProps = {
6
6
  centered?: boolean;
7
7
  backdrop?: boolean;
@@ -1,6 +1,6 @@
1
1
  <script module lang="ts">
2
2
  import { Link, type LinkProps } from "../link/index.js";
3
- import { type Snippet } from "svelte";
3
+ import type { Snippet } from "svelte";
4
4
  import { twMerge } from "tailwind-merge";
5
5
 
6
6
  type Crumb = {
@@ -1,5 +1,5 @@
1
1
  import { type LinkProps } from "../link/index.js";
2
- import { type Snippet } from "svelte";
2
+ import type { Snippet } from "svelte";
3
3
  type Crumb = {
4
4
  title: string;
5
5
  href: string;
@@ -3,9 +3,9 @@
3
3
  import { mergeProps } from "../merge-props.js";
4
4
  import { Tooltip, type TooltipTriggerProps } from "../tooltip/index.js";
5
5
  import { noop, type ClassName, type ElementRef } from "../utils.js";
6
- import { type Icon } from "@lucide/svelte";
7
- import { type Snippet } from "svelte";
8
- import { type HTMLButtonAttributes } from "svelte/elements";
6
+ import type { Icon } from "@lucide/svelte";
7
+ import type { Snippet } from "svelte";
8
+ import type { HTMLButtonAttributes } from "svelte/elements";
9
9
  import { twMerge } from "tailwind-merge";
10
10
 
11
11
  export type ButtonProps = {
@@ -1,8 +1,8 @@
1
1
  import { type Variants } from "../base.js";
2
2
  import { type ClassName, type ElementRef } from "../utils.js";
3
- import { type Icon } from "@lucide/svelte";
4
- import { type Snippet } from "svelte";
5
- import { type HTMLButtonAttributes } from "svelte/elements";
3
+ import type { Icon } from "@lucide/svelte";
4
+ import type { Snippet } from "svelte";
5
+ import type { HTMLButtonAttributes } from "svelte/elements";
6
6
  export type ButtonProps = {
7
7
  icon?: typeof Icon;
8
8
  size?: number;
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" module>
2
2
  import { Box, type BoxProps } from "../box/index.js";
3
3
  import { X } from "@lucide/svelte";
4
- import { type Snippet } from "svelte";
4
+ import type { Snippet } from "svelte";
5
5
  import { twMerge } from "tailwind-merge";
6
6
 
7
7
  export type ChipProps = {
@@ -1,5 +1,5 @@
1
1
  import { type BoxProps } from "../box/index.js";
2
- import { type Snippet } from "svelte";
2
+ import type { Snippet } from "svelte";
3
3
  export type ChipProps = {
4
4
  title?: string;
5
5
  onClick?: (event: MouseEvent | KeyboardEvent) => void;
@@ -1,4 +1,4 @@
1
- import { type Shortcut } from "../shortcut/index.js";
1
+ import type { Shortcut } from "../shortcut/index.js";
2
2
  import { type Icon } from "@lucide/svelte";
3
3
  type ActionProps = {
4
4
  id: string;
@@ -1,4 +1,3 @@
1
- import {} from "../shortcut/index.js";
2
1
  import { CircleSlash } from "@lucide/svelte";
3
2
  import { untrack } from "svelte";
4
3
  export class Action {
@@ -1,6 +1,6 @@
1
1
  <script module lang="ts">
2
- import { type ClassName } from "../utils.js";
3
- import { type Snippet } from "svelte";
2
+ import type { ClassName } from "../utils.js";
3
+ import type { Snippet } from "svelte";
4
4
  import { twMerge } from "tailwind-merge";
5
5
 
6
6
  export type CommandContentProps = { children: Snippet } & ClassName;
@@ -1,5 +1,5 @@
1
- import { type ClassName } from "../utils.js";
2
- import { type Snippet } from "svelte";
1
+ import type { ClassName } from "../utils.js";
2
+ import type { Snippet } from "svelte";
3
3
  export type CommandContentProps = {
4
4
  children: Snippet;
5
5
  } & ClassName;
@@ -2,8 +2,8 @@
2
2
  import { baseClasses, type Variants } from "../base.js";
3
3
  import { getCommandContext } from "./index.js";
4
4
  import { mergeProps } from "../merge-props.js";
5
- import { type ClassName, type ElementRef } from "../utils.js";
6
- import { type HTMLInputAttributes } from "svelte/elements";
5
+ import type { ClassName, ElementRef } from "../utils.js";
6
+ import type { HTMLInputAttributes } from "svelte/elements";
7
7
  import { twMerge } from "tailwind-merge";
8
8
 
9
9
  export type CommandInputProps = {} & ElementRef &
@@ -1,6 +1,6 @@
1
1
  import { type Variants } from "../base.js";
2
- import { type ClassName, type ElementRef } from "../utils.js";
3
- import { type HTMLInputAttributes } from "svelte/elements";
2
+ import type { ClassName, ElementRef } from "../utils.js";
3
+ import type { HTMLInputAttributes } from "svelte/elements";
4
4
  export type CommandInputProps = {} & ElementRef & ClassName & Variants & HTMLInputAttributes;
5
5
  declare const CommandInput: import("svelte").Component<CommandInputProps, {}, "value">;
6
6
  type CommandInput = ReturnType<typeof CommandInput>;
@@ -2,9 +2,9 @@
2
2
  import { baseClasses, type Variants } from "../base.js";
3
3
  import { getCommandContext } from "./index.js";
4
4
  import { mergeProps } from "../merge-props.js";
5
- import { type ClassName, type ElementRef } from "../utils.js";
6
- import { type Snippet } from "svelte";
7
- import { type HTMLAttributes } from "svelte/elements";
5
+ import type { ClassName, ElementRef } from "../utils.js";
6
+ import type { Snippet } from "svelte";
7
+ import type { HTMLAttributes } from "svelte/elements";
8
8
  import { twMerge } from "tailwind-merge";
9
9
 
10
10
  export type CommandItemProps = {
@@ -1,7 +1,7 @@
1
1
  import { type Variants } from "../base.js";
2
- import { type ClassName, type ElementRef } from "../utils.js";
3
- import { type Snippet } from "svelte";
4
- import { type HTMLAttributes } from "svelte/elements";
2
+ import type { ClassName, ElementRef } from "../utils.js";
3
+ import type { Snippet } from "svelte";
4
+ import type { HTMLAttributes } from "svelte/elements";
5
5
  export type CommandItemProps = {
6
6
  onSelect?: (el: HTMLElement) => void;
7
7
  children: Snippet<[]>;
@@ -1,7 +1,7 @@
1
1
  <script module lang="ts">
2
2
  import { CommandContext, setCommandContext } from "./index.js";
3
- import { type ClassName } from "../utils.js";
4
- import { type Snippet } from "svelte";
3
+ import type { ClassName } from "../utils.js";
4
+ import type { Snippet } from "svelte";
5
5
  import { twMerge } from "tailwind-merge";
6
6
 
7
7
  export type CommandProps = {
@@ -1,5 +1,5 @@
1
- import { type ClassName } from "../utils.js";
2
- import { type Snippet } from "svelte";
1
+ import type { ClassName } from "../utils.js";
2
+ import type { Snippet } from "svelte";
3
3
  export type CommandProps = {
4
4
  children: Snippet<[]>;
5
5
  } & ClassName;
@@ -1,6 +1,6 @@
1
1
  <script module lang="ts">
2
- import { type ClassName } from "../utils.js";
3
- import { type HTMLAttributes } from "svelte/elements";
2
+ import type { ClassName } from "../utils.js";
3
+ import type { HTMLAttributes } from "svelte/elements";
4
4
  import { twMerge } from "tailwind-merge";
5
5
 
6
6
  export type DividerProps = {} & ClassName & HTMLAttributes<HTMLHRElement>;
@@ -1,5 +1,5 @@
1
- import { type ClassName } from "../utils.js";
2
- import { type HTMLAttributes } from "svelte/elements";
1
+ import type { ClassName } from "../utils.js";
2
+ import type { HTMLAttributes } from "svelte/elements";
3
3
  export type DividerProps = {} & ClassName & HTMLAttributes<HTMLHRElement>;
4
4
  declare const Divider: import("svelte").Component<DividerProps, {}, "">;
5
5
  type Divider = ReturnType<typeof Divider>;
@@ -1,8 +1,8 @@
1
1
  <script module lang="ts">
2
2
  import { baseClasses, type Variants } from "../base.js";
3
- import { type ClassName } from "../utils.js";
4
- import { type Snippet } from "svelte";
5
- import { type HTMLAttributes } from "svelte/elements";
3
+ import type { ClassName } from "../utils.js";
4
+ import type { Snippet } from "svelte";
5
+ import type { HTMLAttributes } from "svelte/elements";
6
6
  import { twMerge } from "tailwind-merge";
7
7
 
8
8
  export type HeaderProps = {
@@ -1,7 +1,7 @@
1
1
  import { type Variants } from "../base.js";
2
- import { type ClassName } from "../utils.js";
3
- import { type Snippet } from "svelte";
4
- import { type HTMLAttributes } from "svelte/elements";
2
+ import type { ClassName } from "../utils.js";
3
+ import type { Snippet } from "svelte";
4
+ import type { HTMLAttributes } from "svelte/elements";
5
5
  export type HeaderProps = {
6
6
  children: Snippet;
7
7
  } & ClassName & Variants & HTMLAttributes<HTMLDivElement>;
@@ -1,6 +1,6 @@
1
1
  <script module lang="ts">
2
2
  import { Button, type ButtonProps } from "../button/index.js";
3
- import { type Snippet } from "svelte";
3
+ import type { Snippet } from "svelte";
4
4
 
5
5
  export type DialogButtonProps<T> = {
6
6
  value: T | undefined;
@@ -1,5 +1,5 @@
1
1
  import { type ButtonProps } from "../button/index.js";
2
- import { type Snippet } from "svelte";
2
+ import type { Snippet } from "svelte";
3
3
  export type DialogButtonProps<T> = {
4
4
  value: T | undefined;
5
5
  autofocus?: boolean;
@@ -1,8 +1,8 @@
1
1
  <script module lang="ts">
2
2
  import { mergeComponentProps } from "../merge-props.js";
3
3
  import { Modal, type ModalProps } from "../modal/index.js";
4
- import { type Icon } from "@lucide/svelte";
5
- import { type Snippet } from "svelte";
4
+ import type { Icon } from "@lucide/svelte";
5
+ import type { Snippet } from "svelte";
6
6
  import { twMerge } from "tailwind-merge";
7
7
 
8
8
  export type DialogProps<T> = {
@@ -1,6 +1,6 @@
1
1
  import { type ModalProps } from "../modal/index.js";
2
- import { type Icon } from "@lucide/svelte";
3
- import { type Snippet } from "svelte";
2
+ import type { Icon } from "@lucide/svelte";
3
+ import type { Snippet } from "svelte";
4
4
  export type DialogProps<T> = {
5
5
  ref?: HTMLDialogElement;
6
6
  onSelect?: (value: T | undefined) => void;
@@ -1,6 +1,6 @@
1
- import { type Variants } from "../base.js";
2
- import { type InputProps } from "../input/index.js";
3
- import { type Icon } from "@lucide/svelte";
1
+ import type { Variants } from "../base.js";
2
+ import type { InputProps } from "../input/index.js";
3
+ import type { Icon } from "@lucide/svelte";
4
4
  import { type Snippet } from "svelte";
5
5
  export type DialoguerButtonProps<T> = {
6
6
  text: string;