@uselets/ui 1.1.0 → 1.2.1

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 (84) hide show
  1. package/README.md +15 -6
  2. package/dist/components/badge.d.ts +1 -1
  3. package/dist/components/button-group.d.ts +1 -1
  4. package/dist/components/button.d.ts +1 -1
  5. package/dist/components/center.d.ts +1 -1
  6. package/dist/components/checkbox.js +1 -1
  7. package/dist/components/checkbox.js.map +1 -1
  8. package/dist/components/combobox.d.ts +4 -1
  9. package/dist/components/combobox.js +1 -1
  10. package/dist/components/combobox.js.map +1 -1
  11. package/dist/components/command.d.ts +1 -0
  12. package/dist/components/command.js +1 -1
  13. package/dist/components/command.js.map +1 -1
  14. package/dist/components/dialog.d.ts +6 -12
  15. package/dist/components/dialog.js +1 -1
  16. package/dist/components/dialog.js.map +1 -1
  17. package/dist/components/drawer.d.ts +4 -1
  18. package/dist/components/drawer.js +1 -1
  19. package/dist/components/drawer.js.map +1 -1
  20. package/dist/components/dropdown-menu.js +1 -1
  21. package/dist/components/dropdown-menu.js.map +1 -1
  22. package/dist/components/field.d.ts +4 -2
  23. package/dist/components/field.js +1 -1
  24. package/dist/components/field.js.map +1 -1
  25. package/dist/components/field.spec.d.ts +1 -0
  26. package/dist/components/field.spec.js +2 -0
  27. package/dist/components/field.spec.js.map +1 -0
  28. package/dist/components/input-otp.d.ts +1 -0
  29. package/dist/components/input-otp.js +1 -1
  30. package/dist/components/input-otp.js.map +1 -1
  31. package/dist/components/input.d.ts +1 -0
  32. package/dist/components/input.js +1 -1
  33. package/dist/components/input.js.map +1 -1
  34. package/dist/components/native-select.d.ts +1 -0
  35. package/dist/components/native-select.js +1 -1
  36. package/dist/components/native-select.js.map +1 -1
  37. package/dist/components/radio-group.js +1 -1
  38. package/dist/components/radio-group.js.map +1 -1
  39. package/dist/components/select.d.ts +1 -0
  40. package/dist/components/select.js +1 -1
  41. package/dist/components/select.js.map +1 -1
  42. package/dist/components/sidebar.js +1 -1
  43. package/dist/components/sidebar.js.map +1 -1
  44. package/dist/components/skeleton.d.ts +5 -1
  45. package/dist/components/skeleton.js +1 -1
  46. package/dist/components/skeleton.js.map +1 -1
  47. package/dist/components/skeleton.spec.d.ts +1 -0
  48. package/dist/components/skeleton.spec.js +2 -0
  49. package/dist/components/skeleton.spec.js.map +1 -0
  50. package/dist/components/slider.d.ts +1 -0
  51. package/dist/components/slider.js +1 -1
  52. package/dist/components/slider.js.map +1 -1
  53. package/dist/components/switch.js +1 -1
  54. package/dist/components/switch.js.map +1 -1
  55. package/dist/components/textarea.d.ts +1 -0
  56. package/dist/components/textarea.js +1 -1
  57. package/dist/components/textarea.js.map +1 -1
  58. package/dist/components/timeline.d.ts +2 -2
  59. package/dist/components/tooltip.d.ts +20 -4
  60. package/dist/components/tooltip.js +1 -1
  61. package/dist/components/tooltip.js.map +1 -1
  62. package/dist/components/unstyled-button.d.ts +17 -0
  63. package/dist/components/unstyled-button.js +2 -0
  64. package/dist/components/unstyled-button.js.map +1 -0
  65. package/dist/hooks/use-breakpoint-value.spec.js +1 -1
  66. package/dist/hooks/use-breakpoint.spec.js +1 -1
  67. package/dist/hooks/use-disclosure.spec.js +1 -1
  68. package/dist/hooks/use-document-visibility.spec.js +1 -1
  69. package/dist/hooks/use-idle.spec.js +1 -1
  70. package/dist/hooks/use-interval.spec.js +1 -1
  71. package/dist/hooks/use-local-storage.spec.js +1 -1
  72. package/dist/hooks/use-mobile.spec.js +1 -1
  73. package/dist/index.d.ts +4 -3
  74. package/dist/index.js +1 -1
  75. package/dist/{react.esm-BuxkFT_p.js → react.esm-B3a5z6DL.js} +2 -2
  76. package/dist/{react.esm-BuxkFT_p.js.map → react.esm-B3a5z6DL.js.map} +1 -1
  77. package/dist/skills/uselets-ui/SKILL.md +4 -2
  78. package/dist/skills/uselets-ui/references/component-catalog.md +11 -4
  79. package/dist/skills/uselets-ui/references/package-guide.md +20 -2
  80. package/dist/styles/base.css +1 -1
  81. package/package.json +1 -1
  82. package/skills/uselets-ui/SKILL.md +4 -2
  83. package/skills/uselets-ui/references/component-catalog.md +11 -4
  84. package/skills/uselets-ui/references/package-guide.md +20 -2
