@sdxc/kit 2026.10.30 → 2026.11.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 (113) hide show
  1. package/changelog.jsonl +89 -0
  2. package/dist/make/declare.js +32 -11
  3. package/package.json +2 -2
  4. package/registry/ui/accordion.json +2 -2
  5. package/registry/ui/alert-dialog.json +2 -2
  6. package/registry/ui/alert.json +2 -2
  7. package/registry/ui/aspect-ratio.json +2 -2
  8. package/registry/ui/avatar.json +6 -3
  9. package/registry/ui/badge.json +2 -2
  10. package/registry/ui/breadcrumbs.json +2 -2
  11. package/registry/ui/button.json +5 -3
  12. package/registry/ui/calendar.json +2 -2
  13. package/registry/ui/card.json +2 -2
  14. package/registry/ui/carousel.json +2 -2
  15. package/registry/ui/checkbox-group.json +2 -2
  16. package/registry/ui/checkbox.json +2 -2
  17. package/registry/ui/combobox.json +2 -2
  18. package/registry/ui/command.json +2 -2
  19. package/registry/ui/cta-group.json +2 -2
  20. package/registry/ui/date-field.json +2 -2
  21. package/registry/ui/date-picker.json +2 -2
  22. package/registry/ui/date-range-picker.json +2 -2
  23. package/registry/ui/description.json +2 -2
  24. package/registry/ui/dialog-dismiss.json +13 -0
  25. package/registry/ui/dialog.json +2 -2
  26. package/registry/ui/disclosure.json +2 -2
  27. package/registry/ui/drawer.json +2 -2
  28. package/registry/ui/field-error.json +2 -2
  29. package/registry/ui/form.json +2 -2
  30. package/registry/ui/group.json +2 -2
  31. package/registry/ui/header.json +2 -2
  32. package/registry/ui/heading-scope.json +2 -2
  33. package/registry/ui/heading.json +3 -3
  34. package/registry/ui/highlight.json +3 -3
  35. package/registry/ui/hover-card.json +2 -2
  36. package/registry/ui/image-placeholder.json +2 -2
  37. package/registry/ui/input.json +2 -2
  38. package/registry/ui/item.json +2 -2
  39. package/registry/ui/keyboard.json +2 -2
  40. package/registry/ui/label.json +2 -2
  41. package/registry/ui/link-button.json +5 -3
  42. package/registry/ui/link.json +2 -2
  43. package/registry/ui/listbox.json +2 -2
  44. package/registry/ui/menu.json +2 -2
  45. package/registry/ui/meter.json +2 -2
  46. package/registry/ui/modal.json +2 -2
  47. package/registry/ui/nav-link.json +2 -2
  48. package/registry/ui/navigation-menu.json +2 -2
  49. package/registry/ui/number-field.json +2 -2
  50. package/registry/ui/otp-field.json +2 -2
  51. package/registry/ui/overlay-arrow.json +2 -2
  52. package/registry/ui/pagination.json +2 -2
  53. package/registry/ui/popover.json +2 -2
  54. package/registry/ui/progress-bar.json +2 -2
  55. package/registry/ui/radio-group.json +2 -2
  56. package/registry/ui/range-calendar.json +2 -2
  57. package/registry/ui/scroll-area.json +2 -2
  58. package/registry/ui/search-field.json +2 -2
  59. package/registry/ui/section.json +2 -2
  60. package/registry/ui/select.json +2 -2
  61. package/registry/ui/selection-indicator.json +2 -2
  62. package/registry/ui/sentinel-row.json +2 -2
  63. package/registry/ui/separator.json +2 -2
  64. package/registry/ui/shared-element.json +2 -2
  65. package/registry/ui/sheet.json +2 -2
  66. package/registry/ui/sidebar.json +2 -2
  67. package/registry/ui/slider.json +2 -2
  68. package/registry/ui/spinner.json +2 -2
  69. package/registry/ui/switch.json +2 -2
  70. package/registry/ui/tabs.json +2 -2
  71. package/registry/ui/tag-group.json +2 -2
  72. package/registry/ui/text-field.json +2 -2
  73. package/registry/ui/text.json +2 -2
  74. package/registry/ui/textarea.json +2 -2
  75. package/registry/ui/time-field.json +2 -2
  76. package/registry/ui/toggle-button.json +2 -2
  77. package/registry/ui/tooltip.json +2 -2
  78. package/registry/ui/typeset.json +2 -2
  79. package/registry/ui/youtube-embed.json +2 -2
  80. package/stubs/scaffold.controller.index.stub +1 -1
  81. package/registry/ui/attachment.json +0 -15
  82. package/registry/ui/bubble.json +0 -13
  83. package/registry/ui/chart.json +0 -13
  84. package/registry/ui/color-area.json +0 -13
  85. package/registry/ui/color-field.json +0 -20
  86. package/registry/ui/color-picker.json +0 -17
  87. package/registry/ui/color-slider.json +0 -13
  88. package/registry/ui/color-swatch-picker.json +0 -15
  89. package/registry/ui/color-swatch.json +0 -13
  90. package/registry/ui/color-wheel.json +0 -13
  91. package/registry/ui/context-menu.json +0 -16
  92. package/registry/ui/drop-indicator.json +0 -13
  93. package/registry/ui/drop-zone.json +0 -13
  94. package/registry/ui/empty.json +0 -15
  95. package/registry/ui/feature.json +0 -18
  96. package/registry/ui/file-trigger.json +0 -13
  97. package/registry/ui/grid-list.json +0 -18
  98. package/registry/ui/logo-cloud.json +0 -16
  99. package/registry/ui/marker.json +0 -13
  100. package/registry/ui/marketing-header.json +0 -18
  101. package/registry/ui/marketing-section.json +0 -16
  102. package/registry/ui/menubar.json +0 -13
  103. package/registry/ui/message-scroller.json +0 -16
  104. package/registry/ui/message.json +0 -13
  105. package/registry/ui/resizable.json +0 -13
  106. package/registry/ui/shortcut-list.json +0 -18
  107. package/registry/ui/skeleton.json +0 -13
  108. package/registry/ui/split.json +0 -16
  109. package/registry/ui/stat-strip.json +0 -16
  110. package/registry/ui/table.json +0 -16
  111. package/registry/ui/toast.json +0 -16
  112. package/registry/ui/toolbar.json +0 -13
  113. package/registry/ui/tree.json +0 -18
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carousel",
3
- "changedIn": "2026.10.29",
3
+ "changedIn": "2026.11.1",
4
4
  "dependencies": [
5
5
  "button"
6
6
  ],
@@ -9,7 +9,7 @@
9
9
  ],
