@uselets/ui 0.6.1 → 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 (113) hide show
  1. package/README.md +70 -18
  2. package/dist/components/alert-dialog.d.ts +5 -3
  3. package/dist/components/alert-dialog.js +1 -1
  4. package/dist/components/alert-dialog.js.map +1 -1
  5. package/dist/components/anchor.js +1 -1
  6. package/dist/components/anchor.js.map +1 -1
  7. package/dist/components/avatar.d.ts +1 -1
  8. package/dist/components/avatar.js +1 -1
  9. package/dist/components/avatar.js.map +1 -1
  10. package/dist/components/badge.js +1 -1
  11. package/dist/components/badge.js.map +1 -1
  12. package/dist/components/button.d.ts +7 -3
  13. package/dist/components/button.js +1 -1
  14. package/dist/components/button.js.map +1 -1
  15. package/dist/components/calendar.js +1 -1
  16. package/dist/components/calendar.js.map +1 -1
  17. package/dist/components/card.d.ts +1 -1
  18. package/dist/components/card.js +1 -1
  19. package/dist/components/card.js.map +1 -1
  20. package/dist/components/checkbox.d.ts +14 -2
  21. package/dist/components/checkbox.js +1 -1
  22. package/dist/components/checkbox.js.map +1 -1
  23. package/dist/components/combobox.d.ts +8 -1
  24. package/dist/components/combobox.js +1 -1
  25. package/dist/components/combobox.js.map +1 -1
  26. package/dist/components/date-range-picker.d.ts +120 -0
  27. package/dist/components/date-range-picker.js +2 -0
  28. package/dist/components/date-range-picker.js.map +1 -0
  29. package/dist/components/grid.d.ts +37 -0
  30. package/dist/components/grid.js +2 -0
  31. package/dist/components/grid.js.map +1 -0
  32. package/dist/components/group.d.ts +2 -2
  33. package/dist/components/group.js +1 -1
  34. package/dist/components/group.js.map +1 -1
  35. package/dist/components/heading.js +1 -1
  36. package/dist/components/heading.js.map +1 -1
  37. package/dist/components/label.js +1 -1
  38. package/dist/components/label.js.map +1 -1
  39. package/dist/components/list.js +1 -1
  40. package/dist/components/list.js.map +1 -1
  41. package/dist/components/native-select.d.ts +1 -1
  42. package/dist/components/native-select.js +1 -1
  43. package/dist/components/native-select.js.map +1 -1
  44. package/dist/components/pagination.js +1 -1
  45. package/dist/components/pagination.js.map +1 -1
  46. package/dist/components/radio-group.d.ts +23 -2
  47. package/dist/components/radio-group.js +1 -1
  48. package/dist/components/radio-group.js.map +1 -1
  49. package/dist/components/select.d.ts +1 -1
  50. package/dist/components/select.js +1 -1
  51. package/dist/components/select.js.map +1 -1
  52. package/dist/components/sidebar.d.ts +1 -1
  53. package/dist/components/sidebar.js +1 -1
  54. package/dist/components/sidebar.js.map +1 -1
  55. package/dist/components/simple-grid.d.ts +24 -0
  56. package/dist/components/simple-grid.js +2 -0
  57. package/dist/components/simple-grid.js.map +1 -0
  58. package/dist/components/spinner.d.ts +1 -1
  59. package/dist/components/spinner.js +1 -1
  60. package/dist/components/spinner.js.map +1 -1
  61. package/dist/components/stack.d.ts +2 -2
  62. package/dist/components/stack.js +1 -1
  63. package/dist/components/stack.js.map +1 -1
  64. package/dist/components/switch.d.ts +11 -1
  65. package/dist/components/switch.js +1 -1
  66. package/dist/components/switch.js.map +1 -1
  67. package/dist/components/tabs.d.ts +5 -2
  68. package/dist/components/tabs.js +1 -1
  69. package/dist/components/tabs.js.map +1 -1
  70. package/dist/components/text.js +1 -1
  71. package/dist/components/text.js.map +1 -1
  72. package/dist/components/toggle-group.d.ts +2 -0
  73. package/dist/components/toggle-group.js +1 -1
  74. package/dist/components/toggle-group.js.map +1 -1
  75. package/dist/components/toggle.d.ts +4 -2
  76. package/dist/components/toggle.js +1 -1
  77. package/dist/components/toggle.js.map +1 -1
  78. package/dist/components/visibility.d.ts +25 -0
  79. package/dist/components/visibility.js +2 -0
  80. package/dist/components/visibility.js.map +1 -0
  81. package/dist/hooks/use-breakpoint-value.d.ts +9 -0
  82. package/dist/hooks/use-breakpoint-value.js +2 -0
  83. package/dist/hooks/use-breakpoint-value.js.map +1 -0
  84. package/dist/hooks/use-breakpoint-value.spec.d.ts +1 -0
  85. package/dist/hooks/use-breakpoint-value.spec.js +15 -0
  86. package/dist/hooks/use-breakpoint-value.spec.js.map +1 -0
  87. package/dist/hooks/use-breakpoint.d.ts +9 -0
  88. package/dist/hooks/use-breakpoint.js +2 -0
  89. package/dist/hooks/use-breakpoint.js.map +1 -0
  90. package/dist/hooks/use-breakpoint.spec.d.ts +1 -0
  91. package/dist/hooks/use-breakpoint.spec.js +2 -0
  92. package/dist/hooks/use-breakpoint.spec.js.map +1 -0
  93. package/dist/index.d.ts +10 -4
  94. package/dist/index.js +1 -1
  95. package/dist/lib/button.d.ts +12 -8
  96. package/dist/lib/button.js +1 -1
  97. package/dist/lib/button.js.map +1 -1
  98. package/dist/lib/color.d.ts +20 -0
  99. package/dist/lib/color.js +2 -0
  100. package/dist/lib/color.js.map +1 -0
  101. package/dist/skills/uselets-ui/SKILL.md +1 -0
  102. package/dist/skills/uselets-ui/references/component-catalog.md +34 -4
  103. package/dist/skills/uselets-ui/references/package-guide.md +44 -9
  104. package/dist/styles.css +1 -1
  105. package/dist/themes/gomax.css +1 -1
  106. package/dist/themes/max.css +1 -1
  107. package/package.json +1 -1
  108. package/skills/uselets-ui/SKILL.md +1 -0
  109. package/skills/uselets-ui/references/component-catalog.md +34 -4
  110. package/skills/uselets-ui/references/package-guide.md +44 -9
  111. package/dist/components/sheet.d.ts +0 -61
  112. package/dist/components/sheet.js +0 -2
  113. package/dist/components/sheet.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uselets/ui",