@@ -51,9 +51,11 @@ To set up a consumer project after installing `@uselets/ui`, run `bun uselets in
51
51
  - Treat `@uselets/ui/themes/gomax.css` as the GoMax Figma-backed palette, exposed through the same public color families as the Max theme.
52
52
  - Recommend `@fontsource-variable/inter` when matching the package typography setup.
53
53
  - Recommend `@uselets/ui/postcss.config` when the app needs the package PostCSS preset for Tailwind v4.
54
- - For tooltip-heavy apps, wrap the app with `TooltipProvider`.
54
+ - For tooltip-heavy apps, wrap the app with `TooltipProvider`; use `Tooltip label={...}` for common trigger/content usage and `TooltipRoot` only when manual composition is needed.
55
+ - Use `UnstyledButton` when button semantics are needed without `Button` variants; it provides reset styles, pointer cursor, focus ring, default `type="button"`, and `asChild`.
55
56
  - For toast usage, mount `Toaster` near the app root before calling `toast(...)`.
56
57
  - For package theme helpers, use `ThemeProvider`, `useTheme`, and `ModeToggle` from `@uselets/ui/theme` or the root barrel.
58
+ - For form fields, `Field` automatically shares a generated control id with `FieldLabel` and labelable controls when explicit ids are omitted; pass explicit matching `htmlFor` and `id` only when a stable custom id is required.
57
59
 
58
60
  ## Quick Routing
59
61
 
@@ -67,6 +69,6 @@ To set up a consumer project after installing `@uselets/ui`, run `bun uselets in
67
69
 
68
70
  - "How do I install and configure `@uselets/ui` in my app?"
69
71
  - "Which `@uselets/ui` component should I use for this form?"
70
- - "Show me the correct import for `TooltipProvider` or `Sidebar`."
72
+ - "Show me the correct import for `TooltipProvider`, `Tooltip`, `UnstyledButton`, or `Sidebar`."
71
73
  - "Inspect the installed version of `@uselets/ui` and tell me what `button` exports."
72
74
  - "Build this screen only with `@uselets/ui` components."
@@ -62,7 +62,12 @@ Unless noted otherwise, each module also exports its public `*Props` types from
62
62
  - Exports: `Toaster`, `toast`
63
63
  - `tooltip`
64
64
  - Import path: `@uselets/ui/tooltip`
65
- - Exports: `TooltipProvider`, `Tooltip`, `TooltipTrigger`, `TooltipContent`
65
+ - Exports: `TooltipProvider`, `Tooltip`, `TooltipRoot`, `TooltipTrigger`, `TooltipContent`
66
+ - Notes: `Tooltip` is the ergonomic wrapper with `label`, direct content positioning props, and `disabled`; use `TooltipRoot` with `TooltipTrigger` and `TooltipContent` for manual composition
67
+ - `unstyled-button`
68
+ - Import path: `@uselets/ui/unstyled-button`
69
+ - Exports: `UnstyledButton`
70
+ - Notes: button primitive with reset styles, pointer cursor, accessible focus ring, default `type="button"`, and `asChild`
66
71
 
67
72
  ## Typography
68
73
 
@@ -103,14 +108,15 @@ Unless noted otherwise, each module also exports its public `*Props` types from
103
108
  - Exports: `Progress`
104
109
  - `skeleton`
105
110
  - Exports: `Skeleton`
111
+ - Notes: generic loading placeholder; `visible?: boolean` defaults to `true` and can wrap `children` to reserve their size while the skeleton is shown
106
112
  - `spinner`
107
113
  - Exports: `Spinner`, `spinnerVariants`
108
114
 
109
115
  ## Forms and input composition
110
116
 
111
117
  - `field`
112
- - Exports: `Field`, `FieldContent`, `FieldDescription`, `FieldError`, `FieldGroup`, `FieldLabel`, `FieldLegend`, `FieldSeparator`, `FieldSet`, `FieldTitle`
113
- - Notes: form layout and validation helpers
118
+ - Exports: `Field`, `FieldContent`, `FieldDescription`, `FieldError`, `FieldGroup`, `FieldLabel`, `FieldLegend`, `FieldSeparator`, `FieldSet`, `FieldTitle`, `useFieldControlId`
119
+ - Notes: form layout and validation helpers; `Field` automatically provides a generated control id to `FieldLabel` and labelable descendants when explicit ids are omitted
114
120
  - `grid`
115
121
  - Exports: `Grid`, `GridItem`
116
122
  - 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.
@@ -144,7 +150,7 @@ Unless noted otherwise, each module also exports its public `*Props` types from
144
150
  - Exports: `NativeSelect`, `NativeSelectOptGroup`, `NativeSelectOption`
145
151
  - `combobox`
146
152
  - 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`
153
+ - Notes: `ComboboxInput` supports `icon?: React.ReactNode`, `triggerIcon?: React.ReactNode`, `showTrigger?: boolean`, and `showClear?: boolean`; `ComboboxContent` supports `container` for rendering inside overlays such as dialogs
148
154
  - `dropzone`
149
155
  - Exports: `Dropzone`, `DropzoneArea`, `DropzoneDescription`, `DropzoneFileList`, `DropzoneFileListItem`, `DropzoneFileMessage`, `DropzoneMessage`, `DropzoneRemoveFile`, `DropzoneRetryFile`, `DropzoneTrigger`, `InfiniteProgress`, `useDropzone`
150
156
  - Notes: upload composition with validation, retry handling, status list UI, and optional `shiftOnMaxFiles`
@@ -170,6 +176,7 @@ Unless noted otherwise, each module also exports its public `*Props` types from
170
176
  - Exports: `Dialog`, `DialogClose`, `DialogContent`, `DialogDescription`, `DialogFooter`, `DialogHeader`, `DialogOverlay`, `DialogPortal`, `DialogTitle`, `DialogTrigger`
171
177
  - `drawer`
172
178
  - Exports: `Drawer`, `DrawerClose`, `DrawerContent`, `DrawerDescription`, `DrawerFooter`, `DrawerHeader`, `DrawerOverlay`, `DrawerPortal`, `DrawerTitle`, `DrawerTrigger`
179
+ - Notes: `Drawer` supports `size: 'sm' | 'md' | 'lg'` with default `md`; `DrawerContent.showCloseButton` controls the automatic close button and defaults to `true`
173
180
  - `popover`
174
181
  - Exports: `Popover`, `PopoverAnchor`, `PopoverContent`, `PopoverDescription`, `PopoverHeader`, `PopoverTitle`, `PopoverTrigger`
175
182
  - `hover-card`
@@ -144,13 +144,14 @@ The Max theme uses Inter as `font-sans` and overrides Tailwind CSS text size uti
144
144
  Use these patterns:
145
145
 
146
146
  ```tsx
147
- import { Alert, Button, cn, randomId } from '@uselets/ui'
147
+ import { Alert, Button, UnstyledButton, cn, randomId } from '@uselets/ui'
148
148
  import type { UIColor } from '@uselets/ui'