10
10
  "source": {
11
11
  "path": "carousel.tsx",
12
- "content": "/**\n * A horizontally scrolling collection of slides riding native CSS scroll snap,\n * so swiping or scrolling advances between slides with no script in the\n * baseline. {@link Carousel.Viewport} is the scrolling surface,\n * {@link Carousel.Track} rows up its {@link Carousel.Slide} children, and\n * {@link Carousel.Previous}/{@link Carousel.Next} are invoker buttons a paired\n * mixin wires into working controls.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps } from \"remix/component\";\n\nimport { ChevronLeftIcon, ChevronRightIcon } from \"@sdxc/icons\";\nimport { outline } from \"@sdxc/u/color\";\nimport { raw, vars } from \"@sdxc/u/general\";\nimport { flex, flexCol, gap, grow, items, justify, shrink } from \"@sdxc/u/layout\";\nimport { media } from \"@sdxc/u/responsive\";\nimport { bs, is, minIs, pi } from \"@sdxc/u/size\";\nimport { when } from \"@sdxc/u/state\";\nimport { attrs } from \"remix/component\";\n\nimport { Button } from \"@sdxc/ui/button\";\n\n/** Native ARIA role applied to {@link Carousel.Viewport} unless a consumer overrides it. */\nconst DEFAULT_VIEWPORT_ROLE = \"group\";\n\n/**\n * Native tab-stop index applied to {@link Carousel.Viewport} unless a consumer\n * overrides it, so the scrollable region is reachable by keyboard even before\n * any control is wired up.\n */\nconst DEFAULT_VIEWPORT_TAB_INDEX = 0;\n\n/** Native ARIA role applied to {@link Carousel.Slide} unless a consumer overrides it. */\nconst DEFAULT_SLIDE_ROLE = \"group\";\n\n/**\n * Visual weight {@link Carousel.Previous} and {@link Carousel.Next} fall back\n * to when `variant` is omitted.\n */\nconst DEFAULT_CONTROL_VARIANT: Button.Variant = \"ghost\";\n\n/**\n * Semantic color role {@link Carousel.Previous} and {@link Carousel.Next} fall\n * back to when `color` is omitted.\n */\nconst DEFAULT_CONTROL_COLOR: Button.Color = \"neutral\";\n\n/**\n * Size variant {@link Carousel.Previous} and {@link Carousel.Next} fall back to\n * when `size` is omitted.\n */\nconst DEFAULT_CONTROL_SIZE: Button.Size = \"sm\";\n\n/** Invoker Commands verb {@link Carousel.Previous} falls back to when `command` is omitted. */\nconst DEFAULT_PREVIOUS_COMMAND = \"--ui-prev\";\n\n/** Invoker Commands verb {@link Carousel.Next} falls back to when `command` is omitted. */\nconst DEFAULT_NEXT_COMMAND = \"--ui-next\";\n\n/**\n * Prop types for {@link Carousel} and its compound parts.\n */\nexport namespace Carousel {\n\t/**\n\t * Every native `<section>` attribute, unchanged, plus the `mix`\n\t * passthrough. Override `--ui-carousel-gap`, `--ui-carousel-slide-size`, or\n\t * `--ui-carousel-padding` per instance through the inherited `style` prop.\n\t */\n\texport interface Props extends TagProps<\"section\"> {}\n\n\t/**\n\t * Every native `<div>` attribute, unchanged, plus the `mix` passthrough.\n\t * Give it an `id` for the controls' `commandfor` prop to target, and pair a\n\t * `carouselControls()` mixin on it to make those controls scroll it.\n\t */\n\texport interface ViewportProps extends TagProps<\"div\"> {}\n\n\t/**\n\t * Every native `<div>` attribute, unchanged, plus the `mix` passthrough.\n\t */\n\texport interface TrackProps extends TagProps<\"div\"> {}\n\n\t/**\n\t * Every native `<div>` attribute, unchanged, plus the `mix` passthrough.\n\t */\n\texport interface SlideProps extends TagProps<\"div\"> {}\n\n\t/**\n\t * Every native `<div>` attribute, unchanged, plus the `mix` passthrough.\n\t */\n\texport interface ControlsProps extends TagProps<\"div\"> {}\n\n\t/**\n\t * Every {@link Button.Props} field, with `commandfor` required and `command`\n\t * narrowed to the verb the paired mixin listens for.\n\t */\n\texport interface PreviousProps extends Omit<Button.Props, \"commandfor\" | \"command\"> {\n\t\t/** `id` of the {@link Carousel.Viewport} this control scrolls back through. */\n\t\tcommandfor: string;\n\t\t/** Invoker Commands verb a `carouselControls()` mixin listens for. Defaults to `\"--ui-prev\"`. */\n\t\tcommand?: \"--ui-prev\";\n\t}\n\n\t/**\n\t * Every {@link Button.Props} field, with `commandfor` required and `command`\n\t * narrowed to the verb the paired mixin listens for.\n\t */\n\texport interface NextProps extends Omit<Button.Props, \"commandfor\" | \"command\"> {\n\t\t/** `id` of the {@link Carousel.Viewport} this control scrolls forward through. */\n\t\tcommandfor: string;\n\t\t/** Invoker Commands verb a `carouselControls()` mixin listens for. Defaults to `\"--ui-next\"`. */\n\t\tcommand?: \"--ui-next\";\n\t}\n}\n\n/**\n * The carousel root: a `<section>` stacking {@link Carousel.Viewport} and\n * {@link Carousel.Controls} in a column, declaring the `--ui-carousel-*`\n * custom properties its descendants read with per-instance defaults.\n *\n * @param handle Runtime handle carrying the host `<section>`'s props.\n * @returns The render function producing the carousel's markup.\n * @example\n * <Carousel aria-label={t(\"gallery.label\")}>\n * \t<Carousel.Viewport id=\"gallery-viewport\">\n * \t\t<Carousel.Track>\n * \t\t\t<Carousel.Slide><img src={photo.src} alt={photo.alt} /></Carousel.Slide>\n * \t\t</Carousel.Track>\n * \t</Carousel.Viewport>\n * \t<Carousel.Controls>\n * \t\t<Carousel.Previous commandfor=\"gallery-viewport\" aria-label={t(\"gallery.previous\")} />\n * \t\t<Carousel.Next commandfor=\"gallery-viewport\" aria-label={t(\"gallery.next\")} />\n * \t</Carousel.Controls>\n * </Carousel>\n * @example\n * // Marketing browser-flow strip: widen `--ui-carousel-slide-size` for product\n * // frames and keep Previous/Next on `size=\"sm\"` so controls stay quiet.\n * <Carousel\n * \taria-label={t(\"flows.label\")}\n * \tstyle={{ \"--ui-carousel-slide-size\": \"28rem\" }}\n * >\n * \t<Carousel.Viewport id=\"flows\" mix={[carouselControls()]}>\n * \t\t<Carousel.Track>{slides}</Carousel.Track>\n * \t</Carousel.Viewport>\n * \t<Carousel.Controls>\n * \t\t<Carousel.Previous commandfor=\"flows\" aria-label={t(\"flows.previous\")} />\n * \t\t<Carousel.Next commandfor=\"flows\" aria-label={t(\"flows.next\")} />\n * \t</Carousel.Controls>\n * </Carousel>\n */\nexport function Carousel(handle: Handle<Carousel.Props>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<section\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"carousel\"\n\t\t\t\tmix={[\n\t\t\t\t\tflex(),\n\t\t\t\t\tflexCol(),\n\t\t\t\t\tgap(3),\n\t\t\t\t\tvars({\n\t\t\t\t\t\t\"ui-carousel-gap\": \"1rem\",\n\t\t\t\t\t\t\"ui-carousel-slide-size\": \"18rem\",\n\t\t\t\t\t\t\"ui-carousel-padding\": \"0px\",\n\t\t\t\t\t}),\n\t\t\t\t\tmix,\n\t\t\t\t]}\n\t\t\t/>\n\t\t);\n\t};\n}\n\n/**\n * A `<div>` scrolling {@link Carousel.Track} along the inline axis via logical\n * properties for correct writing direction, with mandatory scroll-snap stops;\n * scroll padding reads `--ui-carousel-padding` to clear the track's own padding.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the viewport's markup.\n * @example\n * <Carousel.Viewport id=\"gallery-viewport\">\n * \t<Carousel.Track>{slides}</Carousel.Track>\n * </Carousel.Viewport>\n */\nCarousel.Viewport = function CarouselViewport(handle: Handle<Carousel.ViewportProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"viewport\"\n\t\t\t\tmix={[\n\t\t\t\t\tattrs({ role: DEFAULT_VIEWPORT_ROLE, tabIndex: DEFAULT_VIEWPORT_TAB_INDEX }),\n\t\t\t\t\twhen(\"&:focus-visible\", outline({ color: \"brand.ring\", offset: 2 })),\n\t\t\t\t\traw({\n\t\t\t\t\t\toverflowInline: \"auto\",\n\t\t\t\t\t\toverflowBlock: \"hidden\",\n\t\t\t\t\t\tscrollBehavior: \"smooth\",\n\t\t\t\t\t\tscrollSnapType: \"inline mandatory\",\n\t\t\t\t\t\tscrollPaddingInline: \"var(--ui-carousel-padding, 0px)\",\n\t\t\t\t\t\t\"-webkit-overflow-scrolling\": \"touch\",\n\t\t\t\t\t}),\n\t\t\t\t\tmedia(\"(prefers-reduced-motion: reduce)\", raw({ scrollBehavior: \"auto\" })),\n\t\t\t\t\tmix,\n\t\t\t\t]}\n\t\t\t/>\n\t\t);\n\t};\n};\n\n/**\n * The carousel's slide row: a `<div>` laying its {@link Carousel.Slide}\n * children out in one inline row, gapped by `--ui-carousel-gap` and padded by\n * `--ui-carousel-padding` so the first and last slide can still center.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the track's markup.\n * @example\n * <Carousel.Track>\n * \t<Carousel.Slide>{firstSlide}</Carousel.Slide>\n * \t<Carousel.Slide>{secondSlide}</Carousel.Slide>\n * </Carousel.Track>\n */\nCarousel.Track = function CarouselTrack(handle: Handle<Carousel.TrackProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"track\"\n\t\t\t\tmix={[\n\t\t\t\t\tflex(),\n\t\t\t\t\tgap(\"var(--ui-carousel-gap, 1rem)\"),\n\t\t\t\t\tpi(\"var(--ui-carousel-padding, 0px)\"),\n\t\t\t\t\tmix,\n\t\t\t\t]}\n\t\t\t/>\n\t\t);\n\t};\n};\n\n/**\n * A single slide: a `<div>` held at `--ui-carousel-slide-size` along the\n * inline axis, snapping to its inline-start edge so the viewport settles on a\n * slide boundary.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the slide's markup.\n * @example\n * <Carousel.Slide><img src={photo.src} alt={photo.alt} /></Carousel.Slide>\n */\nCarousel.Slide = function CarouselSlide(handle: Handle<Carousel.SlideProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"slide\"\n\t\t\t\tmix={[\n\t\t\t\t\tattrs({ role: DEFAULT_SLIDE_ROLE }),\n\t\t\t\t\tgrow(0),\n\t\t\t\t\tshrink(0),\n\t\t\t\t\t/**\n\t\t\t\t\t * The slide snaps to the viewport's start edge and leaves the scroll free to pass it:\n\t\t\t\t\t * `scroll-snap-stop: always` clamps programmatic scrolls too, so every dot would move\n\t\t\t\t\t * one slide and none would reach the slide it names.\n\t\t\t\t\t */\n\t\t\t\t\traw({\n\t\t\t\t\t\tflexBasis: \"var(--ui-carousel-slide-size, 18rem)\",\n\t\t\t\t\t\tscrollSnapAlign: \"start\",\n\t\t\t\t\t}),\n\t\t\t\t\tmix,\n\t\t\t\t]}\n\t\t\t/>\n\t\t);\n\t};\n};\n\n/**\n * The carousel's control row: a `<div>` laying {@link Carousel.Previous} and\n * {@link Carousel.Next} out as an end-aligned, vertically centered row.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the control row's markup.\n * @example\n * <Carousel.Controls>\n * \t<Carousel.Previous commandfor=\"gallery-viewport\" aria-label={t(\"gallery.previous\")} />\n * \t<Carousel.Next commandfor=\"gallery-viewport\" aria-label={t(\"gallery.next\")} />\n * </Carousel.Controls>\n */\nCarousel.Controls = function CarouselControls(handle: Handle<Carousel.ControlsProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"controls\"\n\t\t\t\tmix={[flex(), items(\"center\"), gap(2), justify(\"end\"), mix]}\n\t\t\t/>\n\t\t);\n\t};\n};\n\n/**\n * A static control scrolling {@link Carousel.Viewport} named by `commandfor` back\n * one slide when a hydrated `carouselControls()` mixin handles `\"--ui-prev\"`; custom\n * `children` replacing the chevron still need their own `aria-label`.\n *\n * @param handle Runtime handle carrying the host button's props.\n * @returns The render function producing the control's markup.\n * @example\n * <Carousel.Previous commandfor=\"gallery-viewport\" aria-label={t(\"gallery.previous\")} />\n */\nCarousel.Previous = function CarouselPrevious(handle: Handle<Carousel.PreviousProps>) {\n\treturn () => {\n\t\tlet { variant, color, size, command, children, mix, ...rest } = handle.props;\n\t\tlet resolvedVariant = variant ?? DEFAULT_CONTROL_VARIANT;\n\t\tlet resolvedColor = color ?? DEFAULT_CONTROL_COLOR;\n\t\tlet resolvedSize = size ?? DEFAULT_CONTROL_SIZE;\n\t\tlet resolvedCommand = command ?? DEFAULT_PREVIOUS_COMMAND;\n\n\t\treturn (\n\t\t\t<Button\n\t\t\t\t{...rest}\n\t\t\t\ttype=\"button\"\n\t\t\t\tvariant={resolvedVariant}\n\t\t\t\tcolor={resolvedColor}\n\t\t\t\tsize={resolvedSize}\n\t\t\t\tcommand={resolvedCommand}\n\t\t\t\tdata-slot=\"previous\"\n\t\t\t\tmix={[minIs(0), when(\"& > svg\", [is(4), bs(4)]), mix]}\n\t\t\t>\n\t\t\t\t{children ?? <ChevronLeftIcon />}\n\t\t\t</Button>\n\t\t);\n\t};\n};\n\n/**\n * A static control scrolling {@link Carousel.Viewport} named by `commandfor` forward\n * one slide when a hydrated `carouselControls()` mixin handles `\"--ui-next\"`; custom\n * `children` replacing the chevron still need their own `aria-label`.\n *\n * @param handle Runtime handle carrying the host button's props.\n * @returns The render function producing the control's markup.\n * @example\n * <Carousel.Next commandfor=\"gallery-viewport\" aria-label={t(\"gallery.next\")} />\n */\nCarousel.Next = function CarouselNext(handle: Handle<Carousel.NextProps>) {\n\treturn () => {\n\t\tlet { variant, color, size, command, children, mix, ...rest } = handle.props;\n\t\tlet resolvedVariant = variant ?? DEFAULT_CONTROL_VARIANT;\n\t\tlet resolvedColor = color ?? DEFAULT_CONTROL_COLOR;\n\t\tlet resolvedSize = size ?? DEFAULT_CONTROL_SIZE;\n\t\tlet resolvedCommand = command ?? DEFAULT_NEXT_COMMAND;\n\n\t\treturn (\n\t\t\t<Button\n\t\t\t\t{...rest}\n\t\t\t\ttype=\"button\"\n\t\t\t\tvariant={resolvedVariant}\n\t\t\t\tcolor={resolvedColor}\n\t\t\t\tsize={resolvedSize}\n\t\t\t\tcommand={resolvedCommand}\n\t\t\t\tdata-slot=\"next\"\n\t\t\t\tmix={[minIs(0), when(\"& > svg\", [is(4), bs(4)]), mix]}\n\t\t\t>\n\t\t\t\t{children ?? <ChevronRightIcon />}\n\t\t\t</Button>\n\t\t);\n\t};\n};\n"
12
+ "content": "/**\n * A horizontally scrolling collection of slides riding native CSS scroll snap,\n * so swiping or scrolling advances between slides with no script in the\n * baseline. {@link Carousel.Viewport} is the scrolling surface,\n * {@link Carousel.Track} rows up its {@link Carousel.Slide} children, and\n * {@link Carousel.Previous}/{@link Carousel.Next} are invoker buttons a paired\n * mixin wires into working controls.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps } from \"remix/component\";\n\nimport { ChevronLeftIcon, ChevronRightIcon } from \"@sdxc/icons\";\nimport { outline } from \"@sdxc/u/color\";\nimport { raw, vars, mergeMix } from \"@sdxc/u/general\";\nimport { flex, flexCol, gap, grow, items, justify, shrink } from \"@sdxc/u/layout\";\nimport { media } from \"@sdxc/u/responsive\";\nimport { bs, is, minIs, pi } from \"@sdxc/u/size\";\nimport { when } from \"@sdxc/u/state\";\nimport { attrs } from \"remix/component\";\n\nimport { Button } from \"@sdxc/ui/button\";\n\n/** Native ARIA role applied to {@link Carousel.Viewport} unless a consumer overrides it. */\nconst DEFAULT_VIEWPORT_ROLE = \"group\";\n\n/**\n * Native tab-stop index applied to {@link Carousel.Viewport} unless a consumer\n * overrides it, so the scrollable region is reachable by keyboard even before\n * any control is wired up.\n */\nconst DEFAULT_VIEWPORT_TAB_INDEX = 0;\n\n/** Native ARIA role applied to {@link Carousel.Slide} unless a consumer overrides it. */\nconst DEFAULT_SLIDE_ROLE = \"group\";\n\n/**\n * Visual weight {@link Carousel.Previous} and {@link Carousel.Next} fall back\n * to when `variant` is omitted.\n */\nconst DEFAULT_CONTROL_VARIANT: Button.Variant = \"ghost\";\n\n/**\n * Semantic color role {@link Carousel.Previous} and {@link Carousel.Next} fall\n * back to when `color` is omitted.\n */\nconst DEFAULT_CONTROL_COLOR: Button.Color = \"neutral\";\n\n/**\n * Size variant {@link Carousel.Previous} and {@link Carousel.Next} fall back to\n * when `size` is omitted.\n */\nconst DEFAULT_CONTROL_SIZE: Button.Size = \"sm\";\n\n/** Invoker Commands verb {@link Carousel.Previous} falls back to when `command` is omitted. */\nconst DEFAULT_PREVIOUS_COMMAND = \"--ui-prev\";\n\n/** Invoker Commands verb {@link Carousel.Next} falls back to when `command` is omitted. */\nconst DEFAULT_NEXT_COMMAND = \"--ui-next\";\n\n/**\n * Prop types for {@link Carousel} and its compound parts.\n */\nexport namespace Carousel {\n\t/**\n\t * Every native `<section>` attribute, unchanged, plus the `mix`\n\t * passthrough. Override `--ui-carousel-gap`, `--ui-carousel-slide-size`, or\n\t * `--ui-carousel-padding` per instance through the inherited `style` prop.\n\t */\n\texport interface Props extends TagProps<\"section\"> {}\n\n\t/**\n\t * Every native `<div>` attribute, unchanged, plus the `mix` passthrough.\n\t * Give it an `id` for the controls' `commandfor` prop to target, and pair a\n\t * `carouselControls()` mixin on it to make those controls scroll it.\n\t */\n\texport interface ViewportProps extends TagProps<\"div\"> {}\n\n\t/**\n\t * Every native `<div>` attribute, unchanged, plus the `mix` passthrough.\n\t */\n\texport interface TrackProps extends TagProps<\"div\"> {}\n\n\t/**\n\t * Every native `<div>` attribute, unchanged, plus the `mix` passthrough.\n\t */\n\texport interface SlideProps extends TagProps<\"div\"> {}\n\n\t/**\n\t * Every native `<div>` attribute, unchanged, plus the `mix` passthrough.\n\t */\n\texport interface ControlsProps extends TagProps<\"div\"> {}\n\n\t/**\n\t * Every {@link Button.Props} field, with `commandfor` required and `command`\n\t * narrowed to the verb the paired mixin listens for.\n\t */\n\texport interface PreviousProps extends Omit<Button.Props, \"commandfor\" | \"command\"> {\n\t\t/** `id` of the {@link Carousel.Viewport} this control scrolls back through. */\n\t\tcommandfor: string;\n\t\t/** Invoker Commands verb a `carouselControls()` mixin listens for. Defaults to `\"--ui-prev\"`. */\n\t\tcommand?: \"--ui-prev\";\n\t}\n\n\t/**\n\t * Every {@link Button.Props} field, with `commandfor` required and `command`\n\t * narrowed to the verb the paired mixin listens for.\n\t */\n\texport interface NextProps extends Omit<Button.Props, \"commandfor\" | \"command\"> {\n\t\t/** `id` of the {@link Carousel.Viewport} this control scrolls forward through. */\n\t\tcommandfor: string;\n\t\t/** Invoker Commands verb a `carouselControls()` mixin listens for. Defaults to `\"--ui-next\"`. */\n\t\tcommand?: \"--ui-next\";\n\t}\n}\n\n/**\n * The carousel root: a `<section>` stacking {@link Carousel.Viewport} and\n * {@link Carousel.Controls} in a column, declaring the `--ui-carousel-*`\n * custom properties its descendants read with per-instance defaults.\n *\n * @param handle Runtime handle carrying the host `<section>`'s props.\n * @returns The render function producing the carousel's markup.\n * @example\n * <Carousel aria-label={t(\"gallery.label\")}>\n * \t<Carousel.Viewport id=\"gallery-viewport\">\n * \t\t<Carousel.Track>\n * \t\t\t<Carousel.Slide><img src={photo.src} alt={photo.alt} /></Carousel.Slide>\n * \t\t</Carousel.Track>\n * \t</Carousel.Viewport>\n * \t<Carousel.Controls>\n * \t\t<Carousel.Previous commandfor=\"gallery-viewport\" aria-label={t(\"gallery.previous\")} />\n * \t\t<Carousel.Next commandfor=\"gallery-viewport\" aria-label={t(\"gallery.next\")} />\n * \t</Carousel.Controls>\n * </Carousel>\n * @example\n * // Landing browser-flow strip: widen `--ui-carousel-slide-size` for product\n * // frames and keep Previous/Next on `size=\"sm\"` so controls stay quiet.\n * <Carousel\n * \taria-label={t(\"flows.label\")}\n * \tstyle={{ \"--ui-carousel-slide-size\": \"28rem\" }}\n * >\n * \t<Carousel.Viewport id=\"flows\" mix={[carouselControls()]}>\n * \t\t<Carousel.Track>{slides}</Carousel.Track>\n * \t</Carousel.Viewport>\n * \t<Carousel.Controls>\n * \t\t<Carousel.Previous commandfor=\"flows\" aria-label={t(\"flows.previous\")} />\n * \t\t<Carousel.Next commandfor=\"flows\" aria-label={t(\"flows.next\")} />\n * \t</Carousel.Controls>\n * </Carousel>\n */\nexport function Carousel(handle: Handle<Carousel.Props>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<section\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"carousel\"\n\t\t\t\tmix={mergeMix(\n\t\t\t\t\t[\n\t\t\t\t\t\tflex(),\n\t\t\t\t\t\tflexCol(),\n\t\t\t\t\t\tgap(3),\n\t\t\t\t\t\tvars({\n\t\t\t\t\t\t\t\"ui-carousel-gap\": \"1rem\",\n\t\t\t\t\t\t\t\"ui-carousel-slide-size\": \"18rem\",\n\t\t\t\t\t\t\t\"ui-carousel-padding\": \"0px\",\n\t\t\t\t\t\t}),\n\t\t\t\t\t],\n\t\t\t\t\tmix,\n\t\t\t\t)}\n\t\t\t/>\n\t\t);\n\t};\n}\n\n/**\n * A `<div>` scrolling {@link Carousel.Track} along the inline axis via logical\n * properties for correct writing direction, with mandatory scroll-snap stops;\n * scroll padding reads `--ui-carousel-padding` to clear the track's own padding.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the viewport's markup.\n * @example\n * <Carousel.Viewport id=\"gallery-viewport\">\n * \t<Carousel.Track>{slides}</Carousel.Track>\n * </Carousel.Viewport>\n */\nCarousel.Viewport = function CarouselViewport(handle: Handle<Carousel.ViewportProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"viewport\"\n\t\t\t\tmix={mergeMix(\n\t\t\t\t\t[\n\t\t\t\t\t\tattrs({ role: DEFAULT_VIEWPORT_ROLE, tabIndex: DEFAULT_VIEWPORT_TAB_INDEX }),\n\t\t\t\t\t\twhen(\"&:focus-visible\", outline({ color: \"brand.ring\", offset: 2 })),\n\t\t\t\t\t\traw({\n\t\t\t\t\t\t\toverflowInline: \"auto\",\n\t\t\t\t\t\t\toverflowBlock: \"hidden\",\n\t\t\t\t\t\t\tscrollBehavior: \"smooth\",\n\t\t\t\t\t\t\tscrollSnapType: \"inline mandatory\",\n\t\t\t\t\t\t\tscrollPaddingInline: \"var(--ui-carousel-padding, 0px)\",\n\t\t\t\t\t\t\t\"-webkit-overflow-scrolling\": \"touch\",\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tmedia(\"(prefers-reduced-motion: reduce)\", raw({ scrollBehavior: \"auto\" })),\n\t\t\t\t\t],\n\t\t\t\t\tmix,\n\t\t\t\t)}\n\t\t\t/>\n\t\t);\n\t};\n};\n\n/**\n * The carousel's slide row: a `<div>` laying its {@link Carousel.Slide}\n * children out in one inline row, gapped by `--ui-carousel-gap` and padded by\n * `--ui-carousel-padding` so the first and last slide can still center.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the track's markup.\n * @example\n * <Carousel.Track>\n * \t<Carousel.Slide>{firstSlide}</Carousel.Slide>\n * \t<Carousel.Slide>{secondSlide}</Carousel.Slide>\n * </Carousel.Track>\n */\nCarousel.Track = function CarouselTrack(handle: Handle<Carousel.TrackProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"track\"\n\t\t\t\tmix={mergeMix(\n\t\t\t\t\t[flex(), gap(\"var(--ui-carousel-gap, 1rem)\"), pi(\"var(--ui-carousel-padding, 0px)\")],\n\t\t\t\t\tmix,\n\t\t\t\t)}\n\t\t\t/>\n\t\t);\n\t};\n};\n\n/**\n * A single slide: a `<div>` held at `--ui-carousel-slide-size` along the\n * inline axis, snapping to its inline-start edge so the viewport settles on a\n * slide boundary.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the slide's markup.\n * @example\n * <Carousel.Slide><img src={photo.src} alt={photo.alt} /></Carousel.Slide>\n */\nCarousel.Slide = function CarouselSlide(handle: Handle<Carousel.SlideProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"slide\"\n\t\t\t\tmix={mergeMix(\n\t\t\t\t\t[\n\t\t\t\t\t\tattrs({ role: DEFAULT_SLIDE_ROLE }),\n\t\t\t\t\t\tgrow(0),\n\t\t\t\t\t\tshrink(0),\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * The slide snaps to the viewport's start edge and leaves the scroll free to pass it:\n\t\t\t\t\t\t * `scroll-snap-stop: always` clamps programmatic scrolls too, so every dot would move\n\t\t\t\t\t\t * one slide and none would reach the slide it names.\n\t\t\t\t\t\t */\n\t\t\t\t\t\traw({\n\t\t\t\t\t\t\tflexBasis: \"var(--ui-carousel-slide-size, 18rem)\",\n\t\t\t\t\t\t\tscrollSnapAlign: \"start\",\n\t\t\t\t\t\t}),\n\t\t\t\t\t],\n\t\t\t\t\tmix,\n\t\t\t\t)}\n\t\t\t/>\n\t\t);\n\t};\n};\n\n/**\n * The carousel's control row: a `<div>` laying {@link Carousel.Previous} and\n * {@link Carousel.Next} out as an end-aligned, vertically centered row.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the control row's markup.\n * @example\n * <Carousel.Controls>\n * \t<Carousel.Previous commandfor=\"gallery-viewport\" aria-label={t(\"gallery.previous\")} />\n * \t<Carousel.Next commandfor=\"gallery-viewport\" aria-label={t(\"gallery.next\")} />\n * </Carousel.Controls>\n */\nCarousel.Controls = function CarouselControls(handle: Handle<Carousel.ControlsProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"controls\"\n\t\t\t\tmix={mergeMix([flex(), items(\"center\"), gap(2), justify(\"end\")], mix)}\n\t\t\t/>\n\t\t);\n\t};\n};\n\n/**\n * A static control scrolling {@link Carousel.Viewport} named by `commandfor` back\n * one slide when a hydrated `carouselControls()` mixin handles `\"--ui-prev\"`; custom\n * `children` replacing the chevron still need their own `aria-label`.\n *\n * @param handle Runtime handle carrying the host button's props.\n * @returns The render function producing the control's markup.\n * @example\n * <Carousel.Previous commandfor=\"gallery-viewport\" aria-label={t(\"gallery.previous\")} />\n */\nCarousel.Previous = function CarouselPrevious(handle: Handle<Carousel.PreviousProps>) {\n\treturn () => {\n\t\tlet { variant, color, size, command, children, mix, ...rest } = handle.props;\n\t\tlet resolvedVariant = variant ?? DEFAULT_CONTROL_VARIANT;\n\t\tlet resolvedColor = color ?? DEFAULT_CONTROL_COLOR;\n\t\tlet resolvedSize = size ?? DEFAULT_CONTROL_SIZE;\n\t\tlet resolvedCommand = command ?? DEFAULT_PREVIOUS_COMMAND;\n\n\t\treturn (\n\t\t\t<Button\n\t\t\t\t{...rest}\n\t\t\t\ttype=\"button\"\n\t\t\t\tvariant={resolvedVariant}\n\t\t\t\tcolor={resolvedColor}\n\t\t\t\tsize={resolvedSize}\n\t\t\t\tcommand={resolvedCommand}\n\t\t\t\tdata-slot=\"previous\"\n\t\t\t\tmix={mergeMix([minIs(0), when(\"& > svg\", [is(4), bs(4)])], mix)}\n\t\t\t>\n\t\t\t\t{children ?? <ChevronLeftIcon />}\n\t\t\t</Button>\n\t\t);\n\t};\n};\n\n/**\n * A static control scrolling {@link Carousel.Viewport} named by `commandfor` forward\n * one slide when a hydrated `carouselControls()` mixin handles `\"--ui-next\"`; custom\n * `children` replacing the chevron still need their own `aria-label`.\n *\n * @param handle Runtime handle carrying the host button's props.\n * @returns The render function producing the control's markup.\n * @example\n * <Carousel.Next commandfor=\"gallery-viewport\" aria-label={t(\"gallery.next\")} />\n */\nCarousel.Next = function CarouselNext(handle: Handle<Carousel.NextProps>) {\n\treturn () => {\n\t\tlet { variant, color, size, command, children, mix, ...rest } = handle.props;\n\t\tlet resolvedVariant = variant ?? DEFAULT_CONTROL_VARIANT;\n\t\tlet resolvedColor = color ?? DEFAULT_CONTROL_COLOR;\n\t\tlet resolvedSize = size ?? DEFAULT_CONTROL_SIZE;\n\t\tlet resolvedCommand = command ?? DEFAULT_NEXT_COMMAND;\n\n\t\treturn (\n\t\t\t<Button\n\t\t\t\t{...rest}\n\t\t\t\ttype=\"button\"\n\t\t\t\tvariant={resolvedVariant}\n\t\t\t\tcolor={resolvedColor}\n\t\t\t\tsize={resolvedSize}\n\t\t\t\tcommand={resolvedCommand}\n\t\t\t\tdata-slot=\"next\"\n\t\t\t\tmix={mergeMix([minIs(0), when(\"& > svg\", [is(4), bs(4)])], mix)}\n\t\t\t>\n\t\t\t\t{children ?? <ChevronRightIcon />}\n\t\t\t</Button>\n\t\t);\n\t};\n};\n"
13
13
  },
14
14
  "test": null
15
15
  }
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "checkbox-group",
3
- "changedIn": "2026.10.2",
3
+ "changedIn": "2026.11.1",
4
4
  "dependencies": [],
5
5
  "exports": [
6
6
  "CheckboxGroup"
7
7
  ],
8
8
  "source": {
9
9
  "path": "checkbox-group.tsx",
10
- "content": "/**\n * A landmark grouping independently toggled checkbox controls into one\n * related set: a `role=\"group\"` host laying children out in a column, or a\n * row when `orientation` is `\"horizontal\"`. Each nested checkbox keeps its\n * own checked state, `name`, and `value`; the host contributes the shared\n * grouping, the layout, and an invalid-state color for composed text.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps } from \"remix/component\";\n\nimport { fg } from \"@sdxc/u/color\";\nimport { flexRow, gap, vstack } from \"@sdxc/u/layout\";\nimport { when } from \"@sdxc/u/state\";\nimport { attrs } from \"remix/component\";\n\nimport { warnIfNoAccessibleLabel } from \"@sdxc/ui/utils\";\n\n/**\n * Announces the host as a related set of controls to assistive technology;\n * {@link attrs} lets a consumer's own `role` win.\n */\nconst DEFAULT_ROLE = \"group\";\n\nconst DEFAULT_ORIENTATION: CheckboxGroup.Orientation = \"vertical\";\n\n/**\n * Prop types for {@link CheckboxGroup}.\n */\nexport namespace CheckboxGroup {\n\t/**\n\t * Axis a group's checkboxes lay out along: a single column, or a single\n\t * row.\n\t */\n\texport type Orientation = \"horizontal\" | \"vertical\";\n\n\t/**\n\t * Props accepted by {@link CheckboxGroup}. Native `<div>` attributes and\n\t * `mix` pass through to the grouping host, so `aria-label`,\n\t * `aria-labelledby`, `aria-describedby`, and `aria-invalid` behave natively.\n\t */\n\texport interface Props extends TagProps<\"div\"> {\n\t\t/** Layout axis. Defaults to {@link DEFAULT_ORIENTATION}. */\n\t\torientation?: Orientation;\n\t}\n}\n\n/**\n * Lays checkbox children out in a column, or a row when `orientation` is\n * `\"horizontal\"`; each nested checkbox keeps its own checked state, `name`,\n * and `value`. `aria-invalid=\"true\"` recolors plain text composed alongside.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the group's markup.\n * @example\n * <CheckboxGroup aria-labelledby=\"fruits-label\">\n * \t<Label id=\"fruits-label\">{t(\"fruits.label\")}</Label>\n * \t<Checkbox name=\"fruits\" value=\"apple\">{t(\"fruits.apple\")}</Checkbox>\n * \t<Checkbox name=\"fruits\" value=\"banana\">{t(\"fruits.banana\")}</Checkbox>\n * \t<Checkbox name=\"fruits\" value=\"orange\">{t(\"fruits.orange\")}</Checkbox>\n * </CheckboxGroup>\n * @example\n * <CheckboxGroup aria-label={t(\"notifications.label\")} orientation=\"horizontal\">\n * \t<Checkbox name=\"notify\" value=\"email\">{t(\"notifications.email\")}</Checkbox>\n * \t<Checkbox name=\"notify\" value=\"sms\">{t(\"notifications.sms\")}</Checkbox>\n * \t<Checkbox name=\"notify\" value=\"push\">{t(\"notifications.push\")}</Checkbox>\n * </CheckboxGroup>\n * @example\n * <CheckboxGroup aria-labelledby=\"terms-label\" aria-invalid=\"true\" aria-describedby=\"terms-error\">\n * \t<Label id=\"terms-label\">{t(\"terms.label\")}</Label>\n * \t<Checkbox name=\"terms\" value=\"accepted\" required>{t(\"terms.accept\")}</Checkbox>\n * \t<FieldError id=\"terms-error\">{t(\"terms.required\")}</FieldError>\n * </CheckboxGroup>\n */\nexport function CheckboxGroup(handle: Handle<CheckboxGroup.Props>) {\n\treturn () => {\n\t\tlet { orientation, mix, ...rest } = handle.props;\n\t\tlet resolvedOrientation = orientation ?? DEFAULT_ORIENTATION;\n\n\t\twarnIfNoAccessibleLabel(\n\t\t\thandle.props,\n\t\t\t\"CheckboxGroup: a group with no `aria-label` or `aria-labelledby` needs one describing the set — assistive technology has no accessible name to announce otherwise.\",\n\t\t);\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tdata-orientation={resolvedOrientation}\n\t\t\t\t{...rest}\n\t\t\t\tmix={[\n\t\t\t\t\tattrs({ role: DEFAULT_ROLE }),\n\t\t\t\t\tvstack({ gap: 2 }),\n\t\t\t\t\twhen('&[data-orientation=\"horizontal\"]', [flexRow(), gap(4)]),\n\t\t\t\t\twhen('&[aria-invalid=\"true\"]', fg(\"danger\")),\n\t\t\t\t\tmix,\n\t\t\t\t]}\n\t\t\t/>\n\t\t);\n\t};\n}\n"
10
+ "content": "/**\n * A landmark grouping independently toggled checkbox controls into one\n * related set: a `role=\"group\"` host laying children out in a column, or a\n * row when `orientation` is `\"horizontal\"`. Each nested checkbox keeps its\n * own checked state, `name`, and `value`; the host contributes the shared\n * grouping, the layout, and an invalid-state color for composed text.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps } from \"remix/component\";\n\nimport { fg } from \"@sdxc/u/color\";\nimport { mergeMix } from \"@sdxc/u/general\";\nimport { flexRow, gap, vstack } from \"@sdxc/u/layout\";\nimport { when } from \"@sdxc/u/state\";\nimport { attrs } from \"remix/component\";\n\nimport { warnIfNoAccessibleLabel } from \"@sdxc/ui/utils\";\n\n/**\n * Announces the host as a related set of controls to assistive technology;\n * {@link attrs} lets a consumer's own `role` win.\n */\nconst DEFAULT_ROLE = \"group\";\n\nconst DEFAULT_ORIENTATION: CheckboxGroup.Orientation = \"vertical\";\n\n/**\n * Prop types for {@link CheckboxGroup}.\n */\nexport namespace CheckboxGroup {\n\t/**\n\t * Axis a group's checkboxes lay out along: a single column, or a single\n\t * row.\n\t */\n\texport type Orientation = \"horizontal\" | \"vertical\";\n\n\t/**\n\t * Props accepted by {@link CheckboxGroup}. Native `<div>` attributes and\n\t * `mix` pass through to the grouping host, so `aria-label`,\n\t * `aria-labelledby`, `aria-describedby`, and `aria-invalid` behave natively.\n\t */\n\texport interface Props extends TagProps<\"div\"> {\n\t\t/** Layout axis. Defaults to {@link DEFAULT_ORIENTATION}. */\n\t\torientation?: Orientation;\n\t}\n}\n\n/**\n * Lays checkbox children out in a column, or a row when `orientation` is\n * `\"horizontal\"`; each nested checkbox keeps its own checked state, `name`,\n * and `value`. `aria-invalid=\"true\"` recolors plain text composed alongside.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the group's markup.\n * @example\n * <CheckboxGroup aria-labelledby=\"fruits-label\">\n * \t<Label id=\"fruits-label\">{t(\"fruits.label\")}</Label>\n * \t<Checkbox name=\"fruits\" value=\"apple\">{t(\"fruits.apple\")}</Checkbox>\n * \t<Checkbox name=\"fruits\" value=\"banana\">{t(\"fruits.banana\")}</Checkbox>\n * \t<Checkbox name=\"fruits\" value=\"orange\">{t(\"fruits.orange\")}</Checkbox>\n * </CheckboxGroup>\n * @example\n * <CheckboxGroup aria-label={t(\"notifications.label\")} orientation=\"horizontal\">\n * \t<Checkbox name=\"notify\" value=\"email\">{t(\"notifications.email\")}</Checkbox>\n * \t<Checkbox name=\"notify\" value=\"sms\">{t(\"notifications.sms\")}</Checkbox>\n * \t<Checkbox name=\"notify\" value=\"push\">{t(\"notifications.push\")}</Checkbox>\n * </CheckboxGroup>\n * @example\n * <CheckboxGroup aria-labelledby=\"terms-label\" aria-invalid=\"true\" aria-describedby=\"terms-error\">\n * \t<Label id=\"terms-label\">{t(\"terms.label\")}</Label>\n * \t<Checkbox name=\"terms\" value=\"accepted\" required>{t(\"terms.accept\")}</Checkbox>\n * \t<FieldError id=\"terms-error\">{t(\"terms.required\")}</FieldError>\n * </CheckboxGroup>\n */\nexport function CheckboxGroup(handle: Handle<CheckboxGroup.Props>) {\n\treturn () => {\n\t\tlet { orientation, mix, ...rest } = handle.props;\n\t\tlet resolvedOrientation = orientation ?? DEFAULT_ORIENTATION;\n\n\t\twarnIfNoAccessibleLabel(\n\t\t\thandle.props,\n\t\t\t\"CheckboxGroup: a group with no `aria-label` or `aria-labelledby` needs one describing the set — assistive technology has no accessible name to announce otherwise.\",\n\t\t);\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tdata-orientation={resolvedOrientation}\n\t\t\t\t{...rest}\n\t\t\t\tmix={mergeMix(\n\t\t\t\t\t[\n\t\t\t\t\t\tattrs({ role: DEFAULT_ROLE }),\n\t\t\t\t\t\tvstack({ gap: 2 }),\n\t\t\t\t\t\twhen('&[data-orientation=\"horizontal\"]', [flexRow(), gap(4)]),\n\t\t\t\t\t\twhen('&[aria-invalid=\"true\"]', fg(\"danger\")),\n\t\t\t\t\t],\n\t\t\t\t\tmix,\n\t\t\t\t)}\n\t\t\t/>\n\t\t);\n\t};\n}\n"
11
11
  },