3
- "version": "0.6.1",
3
+ "version": "1.0.0",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "description": "React component library for the LET'S design system.",
@@ -48,6 +48,7 @@ To set up a consumer project after installing `@uselets/ui`, run `bun uselets in
48
48
  - Use module subpaths when you want a single module or when the user asks for the exact import path.
49
49
  - Use `@uselets/ui/hooks/<hook-module>` for dedicated hook subpaths, not legacy `@uselets/ui/use-*` paths.
50
50
  - Recommend importing one theme stylesheet once in the app entrypoint: `@uselets/ui/themes/max.css` for Max apps or `@uselets/ui/themes/gomax.css` for Gomax apps.
51
+ - Treat `@uselets/ui/themes/gomax.css` as the GoMax Figma-backed palette, exposed through the same public color families as the Max theme.
51
52
  - Treat `@uselets/ui/styles.css` as a legacy compatibility alias for the Max theme.
52
53
  - Recommend `@fontsource-variable/inter` when matching the package typography setup.
53
54
  - Recommend `@uselets/ui/postcss.config` when the app needs the package PostCSS preset for Tailwind v4.
@@ -26,6 +26,14 @@ Unless noted otherwise, each module also exports its public `*Props` types from
26
26
  - `use-mobile`
27
27
  - Import path: `@uselets/ui/hooks/use-mobile`
28
28
  - Exports: `useIsMobile`
29
+ - `use-breakpoint`
30
+ - Import path: `@uselets/ui/hooks/use-breakpoint`
31
+ - Exports: `useBreakpoint`, `Breakpoint`, `breakpointValues`
32
+ - Notes: returns whether the current viewport is at or above a Tailwind default breakpoint (`base`, `sm`, `md`, `lg`, `xl`, `2xl`)
33
+ - `use-breakpoint-value`
34
+ - Import path: `@uselets/ui/hooks/use-breakpoint-value`
35
+ - Exports: `useBreakpointValue`, `ResponsiveValueMap`
36
+ - Notes: accepts a breakpoint value map such as `{ base: 1, md: 2 }` and returns the largest active value
29
37
  - `use-disclosure`
30
38
  - Import path: `@uselets/ui/hooks/use-disclosure`
31
39
  - Exports: `useDisclosure`
@@ -45,6 +53,10 @@ Unless noted otherwise, each module also exports its public `*Props` types from
45
53
  - `utils`
46
54
  - Import path: `@uselets/ui/utils`
47
55
  - Exports: `cn`, `randomId`
56
+ - `color`
57
+ - Import path: `@uselets/ui/lib/color`
58
+ - Exports: `uiColors`, `UIColor`, `selectionControlColorVariants`
59
+ - Notes: canonical public color list used by `Button`, `Toggle`, `Checkbox`, `RadioGroupItem`, and `Switch`; `ButtonColor` is a compatibility alias for `UIColor`; `selectionControlColorVariants` is an internal styling map for checked selection controls
48
60
  - `sonner`
49
61
  - Import path: `@uselets/ui/sonner`
50
62
  - Exports: `Toaster`, `toast`
@@ -82,7 +94,7 @@ Unless noted otherwise, each module also exports its public `*Props` types from
82
94
  - Exports: `Badge`, `badgeVariants`
83
95
  - `button`
84
96
  - Exports: `Button`, `buttonVariants`
85
- - Notes: action button with `solid`, `outline`, `subtle`, `ghost`, `destructive`, and `link` variants, theme color families (`brand` default), and icon sizes
97
+ - Notes: action button with `solid`, `outline`, `subtle`, `ghost`, and `link` variants, `color: UIColor` (`primary` default), sizes from `xs` through `xl` plus icon sizes through `icon-xl`, and `loading`
86
98
  - `button-group`
87
99
  - Exports: `ButtonGroup`, `ButtonGroupSeparator`, `ButtonGroupText`, `buttonGroupVariants`
88
100
  - `empty`
@@ -99,6 +111,15 @@ Unless noted otherwise, each module also exports its public `*Props` types from
99
111
  - `field`
100
112
  - Exports: `Field`, `FieldContent`, `FieldDescription`, `FieldError`, `FieldGroup`, `FieldLabel`, `FieldLegend`, `FieldSeparator`, `FieldSet`, `FieldTitle`
101
113
  - Notes: form layout and validation helpers
114
+ - `grid`
115
+ - Exports: `Grid`, `GridItem`
116
+ - Notes: 12-column CSS grid by default. `Grid` supports spacing props plus direct `templateRows` and `templateColumns`; `GridItem` defaults to `colSpan={12}` and supports numeric `colSpan` and `rowSpan`. Use `useBreakpointValue` when these values need to change by breakpoint.
117
+ - `simple-grid`
118
+ - Exports: `SimpleGrid`
119
+ - Notes: simple grid with `cols`, `gap`, `rowGap`, and `columnGap`. `cols` accepts a number; spacing uses the `xs` to `xl` scale. Use `useBreakpointValue` when column count needs responsive values.
120
+ - `visibility`
121
+ - Exports: `HiddenFrom`, `VisibleFrom`
122
+ - Notes: breakpoint visibility wrappers. `HiddenFrom breakpoint="md"` hides at `md` and above; `VisibleFrom breakpoint="md"` shows at `md` and above.
102
123
  - `input`
103
124
  - Exports: `Input`
104
125
  - `textarea`
@@ -110,28 +131,36 @@ Unless noted otherwise, each module also exports its public `*Props` types from
110
131
  - Exports: `InputOTP`, `InputOTPGroup`, `InputOTPSeparator`, `InputOTPSlot`, `REGEXP_ONLY_CHARS`, `REGEXP_ONLY_DIGITS`, `REGEXP_ONLY_DIGITS_AND_CHARS`
111
132
  - `checkbox`
112
133
  - Exports: `Checkbox`
134
+ - Notes: supports `size: 'sm' | 'md' | 'lg'`, `color: UIColor` (default `primary`), `label?: React.ReactNode`, `labelProps`, and automatic `id`/`htmlFor` wiring when a label is provided without an explicit `id`; composed label text follows checkbox size (`sm` 12px, `md` 14px, `lg` 20px)
113
135
  - `switch`
114
136
  - Exports: `Switch`
137
+ - Notes: supports `size: 'sm' | 'md' | 'lg'`, `color: UIColor` (default `green`), `label?: React.ReactNode`, `labelProps`, and automatic `id`/`htmlFor` wiring when a label is provided without an explicit `id`; `color` controls the checked track and indicator color only; track size is `sm` 34x16px, `md` 42x20px, and `lg` 48x22px; the thumb and internal indicator scale with the switch; composed label text follows switch size (`sm` 12px, `md` 14px, `lg` 20px)
115
138
  - `radio-group`
116
139
  - Exports: `RadioGroup`, `RadioGroupItem`
140
+ - Notes: `RadioGroup` supports `color: UIColor` (default `primary`) for the group; `RadioGroupItem` supports `size: 'sm' | 'md' | 'lg'`, optional `color: UIColor` item overrides, `label?: React.ReactNode`, `labelProps`, and automatic `id`/`htmlFor` wiring when a label is provided without an explicit `id`; composed label text follows item size (`sm` 12px, `md` 14px, `lg` 20px)
117
141
  - `select`
118
142
  - Exports: `Select`, `SelectContent`, `SelectGroup`, `SelectItem`, `SelectLabel`, `SelectScrollDownButton`, `SelectScrollUpButton`, `SelectSeparator`, `SelectTrigger`, `SelectValue`
119
143
  - `native-select`
120
144
  - Exports: `NativeSelect`, `NativeSelectOptGroup`, `NativeSelectOption`
121
145
  - `combobox`
122
146
  - Exports: `Combobox`, `ComboboxInput`, `ComboboxContent`, `ComboboxList`, `ComboboxItem`, `ComboboxGroup`, `ComboboxLabel`, `ComboboxCollection`, `ComboboxClear`, `ComboboxEmpty`, `ComboboxSeparator`, `ComboboxChips`, `ComboboxChip`, `ComboboxChipsInput`, `ComboboxTrigger`, `ComboboxValue`, `useComboboxAnchor`
147
+ - Notes: `ComboboxInput` supports `icon?: React.ReactNode`, `triggerIcon?: React.ReactNode`, `showTrigger?: boolean`, and `showClear?: boolean`; the trigger icon defaults to `IconSelector`
123
148
  - `dropzone`
124
149
  - Exports: `Dropzone`, `DropzoneArea`, `DropzoneDescription`, `DropzoneFileList`, `DropzoneFileListItem`, `DropzoneFileMessage`, `DropzoneMessage`, `DropzoneRemoveFile`, `DropzoneRetryFile`, `DropzoneTrigger`, `InfiniteProgress`, `useDropzone`
125
150
  - Notes: upload composition with validation, retry handling, status list UI, and optional `shiftOnMaxFiles`
126
151
  - `calendar`
127
152
  - Exports: `Calendar`, `CalendarDayButton`
128
- - Notes: also exports the `DateRange` type
153
+ - Notes: also exports the `DateRange` type; weekends render with destructive text, week numbers are low-emphasis, and selected single/range endpoints use the `primary` palette with a subtle primary range fill
154
+ - `date-range-picker`
155
+ - Exports: `DateRangePicker`, `DateRangePickerTrigger`, `DateRangePickerValue`, `DateRangePickerContent`, `DateRangePickerPresets`, `DateRangePickerPreset`, `DateRangePickerCalendar`, `DateRangePickerDateFields`, `DateRangePickerActions`, `DateRangePickerApply`, `DateRangePickerReset`
156
+ - Notes: compound popover picker using `Calendar` range mode with two months; draft changes from fixed presets, relative-day inputs, date inputs, and calendar stay synchronized until apply; reset and applied clear emit `null` through `onValueChange`; preset buttons show selected state when the draft range matches by calendar day
129
157
  - `slider`
130
158
  - Exports: `Slider`
131
159
  - `label`
132
160
  - Exports: `Label`
133
161
  - `toggle`
134
162
  - Exports: `Toggle`, `toggleVariants`
163
+ - Notes: supports `color: UIColor` using the same color variants as `Button`
135
164
  - `toggle-group`
136
165
  - Exports: `ToggleGroup`, `ToggleGroupItem`
137
166
 
@@ -141,8 +170,6 @@ Unless noted otherwise, each module also exports its public `*Props` types from
141
170
  - Exports: `Dialog`, `DialogClose`, `DialogContent`, `DialogDescription`, `DialogFooter`, `DialogHeader`, `DialogOverlay`, `DialogPortal`, `DialogTitle`, `DialogTrigger`
142
171
  - `drawer`
143
172
  - Exports: `Drawer`, `DrawerClose`, `DrawerContent`, `DrawerDescription`, `DrawerFooter`, `DrawerHeader`, `DrawerOverlay`, `DrawerPortal`, `DrawerTitle`, `DrawerTrigger`
144
- - `sheet`
145
- - Exports: `Sheet`, `SheetPortal`, `SheetTrigger`, `SheetClose`, `SheetOverlay`, `SheetContent`, `SheetHeader`, `SheetFooter`, `SheetTitle`, `SheetDescription`
146
173
  - `popover`
147
174
  - Exports: `Popover`, `PopoverAnchor`, `PopoverContent`, `PopoverDescription`, `PopoverHeader`, `PopoverTitle`, `PopoverTrigger`
148
175
  - `hover-card`
@@ -164,6 +191,7 @@ Unless noted otherwise, each module also exports its public `*Props` types from
164
191
  - Exports: `Sidebar`, `SidebarContent`, `SidebarFooter`, `SidebarGroup`, `SidebarGroupAction`, `SidebarGroupContent`, `SidebarGroupLabel`, `SidebarHeader`, `SidebarInput`, `SidebarInset`, `SidebarMenu`, `SidebarMenuAction`, `SidebarMenuBadge`, `SidebarMenuButton`, `SidebarMenuItem`, `SidebarMenuSkeleton`, `SidebarMenuSub`, `SidebarMenuSubButton`, `SidebarMenuSubItem`, `SidebarProvider`, `SidebarRail`, `SidebarSeparator`, `SidebarTrigger`, `useSidebar`
165
192
  - `tabs`
166
193
  - Exports: `Tabs`, `TabsContent`, `TabsList`, `tabsListVariants`, `TabsTrigger`
194
+ - Notes: `TabsList.variant` supports `line` and `enclosed`, defaults to `line`, accepts `grow?: boolean` for equal-width horizontal tabs, and uses the `primary` color for the active line indicator
167
195
 
168
196
  ## Layout and display
169
197
 
@@ -185,6 +213,7 @@ Unless noted otherwise, each module also exports its public `*Props` types from
185
213
  - Exports: `Container`, `containerVariants`
186
214
  - `group`
187
215
  - Exports: `Group`, `groupVariants`
216
+ - Notes: supports `gap: 'xs' | 'sm' | 'md' | 'lg' | 'xl'` and `wrap`
188
217
  - `kbd`
189
218
  - Exports: `Kbd`, `KbdGroup`
190
219
  - `resizable`
@@ -195,6 +224,7 @@ Unless noted otherwise, each module also exports its public `*Props` types from
195
224
  - Exports: `Separator`
196
225
  - `stack`
197
226
  - Exports: `Stack`, `stackVariants`
227
+ - Notes: supports `gap: 'xs' | 'sm' | 'md' | 'lg' | 'xl'`
198
228
  - `table`
199
229
  - Exports: `Table`, `TableHeader`, `TableBody`, `TableFooter`, `TableHead`, `TableRow`, `TableCell`, `TableCaption`
200
230
  - `timeline`
@@ -88,12 +88,14 @@ Use `bun uselets skill --agent codex` or `bun uselets skill --agent claude` to i
88
88
  - subpath import for dedicated hooks such as `use-mobile`, `use-disclosure`, or `use-local-storage`
89
89
  - `@uselets/ui/utils`
90
90
  - utility helpers such as `cn` and `randomId`
91
+ - `@uselets/ui/lib/color`
92
+ - shared UI color list and type: `uiColors`, `UIColor`
91
93
  - `@uselets/ui/styles.css`
92
94
  - legacy compatibility stylesheet equivalent to the Max theme
93
95
  - `@uselets/ui/themes/max.css`
94
96
  - Max theme tokens and component styles
95
97
  - `@uselets/ui/themes/gomax.css`
96
- - Gomax theme tokens and component styles
98
+ - GoMax theme tokens and component styles backed by the GoMax Figma palette
97
99
  - `@uselets/ui/postcss.config`
98
100
  - reusable PostCSS preset for Tailwind v4 setups
99
101
 
@@ -106,7 +108,7 @@ import '@uselets/ui/themes/max.css'
106
108
  import '@fontsource-variable/inter'
107
109
  ```
108
110
 
109
- For Gomax apps, import `@uselets/ui/themes/gomax.css` instead. The legacy `@uselets/ui/styles.css` entrypoint remains available as a Max-theme alias.
111
+ For GoMax apps, import `@uselets/ui/themes/gomax.css` instead. The legacy `@uselets/ui/styles.css` entrypoint remains available as a Max-theme alias.
110
112
 
111
113
  If the app needs Tailwind v4 PostCSS setup, reuse the package preset:
112
114
 
@@ -120,12 +122,31 @@ Make sure Tailwind itself is imported in the app stylesheet:
120
122
  @import 'tailwindcss';
121
123
  ```
122
124
 
125
+ ## Typography scale
126
+
127
+ The Max theme uses Inter as `font-sans` and overrides Tailwind CSS text size utilities from `text-xs` through
128
+ `text-6xl`. Each size includes a default line height equal to `font-size * 1.5`.
129
+
130
+ | Utility | Font size | Line height |
131
+ | --- | --- | --- |
132
+ | `text-xs` | `0.75rem` / `12px` | `1.125rem` / `18px` |
133
+ | `text-sm` | `0.875rem` / `14px` | `1.3125rem` / `21px` |
134
+ | `text-base` | `1rem` / `16px` | `1.5rem` / `24px` |
135
+ | `text-lg` | `1.125rem` / `18px` | `1.6875rem` / `27px` |
136
+ | `text-xl` | `1.25rem` / `20px` | `1.875rem` / `30px` |
137
+ | `text-2xl` | `1.5rem` / `24px` | `2.25rem` / `36px` |
138
+ | `text-3xl` | `1.875rem` / `30px` | `2.8125rem` / `45px` |
139
+ | `text-4xl` | `2.25rem` / `36px` | `3.375rem` / `54px` |
140
+ | `text-5xl` | `3rem` / `48px` | `4.5rem` / `72px` |
141
+ | `text-6xl` | `3.75rem` / `60px` | `5.625rem` / `90px` |
142
+
123
143
  ## Import patterns
124
144
 
125
145
  Use these patterns:
126
146
 
127
147
  ```tsx
128
148
  import { Alert, Button, cn, randomId } from '@uselets/ui'
149
+ import type { UIColor } from '@uselets/ui'
129
150
  import { Dialog } from '@uselets/ui/dialog'
130
151
  import { useIsMobile } from '@uselets/ui/hooks/use-mobile'
131
152
  import { useDisclosure } from '@uselets/ui/hooks/use-disclosure'
@@ -140,7 +161,7 @@ Guidance:
140
161
  - Use `@uselets/ui/hooks/<hook-module>` for dedicated hook subpaths.
141
162
  - Do not invent undocumented subpaths.
142
163
 
143
- Public hook subpaths currently include `hooks/use-mobile`, `hooks/use-disclosure`, `hooks/use-interval`, `hooks/use-idle`, `hooks/use-document-visibility`, and `hooks/use-local-storage`. Legacy `@uselets/ui/use-*` paths are not public entrypoints. Utility helpers are available from `@uselets/ui/utils`.
164
+ Public hook subpaths currently include `hooks/use-mobile`, `hooks/use-disclosure`, `hooks/use-interval`, `hooks/use-idle`, `hooks/use-document-visibility`, and `hooks/use-local-storage`. Legacy `@uselets/ui/use-*` paths are not public entrypoints. Utility helpers are available from `@uselets/ui/utils`, and shared UI color helpers are available from the root barrel or `@uselets/ui/lib/color`.
144
165
 
