@appica/ui-react 1.2.0 → 1.3.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 (172) hide show
  1. package/CHANGELOG.md +61 -15
  2. package/agent-rules.md +2 -0
  3. package/appica.css +1 -1
  4. package/dist/components/alert-dialog/alert-dialog.js +1 -1
  5. package/dist/components/alert-dialog/alert-dialog.js.map +1 -1
  6. package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
  7. package/dist/components/autocomplete/autocomplete.js +3 -7
  8. package/dist/components/autocomplete/autocomplete.js.map +1 -1
  9. package/dist/components/badge/badge.js +1 -1
  10. package/dist/components/badge/badge.js.map +1 -1
  11. package/dist/components/breadcrumb/breadcrumb.js +2 -2
  12. package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
  13. package/dist/components/button/button-variants.js +1 -1
  14. package/dist/components/button/button-variants.js.map +1 -1
  15. package/dist/components/calendar/calendar.js +1 -1
  16. package/dist/components/calendar/calendar.js.map +1 -1
  17. package/dist/components/carousel/carousel.d.ts +2 -10
  18. package/dist/components/carousel/carousel.d.ts.map +1 -1
  19. package/dist/components/carousel/carousel.js +153 -33
  20. package/dist/components/carousel/carousel.js.map +1 -1
  21. package/dist/components/color-area/color-area.d.ts.map +1 -1
  22. package/dist/components/color-area/color-area.js +1 -0
  23. package/dist/components/color-area/color-area.js.map +1 -1
  24. package/dist/components/color-slider/color-slider.d.ts.map +1 -1
  25. package/dist/components/color-slider/color-slider.js +1 -0
  26. package/dist/components/color-slider/color-slider.js.map +1 -1
  27. package/dist/components/color-swatch-picker/color-swatch-picker.js +1 -1
  28. package/dist/components/color-swatch-picker/color-swatch-picker.js.map +1 -1
  29. package/dist/components/combobox/combobox.d.ts +5 -4
  30. package/dist/components/combobox/combobox.d.ts.map +1 -1
  31. package/dist/components/combobox/combobox.js +5 -8
  32. package/dist/components/combobox/combobox.js.map +1 -1
  33. package/dist/components/compare-slider/compare-slider.d.ts +50 -0
  34. package/dist/components/compare-slider/compare-slider.d.ts.map +1 -0
  35. package/dist/components/compare-slider/compare-slider.js +321 -0
  36. package/dist/components/compare-slider/compare-slider.js.map +1 -0
  37. package/dist/components/context-menu/context-menu.js +1 -1
  38. package/dist/components/context-menu/context-menu.js.map +1 -1
  39. package/dist/components/copy-button/copy-button.d.ts +2 -2
  40. package/dist/components/copy-button/copy-button.d.ts.map +1 -1
  41. package/dist/components/copy-button/copy-button.js +49 -46
  42. package/dist/components/copy-button/copy-button.js.map +1 -1
  43. package/dist/components/date-field/date-field.d.ts.map +1 -1
  44. package/dist/components/date-field/date-field.js +7 -0
  45. package/dist/components/date-field/date-field.js.map +1 -1
  46. package/dist/components/date-picker/date-picker.d.ts +10 -0
  47. package/dist/components/date-picker/date-picker.d.ts.map +1 -1
  48. package/dist/components/date-picker/date-picker.js +14 -0
  49. package/dist/components/date-picker/date-picker.js.map +1 -1
  50. package/dist/components/dialog/dialog.js +1 -1
  51. package/dist/components/dialog/dialog.js.map +1 -1
  52. package/dist/components/dropdown-menu/dropdown-menu.d.ts +13 -2
  53. package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  54. package/dist/components/dropdown-menu/dropdown-menu.js +109 -4
  55. package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -1
  56. package/dist/components/field/field.d.ts.map +1 -1
  57. package/dist/components/field/field.js +1 -0
  58. package/dist/components/field/field.js.map +1 -1
  59. package/dist/components/loader/loader.d.ts +1 -1
  60. package/dist/components/loader/loader.d.ts.map +1 -1
  61. package/dist/components/loader/loader.js +7 -5
  62. package/dist/components/loader/loader.js.map +1 -1
  63. package/dist/components/navigation/navigation-link-variants.js +1 -1
  64. package/dist/components/navigation/navigation-link-variants.js.map +1 -1
  65. package/dist/components/navigation-menu/navigation-menu.js +1 -1
  66. package/dist/components/navigation-menu/navigation-menu.js.map +1 -1
  67. package/dist/components/number-field/number-field.d.ts +1 -1
  68. package/dist/components/number-field/number-field.d.ts.map +1 -1
  69. package/dist/components/number-field/number-field.js +7 -0
  70. package/dist/components/number-field/number-field.js.map +1 -1
  71. package/dist/components/pagination/pagination.d.ts.map +1 -1
  72. package/dist/components/pagination/pagination.js +1 -2
  73. package/dist/components/pagination/pagination.js.map +1 -1
  74. package/dist/components/popover/popover.js +1 -1
  75. package/dist/components/popover/popover.js.map +1 -1
  76. package/dist/components/preview-card/preview-card.js +1 -1
  77. package/dist/components/preview-card/preview-card.js.map +1 -1
  78. package/dist/components/select/select.js +2 -2
  79. package/dist/components/select/select.js.map +1 -1
  80. package/dist/components/slider/slider.d.ts.map +1 -1
  81. package/dist/components/slider/slider.js +2 -1
  82. package/dist/components/slider/slider.js.map +1 -1
  83. package/dist/components/sparkline/sparkline.d.ts.map +1 -1
  84. package/dist/components/sparkline/sparkline.js +1 -0
  85. package/dist/components/sparkline/sparkline.js.map +1 -1
  86. package/dist/components/spinner/spinner.d.ts +1 -1
  87. package/dist/components/spinner/spinner.d.ts.map +1 -1
  88. package/dist/components/spinner/spinner.js +7 -5
  89. package/dist/components/spinner/spinner.js.map +1 -1
  90. package/dist/components/tabs/tabs.js +1 -1
  91. package/dist/components/tabs/tabs.js.map +1 -1
  92. package/dist/components/thumbnail/thumbnail.d.ts +6 -1
  93. package/dist/components/thumbnail/thumbnail.d.ts.map +1 -1
  94. package/dist/components/thumbnail/thumbnail.js +2 -0
  95. package/dist/components/thumbnail/thumbnail.js.map +1 -1
  96. package/dist/components/time-field/time-field.d.ts.map +1 -1
  97. package/dist/components/time-field/time-field.js +7 -0
  98. package/dist/components/time-field/time-field.js.map +1 -1
  99. package/dist/components/tooltip/tooltip.js +1 -1
  100. package/dist/components/tooltip/tooltip.js.map +1 -1
  101. package/dist/hooks/use-media-query.d.ts +0 -4
  102. package/dist/hooks/use-media-query.d.ts.map +1 -1
  103. package/dist/hooks/use-media-query.js.map +1 -1
  104. package/dist/index.d.ts +1 -0
  105. package/dist/index.d.ts.map +1 -1
  106. package/dist/index.js +3 -2
  107. package/dist/index.js.map +1 -1
  108. package/dist/internal/utils.d.ts.map +1 -1
  109. package/dist/internal/utils.js +2 -1
  110. package/dist/internal/utils.js.map +1 -1
  111. package/package.json +28 -23
  112. package/src/components/alert-dialog/alert-dialog.tsx +1 -1
  113. package/src/components/autocomplete/autocomplete.test.tsx +33 -0
  114. package/src/components/autocomplete/autocomplete.tsx +3 -7
  115. package/src/components/badge/badge.tsx +1 -1
  116. package/src/components/breadcrumb/breadcrumb.test.tsx +57 -2
  117. package/src/components/breadcrumb/breadcrumb.tsx +2 -2
  118. package/src/components/button/button-variants.ts +1 -1
  119. package/src/components/calendar/calendar.tsx +1 -1
  120. package/src/components/carousel/carousel.test.tsx +526 -12
  121. package/src/components/carousel/carousel.tsx +173 -42
  122. package/src/components/chip/chip.test.tsx +4 -5
  123. package/src/components/color-area/color-area.test.tsx +5 -0
  124. package/src/components/color-area/color-area.tsx +1 -0
  125. package/src/components/color-slider/color-slider.test.tsx +5 -0
  126. package/src/components/color-slider/color-slider.tsx +1 -0
  127. package/src/components/color-swatch-picker/color-swatch-picker.tsx +1 -1
  128. package/src/components/combobox/combobox.test.tsx +66 -0
  129. package/src/components/combobox/combobox.tsx +14 -11
  130. package/src/components/compare-slider/compare-slider.test.tsx +261 -0
  131. package/src/components/compare-slider/compare-slider.tsx +397 -0
  132. package/src/components/context-menu/context-menu.test.tsx +2 -1
  133. package/src/components/context-menu/context-menu.tsx +1 -1
  134. package/src/components/copy-button/copy-button.test.tsx +68 -3
  135. package/src/components/copy-button/copy-button.tsx +49 -43
  136. package/src/components/date-field/date-field.test.tsx +82 -0
  137. package/src/components/date-field/date-field.tsx +7 -0
  138. package/src/components/date-picker/date-picker.test.tsx +70 -0
  139. package/src/components/date-picker/date-picker.tsx +26 -0
  140. package/src/components/dialog/dialog.tsx +1 -1
  141. package/src/components/dropdown-menu/dropdown-menu.test.tsx +190 -1
  142. package/src/components/dropdown-menu/dropdown-menu.tsx +129 -3
  143. package/src/components/field/field.test.tsx +34 -0
  144. package/src/components/field/field.tsx +1 -0
  145. package/src/components/loader/loader.test.tsx +17 -4
  146. package/src/components/loader/loader.tsx +2 -2
  147. package/src/components/navigation/navigation-link-variants.ts +1 -1
  148. package/src/components/navigation-menu/navigation-menu.tsx +2 -2
  149. package/src/components/number-field/number-field.test.tsx +59 -0
  150. package/src/components/number-field/number-field.tsx +8 -0
  151. package/src/components/pagination/pagination.test.tsx +83 -0
  152. package/src/components/pagination/pagination.tsx +1 -2
  153. package/src/components/popover/popover.tsx +1 -1
  154. package/src/components/preview-card/preview-card.tsx +1 -1
  155. package/src/components/select/select.tsx +2 -2
  156. package/src/components/slider/slider.test.tsx +5 -0
  157. package/src/components/slider/slider.tsx +2 -1
  158. package/src/components/sparkline/sparkline.test.tsx +16 -0
  159. package/src/components/sparkline/sparkline.tsx +1 -0
  160. package/src/components/spinner/spinner.test.tsx +17 -4
  161. package/src/components/spinner/spinner.tsx +2 -2
  162. package/src/components/tabs/tabs.tsx +1 -1
  163. package/src/components/thumbnail/thumbnail.test.tsx +8 -0
  164. package/src/components/thumbnail/thumbnail.tsx +7 -0
  165. package/src/components/time-field/time-field.test.tsx +64 -0
  166. package/src/components/time-field/time-field.tsx +7 -0
  167. package/src/components/tooltip/tooltip.tsx +1 -1
  168. package/src/hooks/use-media-query.ts +0 -4
  169. package/src/index.ts +1 -0
  170. package/src/internal/utils.test.tsx +8 -1
  171. package/src/internal/utils.ts +4 -1
  172. package/styles.css +4 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,52 @@ version alongside the package.