12
12
  "test": null
13
13
  }
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "checkbox",
3
- "changedIn": "2026.10.13",
3
+ "changedIn": "2026.11.1",
4
4
  "dependencies": [],
5
5
  "exports": [
6
6
  "Checkbox"
7
7
  ],
8
8
  "source": {
9
9
  "path": "checkbox.tsx",
10
- "content": "/**\n * A styled native checkbox: an `<input type=\"checkbox\">` paired with a\n * decorative glyph box that renders its check or dash mark purely from the\n * input's own state, wrapped in a `<label>` so clicking or tapping anywhere\n * in the row — box, glyph, or label text alike — toggles the control.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps, RemixNode } from \"remix/component\";\n\nimport { CheckIcon, MinusIcon } from \"@sdxc/icons\";\nimport { visuallyHidden } from \"@sdxc/u/a11y\";\nimport { bg, border, fg, outline } from \"@sdxc/u/color\";\nimport { opacity, rounded } from \"@sdxc/u/effects\";\nimport { cursor } from \"@sdxc/u/general\";\nimport { block, center, hidden, hstack, relative, shrink } from \"@sdxc/u/layout\";\nimport { bs, is } from \"@sdxc/u/size\";\nimport { when } from \"@sdxc/u/state\";\n\nimport { interactiveTransition } from \"@sdxc/ui/styles\";\nimport { warnIfNoAccessibleName } from \"@sdxc/ui/utils\";\n\n/** Semantic color role {@link Checkbox} falls back to when `color` is omitted. */\nconst DEFAULT_COLOR: Checkbox.Color = \"neutral\";\n\n/**\n * Prop types for {@link Checkbox}.\n */\nexport namespace Checkbox {\n\t/**\n\t * Semantic color role, each mapped to its matching `--ui-*` variables.\n\t */\n\texport type Color = \"brand\" | \"neutral\" | \"success\" | \"warning\" | \"danger\";\n\n\t/**\n\t * Per-part styling for the elements this convenience wrapper composes\n\t * internally alongside its own host `<input>`.\n\t */\n\texport interface PartsProps {\n\t\t/** Styling for the decorative box rendering the checkmark or dash glyph. */\n\t\tbox?: TagProps<\"span\">[\"mix\"];\n\t}\n\n\t/**\n\t * Props accepted by {@link Checkbox}. Extends every native `<input>`\n\t * attribute except `type`, fixed to `\"checkbox\"`; `mix` styles that same\n\t * `<input>` host, and `role` is narrowed to what a checkbox input allows.\n\t */\n\texport interface Props extends Omit<TagProps<\"input\">, \"type\" | \"role\"> {\n\t\t/** ARIA role override, restricted to what a checkbox input may carry. */\n\t\trole?: \"checkbox\" | \"button\" | \"menuitemcheckbox\" | \"option\" | \"switch\";\n\t\t/** Semantic color role. Defaults to {@link DEFAULT_COLOR}. */\n\t\tcolor?: Color;\n\t\t/**\n\t\t * Label content rendered after the box, inside the same native\n\t\t * `<label>` wrapping the row — clicking any of it toggles the checkbox\n\t\t * natively, with no separate `htmlFor`/`id` pair required.\n\t\t */\n\t\tchildren?: RemixNode;\n\t\t/** Per-part styling for this wrapper's internally composed elements. */\n\t\tparts?: PartsProps;\n\t}\n}\n\n/**\n * The box precedes the input in source order so its `:has(~ input:…)` rules\n * can read state directly off it, keeping the whole control CSS-driven;\n * `shrink(0)` also keeps the box square regardless of label length.\n *\n * @param handle Runtime handle carrying the host `<input>`'s props.\n * @returns The render function producing the checkbox's markup.\n * @example\n * <Checkbox name=\"terms\" required>{t(\"signup.acceptTerms\")}</Checkbox>\n * @example\n * <Checkbox color=\"danger\" checked={row.flagged} aria-label={t(\"table.flagRow\")} />\n * @example\n * <Checkbox disabled defaultChecked>{t(\"settings.legacyOptIn\")}</Checkbox>\n */\nexport function Checkbox(handle: Handle<Checkbox.Props>) {\n\treturn () => {\n\t\tlet { color, children, parts, mix, ...rest } = handle.props;\n\t\tlet resolvedColor = color ?? DEFAULT_COLOR;\n\n\t\twarnIfNoAccessibleName(\n\t\t\thandle.props,\n\t\t\tchildren,\n\t\t\t\"Checkbox: a checkbox with no visible label text needs an `aria-label` describing what it toggles — assistive technology has no accessible name to announce otherwise.\",\n\t\t);\n\n\t\treturn (\n\t\t\t<label mix={[relative(), hstack({ gap: 2, align: \"center\" })]}>\n\t\t\t\t<span\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tdata-slot=\"box\"\n\t\t\t\t\tdata-color={resolvedColor}\n\t\t\t\t\tmix={[\n\t\t\t\t\t\tcenter(),\n\t\t\t\t\t\tis(\"var(--ui-checkbox-size, 1.25rem)\"),\n\t\t\t\t\t\tbs(\"var(--ui-checkbox-size, 1.25rem)\"),\n\t\t\t\t\t\tshrink(0),\n\t\t\t\t\t\trounded(\"sm\"),\n\t\t\t\t\t\tborder({ width: 2, color: \"neutral.strong\" }),\n\t\t\t\t\t\tbg(\"neutral.tint\"),\n\t\t\t\t\t\tinteractiveTransition(),\n\n\t\t\t\t\t\twhen(\"& > svg\", [hidden(), is(\"0.75rem\"), bs(\"0.75rem\")]),\n\t\t\t\t\t\twhen(\"&:has(~ input:checked) > svg:first-child\", block()),\n\t\t\t\t\t\twhen(\"&:has(~ input:indeterminate) > svg:last-child\", block()),\n\n\t\t\t\t\t\twhen(\n\t\t\t\t\t\t\t'&[data-color=\"brand\"]',\n\t\t\t\t\t\t\twhen(\"&:has(~ input:checked), &:has(~ input:indeterminate)\", [\n\t\t\t\t\t\t\t\tborder(\"brand.solid\"),\n\t\t\t\t\t\t\t\tbg(\"brand.solid\"),\n\t\t\t\t\t\t\t\tfg(\"brand.onSolid\"),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t),\n\t\t\t\t\t\twhen(\n\t\t\t\t\t\t\t'&[data-color=\"neutral\"]',\n\t\t\t\t\t\t\twhen(\"&:has(~ input:checked), &:has(~ input:indeterminate)\", [\n\t\t\t\t\t\t\t\tborder(\"neutral.solid\"),\n\t\t\t\t\t\t\t\tbg(\"neutral.solid\"),\n\t\t\t\t\t\t\t\tfg(\"neutral.onSolid\"),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t),\n\t\t\t\t\t\twhen(\n\t\t\t\t\t\t\t'&[data-color=\"success\"]',\n\t\t\t\t\t\t\twhen(\"&:has(~ input:checked), &:has(~ input:indeterminate)\", [\n\t\t\t\t\t\t\t\tborder(\"success.solid\"),\n\t\t\t\t\t\t\t\tbg(\"success.solid\"),\n\t\t\t\t\t\t\t\tfg(\"success.onSolid\"),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t),\n\t\t\t\t\t\twhen(\n\t\t\t\t\t\t\t'&[data-color=\"warning\"]',\n\t\t\t\t\t\t\twhen(\"&:has(~ input:checked), &:has(~ input:indeterminate)\", [\n\t\t\t\t\t\t\t\tborder(\"warning.solid\"),\n\t\t\t\t\t\t\t\tbg(\"warning.solid\"),\n\t\t\t\t\t\t\t\tfg(\"warning.onSolid\"),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t),\n\t\t\t\t\t\twhen(\n\t\t\t\t\t\t\t'&[data-color=\"danger\"]',\n\t\t\t\t\t\t\twhen(\"&:has(~ input:checked), &:has(~ input:indeterminate)\", [\n\t\t\t\t\t\t\t\tborder(\"danger.solid\"),\n\t\t\t\t\t\t\t\tbg(\"danger.solid\"),\n\t\t\t\t\t\t\t\tfg(\"danger.onSolid\"),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t),\n\n\t\t\t\t\t\twhen(\"&:has(~ input:focus-visible)\", [\n\t\t\t\t\t\t\toutline({ color: \"brand.ring\", offset: 2 }),\n\t\t\t\t\t\t\twhen('&[data-color=\"neutral\"]', outline(\"neutral.ring\")),\n\t\t\t\t\t\t\twhen('&[data-color=\"success\"]', outline(\"success.ring\")),\n\t\t\t\t\t\t\twhen('&[data-color=\"warning\"]', outline(\"warning.ring\")),\n\t\t\t\t\t\t\twhen('&[data-color=\"danger\"]', outline(\"danger.ring\")),\n\t\t\t\t\t\t]),\n\n\t\t\t\t\t\twhen(\"&:has(~ input:disabled)\", [cursor(\"not-allowed\"), opacity(50)]),\n\n\t\t\t\t\t\tparts?.box,\n\t\t\t\t\t]}\n\t\t\t\t>\n\t\t\t\t\t<CheckIcon />\n\t\t\t\t\t<MinusIcon />\n\t\t\t\t</span>\n\t\t\t\t<input type=\"checkbox\" {...rest} mix={[visuallyHidden(), mix]} />\n\t\t\t\t{children}\n\t\t\t</label>\n\t\t);\n\t};\n}\n"
10
+ "content": "/**\n * A styled native checkbox: an `<input type=\"checkbox\">` paired with a\n * decorative glyph box that renders its check or dash mark purely from the\n * input's own state, wrapped in a `<label>` so clicking or tapping anywhere\n * in the row — box, glyph, or label text alike — toggles the control.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps, RemixNode } from \"remix/component\";\n\nimport { CheckIcon, MinusIcon } from \"@sdxc/icons\";\nimport { visuallyHidden } from \"@sdxc/u/a11y\";\nimport { bg, border, fg, outline } from \"@sdxc/u/color\";\nimport { opacity, rounded } from \"@sdxc/u/effects\";\nimport { cursor, mergeMix } from \"@sdxc/u/general\";\nimport { block, center, hidden, hstack, relative, shrink } from \"@sdxc/u/layout\";\nimport { bs, is } from \"@sdxc/u/size\";\nimport { when } from \"@sdxc/u/state\";\n\nimport { interactiveTransition } from \"@sdxc/ui/styles\";\nimport { warnIfNoAccessibleName } from \"@sdxc/ui/utils\";\n\n/** Semantic color role {@link Checkbox} falls back to when `color` is omitted. */\nconst DEFAULT_COLOR: Checkbox.Color = \"neutral\";\n\n/**\n * Prop types for {@link Checkbox}.\n */\nexport namespace Checkbox {\n\t/**\n\t * Semantic color role, each mapped to its matching `--ui-*` variables.\n\t */\n\texport type Color = \"brand\" | \"neutral\" | \"success\" | \"warning\" | \"danger\";\n\n\t/**\n\t * Per-part styling for the elements this convenience wrapper composes\n\t * internally alongside its own host `<input>`.\n\t */\n\texport interface PartsProps {\n\t\t/** Styling for the decorative box rendering the checkmark or dash glyph. */\n\t\tbox?: TagProps<\"span\">[\"mix\"];\n\t}\n\n\t/**\n\t * Props accepted by {@link Checkbox}. Extends every native `<input>`\n\t * attribute except `type`, fixed to `\"checkbox\"`; `mix` styles that same\n\t * `<input>` host, and `role` is narrowed to what a checkbox input allows.\n\t */\n\texport interface Props extends Omit<TagProps<\"input\">, \"type\" | \"role\"> {\n\t\t/** ARIA role override, restricted to what a checkbox input may carry. */\n\t\trole?: \"checkbox\" | \"button\" | \"menuitemcheckbox\" | \"option\" | \"switch\";\n\t\t/** Semantic color role. Defaults to {@link DEFAULT_COLOR}. */\n\t\tcolor?: Color;\n\t\t/**\n\t\t * Label content rendered after the box, inside the same native\n\t\t * `<label>` wrapping the row — clicking any of it toggles the checkbox\n\t\t * natively, with no separate `htmlFor`/`id` pair required.\n\t\t */\n\t\tchildren?: RemixNode;\n\t\t/** Per-part styling for this wrapper's internally composed elements. */\n\t\tparts?: PartsProps;\n\t}\n}\n\n/**\n * The box precedes the input in source order so its `:has(~ input:…)` rules\n * can read state directly off it, keeping the whole control CSS-driven;\n * `shrink(0)` also keeps the box square regardless of label length.\n *\n * @param handle Runtime handle carrying the host `<input>`'s props.\n * @returns The render function producing the checkbox's markup.\n * @example\n * <Checkbox name=\"terms\" required>{t(\"signup.acceptTerms\")}</Checkbox>\n * @example\n * <Checkbox color=\"danger\" checked={row.flagged} aria-label={t(\"table.flagRow\")} />\n * @example\n * <Checkbox disabled defaultChecked>{t(\"settings.legacyOptIn\")}</Checkbox>\n */\nexport function Checkbox(handle: Handle<Checkbox.Props>) {\n\treturn () => {\n\t\tlet { color, children, parts, mix, ...rest } = handle.props;\n\t\tlet resolvedColor = color ?? DEFAULT_COLOR;\n\n\t\twarnIfNoAccessibleName(\n\t\t\thandle.props,\n\t\t\tchildren,\n\t\t\t\"Checkbox: a checkbox with no visible label text needs an `aria-label` describing what it toggles — assistive technology has no accessible name to announce otherwise.\",\n\t\t);\n\n\t\treturn (\n\t\t\t<label mix={[relative(), hstack({ gap: 2, align: \"center\" })]}>\n\t\t\t\t<span\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tdata-slot=\"box\"\n\t\t\t\t\tdata-color={resolvedColor}\n\t\t\t\t\tmix={[\n\t\t\t\t\t\tcenter(),\n\t\t\t\t\t\tis(\"var(--ui-checkbox-size, 1.25rem)\"),\n\t\t\t\t\t\tbs(\"var(--ui-checkbox-size, 1.25rem)\"),\n\t\t\t\t\t\tshrink(0),\n\t\t\t\t\t\trounded(\"sm\"),\n\t\t\t\t\t\tborder({ width: 2, color: \"neutral.strong\" }),\n\t\t\t\t\t\tbg(\"neutral.tint\"),\n\t\t\t\t\t\tinteractiveTransition(),\n\n\t\t\t\t\t\twhen(\"& > svg\", [hidden(), is(\"0.75rem\"), bs(\"0.75rem\")]),\n\t\t\t\t\t\twhen(\"&:has(~ input:checked) > svg:first-child\", block()),\n\t\t\t\t\t\twhen(\"&:has(~ input:indeterminate) > svg:last-child\", block()),\n\n\t\t\t\t\t\twhen(\n\t\t\t\t\t\t\t'&[data-color=\"brand\"]',\n\t\t\t\t\t\t\twhen(\"&:has(~ input:checked), &:has(~ input:indeterminate)\", [\n\t\t\t\t\t\t\t\tborder(\"brand.solid\"),\n\t\t\t\t\t\t\t\tbg(\"brand.solid\"),\n\t\t\t\t\t\t\t\tfg(\"brand.onSolid\"),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t),\n\t\t\t\t\t\twhen(\n\t\t\t\t\t\t\t'&[data-color=\"neutral\"]',\n\t\t\t\t\t\t\twhen(\"&:has(~ input:checked), &:has(~ input:indeterminate)\", [\n\t\t\t\t\t\t\t\tborder(\"neutral.solid\"),\n\t\t\t\t\t\t\t\tbg(\"neutral.solid\"),\n\t\t\t\t\t\t\t\tfg(\"neutral.onSolid\"),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t),\n\t\t\t\t\t\twhen(\n\t\t\t\t\t\t\t'&[data-color=\"success\"]',\n\t\t\t\t\t\t\twhen(\"&:has(~ input:checked), &:has(~ input:indeterminate)\", [\n\t\t\t\t\t\t\t\tborder(\"success.solid\"),\n\t\t\t\t\t\t\t\tbg(\"success.solid\"),\n\t\t\t\t\t\t\t\tfg(\"success.onSolid\"),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t),\n\t\t\t\t\t\twhen(\n\t\t\t\t\t\t\t'&[data-color=\"warning\"]',\n\t\t\t\t\t\t\twhen(\"&:has(~ input:checked), &:has(~ input:indeterminate)\", [\n\t\t\t\t\t\t\t\tborder(\"warning.solid\"),\n\t\t\t\t\t\t\t\tbg(\"warning.solid\"),\n\t\t\t\t\t\t\t\tfg(\"warning.onSolid\"),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t),\n\t\t\t\t\t\twhen(\n\t\t\t\t\t\t\t'&[data-color=\"danger\"]',\n\t\t\t\t\t\t\twhen(\"&:has(~ input:checked), &:has(~ input:indeterminate)\", [\n\t\t\t\t\t\t\t\tborder(\"danger.solid\"),\n\t\t\t\t\t\t\t\tbg(\"danger.solid\"),\n\t\t\t\t\t\t\t\tfg(\"danger.onSolid\"),\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t),\n\n\t\t\t\t\t\twhen(\"&:has(~ input:focus-visible)\", [\n\t\t\t\t\t\t\toutline({ color: \"brand.ring\", offset: 2 }),\n\t\t\t\t\t\t\twhen('&[data-color=\"neutral\"]', outline(\"neutral.ring\")),\n\t\t\t\t\t\t\twhen('&[data-color=\"success\"]', outline(\"success.ring\")),\n\t\t\t\t\t\t\twhen('&[data-color=\"warning\"]', outline(\"warning.ring\")),\n\t\t\t\t\t\t\twhen('&[data-color=\"danger\"]', outline(\"danger.ring\")),\n\t\t\t\t\t\t]),\n\n\t\t\t\t\t\twhen(\"&:has(~ input:disabled)\", [cursor(\"not-allowed\"), opacity(50)]),\n\n\t\t\t\t\t\tparts?.box,\n\t\t\t\t\t]}\n\t\t\t\t>\n\t\t\t\t\t<CheckIcon />\n\t\t\t\t\t<MinusIcon />\n\t\t\t\t</span>\n\t\t\t\t<input type=\"checkbox\" {...rest} mix={mergeMix(visuallyHidden(), mix)} />\n\t\t\t\t{children}\n\t\t\t</label>\n\t\t);\n\t};\n}\n"
11
11
  },
12
12
  "test": {
13
13
  "path": "checkbox.test.tsx",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "combobox",
3
- "changedIn": "2026.10.13",
3
+ "changedIn": "2026.11.1",
4
4
  "dependencies": [
5
5
  "input"
6
6
  ],
@@ -9,7 +9,7 @@
9
9
  ],
10
10
  "source": {
11
11
  "path": "combobox.tsx",
12
- "content": "/**\n * A single-line text control paired with a native list of suggested values: a\n * {@link ComboBox.Group} row housing the {@link ComboBox.Input} control and a\n * trailing {@link ComboBox.Button} disclosure glyph, all stacked beneath a\n * caption or above supporting copy in a single column with a small gap. The\n * text control builds on {@link Input} for its box, color, and interaction\n * states, and pairs with a plain `<datalist>` of `<option>`s through its own\n * `list` attribute — the browser renders and filters that list entirely on\n * its own, with no styling opportunity across the suggestions themselves.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps } from \"remix/component\";\n\nimport { ChevronDownIcon } from \"@sdxc/icons\";\nimport { bg, fg, outline } from \"@sdxc/u/color\";\nimport { rounded } from \"@sdxc/u/effects\";\nimport { center, hstack, relative, spacer, vstack } from \"@sdxc/u/layout\";\nimport { bs, is, mis, pie } from \"@sdxc/u/size\";\nimport { when } from \"@sdxc/u/state\";\n\nimport { hitArea } from \"@sdxc/ui/styles\";\nimport { interactiveTransition } from \"@sdxc/ui/styles\";\nimport { warnIfNoAccessibleLabel } from \"@sdxc/ui/utils\";\n\nimport { Input } from \"@sdxc/ui/input\";\n\n/**\n * Native `<button>` `type` {@link ComboBox.Button} falls back to when a\n * consumer omits one, keeping a click from submitting a surrounding\n * `<form>` the way a bare `<button>`'s own default type otherwise would.\n */\nconst DEFAULT_BUTTON_TYPE: NonNullable<ComboBox.ButtonProps[\"type\"]> = \"button\";\n\n/**\n * Prop types for {@link ComboBox} and its compound parts.\n */\nexport namespace ComboBox {\n\t/**\n\t * Every native `<div>` attribute, unchanged, plus the `mix` passthrough.\n\t * `children` composes this control's parts — typically a caption, the\n\t * {@link ComboBox.Group} row, a `<datalist>`, and supporting copy.\n\t */\n\texport interface Props extends TagProps<\"div\"> {}\n\n\t/**\n\t * Every native `<div>` attribute, unchanged, plus the `mix` passthrough.\n\t * `children` composes {@link ComboBox.Input} and {@link ComboBox.Button}\n\t * into one visual row.\n\t */\n\texport interface GroupProps extends TagProps<\"div\"> {}\n\n\t/**\n\t * Every prop {@link Input.Props} accepts, unchanged — a type alias, since\n\t * {@link Input.Props} resolves through a conditional type only a type\n\t * alias can express. Pass `list` with a `<datalist>` id to wire suggestions.\n\t */\n\texport type InputProps = Input.Props;\n\n\t/**\n\t * Every native `<button>` attribute except `children`, which stays fixed to\n\t * this button's own disclosure glyph, plus the `mix` passthrough. `type`\n\t * defaults to {@link DEFAULT_BUTTON_TYPE}.\n\t */\n\texport interface ButtonProps extends Omit<TagProps<\"button\">, \"children\"> {}\n}\n\n/**\n * Renders a plain host stacking this control's compound parts — a caption,\n * the {@link ComboBox.Group} row, a `<datalist>` of suggested values, and\n * supporting copy — in a single column with a small gap between them.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the control's markup.\n * @example\n * <ComboBox>\n * \t<Label htmlFor=\"fruit\">{t(\"form.fruit.label\")}</Label>\n * \t<ComboBox.Group>\n * \t\t<ComboBox.Input id=\"fruit\" name=\"fruit\" list=\"fruit-options\" />\n * \t\t<ComboBox.Button aria-label={t(\"form.fruit.toggle\")} />\n * \t</ComboBox.Group>\n * \t<datalist id=\"fruit-options\">\n * \t\t<option value=\"Apple\" />\n * \t\t<option value=\"Banana\" />\n * \t</datalist>\n * </ComboBox>\n */\nexport function ComboBox(handle: Handle<ComboBox.Props>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn <div {...rest} data-slot=\"combobox\" mix={[vstack({ gap: 1 }), mix]} />;\n\t};\n}\n\n/**\n * Renders {@link ComboBox}'s control row: a plain flex host laying\n * {@link ComboBox.Input} and {@link ComboBox.Button} side by side, the\n * button pulled back over the input's padding so they read as one field.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the row's markup.\n * @example\n * <ComboBox.Group>\n * \t<ComboBox.Input id=\"fruit\" list=\"fruit-options\" />\n * \t<ComboBox.Button aria-label={t(\"form.fruit.toggle\")} />\n * </ComboBox.Group>\n */\nComboBox.Group = function ComboBoxGroup(handle: Handle<ComboBox.GroupProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn <div {...rest} data-slot=\"combobox-group\" mix={[hstack({ align: \"center\" }), mix]} />;\n\t};\n};\n\n/**\n * Renders {@link ComboBox}'s text control: an {@link Input} that grows to\n * fill its row, reserves inline-end padding for {@link ComboBox.Button}'s\n * glyph, and carries every {@link Input} interaction state unchanged.\n *\n * @param handle Runtime handle carrying the host `<input>`'s props.\n * @returns The render function producing the control's markup.\n * @example\n * <ComboBox.Input id=\"fruit\" name=\"fruit\" list=\"fruit-options\" />\n * @example\n * <ComboBox.Input aria-label={t(\"form.country.label\")} color=\"brand\" list=\"country-options\" />\n */\nComboBox.Input = function ComboBoxInput(handle: Handle<ComboBox.InputProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn <Input {...rest} mix={[spacer(), pie(9), mix]} />;\n\t};\n};\n\n/**\n * Renders {@link ComboBox}'s trailing disclosure glyph: a native `<button>`\n * pulled back over {@link ComboBox.Input}'s padding so it reads as part of\n * the same field, its chevron marked `aria-hidden` since it carries no text.\n * Its pointer target grows to `--ui-target-size` past its drawn 28px box.\n *\n * @param handle Runtime handle carrying the host `<button>`'s props.\n * @returns The render function producing the button's markup.\n * @example\n * <ComboBox.Button aria-label={t(\"form.fruit.toggle\")} />\n */\nComboBox.Button = function ComboBoxButton(handle: Handle<ComboBox.ButtonProps>) {\n\treturn () => {\n\t\tlet { type, mix, ...rest } = handle.props;\n\n\t\twarnIfNoAccessibleLabel(\n\t\t\thandle.props,\n\t\t\t\"ComboBox.Button: this button needs an `aria-label` describing what it does — its content is a decorative glyph with no accessible name of its own.\",\n\t\t);\n\n\t\treturn (\n\t\t\t<button\n\t\t\t\ttype={type ?? DEFAULT_BUTTON_TYPE}\n\t\t\t\t{...rest}\n\t\t\t\tmix={[\n\t\t\t\t\tinteractiveTransition(),\n\t\t\t\t\tcenter(),\n\t\t\t\t\trelative(),\n\t\t\t\t\thitArea(),\n\t\t\t\t\tis(\"1.75rem\"),\n\t\t\t\t\tbs(\"1.75rem\"),\n\t\t\t\t\trounded(\"sm\"),\n\t\t\t\t\tfg(\"neutral\"),\n\t\t\t\t\twhen(\"& svg\", [is(\"1rem\"), bs(\"1rem\")]),\n\t\t\t\t\twhen(\"&:hover\", bg(\"neutral.bg-tint-hover\")),\n\t\t\t\t\twhen(\"&:focus-visible\", outline({ color: \"brand.ring\", offset: 0 })),\n\t\t\t\t\tmis(\"-2rem\"),\n\t\t\t\t\tmix,\n\t\t\t\t]}\n\t\t\t>\n\t\t\t\t<ChevronDownIcon />\n\t\t\t</button>\n\t\t);\n\t};\n};\n"
12
+ "content": "/**\n * A single-line text control paired with a native list of suggested values: a\n * {@link ComboBox.Group} row housing the {@link ComboBox.Input} control and a\n * trailing {@link ComboBox.Button} disclosure glyph, all stacked beneath a\n * caption or above supporting copy in a single column with a small gap. The\n * text control builds on {@link Input} for its box, color, and interaction\n * states, and pairs with a plain `<datalist>` of `<option>`s through its own\n * `list` attribute — the browser renders and filters that list entirely on\n * its own, with no styling opportunity across the suggestions themselves.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps } from \"remix/component\";\n\nimport { ChevronDownIcon } from \"@sdxc/icons\";\nimport { bg, fg, outline } from \"@sdxc/u/color\";\nimport { rounded } from \"@sdxc/u/effects\";\nimport { mergeMix } from \"@sdxc/u/general\";\nimport { center, hstack, relative, spacer, vstack } from \"@sdxc/u/layout\";\nimport { bs, is, mis, pie } from \"@sdxc/u/size\";\nimport { when } from \"@sdxc/u/state\";\n\nimport { hitArea } from \"@sdxc/ui/styles\";\nimport { interactiveTransition } from \"@sdxc/ui/styles\";\nimport { warnIfNoAccessibleLabel } from \"@sdxc/ui/utils\";\n\nimport { Input } from \"@sdxc/ui/input\";\n\n/**\n * Native `<button>` `type` {@link ComboBox.Button} falls back to when a\n * consumer omits one, keeping a click from submitting a surrounding\n * `<form>` the way a bare `<button>`'s own default type otherwise would.\n */\nconst DEFAULT_BUTTON_TYPE: NonNullable<ComboBox.ButtonProps[\"type\"]> = \"button\";\n\n/**\n * Prop types for {@link ComboBox} and its compound parts.\n */\nexport namespace ComboBox {\n\t/**\n\t * Every native `<div>` attribute, unchanged, plus the `mix` passthrough.\n\t * `children` composes this control's parts — typically a caption, the\n\t * {@link ComboBox.Group} row, a `<datalist>`, and supporting copy.\n\t */\n\texport interface Props extends TagProps<\"div\"> {}\n\n\t/**\n\t * Every native `<div>` attribute, unchanged, plus the `mix` passthrough.\n\t * `children` composes {@link ComboBox.Input} and {@link ComboBox.Button}\n\t * into one visual row.\n\t */\n\texport interface GroupProps extends TagProps<\"div\"> {}\n\n\t/**\n\t * Every prop {@link Input.Props} accepts, unchanged — a type alias, since\n\t * {@link Input.Props} resolves through a conditional type only a type\n\t * alias can express. Pass `list` with a `<datalist>` id to wire suggestions.\n\t */\n\texport type InputProps = Input.Props;\n\n\t/**\n\t * Every native `<button>` attribute except `children`, which stays fixed to\n\t * this button's own disclosure glyph, plus the `mix` passthrough. `type`\n\t * defaults to {@link DEFAULT_BUTTON_TYPE}.\n\t */\n\texport interface ButtonProps extends Omit<TagProps<\"button\">, \"children\"> {}\n}\n\n/**\n * Renders a plain host stacking this control's compound parts — a caption,\n * the {@link ComboBox.Group} row, a `<datalist>` of suggested values, and\n * supporting copy — in a single column with a small gap between them.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the control's markup.\n * @example\n * <ComboBox>\n * \t<Label htmlFor=\"fruit\">{t(\"form.fruit.label\")}</Label>\n * \t<ComboBox.Group>\n * \t\t<ComboBox.Input id=\"fruit\" name=\"fruit\" list=\"fruit-options\" />\n * \t\t<ComboBox.Button aria-label={t(\"form.fruit.toggle\")} />\n * \t</ComboBox.Group>\n * \t<datalist id=\"fruit-options\">\n * \t\t<option value=\"Apple\" />\n * \t\t<option value=\"Banana\" />\n * \t</datalist>\n * </ComboBox>\n */\nexport function ComboBox(handle: Handle<ComboBox.Props>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn <div {...rest} data-slot=\"combobox\" mix={mergeMix(vstack({ gap: 1 }), mix)} />;\n\t};\n}\n\n/**\n * Renders {@link ComboBox}'s control row: a plain flex host laying\n * {@link ComboBox.Input} and {@link ComboBox.Button} side by side, the\n * button pulled back over the input's padding so they read as one field.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the row's markup.\n * @example\n * <ComboBox.Group>\n * \t<ComboBox.Input id=\"fruit\" list=\"fruit-options\" />\n * \t<ComboBox.Button aria-label={t(\"form.fruit.toggle\")} />\n * </ComboBox.Group>\n */\nComboBox.Group = function ComboBoxGroup(handle: Handle<ComboBox.GroupProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div {...rest} data-slot=\"combobox-group\" mix={mergeMix(hstack({ align: \"center\" }), mix)} />\n\t\t);\n\t};\n};\n\n/**\n * Renders {@link ComboBox}'s text control: an {@link Input} that grows to\n * fill its row, reserves inline-end padding for {@link ComboBox.Button}'s\n * glyph, and carries every {@link Input} interaction state unchanged.\n *\n * @param handle Runtime handle carrying the host `<input>`'s props.\n * @returns The render function producing the control's markup.\n * @example\n * <ComboBox.Input id=\"fruit\" name=\"fruit\" list=\"fruit-options\" />\n * @example\n * <ComboBox.Input aria-label={t(\"form.country.label\")} color=\"brand\" list=\"country-options\" />\n */\nComboBox.Input = function ComboBoxInput(handle: Handle<ComboBox.InputProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn <Input {...rest} mix={mergeMix([spacer(), pie(9)], mix)} />;\n\t};\n};\n\n/**\n * Renders {@link ComboBox}'s trailing disclosure glyph: a native `<button>`\n * pulled back over {@link ComboBox.Input}'s padding so it reads as part of\n * the same field, its chevron marked `aria-hidden` since it carries no text.\n * Its pointer target grows to `--ui-target-size` past its drawn 28px box.\n *\n * @param handle Runtime handle carrying the host `<button>`'s props.\n * @returns The render function producing the button's markup.\n * @example\n * <ComboBox.Button aria-label={t(\"form.fruit.toggle\")} />\n */\nComboBox.Button = function ComboBoxButton(handle: Handle<ComboBox.ButtonProps>) {\n\treturn () => {\n\t\tlet { type, mix, ...rest } = handle.props;\n\n\t\twarnIfNoAccessibleLabel(\n\t\t\thandle.props,\n\t\t\t\"ComboBox.Button: this button needs an `aria-label` describing what it does — its content is a decorative glyph with no accessible name of its own.\",\n\t\t);\n\n\t\treturn (\n\t\t\t<button\n\t\t\t\ttype={type ?? DEFAULT_BUTTON_TYPE}\n\t\t\t\t{...rest}\n\t\t\t\tmix={mergeMix(\n\t\t\t\t\t[\n\t\t\t\t\t\tinteractiveTransition(),\n\t\t\t\t\t\tcenter(),\n\t\t\t\t\t\trelative(),\n\t\t\t\t\t\thitArea(),\n\t\t\t\t\t\tis(\"1.75rem\"),\n\t\t\t\t\t\tbs(\"1.75rem\"),\n\t\t\t\t\t\trounded(\"sm\"),\n\t\t\t\t\t\tfg(\"neutral\"),\n\t\t\t\t\t\twhen(\"& svg\", [is(\"1rem\"), bs(\"1rem\")]),\n\t\t\t\t\t\twhen(\"&:hover\", bg(\"neutral.bg-tint-hover\")),\n\t\t\t\t\t\twhen(\"&:focus-visible\", outline({ color: \"brand.ring\", offset: 0 })),\n\t\t\t\t\t\tmis(\"-2rem\"),\n\t\t\t\t\t],\n\t\t\t\t\tmix,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<ChevronDownIcon />\n\t\t\t</button>\n\t\t);\n\t};\n};\n"
13
13
  },
14
14
  "test": null
15
15
  }
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "command",
3
- "changedIn": "2026.10.20",
3
+ "changedIn": "2026.11.1",
4
4
  "dependencies": [],
5
5
  "exports": [
6
6
  "Command"
7
7
  ],