149
149
  import { Dialog } from '@uselets/ui/dialog'
150
150
  import { useIsMobile } from '@uselets/ui/hooks/use-mobile'
151
151
  import { useDisclosure } from '@uselets/ui/hooks/use-disclosure'
152
152
  import { useLocalStorage } from '@uselets/ui/hooks/use-local-storage'
153
153
  import { Toaster, toast } from '@uselets/ui/sonner'
154
+ import { UnstyledButton as UnstyledButtonSubpath } from '@uselets/ui/unstyled-button'
154
155
  ```
155
156
 
156
157
  Guidance:
@@ -183,19 +184,36 @@ Use these package-level helpers when relevant:
183
184
 
184
185
  - `TooltipProvider`
185
186
  - Wrap the app or feature root when using tooltips broadly.
187
+ - `Tooltip`
188
+ - Use `label` for common trigger/content usage; pass positioning props such as `side`, `align`, and `sideOffset` directly.
189
+ - `TooltipRoot`
190
+ - Use with `TooltipTrigger` and `TooltipContent` when manual composition or custom structure is needed.
186
191
  - `Toaster`
187
192
  - Mount near the app root before calling `toast(...)`.
188
193
  - `ThemeProvider`
189
194
  - Provide package theme state for `useTheme` and `ModeToggle`.
190
195
 
196
+ `Field` automatically shares one generated control id with `FieldLabel` and labelable descendants such as
197
+ `Input`, `Textarea`, `SelectTrigger`, `NativeSelect`, `Checkbox`, `Switch`, `RadioGroupItem`, and related input
198
+ wrappers when explicit ids are omitted. Pass matching `FieldLabel htmlFor` and control `id` only when a stable
199
+ custom id is required.
200
+
191
201
  Examples:
192
202
 
193
203
  ```tsx
194
- import { TooltipProvider } from '@uselets/ui/tooltip'
204
+ import { Tooltip, TooltipProvider } from '@uselets/ui/tooltip'
195
205
 
196
206
  export function AppRoot({ children }: { children: React.ReactNode }) {
197
207
  return <TooltipProvider delayDuration={200}>{children}</TooltipProvider>
198
208
  }
209
+
210
+ export function SaveButton() {
211
+ return (
212
+ <Tooltip label="Save changes" side="bottom">
213
+ <button type="button">Save</button>
214
+ </Tooltip>
215
+ )
216
+ }
199
217
  ```
200
218
 
201
219
  ```tsx
@@ -4,7 +4,7 @@
4
4
  }
5
5
 
6
6
  body {
7
- @apply bg-background font-sans text-base text-foreground;
7
+ @apply bg-background font-sans text-base text-foreground antialiased;
8
8
  }
9
9
 