7
7
 
8
8
  The library follows [semantic versioning](https://semver.org/spec/v2.0.0.html).
9
9
 
10
+ ## 1.3.1 - 2026-11-01
11
+
12
+ Accessibility fixes for Carousel and form fields, and a lighter carousel progress bar.
13
+
14
+ ### Added
15
+
16
+ - **[Date Picker range labels](https://appica.dev/ui/components/react/date-picker#date-range)** - `startAriaLabel` and `endAriaLabel` name the 2 fields of a range.
17
+
18
+ ### Improved
19
+
20
+ - **[Carousel autoplay](https://appica.dev/ui/components/react/carousel#autoplay)** - Pauses while hovered or focused, and stays off with reduced motion.
21
+ - **Carousel progress bar** - Animates its position instead of its width, so it no longer triggers layout every frame.
22
+ - **Dependencies** - Motion 14.9.
23
+
24
+ ### Fixed
25
+
26
+ - **[Carousel landmarks](https://appica.dev/ui/components/react/carousel#accessibility)** - 1 region per labeled carousel instead of 2 named "Carousel". An unlabeled carousel is a group.
27
+ - **[Carousel slides](https://appica.dev/ui/components/react/carousel#accessibility)** - Off-screen slides are inert, and visible slides are no longer hidden from screen readers.
28
+ - **Carousel thumbnails and arrows** - Thumbnails stay buttons, and an arrow at the end is `aria-disabled` so it keeps focus: style it with `data-disabled`, not `:disabled`.
29
+ - **Date Field, Time Field and Date Picker** - Field labels, descriptions and errors reach the segments.
30
+ - **Field, Number Field, Combobox and Autocomplete** - Errors and "No results" are announced, and a Number Field's `aria-label` names its input.
31
+ - **[Copy Button](https://appica.dev/ui/components/react/copy-button#accessibility)** - Visible text names the button, and the "Copied" status now renders just before the `<button>` instead of inside it.
32
+ - **Breadcrumb, Pagination, Spinner and Loader** - Correct names and states for screen readers, with no stray tab stops.
33
+
34
+ ## 1.3.0 - 2026-10-12
35
+
36
+ A new Compare Slider, type-to-filter Dropdown Menus, drag controls that work inside a Drawer, and Base UI 1.9.
37
+
38
+ ### Added
39
+
40
+ - **[Compare Slider](https://appica.dev/ui/components/react/compare-slider)** - Two layers split by a draggable divider, for before and after comparisons. Horizontal or vertical, with labels, a custom handle icon and an optional reveal on scroll.
41
+ - **[Dropdown Menu filtering](https://appica.dev/ui/components/react/dropdown-menu#filtering)** - `DropdownMenuFilterProvider`, `DropdownMenuInput`, `DropdownMenuEmpty` and `DropdownMenuList` let readers type to narrow a menu or submenu. Base UI still marks filtering as a preview.
42
+ - **[createComboboxItems](https://appica.dev/ui/components/react/combobox#values-by-id)** - Base UI's `Combobox.createItems`, re-exported, for a Combobox that stores IDs but shows labels.
43
+ - **[keepMounted on Thumbnail](https://appica.dev/ui/components/react/thumbnail#nextjs-image)** - Loads the image in place instead of preloading `src`, so a Next.js `<Image>` downloads once and `loading="lazy"` stays lazy.
44
+ - **[--ease-spring token](https://appica.dev/ui/docs/react/theming#other-token-groups)** - The library's spring curve as a theme token, with an `ease-spring` utility for your own transitions.
45
+
46
+ ### Improved
47
+
48
+ - **Dependencies** - Base UI 1.9, Motion 14 and Embla Carousel 9.0.0-rc04. The menus gain `onItemHighlighted`, and Accordion and Collapsible triggers set the native `disabled` attribute.
49
+ - **[Typed Combobox values](https://appica.dev/ui/components/react/combobox#values-by-id)** - `value`, `defaultValue` and `onValueChange` take their type from `items` instead of `unknown`, so `onValueChange={setValue}` needs no cast. A value of the wrong type is now a type error.
50
+ - **actionsRef with a custom exit animation** - To unmount a popup with `actionsRef.unmount()` after your own exit animation, call `eventDetails.preventUnmountOnClose()` in `onOpenChange`. Otherwise Base UI 1.9 unmounts it before your animation ends.
51
+
52
+ ### Fixed
53
+
54
+ - **[Drag controls inside a Drawer](https://appica.dev/ui/components/react/drawer#drags-inside-the-drawer)** - Dragging a Slider, Color Slider, Color Area, Carousel or interactive Sparkline no longer moves the Drawer around it.
55
+
10
56
  ## 1.2.0 - 2026-09-24
11
57
 
12
58
  Base UI 1.8 compatibility fixes, 2 new Background Pattern textures and a redrawn grid, a border-only Gradient Glow, and custom Copy Button icons.
@@ -22,7 +68,7 @@ Base UI 1.8 compatibility fixes, 2 new Background Pattern textures and a redrawn
22
68
 
23
69
  - **[Background Pattern grid](https://appica.dev/ui/components/react/background-pattern)** - Redrawn with a dot at every intersection, set off from the 1px lines, and the stroke holds at any `cellSize`.
24
70
  - **[Card solid frame](https://appica.dev/ui/components/react/card)** - A translucent `background-muted` band under a stronger blur, keeping `background-subtle` in dark mode.
25
- - **Dependencies** - Base UI 1.8, Embla Carousel 9.0.0-rc03, Motion 13.4 and React 19.3, with TypeScript 7 and Vitest 5 across the workspace. Through Base UI 1.8, read-only Select, Combobox and Autocomplete open for browsing, and start-aligned menus scale in from their corner.
71
+ - **Dependencies** - Base UI 1.8, Embla Carousel 9.0.0-rc03, Motion 13.4 and React 19.3. Read-only Select, Combobox and Autocomplete now open for browsing, and start-aligned menus scale in from their corner.
26
72
  - **Agent rules** - The packaged rules and the README point at the per-integration index, `https://appica.dev/ui/react/llms.txt`.
27
73
 
28
74
  ### Removed
@@ -39,22 +85,22 @@ Base UI 1.8 compatibility fixes, 2 new Background Pattern textures and a redrawn
39
85
 
40
86
  ### Added
41
87
 
42
- - **[Card](https://appica.dev/ui/components/react/card)** - A server-safe layout container with `CardMedia`, `CardHeader`, `CardTitle`, `CardDescription` and `CardFooter` slots, an optional solid or glass frame, and an inset mode that floats media into a fully rounded panel. Every corner derives from a single `--card-radius`, so retuning one value keeps the nest concentric.
43
- - **[Color Picker](https://appica.dev/ui/components/react/color-picker)** - A swatch trigger and a popover holding an HSB area, a hue slider and a text input. It shares one color with every color component below it through context, so an area, a slider and a palette need no value wiring. `ColorPickerInput` reads any string `parseColor` accepts, not only the format it prints, and `ColorPickerEyeDropper` samples a screen pixel where the browser has an EyeDropper (rendering nothing where it does not).
88
+ - **[Card](https://appica.dev/ui/components/react/card)** - A server-safe container with media, header and footer slots, an optional solid or glass frame, and an inset mode. Every corner derives from one `--card-radius`.
89
+ - **[Color Picker](https://appica.dev/ui/components/react/color-picker)** - A swatch trigger and a popover with an HSB area, a hue slider and a text input. Color components inside it share one color with no wiring, and `ColorPickerEyeDropper` samples a screen pixel where the browser supports it.
44
90
  - **[Color Area, Color Slider, Color Swatch and Color Swatch Picker](https://appica.dev/ui/components/react/color-area)** - The 4 building blocks behind the picker, each usable on its own: a two-axis HSB plane, a channel slider, a single swatch, and a selectable palette.
45
- - **Color model** - `parseColor`, `formatColor`, `convertColor` and the channel helpers ship from `@appica/ui-react/color`. An alpha format collapses to its opaque twin at full opacity, so a solid color is written `#3b82f6` rather than `#3b82f6ff`.
46
- - **[Rating](https://appica.dev/ui/components/react/rating)** - A `radiogroup` of icon buttons that sweeps a fill preview across the row under the pointer and commits on click. The preview always lands on a `step` boundary, so it never promises a value the click will not deliver. Swap the built-in star through `icon={{ empty, filled }}`, and recolor the whole control with any `text-*` utility.
47
- - **[Border Beam](https://appica.dev/ui/components/react/border-beam)** - A comet of light that laps your content's border, painted as a conic sweep clipped to a hairline ring so it follows the wrapper's own `border-radius` exactly, from a `rounded-xl` card to a full pill, with no radius prop to keep in sync. Pure CSS, mirrored in RTL and reduced-motion aware.
48
- - **[Carousel thumbnails](https://appica.dev/ui/components/react/carousel)** - `CarouselThumbs` is a rail of `CarouselThumb`s that sits inside the carousel and drives it, with no second engine to wire up by hand. The rail is a carousel of its own, so a set with more shots than fit scrolls instead of squeezing, and selection is drawn as a single outline that slides between thumbnails.
49
- - **[frame prop on Dialog, AlertDialog and Drawer](https://appica.dev/ui/components/react/dialog)** - Wraps the popup in a translucent glass frame over the backdrop. Pass `frame={false}` for a plain solid card.
50
- - **[Prebuilt stylesheet](https://appica.dev/ui/docs/react/installation)** - `@import '@appica/ui-react/css'` pulls in a single self-contained `appica.css` carrying every component's styles and the full token system, for projects that do not run Tailwind. It is linkable straight from a CDN, and tokens stay overridable CSS variables so theming works the same way.
51
- - **[Agent rules in the package](https://appica.dev/ui/docs/react/agents)** - `@appica/ui-react/agent-rules.md` ships the rules a coding agent needs to use the library correctly, so an agent that wandered in following an import finds them without the docs site. The README links it.
91
+ - **Color model** - `parseColor`, `formatColor`, `convertColor` and the channel helpers, from `@appica/ui-react/color`.
92
+ - **[Rating](https://appica.dev/ui/components/react/rating)** - A star rating with a hover preview that snaps to `step`, custom icons through `icon={{ empty, filled }}`, and color from any `text-*` utility.
93
+ - **[Border Beam](https://appica.dev/ui/components/react/border-beam)** - A beam of light that circles your content's border and follows its `border-radius`. Pure CSS, mirrored in RTL and reduced-motion aware.
94
+ - **[Carousel thumbnails](https://appica.dev/ui/components/react/carousel)** - `CarouselThumbs` and `CarouselThumb` add a scrolling thumbnail rail that drives the carousel, with nothing extra to wire up.
95
+ - **[frame prop on Dialog, Alert Dialog and Drawer](https://appica.dev/ui/components/react/dialog)** - Wraps the popup in a translucent glass frame over the backdrop. Pass `frame={false}` for a plain solid card.
96
+ - **[Prebuilt stylesheet](https://appica.dev/ui/docs/react/installation)** - `@import '@appica/ui-react/css'` loads one self-contained stylesheet with every component and token, for projects without Tailwind. It also works from a CDN.
97
+ - **[Agent rules in the package](https://appica.dev/ui/docs/react/agents)** - `@appica/ui-react/agent-rules.md` ships the rules a coding agent needs to use the library, and the README links it.
52
98
 
53
99
  ### Improved
54
100
 
55
- - **Prop documentation comes from the source** - All 366 props declared on our own types now carry JSDoc, so a component's comments, its IDE hover and the published API reference cannot drift apart. `Badge`, `Button`, `Alert` and `TabsList` declare `variant` and `size` explicitly, so hovering one shows the union and its default instead of an empty interface body.
101
+ - **Prop documentation comes from the source** - All 366 props declared by the library carry JSDoc, which also generates the published API reference, so IDE hover and the docs match.
56
102
  - **[Text Animate shimmer](https://appica.dev/ui/components/react/text-animate)** - Reworked as a seamless gradient glare that sweeps the whole string as one band, rather than brightening character by character.
57
- - **Dependencies** - Base UI 1.7, Motion 13, Tailwind CSS 4.3 and TypeScript 6 across the workspace, and the development Node floor moves to 22. React 19 and Tailwind CSS 4 remain the only peer requirements.
103
+ - **Dependencies** - Base UI 1.7, Motion 13 and Tailwind CSS 4.3, and the development Node floor moves to 22. React 19 and Tailwind CSS 4 remain the only peer requirements.
58
104
 
59
105
  ### Fixed
60
106
 
@@ -66,7 +112,7 @@ The first public release of the component library.
66
112
 
67
113
  ### Added
68
114
 
69
- - **[60+ components](https://appica.dev/ui/components/react/button)** - Built on Base UI primitives, animated with Motion and styled with Tailwind CSS v4 design tokens. Accessible by default, right-to-left ready, and quiet when the reader prefers reduced motion.
115
+ - **[60+ components](https://appica.dev/ui/components/react/button)** - Built on Base UI, animated with Motion and styled with Tailwind CSS v4 tokens. Accessible, right-to-left ready and reduced-motion aware.
70
116
  - **[Providers and hooks](https://appica.dev/ui/docs/react/theme-provider)** - `ThemeProvider`, `DirectionProvider` and `ReducedMotionProvider`, plus `useTheme`, `useDirection`, `useMediaQuery`, `useLocalStorage`, `useDismissible` and `useReducedMotion`.
71
- - **[Token-based theming](https://appica.dev/ui/docs/react/theming)** - Every color, radius, font and shadow is a CSS variable, so a project retunes the library by redefining tokens rather than overriding component styles. Dark mode ships with no flash of the wrong theme.
72
- - **[Composition through render](https://appica.dev/ui/docs/react/composition)** - Every component takes a `render` prop, so it lends its behavior and styling to an element you supply - a `next/link`, a `<button>`, another component - rather than wrapping it in one more node.
117
+ - **[Token-based theming](https://appica.dev/ui/docs/react/theming)** - Every color, radius, font and shadow is a CSS variable you can redefine, and dark mode loads without a flash.
118
+ - **[Composition through render](https://appica.dev/ui/docs/react/composition)** - Every component takes a `render` prop to lend its behavior and styling to your own element (a `next/link`, a `<button>`, another component) instead of adding a wrapper.
package/agent-rules.md CHANGED
@@ -34,6 +34,8 @@
34
34
  - Never write hue-based utilities (`bg-gray-100`, `text-slate-600`). The palette is organized by
35
35
  role, not hue.
36
36
  - Prefer v4 variant syntax (`*:`, `**:`, `data-*:`, `not-*:`) over `[&_...]` arbitrary selectors.
37
+ - Never put `:has()` on `html`, `:root` or `body`, including variants like `in-[:root:has(...)]`. Beside the library's
38
+ own `:has()` rules, each check restyles the whole page. Derive page state from the route or React state instead.
37
39
  - For a link styled as a button, put `buttonVariants(...)` on the `<a>` - never `<Button render={<a/>}>`.
38
40
  - Put `className` overrides on the wrapper component, not on the JSX passed to `render`.
39
41
  - Do not hand-roll a component that exists in the library. Check the component list first: