@nqmcreative/ui 0.1.0 → 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 (308) hide show
  1. package/README.md +151 -439
  2. package/cli/index.mjs +67 -30
  3. package/dist/core/calendar.d.ts +3 -0
  4. package/dist/core/calendar.js +36 -0
  5. package/dist/core/dialog.svelte.d.ts +14 -0
  6. package/dist/core/dialog.svelte.js +23 -0
  7. package/dist/core/files.d.ts +35 -0
  8. package/dist/core/files.js +62 -0
  9. package/dist/core/index.d.ts +37 -0
  10. package/dist/core/index.js +35 -0
  11. package/dist/core/list.svelte.d.ts +41 -0
  12. package/dist/core/list.svelte.js +77 -0
  13. package/dist/core/number.d.ts +7 -0
  14. package/dist/core/number.js +17 -0
  15. package/dist/core/pagination.d.ts +6 -0
  16. package/dist/core/pagination.js +21 -0
  17. package/dist/core/password.d.ts +8 -0
  18. package/dist/core/password.js +23 -0
  19. package/dist/core/table.d.ts +22 -0
  20. package/dist/core/table.js +41 -0
  21. package/dist/core/theme.svelte.d.ts +16 -0
  22. package/dist/core/theme.svelte.js +34 -0
  23. package/dist/core/trigger.d.ts +35 -0
  24. package/dist/core/trigger.js +77 -0
  25. package/dist/index.d.ts +11 -103
  26. package/dist/index.js +11 -75
  27. package/dist/{components → styles/matte}/AccordionItem.svelte +1 -1
  28. package/dist/{components → styles/matte}/AccordionItem.svelte.d.ts +1 -1
  29. package/dist/{components → styles/matte}/Alert.svelte +8 -2
  30. package/dist/{components → styles/matte}/Alert.svelte.d.ts +1 -1
  31. package/dist/{components → styles/matte}/Avatar.svelte +1 -1
  32. package/dist/{components → styles/matte}/Avatar.svelte.d.ts +1 -1
  33. package/dist/{components → styles/matte}/Badge.svelte +8 -3
  34. package/dist/{components → styles/matte}/Badge.svelte.d.ts +1 -3
  35. package/dist/{components → styles/matte}/Breadcrumb.svelte +2 -2
  36. package/dist/{components → styles/matte}/Breadcrumb.svelte.d.ts +1 -1
  37. package/dist/{components → styles/matte}/Button.svelte +1 -1
  38. package/dist/{components → styles/matte}/Button.svelte.d.ts +1 -1
  39. package/dist/styles/matte/CTASection.svelte +76 -0
  40. package/dist/styles/matte/CTASection.svelte.d.ts +18 -0
  41. package/dist/{components → styles/matte}/Calendar.svelte +7 -17
  42. package/dist/{components → styles/matte}/Calendar.svelte.d.ts +1 -1
  43. package/dist/{components → styles/matte}/Card.svelte +1 -1
  44. package/dist/{components → styles/matte}/Card.svelte.d.ts +1 -1
  45. package/dist/{components → styles/matte}/Checkbox.svelte +1 -1
  46. package/dist/{components → styles/matte}/Checkbox.svelte.d.ts +1 -1
  47. package/dist/{components → styles/matte}/CheckboxGroup.svelte +1 -1
  48. package/dist/{components → styles/matte}/CheckboxGroup.svelte.d.ts +1 -1
  49. package/dist/{components → styles/matte}/Combobox.svelte +31 -42
  50. package/dist/{components → styles/matte}/Combobox.svelte.d.ts +1 -1
  51. package/dist/{components → styles/matte}/CommandPalette.svelte +26 -41
  52. package/dist/{components → styles/matte}/CommandPalette.svelte.d.ts +1 -1
  53. package/dist/{components → styles/matte}/ConfirmDialog.svelte +2 -2
  54. package/dist/{components → styles/matte}/ConfirmDialog.svelte.d.ts +2 -2
  55. package/dist/{components → styles/matte}/ContextMenu.svelte +5 -7
  56. package/dist/{components → styles/matte}/DatePicker.svelte +7 -11
  57. package/dist/{components → styles/matte}/DatePicker.svelte.d.ts +1 -1
  58. package/dist/{components → styles/matte}/Drawer.svelte +4 -7
  59. package/dist/{components → styles/matte}/Dropdown.svelte +18 -36
  60. package/dist/{components → styles/matte}/Dropdown.svelte.d.ts +1 -1
  61. package/dist/{components → styles/matte}/Dropzone.svelte +11 -43
  62. package/dist/{components → styles/matte}/Dropzone.svelte.d.ts +2 -5
  63. package/dist/{components → styles/matte}/EmptyState.svelte +1 -1
  64. package/dist/{components → styles/matte}/EmptyState.svelte.d.ts +1 -1
  65. package/dist/styles/matte/FeatureCard.svelte +58 -0
  66. package/dist/styles/matte/FeatureCard.svelte.d.ts +16 -0
  67. package/dist/styles/matte/FeatureGrid.svelte +62 -0
  68. package/dist/styles/matte/FeatureGrid.svelte.d.ts +16 -0
  69. package/dist/{components → styles/matte}/Footer.svelte +1 -1
  70. package/dist/{components → styles/matte}/Footer.svelte.d.ts +1 -1
  71. package/dist/styles/matte/HeroSection.svelte +80 -0
  72. package/dist/styles/matte/HeroSection.svelte.d.ts +21 -0
  73. package/dist/{components → styles/matte}/Input.svelte +1 -1
  74. package/dist/{components → styles/matte}/Input.svelte.d.ts +1 -1
  75. package/dist/{components → styles/matte}/Link.svelte +1 -1
  76. package/dist/{components → styles/matte}/Link.svelte.d.ts +1 -1
  77. package/dist/{components → styles/matte}/LocaleProvider.svelte +1 -1
  78. package/dist/{components → styles/matte}/LocaleProvider.svelte.d.ts +1 -1
  79. package/dist/styles/matte/LogoCloud.svelte +61 -0
  80. package/dist/styles/matte/LogoCloud.svelte.d.ts +19 -0
  81. package/dist/{components → styles/matte}/MenuItem.svelte +1 -1
  82. package/dist/{components → styles/matte}/MenuItem.svelte.d.ts +1 -1
  83. package/dist/{components → styles/matte}/Modal.svelte +4 -7
  84. package/dist/{components → styles/matte}/MultiSelect.svelte +18 -37
  85. package/dist/{components → styles/matte}/MultiSelect.svelte.d.ts +1 -1
  86. package/dist/{components → styles/matte}/Navbar.svelte +2 -2
  87. package/dist/{components → styles/matte}/Navbar.svelte.d.ts +1 -1
  88. package/dist/{components → styles/matte}/NumberInput.svelte +4 -8
  89. package/dist/{components → styles/matte}/NumberInput.svelte.d.ts +1 -1
  90. package/dist/{components → styles/matte}/Pagination.svelte +4 -15
  91. package/dist/{components → styles/matte}/Pagination.svelte.d.ts +1 -1
  92. package/dist/{components → styles/matte}/PasswordInput.svelte +4 -13
  93. package/dist/{components → styles/matte}/PasswordInput.svelte.d.ts +1 -1
  94. package/dist/{components → styles/matte}/Popover.svelte +16 -41
  95. package/dist/{components → styles/matte}/Popover.svelte.d.ts +1 -1
  96. package/dist/styles/matte/PricingCard.svelte +107 -0
  97. package/dist/styles/matte/PricingCard.svelte.d.ts +25 -0
  98. package/dist/{components → styles/matte}/Progress.svelte +3 -2
  99. package/dist/{components → styles/matte}/Progress.svelte.d.ts +1 -1
  100. package/dist/{components → styles/matte}/Radio.svelte +1 -1
  101. package/dist/{components → styles/matte}/Radio.svelte.d.ts +1 -1
  102. package/dist/{components → styles/matte}/RadioGroup.svelte +1 -1
  103. package/dist/{components → styles/matte}/RadioGroup.svelte.d.ts +1 -1
  104. package/dist/{components → styles/matte}/SegmentedControl.svelte +1 -1
  105. package/dist/{components → styles/matte}/SegmentedControl.svelte.d.ts +1 -1
  106. package/dist/{components → styles/matte}/Select.svelte +1 -1
  107. package/dist/{components → styles/matte}/Select.svelte.d.ts +1 -1
  108. package/dist/{components → styles/matte}/Sidebar.svelte +2 -2
  109. package/dist/{components → styles/matte}/Sidebar.svelte.d.ts +1 -1
  110. package/dist/{components → styles/matte}/Slider.svelte +3 -2
  111. package/dist/{components → styles/matte}/Slider.svelte.d.ts +1 -1
  112. package/dist/{components → styles/matte}/Spinner.svelte +2 -2
  113. package/dist/{components → styles/matte}/Spinner.svelte.d.ts +1 -1
  114. package/dist/{components → styles/matte}/Stat.svelte +1 -1
  115. package/dist/{components → styles/matte}/Stat.svelte.d.ts +1 -1
  116. package/dist/styles/matte/StatsBand.svelte +57 -0
  117. package/dist/styles/matte/StatsBand.svelte.d.ts +20 -0
  118. package/dist/{components → styles/matte}/Steps.svelte +1 -1
  119. package/dist/{components → styles/matte}/Steps.svelte.d.ts +1 -1
  120. package/dist/{components → styles/matte}/Switch.svelte +1 -1
  121. package/dist/{components → styles/matte}/Switch.svelte.d.ts +1 -1
  122. package/dist/{components → styles/matte}/Table.svelte +6 -28
  123. package/dist/{components → styles/matte}/Table.svelte.d.ts +2 -6
  124. package/dist/{components → styles/matte}/Tabs.svelte +8 -1
  125. package/dist/{components → styles/matte}/Tabs.svelte.d.ts +1 -1
  126. package/dist/styles/matte/Testimonial.svelte +67 -0
  127. package/dist/styles/matte/Testimonial.svelte.d.ts +19 -0
  128. package/dist/{components → styles/matte}/Textarea.svelte +1 -1
  129. package/dist/{components → styles/matte}/Textarea.svelte.d.ts +1 -1
  130. package/dist/{components → styles/matte}/ThemeToggle.svelte +14 -27
  131. package/dist/{components → styles/matte}/ThemeToggle.svelte.d.ts +2 -6
  132. package/dist/{components → styles/matte}/Toaster.svelte +4 -4
  133. package/dist/{fonts.css → styles/matte/fonts.css} +4 -3
  134. package/dist/styles/matte/index.d.ts +109 -0
  135. package/dist/styles/matte/index.js +83 -0
  136. package/dist/{theme.css → styles/matte/theme.css} +0 -1
  137. package/dist/styles/paper/Accordion.svelte +17 -0
  138. package/dist/styles/paper/Accordion.svelte.d.ts +8 -0
  139. package/dist/styles/paper/AccordionItem.svelte +46 -0
  140. package/dist/styles/paper/AccordionItem.svelte.d.ts +14 -0
  141. package/dist/styles/paper/Alert.svelte +99 -0
  142. package/dist/styles/paper/Alert.svelte.d.ts +18 -0
  143. package/dist/styles/paper/Avatar.svelte +60 -0
  144. package/dist/styles/paper/Avatar.svelte.d.ts +16 -0
  145. package/dist/styles/paper/AvatarGroup.svelte +17 -0
  146. package/dist/styles/paper/AvatarGroup.svelte.d.ts +8 -0
  147. package/dist/styles/paper/Badge.svelte +58 -0
  148. package/dist/styles/paper/Badge.svelte.d.ts +16 -0
  149. package/dist/styles/paper/Breadcrumb.svelte +49 -0
  150. package/dist/styles/paper/Breadcrumb.svelte.d.ts +14 -0
  151. package/dist/styles/paper/Button.svelte +96 -0
  152. package/dist/styles/paper/Button.svelte.d.ts +21 -0
  153. package/dist/styles/paper/CTASection.svelte +76 -0
  154. package/dist/styles/paper/CTASection.svelte.d.ts +18 -0
  155. package/dist/styles/paper/Calendar.svelte +202 -0
  156. package/dist/styles/paper/Calendar.svelte.d.ts +22 -0
  157. package/dist/styles/paper/Card.svelte +78 -0
  158. package/dist/styles/paper/Card.svelte.d.ts +21 -0
  159. package/dist/styles/paper/Checkbox.svelte +75 -0
  160. package/dist/styles/paper/Checkbox.svelte.d.ts +15 -0
  161. package/dist/styles/paper/CheckboxGroup.svelte +111 -0
  162. package/dist/styles/paper/CheckboxGroup.svelte.d.ts +30 -0
  163. package/dist/styles/paper/Combobox.svelte +266 -0
  164. package/dist/styles/paper/Combobox.svelte.d.ts +29 -0
  165. package/dist/styles/paper/CommandPalette.svelte +209 -0
  166. package/dist/styles/paper/CommandPalette.svelte.d.ts +32 -0
  167. package/dist/styles/paper/ConfirmDialog.svelte +97 -0
  168. package/dist/styles/paper/ConfirmDialog.svelte.d.ts +22 -0
  169. package/dist/styles/paper/ContextMenu.svelte +88 -0
  170. package/dist/styles/paper/ContextMenu.svelte.d.ts +15 -0
  171. package/dist/styles/paper/DatePicker.svelte +192 -0
  172. package/dist/styles/paper/DatePicker.svelte.d.ts +23 -0
  173. package/dist/styles/paper/Divider.svelte +30 -0
  174. package/dist/styles/paper/Divider.svelte.d.ts +10 -0
  175. package/dist/styles/paper/Drawer.svelte +165 -0
  176. package/dist/styles/paper/Drawer.svelte.d.ts +20 -0
  177. package/dist/styles/paper/Dropdown.svelte +94 -0
  178. package/dist/styles/paper/Dropdown.svelte.d.ts +23 -0
  179. package/dist/styles/paper/Dropzone.svelte +210 -0
  180. package/dist/styles/paper/Dropzone.svelte.d.ts +29 -0
  181. package/dist/styles/paper/EmptyState.svelte +71 -0
  182. package/dist/styles/paper/EmptyState.svelte.d.ts +18 -0
  183. package/dist/styles/paper/FeatureCard.svelte +58 -0
  184. package/dist/styles/paper/FeatureCard.svelte.d.ts +16 -0
  185. package/dist/styles/paper/FeatureGrid.svelte +62 -0
  186. package/dist/styles/paper/FeatureGrid.svelte.d.ts +16 -0
  187. package/dist/styles/paper/Field.svelte +42 -0
  188. package/dist/styles/paper/Field.svelte.d.ts +16 -0
  189. package/dist/styles/paper/Footer.svelte +91 -0
  190. package/dist/styles/paper/Footer.svelte.d.ts +25 -0
  191. package/dist/styles/paper/HeroSection.svelte +86 -0
  192. package/dist/styles/paper/HeroSection.svelte.d.ts +21 -0
  193. package/dist/styles/paper/Input.svelte +60 -0
  194. package/dist/styles/paper/Input.svelte.d.ts +18 -0
  195. package/dist/styles/paper/InputGroup.svelte +20 -0
  196. package/dist/styles/paper/InputGroup.svelte.d.ts +11 -0
  197. package/dist/styles/paper/Kbd.svelte +17 -0
  198. package/dist/styles/paper/Kbd.svelte.d.ts +8 -0
  199. package/dist/styles/paper/Label.svelte +16 -0
  200. package/dist/styles/paper/Label.svelte.d.ts +9 -0
  201. package/dist/styles/paper/Link.svelte +44 -0
  202. package/dist/styles/paper/Link.svelte.d.ts +16 -0
  203. package/dist/styles/paper/LocaleProvider.svelte +24 -0
  204. package/dist/styles/paper/LocaleProvider.svelte.d.ts +10 -0
  205. package/dist/styles/paper/LogoCloud.svelte +61 -0
  206. package/dist/styles/paper/LogoCloud.svelte.d.ts +19 -0
  207. package/dist/styles/paper/MenuItem.svelte +64 -0
  208. package/dist/styles/paper/MenuItem.svelte.d.ts +18 -0
  209. package/dist/styles/paper/MenuSeparator.svelte +22 -0
  210. package/dist/styles/paper/MenuSeparator.svelte.d.ts +8 -0
  211. package/dist/styles/paper/Modal.svelte +118 -0
  212. package/dist/styles/paper/Modal.svelte.d.ts +21 -0
  213. package/dist/styles/paper/MultiSelect.svelte +287 -0
  214. package/dist/styles/paper/MultiSelect.svelte.d.ts +31 -0
  215. package/dist/styles/paper/Navbar.svelte +201 -0
  216. package/dist/styles/paper/Navbar.svelte.d.ts +33 -0
  217. package/dist/styles/paper/NumberInput.svelte +96 -0
  218. package/dist/styles/paper/NumberInput.svelte.d.ts +15 -0
  219. package/dist/styles/paper/Pagination.svelte +83 -0
  220. package/dist/styles/paper/Pagination.svelte.d.ts +15 -0
  221. package/dist/styles/paper/PasswordInput.svelte +100 -0
  222. package/dist/styles/paper/PasswordInput.svelte.d.ts +12 -0
  223. package/dist/styles/paper/Popover.svelte +89 -0
  224. package/dist/styles/paper/Popover.svelte.d.ts +19 -0
  225. package/dist/styles/paper/PricingCard.svelte +108 -0
  226. package/dist/styles/paper/PricingCard.svelte.d.ts +25 -0
  227. package/dist/styles/paper/Progress.svelte +59 -0
  228. package/dist/styles/paper/Progress.svelte.d.ts +17 -0
  229. package/dist/styles/paper/Radio.svelte +55 -0
  230. package/dist/styles/paper/Radio.svelte.d.ts +15 -0
  231. package/dist/styles/paper/RadioGroup.svelte +95 -0
  232. package/dist/styles/paper/RadioGroup.svelte.d.ts +27 -0
  233. package/dist/styles/paper/SegmentedControl.svelte +88 -0
  234. package/dist/styles/paper/SegmentedControl.svelte.d.ts +25 -0
  235. package/dist/styles/paper/Select.svelte +61 -0
  236. package/dist/styles/paper/Select.svelte.d.ts +20 -0
  237. package/dist/styles/paper/Sidebar.svelte +206 -0
  238. package/dist/styles/paper/Sidebar.svelte.d.ts +36 -0
  239. package/dist/styles/paper/Skeleton.svelte +46 -0
  240. package/dist/styles/paper/Skeleton.svelte.d.ts +13 -0
  241. package/dist/styles/paper/Slider.svelte +80 -0
  242. package/dist/styles/paper/Slider.svelte.d.ts +19 -0
  243. package/dist/styles/paper/Spinner.svelte +34 -0
  244. package/dist/styles/paper/Spinner.svelte.d.ts +13 -0
  245. package/dist/styles/paper/Stat.svelte +51 -0
  246. package/dist/styles/paper/Stat.svelte.d.ts +16 -0
  247. package/dist/styles/paper/StatsBand.svelte +63 -0
  248. package/dist/styles/paper/StatsBand.svelte.d.ts +20 -0
  249. package/dist/styles/paper/Steps.svelte +141 -0
  250. package/dist/styles/paper/Steps.svelte.d.ts +24 -0
  251. package/dist/styles/paper/Switch.svelte +64 -0
  252. package/dist/styles/paper/Switch.svelte.d.ts +14 -0
  253. package/dist/styles/paper/Table.svelte +217 -0
  254. package/dist/styles/paper/Table.svelte.d.ts +66 -0
  255. package/dist/styles/paper/Tabs.svelte +102 -0
  256. package/dist/styles/paper/Tabs.svelte.d.ts +23 -0
  257. package/dist/styles/paper/Testimonial.svelte +64 -0
  258. package/dist/styles/paper/Testimonial.svelte.d.ts +19 -0
  259. package/dist/styles/paper/Textarea.svelte +54 -0
  260. package/dist/styles/paper/Textarea.svelte.d.ts +12 -0
  261. package/dist/styles/paper/ThemeToggle.svelte +130 -0
  262. package/dist/styles/paper/ThemeToggle.svelte.d.ts +16 -0
  263. package/dist/styles/paper/Toaster.svelte +132 -0
  264. package/dist/styles/paper/Toaster.svelte.d.ts +8 -0
  265. package/dist/styles/paper/Tooltip.svelte +33 -0
  266. package/dist/styles/paper/Tooltip.svelte.d.ts +12 -0
  267. package/dist/styles/paper/fonts.css +46 -0
  268. package/dist/styles/paper/index.d.ts +109 -0
  269. package/dist/styles/paper/index.js +83 -0
  270. package/dist/styles/paper/theme.css +222 -0
  271. package/package.json +531 -201
  272. package/registry.json +658 -339
  273. /package/dist/{actions → core/actions}/anchor.d.ts +0 -0
  274. /package/dist/{actions → core/actions}/anchor.js +0 -0
  275. /package/dist/{actions → core/actions}/dismissable.d.ts +0 -0
  276. /package/dist/{actions → core/actions}/dismissable.js +0 -0
  277. /package/dist/{date.d.ts → core/date.d.ts} +0 -0
  278. /package/dist/{date.js → core/date.js} +0 -0
  279. /package/dist/{locale.svelte.d.ts → core/locale.svelte.d.ts} +0 -0
  280. /package/dist/{locale.svelte.js → core/locale.svelte.js} +0 -0
  281. /package/dist/{toast.svelte.d.ts → core/toast.svelte.d.ts} +0 -0
  282. /package/dist/{toast.svelte.js → core/toast.svelte.js} +0 -0
  283. /package/dist/{tones.d.ts → core/tones.d.ts} +0 -0
  284. /package/dist/{tones.js → core/tones.js} +0 -0
  285. /package/dist/{components → styles/matte}/Accordion.svelte +0 -0
  286. /package/dist/{components → styles/matte}/Accordion.svelte.d.ts +0 -0
  287. /package/dist/{components → styles/matte}/AvatarGroup.svelte +0 -0
  288. /package/dist/{components → styles/matte}/AvatarGroup.svelte.d.ts +0 -0
  289. /package/dist/{components → styles/matte}/ContextMenu.svelte.d.ts +0 -0
  290. /package/dist/{components → styles/matte}/Divider.svelte +0 -0
  291. /package/dist/{components → styles/matte}/Divider.svelte.d.ts +0 -0
  292. /package/dist/{components → styles/matte}/Drawer.svelte.d.ts +0 -0
  293. /package/dist/{components → styles/matte}/Field.svelte +0 -0
  294. /package/dist/{components → styles/matte}/Field.svelte.d.ts +0 -0
  295. /package/dist/{components → styles/matte}/InputGroup.svelte +0 -0
  296. /package/dist/{components → styles/matte}/InputGroup.svelte.d.ts +0 -0
  297. /package/dist/{components → styles/matte}/Kbd.svelte +0 -0
  298. /package/dist/{components → styles/matte}/Kbd.svelte.d.ts +0 -0
  299. /package/dist/{components → styles/matte}/Label.svelte +0 -0
  300. /package/dist/{components → styles/matte}/Label.svelte.d.ts +0 -0
  301. /package/dist/{components → styles/matte}/MenuSeparator.svelte +0 -0
  302. /package/dist/{components → styles/matte}/MenuSeparator.svelte.d.ts +0 -0
  303. /package/dist/{components → styles/matte}/Modal.svelte.d.ts +0 -0
  304. /package/dist/{components → styles/matte}/Skeleton.svelte +0 -0
  305. /package/dist/{components → styles/matte}/Skeleton.svelte.d.ts +0 -0
  306. /package/dist/{components → styles/matte}/Toaster.svelte.d.ts +0 -0
  307. /package/dist/{components → styles/matte}/Tooltip.svelte +0 -0
  308. /package/dist/{components → styles/matte}/Tooltip.svelte.d.ts +0 -0