8
8
  "source": {
9
9
  "path": "command.tsx",
10
- "content": "/**\n * A bordered panel for searching and choosing among a list of actions:\n * {@link Command.Input} holds the query row, {@link Command.List} scrolls\n * through {@link Command.Item} rows, and {@link Command.Empty} holds a\n * message for when nothing matches. Its baseline rendering is a plain, fully\n * visible list of options, styled and ready to compose; the as-you-type\n * filtering and match highlighting a search experience needs arrive through\n * a separate opt-in behavior a consumer attaches.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps, RemixNode } from \"remix/component\";\n\nimport { bg, borderEdge, fg, outline, outlineStyle } from \"@sdxc/u/color\";\nimport { opacity, rounded } from \"@sdxc/u/effects\";\nimport { cursor, raw } from \"@sdxc/u/general\";\nimport { hstack, shrink, vstack } from \"@sdxc/u/layout\";\nimport { overflow } from \"@sdxc/u/overflow\";\nimport { bs, is, maxBs, pb, pi } from \"@sdxc/u/size\";\nimport { when } from \"@sdxc/u/state\";\nimport { text, textAlign } from \"@sdxc/u/typography\";\nimport { attrs } from \"remix/component\";\n\nimport { concentricRadius, floatingSurface, surfacePadding } from \"@sdxc/ui/styles\";\nimport { interactiveTransition } from \"@sdxc/ui/styles\";\n\n/** `role=\"listbox\"` applied to {@link Command.List} through {@link attrs} unless a consumer supplies its own `role`. */\nconst DEFAULT_LIST_ROLE = \"listbox\";\n\n/** `role=\"option\"` applied to {@link Command.Item} through {@link attrs} unless a consumer supplies its own `role`. */\nconst DEFAULT_ITEM_ROLE = \"option\";\n\n/**\n * Prop types for {@link Command} and its compound parts.\n */\nexport namespace Command {\n\t/**\n\t * Props accepted by {@link Command}.\n\t */\n\texport interface Props extends TagProps<\"div\"> {\n\t\t/** The panel's compound parts: {@link Command.Input}, {@link Command.List}, {@link Command.Empty}. */\n\t\tchildren: RemixNode;\n\t}\n\n\t/**\n\t * Every native `<input>` attribute, unchanged, plus the `mix` passthrough,\n\t * styling the control itself — a type alias, since the native input prop\n\t * type resolves through a conditional type only a type alias can express.\n\t */\n\texport type InputProps = TagProps<\"input\">;\n\n\t/**\n\t * Props accepted by {@link Command.List}.\n\t */\n\texport interface ListProps extends TagProps<\"div\"> {\n\t\t/** The {@link Command.Item} rows (and, once nothing matches, {@link Command.Empty}) to scroll through. */\n\t\tchildren: RemixNode;\n\t}\n\n\t/**\n\t * Props accepted by {@link Command.Item}.\n\t */\n\texport interface ItemProps extends TagProps<\"div\"> {\n\t\t/**\n\t\t * Plain-text value identifying this row's content. A paired filter\n\t\t * behavior matches typed text against this value directly, so it stays\n\t\t * required even when the visible content is already plain text.\n\t\t */\n\t\tvalue: string;\n\t\t/** The row's visible content: a label, and optionally a leading icon or trailing hint. */\n\t\tchildren?: RemixNode;\n\t}\n\n\t/**\n\t * Props accepted by {@link Command.Empty}.\n\t */\n\texport interface EmptyProps extends TagProps<\"div\"> {}\n}\n\n/**\n * Renders the panel's root host: an elevated `<div>` rounded concentric\n * with {@link Command.Item}'s corners, stacking its compound parts in a\n * column and clipping {@link Command.List}'s scrolled content to that radius.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the panel's markup.\n * @example\n * <Command aria-label={t(\"command.label\")}>\n * \t<Command.Input aria-label={t(\"command.label\")} placeholder={t(\"command.placeholder\")} />\n * \t<Command.List>\n * \t\t<Command.Item value=\"new-file\">{t(\"command.newFile\")}</Command.Item>\n * \t\t<Command.Item value=\"new-folder\">{t(\"command.newFolder\")}</Command.Item>\n * \t</Command.List>\n * \t<Command.Empty>{t(\"command.empty\")}</Command.Empty>\n * </Command>\n */\nexport function Command(handle: Handle<Command.Props>) {\n\treturn () => {\n\t\tlet { children, mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"command\"\n\t\t\t\tmix={[\n\t\t\t\t\tfloatingSurface(),\n\t\t\t\t\traw({ borderRadius: concentricRadius(surfacePadding(1)) }),\n\t\t\t\t\tvstack(),\n\t\t\t\t\toverflow(\"hidden\"),\n\t\t\t\t\tfg(\"neutral.emphasis\"),\n\t\t\t\t\tmix,\n\t\t\t\t]}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t};\n}\n\n/**\n * Renders the panel's query row: a `<div>` bordered along its block-end\n * edge wrapping a native `<input>` sized to the row's full padding and\n * height, marked `data-command-input` for a paired filter mixin to read.\n *\n * @param handle Runtime handle carrying the host `<input>`'s props.\n * @returns The render function producing the query row's markup.\n * @example\n * <Command.Input aria-label={t(\"command.label\")} placeholder={t(\"command.placeholder\")} />\n * @example\n * <Command.Input aria-label={t(\"command.label\")} value={query} disabled />\n */\nCommand.Input = function CommandInput(handle: Handle<Command.InputProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div data-slot=\"input-wrapper\" mix={borderEdge(\"block-end\", { color: \"neutral\", width: 1 })}>\n\t\t\t\t<input\n\t\t\t\t\t{...rest}\n\t\t\t\t\tdata-slot=\"input\"\n\t\t\t\t\tdata-command-input\n\t\t\t\t\tmix={[\n\t\t\t\t\t\tis(\"full\"),\n\t\t\t\t\t\tbs(\"3.5rem\"),\n\t\t\t\t\t\tpi(3),\n\t\t\t\t\t\tfg(\"neutral.emphasis\"),\n\t\t\t\t\t\twhen(\"&::placeholder\", fg(\"neutral.muted\")),\n\t\t\t\t\t\twhen(\"&:focus-visible\", outline({ color: \"brand.ring\", offset: 2 })),\n\t\t\t\t\t\twhen(\"&:disabled\", [cursor(\"not-allowed\"), opacity(50)]),\n\t\t\t\t\t\tbg(\"transparent\"),\n\t\t\t\t\t\ttext(\"sm\"),\n\t\t\t\t\t\toutlineStyle(\"none\"),\n\t\t\t\t\t\tmix,\n\t\t\t\t\t]}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t};\n};\n\n/**\n * Renders the panel's scrollable option region: a `<div>` carrying the\n * `listbox` role, capped at a fixed block size, its small inline padding\n * leaving room for a selected {@link Command.Item}'s own rounded corners.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the option region's markup.\n * @example\n * <Command.List>\n * \t<Command.Item value=\"new-file\">{t(\"command.newFile\")}</Command.Item>\n * \t<Command.Item value=\"new-folder\">{t(\"command.newFolder\")}</Command.Item>\n * </Command.List>\n */\nCommand.List = function CommandList(handle: Handle<Command.ListProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"list\"\n\t\t\t\tmix={[\n\t\t\t\t\tattrs({ role: DEFAULT_LIST_ROLE }),\n\t\t\t\t\tmaxBs(\"18rem\"),\n\t\t\t\t\toverflow(\"auto\"),\n\t\t\t\t\tpi(surfacePadding(1)),\n\t\t\t\t\t/**\n\t\t\t\t\t * The list spends its block padding only while a row is visible, so a filter hiding every\n\t\t\t\t\t * row leaves the empty-state message centered.\n\t\t\t\t\t */\n\t\t\t\t\twhen('&:has([data-slot=\"item\"]:not([hidden]))', pb(2)),\n\t\t\t\t\toutlineStyle(\"none\"),\n\t\t\t\t\tmix,\n\t\t\t\t]}\n\t\t\t/>\n\t\t);\n\t};\n};\n\n/**\n * Renders a single row: a `<div>` carrying the `option` role, its `value`\n * mirrored onto `data-value` for a paired filter behavior to read. Nest a\n * `<button>` or `<a>` in `children` for native activation.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the row's markup.\n * @example\n * <Command.Item value=\"new-file\">{t(\"command.newFile\")}</Command.Item>\n * @example\n * <Command.Item value=\"archived-project\" aria-disabled=\"true\">\n * \t{t(\"command.archivedProject\")}\n * </Command.Item>\n */\nCommand.Item = function CommandItem(handle: Handle<Command.ItemProps>) {\n\treturn () => {\n\t\tlet { value, children, mix, ...rest } = handle.props;\n\n\t\tif (import.meta.env?.DEV && !value) {\n\t\t\tconsole.warn(\n\t\t\t\t'Command.Item: needs a \"value\" — a filter behavior matches typed text against this instead of parsing rendered children.',\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"item\"\n\t\t\t\tdata-value={value}\n\t\t\t\tmix={[\n\t\t\t\t\tinteractiveTransition(),\n\t\t\t\t\tattrs({ role: DEFAULT_ITEM_ROLE }),\n\t\t\t\t\thstack({ gap: 2, align: \"center\" }),\n\t\t\t\t\t/**\n\t\t\t\t\t * A glyph anywhere in the row is sized against the row's text and holds that size when the\n\t\t\t\t\t * row runs short; the default `flex-shrink: 1` would squeeze each glyph by its own row's\n\t\t\t\t\t * overrun and leave the column of glyphs ragged.\n\t\t\t\t\t */\n\t\t\t\t\twhen(\"& svg\", [shrink(), is(4), bs(4)]),\n\t\t\t\t\tcursor(\"default\"),\n\t\t\t\t\trounded(\"md\"),\n\t\t\t\t\tpi(2),\n\t\t\t\t\tpb(2),\n\t\t\t\t\tfg(\"neutral.emphasis\"),\n\t\t\t\t\t/**\n\t\t\t\t\t * The active row is a cursor tinted far enough off the surface to find at a glance, while\n\t\t\t\t\t * its text keeps reading as text. Pointer and cursor states use mutually exclusive selectors,\n\t\t\t\t\t * so the row under the pointer stays marked active whichever order the layers land in.\n\t\t\t\t\t */\n\t\t\t\t\twhen('&:hover:not([aria-selected=\"true\"])', bg(\"neutral.bg-tint-hover\")),\n\t\t\t\t\twhen('&:active:not([aria-selected=\"true\"])', bg(\"neutral.bg-tint-pressed\")),\n\t\t\t\t\twhen('&:focus:not([aria-selected=\"true\"])', bg(\"brand.bg-tint-hover\")),\n\t\t\t\t\twhen('&[aria-selected=\"true\"]', [bg(\"brand.bg-tint-hover\"), fg(\"neutral.emphasis\")]),\n\t\t\t\t\twhen('&[aria-selected=\"true\"]:hover', bg(\"brand.bg-tint-pressed\")),\n\t\t\t\t\twhen('&[aria-disabled=\"true\"]', opacity(50)),\n\t\t\t\t\ttext(\"sm\"),\n\t\t\t\t\toutlineStyle(\"none\"),\n\t\t\t\t\tmix,\n\t\t\t\t]}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t};\n};\n\n/**\n * Renders the panel's no-match message: a centered, muted passage of small\n * text filling {@link Command.List}'s content area, carrying a\n * `data-command-empty` marker a paired filter behavior reads to toggle it.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the message's markup.\n * @example\n * <Command.Empty>{t(\"command.empty\")}</Command.Empty>\n */\nCommand.Empty = function CommandEmpty(handle: Handle<Command.EmptyProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"empty\"\n\t\t\t\tdata-command-empty\n\t\t\t\tmix={[pi(3), pb(6), textAlign(\"center\"), fg(\"neutral.muted\"), text(\"sm\"), mix]}\n\t\t\t/>\n\t\t);\n\t};\n};\n"
10
+ "content": "/**\n * A bordered panel for searching and choosing among a list of actions:\n * {@link Command.Input} holds the query row, {@link Command.List} scrolls\n * through {@link Command.Item} rows, and {@link Command.Empty} holds a\n * message for when nothing matches. Its baseline rendering is a plain, fully\n * visible list of options, styled and ready to compose; the as-you-type\n * filtering and match highlighting a search experience needs arrive through\n * a separate opt-in behavior a consumer attaches.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps, RemixNode } from \"remix/component\";\n\nimport { bg, borderEdge, fg, outline, outlineStyle } from \"@sdxc/u/color\";\nimport { opacity, rounded } from \"@sdxc/u/effects\";\nimport { cursor, raw, mergeMix } from \"@sdxc/u/general\";\nimport { hstack, shrink, vstack } from \"@sdxc/u/layout\";\nimport { overflow } from \"@sdxc/u/overflow\";\nimport { bs, is, maxBs, pb, pi } from \"@sdxc/u/size\";\nimport { when } from \"@sdxc/u/state\";\nimport { text, textAlign } from \"@sdxc/u/typography\";\nimport { attrs } from \"remix/component\";\n\nimport { concentricRadius, floatingSurface, surfacePadding } from \"@sdxc/ui/styles\";\nimport { interactiveTransition } from \"@sdxc/ui/styles\";\n\n/** `role=\"listbox\"` applied to {@link Command.List} through {@link attrs} unless a consumer supplies its own `role`. */\nconst DEFAULT_LIST_ROLE = \"listbox\";\n\n/** `role=\"option\"` applied to {@link Command.Item} through {@link attrs} unless a consumer supplies its own `role`. */\nconst DEFAULT_ITEM_ROLE = \"option\";\n\n/**\n * Prop types for {@link Command} and its compound parts.\n */\nexport namespace Command {\n\t/**\n\t * Props accepted by {@link Command}.\n\t */\n\texport interface Props extends TagProps<\"div\"> {\n\t\t/** The panel's compound parts: {@link Command.Input}, {@link Command.List}, {@link Command.Empty}. */\n\t\tchildren: RemixNode;\n\t}\n\n\t/**\n\t * Every native `<input>` attribute, unchanged, plus the `mix` passthrough,\n\t * styling the control itself — a type alias, since the native input prop\n\t * type resolves through a conditional type only a type alias can express.\n\t */\n\texport type InputProps = TagProps<\"input\">;\n\n\t/**\n\t * Props accepted by {@link Command.List}.\n\t */\n\texport interface ListProps extends TagProps<\"div\"> {\n\t\t/** The {@link Command.Item} rows (and, once nothing matches, {@link Command.Empty}) to scroll through. */\n\t\tchildren: RemixNode;\n\t}\n\n\t/**\n\t * Props accepted by {@link Command.Item}.\n\t */\n\texport interface ItemProps extends TagProps<\"div\"> {\n\t\t/**\n\t\t * Plain-text value identifying this row's content. A paired filter\n\t\t * behavior matches typed text against this value directly, so it stays\n\t\t * required even when the visible content is already plain text.\n\t\t */\n\t\tvalue: string;\n\t\t/** The row's visible content: a label, and optionally a leading icon or trailing hint. */\n\t\tchildren?: RemixNode;\n\t}\n\n\t/**\n\t * Props accepted by {@link Command.Empty}.\n\t */\n\texport interface EmptyProps extends TagProps<\"div\"> {}\n}\n\n/**\n * Renders the panel's root host: an elevated `<div>` rounded concentric\n * with {@link Command.Item}'s corners, stacking its compound parts in a\n * column and clipping {@link Command.List}'s scrolled content to that radius.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the panel's markup.\n * @example\n * <Command aria-label={t(\"command.label\")}>\n * \t<Command.Input aria-label={t(\"command.label\")} placeholder={t(\"command.placeholder\")} />\n * \t<Command.List>\n * \t\t<Command.Item value=\"new-file\">{t(\"command.newFile\")}</Command.Item>\n * \t\t<Command.Item value=\"new-folder\">{t(\"command.newFolder\")}</Command.Item>\n * \t</Command.List>\n * \t<Command.Empty>{t(\"command.empty\")}</Command.Empty>\n * </Command>\n */\nexport function Command(handle: Handle<Command.Props>) {\n\treturn () => {\n\t\tlet { children, mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"command\"\n\t\t\t\tmix={mergeMix(\n\t\t\t\t\t[\n\t\t\t\t\t\tfloatingSurface(),\n\t\t\t\t\t\traw({ borderRadius: concentricRadius(surfacePadding(1)) }),\n\t\t\t\t\t\tvstack(),\n\t\t\t\t\t\toverflow(\"hidden\"),\n\t\t\t\t\t\tfg(\"neutral.emphasis\"),\n\t\t\t\t\t],\n\t\t\t\t\tmix,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t};\n}\n\n/**\n * Renders the panel's query row: a `<div>` bordered along its block-end\n * edge wrapping a native `<input>` sized to the row's full padding and\n * height, marked `data-command-input` for a paired filter mixin to read.\n *\n * @param handle Runtime handle carrying the host `<input>`'s props.\n * @returns The render function producing the query row's markup.\n * @example\n * <Command.Input aria-label={t(\"command.label\")} placeholder={t(\"command.placeholder\")} />\n * @example\n * <Command.Input aria-label={t(\"command.label\")} value={query} disabled />\n */\nCommand.Input = function CommandInput(handle: Handle<Command.InputProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div data-slot=\"input-wrapper\" mix={borderEdge(\"block-end\", { color: \"neutral\", width: 1 })}>\n\t\t\t\t<input\n\t\t\t\t\t{...rest}\n\t\t\t\t\tdata-slot=\"input\"\n\t\t\t\t\tdata-command-input\n\t\t\t\t\tmix={mergeMix(\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\tis(\"full\"),\n\t\t\t\t\t\t\tbs(\"3.5rem\"),\n\t\t\t\t\t\t\tpi(3),\n\t\t\t\t\t\t\tfg(\"neutral.emphasis\"),\n\t\t\t\t\t\t\twhen(\"&::placeholder\", fg(\"neutral.muted\")),\n\t\t\t\t\t\t\twhen(\"&:focus-visible\", outline({ color: \"brand.ring\", offset: 2 })),\n\t\t\t\t\t\t\twhen(\"&:disabled\", [cursor(\"not-allowed\"), opacity(50)]),\n\t\t\t\t\t\t\tbg(\"transparent\"),\n\t\t\t\t\t\t\ttext(\"sm\"),\n\t\t\t\t\t\t\toutlineStyle(\"none\"),\n\t\t\t\t\t\t],\n\t\t\t\t\t\tmix,\n\t\t\t\t\t)}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t};\n};\n\n/**\n * Renders the panel's scrollable option region: a `<div>` carrying the\n * `listbox` role, capped at a fixed block size, its small inline padding\n * leaving room for a selected {@link Command.Item}'s own rounded corners.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the option region's markup.\n * @example\n * <Command.List>\n * \t<Command.Item value=\"new-file\">{t(\"command.newFile\")}</Command.Item>\n * \t<Command.Item value=\"new-folder\">{t(\"command.newFolder\")}</Command.Item>\n * </Command.List>\n */\nCommand.List = function CommandList(handle: Handle<Command.ListProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"list\"\n\t\t\t\tmix={mergeMix(\n\t\t\t\t\t[\n\t\t\t\t\t\tattrs({ role: DEFAULT_LIST_ROLE }),\n\t\t\t\t\t\tmaxBs(\"18rem\"),\n\t\t\t\t\t\toverflow(\"auto\"),\n\t\t\t\t\t\tpi(surfacePadding(1)),\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * The list spends its block padding only while a row is visible, so a filter hiding every\n\t\t\t\t\t\t * row leaves the empty-state message centered.\n\t\t\t\t\t\t */\n\t\t\t\t\t\twhen('&:has([data-slot=\"item\"]:not([hidden]))', pb(2)),\n\t\t\t\t\t\toutlineStyle(\"none\"),\n\t\t\t\t\t],\n\t\t\t\t\tmix,\n\t\t\t\t)}\n\t\t\t/>\n\t\t);\n\t};\n};\n\n/**\n * Renders a single row: a `<div>` carrying the `option` role, its `value`\n * mirrored onto `data-value` for a paired filter behavior to read. Nest a\n * `<button>` or `<a>` in `children` for native activation.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the row's markup.\n * @example\n * <Command.Item value=\"new-file\">{t(\"command.newFile\")}</Command.Item>\n * @example\n * <Command.Item value=\"archived-project\" aria-disabled=\"true\">\n * \t{t(\"command.archivedProject\")}\n * </Command.Item>\n */\nCommand.Item = function CommandItem(handle: Handle<Command.ItemProps>) {\n\treturn () => {\n\t\tlet { value, children, mix, ...rest } = handle.props;\n\n\t\tif (import.meta.env?.DEV && !value) {\n\t\t\tconsole.warn(\n\t\t\t\t'Command.Item: needs a \"value\" — a filter behavior matches typed text against this instead of parsing rendered children.',\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"item\"\n\t\t\t\tdata-value={value}\n\t\t\t\tmix={mergeMix(\n\t\t\t\t\t[\n\t\t\t\t\t\tinteractiveTransition(),\n\t\t\t\t\t\tattrs({ role: DEFAULT_ITEM_ROLE }),\n\t\t\t\t\t\thstack({ gap: 2, align: \"center\" }),\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * A glyph anywhere in the row is sized against the row's text and holds that size when the\n\t\t\t\t\t\t * row runs short; the default `flex-shrink: 1` would squeeze each glyph by its own row's\n\t\t\t\t\t\t * overrun and leave the column of glyphs ragged.\n\t\t\t\t\t\t */\n\t\t\t\t\t\twhen(\"& svg\", [shrink(), is(4), bs(4)]),\n\t\t\t\t\t\tcursor(\"default\"),\n\t\t\t\t\t\trounded(\"md\"),\n\t\t\t\t\t\tpi(2),\n\t\t\t\t\t\tpb(2),\n\t\t\t\t\t\tfg(\"neutral.emphasis\"),\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * The active row is a cursor tinted far enough off the surface to find at a glance, while\n\t\t\t\t\t\t * its text keeps reading as text. Pointer and cursor states use mutually exclusive selectors,\n\t\t\t\t\t\t * so the row under the pointer stays marked active whichever order the layers land in.\n\t\t\t\t\t\t */\n\t\t\t\t\t\twhen('&:hover:not([aria-selected=\"true\"])', bg(\"neutral.bg-tint-hover\")),\n\t\t\t\t\t\twhen('&:active:not([aria-selected=\"true\"])', bg(\"neutral.bg-tint-pressed\")),\n\t\t\t\t\t\twhen('&:focus:not([aria-selected=\"true\"])', bg(\"brand.bg-tint-hover\")),\n\t\t\t\t\t\twhen('&[aria-selected=\"true\"]', [bg(\"brand.bg-tint-hover\"), fg(\"neutral.emphasis\")]),\n\t\t\t\t\t\twhen('&[aria-selected=\"true\"]:hover', bg(\"brand.bg-tint-pressed\")),\n\t\t\t\t\t\twhen('&[aria-disabled=\"true\"]', opacity(50)),\n\t\t\t\t\t\ttext(\"sm\"),\n\t\t\t\t\t\toutlineStyle(\"none\"),\n\t\t\t\t\t],\n\t\t\t\t\tmix,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t};\n};\n\n/**\n * Renders the panel's no-match message: a centered, muted passage of small\n * text filling {@link Command.List}'s content area, carrying a\n * `data-command-empty` marker a paired filter behavior reads to toggle it.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the message's markup.\n * @example\n * <Command.Empty>{t(\"command.empty\")}</Command.Empty>\n */\nCommand.Empty = function CommandEmpty(handle: Handle<Command.EmptyProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"empty\"\n\t\t\t\tdata-command-empty\n\t\t\t\tmix={mergeMix([pi(3), pb(6), textAlign(\"center\"), fg(\"neutral.muted\"), text(\"sm\")], mix)}\n\t\t\t/>\n\t\t);\n\t};\n};\n"
11
11
  },
12
12
  "test": null
13
13
  }
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "cta-group",
3
- "changedIn": "2026.10.29",
3
+ "changedIn": "2026.11.1",
4
4
  "dependencies": [],
5
5
  "exports": [
6
6
  "CtaGroup"
7
7
  ],
8
8
  "source": {
9
9
  "path": "cta-group.tsx",
10
- "content": "/**\n * A horizontal cluster of primary and secondary marketing actions that wraps\n * onto a second row when the container is narrow. Children are the page's own\n * {@link Button} / {@link LinkButton} instances — pair nav rows at `size=\"sm\"`\n * (~32px) with hero rows at `size=\"lg\"` (~48px).\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps, RemixNode } from \"remix/component\";\n\nimport { flexWrap, gap, inlineFlex, items } from \"@sdxc/u/layout\";\n\n/**\n * Prop types for {@link CtaGroup}.\n */\nexport namespace CtaGroup {\n\t/**\n\t * Props accepted by {@link CtaGroup}.\n\t */\n\texport interface Props extends TagProps<\"div\"> {\n\t\t/**\n\t\t * Action controls — typically a solid primary {@link Button} or\n\t\t * {@link LinkButton} beside an outline secondary. The group does not\n\t\t * invent buttons of its own.\n\t\t */\n\t\tchildren: RemixNode;\n\t}\n}\n\n/**\n * Lays action children in a wrapping inline-flex row with a compact gap so a\n * primary and secondary CTA read as one cluster. Radius and size stay on the\n * buttons; override `--ui-marketing-cta-radius` per brand for pill vs soft-rect\n * corners when composing marketing CTAs.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the group's markup.\n * @example\n * <CtaGroup>\n * \t<Button size=\"lg\" color=\"brand\">{t(\"hero.cta\")}</Button>\n * \t<LinkButton href={docs} size=\"lg\" variant=\"outline\">{t(\"hero.docs\")}</LinkButton>\n * </CtaGroup>\n * @example\n * <CtaGroup>\n * \t<LinkButton href={signin} size=\"sm\">{t(\"nav.signin\")}</LinkButton>\n * </CtaGroup>\n */\nexport function CtaGroup(handle: Handle<CtaGroup.Props>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"cta-group\"\n\t\t\t\tmix={[inlineFlex(), items(\"center\"), flexWrap(), gap(3), mix]}\n\t\t\t/>\n\t\t);\n\t};\n}\n"
10
+ "content": "/**\n * A horizontal cluster of primary and secondary landing actions that wraps\n * onto a second row when the container is narrow. Children are the page's own\n * {@link Button} / {@link LinkButton} instances, and an action that names no\n * size of its own takes the group's, so a hero row sizes every CTA at once.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps, RemixNode } from \"remix/component\";\n\nimport { raw, mergeMix } from \"@sdxc/u/general\";\nimport { flexWrap, gap, inlineFlex, items } from \"@sdxc/u/layout\";\nimport { atMax } from \"@sdxc/u/responsive\";\nimport { when } from \"@sdxc/u/state\";\n\n/** Size the group hands its actions when `size` is omitted: the 40px landing CTA. */\nconst DEFAULT_SIZE: CtaGroup.Size = \"md\";\n\n/**\n * Prop types for {@link CtaGroup}.\n */\nexport namespace CtaGroup {\n\t/** Size every action without a `size` of its own renders at. */\n\texport type Size = \"sm\" | \"md\" | \"lg\";\n\n\t/**\n\t * When the actions stack into full-width rows: never, or on a phone-width\n\t * container (36rem and below), where two side-by-side CTAs would wrap unevenly.\n\t */\n\texport type Stack = \"never\" | \"phone\";\n\n\t/** What the group shares with the actions inside it. */\n\texport interface Context {\n\t\t/** Size an action without its own `size` renders at. */\n\t\tsize: Size;\n\t}\n\n\t/**\n\t * Props accepted by {@link CtaGroup}.\n\t */\n\texport interface Props extends TagProps<\"div\"> {\n\t\t/** Size handed to every action without its own. Defaults to {@link DEFAULT_SIZE}. */\n\t\tsize?: Size;\n\t\t/** When the actions stack full width. Defaults to `\"never\"`. */\n\t\tstack?: Stack;\n\t\t/**\n\t\t * Action controls — typically a solid primary {@link Button} or\n\t\t * {@link LinkButton} beside a `surface` or outline secondary. The group\n\t\t * does not invent buttons of its own.\n\t\t */\n\t\tchildren: RemixNode;\n\t}\n}\n\n/**\n * Lays action children in a wrapping inline-flex row with a compact gap so a\n * primary and secondary CTA read as one cluster, and publishes its size to them.\n * Radius stays on the buttons; override `--ui-landing-cta-radius` per brand for\n * pill vs soft-rect corners through `landingCtaChrome()`.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the group's markup.\n * @example\n * <CtaGroup stack=\"phone\">\n * \t<Button color=\"brand\">{t(\"hero.cta\")}</Button>\n * \t<LinkButton href={docs} variant=\"surface\">{t(\"hero.docs\")}</LinkButton>\n * </CtaGroup>\n * @example\n * <CtaGroup size=\"sm\">\n * \t<LinkButton href={signin}>{t(\"nav.signin\")}</LinkButton>\n * </CtaGroup>\n */\nexport function CtaGroup(handle: Handle<CtaGroup.Props, CtaGroup.Context>) {\n\treturn () => {\n\t\tlet { mix, size, stack, ...rest } = handle.props;\n\t\tlet resolvedSize = size ?? DEFAULT_SIZE;\n\n\t\thandle.context.set({ size: resolvedSize });\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"cta-group\"\n\t\t\t\tdata-size={resolvedSize}\n\t\t\t\tdata-stack={stack === \"phone\" ? \"phone\" : undefined}\n\t\t\t\tmix={mergeMix(\n\t\t\t\t\t[\n\t\t\t\t\t\tinlineFlex(),\n\t\t\t\t\t\titems(\"center\"),\n\t\t\t\t\t\tflexWrap(),\n\t\t\t\t\t\tgap(3),\n\t\t\t\t\t\tstack === \"phone\"\n\t\t\t\t\t\t\t? atMax(\"md\", [\n\t\t\t\t\t\t\t\t\traw({ display: \"flex\", flexDirection: \"column\", alignItems: \"stretch\" }),\n\t\t\t\t\t\t\t\t\traw({ inlineSize: \"100%\" }),\n\t\t\t\t\t\t\t\t\twhen(\"& > *\", raw({ inlineSize: \"100%\" })),\n\t\t\t\t\t\t\t\t])\n\t\t\t\t\t\t\t: [],\n\t\t\t\t\t],\n\t\t\t\t\tmix,\n\t\t\t\t)}\n\t\t\t/>\n\t\t);\n\t};\n}\n"
11
11
  },
