@designil/labdsnov 0.0.0-stage → 1.0.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 (243) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +133 -2
  3. package/dist/components/Accordion/Accordion.d.ts +8 -0
  4. package/dist/components/Accordion/Accordion.js +82 -0
  5. package/dist/components/Accordion/Accordion.module.css.js +23 -0
  6. package/dist/components/Accordion/index.d.ts +1 -0
  7. package/dist/components/Alert/Alert.d.ts +17 -0
  8. package/dist/components/Alert/Alert.js +58 -0
  9. package/dist/components/Alert/Alert.module.css.js +17 -0
  10. package/dist/components/Alert/index.d.ts +1 -0
  11. package/dist/components/AlertDialog/AlertDialog.d.ts +29 -0
  12. package/dist/components/AlertDialog/AlertDialog.js +150 -0
  13. package/dist/components/AlertDialog/AlertDialog.module.css.js +23 -0
  14. package/dist/components/AlertDialog/index.d.ts +1 -0
  15. package/dist/components/Avatar/Avatar.d.ts +23 -0
  16. package/dist/components/Avatar/Avatar.js +84 -0
  17. package/dist/components/Avatar/Avatar.module.css.js +23 -0
  18. package/dist/components/Avatar/index.d.ts +1 -0
  19. package/dist/components/Badge/Badge.d.ts +17 -0
  20. package/dist/components/Badge/Badge.js +37 -0
  21. package/dist/components/Badge/Badge.module.css.js +19 -0
  22. package/dist/components/Badge/index.d.ts +1 -0
  23. package/dist/components/Breadcrumb/Breadcrumb.d.ts +15 -0
  24. package/dist/components/Breadcrumb/Breadcrumb.js +111 -0
  25. package/dist/components/Breadcrumb/Breadcrumb.module.css.js +19 -0
  26. package/dist/components/Breadcrumb/index.d.ts +1 -0
  27. package/dist/components/Button/Button.d.ts +39 -0
  28. package/dist/components/Button/Button.js +62 -0
  29. package/dist/components/Button/Button.module.css.js +37 -0
  30. package/dist/components/Button/index.d.ts +1 -0
  31. package/dist/components/ButtonGroup/ButtonGroup.d.ts +21 -0
  32. package/dist/components/ButtonGroup/ButtonGroup.js +59 -0
  33. package/dist/components/ButtonGroup/ButtonGroup.module.css.js +15 -0
  34. package/dist/components/ButtonGroup/index.d.ts +1 -0
  35. package/dist/components/Calendar/Calendar.d.ts +17 -0
  36. package/dist/components/Calendar/Calendar.js +154 -0
  37. package/dist/components/Calendar/Calendar.module.css.js +67 -0
  38. package/dist/components/Calendar/index.d.ts +1 -0
  39. package/dist/components/Card/Card.d.ts +20 -0
  40. package/dist/components/Card/Card.js +87 -0
  41. package/dist/components/Card/Card.module.css.js +23 -0
  42. package/dist/components/Card/index.d.ts +1 -0
  43. package/dist/components/Chart/Chart.d.ts +59 -0
  44. package/dist/components/Chart/Chart.js +199 -0
  45. package/dist/components/Chart/Chart.module.css.js +47 -0
  46. package/dist/components/Chart/index.d.ts +1 -0
  47. package/dist/components/Checkbox/Checkbox.d.ts +4 -0
  48. package/dist/components/Checkbox/Checkbox.js +44 -0
  49. package/dist/components/Checkbox/Checkbox.module.css.js +13 -0
  50. package/dist/components/Checkbox/index.d.ts +1 -0
  51. package/dist/components/Collapsible/Collapsible.d.ts +8 -0
  52. package/dist/components/Collapsible/Collapsible.js +28 -0
  53. package/dist/components/Collapsible/Collapsible.module.css.js +7 -0
  54. package/dist/components/Collapsible/index.d.ts +1 -0
  55. package/dist/components/Combobox/Combobox.d.ts +36 -0
  56. package/dist/components/Combobox/Combobox.js +296 -0
  57. package/dist/components/Combobox/Combobox.module.css.js +39 -0
  58. package/dist/components/Combobox/index.d.ts +1 -0
  59. package/dist/components/DatePicker/DatePicker.d.ts +28 -0
  60. package/dist/components/DatePicker/DatePicker.js +73 -0
  61. package/dist/components/DatePicker/DatePicker.module.css.js +9 -0
  62. package/dist/components/DatePicker/index.d.ts +1 -0
  63. package/dist/components/Dialog/Dialog.d.ts +27 -0
  64. package/dist/components/Dialog/Dialog.js +144 -0
  65. package/dist/components/Dialog/Dialog.module.css.js +29 -0
  66. package/dist/components/Dialog/index.d.ts +1 -0
  67. package/dist/components/Drawer/Drawer.d.ts +22 -0
  68. package/dist/components/Drawer/Drawer.js +166 -0
  69. package/dist/components/Drawer/Drawer.module.css.js +23 -0
  70. package/dist/components/Drawer/index.d.ts +1 -0
  71. package/dist/components/DropdownMenu/DropdownMenu.d.ts +32 -0
  72. package/dist/components/DropdownMenu/DropdownMenu.js +245 -0
  73. package/dist/components/DropdownMenu/DropdownMenu.module.css.js +33 -0
  74. package/dist/components/DropdownMenu/index.d.ts +1 -0
  75. package/dist/components/Empty/Empty.d.ts +18 -0
  76. package/dist/components/Empty/Empty.js +76 -0
  77. package/dist/components/Empty/Empty.module.css.js +21 -0
  78. package/dist/components/Empty/index.d.ts +1 -0
  79. package/dist/components/Field/Field.d.ts +53 -0
  80. package/dist/components/Field/Field.js +172 -0
  81. package/dist/components/Field/Field.module.css.js +41 -0
  82. package/dist/components/Field/index.d.ts +1 -0
  83. package/dist/components/FundCard/FundCard.d.ts +18 -0
  84. package/dist/components/FundCard/FundCard.js +66 -0
  85. package/dist/components/FundCard/FundCard.module.css.js +25 -0
  86. package/dist/components/FundCard/index.d.ts +1 -0
  87. package/dist/components/HoverCard/HoverCard.d.ts +8 -0
  88. package/dist/components/HoverCard/HoverCard.js +42 -0
  89. package/dist/components/HoverCard/HoverCard.module.css.js +9 -0
  90. package/dist/components/HoverCard/index.d.ts +1 -0
  91. package/dist/components/Input/Input.d.ts +12 -0
  92. package/dist/components/Input/Input.js +23 -0
  93. package/dist/components/Input/Input.module.css.js +11 -0
  94. package/dist/components/Input/index.d.ts +1 -0
  95. package/dist/components/InputGroup/InputGroup.d.ts +39 -0
  96. package/dist/components/InputGroup/InputGroup.js +103 -0
  97. package/dist/components/InputGroup/InputGroup.module.css.js +31 -0
  98. package/dist/components/InputGroup/index.d.ts +1 -0
  99. package/dist/components/InputOTP/InputOTP.d.ts +18 -0
  100. package/dist/components/InputOTP/InputOTP.js +72 -0
  101. package/dist/components/InputOTP/InputOTP.module.css.js +19 -0
  102. package/dist/components/InputOTP/index.d.ts +1 -0
  103. package/dist/components/Kbd/Kbd.d.ts +5 -0
  104. package/dist/components/Kbd/Kbd.js +20 -0
  105. package/dist/components/Kbd/Kbd.module.css.js +9 -0
  106. package/dist/components/Kbd/index.d.ts +1 -0
  107. package/dist/components/Label/Label.d.ts +7 -0
  108. package/dist/components/Label/Label.js +17 -0
  109. package/dist/components/Label/Label.module.css.js +9 -0
  110. package/dist/components/Label/index.d.ts +1 -0
  111. package/dist/components/NavigationMenu/NavigationMenu.d.ts +20 -0
  112. package/dist/components/NavigationMenu/NavigationMenu.js +153 -0
  113. package/dist/components/NavigationMenu/NavigationMenu.module.css.js +29 -0
  114. package/dist/components/NavigationMenu/index.d.ts +1 -0
  115. package/dist/components/Pagination/Pagination.d.ts +29 -0
  116. package/dist/components/Pagination/Pagination.js +133 -0
  117. package/dist/components/Pagination/Pagination.module.css.js +19 -0
  118. package/dist/components/Pagination/index.d.ts +1 -0
  119. package/dist/components/Popover/Popover.d.ts +10 -0
  120. package/dist/components/Popover/Popover.js +78 -0
  121. package/dist/components/Popover/Popover.module.css.js +15 -0
  122. package/dist/components/Popover/index.d.ts +1 -0
  123. package/dist/components/Progress/Progress.d.ts +12 -0
  124. package/dist/components/Progress/Progress.js +74 -0
  125. package/dist/components/Progress/Progress.module.css.js +15 -0
  126. package/dist/components/Progress/index.d.ts +1 -0
  127. package/dist/components/RadioGroup/RadioGroup.d.ts +6 -0
  128. package/dist/components/RadioGroup/RadioGroup.js +37 -0
  129. package/dist/components/RadioGroup/RadioGroup.module.css.js +13 -0
  130. package/dist/components/RadioGroup/index.d.ts +1 -0
  131. package/dist/components/ScrollArea/ScrollArea.d.ts +9 -0
  132. package/dist/components/ScrollArea/ScrollArea.js +60 -0
  133. package/dist/components/ScrollArea/ScrollArea.module.css.js +17 -0
  134. package/dist/components/ScrollArea/index.d.ts +1 -0
  135. package/dist/components/Select/Select.d.ts +23 -0
  136. package/dist/components/Select/Select.js +188 -0
  137. package/dist/components/Select/Select.module.css.js +37 -0
  138. package/dist/components/Select/index.d.ts +1 -0
  139. package/dist/components/Separator/Separator.d.ts +4 -0
  140. package/dist/components/Separator/Separator.js +22 -0
  141. package/dist/components/Separator/Separator.module.css.js +7 -0
  142. package/dist/components/Separator/index.d.ts +1 -0
  143. package/dist/components/Skeleton/Skeleton.d.ts +4 -0
  144. package/dist/components/Skeleton/Skeleton.js +16 -0
  145. package/dist/components/Skeleton/Skeleton.module.css.js +7 -0
  146. package/dist/components/Skeleton/index.d.ts +1 -0
  147. package/dist/components/Slider/Slider.d.ts +13 -0
  148. package/dist/components/Slider/Slider.js +61 -0
  149. package/dist/components/Slider/Slider.module.css.js +15 -0
  150. package/dist/components/Slider/index.d.ts +1 -0
  151. package/dist/components/Spinner/Spinner.d.ts +6 -0
  152. package/dist/components/Spinner/Spinner.js +22 -0
  153. package/dist/components/Spinner/Spinner.module.css.js +7 -0
  154. package/dist/components/Spinner/index.d.ts +1 -0
  155. package/dist/components/Switch/Switch.d.ts +13 -0
  156. package/dist/components/Switch/Switch.js +29 -0
  157. package/dist/components/Switch/Switch.module.css.js +13 -0
  158. package/dist/components/Switch/index.d.ts +1 -0
  159. package/dist/components/Table/Table.d.ts +12 -0
  160. package/dist/components/Table/Table.js +96 -0
  161. package/dist/components/Table/Table.module.css.js +23 -0
  162. package/dist/components/Table/index.d.ts +1 -0
  163. package/dist/components/Tabs/Tabs.d.ts +16 -0
  164. package/dist/components/Tabs/Tabs.js +55 -0
  165. package/dist/components/Tabs/Tabs.module.css.js +17 -0
  166. package/dist/components/Tabs/index.d.ts +1 -0
  167. package/dist/components/Textarea/Textarea.d.ts +4 -0
  168. package/dist/components/Textarea/Textarea.js +16 -0
  169. package/dist/components/Textarea/Textarea.module.css.js +7 -0
  170. package/dist/components/Textarea/index.d.ts +1 -0
  171. package/dist/components/Toaster/Toaster.d.ts +8 -0
  172. package/dist/components/Toaster/Toaster.js +85 -0
  173. package/dist/components/Toaster/Toaster.module.css.js +11 -0
  174. package/dist/components/Toaster/index.d.ts +1 -0
  175. package/dist/components/Toggle/Toggle.d.ts +26 -0
  176. package/dist/components/Toggle/Toggle.js +35 -0
  177. package/dist/components/Toggle/Toggle.module.css.js +17 -0
  178. package/dist/components/Toggle/index.d.ts +1 -0
  179. package/dist/components/ToggleGroup/ToggleGroup.d.ts +20 -0
  180. package/dist/components/ToggleGroup/ToggleGroup.js +64 -0
  181. package/dist/components/ToggleGroup/ToggleGroup.module.css.js +11 -0
  182. package/dist/components/ToggleGroup/index.d.ts +1 -0
  183. package/dist/components/Tooltip/Tooltip.d.ts +8 -0
  184. package/dist/components/Tooltip/Tooltip.js +61 -0
  185. package/dist/components/Tooltip/Tooltip.module.css.js +11 -0
  186. package/dist/components/Tooltip/index.d.ts +1 -0
  187. package/dist/index.d.ts +47 -0
  188. package/dist/index.js +265 -0
  189. package/dist/styles.css +1 -0
  190. package/docs/Accessibility.md +129 -0
  191. package/docs/Colors.md +96 -0
  192. package/docs/ComponentTokens.md +191 -0
  193. package/docs/Contributing.md +97 -0
  194. package/docs/GettingStarted.md +106 -0
  195. package/docs/Radius.md +25 -0
  196. package/docs/Typography.md +38 -0
  197. package/package.json +79 -3
  198. package/src/components/Accordion/Accordion.md +102 -0
  199. package/src/components/Alert/Alert.md +90 -0
  200. package/src/components/AlertDialog/AlertDialog.md +131 -0
  201. package/src/components/Avatar/Avatar.md +77 -0
  202. package/src/components/Badge/Badge.md +124 -0
  203. package/src/components/Breadcrumb/Breadcrumb.md +110 -0
  204. package/src/components/Button/Button.md +165 -0
  205. package/src/components/ButtonGroup/ButtonGroup.md +96 -0
  206. package/src/components/Calendar/Calendar.md +111 -0
  207. package/src/components/Card/Card.md +99 -0
  208. package/src/components/Chart/Chart.md +112 -0
  209. package/src/components/Checkbox/Checkbox.md +105 -0
  210. package/src/components/Collapsible/Collapsible.md +86 -0
  211. package/src/components/Combobox/Combobox.md +143 -0
  212. package/src/components/DatePicker/DatePicker.md +82 -0
  213. package/src/components/Dialog/Dialog.md +193 -0
  214. package/src/components/Drawer/Drawer.md +125 -0
  215. package/src/components/DropdownMenu/DropdownMenu.md +151 -0
  216. package/src/components/Empty/Empty.md +90 -0
  217. package/src/components/Field/Field.md +139 -0
  218. package/src/components/FundCard/FundCard.md +93 -0
  219. package/src/components/HoverCard/HoverCard.md +100 -0
  220. package/src/components/Input/Input.md +115 -0
  221. package/src/components/InputGroup/InputGroup.md +115 -0
  222. package/src/components/InputOTP/InputOTP.md +105 -0
  223. package/src/components/Kbd/Kbd.md +85 -0
  224. package/src/components/Label/Label.md +75 -0
  225. package/src/components/NavigationMenu/NavigationMenu.md +128 -0
  226. package/src/components/Pagination/Pagination.md +115 -0
  227. package/src/components/Popover/Popover.md +111 -0
  228. package/src/components/Progress/Progress.md +83 -0
  229. package/src/components/RadioGroup/RadioGroup.md +123 -0
  230. package/src/components/ScrollArea/ScrollArea.md +88 -0
  231. package/src/components/Select/Select.md +170 -0
  232. package/src/components/Separator/Separator.md +68 -0
  233. package/src/components/Skeleton/Skeleton.md +68 -0
  234. package/src/components/Slider/Slider.md +107 -0
  235. package/src/components/Spinner/Spinner.md +64 -0
  236. package/src/components/Switch/Switch.md +101 -0
  237. package/src/components/Table/Table.md +117 -0
  238. package/src/components/Tabs/Tabs.md +173 -0
  239. package/src/components/Textarea/Textarea.md +89 -0
  240. package/src/components/Toaster/Toaster.md +107 -0
  241. package/src/components/Toggle/Toggle.md +103 -0
  242. package/src/components/ToggleGroup/ToggleGroup.md +95 -0
  243. package/src/components/Tooltip/Tooltip.md +104 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 designil
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,134 @@
1
- # Temporary Holding Version
1
+ # @designil/labdsnov
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A Thai-first React design system: [shadcn/ui](https://ui.shadcn.com) components built on [Base UI](https://base-ui.com), styled with Tailwind CSS v4 CSS modules, with colour tokens that pass WCAG 2.2 AA in light and dark mode.
4
+
5
+ 46 components, from `Accordion` to `Tooltip`. UI copy is Thai, and dates use the Thai Buddhist year (e.g. "13 พ.ย. 2569").
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pnpm add @designil/labdsnov
11
+ # or: npm install @designil/labdsnov
12
+ ```
13
+
14
+ Peer dependencies: `react` 19 and `react-dom` 19. It works in any React 19 app (Next.js, Vite, …).
15
+
16
+ The libraries the components are built on (`@base-ui/react`, `sonner`, `react-day-picker`, `date-fns`, `input-otp`, `recharts`, Hugeicons) are regular dependencies and install with the package. Your app doesn't need Tailwind.
17
+
18
+ ## Stylesheet setup
19
+
20
+ Import the stylesheet **once**, at the root of your app, before your own CSS:
21
+
22
+ ```tsx
23
+ // app/layout.tsx (Next.js) or src/main.tsx (Vite)
24
+ import "@designil/labdsnov/styles.css"
25
+ import "./globals.css" // your styles come after, so they can override
26
+ ```
27
+
28
+ `styles.css` contains:
29
+
30
+ - **Design tokens**: semantic colour and radius variables on `:root` and `.dark`, plus component tokens (`--button-primary-bg`, `--field-border`, …) that point at them.
31
+ - Tailwind's theme variables and **preflight** (a CSS reset), so components look the same with or without Tailwind in your app.
32
+ - **Base defaults** in `@layer base`: border colours, `body` background and text colour, the sans font on `html`, `--font-heading` on `h1`–`h6`.
33
+ - The **compiled component styles**, in the `components` cascade layer.
34
+
35
+ It ships no Tailwind utility classes. If your app uses Tailwind, utilities you pass through `className` always win over component styles.
36
+
37
+ Then, in your app:
38
+
39
+ - **Heading font**: set the `--font-heading` CSS variable on `<html>`. The DSADV app uses IBM Plex Sans Thai via `next/font` with `variable: "--font-heading"`. Body text uses the system font stack.
40
+ - **Dark mode**: add the `dark` class to `<html>` (for example with `next-themes` and `attribute="class"`).
41
+ - **Toasts and tooltips**: if you use them, mount `<Toaster />` and `<TooltipProvider>` once near the root.
42
+ - **Theming**: override any token after the import, e.g. `:root { --primary: oklch(0.55 0.2 260); }`. Re-check contrast when you change colours.
43
+
44
+ ## Example
45
+
46
+ ```tsx
47
+ // app/layout.tsx
48
+ import { IBM_Plex_Sans_Thai } from "next/font/google"
49
+ import { Toaster, TooltipProvider } from "@designil/labdsnov"
50
+ import "@designil/labdsnov/styles.css"
51
+
52
+ const heading = IBM_Plex_Sans_Thai({
53
+ subsets: ["thai", "latin"],
54
+ weight: ["500", "600"],
55
+ variable: "--font-heading",
56
+ })
57
+
58
+ export default function RootLayout({
59
+ children,
60
+ }: {
61
+ children: React.ReactNode
62
+ }) {
63
+ return (
64
+ <html lang="th" className={heading.variable}>
65
+ <body>
66
+ <TooltipProvider>{children}</TooltipProvider>
67
+ <Toaster />
68
+ </body>
69
+ </html>
70
+ )
71
+ }
72
+ ```
73
+
74
+ ```tsx
75
+ // app/login/page.tsx
76
+ "use client"
77
+
78
+ import { Button, Field, FieldLabel, Input, toast } from "@designil/labdsnov"
79
+
80
+ export default function LoginPage() {
81
+ return (
82
+ <form
83
+ style={{ display: "grid", gap: 16, maxWidth: 384 }}
84
+ onSubmit={(event) => {
85
+ event.preventDefault()
86
+ toast.success("เข้าสู่ระบบแล้ว")
87
+ }}
88
+ >
89
+ <Field>
90
+ <FieldLabel htmlFor="email">อีเมล</FieldLabel>
91
+ <Input id="email" type="email" autoComplete="email" required />
92
+ </Field>
93
+ <Button type="submit" fullWidth>
94
+ เข้าสู่ระบบ
95
+ </Button>
96
+ </form>
97
+ )
98
+ }
99
+ ```
100
+
101
+ ## Components
102
+
103
+ Accordion, Alert, AlertDialog, Avatar, Badge, Breadcrumb, Button, ButtonGroup, Calendar, Card, Chart, Checkbox, Collapsible, Combobox, DatePicker, Dialog, Drawer, DropdownMenu, Empty, Field, FundCard, HoverCard, Input, InputGroup, InputOTP, Kbd, Label, NavigationMenu, Pagination, Popover, Progress, RadioGroup, ScrollArea, Select, Separator, Skeleton, Slider, Spinner, Switch, Table, Tabs, Textarea, Toaster, Toggle, ToggleGroup, Tooltip.
104
+
105
+ Everything is imported from the package root (`@designil/labdsnov`). Client components already carry `"use client"`, so they work in React Server Component apps.
106
+
107
+ ## Docs
108
+
109
+ The docs ship with the package and are written in Thai.
110
+
111
+ - **Component usage docs**: `src/components/<Name>/<Name>.md`, for example [Button](./src/components/Button/Button.md). Each covers when to use the component and when not to, its props and variants, content rules and the tokens it uses.
112
+ - **Guides and foundations** in [`docs/`](./docs):
113
+ - [Getting started](./docs/GettingStarted.md): app setup, dark mode, customizing
114
+ - [Colors](./docs/Colors.md) and [Component tokens](./docs/ComponentTokens.md): every token, light and dark
115
+ - [Typography](./docs/Typography.md), [Radius](./docs/Radius.md)
116
+ - [Accessibility](./docs/Accessibility.md): the WCAG 2.2 AA bar and every checked contrast pair
117
+ - [Contributing](./docs/Contributing.md): adding a component or token
118
+
119
+ ## Development
120
+
121
+ This package lives in the [labdsnov monorepo](https://github.com/dxnat/labdsnov), where Storybook shows every component.
122
+
123
+ ```bash
124
+ pnpm --filter @designil/labdsnov build # vite build (JS + dist/styles.css), then tsc (.d.ts)
125
+ pnpm --filter @designil/labdsnov typecheck
126
+ pnpm --filter @designil/labdsnov check:dist # check the build output
127
+ pnpm --filter @designil/labdsnov pack:dry # list what would be published
128
+ pnpm --filter @designil/labdsnov tokens:check # WCAG AA contrast of every token pair
129
+ pnpm --filter @designil/labdsnov tokens:docs # regenerate the token tables in docs/
130
+ ```
131
+
132
+ ## License
133
+
134
+ MIT
@@ -0,0 +1,8 @@
1
+ import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion";
2
+ /** Stack of sections that expand one at a time (or several, with `multiple`). */
3
+ declare function Accordion({ className, ...props }: AccordionPrimitive.Root.Props): import("react").JSX.Element;
4
+ declare function AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props): import("react").JSX.Element;
5
+ /** The clickable heading of a section. Rendered inside a heading element. */
6
+ declare function AccordionTrigger({ className, children, ...props }: AccordionPrimitive.Trigger.Props): import("react").JSX.Element;
7
+ declare function AccordionContent({ className, children, ...props }: AccordionPrimitive.Panel.Props): import("react").JSX.Element;
8
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
@@ -0,0 +1,82 @@
1
+ import { jsx as n, jsxs as s } from "react/jsx-runtime";
2
+ import { Accordion as i } from "@base-ui/react/accordion";
3
+ import { ArrowDown01Icon as d, ArrowUp01Icon as m } from "@hugeicons/core-free-icons";
4
+ import { HugeiconsIcon as a } from "@hugeicons/react";
5
+ import { cn as t } from "cn";
6
+ import o from "./Accordion.module.css.js";
7
+ function N({ className: r, ...c }) {
8
+ return /* @__PURE__ */ n(
9
+ i.Root,
10
+ {
11
+ "data-slot": "accordion",
12
+ className: t(o.root, r),
13
+ ...c
14
+ }
15
+ );
16
+ }
17
+ function h({ className: r, ...c }) {
18
+ return /* @__PURE__ */ n(
19
+ i.Item,
20
+ {
21
+ "data-slot": "accordion-item",
22
+ className: t(o.item, r),
23
+ ...c
24
+ }
25
+ );
26
+ }
27
+ function I({
28
+ className: r,
29
+ children: c,
30
+ ...e
31
+ }) {
32
+ return /* @__PURE__ */ n(i.Header, { className: o.header, children: /* @__PURE__ */ s(
33
+ i.Trigger,
34
+ {
35
+ "data-slot": "accordion-trigger",
36
+ className: t(o.trigger, r),
37
+ ...e,
38
+ children: [
39
+ c,
40
+ /* @__PURE__ */ n(
41
+ a,
42
+ {
43
+ icon: d,
44
+ strokeWidth: 2,
45
+ "data-slot": "accordion-trigger-icon",
46
+ className: t(o.icon, o.iconClosed)
47
+ }
48
+ ),
49
+ /* @__PURE__ */ n(
50
+ a,
51
+ {
52
+ icon: m,
53
+ strokeWidth: 2,
54
+ "data-slot": "accordion-trigger-icon",
55
+ className: t(o.icon, o.iconOpen)
56
+ }
57
+ )
58
+ ]
59
+ }
60
+ ) });
61
+ }
62
+ function w({
63
+ className: r,
64
+ children: c,
65
+ ...e
66
+ }) {
67
+ return /* @__PURE__ */ n(
68
+ i.Panel,
69
+ {
70
+ "data-slot": "accordion-content",
71
+ className: o.panel,
72
+ ...e,
73
+ children: /* @__PURE__ */ n("div", { className: t(o.content, r), children: c })
74
+ }
75
+ );
76
+ }
77
+ export {
78
+ N as Accordion,
79
+ w as AccordionContent,
80
+ h as AccordionItem,
81
+ I as AccordionTrigger
82
+ };
@@ -0,0 +1,23 @@
1
+ const o = "dsadv_root_Dem6d", n = "dsadv_item_7ryVk", t = "dsadv_header_WaTdJ", e = "dsadv_trigger_9BYFY", d = "dsadv_icon_xfHxX", s = "dsadv_iconOpen_KxnQ-", c = "dsadv_iconClosed_oiWWw", a = "dsadv_panel_Wx50w", _ = "dsadv_content_PEM9t", i = {
2
+ root: o,
3
+ item: n,
4
+ header: t,
5
+ trigger: e,
6
+ icon: d,
7
+ iconOpen: s,
8
+ iconClosed: c,
9
+ panel: a,
10
+ content: _
11
+ };
12
+ export {
13
+ _ as content,
14
+ i as default,
15
+ t as header,
16
+ d as icon,
17
+ c as iconClosed,
18
+ s as iconOpen,
19
+ n as item,
20
+ a as panel,
21
+ o as root,
22
+ e as trigger
23
+ };
@@ -0,0 +1 @@
1
+ export * from "./Accordion";
@@ -0,0 +1,17 @@
1
+ import * as React from "react";
2
+ declare const variantClass: {
3
+ readonly default: string;
4
+ readonly destructive: string;
5
+ };
6
+ type AlertVariant = keyof typeof variantClass;
7
+ type AlertProps = React.ComponentProps<"div"> & {
8
+ /** `default`: neutral notice. `destructive`: error or something that needs fixing. */
9
+ variant?: AlertVariant;
10
+ };
11
+ /** Message box inside the page. Put an icon first to show it beside the title. */
12
+ declare function Alert({ className, variant, ...props }: AlertProps): React.JSX.Element;
13
+ declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
14
+ declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
15
+ /** Top-right slot for a small action, e.g. a `Button size="xs"`. */
16
+ declare function AlertAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
17
+ export { Alert, AlertAction, AlertDescription, AlertTitle, type AlertProps, type AlertVariant, };
@@ -0,0 +1,58 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { cn as i } from "cn";
3
+ import r from "./Alert.module.css.js";
4
+ const o = {
5
+ default: r.variantDefault,
6
+ destructive: r.variantDestructive
7
+ };
8
+ function d({ className: a, variant: t = "default", ...l }) {
9
+ return /* @__PURE__ */ e(
10
+ "div",
11
+ {
12
+ "data-slot": "alert",
13
+ "data-variant": t,
14
+ role: "alert",
15
+ className: i(r.root, o[t], a),
16
+ ...l
17
+ }
18
+ );
19
+ }
20
+ function u({ className: a, ...t }) {
21
+ return /* @__PURE__ */ e(
22
+ "div",
23
+ {
24
+ "data-slot": "alert-title",
25
+ className: i(r.title, a),
26
+ ...t
27
+ }
28
+ );
29
+ }
30
+ function f({
31
+ className: a,
32
+ ...t
33
+ }) {
34
+ return /* @__PURE__ */ e(
35
+ "div",
36
+ {
37
+ "data-slot": "alert-description",
38
+ className: i(r.description, a),
39
+ ...t
40
+ }
41
+ );
42
+ }
43
+ function m({ className: a, ...t }) {
44
+ return /* @__PURE__ */ e(
45
+ "div",
46
+ {
47
+ "data-slot": "alert-action",
48
+ className: i(r.action, a),
49
+ ...t
50
+ }
51
+ );
52
+ }
53
+ export {
54
+ d as Alert,
55
+ m as AlertAction,
56
+ f as AlertDescription,
57
+ u as AlertTitle
58
+ };
@@ -0,0 +1,17 @@
1
+ const t = "dsadv_root_Q8f6a", a = "dsadv_variantDefault_gfq37", s = "dsadv_variantDestructive_NhjJJ", i = "dsadv_title_abGgF", o = "dsadv_description_pXPvw", e = "dsadv_action_WeFR6", n = {
2
+ root: t,
3
+ variantDefault: a,
4
+ variantDestructive: s,
5
+ title: i,
6
+ description: o,
7
+ action: e
8
+ };
9
+ export {
10
+ e as action,
11
+ n as default,
12
+ o as description,
13
+ t as root,
14
+ i as title,
15
+ a as variantDefault,
16
+ s as variantDestructive
17
+ };
@@ -0,0 +1 @@
1
+ export * from "./Alert";
@@ -0,0 +1,29 @@
1
+ import * as React from "react";
2
+ import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
3
+ import { Button } from "../Button";
4
+ declare const sizeClass: {
5
+ readonly default: string;
6
+ readonly sm: string;
7
+ };
8
+ type AlertDialogSize = keyof typeof sizeClass;
9
+ /** Confirmation that must be answered: no close button, outside clicks don't dismiss it. */
10
+ declare function AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props): React.JSX.Element;
11
+ declare function AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props): React.JSX.Element;
12
+ declare function AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props): React.JSX.Element;
13
+ declare function AlertDialogOverlay({ className, ...props }: AlertDialogPrimitive.Backdrop.Props): React.JSX.Element;
14
+ type AlertDialogContentProps = AlertDialogPrimitive.Popup.Props & {
15
+ /** `default`: 448px wide from 640px screens, text left-aligned. `sm`: 320px, centred, buttons side by side. */
16
+ size?: AlertDialogSize;
17
+ };
18
+ declare function AlertDialogContent({ className, size, ...props }: AlertDialogContentProps): React.JSX.Element;
19
+ declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
20
+ declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
21
+ /** Round icon slot above (or beside) the title. */
22
+ declare function AlertDialogMedia({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
23
+ declare function AlertDialogTitle({ className, ...props }: AlertDialogPrimitive.Title.Props): React.JSX.Element;
24
+ declare function AlertDialogDescription({ className, ...props }: AlertDialogPrimitive.Description.Props): React.JSX.Element;
25
+ /** The confirming button. It does not close the dialog by itself: close it in `onClick` (or control `open`). */
26
+ declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
27
+ /** Closes the dialog. Outline button by default. */
28
+ declare function AlertDialogCancel({ className, variant, size, ...props }: AlertDialogPrimitive.Close.Props & Pick<React.ComponentProps<typeof Button>, "variant" | "size">): React.JSX.Element;
29
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertDialogContentProps, type AlertDialogSize, };
@@ -0,0 +1,150 @@
1
+ import { jsx as l, jsxs as d } from "react/jsx-runtime";
2
+ import { AlertDialog as o } from "@base-ui/react/alert-dialog";
3
+ import { cn as r } from "cn";
4
+ import e from "./AlertDialog.module.css.js";
5
+ import { Button as n } from "../Button/Button.js";
6
+ const c = {
7
+ default: e.sizeDefault,
8
+ sm: e.sizeSm
9
+ };
10
+ function N({ ...t }) {
11
+ return /* @__PURE__ */ l(o.Root, { "data-slot": "alert-dialog", ...t });
12
+ }
13
+ function v({ ...t }) {
14
+ return /* @__PURE__ */ l(o.Trigger, { "data-slot": "alert-dialog-trigger", ...t });
15
+ }
16
+ function g({ ...t }) {
17
+ return /* @__PURE__ */ l(o.Portal, { "data-slot": "alert-dialog-portal", ...t });
18
+ }
19
+ function u({
20
+ className: t,
21
+ ...a
22
+ }) {
23
+ return /* @__PURE__ */ l(
24
+ o.Backdrop,
25
+ {
26
+ "data-slot": "alert-dialog-overlay",
27
+ className: r(e.overlay, t),
28
+ ...a
29
+ }
30
+ );
31
+ }
32
+ function y({
33
+ className: t,
34
+ size: a = "default",
35
+ ...i
36
+ }) {
37
+ return /* @__PURE__ */ d(g, { children: [
38
+ /* @__PURE__ */ l(u, {}),
39
+ /* @__PURE__ */ l(
40
+ o.Popup,
41
+ {
42
+ "data-slot": "alert-dialog-content",
43
+ "data-size": a,
44
+ className: r(e.content, c[a], t),
45
+ ...i
46
+ }
47
+ )
48
+ ] });
49
+ }
50
+ function C({
51
+ className: t,
52
+ ...a
53
+ }) {
54
+ return /* @__PURE__ */ l(
55
+ "div",
56
+ {
57
+ "data-slot": "alert-dialog-header",
58
+ className: r(e.header, t),
59
+ ...a
60
+ }
61
+ );
62
+ }
63
+ function T({
64
+ className: t,
65
+ ...a
66
+ }) {
67
+ return /* @__PURE__ */ l(
68
+ "div",
69
+ {
70
+ "data-slot": "alert-dialog-footer",
71
+ className: r(e.footer, t),
72
+ ...a
73
+ }
74
+ );
75
+ }
76
+ function h({
77
+ className: t,
78
+ ...a
79
+ }) {
80
+ return /* @__PURE__ */ l(
81
+ "div",
82
+ {
83
+ "data-slot": "alert-dialog-media",
84
+ className: r(e.media, t),
85
+ ...a
86
+ }
87
+ );
88
+ }
89
+ function x({
90
+ className: t,
91
+ ...a
92
+ }) {
93
+ return /* @__PURE__ */ l(
94
+ o.Title,
95
+ {
96
+ "data-slot": "alert-dialog-title",
97
+ className: r(e.title, t),
98
+ ...a
99
+ }
100
+ );
101
+ }
102
+ function z({
103
+ className: t,
104
+ ...a
105
+ }) {
106
+ return /* @__PURE__ */ l(
107
+ o.Description,
108
+ {
109
+ "data-slot": "alert-dialog-description",
110
+ className: r(e.description, t),
111
+ ...a
112
+ }
113
+ );
114
+ }
115
+ function P({
116
+ className: t,
117
+ ...a
118
+ }) {
119
+ return /* @__PURE__ */ l(n, { "data-slot": "alert-dialog-action", className: t, ...a });
120
+ }
121
+ function j({
122
+ className: t,
123
+ variant: a = "outline",
124
+ size: i = "default",
125
+ ...s
126
+ }) {
127
+ return /* @__PURE__ */ l(
128
+ o.Close,
129
+ {
130
+ "data-slot": "alert-dialog-cancel",
131
+ className: t,
132
+ render: /* @__PURE__ */ l(n, { variant: a, size: i }),
133
+ ...s
134
+ }
135
+ );
136
+ }
137
+ export {
138
+ N as AlertDialog,
139
+ P as AlertDialogAction,
140
+ j as AlertDialogCancel,
141
+ y as AlertDialogContent,
142
+ z as AlertDialogDescription,
143
+ T as AlertDialogFooter,
144
+ C as AlertDialogHeader,
145
+ h as AlertDialogMedia,
146
+ u as AlertDialogOverlay,
147
+ g as AlertDialogPortal,
148
+ x as AlertDialogTitle,
149
+ v as AlertDialogTrigger
150
+ };
@@ -0,0 +1,23 @@
1
+ const e = "dsadv_overlay_V1oOm", t = "dsadv_content_EH1kd", s = "dsadv_sizeDefault_ziXp6", d = "dsadv_header_eZyGU", o = "dsadv_media_GINSQ", a = "dsadv_title_YKoAU", n = "dsadv_description_3TInK", i = "dsadv_footer_pzm-5", _ = "dsadv_sizeSm_k5ILc", c = {
2
+ overlay: e,
3
+ content: t,
4
+ sizeDefault: s,
5
+ header: d,
6
+ media: o,
7
+ title: a,
8
+ description: n,
9
+ footer: i,
10
+ sizeSm: _
11
+ };
12
+ export {
13
+ t as content,
14
+ c as default,
15
+ n as description,
16
+ i as footer,
17
+ d as header,
18
+ o as media,
19
+ e as overlay,
20
+ s as sizeDefault,
21
+ _ as sizeSm,
22
+ a as title
23
+ };
@@ -0,0 +1 @@
1
+ export * from "./AlertDialog";
@@ -0,0 +1,23 @@
1
+ import * as React from "react";
2
+ import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar";
3
+ declare const sizeClass: {
4
+ readonly sm: string;
5
+ readonly default: string;
6
+ readonly lg: string;
7
+ };
8
+ type AvatarSize = keyof typeof sizeClass;
9
+ type AvatarProps = AvatarPrimitive.Root.Props & {
10
+ /** `sm` 24px, `default` 32px, `lg` 40px. */
11
+ size?: AvatarSize;
12
+ };
13
+ /** Round profile picture. Shows `AvatarFallback` (initials) until the image loads, or if it fails. */
14
+ declare function Avatar({ className, size, ...props }: AvatarProps): React.JSX.Element;
15
+ declare function AvatarImage({ className, ...props }: AvatarPrimitive.Image.Props): React.JSX.Element;
16
+ declare function AvatarFallback({ className, ...props }: AvatarPrimitive.Fallback.Props): React.JSX.Element;
17
+ /** Small dot in the bottom-right corner, e.g. a status. */
18
+ declare function AvatarBadge({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
19
+ /** Overlapping row of avatars. */
20
+ declare function AvatarGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
21
+ /** "+3" circle at the end of an `AvatarGroup`. */
22
+ declare function AvatarGroupCount({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
23
+ export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, type AvatarProps, type AvatarSize, };