@@ -0,0 +1,96 @@
1
+ <script lang="ts">
2
+ import type { HTMLInputAttributes } from 'svelte/elements';
3
+ import { toneFocusWithinBorder, type Tone } from '../../core/tones.js';
4
+ import { useLocale } from '../../core/locale.svelte.js';
5
+ import { clampToStep } from '../../core/number.js';
6
+
7
+ interface Props extends Omit<HTMLInputAttributes, 'size' | 'type' | 'value' | 'min' | 'max'> {
8
+ value?: number;
9
+ min?: number;
10
+ max?: number;
11
+ step?: number;
12
+ tone?: Tone;
13
+ invalid?: boolean;
14
+ /** Short unit rendered inside the field, e.g. `'px'` or `'%'`. */
15
+ unit?: string;
16
+ }
17
+
18
+ let {
19
+ value = $bindable(0),
20
+ min = -Infinity,
21
+ max = Infinity,
22
+ step = 1,
23
+ tone = 'brand',
24
+ invalid = false,
25
+ unit,
26
+ disabled = false,
27
+ class: className = '',
28
+ ...rest
29
+ }: Props = $props();
30
+
31
+ const t = useLocale();
32
+
33
+ const clamp = (next: number) => clampToStep(next, min, max, step);
34
+
35
+ function nudge(direction: 1 | -1) {
36
+ value = clamp(value + direction * step);
37
+ }
38
+
39
+ function onKeydown(event: KeyboardEvent) {
40
+ if (event.key === 'ArrowUp') {
41
+ event.preventDefault();
42
+ nudge(1);
43
+ } else if (event.key === 'ArrowDown') {
44
+ event.preventDefault();
45
+ nudge(-1);
46
+ }
47
+ }
48
+
49
+ const stepper =
50
+ 'flex size-7 shrink-0 items-center justify-center rounded text-text-secondary transition-colors duration-150 hover:bg-bg-inset hover:text-text disabled:pointer-events-none disabled:opacity-30 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-current';
51
+ </script>
52
+
53
+ <span
54
+ class="inline-flex w-full items-center rounded-md border bg-bg pr-1 pl-3 shadow-xs transition-colors duration-150 ease-brand-out
55
+ {invalid ? 'border-danger' : `border-hairline-strong ${toneFocusWithinBorder[tone]}`}
56
+ {disabled ? 'pointer-events-none opacity-50' : ''} {className}"
57
+ >
58
+ <input
59
+ type="number"
60
+ {min}
61
+ {max}
62
+ {step}
63
+ {disabled}
64
+ {value}
65
+ oninput={(event) => (value = clamp(event.currentTarget.valueAsNumber))}
66
+ onkeydown={onKeydown}
67
+ aria-invalid={invalid ? 'true' : undefined}
68
+ class="h-10 w-full min-w-0 [appearance:textfield] bg-transparent font-sans text-sm text-text tabular-nums placeholder:text-text-muted focus:outline-none [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"
69
+ {...rest}
70
+ />
71
+ {#if unit}
72
+ <span class="shrink-0 px-1.5 text-xs text-text-muted">{unit}</span>
73
+ {/if}
74
+ <button
75
+ type="button"
76
+ class={stepper}
77
+ onclick={() => nudge(-1)}
78
+ disabled={disabled || value <= min}
79
+ aria-label={t.current.decrease}
80
+ >
81
+ <svg class="size-3.5" viewBox="0 0 14 14" fill="none" aria-hidden="true">
82
+ <path d="M2.5 7h9" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" />
83
+ </svg>
84
+ </button>
85
+ <button
86
+ type="button"
87
+ class={stepper}
88
+ onclick={() => nudge(1)}
89
+ disabled={disabled || value >= max}
90
+ aria-label={t.current.increase}
91
+ >
92
+ <svg class="size-3.5" viewBox="0 0 14 14" fill="none" aria-hidden="true">
93
+ <path d="M7 2.5v9M2.5 7h9" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" />
94
+ </svg>
95
+ </button>
96
+ </span>
@@ -0,0 +1,15 @@
1
+ import type { HTMLInputAttributes } from 'svelte/elements';
2
+ import { type Tone } from '../../core/tones.js';
3
+ interface Props extends Omit<HTMLInputAttributes, 'size' | 'type' | 'value' | 'min' | 'max'> {
4
+ value?: number;
5
+ min?: number;
6
+ max?: number;
7
+ step?: number;
8
+ tone?: Tone;
9
+ invalid?: boolean;
10
+ /** Short unit rendered inside the field, e.g. `'px'` or `'%'`. */
11
+ unit?: string;
12
+ }
13
+ declare const NumberInput: import("svelte").Component<Props, {}, "value">;
14
+ type NumberInput = ReturnType<typeof NumberInput>;
15
+ export default NumberInput;
@@ -0,0 +1,83 @@
1
+ <script lang="ts">
2
+ import type { HTMLAttributes } from 'svelte/elements';
3
+ import { focusRing, toneRing, toneSolid, type Tone } from '../../core/tones.js';
4
+ import { useLocale } from '../../core/locale.svelte.js';
5
+ import { pageRange } from '../../core/pagination.js';
6
+
7
+ interface Props extends Omit<HTMLAttributes<HTMLElement>, 'onchange'> {
8
+ /** Bindable, 1-based. */
9
+ page?: number;
10
+ /** Total number of pages. */
11
+ total: number;
12
+ /** Pages shown either side of the current one before collapsing to `…`. */
13
+ siblings?: number;
14
+ tone?: Tone;
15
+ onchange?: (page: number) => void;
16
+ }
17
+
18
+ let {
19
+ page = $bindable(1),
20
+ total,
21
+ siblings = 1,
22
+ tone = 'brand',
23
+ class: className = '',
24
+ onchange,
25
+ ...rest
26
+ }: Props = $props();
27
+
28
+ const t = useLocale();
29
+
30
+ const pages = $derived(pageRange(page, total, siblings));
31
+
32
+ function go(next: number) {
33
+ const clamped = Math.min(total, Math.max(1, next));
34
+ if (clamped === page) return;
35
+ page = clamped;
36
+ onchange?.(clamped);
37
+ }
38
+
39
+ const cell = `inline-flex h-9 min-w-9 items-center justify-center rounded-md px-2 font-sans text-sm font-medium tabular-nums transition-colors duration-150 ease-brand-out disabled:opacity-40 disabled:pointer-events-none ${focusRing}`;
40
+ </script>
41
+
42
+ <nav aria-label={t.current.pagination} class="flex items-center gap-1 {className}" {...rest}>
43
+ <button
44
+ type="button"
45
+ class="{cell} {toneRing[tone]} text-text-secondary hover:bg-bg-inset"
46
+ disabled={page <= 1}
47
+ aria-label={t.current.previousPage}
48
+ onclick={() => go(page - 1)}
49
+ >
50
+ <svg class="size-4" viewBox="0 0 16 16" fill="none" aria-hidden="true">
51
+ <path d="m10 4-4 4 4 4" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" />
52
+ </svg>
53
+ </button>
54
+
55
+ {#each pages as item, i (`${item}-${i}`)}
56
+ {#if item === '…'}
57
+ <span class="{cell} text-text-muted">…</span>
58
+ {:else}
59
+ <button
60
+ type="button"
61
+ aria-current={item === page ? 'page' : undefined}
62
+ class="{cell} {toneRing[tone]} {item === page
63
+ ? `${toneSolid[tone]} shadow-xs`
64
+ : 'text-text-secondary hover:bg-bg-inset'}"
65
+ onclick={() => go(item)}
66
+ >
67
+ {item}
68
+ </button>
69
+ {/if}
70
+ {/each}
71
+
72
+ <button
73
+ type="button"
74
+ class="{cell} {toneRing[tone]} text-text-secondary hover:bg-bg-inset"
75
+ disabled={page >= total}
76
+ aria-label={t.current.nextPage}
77
+ onclick={() => go(page + 1)}
78
+ >
79
+ <svg class="size-4" viewBox="0 0 16 16" fill="none" aria-hidden="true">
80
+ <path d="m6 4 4 4-4 4" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" />
81
+ </svg>
82
+ </button>
83
+ </nav>
@@ -0,0 +1,15 @@
1
+ import type { HTMLAttributes } from 'svelte/elements';
2
+ import { type Tone } from '../../core/tones.js';
3
+ interface Props extends Omit<HTMLAttributes<HTMLElement>, 'onchange'> {
4
+ /** Bindable, 1-based. */
5
+ page?: number;
6
+ /** Total number of pages. */
7
+ total: number;
8
+ /** Pages shown either side of the current one before collapsing to `…`. */
9
+ siblings?: number;
10
+ tone?: Tone;
11
+ onchange?: (page: number) => void;
12
+ }
13
+ declare const Pagination: import("svelte").Component<Props, {}, "page">;
14
+ type Pagination = ReturnType<typeof Pagination>;
15
+ export default Pagination;
@@ -0,0 +1,100 @@
1
+ <script lang="ts">
2
+ import type { HTMLInputAttributes } from 'svelte/elements';
3
+ import { toneFocusWithinBorder, type Tone } from '../../core/tones.js';
4
+ import { useLocale } from '../../core/locale.svelte.js';
5
+ import { passwordScore } from '../../core/password.js';
6
+
7
+ interface Props extends Omit<HTMLInputAttributes, 'size' | 'type'> {
8
+ value?: string;
9
+ tone?: Tone;
10
+ invalid?: boolean;
11
+ /** Draws a four-segment strength meter under the field. */
12
+ strength?: boolean;
13
+ }
14
+
15
+ let {
16
+ value = $bindable(''),
17
+ tone = 'brand',
18
+ invalid = false,
19
+ strength = false,
20
+ disabled = false,
21
+ class: className = '',
22
+ ...rest
23
+ }: Props = $props();
24
+
25
+ const t = useLocale();
26
+
27
+ let visible = $state(false);
28
+
29
+ const score = $derived(passwordScore(value));
30
+
31
+ const bars = ['bg-danger', 'bg-danger', 'bg-warning', 'bg-info', 'bg-success'];
32
+ const texts = ['text-danger', 'text-danger', 'text-warning', 'text-info', 'text-success'];
33
+ </script>
34
+
35
+ <div class="flex w-full flex-col gap-2">
36
+ <span
37
+ class="inline-flex w-full items-center gap-2 rounded-md border bg-bg pr-1 pl-3 shadow-xs transition-colors duration-150 ease-brand-out
38
+ {invalid ? 'border-danger' : `border-hairline-strong ${toneFocusWithinBorder[tone]}`}
39
+ {disabled ? 'pointer-events-none opacity-50' : ''} {className}"
40
+ >
41
+ <input
42
+ bind:value
43
+ {disabled}
44
+ type={visible ? 'text' : 'password'}
45
+ aria-invalid={invalid ? 'true' : undefined}
46
+ class="h-10 w-full min-w-0 bg-transparent font-sans text-sm text-text placeholder:text-text-muted focus:outline-none"
47
+ {...rest}
48
+ />
49
+ <button
50
+ type="button"
51
+ onclick={() => (visible = !visible)}
52
+ aria-label={visible ? t.current.hidePassword : t.current.showPassword}
53
+ aria-pressed={visible}
54
+ class="shrink-0 rounded p-1.5 text-text-muted transition-colors duration-150 hover:bg-bg-inset hover:text-text focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-current"
55
+ >
56
+ {#if visible}
57
+ <svg class="size-4" viewBox="0 0 20 20" fill="none" aria-hidden="true">
58
+ <path
59
+ d="M2.5 10S5.5 4.5 10 4.5 17.5 10 17.5 10 14.5 15.5 10 15.5 2.5 10 2.5 10Z"
60
+ stroke="currentColor"
61
+ stroke-width="1.4"
62
+ />
63
+ <circle cx="10" cy="10" r="2.4" stroke="currentColor" stroke-width="1.4" />
64
+ <path
65
+ d="m3.5 16.5 13-13"
66
+ stroke="currentColor"
67
+ stroke-width="1.4"
68
+ stroke-linecap="round"
69
+ />
70
+ </svg>
71
+ {:else}
72
+ <svg class="size-4" viewBox="0 0 20 20" fill="none" aria-hidden="true">
73
+ <path
74
+ d="M2.5 10S5.5 4.5 10 4.5 17.5 10 17.5 10 14.5 15.5 10 15.5 2.5 10 2.5 10Z"
75
+ stroke="currentColor"
76
+ stroke-width="1.4"
77
+ />
78
+ <circle cx="10" cy="10" r="2.4" stroke="currentColor" stroke-width="1.4" />
79
+ </svg>
80
+ {/if}
81
+ </button>
82
+ </span>
83
+
84
+ {#if strength}
85
+ <div class="flex items-center gap-3">
86
+ <div class="flex flex-1 gap-1" aria-hidden="true">
87
+ {#each [0, 1, 2, 3] as segment (segment)}
88
+ <span
89
+ class="h-1 flex-1 rounded-full transition-colors duration-200 {segment < score
90
+ ? bars[score]
91
+ : 'bg-bg-inset'}"
92
+ ></span>
93
+ {/each}
94
+ </div>
95
+ <span class="text-xs font-medium {value ? texts[score] : 'text-text-muted'}">
96
+ {value ? t.current.passwordStrength[score] : '—'}
97
+ </span>
98
+ </div>
99
+ {/if}
100
+ </div>
@@ -0,0 +1,12 @@
1
+ import type { HTMLInputAttributes } from 'svelte/elements';
2
+ import { type Tone } from '../../core/tones.js';
3
+ interface Props extends Omit<HTMLInputAttributes, 'size' | 'type'> {
4
+ value?: string;
5
+ tone?: Tone;
6
+ invalid?: boolean;
7
+ /** Draws a four-segment strength meter under the field. */
8
+ strength?: boolean;
9
+ }
10
+ declare const PasswordInput: import("svelte").Component<Props, {}, "value">;
11
+ type PasswordInput = ReturnType<typeof PasswordInput>;
12
+ export default PasswordInput;
@@ -0,0 +1,89 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from 'svelte';
3
+ import { anchored, type Placement } from '../../core/actions/anchor.js';
4
+ import { clickOutside, focusTrap, portal } from '../../core/actions/dismissable.js';
5
+ import { HOVER_GRACE, describeTrigger, popupTrigger } from '../../core/trigger.js';
6
+
7
+ interface Props {
8
+ trigger: Snippet;
9
+ children: Snippet;
10
+ open?: boolean;
11
+ placement?: Placement;
12
+ offset?: number;
13
+ title?: string;
14
+ /** `'hover'` also opens on focus, for read-only content. */
15
+ on?: 'click' | 'hover';
16
+ /** Keep focus where it is — right for hover popovers and hover cards. */
17
+ trapFocus?: boolean;
18
+ class?: string;
19
+ triggerClass?: string;
20
+ }
21
+
22
+ let {
23
+ trigger,
24
+ children,
25
+ open = $bindable(false),
26
+ placement = 'bottom',
27
+ offset = 8,
28
+ title,
29
+ on = 'click',
30
+ trapFocus = true,
31
+ class: className = '',
32
+ triggerClass = ''
33
+ }: Props = $props();
34
+
35
+ let anchorEl: HTMLElement | null = $state(null);
36
+ /** Held so the panel itself can cancel the hover close it inherited. */
37
+ let closeTimer: ReturnType<typeof setTimeout> | undefined;
38
+
39
+ $effect(() => describeTrigger(anchorEl, 'dialog', open));
40
+
41
+ function onKeydown(event: KeyboardEvent) {
42
+ if (event.key !== 'Escape') return;
43
+ event.preventDefault();
44
+ event.stopPropagation();
45
+ open = false;
46
+ }
47
+ </script>
48
+
49
+ <span
50
+ bind:this={anchorEl}
51
+ use:popupTrigger={{
52
+ toggle: () => (open = !open),
53
+ open: () => (open = true),
54
+ close: () => (open = false),
55
+ on
56
+ }}
57
+ class="inline-flex {triggerClass}"
58
+ >
59
+ {@render trigger()}
60
+ </span>
61
+
62
+ {#if open}
63
+ <div
64
+ use:portal
65
+ use:anchored={{ anchor: anchorEl, placement, offset }}
66
+ use:clickOutside={{
67
+ onoutside: () => (open = false),
68
+ ignore: [anchorEl],
69
+ enabled: on === 'click'
70
+ }}
71
+ use:focusTrap={{ enabled: trapFocus, autofocus: trapFocus, restore: trapFocus }}
72
+ onkeydown={onKeydown}
73
+ onpointerenter={() => clearTimeout(closeTimer)}
74
+ onpointerleave={() => {
75
+ if (on === 'hover') closeTimer = setTimeout(() => (open = false), HOVER_GRACE);
76
+ }}
77
+ role="dialog"
78
+ aria-label={title}
79
+ tabindex="-1"
80
+ class="z-50 flex max-w-xs flex-col gap-2 rounded-lg border border-hairline bg-bg p-4 font-sans shadow-lg {className}"
81
+ >
82
+ {#if title}
83
+ <p class="font-heading text-sm font-semibold text-text">{title}</p>
84
+ {/if}
85
+ <div class="text-[13px] leading-relaxed text-text-secondary">
86
+ {@render children()}
87
+ </div>
88
+ </div>
89
+ {/if}
@@ -0,0 +1,19 @@
1
+ import type { Snippet } from 'svelte';
2
+ import { type Placement } from '../../core/actions/anchor.js';
3
+ interface Props {
4
+ trigger: Snippet;
5
+ children: Snippet;
6
+ open?: boolean;
7
+ placement?: Placement;
8
+ offset?: number;
9
+ title?: string;
10
+ /** `'hover'` also opens on focus, for read-only content. */
11
+ on?: 'click' | 'hover';
12
+ /** Keep focus where it is — right for hover popovers and hover cards. */
13
+ trapFocus?: boolean;
14
+ class?: string;
15
+ triggerClass?: string;
16
+ }
17
+ declare const Popover: import("svelte").Component<Props, {}, "open">;
18
+ type Popover = ReturnType<typeof Popover>;
19
+ export default Popover;
@@ -0,0 +1,108 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from 'svelte';
3
+ import type { HTMLAttributes } from 'svelte/elements';
4
+ import { toneBorder, toneSoft, toneSolid, type Tone } from '../../core/tones.js';
5
+
6
+ interface Props extends HTMLAttributes<HTMLDivElement> {
7
+ name: string;
8
+ /** Already formatted — the component does not do currency. */
9
+ price: string;
10
+ /** `/ month`, `per seat`, whatever follows the figure. */
11
+ period?: string;
12
+ description?: string;
13
+ /** One line each. Rendered with a tick. */
14
+ features?: string[];
15
+ /** Pill in the top corner, e.g. "Most popular". */
16
+ badge?: string;
17
+ /** Ring, lift and a tinted header — for the plan you want chosen. */
18
+ featured?: boolean;
19
+ tone?: Tone;
20
+ /** The button. */
21
+ action?: Snippet;
22
+ /** Extra content under the feature list. */
23
+ children?: Snippet;
24
+ }
25
+
26
+ let {
27
+ name,
28
+ price,
29
+ period,
30
+ description,
31
+ features = [],
32
+ badge,
33
+ featured = false,
34
+ tone = 'brand',
35
+ action,
36
+ class: className = '',
37
+ children,
38
+ ...rest
39
+ }: Props = $props();
40
+ </script>
41
+
42
+ <div
43
+ class="flex flex-col rounded-xl bg-bg {featured
44
+ ? `border-2 shadow-lg ${toneBorder[tone]}`
45
+ : 'border border-hairline shadow-xs'} {className}"
46
+ {...rest}
47
+ >
48
+ <div class="flex flex-col gap-4 p-6">
49
+ <div class="flex items-start justify-between gap-3">
50
+ <h3 class="font-heading text-base font-semibold text-text">{name}</h3>
51
+ {#if badge}
52
+ <span
53
+ class="shrink-0 rounded-full px-2.5 py-0.5 font-sans text-[11px] font-medium {featured
54
+ ? toneSolid[tone]
55
+ : toneSoft[tone]}"
56
+ >
57
+ {badge}
58
+ </span>
59
+ {/if}
60
+ </div>
61
+
62
+ <div class="flex items-baseline gap-1.5">
63
+ <span class="font-heading text-4xl font-semibold tracking-tight text-text tabular-nums">
64
+ {price}
65
+ </span>
66
+ {#if period}
67
+ <span class="font-sans text-sm text-text-muted">{period}</span>
68
+ {/if}
69
+ </div>
70
+
71
+ {#if description}
72
+ <p class="font-sans text-sm leading-relaxed text-text-secondary">{description}</p>
73
+ {/if}
74
+ </div>
75
+
76
+ {#if features.length}
77
+ <ul class="flex flex-1 flex-col gap-3 border-t border-hairline p-6">
78
+ {#each features as feature (feature)}
79
+ <li class="flex items-start gap-3 font-sans text-sm text-text-secondary">
80
+ <span
81
+ class="mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full {toneSoft[
82
+ tone
83
+ ]}"
84
+ >
85
+ <svg class="size-2.5" viewBox="0 0 16 16" fill="none" aria-hidden="true">
86
+ <path
87
+ d="m3 8 3.2 3.2L13 4.4"
88
+ stroke="currentColor"
89
+ stroke-width="2.4"
90
+ stroke-linecap="round"
91
+ stroke-linejoin="round"
92
+ />
93
+ </svg>
94
+ </span>
95
+ <span class="leading-snug">{feature}</span>
96
+ </li>
97
+ {/each}
98
+ </ul>
99
+ {/if}
100
+
101
+ {#if children}
102
+ <div class="px-6 pb-2">{@render children()}</div>
103
+ {/if}
104
+
105
+ {#if action}
106
+ <div class="p-6 pt-2">{@render action()}</div>
107
+ {/if}
108
+ </div>
@@ -0,0 +1,25 @@
1
+ import type { Snippet } from 'svelte';
2
+ import type { HTMLAttributes } from 'svelte/elements';
3
+ import { type Tone } from '../../core/tones.js';
4
+ interface Props extends HTMLAttributes<HTMLDivElement> {
5
+ name: string;
6
+ /** Already formatted — the component does not do currency. */
7
+ price: string;
8
+ /** `/ month`, `per seat`, whatever follows the figure. */
9
+ period?: string;
10
+ description?: string;
11
+ /** One line each. Rendered with a tick. */
12
+ features?: string[];
13
+ /** Pill in the top corner, e.g. "Most popular". */
14
+ badge?: string;
15
+ /** Ring, lift and a tinted header — for the plan you want chosen. */
16
+ featured?: boolean;
17
+ tone?: Tone;
18
+ /** The button. */
19
+ action?: Snippet;
20
+ /** Extra content under the feature list. */
21
+ children?: Snippet;
22
+ }
23
+ declare const PricingCard: import("svelte").Component<Props, {}, "">;
24
+ type PricingCard = ReturnType<typeof PricingCard>;
25
+ export default PricingCard;
@@ -0,0 +1,59 @@
1
+ <script lang="ts">
2
+ import type { HTMLAttributes } from 'svelte/elements';
3
+ import { toneFill, type Tone } from '../../core/tones.js';
4
+ import { percentOf } from '../../core/number.js';
5
+
6
+ export type ProgressSize = 'sm' | 'md' | 'lg';
7
+
8
+ interface Props extends HTMLAttributes<HTMLDivElement> {
9
+ value?: number;
10
+ max?: number;
11
+ tone?: Tone;
12
+ size?: ProgressSize;
13
+ label?: string;
14
+ /** Prints the percentage on the right of the label row. */
15
+ showValue?: boolean;
16
+ /** Ignores `value` and runs a looping sweep. */
17
+ indeterminate?: boolean;
18
+ }
19
+
20
+ let {
21
+ value = 0,
22
+ max = 100,
23
+ tone = 'brand',
24
+ size = 'md',
25
+ label,
26
+ showValue = false,
27
+ indeterminate = false,
28
+ class: className = '',
29
+ ...rest
30
+ }: Props = $props();
31
+
32
+ const sizes: Record<ProgressSize, string> = { sm: 'h-1.5', md: 'h-2', lg: 'h-3' };
33
+ const pct = $derived(percentOf(value, 0, max));
34
+ </script>
35
+
36
+ <div class="flex w-full flex-col gap-2 {className}" {...rest}>
37
+ {#if label || showValue}
38
+ <div class="flex items-baseline justify-between gap-4 font-sans text-sm">
39
+ {#if label}<span class="text-text-secondary">{label}</span>{/if}
40
+ {#if showValue}
41
+ <span class="text-xs font-medium text-text-muted tabular-nums">{Math.round(pct)}%</span>
42
+ {/if}
43
+ </div>
44
+ {/if}
45
+ <div
46
+ role="progressbar"
47
+ aria-valuenow={indeterminate ? undefined : Math.round(pct)}
48
+ aria-valuemin={0}
49
+ aria-valuemax={100}
50
+ aria-label={label}
51
+ class="w-full overflow-hidden rounded-full bg-bg-inset {sizes[size]}"
52
+ >
53
+ <div
54
+ class="h-full rounded-full transition-[width] duration-300 ease-brand {toneFill[tone]}
55
+ {indeterminate ? 'w-1/3 animate-pulse' : ''}"
56
+ style={indeterminate ? undefined : `width:${pct}%`}
57
+ ></div>
58
+ </div>
59
+ </div>
@@ -0,0 +1,17 @@
1
+ import type { HTMLAttributes } from 'svelte/elements';
2
+ import { type Tone } from '../../core/tones.js';
3
+ export type ProgressSize = 'sm' | 'md' | 'lg';
4
+ interface Props extends HTMLAttributes<HTMLDivElement> {
5
+ value?: number;
6
+ max?: number;
7
+ tone?: Tone;
8
+ size?: ProgressSize;
9
+ label?: string;
10
+ /** Prints the percentage on the right of the label row. */
11
+ showValue?: boolean;
12
+ /** Ignores `value` and runs a looping sweep. */
13
+ indeterminate?: boolean;
14
+ }
15
+ declare const Progress: import("svelte").Component<Props, {}, "">;
16
+ type Progress = ReturnType<typeof Progress>;
17
+ export default Progress;