12
12
  "test": {
13
13
  "path": "cta-group.test.tsx",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "date-field",
3
- "changedIn": "2026.10.13",
3
+ "changedIn": "2026.11.1",
4
4
  "dependencies": [
5
5
  "description",
6
6
  "field-error",
@@ -13,7 +13,7 @@
13
13
  ],
14
14
  "source": {
15
15
  "path": "date-field.tsx",
16
- "content": "/**\n * A convenience wrapper composing a labeled, described, and validated date\n * field in one call: a caption through {@link Label}, a native\n * `<input type=\"date\">` styled through {@link Input}, an optional supporting\n * passage through {@link Description}, and an optional validation message\n * through {@link FieldError}. Every id and `aria-describedby` relationship\n * between the parts is computed from this instance's own stable identifier,\n * leaving no id bookkeeping to the consumer.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps, RemixNode } from \"remix/component\";\n\nimport { tabularNums } from \"@sdxc/u/typography\";\n\nimport type { FieldPartsProps } from \"@sdxc/ui/utils\";\n\nimport { fieldStackLayout } from \"@sdxc/ui/styles\";\nimport { resolveFieldWiring } from \"@sdxc/ui/utils\";\n\nimport { Description } from \"@sdxc/ui/description\";\nimport { FieldError } from \"@sdxc/ui/field-error\";\nimport { resolveFieldIssue } from \"@sdxc/ui/form\";\nimport { Input } from \"@sdxc/ui/input\";\nimport { Label } from \"@sdxc/ui/label\";\n\n/**\n * Prop types for {@link DateField}.\n */\nexport namespace DateField {\n\t/**\n\t * Semantic color role for the control's keyboard focus ring, each mapped\n\t * to its matching `--ui-*` variables.\n\t */\n\texport type Color = \"brand\" | \"neutral\" | \"success\" | \"warning\" | \"danger\";\n\n\t/**\n\t * Per-part styling for the elements this convenience wrapper composes in\n\t * one call, layered after each part's own built-in styling.\n\t */\n\texport type PartsProps = FieldPartsProps;\n\n\t/**\n\t * Props accepted by {@link DateField}. `mix` styles the root element\n\t * grouping the field's parts; style the composed label, control,\n\t * description, and error individually through `parts` instead.\n\t */\n\texport interface Props extends Omit<TagProps<\"div\">, \"children\"> {\n\t\t/** Semantic color role for the control's focus ring. Defaults to `\"neutral\"` when omitted. */\n\t\tcolor?: Color;\n\t\t/**\n\t\t * The field's caption, rendered through {@link Label} and associated\n\t\t * with the control through a native `for`/`id` relationship computed\n\t\t * from this instance's own identifier.\n\t\t */\n\t\tlabel: RemixNode;\n\t\t/**\n\t\t * Supporting copy rendered through {@link Description} beneath the\n\t\t * control and referenced by the control's `aria-describedby`. Omit to\n\t\t * render no description.\n\t\t */\n\t\tdescription?: RemixNode;\n\t\t/**\n\t\t * Validation message rendered through {@link FieldError} beneath the\n\t\t * control; its presence alone marks `aria-invalid` unless set\n\t\t * explicitly. Inside a {@link Form} carrying `issues`, an explicit value still wins over the field's own by-`name` lookup.\n\t\t */\n\t\terrorMessage?: RemixNode;\n\t\t/**\n\t\t * Native `autofocus`. Defaults to `true` for the first invalid field of an\n\t\t * enclosing {@link Form}'s `issues`, landing keyboard focus on the problem\n\t\t * after a server round-trip; pass it explicitly to override for this field.\n\t\t */\n\t\tautoFocus?: boolean;\n\t\t/** Native `name` submitted with an enclosing form. */\n\t\tname?: string;\n\t\t/** Current value, in `YYYY-MM-DD` form, for a control a consumer tracks itself. */\n\t\tvalue?: string;\n\t\t/** Initial value, in `YYYY-MM-DD` form, for a control left to the platform's own uncontrolled state. */\n\t\tdefaultValue?: string;\n\t\t/** Earliest accepted date, in `YYYY-MM-DD` form. */\n\t\tmin?: string;\n\t\t/** Latest accepted date, in `YYYY-MM-DD` form. */\n\t\tmax?: string;\n\t\t/** Granularity, in days, the control's value must fall on. */\n\t\tstep?: number;\n\t\t/** Marks the control required for its enclosing form. */\n\t\trequired?: boolean;\n\t\t/** Marks the control inert and excluded from the tab order. */\n\t\tdisabled?: boolean;\n\t\t/** Marks the control's value fixed, while keeping it focusable and included in form submission. */\n\t\treadOnly?: boolean;\n\t\t/** Native autofill hint, e.g. `\"bday\"`. */\n\t\tautoComplete?: string;\n\t\t/** Per-part styling for this wrapper's internally composed elements. */\n\t\tparts?: PartsProps;\n\t}\n}\n\n/**\n * Renders a complete date field in one call, stacking {@link Label},\n * {@link Input}, and, when supplied, {@link Description} and {@link FieldError}.\n * An invalid state — from `errorMessage` or an explicit `aria-invalid` override — recolors the border and ring to the semantic danger tone regardless of `color`.\n *\n * @param handle Runtime handle carrying the root element's props and this instance's stable identifier.\n * @returns The render function producing the field's markup.\n * @example\n * <DateField label={t(\"form.birthday.label\")} name=\"birthday\" autoComplete=\"bday\" />\n * @example\n * <DateField\n * \tlabel={t(\"form.startDate.label\")}\n * \tname=\"startDate\"\n * \tmin=\"2026-01-01\"\n * \tmax=\"2026-12-31\"\n * \tdescription={t(\"form.startDate.hint\")}\n * />\n * @example\n * <DateField\n * \tlabel={t(\"form.dueDate.label\")}\n * \tname=\"dueDate\"\n * \tdefaultValue=\"2026-07-20\"\n * \terrorMessage={t(\"form.dueDate.pastDate\")}\n * />\n */\nexport function DateField(handle: Handle<DateField.Props>) {\n\treturn () => {\n\t\tlet {\n\t\t\tcolor,\n\t\t\tlabel,\n\t\t\tdescription,\n\t\t\terrorMessage: errorMessageProp,\n\t\t\tautoFocus,\n\t\t\tname,\n\t\t\tvalue,\n\t\t\tdefaultValue,\n\t\t\tmin,\n\t\t\tmax,\n\t\t\tstep,\n\t\t\trequired,\n\t\t\tdisabled,\n\t\t\treadOnly,\n\t\t\tautoComplete,\n\t\t\t\"aria-invalid\": ariaInvalidProp,\n\t\t\tparts,\n\t\t\tmix,\n\t\t\t...rest\n\t\t} = handle.props;\n\t\tlet { errorMessage, isFirstInvalid } = resolveFieldIssue(handle, name, errorMessageProp);\n\t\tlet resolvedAutoFocus = autoFocus ?? (isFirstInvalid || undefined);\n\t\tlet { resolvedColor, resolvedInvalid, descriptionId, errorId, describedBy } =\n\t\t\tresolveFieldWiring(handle.id, {\n\t\t\t\tcolor,\n\t\t\t\terrorMessage,\n\t\t\t\tdescription,\n\t\t\t\tariaInvalid: ariaInvalidProp,\n\t\t\t});\n\n\t\treturn (\n\t\t\t<div {...rest} data-slot=\"date-field\" mix={[fieldStackLayout(), mix]}>\n\t\t\t\t<Label htmlFor={handle.id} mix={parts?.label}>\n\t\t\t\t\t{label}\n\t\t\t\t</Label>\n\t\t\t\t<Input\n\t\t\t\t\tid={handle.id}\n\t\t\t\t\ttype=\"date\"\n\t\t\t\t\tname={name}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\tmin={min}\n\t\t\t\t\tmax={max}\n\t\t\t\t\tstep={step}\n\t\t\t\t\trequired={required}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\tautoComplete={autoComplete}\n\t\t\t\t\t// oxlint-disable-next-line jsx-a11y/no-autofocus -- Not a focus grab on page load: this only ever resolves true for the first field an enclosing Form reports as invalid, so a failed submit lands the user on the problem instead of leaving them to hunt for it.\n\t\t\t\t\tautoFocus={resolvedAutoFocus}\n\t\t\t\t\taria-invalid={resolvedInvalid}\n\t\t\t\t\taria-describedby={describedBy}\n\t\t\t\t\tcolor={resolvedColor}\n\t\t\t\t\tmix={[tabularNums(), parts?.input]}\n\t\t\t\t/>\n\t\t\t\t{description ? (\n\t\t\t\t\t<Description id={descriptionId} mix={parts?.description}>\n\t\t\t\t\t\t{description}\n\t\t\t\t\t</Description>\n\t\t\t\t) : null}\n\t\t\t\t{errorMessage ? (\n\t\t\t\t\t<FieldError id={errorId} mix={parts?.error}>\n\t\t\t\t\t\t{errorMessage}\n\t\t\t\t\t</FieldError>\n\t\t\t\t) : null}\n\t\t\t</div>\n\t\t);\n\t};\n}\n"
16
+ "content": "/**\n * A convenience wrapper composing a labeled, described, and validated date\n * field in one call: a caption through {@link Label}, a native\n * `<input type=\"date\">` styled through {@link Input}, an optional supporting\n * passage through {@link Description}, and an optional validation message\n * through {@link FieldError}. Every id and `aria-describedby` relationship\n * between the parts is computed from this instance's own stable identifier,\n * leaving no id bookkeeping to the consumer.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps, RemixNode } from \"remix/component\";\n\nimport { mergeMix } from \"@sdxc/u/general\";\nimport { tabularNums } from \"@sdxc/u/typography\";\n\nimport type { FieldPartsProps } from \"@sdxc/ui/utils\";\n\nimport { fieldStackLayout } from \"@sdxc/ui/styles\";\nimport { resolveFieldWiring } from \"@sdxc/ui/utils\";\n\nimport { Description } from \"@sdxc/ui/description\";\nimport { FieldError } from \"@sdxc/ui/field-error\";\nimport { resolveFieldIssue } from \"@sdxc/ui/form\";\nimport { Input } from \"@sdxc/ui/input\";\nimport { Label } from \"@sdxc/ui/label\";\n\n/**\n * Prop types for {@link DateField}.\n */\nexport namespace DateField {\n\t/**\n\t * Semantic color role for the control's keyboard focus ring, each mapped\n\t * to its matching `--ui-*` variables.\n\t */\n\texport type Color = \"brand\" | \"neutral\" | \"success\" | \"warning\" | \"danger\";\n\n\t/**\n\t * Per-part styling for the elements this convenience wrapper composes in\n\t * one call, layered after each part's own built-in styling.\n\t */\n\texport type PartsProps = FieldPartsProps;\n\n\t/**\n\t * Props accepted by {@link DateField}. `mix` styles the root element\n\t * grouping the field's parts; style the composed label, control,\n\t * description, and error individually through `parts` instead.\n\t */\n\texport interface Props extends Omit<TagProps<\"div\">, \"children\"> {\n\t\t/** Semantic color role for the control's focus ring. Defaults to `\"neutral\"` when omitted. */\n\t\tcolor?: Color;\n\t\t/**\n\t\t * The field's caption, rendered through {@link Label} and associated\n\t\t * with the control through a native `for`/`id` relationship computed\n\t\t * from this instance's own identifier.\n\t\t */\n\t\tlabel: RemixNode;\n\t\t/**\n\t\t * Supporting copy rendered through {@link Description} beneath the\n\t\t * control and referenced by the control's `aria-describedby`. Omit to\n\t\t * render no description.\n\t\t */\n\t\tdescription?: RemixNode;\n\t\t/**\n\t\t * Validation message rendered through {@link FieldError} beneath the\n\t\t * control; its presence alone marks `aria-invalid` unless set\n\t\t * explicitly. Inside a {@link Form} carrying `issues`, an explicit value still wins over the field's own by-`name` lookup.\n\t\t */\n\t\terrorMessage?: RemixNode;\n\t\t/**\n\t\t * Native `autofocus`. Defaults to `true` for the first invalid field of an\n\t\t * enclosing {@link Form}'s `issues`, landing keyboard focus on the problem\n\t\t * after a server round-trip; pass it explicitly to override for this field.\n\t\t */\n\t\tautoFocus?: boolean;\n\t\t/** Native `name` submitted with an enclosing form. */\n\t\tname?: string;\n\t\t/** Current value, in `YYYY-MM-DD` form, for a control a consumer tracks itself. */\n\t\tvalue?: string;\n\t\t/** Initial value, in `YYYY-MM-DD` form, for a control left to the platform's own uncontrolled state. */\n\t\tdefaultValue?: string;\n\t\t/** Earliest accepted date, in `YYYY-MM-DD` form. */\n\t\tmin?: string;\n\t\t/** Latest accepted date, in `YYYY-MM-DD` form. */\n\t\tmax?: string;\n\t\t/** Granularity, in days, the control's value must fall on. */\n\t\tstep?: number;\n\t\t/** Marks the control required for its enclosing form. */\n\t\trequired?: boolean;\n\t\t/** Marks the control inert and excluded from the tab order. */\n\t\tdisabled?: boolean;\n\t\t/** Marks the control's value fixed, while keeping it focusable and included in form submission. */\n\t\treadOnly?: boolean;\n\t\t/** Native autofill hint, e.g. `\"bday\"`. */\n\t\tautoComplete?: string;\n\t\t/** Per-part styling for this wrapper's internally composed elements. */\n\t\tparts?: PartsProps;\n\t}\n}\n\n/**\n * Renders a complete date field in one call, stacking {@link Label},\n * {@link Input}, and, when supplied, {@link Description} and {@link FieldError}.\n * An invalid state — from `errorMessage` or an explicit `aria-invalid` override — recolors the border and ring to the semantic danger tone regardless of `color`.\n *\n * @param handle Runtime handle carrying the root element's props and this instance's stable identifier.\n * @returns The render function producing the field's markup.\n * @example\n * <DateField label={t(\"form.birthday.label\")} name=\"birthday\" autoComplete=\"bday\" />\n * @example\n * <DateField\n * \tlabel={t(\"form.startDate.label\")}\n * \tname=\"startDate\"\n * \tmin=\"2026-01-01\"\n * \tmax=\"2026-12-31\"\n * \tdescription={t(\"form.startDate.hint\")}\n * />\n * @example\n * <DateField\n * \tlabel={t(\"form.dueDate.label\")}\n * \tname=\"dueDate\"\n * \tdefaultValue=\"2026-07-20\"\n * \terrorMessage={t(\"form.dueDate.pastDate\")}\n * />\n */\nexport function DateField(handle: Handle<DateField.Props>) {\n\treturn () => {\n\t\tlet {\n\t\t\tcolor,\n\t\t\tlabel,\n\t\t\tdescription,\n\t\t\terrorMessage: errorMessageProp,\n\t\t\tautoFocus,\n\t\t\tname,\n\t\t\tvalue,\n\t\t\tdefaultValue,\n\t\t\tmin,\n\t\t\tmax,\n\t\t\tstep,\n\t\t\trequired,\n\t\t\tdisabled,\n\t\t\treadOnly,\n\t\t\tautoComplete,\n\t\t\t\"aria-invalid\": ariaInvalidProp,\n\t\t\tparts,\n\t\t\tmix,\n\t\t\t...rest\n\t\t} = handle.props;\n\t\tlet { errorMessage, isFirstInvalid } = resolveFieldIssue(handle, name, errorMessageProp);\n\t\tlet resolvedAutoFocus = autoFocus ?? (isFirstInvalid || undefined);\n\t\tlet { resolvedColor, resolvedInvalid, descriptionId, errorId, describedBy } =\n\t\t\tresolveFieldWiring(handle.id, {\n\t\t\t\tcolor,\n\t\t\t\terrorMessage,\n\t\t\t\tdescription,\n\t\t\t\tariaInvalid: ariaInvalidProp,\n\t\t\t});\n\n\t\treturn (\n\t\t\t<div {...rest} data-slot=\"date-field\" mix={mergeMix(fieldStackLayout(), mix)}>\n\t\t\t\t<Label htmlFor={handle.id} mix={parts?.label}>\n\t\t\t\t\t{label}\n\t\t\t\t</Label>\n\t\t\t\t<Input\n\t\t\t\t\tid={handle.id}\n\t\t\t\t\ttype=\"date\"\n\t\t\t\t\tname={name}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\tmin={min}\n\t\t\t\t\tmax={max}\n\t\t\t\t\tstep={step}\n\t\t\t\t\trequired={required}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\tautoComplete={autoComplete}\n\t\t\t\t\t// oxlint-disable-next-line jsx-a11y/no-autofocus -- Not a focus grab on page load: this only ever resolves true for the first field an enclosing Form reports as invalid, so a failed submit lands the user on the problem instead of leaving them to hunt for it.\n\t\t\t\t\tautoFocus={resolvedAutoFocus}\n\t\t\t\t\taria-invalid={resolvedInvalid}\n\t\t\t\t\taria-describedby={describedBy}\n\t\t\t\t\tcolor={resolvedColor}\n\t\t\t\t\tmix={[tabularNums(), parts?.input]}\n\t\t\t\t/>\n\t\t\t\t{description ? (\n\t\t\t\t\t<Description id={descriptionId} mix={parts?.description}>\n\t\t\t\t\t\t{description}\n\t\t\t\t\t</Description>\n\t\t\t\t) : null}\n\t\t\t\t{errorMessage ? (\n\t\t\t\t\t<FieldError id={errorId} mix={parts?.error}>\n\t\t\t\t\t\t{errorMessage}\n\t\t\t\t\t</FieldError>\n\t\t\t\t) : null}\n\t\t\t</div>\n\t\t);\n\t};\n}\n"
17
17
  },
18
18
  "test": null
19
19
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "date-picker",
3
- "changedIn": "2026.10.20",
3
+ "changedIn": "2026.11.1",
4
4
  "dependencies": [
5
5
  "date-field"
6
6
  ],
@@ -9,7 +9,7 @@
9
9
  ],