145
166
  `useLocalStorage` uses an options object and returns a tuple like `useState`:
146
167
 
@@ -208,18 +229,23 @@ export function AppRoot({ children }: { children: React.ReactNode }) {
208
229
 
209
230
  The package stylesheet exposes these palette families:
210
231
 
232
+ - `primary`
211
233
  - `brand`
234
+ - `gray`
212
235
  - `zinc`
213
236
  - `red`
237
+ - `yellow`
214
238
  - `blue`
215
239
  - `indigo`
216
240
  - `pink`
217
241
  - `green`
218
242
 
243
+ The same palette family names are exported as `uiColors` and `UIColor`. `Button`, `Toggle`, `Checkbox`, `RadioGroupItem`, and `Switch` use `UIColor` for color props. `ButtonColor` remains available as a compatibility alias, but new public APIs should use `UIColor`.
244
+
219
245
  Each palette family is exposed as:
220
246
 
221
- - CSS variables such as `--brand-500`
222
- - Tailwind v4 utilities such as `bg-brand-500`, `text-zinc-900`, `border-red-300`
247
+ - CSS variables such as `--primary-500`, `--brand-500`, and `--zinc-900`
248
+ - Tailwind v4 utilities such as `bg-primary-500`, `text-zinc-900`, `border-red-300`
223
249
 
224
250
  Primary semantic tokens:
225
251
 
@@ -234,9 +260,18 @@ Additional tokens:
234
260
  - `--destructive-foreground`
235
261
  - `text-destructive-foreground`
236
262
  - `--gradient-primary`
237
- - `--gradient-secondary`
238
263
 
239
- The `Button` component can apply those palette families directly through `color: 'brand' | 'zinc' | 'red' | 'blue' | 'indigo' | 'pink' | 'green'`, with `brand` as the default. Its public variants are `solid`, `outline`, `subtle`, `ghost`, `destructive`, and `link`, with `solid` as the default.
264
+ The `Button` component can apply those palette families directly through `color: UIColor`, with `primary` as the default. Its public variants are `solid`, `outline`, `subtle`, `ghost`, and `link`, with `solid` as the default. Its public sizes are `xs`, `sm`, `md`, `lg`, `xl`, `icon-xs`, `icon-sm`, `icon`, `icon-lg`, and `icon-xl`; `loading` shows a centered spinner, keeps native button content invisible to preserve size, and disables the button without dimming it.
265
+
266
+ The `Checkbox` component can be used as a bare checkbox or with `label?: React.ReactNode`. It supports `size: 'sm' | 'md' | 'lg'` and `color: UIColor`, with `primary` as the default color. When `label` is provided, it composes the package `Label`, accepts `labelProps` for that label, and generates an accessible `id`/`htmlFor` pair when no `id` prop is passed. Composed label text follows checkbox size: `sm` 12px, `md` 14px, and `lg` 20px.
267
+
268
+ The `Switch` component can be used as a bare switch or with `label?: React.ReactNode`. It supports `size: 'sm' | 'md' | 'lg'` and `color: UIColor`, with `green` as the default color. The `color` prop controls only the checked track and indicator color; unchecked remains neutral. Track size is `sm` 34x16px, `md` 42x20px, and `lg` 48x22px. The thumb and its internal indicator scale with the selected size. Composed label text follows switch size: `sm` 12px, `md` 14px, and `lg` 20px.
269
+
270
+ The `TabsList` component supports `variant: 'line' | 'enclosed'`, with `line` as the default, and `grow?: boolean` for equal-width horizontal tabs. The `line` variant keeps a neutral border line across tabs and uses the `primary` color for the active indicator; use `enclosed` for the filled container treatment.
271
+
272
+ The `RadioGroup` component supports `color: UIColor`, with `primary` as the default group color. `RadioGroupItem` can be used as a bare radio item inside `RadioGroup` or with `label?: React.ReactNode`; it supports `size: 'sm' | 'md' | 'lg'` and optional `color: UIColor` item overrides. Composed label text follows item size: `sm` 12px, `md` 14px, and `lg` 20px.
273
+
274
+ The `DateRangePicker` component is a compound popover date range picker built on `Calendar` range mode. Use `DateRange | null` for controlled values; applying an empty draft or resetting emits `null` through `onValueChange`. Fixed presets, relative-day inputs, date inputs, and the calendar all edit the same draft, and `DateRangePickerPreset` displays a selected state when its range matches the current draft by calendar day.
240
275
 
241
276
  ## Component selection
242
277
 
@@ -245,9 +280,9 @@ Choose components by intent:
245
280
  - actions and status:
246
281
  - `Button`, `Badge`, `Alert`, `Progress`, `Skeleton`, `Spinner`, `toast`
247
282
  - forms and inputs:
248
- - `Field`, `Input`, `Textarea`, `Checkbox`, `Switch`, `RadioGroup`, `Select`, `NativeSelect`, `Combobox`, `Dropzone`, `InputGroup`, `InputOTP`, `Slider`
283
+ - `Field`, `Input`, `Textarea`, `Checkbox`, `Switch`, `RadioGroup`, `Select`, `NativeSelect`, `Combobox`, `Dropzone`, `InputGroup`, `InputOTP`, `Slider`, `DateRangePicker`
249
284
  - overlays and floating UI:
250
- - `Dialog`, `Drawer`, `Sheet`, `Popover`, `Tooltip`, `HoverCard`, `AlertDialog`
285
+ - `Dialog`, `Drawer`, `Popover`, `Tooltip`, `HoverCard`, `AlertDialog`
251
286
  - navigation:
252
287
  - `Breadcrumb`, `NavigationMenu`, `Pagination`, `Sidebar`, `Tabs`, `DropdownMenu`, `Command`
253
288
  - typography:
@@ -1,61 +0,0 @@
1
- import { n as __name } from "../chunk-CHh1Zzun.js";
2
- import { Dialog } from "radix-ui";
3
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
4
- import * as React from "react";
5
-
6
- //#region src/components/sheet.d.ts
7
- type SheetProps = React.ComponentProps<typeof Dialog.Root>;
8
- type SheetTriggerProps = React.ComponentProps<typeof Dialog.Trigger>;
9
- type SheetCloseProps = React.ComponentProps<typeof Dialog.Close>;
10
- type SheetPortalProps = React.ComponentProps<typeof Dialog.Portal>;
11
- type SheetOverlayProps = React.ComponentProps<typeof Dialog.Overlay>;
12
- type SheetContentProps = React.ComponentProps<typeof Dialog.Content> & {
13
- side?: 'top' | 'right' | 'bottom' | 'left';
14
- showCloseButton?: boolean;
15
- };
16
- type SheetHeaderProps = React.ComponentProps<'div'>;
17
- type SheetFooterProps = React.ComponentProps<'div'>;
18
- type SheetTitleProps = React.ComponentProps<typeof Dialog.Title>;
19
- type SheetDescriptionProps = React.ComponentProps<typeof Dialog.Description>;
20
- declare function Sheet({
21
- ...props
22
- }: SheetProps): _$react_jsx_runtime0.JSX.Element;
23
- declare function SheetTrigger({
24
- ...props
25
- }: SheetTriggerProps): _$react_jsx_runtime0.JSX.Element;
26
- declare function SheetClose({
27
- ...props
28
- }: SheetCloseProps): _$react_jsx_runtime0.JSX.Element;
29
- declare function SheetPortal({
30
- ...props
31
- }: SheetPortalProps): _$react_jsx_runtime0.JSX.Element;
32
- declare function SheetOverlay({
33
- className,
34
- ...props
35
- }: SheetOverlayProps): _$react_jsx_runtime0.JSX.Element;
36
- declare function SheetContent({
37
- className,
38
- children,
39
- side,
40
- showCloseButton,
41
- ...props
42
- }: SheetContentProps): _$react_jsx_runtime0.JSX.Element;
43
- declare function SheetHeader({
44
- className,
45
- ...props
46
- }: SheetHeaderProps): _$react_jsx_runtime0.JSX.Element;
47
- declare function SheetFooter({
48
- className,
49
- ...props
50
- }: SheetFooterProps): _$react_jsx_runtime0.JSX.Element;
51
- declare function SheetTitle({
52
- className,
53
- ...props
54
- }: SheetTitleProps): _$react_jsx_runtime0.JSX.Element;
55
- declare function SheetDescription({
56
- className,
57
- ...props
58
- }: SheetDescriptionProps): _$react_jsx_runtime0.JSX.Element;
59
- //#endregion
60
- export { Sheet, SheetClose, SheetCloseProps, SheetContent, SheetContentProps, SheetDescription, SheetDescriptionProps, SheetFooter, SheetFooterProps, SheetHeader, SheetHeaderProps, SheetOverlay, SheetOverlayProps, SheetPortal, SheetPortalProps, SheetProps, SheetTitle, SheetTitleProps, SheetTrigger, SheetTriggerProps };
61
- //# sourceMappingURL=sheet.d.ts.map
@@ -1,2 +0,0 @@
1
- import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{IconX as n}from"@tabler/icons-react";import{Dialog as r}from"radix-ui";import{jsx as i,jsxs as a}from"react/jsx-runtime";function Sheet({...e}){return i(r.Root,{"data-slot":`sheet`,...e})}function SheetTrigger({...e}){return i(r.Trigger,{"data-slot":`sheet-trigger`,...e})}function SheetClose({...e}){return i(r.Close,{"data-slot":`sheet-close`,...e})}function SheetPortal({...e}){return i(r.Portal,{"data-slot":`sheet-portal`,...e})}function SheetOverlay({className:t,...n}){return i(r.Overlay,{"data-slot":`sheet-overlay`,className:e(`fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,t),...n})}function SheetContent({className:o,children:s,side:c=`right`,showCloseButton:l=!0,...u}){return a(SheetPortal,{children:[i(SheetOverlay,{}),a(r.Content,{"data-slot":`sheet-content`,"data-side":c,className:e(`fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10`,o),...u,children:[s,l&&i(r.Close,{"data-slot":`sheet-close`,asChild:!0,children:a(t,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`,children:[i(n,{}),i(`span`,{className:`sr-only`,children:`Close`})]})})]})]})}function SheetHeader({className:t,...n}){return i(`div`,{"data-slot":`sheet-header`,className:e(`flex flex-col gap-0.5 p-4`,t),...n})}function SheetFooter({className:t,...n}){return i(`div`,{"data-slot":`sheet-footer`,className:e(`mt-auto flex flex-col gap-2 p-4`,t),...n})}function SheetTitle({className:t,...n}){return i(r.Title,{"data-slot":`sheet-title`,className:e(`text-base font-medium text-foreground`,t),...n})}function SheetDescription({className:t,...n}){return i(r.Description,{"data-slot":`sheet-description`,className:e(`text-sm text-muted-foreground`,t),...n})}export{Sheet,SheetClose,SheetContent,SheetDescription,SheetFooter,SheetHeader,SheetOverlay,SheetPortal,SheetTitle,SheetTrigger};
2
- //# sourceMappingURL=sheet.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sheet.js","names":["SheetPrimitive"],"sources":["../../src/components/sheet.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconX } from '@tabler/icons-react'\nimport { Dialog as SheetPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\n\nexport type SheetProps = React.ComponentProps<typeof SheetPrimitive.Root>\n\nexport type SheetTriggerProps = React.ComponentProps<typeof SheetPrimitive.Trigger>\n\nexport type SheetCloseProps = React.ComponentProps<typeof SheetPrimitive.Close>\n\nexport type SheetPortalProps = React.ComponentProps<typeof SheetPrimitive.Portal>\n\nexport type SheetOverlayProps = React.ComponentProps<typeof SheetPrimitive.Overlay>\n\nexport type SheetContentProps = React.ComponentProps<typeof SheetPrimitive.Content> & {\n side?: 'top' | 'right' | 'bottom' | 'left'\n showCloseButton?: boolean\n}\n\nexport type SheetHeaderProps = React.ComponentProps<'div'>\n\nexport type SheetFooterProps = React.ComponentProps<'div'>\n\nexport type SheetTitleProps = React.ComponentProps<typeof SheetPrimitive.Title>\n\nexport type SheetDescriptionProps = React.ComponentProps<typeof SheetPrimitive.Description>\n\nfunction Sheet({ ...props }: SheetProps) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />\n}\n\nfunction SheetTrigger({ ...props }: SheetTriggerProps) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />\n}\n\nfunction SheetClose({ ...props }: SheetCloseProps) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />\n}\n\nfunction SheetPortal({ ...props }: SheetPortalProps) {\n return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />\n}\n\nfunction SheetOverlay({ className, ...props }: SheetOverlayProps) {\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SheetContent({ className, children, side = 'right', showCloseButton = true, ...props }: SheetContentProps) {\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n data-side={side}\n className={cn(\n 'fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10',\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <SheetPrimitive.Close data-slot=\"sheet-close\" asChild>\n <Button variant=\"ghost\" className=\"absolute top-3 right-3\" size=\"icon-sm\">\n <IconX />\n <span className=\"sr-only\">Close</span>\n </Button>\n </SheetPrimitive.Close>\n )}\n </SheetPrimitive.Content>\n </SheetPortal>\n )\n}\n\nfunction SheetHeader({ className, ...props }: SheetHeaderProps) {\n return <div data-slot=\"sheet-header\" className={cn('flex flex-col gap-0.5 p-4', className)} {...props} />\n}\n\nfunction SheetFooter({ className, ...props }: SheetFooterProps) {\n return <div data-slot=\"sheet-footer\" className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} />\n}\n\nfunction SheetTitle({ className, ...props }: SheetTitleProps) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn('text-base font-medium text-foreground', className)}\n {...props}\n />\n )\n}\n\nfunction SheetDescription({ className, ...props }: SheetDescriptionProps) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n )\n}\n\nexport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetFooter,\n SheetHeader,\n SheetOverlay,\n SheetPortal,\n SheetTitle,\n SheetTrigger\n}\n"],"mappings":"uOA+BA,SAAS,MAAM,CAAE,GAAG,GAAqB,CACvC,OAAO,EAACA,EAAe,KAAhB,CAAqB,YAAU,QAAQ,GAAI,EAAS,CAAA,CAG7D,SAAS,aAAa,CAAE,GAAG,GAA4B,CACrD,OAAO,EAACA,EAAe,QAAhB,CAAwB,YAAU,gBAAgB,GAAI,EAAS,CAAA,CAGxE,SAAS,WAAW,CAAE,GAAG,GAA0B,CACjD,OAAO,EAACA,EAAe,MAAhB,CAAsB,YAAU,cAAc,GAAI,EAAS,CAAA,CAGpE,SAAS,YAAY,CAAE,GAAG,GAA2B,CACnD,OAAO,EAACA,EAAe,OAAhB,CAAuB,YAAU,eAAe,GAAI,EAAS,CAAA,CAGtE,SAAS,aAAa,CAAE,YAAW,GAAG,GAA4B,CAChE,OACE,EAACA,EAAe,QAAhB,CACE,YAAU,gBACV,UAAW,EACT,gLACA,EACD,CACD,GAAI,EACJ,CAAA,CAIN,SAAS,aAAa,CAAE,YAAW,WAAU,OAAO,QAAS,kBAAkB,GAAM,GAAG,GAA4B,CAClH,OACE,EAAC,YAAD,CAAA,SAAA,CACE,EAAC,aAAD,EAAgB,CAAA,CAChB,EAACA,EAAe,QAAhB,CACE,YAAU,gBACV,YAAW,EACX,UAAW,EACT,ymCACA,EACD,CACD,GAAI,WAPN,CASG,EACA,GACC,EAACA,EAAe,MAAhB,CAAsB,YAAU,cAAc,QAAA,YAC5C,EAAC,EAAD,CAAQ,QAAQ,QAAQ,UAAU,yBAAyB,KAAK,mBAAhE,CACE,EAAC,EAAD,EAAS,CAAA,CACT,EAAC,OAAD,CAAM,UAAU,mBAAU,QAAY,CAAA,CAC/B,GACY,CAAA,CAEF,GACb,CAAA,CAAA,CAIlB,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OAAO,EAAC,MAAD,CAAK,YAAU,eAAe,UAAW,EAAG,4BAA6B,EAAU,CAAE,GAAI,EAAS,CAAA,CAG3G,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OAAO,EAAC,MAAD,CAAK,YAAU,eAAe,UAAW,EAAG,kCAAmC,EAAU,CAAE,GAAI,EAAS,CAAA,CAGjH,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAACA,EAAe,MAAhB,CACE,YAAU,cACV,UAAW,EAAG,wCAAyC,EAAU,CACjE,GAAI,EACJ,CAAA,CAIN,SAAS,iBAAiB,CAAE,YAAW,GAAG,GAAgC,CACxE,OACE,EAACA,EAAe,YAAhB,CACE,YAAU,oBACV,UAAW,EAAG,gCAAiC,EAAU,CACzD,GAAI,EACJ,CAAA"}