10
10
  html {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uselets/ui",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "description": "React component library for the LET'S design system.",
@@ -51,9 +51,11 @@ To set up a consumer project after installing `@uselets/ui`, run `bun uselets in
51
51
  - Treat `@uselets/ui/themes/gomax.css` as the GoMax Figma-backed palette, exposed through the same public color families as the Max theme.
52
52
  - Recommend `@fontsource-variable/inter` when matching the package typography setup.
53
53
  - Recommend `@uselets/ui/postcss.config` when the app needs the package PostCSS preset for Tailwind v4.
54
- - For tooltip-heavy apps, wrap the app with `TooltipProvider`.
54
+ - For tooltip-heavy apps, wrap the app with `TooltipProvider`; use `Tooltip label={...}` for common trigger/content usage and `TooltipRoot` only when manual composition is needed.
55
+ - Use `UnstyledButton` when button semantics are needed without `Button` variants; it provides reset styles, pointer cursor, focus ring, default `type="button"`, and `asChild`.
55
56
  - For toast usage, mount `Toaster` near the app root before calling `toast(...)`.
56
57
  - For package theme helpers, use `ThemeProvider`, `useTheme`, and `ModeToggle` from `@uselets/ui/theme` or the root barrel.
58
+ - For form fields, `Field` automatically shares a generated control id with `FieldLabel` and labelable controls when explicit ids are omitted; pass explicit matching `htmlFor` and `id` only when a stable custom id is required.
57
59
 
58
60
  ## Quick Routing
59
61
 
@@ -67,6 +69,6 @@ To set up a consumer project after installing `@uselets/ui`, run `bun uselets in
67
69
 
68
70
  - "How do I install and configure `@uselets/ui` in my app?"
69
71
  - "Which `@uselets/ui` component should I use for this form?"
70
- - "Show me the correct import for `TooltipProvider` or `Sidebar`."
72
+ - "Show me the correct import for `TooltipProvider`, `Tooltip`, `UnstyledButton`, or `Sidebar`."
71
73
  - "Inspect the installed version of `@uselets/ui` and tell me what `button` exports."
72
74
  - "Build this screen only with `@uselets/ui` components."
@@ -62,7 +62,12 @@ Unless noted otherwise, each module also exports its public `*Props` types from
62
62
  - Exports: `Toaster`, `toast`
63
63
  - `tooltip`
64
64
  - Import path: `@uselets/ui/tooltip`
65
- - Exports: `TooltipProvider`, `Tooltip`, `TooltipTrigger`, `TooltipContent`
65
+ - Exports: `TooltipProvider`, `Tooltip`, `TooltipRoot`, `TooltipTrigger`, `TooltipContent`
66
+ - Notes: `Tooltip` is the ergonomic wrapper with `label`, direct content positioning props, and `disabled`; use `TooltipRoot` with `TooltipTrigger` and `TooltipContent` for manual composition
67
+ - `unstyled-button`
68
+ - Import path: `@uselets/ui/unstyled-button`
69
+ - Exports: `UnstyledButton`
70
+ - Notes: button primitive with reset styles, pointer cursor, accessible focus ring, default `type="button"`, and `asChild`
66
71
 
67
72
  ## Typography
68
73
 
@@ -103,14 +108,15 @@ Unless noted otherwise, each module also exports its public `*Props` types from
103
108
  - Exports: `Progress`
104
109
  - `skeleton`
105
110
  - Exports: `Skeleton`
111
+ - Notes: generic loading placeholder; `visible?: boolean` defaults to `true` and can wrap `children` to reserve their size while the skeleton is shown
106
112
  - `spinner`
107
113
  - Exports: `Spinner`, `spinnerVariants`
108
114
 
109
115
  ## Forms and input composition
110
116
 
111
117
  - `field`
112
- - Exports: `Field`, `FieldContent`, `FieldDescription`, `FieldError`, `FieldGroup`, `FieldLabel`, `FieldLegend`, `FieldSeparator`, `FieldSet`, `FieldTitle`
113
- - Notes: form layout and validation helpers
118
+ - Exports: `Field`, `FieldContent`, `FieldDescription`, `FieldError`, `FieldGroup`, `FieldLabel`, `FieldLegend`, `FieldSeparator`, `FieldSet`, `FieldTitle`, `useFieldControlId`
119
+ - Notes: form layout and validation helpers; `Field` automatically provides a generated control id to `FieldLabel` and labelable descendants when explicit ids are omitted
114
120
  - `grid`
115
121
  - Exports: `Grid`, `GridItem`
116
122
  - 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.
@@ -144,7 +150,7 @@ Unless noted otherwise, each module also exports its public `*Props` types from
144
150
  - Exports: `NativeSelect`, `NativeSelectOptGroup`, `NativeSelectOption`
145
151
  - `combobox`
146
152
  - 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`
153
+ - Notes: `ComboboxInput` supports `icon?: React.ReactNode`, `triggerIcon?: React.ReactNode`, `showTrigger?: boolean`, and `showClear?: boolean`; `ComboboxContent` supports `container` for rendering inside overlays such as dialogs
148
154
  - `dropzone`
149
155
  - Exports: `Dropzone`, `DropzoneArea`, `DropzoneDescription`, `DropzoneFileList`, `DropzoneFileListItem`, `DropzoneFileMessage`, `DropzoneMessage`, `DropzoneRemoveFile`, `DropzoneRetryFile`, `DropzoneTrigger`, `InfiniteProgress`, `useDropzone`
150
156
  - Notes: upload composition with validation, retry handling, status list UI, and optional `shiftOnMaxFiles`
@@ -170,6 +176,7 @@ Unless noted otherwise, each module also exports its public `*Props` types from
170
176
  - Exports: `Dialog`, `DialogClose`, `DialogContent`, `DialogDescription`, `DialogFooter`, `DialogHeader`, `DialogOverlay`, `DialogPortal`, `DialogTitle`, `DialogTrigger`
171
177
  - `drawer`
172
178
  - Exports: `Drawer`, `DrawerClose`, `DrawerContent`, `DrawerDescription`, `DrawerFooter`, `DrawerHeader`, `DrawerOverlay`, `DrawerPortal`, `DrawerTitle`, `DrawerTrigger`
179
+ - Notes: `Drawer` supports `size: 'sm' | 'md' | 'lg'` with default `md`; `DrawerContent.showCloseButton` controls the automatic close button and defaults to `true`
173
180
  - `popover`
174
181
  - Exports: `Popover`, `PopoverAnchor`, `PopoverContent`, `PopoverDescription`, `PopoverHeader`, `PopoverTitle`, `PopoverTrigger`
175
182
  - `hover-card`
@@ -144,13 +144,14 @@ The Max theme uses Inter as `font-sans` and overrides Tailwind CSS text size uti
144
144
  Use these patterns:
145
145
 
146
146
  ```tsx
147
- import { Alert, Button, cn, randomId } from '@uselets/ui'
147
+ import { Alert, Button, UnstyledButton, cn, randomId } from '@uselets/ui'
148
148
  import type { UIColor } from '@uselets/ui'
149
149
  import { Dialog } from '@uselets/ui/dialog'
150
150
  import { useIsMobile } from '@uselets/ui/hooks/use-mobile'
151
151
  import { useDisclosure } from '@uselets/ui/hooks/use-disclosure'
152
152
  import { useLocalStorage } from '@uselets/ui/hooks/use-local-storage'
153
153
  import { Toaster, toast } from '@uselets/ui/sonner'
154
+ import { UnstyledButton as UnstyledButtonSubpath } from '@uselets/ui/unstyled-button'
154
155
  ```
155
156
 
156
157
  Guidance:
@@ -183,19 +184,36 @@ Use these package-level helpers when relevant:
183
184
 
184
185
  - `TooltipProvider`
185
186
  - Wrap the app or feature root when using tooltips broadly.
187
+ - `Tooltip`
188
+ - Use `label` for common trigger/content usage; pass positioning props such as `side`, `align`, and `sideOffset` directly.
189
+ - `TooltipRoot`
190
+ - Use with `TooltipTrigger` and `TooltipContent` when manual composition or custom structure is needed.
186
191
  - `Toaster`
187
192
  - Mount near the app root before calling `toast(...)`.
188
193
  - `ThemeProvider`
189
194
  - Provide package theme state for `useTheme` and `ModeToggle`.
190
195
 
196
+ `Field` automatically shares one generated control id with `FieldLabel` and labelable descendants such as
197
+ `Input`, `Textarea`, `SelectTrigger`, `NativeSelect`, `Checkbox`, `Switch`, `RadioGroupItem`, and related input
198
+ wrappers when explicit ids are omitted. Pass matching `FieldLabel htmlFor` and control `id` only when a stable
199
+ custom id is required.
200
+
191
201
  Examples:
192
202
 
193
203
  ```tsx
194
- import { TooltipProvider } from '@uselets/ui/tooltip'
204
+ import { Tooltip, TooltipProvider } from '@uselets/ui/tooltip'
195
205
 
196
206
  export function AppRoot({ children }: { children: React.ReactNode }) {
197
207
  return <TooltipProvider delayDuration={200}>{children}</TooltipProvider>
198
208
  }
209
+
210
+ export function SaveButton() {
211
+ return (
212
+ <Tooltip label="Save changes" side="bottom">
213
+ <button type="button">Save</button>
214
+ </Tooltip>
215
+ )
216
+ }
199
217
  ```
200
218
 
201
219
  ```tsx