10
10
  "source": {
11
11
  "path": "date-picker.tsx",
12
- "content": "/**\n * A labeled date field built on {@link DateField}, with a\n * {@link DatePicker.Group} row for composing more than one field into a single\n * control. The calendar is the platform's: the field is a native date input, so\n * the picker, its keyboard handling and its locale all come from the browser and\n * all of it works before any script loads. Leaving `children` unset renders the\n * field on its own.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps, RemixNode } from \"remix/component\";\n\nimport { outline } from \"@sdxc/u/color\";\nimport { roundedCorner } from \"@sdxc/u/effects\";\nimport { raw } from \"@sdxc/u/general\";\nimport { flex, flexCol, gap, items } from \"@sdxc/u/layout\";\nimport { mis } from \"@sdxc/u/size\";\nimport { z } from \"@sdxc/u/stacking\";\nimport { when } from \"@sdxc/u/state\";\n\nimport { DateField } from \"@sdxc/ui/date-field\";\n\n/**\n * Prop types for {@link DatePicker} and its compound parts.\n */\nexport namespace DatePicker {\n\t/**\n\t * Semantic color role for the fallback field's keyboard focus ring. Read\n\t * only by the fallback field — {@link DatePicker.Group}'s composed\n\t * control carries no `color` prop of its own.\n\t */\n\texport type Color = DateField.Color;\n\n\t/**\n\t * Every prop {@link DateField.PartsProps} accepts, applied only to the\n\t * field's internally composed parts; a composed layout styles the controls\n\t * inside {@link DatePicker.Group} individually.\n\t */\n\texport interface PartsProps extends DateField.PartsProps {}\n\n\t/**\n\t * Props accepted by {@link DatePicker}. Leaving `children` unset renders the\n\t * field using every prop below; composing {@link DatePicker.Group} instead\n\t * renders the joined row and leaves every prop below unread.\n\t */\n\texport interface Props extends Omit<TagProps<\"div\">, \"children\"> {\n\t\t/** Semantic color role for the fallback field's focus ring. Read only when `children` is unset. */\n\t\tcolor?: Color;\n\t\t/** The fallback field's caption, rendered through {@link DateField}. Read only when `children` is unset. */\n\t\tlabel?: RemixNode;\n\t\t/** Supporting copy beneath the fallback field. Read only when `children` is unset. */\n\t\tdescription?: RemixNode;\n\t\t/** Validation message beneath the fallback field. Read only when `children` is unset. */\n\t\terrorMessage?: RemixNode;\n\t\t/** Native `name` submitted with an enclosing form, read only by the fallback field. */\n\t\tname?: string;\n\t\t/** Current value, in `YYYY-MM-DD` form, for a fallback field a consumer tracks itself. */\n\t\tvalue?: string;\n\t\t/** Initial value, in `YYYY-MM-DD` form, for a fallback field left to the platform's own uncontrolled state. */\n\t\tdefaultValue?: string;\n\t\t/** Earliest accepted date, in `YYYY-MM-DD` form, read only by the fallback field. */\n\t\tmin?: string;\n\t\t/** Latest accepted date, in `YYYY-MM-DD` form, read only by the fallback field. */\n\t\tmax?: string;\n\t\t/** Granularity, in days, the fallback field's value must fall on. */\n\t\tstep?: number;\n\t\t/** Marks the fallback field required for its enclosing form. */\n\t\trequired?: boolean;\n\t\t/** Marks the fallback field inert and excluded from the tab order. */\n\t\tdisabled?: boolean;\n\t\t/** Marks the fallback field's value fixed, while keeping it focusable and included in form submission. */\n\t\treadOnly?: boolean;\n\t\t/** Native autofill hint for the fallback field, e.g. `\"bday\"`. */\n\t\tautoComplete?: string;\n\t\t/** Per-part styling for the fallback field's internally composed parts. Read only when `children` is unset. */\n\t\tparts?: PartsProps;\n\t\t/**\n\t\t * The composed layout — typically a `Label` and a\n\t\t * {@link DatePicker.Group} — rendered in place of the field, leaving every\n\t\t * field above unread.\n\t\t */\n\t\tchildren?: RemixNode;\n\t}\n\n\t/**\n\t * Every native `<div>` attribute, unchanged, plus the `mix` passthrough.\n\t * `children` composes the field's own control, and a second one for a\n\t * range, into one visual row.\n\t */\n\texport interface GroupProps extends TagProps<\"div\"> {}\n}\n\n/**\n * Renders {@link DatePicker}'s root. Leaving `children` unset renders the field,\n * passing every prop above through unchanged; composing\n * {@link DatePicker.Group} as `children` instead renders the joined row and\n * leaves those props unread.\n *\n * @param handle Runtime handle carrying the root element's props.\n * @returns The render function producing the date picker's markup.\n * @example\n * <DatePicker label={t(\"form.birthday.label\")} name=\"birthday\" autoComplete=\"bday\" />\n * @example\n * <DatePicker>\n * \t<Label htmlFor=\"startDate\">{t(\"form.startDate.label\")}</Label>\n * \t<DatePicker.Group>\n * \t\t<Input id=\"startDate\" type=\"date\" name=\"startDate\" />\n * \t</DatePicker.Group>\n * </DatePicker>\n */\nexport function DatePicker(handle: Handle<DatePicker.Props>) {\n\treturn () => {\n\t\tlet {\n\t\t\tcolor,\n\t\t\tlabel,\n\t\t\tdescription,\n\t\t\terrorMessage,\n\t\t\tname,\n\t\t\tvalue,\n\t\t\tdefaultValue,\n\t\t\tmin,\n\t\t\tmax,\n\t\t\tstep,\n\t\t\trequired,\n\t\t\tdisabled,\n\t\t\treadOnly,\n\t\t\tautoComplete,\n\t\t\tparts,\n\t\t\tchildren,\n\t\t\tmix,\n\t\t\t...rest\n\t\t} = handle.props;\n\n\t\tif (import.meta.env?.DEV && !children && !label) {\n\t\t\tconsole.warn(\n\t\t\t\t'DatePicker: falling back to DateField\\'s plain \"input type=date\" needs a \"label\" describing what it collects for assistive technology.',\n\t\t\t);\n\t\t}\n\n\t\tif (!children) {\n\t\t\treturn (\n\t\t\t\t<DateField\n\t\t\t\t\t{...rest}\n\t\t\t\t\tcolor={color}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\tdescription={description}\n\t\t\t\t\terrorMessage={errorMessage}\n\t\t\t\t\tname={name}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\tmin={min}\n\t\t\t\t\tmax={max}\n\t\t\t\t\tstep={step}\n\t\t\t\t\trequired={required}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\tautoComplete={autoComplete}\n\t\t\t\t\tparts={parts}\n\t\t\t\t\tmix={mix}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div {...rest} data-slot=\"date-picker\" mix={[flex(), flexCol(), gap(1), mix]}>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t};\n}\n\n/**\n * Renders {@link DatePicker}'s control row: a flex host laying one or more date\n * controls side by side and joining their edges, so a pair reads as one field.\n * Focus and validity are drawn the way `Group` draws them — focus by the control\n * that holds it, validity once around the row.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the row's markup.\n * @example\n * <DatePicker.Group>\n * \t<Input id=\"startDate\" type=\"date\" name=\"startDate\" />\n * </DatePicker.Group>\n */\nDatePicker.Group = function DatePickerGroup(handle: Handle<DatePicker.GroupProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"group\"\n\t\t\t\tmix={[\n\t\t\t\t\tflex(),\n\t\t\t\t\titems(\"center\"),\n\t\t\t\t\t/**\n\t\t\t\t\t * The fields compose into one control, so the pair keeps the rounding on its own\n\t\t\t\t\t * outer corners and the seam the two share is drawn once.\n\t\t\t\t\t */\n\t\t\t\t\twhen(\"& > *:not(:first-child)\", [\n\t\t\t\t\t\troundedCorner(\"start-start\", \"none\"),\n\t\t\t\t\t\troundedCorner(\"end-start\", \"none\"),\n\t\t\t\t\t\tmis(\"-1px\"),\n\t\t\t\t\t]),\n\t\t\t\t\twhen(\"& > *:not(:last-child)\", [\n\t\t\t\t\t\troundedCorner(\"start-end\", \"none\"),\n\t\t\t\t\t\troundedCorner(\"end-end\", \"none\"),\n\t\t\t\t\t]),\n\t\t\t\t\t/**\n\t\t\t\t\t * Focus shows on the field holding it, naming which date has it where a ring around\n\t\t\t\t\t * the pair names only the group. That field is raised so its ring crosses the seam.\n\t\t\t\t\t */\n\t\t\t\t\twhen(\"& > *:focus-visible\", z(1)),\n\t\t\t\t\t/**\n\t\t\t\t\t * Validity belongs to the pair, since a range is one value and half of one makes it\n\t\t\t\t\t * invalid: one ring is drawn around the group and each field's own ring is released,\n\t\t\t\t\t * so the seam shows one field needing attention.\n\t\t\t\t\t */\n\t\t\t\t\twhen(\n\t\t\t\t\t\t'&:has(> :user-invalid), &:has(> [aria-invalid=\"true\"])',\n\t\t\t\t\t\toutline({ color: \"danger.ring\", offset: 2 }),\n\t\t\t\t\t),\n\t\t\t\t\twhen(\n\t\t\t\t\t\t'& > :user-invalid:not(:focus-visible), & > [aria-invalid=\"true\"]:not(:focus-visible)',\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Important so it reaches across to the cascade layer where `Input` states the field's\n\t\t\t\t\t\t * invalid ring. The selector excludes `:focus-visible`, so a field being filled in still\n\t\t\t\t\t\t * shows its own focus ring.\n\t\t\t\t\t\t */\n\t\t\t\t\t\traw({ outline: \"none !important\" }),\n\t\t\t\t\t),\n\t\t\t\t\tmix,\n\t\t\t\t]}\n\t\t\t/>\n\t\t);\n\t};\n};\n"
12
+ "content": "/**\n * A labeled date field built on {@link DateField}, with a\n * {@link DatePicker.Group} row for composing more than one field into a single\n * control. The calendar is the platform's: the field is a native date input, so\n * the picker, its keyboard handling and its locale all come from the browser and\n * all of it works before any script loads. Leaving `children` unset renders the\n * field on its own.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps, RemixNode } from \"remix/component\";\n\nimport { outline } from \"@sdxc/u/color\";\nimport { roundedCorner } from \"@sdxc/u/effects\";\nimport { raw, mergeMix } from \"@sdxc/u/general\";\nimport { flex, flexCol, gap, items } from \"@sdxc/u/layout\";\nimport { mis } from \"@sdxc/u/size\";\nimport { z } from \"@sdxc/u/stacking\";\nimport { when } from \"@sdxc/u/state\";\n\nimport { DateField } from \"@sdxc/ui/date-field\";\n\n/**\n * Prop types for {@link DatePicker} and its compound parts.\n */\nexport namespace DatePicker {\n\t/**\n\t * Semantic color role for the fallback field's keyboard focus ring. Read\n\t * only by the fallback field — {@link DatePicker.Group}'s composed\n\t * control carries no `color` prop of its own.\n\t */\n\texport type Color = DateField.Color;\n\n\t/**\n\t * Every prop {@link DateField.PartsProps} accepts, applied only to the\n\t * field's internally composed parts; a composed layout styles the controls\n\t * inside {@link DatePicker.Group} individually.\n\t */\n\texport interface PartsProps extends DateField.PartsProps {}\n\n\t/**\n\t * Props accepted by {@link DatePicker}. Leaving `children` unset renders the\n\t * field using every prop below; composing {@link DatePicker.Group} instead\n\t * renders the joined row and leaves every prop below unread.\n\t */\n\texport interface Props extends Omit<TagProps<\"div\">, \"children\"> {\n\t\t/** Semantic color role for the fallback field's focus ring. Read only when `children` is unset. */\n\t\tcolor?: Color;\n\t\t/** The fallback field's caption, rendered through {@link DateField}. Read only when `children` is unset. */\n\t\tlabel?: RemixNode;\n\t\t/** Supporting copy beneath the fallback field. Read only when `children` is unset. */\n\t\tdescription?: RemixNode;\n\t\t/** Validation message beneath the fallback field. Read only when `children` is unset. */\n\t\terrorMessage?: RemixNode;\n\t\t/** Native `name` submitted with an enclosing form, read only by the fallback field. */\n\t\tname?: string;\n\t\t/** Current value, in `YYYY-MM-DD` form, for a fallback field a consumer tracks itself. */\n\t\tvalue?: string;\n\t\t/** Initial value, in `YYYY-MM-DD` form, for a fallback field left to the platform's own uncontrolled state. */\n\t\tdefaultValue?: string;\n\t\t/** Earliest accepted date, in `YYYY-MM-DD` form, read only by the fallback field. */\n\t\tmin?: string;\n\t\t/** Latest accepted date, in `YYYY-MM-DD` form, read only by the fallback field. */\n\t\tmax?: string;\n\t\t/** Granularity, in days, the fallback field's value must fall on. */\n\t\tstep?: number;\n\t\t/** Marks the fallback field required for its enclosing form. */\n\t\trequired?: boolean;\n\t\t/** Marks the fallback field inert and excluded from the tab order. */\n\t\tdisabled?: boolean;\n\t\t/** Marks the fallback field's value fixed, while keeping it focusable and included in form submission. */\n\t\treadOnly?: boolean;\n\t\t/** Native autofill hint for the fallback field, e.g. `\"bday\"`. */\n\t\tautoComplete?: string;\n\t\t/** Per-part styling for the fallback field's internally composed parts. Read only when `children` is unset. */\n\t\tparts?: PartsProps;\n\t\t/**\n\t\t * The composed layout — typically a `Label` and a\n\t\t * {@link DatePicker.Group} — rendered in place of the field, leaving every\n\t\t * field above unread.\n\t\t */\n\t\tchildren?: RemixNode;\n\t}\n\n\t/**\n\t * Every native `<div>` attribute, unchanged, plus the `mix` passthrough.\n\t * `children` composes the field's own control, and a second one for a\n\t * range, into one visual row.\n\t */\n\texport interface GroupProps extends TagProps<\"div\"> {}\n}\n\n/**\n * Renders {@link DatePicker}'s root. Leaving `children` unset renders the field,\n * passing every prop above through unchanged; composing\n * {@link DatePicker.Group} as `children` instead renders the joined row and\n * leaves those props unread.\n *\n * @param handle Runtime handle carrying the root element's props.\n * @returns The render function producing the date picker's markup.\n * @example\n * <DatePicker label={t(\"form.birthday.label\")} name=\"birthday\" autoComplete=\"bday\" />\n * @example\n * <DatePicker>\n * \t<Label htmlFor=\"startDate\">{t(\"form.startDate.label\")}</Label>\n * \t<DatePicker.Group>\n * \t\t<Input id=\"startDate\" type=\"date\" name=\"startDate\" />\n * \t</DatePicker.Group>\n * </DatePicker>\n */\nexport function DatePicker(handle: Handle<DatePicker.Props>) {\n\treturn () => {\n\t\tlet {\n\t\t\tcolor,\n\t\t\tlabel,\n\t\t\tdescription,\n\t\t\terrorMessage,\n\t\t\tname,\n\t\t\tvalue,\n\t\t\tdefaultValue,\n\t\t\tmin,\n\t\t\tmax,\n\t\t\tstep,\n\t\t\trequired,\n\t\t\tdisabled,\n\t\t\treadOnly,\n\t\t\tautoComplete,\n\t\t\tparts,\n\t\t\tchildren,\n\t\t\tmix,\n\t\t\t...rest\n\t\t} = handle.props;\n\n\t\tif (import.meta.env?.DEV && !children && !label) {\n\t\t\tconsole.warn(\n\t\t\t\t'DatePicker: falling back to DateField\\'s plain \"input type=date\" needs a \"label\" describing what it collects for assistive technology.',\n\t\t\t);\n\t\t}\n\n\t\tif (!children) {\n\t\t\treturn (\n\t\t\t\t<DateField\n\t\t\t\t\t{...rest}\n\t\t\t\t\tcolor={color}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\tdescription={description}\n\t\t\t\t\terrorMessage={errorMessage}\n\t\t\t\t\tname={name}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\tmin={min}\n\t\t\t\t\tmax={max}\n\t\t\t\t\tstep={step}\n\t\t\t\t\trequired={required}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\tautoComplete={autoComplete}\n\t\t\t\t\tparts={parts}\n\t\t\t\t\tmix={mix}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div {...rest} data-slot=\"date-picker\" mix={mergeMix([flex(), flexCol(), gap(1)], mix)}>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t};\n}\n\n/**\n * Renders {@link DatePicker}'s control row: a flex host laying one or more date\n * controls side by side and joining their edges, so a pair reads as one field.\n * Focus and validity are drawn the way `Group` draws them — focus by the control\n * that holds it, validity once around the row.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the row's markup.\n * @example\n * <DatePicker.Group>\n * \t<Input id=\"startDate\" type=\"date\" name=\"startDate\" />\n * </DatePicker.Group>\n */\nDatePicker.Group = function DatePickerGroup(handle: Handle<DatePicker.GroupProps>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\t{...rest}\n\t\t\t\tdata-slot=\"group\"\n\t\t\t\tmix={mergeMix(\n\t\t\t\t\t[\n\t\t\t\t\t\tflex(),\n\t\t\t\t\t\titems(\"center\"),\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * The fields compose into one control, so the pair keeps the rounding on its own\n\t\t\t\t\t\t * outer corners and the seam the two share is drawn once.\n\t\t\t\t\t\t */\n\t\t\t\t\t\twhen(\"& > *:not(:first-child)\", [\n\t\t\t\t\t\t\troundedCorner(\"start-start\", \"none\"),\n\t\t\t\t\t\t\troundedCorner(\"end-start\", \"none\"),\n\t\t\t\t\t\t\tmis(\"-1px\"),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\twhen(\"& > *:not(:last-child)\", [\n\t\t\t\t\t\t\troundedCorner(\"start-end\", \"none\"),\n\t\t\t\t\t\t\troundedCorner(\"end-end\", \"none\"),\n\t\t\t\t\t\t]),\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Focus shows on the field holding it, naming which date has it where a ring around\n\t\t\t\t\t\t * the pair names only the group. That field is raised so its ring crosses the seam.\n\t\t\t\t\t\t */\n\t\t\t\t\t\twhen(\"& > *:focus-visible\", z(1)),\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Validity belongs to the pair, since a range is one value and half of one makes it\n\t\t\t\t\t\t * invalid: one ring is drawn around the group and each field's own ring is released,\n\t\t\t\t\t\t * so the seam shows one field needing attention.\n\t\t\t\t\t\t */\n\t\t\t\t\t\twhen(\n\t\t\t\t\t\t\t'&:has(> :user-invalid), &:has(> [aria-invalid=\"true\"])',\n\t\t\t\t\t\t\toutline({ color: \"danger.ring\", offset: 2 }),\n\t\t\t\t\t\t),\n\t\t\t\t\t\twhen(\n\t\t\t\t\t\t\t'& > :user-invalid:not(:focus-visible), & > [aria-invalid=\"true\"]:not(:focus-visible)',\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * Important so it reaches across to the cascade layer where `Input` states the field's\n\t\t\t\t\t\t\t * invalid ring. The selector excludes `:focus-visible`, so a field being filled in still\n\t\t\t\t\t\t\t * shows its own focus ring.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\traw({ outline: \"none !important\" }),\n\t\t\t\t\t\t),\n\t\t\t\t\t],\n\t\t\t\t\tmix,\n\t\t\t\t)}\n\t\t\t/>\n\t\t);\n\t};\n};\n"
13
13
  },
14
14
  "test": null
15
15
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "date-range-picker",
3
- "changedIn": "2026.10.20",
3
+ "changedIn": "2026.11.1",
4
4
  "dependencies": [
5
5
  "date-field",
6
6
  "date-picker"
@@ -10,7 +10,7 @@
10
10
  ],
11
11
  "source": {
12
12
  "path": "date-range-picker.tsx",
13
- "content": "/**\n * A paired-field date range control built on {@link DateField} — independent\n * start-date and end-date fields, each fully labeled, described, and validated\n * on its own — with a {@link DateRangePicker.Group} row for joining the two\n * into one control. The calendar is the platform's, since each field is a\n * native date input, so the whole range is pickable before any script loads.\n * Leaving `children` unset renders the pair on its own.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps, RemixNode } from \"remix/component\";\n\nimport { flex, flexCol, gap, items } from \"@sdxc/u/layout\";\nimport { attrs } from \"remix/component\";\n\nimport { DateField } from \"@sdxc/ui/date-field\";\nimport { DatePicker } from \"@sdxc/ui/date-picker\";\n\n/**\n * Prop types for {@link DateRangePicker} and its compound parts.\n * {@link DateRangePicker.Group} aliases {@link DatePicker.Group} directly,\n * since a row of fields reads the same for a range as for a single date.\n */\nexport namespace DateRangePicker {\n\t/**\n\t * Semantic color role for the fallback pair's keyboard focus rings. Read\n\t * only by the fallback fields — {@link DateRangePicker.Group}'s composed\n\t * control carries no `color` prop of its own.\n\t */\n\texport type Color = DateField.Color;\n\n\t/**\n\t * Per-part styling for the two {@link DateField} instances the fallback\n\t * pair composes, each forwarded to that field's own `parts`. Read only\n\t * when `children` is unset; the composed layout styles its own parts individually instead.\n\t */\n\texport interface PartsProps {\n\t\t/** Per-part styling for the fallback pair's start-date field. */\n\t\tstart?: DateField.PartsProps;\n\t\t/** Per-part styling for the fallback pair's end-date field. */\n\t\tend?: DateField.PartsProps;\n\t}\n\n\t/**\n\t * Props accepted by {@link DateRangePicker}. Leaving `children` unset\n\t * renders two independent {@link DateField} instances — one per end of\n\t * the range — using every field below; composing\n\t * {@link DateRangePicker.Group} instead renders the joined row and leaves\n\t * every field below unread.\n\t */\n\texport interface Props extends Omit<TagProps<\"div\">, \"children\"> {\n\t\t/** Semantic color role for the fallback pair's focus rings. Read only when `children` is unset. */\n\t\tcolor?: Color;\n\t\t/** The start-date field's caption, rendered through {@link DateField}. Read only when `children` is unset. */\n\t\tstartLabel?: RemixNode;\n\t\t/** The end-date field's caption, rendered through {@link DateField}. Read only when `children` is unset. */\n\t\tendLabel?: RemixNode;\n\t\t/** Supporting copy beneath the start-date field. Read only when `children` is unset. */\n\t\tstartDescription?: RemixNode;\n\t\t/** Supporting copy beneath the end-date field. Read only when `children` is unset. */\n\t\tendDescription?: RemixNode;\n\t\t/** Validation message beneath the start-date field. Read only when `children` is unset. */\n\t\tstartErrorMessage?: RemixNode;\n\t\t/** Validation message beneath the end-date field. Read only when `children` is unset. */\n\t\tendErrorMessage?: RemixNode;\n\t\t/** Native `name` submitted with an enclosing form for the start-date field. */\n\t\tstartName?: string;\n\t\t/** Native `name` submitted with an enclosing form for the end-date field. */\n\t\tendName?: string;\n\t\t/** Current start-of-range value, in `YYYY-MM-DD` form, for a fallback pair a consumer tracks itself. */\n\t\tstartValue?: string;\n\t\t/** Current end-of-range value, in `YYYY-MM-DD` form, for a fallback pair a consumer tracks itself. */\n\t\tendValue?: string;\n\t\t/** Initial start-of-range value, in `YYYY-MM-DD` form, for a fallback pair left to the platform's own uncontrolled state. */\n\t\tstartDefaultValue?: string;\n\t\t/** Initial end-of-range value, in `YYYY-MM-DD` form, for a fallback pair left to the platform's own uncontrolled state. */\n\t\tendDefaultValue?: string;\n\t\t/** Earliest accepted date, in `YYYY-MM-DD` form, read by both of the fallback pair's fields. */\n\t\tmin?: string;\n\t\t/** Latest accepted date, in `YYYY-MM-DD` form, read by both of the fallback pair's fields. */\n\t\tmax?: string;\n\t\t/** Granularity, in days, both of the fallback pair's values must fall on. */\n\t\tstep?: number;\n\t\t/** Marks both of the fallback pair's fields required for their enclosing form. */\n\t\trequired?: boolean;\n\t\t/** Marks both of the fallback pair's fields inert and excluded from the tab order. */\n\t\tdisabled?: boolean;\n\t\t/** Marks both of the fallback pair's fields' values fixed, while keeping them focusable and included in form submission. */\n\t\treadOnly?: boolean;\n\t\t/** Native autofill hint for both of the fallback pair's fields. */\n\t\tautoComplete?: string;\n\t\t/** Per-part styling for the fallback pair's internally composed {@link DateField} instances. Read only when `children` is unset. */\n\t\tparts?: PartsProps;\n\t\t/**\n\t\t * The joined layout — typically a `Label` and a\n\t\t * {@link DateRangePicker.Group} — rendered in place of the paired fields,\n\t\t * leaving every field above unread when set.\n\t\t */\n\t\tchildren?: RemixNode;\n\t}\n\n\t/**\n\t * Every prop {@link DatePicker.GroupProps} accepts, unchanged. `children`\n\t * composes the range's own start and end controls into one visual row.\n\t */\n\texport interface GroupProps extends DatePicker.GroupProps {}\n}\n\n/**\n * Renders {@link DateRangePicker}'s root. Leaving `children` unset renders\n * two independent {@link DateField} instances side by side under a native\n * `role=\"group\"`, each aligned to its own start edge so a validation message\n * under one never shifts the other's label; composing\n * {@link DateRangePicker.Group} as `children` instead joins the two fields into\n * one row and leaves every field prop above unread.\n *\n * @param handle Runtime handle carrying the root element's props.\n * @returns The render function producing the date range picker's markup.\n * @example\n * <DateRangePicker\n * \tstartLabel={t(\"form.stay.checkIn\")}\n * \tendLabel={t(\"form.stay.checkOut\")}\n * \tstartName=\"checkIn\"\n * \tendName=\"checkOut\"\n * />\n * @example\n * <DateRangePicker>\n * \t<Label htmlFor=\"tripStart\">{t(\"form.trip.label\")}</Label>\n * \t<DateRangePicker.Group>\n * \t\t<Input id=\"tripStart\" type=\"date\" name=\"tripStart\" aria-label={t(\"form.trip.start\")} />\n * \t\t<Input id=\"tripEnd\" type=\"date\" name=\"tripEnd\" aria-label={t(\"form.trip.end\")} />\n * \t</DateRangePicker.Group>\n * </DateRangePicker>\n */\nexport function DateRangePicker(handle: Handle<DateRangePicker.Props>) {\n\treturn () => {\n\t\tlet {\n\t\t\tcolor,\n\t\t\tstartLabel,\n\t\t\tendLabel,\n\t\t\tstartDescription,\n\t\t\tendDescription,\n\t\t\tstartErrorMessage,\n\t\t\tendErrorMessage,\n\t\t\tstartName,\n\t\t\tendName,\n\t\t\tstartValue,\n\t\t\tendValue,\n\t\t\tstartDefaultValue,\n\t\t\tendDefaultValue,\n\t\t\tmin,\n\t\t\tmax,\n\t\t\tstep,\n\t\t\trequired,\n\t\t\tdisabled,\n\t\t\treadOnly,\n\t\t\tautoComplete,\n\t\t\tparts,\n\t\t\tchildren,\n\t\t\tmix,\n\t\t\t...rest\n\t\t} = handle.props;\n\n\t\tif (import.meta.env?.DEV && !children) {\n\t\t\tif (!startLabel) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'DateRangePicker: falling back to paired \"input type=date\" fields needs a \"startLabel\" describing the range\\'s start for assistive technology.',\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (!endLabel) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'DateRangePicker: falling back to paired \"input type=date\" fields needs an \"endLabel\" describing the range\\'s end for assistive technology.',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tif (!children) {\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\t{...rest}\n\t\t\t\t\tdata-slot=\"fields\"\n\t\t\t\t\tmix={[attrs({ role: \"group\" }), flex(), gap(2), items(\"start\"), mix]}\n\t\t\t\t>\n\t\t\t\t\t<DateField\n\t\t\t\t\t\tcolor={color}\n\t\t\t\t\t\tlabel={startLabel}\n\t\t\t\t\t\tdescription={startDescription}\n\t\t\t\t\t\terrorMessage={startErrorMessage}\n\t\t\t\t\t\tname={startName}\n\t\t\t\t\t\tvalue={startValue}\n\t\t\t\t\t\tdefaultValue={startDefaultValue}\n\t\t\t\t\t\tmin={min}\n\t\t\t\t\t\tmax={max}\n\t\t\t\t\t\tstep={step}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\tautoComplete={autoComplete}\n\t\t\t\t\t\tparts={parts?.start}\n\t\t\t\t\t/>\n\t\t\t\t\t<DateField\n\t\t\t\t\t\tcolor={color}\n\t\t\t\t\t\tlabel={endLabel}\n\t\t\t\t\t\tdescription={endDescription}\n\t\t\t\t\t\terrorMessage={endErrorMessage}\n\t\t\t\t\t\tname={endName}\n\t\t\t\t\t\tvalue={endValue}\n\t\t\t\t\t\tdefaultValue={endDefaultValue}\n\t\t\t\t\t\tmin={min}\n\t\t\t\t\t\tmax={max}\n\t\t\t\t\t\tstep={step}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\tautoComplete={autoComplete}\n\t\t\t\t\t\tparts={parts?.end}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div {...rest} data-slot=\"date-range-picker\" mix={[flex(), flexCol(), gap(1), mix]}>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t};\n}\n\n/**\n * Renders {@link DateRangePicker}'s control row: identical to\n * {@link DatePicker.Group}'s markup and focus-within outline. `children`\n * composes the range's start and end controls with {@link DateRangePicker.Button}, and the row gains a keyboard focus ring whenever focus lands anywhere inside it.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the row's markup.\n * @example\n * <DateRangePicker.Group>\n * \t<Input id=\"tripStart\" type=\"date\" name=\"tripStart\" aria-label={t(\"form.trip.start\")} />\n * \t<Input id=\"tripEnd\" type=\"date\" name=\"tripEnd\" aria-label={t(\"form.trip.end\")} />\n * </DateRangePicker.Group>\n */\nDateRangePicker.Group = DatePicker.Group;\n"
13
+ "content": "/**\n * A paired-field date range control built on {@link DateField} — independent\n * start-date and end-date fields, each fully labeled, described, and validated\n * on its own — with a {@link DateRangePicker.Group} row for joining the two\n * into one control. The calendar is the platform's, since each field is a\n * native date input, so the whole range is pickable before any script loads.\n * Leaving `children` unset renders the pair on its own.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps, RemixNode } from \"remix/component\";\n\nimport { mergeMix } from \"@sdxc/u/general\";\nimport { flex, flexCol, gap, items } from \"@sdxc/u/layout\";\nimport { attrs } from \"remix/component\";\n\nimport { DateField } from \"@sdxc/ui/date-field\";\nimport { DatePicker } from \"@sdxc/ui/date-picker\";\n\n/**\n * Prop types for {@link DateRangePicker} and its compound parts.\n * {@link DateRangePicker.Group} aliases {@link DatePicker.Group} directly,\n * since a row of fields reads the same for a range as for a single date.\n */\nexport namespace DateRangePicker {\n\t/**\n\t * Semantic color role for the fallback pair's keyboard focus rings. Read\n\t * only by the fallback fields — {@link DateRangePicker.Group}'s composed\n\t * control carries no `color` prop of its own.\n\t */\n\texport type Color = DateField.Color;\n\n\t/**\n\t * Per-part styling for the two {@link DateField} instances the fallback\n\t * pair composes, each forwarded to that field's own `parts`. Read only\n\t * when `children` is unset; the composed layout styles its own parts individually instead.\n\t */\n\texport interface PartsProps {\n\t\t/** Per-part styling for the fallback pair's start-date field. */\n\t\tstart?: DateField.PartsProps;\n\t\t/** Per-part styling for the fallback pair's end-date field. */\n\t\tend?: DateField.PartsProps;\n\t}\n\n\t/**\n\t * Props accepted by {@link DateRangePicker}. Leaving `children` unset\n\t * renders two independent {@link DateField} instances — one per end of\n\t * the range — using every field below; composing\n\t * {@link DateRangePicker.Group} instead renders the joined row and leaves\n\t * every field below unread.\n\t */\n\texport interface Props extends Omit<TagProps<\"div\">, \"children\"> {\n\t\t/** Semantic color role for the fallback pair's focus rings. Read only when `children` is unset. */\n\t\tcolor?: Color;\n\t\t/** The start-date field's caption, rendered through {@link DateField}. Read only when `children` is unset. */\n\t\tstartLabel?: RemixNode;\n\t\t/** The end-date field's caption, rendered through {@link DateField}. Read only when `children` is unset. */\n\t\tendLabel?: RemixNode;\n\t\t/** Supporting copy beneath the start-date field. Read only when `children` is unset. */\n\t\tstartDescription?: RemixNode;\n\t\t/** Supporting copy beneath the end-date field. Read only when `children` is unset. */\n\t\tendDescription?: RemixNode;\n\t\t/** Validation message beneath the start-date field. Read only when `children` is unset. */\n\t\tstartErrorMessage?: RemixNode;\n\t\t/** Validation message beneath the end-date field. Read only when `children` is unset. */\n\t\tendErrorMessage?: RemixNode;\n\t\t/** Native `name` submitted with an enclosing form for the start-date field. */\n\t\tstartName?: string;\n\t\t/** Native `name` submitted with an enclosing form for the end-date field. */\n\t\tendName?: string;\n\t\t/** Current start-of-range value, in `YYYY-MM-DD` form, for a fallback pair a consumer tracks itself. */\n\t\tstartValue?: string;\n\t\t/** Current end-of-range value, in `YYYY-MM-DD` form, for a fallback pair a consumer tracks itself. */\n\t\tendValue?: string;\n\t\t/** Initial start-of-range value, in `YYYY-MM-DD` form, for a fallback pair left to the platform's own uncontrolled state. */\n\t\tstartDefaultValue?: string;\n\t\t/** Initial end-of-range value, in `YYYY-MM-DD` form, for a fallback pair left to the platform's own uncontrolled state. */\n\t\tendDefaultValue?: string;\n\t\t/** Earliest accepted date, in `YYYY-MM-DD` form, read by both of the fallback pair's fields. */\n\t\tmin?: string;\n\t\t/** Latest accepted date, in `YYYY-MM-DD` form, read by both of the fallback pair's fields. */\n\t\tmax?: string;\n\t\t/** Granularity, in days, both of the fallback pair's values must fall on. */\n\t\tstep?: number;\n\t\t/** Marks both of the fallback pair's fields required for their enclosing form. */\n\t\trequired?: boolean;\n\t\t/** Marks both of the fallback pair's fields inert and excluded from the tab order. */\n\t\tdisabled?: boolean;\n\t\t/** Marks both of the fallback pair's fields' values fixed, while keeping them focusable and included in form submission. */\n\t\treadOnly?: boolean;\n\t\t/** Native autofill hint for both of the fallback pair's fields. */\n\t\tautoComplete?: string;\n\t\t/** Per-part styling for the fallback pair's internally composed {@link DateField} instances. Read only when `children` is unset. */\n\t\tparts?: PartsProps;\n\t\t/**\n\t\t * The joined layout — typically a `Label` and a\n\t\t * {@link DateRangePicker.Group} — rendered in place of the paired fields,\n\t\t * leaving every field above unread when set.\n\t\t */\n\t\tchildren?: RemixNode;\n\t}\n\n\t/**\n\t * Every prop {@link DatePicker.GroupProps} accepts, unchanged. `children`\n\t * composes the range's own start and end controls into one visual row.\n\t */\n\texport interface GroupProps extends DatePicker.GroupProps {}\n}\n\n/**\n * Renders {@link DateRangePicker}'s root. Leaving `children` unset renders\n * two independent {@link DateField} instances side by side under a native\n * `role=\"group\"`, each aligned to its own start edge so a validation message\n * under one never shifts the other's label; composing\n * {@link DateRangePicker.Group} as `children` instead joins the two fields into\n * one row and leaves every field prop above unread.\n *\n * @param handle Runtime handle carrying the root element's props.\n * @returns The render function producing the date range picker's markup.\n * @example\n * <DateRangePicker\n * \tstartLabel={t(\"form.stay.checkIn\")}\n * \tendLabel={t(\"form.stay.checkOut\")}\n * \tstartName=\"checkIn\"\n * \tendName=\"checkOut\"\n * />\n * @example\n * <DateRangePicker>\n * \t<Label htmlFor=\"tripStart\">{t(\"form.trip.label\")}</Label>\n * \t<DateRangePicker.Group>\n * \t\t<Input id=\"tripStart\" type=\"date\" name=\"tripStart\" aria-label={t(\"form.trip.start\")} />\n * \t\t<Input id=\"tripEnd\" type=\"date\" name=\"tripEnd\" aria-label={t(\"form.trip.end\")} />\n * \t</DateRangePicker.Group>\n * </DateRangePicker>\n */\nexport function DateRangePicker(handle: Handle<DateRangePicker.Props>) {\n\treturn () => {\n\t\tlet {\n\t\t\tcolor,\n\t\t\tstartLabel,\n\t\t\tendLabel,\n\t\t\tstartDescription,\n\t\t\tendDescription,\n\t\t\tstartErrorMessage,\n\t\t\tendErrorMessage,\n\t\t\tstartName,\n\t\t\tendName,\n\t\t\tstartValue,\n\t\t\tendValue,\n\t\t\tstartDefaultValue,\n\t\t\tendDefaultValue,\n\t\t\tmin,\n\t\t\tmax,\n\t\t\tstep,\n\t\t\trequired,\n\t\t\tdisabled,\n\t\t\treadOnly,\n\t\t\tautoComplete,\n\t\t\tparts,\n\t\t\tchildren,\n\t\t\tmix,\n\t\t\t...rest\n\t\t} = handle.props;\n\n\t\tif (import.meta.env?.DEV && !children) {\n\t\t\tif (!startLabel) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'DateRangePicker: falling back to paired \"input type=date\" fields needs a \"startLabel\" describing the range\\'s start for assistive technology.',\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (!endLabel) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'DateRangePicker: falling back to paired \"input type=date\" fields needs an \"endLabel\" describing the range\\'s end for assistive technology.',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tif (!children) {\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\t{...rest}\n\t\t\t\t\tdata-slot=\"fields\"\n\t\t\t\t\tmix={mergeMix([attrs({ role: \"group\" }), flex(), gap(2), items(\"start\")], mix)}\n\t\t\t\t>\n\t\t\t\t\t<DateField\n\t\t\t\t\t\tcolor={color}\n\t\t\t\t\t\tlabel={startLabel}\n\t\t\t\t\t\tdescription={startDescription}\n\t\t\t\t\t\terrorMessage={startErrorMessage}\n\t\t\t\t\t\tname={startName}\n\t\t\t\t\t\tvalue={startValue}\n\t\t\t\t\t\tdefaultValue={startDefaultValue}\n\t\t\t\t\t\tmin={min}\n\t\t\t\t\t\tmax={max}\n\t\t\t\t\t\tstep={step}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\tautoComplete={autoComplete}\n\t\t\t\t\t\tparts={parts?.start}\n\t\t\t\t\t/>\n\t\t\t\t\t<DateField\n\t\t\t\t\t\tcolor={color}\n\t\t\t\t\t\tlabel={endLabel}\n\t\t\t\t\t\tdescription={endDescription}\n\t\t\t\t\t\terrorMessage={endErrorMessage}\n\t\t\t\t\t\tname={endName}\n\t\t\t\t\t\tvalue={endValue}\n\t\t\t\t\t\tdefaultValue={endDefaultValue}\n\t\t\t\t\t\tmin={min}\n\t\t\t\t\t\tmax={max}\n\t\t\t\t\t\tstep={step}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\tautoComplete={autoComplete}\n\t\t\t\t\t\tparts={parts?.end}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div {...rest} data-slot=\"date-range-picker\" mix={mergeMix([flex(), flexCol(), gap(1)], mix)}>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t};\n}\n\n/**\n * Renders {@link DateRangePicker}'s control row: identical to\n * {@link DatePicker.Group}'s markup and focus-within outline. `children`\n * composes the range's start and end controls with {@link DateRangePicker.Button}, and the row gains a keyboard focus ring whenever focus lands anywhere inside it.\n *\n * @param handle Runtime handle carrying the host `<div>`'s props.\n * @returns The render function producing the row's markup.\n * @example\n * <DateRangePicker.Group>\n * \t<Input id=\"tripStart\" type=\"date\" name=\"tripStart\" aria-label={t(\"form.trip.start\")} />\n * \t<Input id=\"tripEnd\" type=\"date\" name=\"tripEnd\" aria-label={t(\"form.trip.end\")} />\n * </DateRangePicker.Group>\n */\nDateRangePicker.Group = DatePicker.Group;\n"
14
14
  },
15
15
  "test": null
16
16
  }
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "description",
3
- "changedIn": "2026.10.13",
3
+ "changedIn": "2026.11.1",
4
4
  "dependencies": [],
5
5
  "exports": [
6
6
  "Description"
7
7
  ],
8
8
  "source": {
9
9
  "path": "description.tsx",
10
- "content": "/**\n * A short passage of supporting copy beneath a form control, styled at the\n * library's default text size and the neutral muted foreground color. It\n * renders as a native `<p>` so a consumer can wire its `id` into the\n * control's `aria-describedby`, giving assistive technology a spoken hint,\n * format requirement, or constraint alongside the control's label.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps } from \"remix/component\";\n\nimport { fg } from \"@sdxc/u/color\";\nimport { pretty, text } from \"@sdxc/u/typography\";\n\n/**\n * Prop types for {@link Description}.\n */\nexport namespace Description {\n\t/**\n\t * Every native `<p>` attribute, unchanged, plus the `mix` passthrough,\n\t * always rendering at the library's default body-copy size and muted\n\t * foreground color. Give it an `id` referenced by the paired control's `aria-describedby` to associate the two.\n\t */\n\texport interface Props extends TagProps<\"p\"> {}\n}\n\n/**\n * Renders its children inside a `<p>` sized and colored as a small run of\n * supporting copy: the library's default text size paired with the neutral\n * muted foreground color, placed after a control inside a field wrapper as a format hint or constraint note.\n *\n * @param handle Runtime handle carrying the host `<p>`'s props.\n * @returns The render function producing the description's markup.\n * @example\n * <Description id=\"password-hint\">\n * {t(\"field.password.hint\")}\n * </Description>\n */\nexport function Description(handle: Handle<Description.Props>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn <p {...rest} mix={[fg(\"neutral.muted\"), text(\"sm\"), pretty(), mix]} />;\n\t};\n}\n"
10
+ "content": "/**\n * A short passage of supporting copy beneath a form control, styled at the\n * library's default text size and the neutral muted foreground color. It\n * renders as a native `<p>` so a consumer can wire its `id` into the\n * control's `aria-describedby`, giving assistive technology a spoken hint,\n * format requirement, or constraint alongside the control's label.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { Handle, Props as TagProps } from \"remix/component\";\n\nimport { fg } from \"@sdxc/u/color\";\nimport { mergeMix } from \"@sdxc/u/general\";\nimport { pretty, text } from \"@sdxc/u/typography\";\n\n/**\n * Prop types for {@link Description}.\n */\nexport namespace Description {\n\t/**\n\t * Every native `<p>` attribute, unchanged, plus the `mix` passthrough,\n\t * always rendering at the library's default body-copy size and muted\n\t * foreground color. Give it an `id` referenced by the paired control's `aria-describedby` to associate the two.\n\t */\n\texport interface Props extends TagProps<\"p\"> {}\n}\n\n/**\n * Renders its children inside a `<p>` sized and colored as a small run of\n * supporting copy: the library's default text size paired with the neutral\n * muted foreground color, placed after a control inside a field wrapper as a format hint or constraint note.\n *\n * @param handle Runtime handle carrying the host `<p>`'s props.\n * @returns The render function producing the description's markup.\n * @example\n * <Description id=\"password-hint\">\n * {t(\"field.password.hint\")}\n * </Description>\n */\nexport function Description(handle: Handle<Description.Props>) {\n\treturn () => {\n\t\tlet { mix, ...rest } = handle.props;\n\n\t\treturn <p {...rest} mix={mergeMix([fg(\"neutral.muted\"), text(\"sm\"), pretty()], mix)} />;\n\t};\n}\n"
11
11
  },
12
12
  "test": null
13
13
  }
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "dialog-dismiss",
3
+ "changedIn": "2026.11.1",
4
+ "dependencies": [],
5
+ "exports": [
6
+ "DialogDismiss"
7
+ ],
8
+ "source": {
9
+ "path": "dialog-dismiss.tsx",
10
+ "content": "/**\n * Client island that closes the modal `<dialog>` it renders inside on a backdrop press or a\n * followed link, for a navigation sheet or drawer whose links include same-page anchors.\n * It owns no visible markup, so it drops into any dialog's content.\n *\n * @author [Sergio Xalambrí](https://sergiodxa.com)\n * @copyright Sergio Xalambrí 2026\n */\n\nimport type { EntryComponent } from \"remix/component\";\n\nimport { hidden } from \"@sdxc/u/layout\";\nimport { clientEntry } from \"remix/component\";\n\nimport { dialogDismiss } from \"@sdxc/ui/mixins\";\n\n/**\n * Renders a hidden marker carrying {@link dialogDismiss}. The island loads from the bare\n * `@sdxc/ui/dialog-dismiss` specifier, which the app's browser entry maps to a dynamic\n * import. A page restored from the back-forward cache returns with the dialog closed.\n *\n * @example\n * <SiteHeader brand={<Logo />} items={items} sheet={<DialogDismiss />} />\n */\nexport const DialogDismiss: EntryComponent<Record<never, never>> = clientEntry(\n\t\"@sdxc/ui/dialog-dismiss#DialogDismiss\",\n\tfunction DialogDismiss() {\n\t\treturn () => <span mix={[hidden(), dialogDismiss()]} />;\n\t},\n);\n"
11
+ },
12
+ "test": null
13
+ }