@proyecto-viviana/solidaria-components 0.4.1 → 0.5.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 (82) hide show
  1. package/dist/Breadcrumbs.d.ts.map +1 -1
  2. package/dist/Breadcrumbs.js +3 -2
  3. package/dist/Breadcrumbs.js.map +1 -1
  4. package/dist/Breadcrumbs.jsx +3 -3
  5. package/dist/Breadcrumbs.jsx.map +1 -1
  6. package/dist/DateField.d.ts.map +1 -1
  7. package/dist/DateField2.js.map +1 -1
  8. package/dist/DateField2.jsx.map +1 -1
  9. package/dist/DatePicker2.js.map +1 -1
  10. package/dist/DatePicker2.jsx.map +1 -1
  11. package/dist/ElementTag.d.ts +29 -0
  12. package/dist/ElementTag.d.ts.map +1 -0
  13. package/dist/ElementTag.js +220 -0
  14. package/dist/ElementTag.js.map +1 -0
  15. package/dist/ElementTag.jsx +67 -0
  16. package/dist/ElementTag.jsx.map +1 -0
  17. package/dist/Form.d.ts.map +1 -1
  18. package/dist/Form.js +2 -6
  19. package/dist/Form.js.map +1 -1
  20. package/dist/Form.jsx +2 -4
  21. package/dist/Form.jsx.map +1 -1
  22. package/dist/Landmark.js +4 -3
  23. package/dist/Landmark.js.map +1 -1
  24. package/dist/Landmark.jsx +3 -3
  25. package/dist/Landmark.jsx.map +1 -1
  26. package/dist/Link.js +3 -2
  27. package/dist/Link.js.map +1 -1
  28. package/dist/Link.jsx +3 -3
  29. package/dist/Link.jsx.map +1 -1
  30. package/dist/ListBox.d.ts.map +1 -1
  31. package/dist/ListBox.js.map +1 -1
  32. package/dist/ListBox.jsx +51 -51
  33. package/dist/ListBox.jsx.map +1 -1
  34. package/dist/SearchField.d.ts.map +1 -1
  35. package/dist/SearchField.js.map +1 -1
  36. package/dist/SearchField.jsx.map +1 -1
  37. package/dist/Select.d.ts.map +1 -1
  38. package/dist/Select.js +2 -2
  39. package/dist/Select.js.map +1 -1
  40. package/dist/Select.jsx +2 -2
  41. package/dist/Select.jsx.map +1 -1
  42. package/dist/Separator.js +3 -2
  43. package/dist/Separator.js.map +1 -1
  44. package/dist/Separator.jsx +2 -2
  45. package/dist/Separator.jsx.map +1 -1
  46. package/dist/SharedElementTransition.d.ts.map +1 -1
  47. package/dist/SharedElementTransition.js.map +1 -1
  48. package/dist/SharedElementTransition.jsx.map +1 -1
  49. package/dist/Text.d.ts.map +1 -1
  50. package/dist/Text.js +9 -8
  51. package/dist/Text.js.map +1 -1
  52. package/dist/Text.jsx +3 -3
  53. package/dist/Text.jsx.map +1 -1
  54. package/dist/TimeField.d.ts.map +1 -1
  55. package/dist/TimeField.js.map +1 -1
  56. package/dist/TimeField.jsx.map +1 -1
  57. package/dist/VisuallyHidden.d.ts.map +1 -1
  58. package/dist/VisuallyHidden.js +3 -11
  59. package/dist/VisuallyHidden.js.map +1 -1
  60. package/dist/VisuallyHidden.jsx +3 -4
  61. package/dist/VisuallyHidden.jsx.map +1 -1
  62. package/dist/index.d.ts +1 -0
  63. package/dist/index.d.ts.map +1 -1
  64. package/dist/index.js +2 -1
  65. package/dist/index.jsx +2 -1
  66. package/package.json +5 -3
  67. package/src/Breadcrumbs.tsx +5 -7
  68. package/src/DateField.tsx +5 -7
  69. package/src/DatePicker.tsx +25 -25
  70. package/src/ElementTag.tsx +116 -0
  71. package/src/Form.tsx +18 -1
  72. package/src/Landmark.tsx +4 -4
  73. package/src/Link.tsx +4 -4
  74. package/src/ListBox.tsx +123 -124
  75. package/src/SearchField.tsx +1 -3
  76. package/src/Select.tsx +13 -2
  77. package/src/Separator.tsx +3 -3
  78. package/src/SharedElementTransition.tsx +64 -67
  79. package/src/Text.tsx +5 -4
  80. package/src/TimeField.tsx +3 -10
  81. package/src/VisuallyHidden.tsx +8 -12
  82. package/src/index.ts +2 -0
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../src/Breadcrumbs.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAA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,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IAC1C,kBAAkB,CAAC,EAAE,MAAM,MAAM,CAAC;IAClC,eAAe,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAED,eAAO,MAAM,kBAAkB,4DAAsD,CAAC;AAEtF,UAAU,0BAA0B;IAClC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,qBAAqB,+DAAyD,CAAC;AAO5F;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CA8GtE;yBA9Ge,WAAW;;;AAiI3B;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAyKtE"}
@@ -1,5 +1,6 @@
1
1
  import { filterDOMProps, useRenderProps } from "./utils.js";
2
- import { Dynamic, createComponent, getNextElement, insert, memo, mergeProps, runHydrationEvents, spread, template, use } from "solid-js/web";
2
+ import { ElementTag } from "./ElementTag.js";
3
+ import { createComponent, getNextElement, insert, memo, mergeProps, runHydrationEvents, spread, template, use } from "solid-js/web";
3
4
  import { For, Show, children, createContext, createMemo, createSignal, splitProps, useContext } from "solid-js";
4
5
  import { createBreadcrumbItem, createBreadcrumbs, createFocusRing, createHover, mergeProps as mergeProps$2 } from "@proyecto-viviana/solidaria";
5
6
  //#region src/Breadcrumbs.tsx
@@ -287,7 +288,7 @@ function BreadcrumbItem(props) {
287
288
  ...userStyle
288
289
  } : baseStyle;
289
290
  };
290
- return createComponent(Dynamic, mergeProps({ get component() {
291
+ return createComponent(ElementTag, mergeProps({ get tag() {
291
292
  return elementType();
292
293
  } }, mergedItemProps, {
293
294
  ref: (element) => assignRef(local.ref, element),
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumbs.js","names":["Accessor","JSX","createContext","createMemo","createSignal","children","resolveChildren","splitProps","useContext","For","Show","Dynamic","createBreadcrumbs","createBreadcrumbItem","createFocusRing","createHover","mergeProps","AriaBreadcrumbsProps","AriaBreadcrumbItemProps","PressEvent","RenderChildren","ClassNameOrFunction","StyleOrFunction","SlotProps","useRenderProps","filterDOMProps","RefLike","el","T","current","assignRef","ref","BreadcrumbsRenderProps","isDisabled","BreadcrumbsProps","Omit","items","getKey","item","onAction","key","Element","class","style","HTMLElement","BreadcrumbItemRenderProps","isCurrent","isPressed","isFocused","isFocusVisible","isHovered","BreadcrumbItemProps","BreadcrumbsContextValue","registerStaticItem","staticItemCount","resetStaticItems","setStaticItemCount","count","BreadcrumbsContext","BreadcrumbItemContextValue","itemKey","isLast","BreadcrumbItemContext","defaultItemKey","index","maybeItem","id","Breadcrumbs","props","local","ariaProps","rest","hasCollectionItems","undefined","getItemKey","nextStaticIndex","navProps","aria-label","aria-labelledby","aria-describedby","renderValues","renderProps","defaultClassName","domProps","Record","global","_$createComponent","Provider","value","_el$","_$getNextElement","_tmpl$","_$use","element","_$spread","_$mergeProps","data-disabled","_$insert","when","fallback","StaticBreadcrumbItems","each","length","renderItem","_el$2","_tmpl$2","_$runHydrationEvents","context","staticChildren","childArray","array","toArray","child","_el$3","BreadcrumbItem","itemContext","staticIndex","elementType","href","linkElementType","handlePress","e","onPress","itemAria","target","rel","onPressStart","onPressEnd","onClick","onFocus","onBlur","onFocusChange","onKeyDown","onKeyUp","autoFocus","aria-details","aria-current","focusProps","hoverProps","mergedItemProps","itemProps","mergedStyle","userStyle","baseStyle","display","component","_$memo","aria-disabled","data-current","data-pressed","data-focused","data-focus-visible","data-hovered","renderChildren","Item"],"sources":["../src/Breadcrumbs.tsx"],"sourcesContent":["/**\n * Breadcrumbs component for solidaria-components\n *\n * A pre-wired headless breadcrumbs component that combines aria hooks.\n * Port of react-aria-components Breadcrumbs.\n */\n\nimport {\n type Accessor,\n type JSX,\n createContext,\n createMemo,\n createSignal,\n children as resolveChildren,\n splitProps,\n useContext,\n For,\n Show,\n} from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport {\n createBreadcrumbs,\n createBreadcrumbItem,\n createFocusRing,\n createHover,\n mergeProps,\n type AriaBreadcrumbsProps,\n type AriaBreadcrumbItemProps,\n type PressEvent,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from \"./utils\";\n\ntype RefLike<T> = ((el: T) => void) | { current?: T | null } | undefined;\n\nfunction assignRef<T>(ref: RefLike<T>, el: T): void {\n if (!ref) {\n return;\n }\n\n if (typeof ref === \"function\") {\n ref(el);\n } else {\n ref.current = el;\n }\n}\n\nexport interface BreadcrumbsRenderProps {\n /** Whether the breadcrumbs are disabled. */\n isDisabled: boolean;\n}\n\nexport interface BreadcrumbsProps<T> extends Omit<AriaBreadcrumbsProps, \"isDisabled\">, SlotProps {\n /** The items to render in the breadcrumbs. */\n items?: T[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => string | number;\n /** Whether the breadcrumbs are disabled. */\n isDisabled?: boolean;\n /** Handler called when a breadcrumb item is activated. */\n onAction?: (key: string | number) => void;\n /** The children of the component, or a render function for collection items. */\n children?: JSX.Element | ((item: T) => JSX.Element);\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<BreadcrumbsRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<BreadcrumbsRenderProps>;\n /** Ref for the navigation element. */\n ref?: RefLike<HTMLElement>;\n}\n\nexport interface BreadcrumbItemRenderProps {\n /** Whether this is the current/last item. */\n isCurrent: boolean;\n /** Whether the item is disabled. */\n isDisabled: boolean;\n /** Whether the item is pressed. */\n isPressed: boolean;\n /** Whether the item is focused. */\n isFocused: boolean;\n /** Whether the item has visible focus ring. */\n isFocusVisible: boolean;\n /** Whether the item is hovered. */\n isHovered: boolean;\n}\n\nexport interface BreadcrumbItemProps\n extends Omit<AriaBreadcrumbItemProps, \"isDisabled\">, SlotProps {\n /** The children of the breadcrumb item. */\n children?: RenderChildren<BreadcrumbItemRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<BreadcrumbItemRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<BreadcrumbItemRenderProps>;\n /** Whether this item is disabled. */\n isDisabled?: boolean;\n /** Ref for the breadcrumb item element. */\n ref?: RefLike<HTMLElement>;\n}\n\ninterface BreadcrumbsContextValue {\n isDisabled: Accessor<boolean>;\n onAction?: (key: string | number) => void;\n registerStaticItem?: () => number;\n staticItemCount?: Accessor<number>;\n resetStaticItems?: () => void;\n setStaticItemCount?: (count: number) => void;\n}\n\nexport const BreadcrumbsContext = createContext<BreadcrumbsContextValue | null>(null);\n\ninterface BreadcrumbItemContextValue {\n itemKey: string | number | null;\n isLast: Accessor<boolean>;\n}\n\nexport const BreadcrumbItemContext = createContext<BreadcrumbItemContextValue | null>(null);\n\nfunction defaultItemKey(item: unknown, index: number): string | number {\n const maybeItem = item as { key?: string | number; id?: string | number };\n return maybeItem.key ?? maybeItem.id ?? index;\n}\n\n/**\n * Breadcrumbs show hierarchy and navigational context for a user's location within an application.\n */\nexport function Breadcrumbs<T>(props: BreadcrumbsProps<T>): JSX.Element {\n const [local, ariaProps, rest] = splitProps(\n props,\n [\"children\", \"class\", \"style\", \"slot\", \"items\", \"getKey\", \"isDisabled\", \"onAction\", \"ref\"],\n [\"aria-label\", \"aria-labelledby\", \"aria-describedby\", \"aria-details\"],\n );\n\n const isDisabled = () => local.isDisabled ?? false;\n const items = () => local.items ?? [];\n const hasCollectionItems = () => local.items !== undefined;\n const getItemKey = (item: T, index: number): string | number =>\n local.getKey?.(item) ?? defaultItemKey(item, index);\n const [staticItemCount, setStaticItemCount] = createSignal(0);\n let nextStaticIndex = 0;\n const resetStaticItems = () => {\n nextStaticIndex = 0;\n setStaticItemCount(0);\n };\n const registerStaticItem = () => {\n const index = nextStaticIndex;\n nextStaticIndex += 1;\n return index;\n };\n\n const { navProps } = createBreadcrumbs({\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"];\n },\n get \"aria-labelledby\"() {\n return ariaProps[\"aria-labelledby\"];\n },\n get \"aria-describedby\"() {\n return ariaProps[\"aria-describedby\"];\n },\n get isDisabled() {\n return isDisabled();\n },\n });\n\n const renderValues = createMemo<BreadcrumbsRenderProps>(() => ({\n isDisabled: isDisabled(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Breadcrumbs\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() =>\n filterDOMProps(rest as Record<string, unknown>, { global: true }),\n );\n return (\n <BreadcrumbsContext.Provider\n value={{\n isDisabled,\n onAction: local.onAction,\n registerStaticItem,\n staticItemCount,\n resetStaticItems,\n setStaticItemCount,\n }}\n >\n {/*\n Faithful to react-aria-components Breadcrumbs: the accessible name (navProps'\n aria-label) sits directly on the <ol> (role=\"list\"), with NO wrapping <nav>\n landmark (react-spectrum/packages/react-aria-components/src/Breadcrumbs.tsx\n renders `<dom.ol {...mergeProps(DOMProps, navProps)} style={props.style}>`).\n The <ol> carries ONLY the consumer's class/style — no hard-coded inline\n layout reset. An inline reset would beat the styled layer's class (inline\n wins over class), which is exactly what broke S2 parity: the solid-spectrum\n `wrapperStyles` class supplies display:flex / list-style:none / padding:0 /\n marginStart and deliberately leaves align-items at its `normal` default, so\n a hard-coded inline `align-items:center` + `margin:0` clobbered the\n wrapper's margin and diverged from S2 (whose <ol> has neither).\n */}\n <ol\n {...navProps}\n {...domProps()}\n ref={(element) => assignRef(local.ref, element)}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={isDisabled() || undefined}\n >\n <Show\n when={hasCollectionItems()}\n fallback={\n <StaticBreadcrumbItems>{local.children as JSX.Element}</StaticBreadcrumbItems>\n }\n >\n <For each={items()}>\n {(item, index) => {\n const itemKey = getItemKey(item, index());\n const isLast = () => index() === items().length - 1;\n const renderItem = local.children as ((item: T) => JSX.Element) | undefined;\n\n return (\n <li style={{ display: \"flex\", \"align-items\": \"center\" }}>\n <BreadcrumbItemContext.Provider value={{ itemKey, isLast }}>\n {renderItem?.(item)}\n </BreadcrumbItemContext.Provider>\n </li>\n );\n }}\n </For>\n </Show>\n </ol>\n </BreadcrumbsContext.Provider>\n );\n}\n\nfunction StaticBreadcrumbItems(props: { children?: JSX.Element }): JSX.Element {\n const context = useContext(BreadcrumbsContext);\n const staticChildren = resolveChildren(() => props.children);\n const childArray = createMemo(() => {\n context?.resetStaticItems?.();\n const array = staticChildren.toArray();\n context?.setStaticItemCount?.(array.length);\n return array;\n });\n\n return (\n <For each={childArray()}>\n {(child) => <li style={{ display: \"flex\", \"align-items\": \"center\" }}>{child}</li>}\n </For>\n );\n}\n\n/**\n * A BreadcrumbItem represents an individual breadcrumb in the navigation trail.\n */\nexport function BreadcrumbItem(props: BreadcrumbItemProps): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\"class\", \"style\", \"slot\", \"isDisabled\", \"ref\"]);\n\n const context = useContext(BreadcrumbsContext);\n const itemContext = useContext(BreadcrumbItemContext);\n const staticIndex = itemContext ? null : context?.registerStaticItem?.();\n const isDisabled = () => local.isDisabled ?? context?.isDisabled() ?? false;\n const isCurrent = () =>\n ariaProps.isCurrent ??\n itemContext?.isLast() ??\n (staticIndex !== null &&\n staticIndex !== undefined &&\n context?.staticItemCount !== undefined &&\n staticIndex === context.staticItemCount() - 1);\n const itemKey = () => itemContext?.itemKey ?? ariaProps.id ?? null;\n\n // Mirror react-aria-components' Link: render an <a> only when there is an\n // href on an enabled, non-current item; otherwise fall back to a <span\n // role=\"link\"> (via createLink). A styled layer may force the element type\n // (S2 renders the current item as a plain <div>), which takes precedence.\n const elementType = () =>\n ariaProps.elementType ?? (ariaProps.href && !isDisabled() && !isCurrent() ? \"a\" : \"span\");\n // The current breadcrumb is the current page and is non-interactive: S2\n // renders it as a plain element with no link role. createLink only omits\n // role=\"link\" for an <a>, so treat the current item as an \"a\" purely for the\n // role decision while still rendering the resolved element type above.\n const linkElementType = () => (isCurrent() ? \"a\" : elementType());\n\n const handlePress = (e: PressEvent) => {\n ariaProps.onPress?.(e);\n const key = itemKey();\n if (key !== null && !isCurrent() && !isDisabled()) {\n context?.onAction?.(key);\n }\n };\n\n const itemAria = createBreadcrumbItem({\n get id() {\n return ariaProps.id;\n },\n get isCurrent() {\n return isCurrent();\n },\n get isDisabled() {\n return isDisabled();\n },\n get href() {\n return ariaProps.href;\n },\n get target() {\n return ariaProps.target;\n },\n get rel() {\n return ariaProps.rel;\n },\n get elementType() {\n return linkElementType();\n },\n get onPress() {\n return handlePress;\n },\n get onPressStart() {\n return ariaProps.onPressStart;\n },\n get onPressEnd() {\n return ariaProps.onPressEnd;\n },\n get onClick() {\n return ariaProps.onClick;\n },\n get onFocus() {\n return ariaProps.onFocus;\n },\n get onBlur() {\n return ariaProps.onBlur;\n },\n get onFocusChange() {\n return ariaProps.onFocusChange;\n },\n get onKeyDown() {\n return ariaProps.onKeyDown;\n },\n get onKeyUp() {\n return ariaProps.onKeyUp;\n },\n get autoFocus() {\n return ariaProps.autoFocus;\n },\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"];\n },\n get \"aria-labelledby\"() {\n return ariaProps[\"aria-labelledby\"];\n },\n get \"aria-describedby\"() {\n return ariaProps[\"aria-describedby\"];\n },\n get \"aria-details\"() {\n return ariaProps[\"aria-details\"];\n },\n get \"aria-current\"() {\n return ariaProps[\"aria-current\"];\n },\n });\n\n const isPressed = itemAria.isPressed;\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return isDisabled();\n },\n });\n // Read itemAria.itemProps fresh inside the memo (do NOT destructure it above):\n // the reactive getter re-runs createBreadcrumbItem → createLink each time this\n // memo re-evaluates, so role/tabIndex track elementType once isCurrent settles.\n const mergedItemProps = createMemo(() =>\n mergeProps(\n itemAria.itemProps as Record<string, unknown>,\n focusProps as Record<string, unknown>,\n hoverProps as Record<string, unknown>,\n ),\n );\n\n const renderValues = createMemo<BreadcrumbItemRenderProps>(() => ({\n isCurrent: isCurrent(),\n isDisabled: isDisabled(),\n isPressed: isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-BreadcrumbItem\",\n },\n renderValues,\n );\n\n const mergedStyle = () => {\n const userStyle = renderProps.style();\n const baseStyle = { display: \"inline-flex\", \"align-items\": \"center\" };\n return userStyle ? { ...baseStyle, ...userStyle } : baseStyle;\n };\n\n return (\n <Dynamic\n component={elementType()}\n {...mergedItemProps()}\n ref={(element: HTMLElement) => assignRef(local.ref, element)}\n aria-current={isCurrent() ? (ariaProps[\"aria-current\"] ?? \"page\") : undefined}\n aria-disabled={isDisabled() || isCurrent() || undefined}\n class={renderProps.class()}\n style={mergedStyle()}\n data-current={isCurrent() || undefined}\n data-disabled={isDisabled() || undefined}\n data-pressed={isPressed() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n >\n {renderProps.renderChildren()}\n </Dynamic>\n );\n}\n\nBreadcrumbs.Item = BreadcrumbItem;\n"],"mappings":";;;;;;;;;;;;AAyCA,SAAS8B,UAAaC,KAAiBJ,IAAa;CAClD,IAAI,CAACI,KACH;CAGF,IAAI,OAAOA,QAAQ,YACjBA,IAAIJ,EAAE;MAENI,IAAIF,UAAUF;AAElB;AAgEA,MAAa+B,qBAAqBxD,cAA8C,IAAI;AAOpF,MAAa4D,wBAA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Y;EAAC;EAAA,KAAA,kBAAA;GAAA,OACN/F,UAAU,KAAK2B,KAAAA;EAAS;EAAA,KAAA,mBAAA;GAAA,OACvBxC,WAAW,KAAKwC,KAAAA;EAAS;EAAA,KAAA,kBAAA;GAAA,OAC1B1B,UAAU,KAAK0B,KAAAA;EAAS;EAAA,KAAA,kBAAA;GAAA,OACxBzB,UAAU,KAAKyB,KAAAA;EAAS;EAAA,KAAA,wBAAA;GAAA,OAClBxB,eAAe,KAAKwB,KAAAA;EAAS;EAAA,KAAA,kBAAA;GAAA,OACnCvB,UAAU,KAAKuB,KAAAA;EAAS;EAAA,IAAApE,WAAA;GAAA,OAErC4E,YAAYwE,eAAe;EAAC;CAAA,CAAA,CAAA;AAGnC;AAEAtF,YAAYuF,OAAOxC"}
1
+ {"version":3,"file":"Breadcrumbs.js","names":["Accessor","JSX","createContext","createMemo","createSignal","children","resolveChildren","splitProps","useContext","For","Show","ElementTag","createBreadcrumbs","createBreadcrumbItem","createFocusRing","createHover","mergeProps","AriaBreadcrumbsProps","AriaBreadcrumbItemProps","PressEvent","RenderChildren","ClassNameOrFunction","StyleOrFunction","SlotProps","useRenderProps","filterDOMProps","RefLike","el","T","current","assignRef","ref","BreadcrumbsRenderProps","isDisabled","BreadcrumbsProps","Omit","items","getKey","item","onAction","key","Element","class","style","HTMLElement","BreadcrumbItemRenderProps","isCurrent","isPressed","isFocused","isFocusVisible","isHovered","BreadcrumbItemProps","BreadcrumbsContextValue","registerStaticItem","staticItemCount","resetStaticItems","setStaticItemCount","count","BreadcrumbsContext","BreadcrumbItemContextValue","itemKey","isLast","BreadcrumbItemContext","defaultItemKey","index","maybeItem","id","Breadcrumbs","props","local","ariaProps","rest","hasCollectionItems","undefined","getItemKey","nextStaticIndex","navProps","aria-label","aria-labelledby","aria-describedby","renderValues","renderProps","defaultClassName","domProps","Record","global","_$createComponent","Provider","value","_el$","_$getNextElement","_tmpl$","_$use","element","_$spread","_$mergeProps","data-disabled","_$insert","when","fallback","StaticBreadcrumbItems","each","length","renderItem","_el$2","_tmpl$2","_$runHydrationEvents","context","staticChildren","childArray","array","toArray","child","_el$3","BreadcrumbItem","itemContext","staticIndex","elementType","href","linkElementType","handlePress","e","onPress","itemAria","target","rel","onPressStart","onPressEnd","onClick","onFocus","onBlur","onFocusChange","onKeyDown","onKeyUp","autoFocus","aria-details","aria-current","focusProps","hoverProps","mergedItemProps","itemProps","mergedStyle","userStyle","baseStyle","display","tag","_$memo","aria-disabled","data-current","data-pressed","data-focused","data-focus-visible","data-hovered","renderChildren","Item"],"sources":["../src/Breadcrumbs.tsx"],"sourcesContent":["/**\n * Breadcrumbs component for solidaria-components\n *\n * A pre-wired headless breadcrumbs component that combines aria hooks.\n * Port of react-aria-components Breadcrumbs.\n */\n\nimport {\n type Accessor,\n type JSX,\n createContext,\n createMemo,\n createSignal,\n children as resolveChildren,\n splitProps,\n useContext,\n For,\n Show,\n} from \"solid-js\";\nimport { ElementTag } from \"./ElementTag\";\nimport {\n createBreadcrumbs,\n createBreadcrumbItem,\n createFocusRing,\n createHover,\n mergeProps,\n type AriaBreadcrumbsProps,\n type AriaBreadcrumbItemProps,\n type PressEvent,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from \"./utils\";\n\ntype RefLike<T> = ((el: T) => void) | { current?: T | null } | undefined;\n\nfunction assignRef<T>(ref: RefLike<T>, el: T): void {\n if (!ref) {\n return;\n }\n\n if (typeof ref === \"function\") {\n ref(el);\n } else {\n ref.current = el;\n }\n}\n\nexport interface BreadcrumbsRenderProps {\n /** Whether the breadcrumbs are disabled. */\n isDisabled: boolean;\n}\n\nexport interface BreadcrumbsProps<T> extends Omit<AriaBreadcrumbsProps, \"isDisabled\">, SlotProps {\n /** The items to render in the breadcrumbs. */\n items?: T[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => string | number;\n /** Whether the breadcrumbs are disabled. */\n isDisabled?: boolean;\n /** Handler called when a breadcrumb item is activated. */\n onAction?: (key: string | number) => void;\n /** The children of the component, or a render function for collection items. */\n children?: JSX.Element | ((item: T) => JSX.Element);\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<BreadcrumbsRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<BreadcrumbsRenderProps>;\n /** Ref for the navigation element. */\n ref?: RefLike<HTMLElement>;\n}\n\nexport interface BreadcrumbItemRenderProps {\n /** Whether this is the current/last item. */\n isCurrent: boolean;\n /** Whether the item is disabled. */\n isDisabled: boolean;\n /** Whether the item is pressed. */\n isPressed: boolean;\n /** Whether the item is focused. */\n isFocused: boolean;\n /** Whether the item has visible focus ring. */\n isFocusVisible: boolean;\n /** Whether the item is hovered. */\n isHovered: boolean;\n}\n\nexport interface BreadcrumbItemProps\n extends Omit<AriaBreadcrumbItemProps, \"isDisabled\">, SlotProps {\n /** The children of the breadcrumb item. */\n children?: RenderChildren<BreadcrumbItemRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<BreadcrumbItemRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<BreadcrumbItemRenderProps>;\n /** Whether this item is disabled. */\n isDisabled?: boolean;\n /** Ref for the breadcrumb item element. */\n ref?: RefLike<HTMLElement>;\n}\n\ninterface BreadcrumbsContextValue {\n isDisabled: Accessor<boolean>;\n onAction?: (key: string | number) => void;\n registerStaticItem?: () => number;\n staticItemCount?: Accessor<number>;\n resetStaticItems?: () => void;\n setStaticItemCount?: (count: number) => void;\n}\n\nexport const BreadcrumbsContext = createContext<BreadcrumbsContextValue | null>(null);\n\ninterface BreadcrumbItemContextValue {\n itemKey: string | number | null;\n isLast: Accessor<boolean>;\n}\n\nexport const BreadcrumbItemContext = createContext<BreadcrumbItemContextValue | null>(null);\n\nfunction defaultItemKey(item: unknown, index: number): string | number {\n const maybeItem = item as { key?: string | number; id?: string | number };\n return maybeItem.key ?? maybeItem.id ?? index;\n}\n\n/**\n * Breadcrumbs show hierarchy and navigational context for a user's location within an application.\n */\nexport function Breadcrumbs<T>(props: BreadcrumbsProps<T>): JSX.Element {\n const [local, ariaProps, rest] = splitProps(\n props,\n [\"children\", \"class\", \"style\", \"slot\", \"items\", \"getKey\", \"isDisabled\", \"onAction\", \"ref\"],\n [\"aria-label\", \"aria-labelledby\", \"aria-describedby\", \"aria-details\"],\n );\n\n const isDisabled = () => local.isDisabled ?? false;\n const items = () => local.items ?? [];\n const hasCollectionItems = () => local.items !== undefined;\n const getItemKey = (item: T, index: number): string | number =>\n local.getKey?.(item) ?? defaultItemKey(item, index);\n const [staticItemCount, setStaticItemCount] = createSignal(0);\n let nextStaticIndex = 0;\n const resetStaticItems = () => {\n nextStaticIndex = 0;\n setStaticItemCount(0);\n };\n const registerStaticItem = () => {\n const index = nextStaticIndex;\n nextStaticIndex += 1;\n return index;\n };\n\n const { navProps } = createBreadcrumbs({\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"];\n },\n get \"aria-labelledby\"() {\n return ariaProps[\"aria-labelledby\"];\n },\n get \"aria-describedby\"() {\n return ariaProps[\"aria-describedby\"];\n },\n get isDisabled() {\n return isDisabled();\n },\n });\n\n const renderValues = createMemo<BreadcrumbsRenderProps>(() => ({\n isDisabled: isDisabled(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Breadcrumbs\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() =>\n filterDOMProps(rest as Record<string, unknown>, { global: true }),\n );\n return (\n <BreadcrumbsContext.Provider\n value={{\n isDisabled,\n onAction: local.onAction,\n registerStaticItem,\n staticItemCount,\n resetStaticItems,\n setStaticItemCount,\n }}\n >\n {/*\n Faithful to react-aria-components Breadcrumbs: the accessible name (navProps'\n aria-label) sits directly on the <ol> (role=\"list\"), with NO wrapping <nav>\n landmark (react-spectrum/packages/react-aria-components/src/Breadcrumbs.tsx\n renders `<dom.ol {...mergeProps(DOMProps, navProps)} style={props.style}>`).\n The <ol> carries ONLY the consumer's class/style — no hard-coded inline\n layout reset. An inline reset would beat the styled layer's class (inline\n wins over class), which is exactly what broke S2 parity: the solid-spectrum\n `wrapperStyles` class supplies display:flex / list-style:none / padding:0 /\n marginStart and deliberately leaves align-items at its `normal` default, so\n a hard-coded inline `align-items:center` + `margin:0` clobbered the\n wrapper's margin and diverged from S2 (whose <ol> has neither).\n */}\n <ol\n {...navProps}\n {...domProps()}\n ref={(element) => assignRef(local.ref, element)}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={isDisabled() || undefined}\n >\n <Show\n when={hasCollectionItems()}\n fallback={<StaticBreadcrumbItems>{local.children as JSX.Element}</StaticBreadcrumbItems>}\n >\n <For each={items()}>\n {(item, index) => {\n const itemKey = getItemKey(item, index());\n const isLast = () => index() === items().length - 1;\n const renderItem = local.children as ((item: T) => JSX.Element) | undefined;\n\n return (\n <li style={{ display: \"flex\", \"align-items\": \"center\" }}>\n <BreadcrumbItemContext.Provider value={{ itemKey, isLast }}>\n {renderItem?.(item)}\n </BreadcrumbItemContext.Provider>\n </li>\n );\n }}\n </For>\n </Show>\n </ol>\n </BreadcrumbsContext.Provider>\n );\n}\n\nfunction StaticBreadcrumbItems(props: { children?: JSX.Element }): JSX.Element {\n const context = useContext(BreadcrumbsContext);\n const staticChildren = resolveChildren(() => props.children);\n const childArray = createMemo(() => {\n context?.resetStaticItems?.();\n const array = staticChildren.toArray();\n context?.setStaticItemCount?.(array.length);\n return array;\n });\n\n return (\n <For each={childArray()}>\n {(child) => <li style={{ display: \"flex\", \"align-items\": \"center\" }}>{child}</li>}\n </For>\n );\n}\n\n/**\n * A BreadcrumbItem represents an individual breadcrumb in the navigation trail.\n */\nexport function BreadcrumbItem(props: BreadcrumbItemProps): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\"class\", \"style\", \"slot\", \"isDisabled\", \"ref\"]);\n\n const context = useContext(BreadcrumbsContext);\n const itemContext = useContext(BreadcrumbItemContext);\n const staticIndex = itemContext ? null : context?.registerStaticItem?.();\n const isDisabled = () => local.isDisabled ?? context?.isDisabled() ?? false;\n const isCurrent = () =>\n ariaProps.isCurrent ??\n itemContext?.isLast() ??\n (staticIndex !== null &&\n staticIndex !== undefined &&\n context?.staticItemCount !== undefined &&\n staticIndex === context.staticItemCount() - 1);\n const itemKey = () => itemContext?.itemKey ?? ariaProps.id ?? null;\n\n // Mirror react-aria-components' Link: render an <a> only when there is an\n // href on an enabled, non-current item; otherwise fall back to a <span\n // role=\"link\"> (via createLink). A styled layer may force the element type\n // (S2 renders the current item as a plain <div>), which takes precedence.\n const elementType = () =>\n ariaProps.elementType ?? (ariaProps.href && !isDisabled() && !isCurrent() ? \"a\" : \"span\");\n // The current breadcrumb is the current page and is non-interactive: S2\n // renders it as a plain element with no link role. createLink only omits\n // role=\"link\" for an <a>, so treat the current item as an \"a\" purely for the\n // role decision while still rendering the resolved element type above.\n const linkElementType = () => (isCurrent() ? \"a\" : elementType());\n\n const handlePress = (e: PressEvent) => {\n ariaProps.onPress?.(e);\n const key = itemKey();\n if (key !== null && !isCurrent() && !isDisabled()) {\n context?.onAction?.(key);\n }\n };\n\n const itemAria = createBreadcrumbItem({\n get id() {\n return ariaProps.id;\n },\n get isCurrent() {\n return isCurrent();\n },\n get isDisabled() {\n return isDisabled();\n },\n get href() {\n return ariaProps.href;\n },\n get target() {\n return ariaProps.target;\n },\n get rel() {\n return ariaProps.rel;\n },\n get elementType() {\n return linkElementType();\n },\n get onPress() {\n return handlePress;\n },\n get onPressStart() {\n return ariaProps.onPressStart;\n },\n get onPressEnd() {\n return ariaProps.onPressEnd;\n },\n get onClick() {\n return ariaProps.onClick;\n },\n get onFocus() {\n return ariaProps.onFocus;\n },\n get onBlur() {\n return ariaProps.onBlur;\n },\n get onFocusChange() {\n return ariaProps.onFocusChange;\n },\n get onKeyDown() {\n return ariaProps.onKeyDown;\n },\n get onKeyUp() {\n return ariaProps.onKeyUp;\n },\n get autoFocus() {\n return ariaProps.autoFocus;\n },\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"];\n },\n get \"aria-labelledby\"() {\n return ariaProps[\"aria-labelledby\"];\n },\n get \"aria-describedby\"() {\n return ariaProps[\"aria-describedby\"];\n },\n get \"aria-details\"() {\n return ariaProps[\"aria-details\"];\n },\n get \"aria-current\"() {\n return ariaProps[\"aria-current\"];\n },\n });\n\n const isPressed = itemAria.isPressed;\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return isDisabled();\n },\n });\n // Read itemAria.itemProps fresh inside the memo (do NOT destructure it above):\n // the reactive getter re-runs createBreadcrumbItem → createLink each time this\n // memo re-evaluates, so role/tabIndex track elementType once isCurrent settles.\n const mergedItemProps = createMemo(() =>\n mergeProps(\n itemAria.itemProps as Record<string, unknown>,\n focusProps as Record<string, unknown>,\n hoverProps as Record<string, unknown>,\n ),\n );\n\n const renderValues = createMemo<BreadcrumbItemRenderProps>(() => ({\n isCurrent: isCurrent(),\n isDisabled: isDisabled(),\n isPressed: isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-BreadcrumbItem\",\n },\n renderValues,\n );\n\n const mergedStyle = () => {\n const userStyle = renderProps.style();\n const baseStyle = { display: \"inline-flex\", \"align-items\": \"center\" };\n return userStyle ? { ...baseStyle, ...userStyle } : baseStyle;\n };\n\n return (\n <ElementTag\n tag={elementType()}\n {...mergedItemProps()}\n ref={(element: HTMLElement) => assignRef(local.ref, element)}\n aria-current={isCurrent() ? (ariaProps[\"aria-current\"] ?? \"page\") : undefined}\n aria-disabled={isDisabled() || isCurrent() || undefined}\n class={renderProps.class()}\n style={mergedStyle()}\n data-current={isCurrent() || undefined}\n data-disabled={isDisabled() || undefined}\n data-pressed={isPressed() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n >\n {renderProps.renderChildren()}\n </ElementTag>\n );\n}\n\nBreadcrumbs.Item = BreadcrumbItem;\n"],"mappings":";;;;;;;;;;;;;AAyCA,SAAS8B,UAAaC,KAAiBJ,IAAa;CAClD,IAAI,CAACI,KACH;CAGF,IAAI,OAAOA,QAAQ,YACjBA,IAAIJ,EAAE;MAENI,IAAIF,UAAUF;AAElB;AAgEA,MAAa+B,qBAAqBxD,cAA8C,IAAI;AAOpF,MAAa4D,wBAAwB5D,cAAiD,IAAI;AAE1F,SAAS6D,eAAezB,MAAe0B,OAAgC;CACrE,MAAMC,YAAY3B;CAClB,OAAO2B,UAAUzB,OAAOyB,UAAUC,MAAMF;AAC1C;;;;AAKA,SAAgBG,YAAeC,OAAyC;CACtE,MAAM,CAACC,OAAOC,WAAWC,QAAQhE,WAC/B6D,OACA;EAAC;EAAY;EAAS;EAAS;EAAQ;EAAS;EAAU;EAAc;EAAY;CAAK,GACzF;EAAC;EAAc;EAAmB;EAAoB;CAAc,CACtE;CAEA,MAAMnC,mBAAmBoC,MAAMpC,cAAc;CAC7C,MAAMG,cAAciC,MAAMjC,SAAS,CAAA;CACnC,MAAMoC,2BAA2BH,MAAMjC,UAAUqC,KAAAA;CACjD,MAAMC,cAAcpC,MAAS0B,UAC3BK,MAAMhC,SAASC,IAAI,KAAKyB,eAAezB,MAAM0B,KAAK;CACpD,MAAM,CAACV,iBAAiBE,sBAAsBpD,aAAa,CAAC;CAC5D,IAAIuE,kBAAkB;CACtB,MAAMpB,yBAAyB;EAC7BoB,kBAAkB;EAClBnB,mBAAmB,CAAC;CACtB;CACA,MAAMH,2BAA2B;EAC/B,MAAMW,QAAQW;EACdA,mBAAmB;EACnB,OAAOX;CACT;CAEA,MAAM,EAAEY,aAAahE,kBAAkB;EACrC,IAAI,eAAe;GACjB,OAAO0D,UAAU;EACnB;EACA,IAAI,oBAAoB;GACtB,OAAOA,UAAU;EACnB;EACA,IAAI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b8D,YAAyB/D,UAAUuC,MAAMtC,KAAK8D,OAAO;EAAC,KAAA,kBAAA;GAAA,OAC9CqD,WAAA,CAAA,CAAApG,UAAU,CAAC,CAAA,CAAA,IAAIwB,UAAU,mBAAmB,SAAUG,KAAAA;EAAS;EAAA,KAAA,mBAAA;GAAA,OAC9DxC,WAAW,KAAKa,UAAU,KAAK2B,KAAAA;EAAS;EAAA,KAAA,WAAA;GAAA,OAChDQ,YAAYvC,MAAM;EAAC;EAAA,IAC1BC,QAAK;GAAA,OAAEkG,YAAY;EAAC;EAAA,KAAA,kBAAA;GAAA,OACN/F,UAAU,KAAK2B,KAAAA;EAAS;EAAA,KAAA,mBAAA;GAAA,OACvBxC,WAAW,KAAKwC,KAAAA;EAAS;EAAA,KAAA,kBAAA;GAAA,OAC1B1B,UAAU,KAAK0B,KAAAA;EAAS;EAAA,KAAA,kBAAA;GAAA,OACxBzB,UAAU,KAAKyB,KAAAA;EAAS;EAAA,KAAA,wBAAA;GAAA,OAClBxB,eAAe,KAAKwB,KAAAA;EAAS;EAAA,KAAA,kBAAA;GAAA,OACnCvB,UAAU,KAAKuB,KAAAA;EAAS;EAAA,IAAApE,WAAA;GAAA,OAErC4E,YAAYwE,eAAe;EAAC;CAAA,CAAA,CAAA;AAGnC;AAEAtF,YAAYuF,OAAOxC"}
@@ -1,6 +1,6 @@
1
1
  import { filterDOMProps, useRenderProps } from "./utils.jsx";
2
+ import { ElementTag } from "./ElementTag.jsx";
2
3
  import { For, Show, children, createContext, createMemo, createSignal, splitProps, useContext } from "solid-js";
3
- import { Dynamic } from "solid-js/web";
4
4
  import { createBreadcrumbItem, createBreadcrumbs, createFocusRing, createHover, mergeProps as mergeProps$1 } from "@proyecto-viviana/solidaria";
5
5
  //#region src/Breadcrumbs.tsx
6
6
  /**
@@ -250,9 +250,9 @@ function BreadcrumbItem(props) {
250
250
  ...userStyle
251
251
  } : baseStyle;
252
252
  };
253
- return <Dynamic component={elementType()} {...mergedItemProps()} ref={(element) => assignRef(local.ref, element)} aria-current={isCurrent() ? ariaProps["aria-current"] ?? "page" : void 0} aria-disabled={isDisabled() || isCurrent() || void 0} class={renderProps.class()} style={mergedStyle()} data-current={isCurrent() || void 0} data-disabled={isDisabled() || void 0} data-pressed={isPressed() || void 0} data-focused={isFocused() || void 0} data-focus-visible={isFocusVisible() || void 0} data-hovered={isHovered() || void 0}>
253
+ return <ElementTag tag={elementType()} {...mergedItemProps()} ref={(element) => assignRef(local.ref, element)} aria-current={isCurrent() ? ariaProps["aria-current"] ?? "page" : void 0} aria-disabled={isDisabled() || isCurrent() || void 0} class={renderProps.class()} style={mergedStyle()} data-current={isCurrent() || void 0} data-disabled={isDisabled() || void 0} data-pressed={isPressed() || void 0} data-focused={isFocused() || void 0} data-focus-visible={isFocusVisible() || void 0} data-hovered={isHovered() || void 0}>
254
254
  {renderProps.renderChildren()}
255
- </Dynamic>;
255
+ </ElementTag>;
256
256
  }
257
257
  Breadcrumbs.Item = BreadcrumbItem;
258
258
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumbs.jsx","names":["resolveChildren","mergeProps"],"sources":["../src/Breadcrumbs.tsx"],"sourcesContent":["/**\n * Breadcrumbs component for solidaria-components\n *\n * A pre-wired headless breadcrumbs component that combines aria hooks.\n * Port of react-aria-components Breadcrumbs.\n */\n\nimport {\n type Accessor,\n type JSX,\n createContext,\n createMemo,\n createSignal,\n children as resolveChildren,\n splitProps,\n useContext,\n For,\n Show,\n} from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport {\n createBreadcrumbs,\n createBreadcrumbItem,\n createFocusRing,\n createHover,\n mergeProps,\n type AriaBreadcrumbsProps,\n type AriaBreadcrumbItemProps,\n type PressEvent,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from \"./utils\";\n\ntype RefLike<T> = ((el: T) => void) | { current?: T | null } | undefined;\n\nfunction assignRef<T>(ref: RefLike<T>, el: T): void {\n if (!ref) {\n return;\n }\n\n if (typeof ref === \"function\") {\n ref(el);\n } else {\n ref.current = el;\n }\n}\n\nexport interface BreadcrumbsRenderProps {\n /** Whether the breadcrumbs are disabled. */\n isDisabled: boolean;\n}\n\nexport interface BreadcrumbsProps<T> extends Omit<AriaBreadcrumbsProps, \"isDisabled\">, SlotProps {\n /** The items to render in the breadcrumbs. */\n items?: T[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => string | number;\n /** Whether the breadcrumbs are disabled. */\n isDisabled?: boolean;\n /** Handler called when a breadcrumb item is activated. */\n onAction?: (key: string | number) => void;\n /** The children of the component, or a render function for collection items. */\n children?: JSX.Element | ((item: T) => JSX.Element);\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<BreadcrumbsRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<BreadcrumbsRenderProps>;\n /** Ref for the navigation element. */\n ref?: RefLike<HTMLElement>;\n}\n\nexport interface BreadcrumbItemRenderProps {\n /** Whether this is the current/last item. */\n isCurrent: boolean;\n /** Whether the item is disabled. */\n isDisabled: boolean;\n /** Whether the item is pressed. */\n isPressed: boolean;\n /** Whether the item is focused. */\n isFocused: boolean;\n /** Whether the item has visible focus ring. */\n isFocusVisible: boolean;\n /** Whether the item is hovered. */\n isHovered: boolean;\n}\n\nexport interface BreadcrumbItemProps\n extends Omit<AriaBreadcrumbItemProps, \"isDisabled\">, SlotProps {\n /** The children of the breadcrumb item. */\n children?: RenderChildren<BreadcrumbItemRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<BreadcrumbItemRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<BreadcrumbItemRenderProps>;\n /** Whether this item is disabled. */\n isDisabled?: boolean;\n /** Ref for the breadcrumb item element. */\n ref?: RefLike<HTMLElement>;\n}\n\ninterface BreadcrumbsContextValue {\n isDisabled: Accessor<boolean>;\n onAction?: (key: string | number) => void;\n registerStaticItem?: () => number;\n staticItemCount?: Accessor<number>;\n resetStaticItems?: () => void;\n setStaticItemCount?: (count: number) => void;\n}\n\nexport const BreadcrumbsContext = createContext<BreadcrumbsContextValue | null>(null);\n\ninterface BreadcrumbItemContextValue {\n itemKey: string | number | null;\n isLast: Accessor<boolean>;\n}\n\nexport const BreadcrumbItemContext = createContext<BreadcrumbItemContextValue | null>(null);\n\nfunction defaultItemKey(item: unknown, index: number): string | number {\n const maybeItem = item as { key?: string | number; id?: string | number };\n return maybeItem.key ?? maybeItem.id ?? index;\n}\n\n/**\n * Breadcrumbs show hierarchy and navigational context for a user's location within an application.\n */\nexport function Breadcrumbs<T>(props: BreadcrumbsProps<T>): JSX.Element {\n const [local, ariaProps, rest] = splitProps(\n props,\n [\"children\", \"class\", \"style\", \"slot\", \"items\", \"getKey\", \"isDisabled\", \"onAction\", \"ref\"],\n [\"aria-label\", \"aria-labelledby\", \"aria-describedby\", \"aria-details\"],\n );\n\n const isDisabled = () => local.isDisabled ?? false;\n const items = () => local.items ?? [];\n const hasCollectionItems = () => local.items !== undefined;\n const getItemKey = (item: T, index: number): string | number =>\n local.getKey?.(item) ?? defaultItemKey(item, index);\n const [staticItemCount, setStaticItemCount] = createSignal(0);\n let nextStaticIndex = 0;\n const resetStaticItems = () => {\n nextStaticIndex = 0;\n setStaticItemCount(0);\n };\n const registerStaticItem = () => {\n const index = nextStaticIndex;\n nextStaticIndex += 1;\n return index;\n };\n\n const { navProps } = createBreadcrumbs({\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"];\n },\n get \"aria-labelledby\"() {\n return ariaProps[\"aria-labelledby\"];\n },\n get \"aria-describedby\"() {\n return ariaProps[\"aria-describedby\"];\n },\n get isDisabled() {\n return isDisabled();\n },\n });\n\n const renderValues = createMemo<BreadcrumbsRenderProps>(() => ({\n isDisabled: isDisabled(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Breadcrumbs\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() =>\n filterDOMProps(rest as Record<string, unknown>, { global: true }),\n );\n return (\n <BreadcrumbsContext.Provider\n value={{\n isDisabled,\n onAction: local.onAction,\n registerStaticItem,\n staticItemCount,\n resetStaticItems,\n setStaticItemCount,\n }}\n >\n {/*\n Faithful to react-aria-components Breadcrumbs: the accessible name (navProps'\n aria-label) sits directly on the <ol> (role=\"list\"), with NO wrapping <nav>\n landmark (react-spectrum/packages/react-aria-components/src/Breadcrumbs.tsx\n renders `<dom.ol {...mergeProps(DOMProps, navProps)} style={props.style}>`).\n The <ol> carries ONLY the consumer's class/style — no hard-coded inline\n layout reset. An inline reset would beat the styled layer's class (inline\n wins over class), which is exactly what broke S2 parity: the solid-spectrum\n `wrapperStyles` class supplies display:flex / list-style:none / padding:0 /\n marginStart and deliberately leaves align-items at its `normal` default, so\n a hard-coded inline `align-items:center` + `margin:0` clobbered the\n wrapper's margin and diverged from S2 (whose <ol> has neither).\n */}\n <ol\n {...navProps}\n {...domProps()}\n ref={(element) => assignRef(local.ref, element)}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={isDisabled() || undefined}\n >\n <Show\n when={hasCollectionItems()}\n fallback={\n <StaticBreadcrumbItems>{local.children as JSX.Element}</StaticBreadcrumbItems>\n }\n >\n <For each={items()}>\n {(item, index) => {\n const itemKey = getItemKey(item, index());\n const isLast = () => index() === items().length - 1;\n const renderItem = local.children as ((item: T) => JSX.Element) | undefined;\n\n return (\n <li style={{ display: \"flex\", \"align-items\": \"center\" }}>\n <BreadcrumbItemContext.Provider value={{ itemKey, isLast }}>\n {renderItem?.(item)}\n </BreadcrumbItemContext.Provider>\n </li>\n );\n }}\n </For>\n </Show>\n </ol>\n </BreadcrumbsContext.Provider>\n );\n}\n\nfunction StaticBreadcrumbItems(props: { children?: JSX.Element }): JSX.Element {\n const context = useContext(BreadcrumbsContext);\n const staticChildren = resolveChildren(() => props.children);\n const childArray = createMemo(() => {\n context?.resetStaticItems?.();\n const array = staticChildren.toArray();\n context?.setStaticItemCount?.(array.length);\n return array;\n });\n\n return (\n <For each={childArray()}>\n {(child) => <li style={{ display: \"flex\", \"align-items\": \"center\" }}>{child}</li>}\n </For>\n );\n}\n\n/**\n * A BreadcrumbItem represents an individual breadcrumb in the navigation trail.\n */\nexport function BreadcrumbItem(props: BreadcrumbItemProps): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\"class\", \"style\", \"slot\", \"isDisabled\", \"ref\"]);\n\n const context = useContext(BreadcrumbsContext);\n const itemContext = useContext(BreadcrumbItemContext);\n const staticIndex = itemContext ? null : context?.registerStaticItem?.();\n const isDisabled = () => local.isDisabled ?? context?.isDisabled() ?? false;\n const isCurrent = () =>\n ariaProps.isCurrent ??\n itemContext?.isLast() ??\n (staticIndex !== null &&\n staticIndex !== undefined &&\n context?.staticItemCount !== undefined &&\n staticIndex === context.staticItemCount() - 1);\n const itemKey = () => itemContext?.itemKey ?? ariaProps.id ?? null;\n\n // Mirror react-aria-components' Link: render an <a> only when there is an\n // href on an enabled, non-current item; otherwise fall back to a <span\n // role=\"link\"> (via createLink). A styled layer may force the element type\n // (S2 renders the current item as a plain <div>), which takes precedence.\n const elementType = () =>\n ariaProps.elementType ?? (ariaProps.href && !isDisabled() && !isCurrent() ? \"a\" : \"span\");\n // The current breadcrumb is the current page and is non-interactive: S2\n // renders it as a plain element with no link role. createLink only omits\n // role=\"link\" for an <a>, so treat the current item as an \"a\" purely for the\n // role decision while still rendering the resolved element type above.\n const linkElementType = () => (isCurrent() ? \"a\" : elementType());\n\n const handlePress = (e: PressEvent) => {\n ariaProps.onPress?.(e);\n const key = itemKey();\n if (key !== null && !isCurrent() && !isDisabled()) {\n context?.onAction?.(key);\n }\n };\n\n const itemAria = createBreadcrumbItem({\n get id() {\n return ariaProps.id;\n },\n get isCurrent() {\n return isCurrent();\n },\n get isDisabled() {\n return isDisabled();\n },\n get href() {\n return ariaProps.href;\n },\n get target() {\n return ariaProps.target;\n },\n get rel() {\n return ariaProps.rel;\n },\n get elementType() {\n return linkElementType();\n },\n get onPress() {\n return handlePress;\n },\n get onPressStart() {\n return ariaProps.onPressStart;\n },\n get onPressEnd() {\n return ariaProps.onPressEnd;\n },\n get onClick() {\n return ariaProps.onClick;\n },\n get onFocus() {\n return ariaProps.onFocus;\n },\n get onBlur() {\n return ariaProps.onBlur;\n },\n get onFocusChange() {\n return ariaProps.onFocusChange;\n },\n get onKeyDown() {\n return ariaProps.onKeyDown;\n },\n get onKeyUp() {\n return ariaProps.onKeyUp;\n },\n get autoFocus() {\n return ariaProps.autoFocus;\n },\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"];\n },\n get \"aria-labelledby\"() {\n return ariaProps[\"aria-labelledby\"];\n },\n get \"aria-describedby\"() {\n return ariaProps[\"aria-describedby\"];\n },\n get \"aria-details\"() {\n return ariaProps[\"aria-details\"];\n },\n get \"aria-current\"() {\n return ariaProps[\"aria-current\"];\n },\n });\n\n const isPressed = itemAria.isPressed;\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return isDisabled();\n },\n });\n // Read itemAria.itemProps fresh inside the memo (do NOT destructure it above):\n // the reactive getter re-runs createBreadcrumbItem → createLink each time this\n // memo re-evaluates, so role/tabIndex track elementType once isCurrent settles.\n const mergedItemProps = createMemo(() =>\n mergeProps(\n itemAria.itemProps as Record<string, unknown>,\n focusProps as Record<string, unknown>,\n hoverProps as Record<string, unknown>,\n ),\n );\n\n const renderValues = createMemo<BreadcrumbItemRenderProps>(() => ({\n isCurrent: isCurrent(),\n isDisabled: isDisabled(),\n isPressed: isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-BreadcrumbItem\",\n },\n renderValues,\n );\n\n const mergedStyle = () => {\n const userStyle = renderProps.style();\n const baseStyle = { display: \"inline-flex\", \"align-items\": \"center\" };\n return userStyle ? { ...baseStyle, ...userStyle } : baseStyle;\n };\n\n return (\n <Dynamic\n component={elementType()}\n {...mergedItemProps()}\n ref={(element: HTMLElement) => assignRef(local.ref, element)}\n aria-current={isCurrent() ? (ariaProps[\"aria-current\"] ?? \"page\") : undefined}\n aria-disabled={isDisabled() || isCurrent() || undefined}\n class={renderProps.class()}\n style={mergedStyle()}\n data-current={isCurrent() || undefined}\n data-disabled={isDisabled() || undefined}\n data-pressed={isPressed() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n >\n {renderProps.renderChildren()}\n </Dynamic>\n );\n}\n\nBreadcrumbs.Item = BreadcrumbItem;\n"],"mappings":";;;;;;;;;;;AAyCA,SAAS,UAAa,KAAiB,IAAa;CAClD,IAAI,CAAC,KACH;CAGF,IAAI,OAAO,QAAQ,YACjB,IAAI,EAAE;MAEN,IAAI,UAAU;AAElB;AAgEA,MAAa,qBAAqB,cAA8C,IAAI;AAOpF,MAAa,wBAAwB,cAAiD,IAAI;AAE1F,SAAS,eAAe,MAAe,OAAgC;CACrE,MAAM,YAAY;CAClB,OAAO,UAAU,OAAO,UAAU,MAAM;AAC1C;;;;AAKA,SAAgB,YAAe,OAAyC;CACtE,MAAM,CAAC,OAAO,WAAW,QAAQ,WAC/B,OACA;EAAC;EAAY;EAAS;EAAS;EAAQ;EAAS;EAAU;EAAc;EAAY;CAAK,GACzF;EAAC;EAAc;EAAmB;EAAoB;CAAc,CACtE;CAEA,MAAM,mBAAmB,MAAM,cAAc;CAC7C,MAAM,cAAc,MAAM,SAAS,CAAC;CACpC,MAAM,2BAA2B,MAAM,UAAU,KAAA;CACjD,MAAM,cAAc,MAAS,UAC3B,MAAM,SAAS,IAAI,KAAK,eAAe,MAAM,KAAK;CACpD,MAAM,CAAC,iBAAiB,sBAAsB,aAAa,CAAC;CAC5D,IAAI,kBAAkB;CACtB,MAAM,yBAAyB;E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AU;EACrB,WAAW,UAAU;EACrB,gBAAgB,eAAe;EAC/B,WAAW,UAAU;CACvB,EAAE;CAEF,MAAM,cAAc,eAClB;EACE,IAAI,WAAW;GACb,OAAO,MAAM;EACf;EACA,OAAO,MAAM;EACb,OAAO,MAAM;EACb,kBAAkB;CACpB,GACA,YACF;CAEA,MAAM,oBAAoB;EACxB,MAAM,YAAY,YAAY,MAAM;EACpC,MAAM,YAAY;GAAE,SAAS;GAAe,eAAe;EAAS;EACpE,OAAO,YAAY;GAAE,GAAG;GAAW,GAAG;EAAU,IAAI;CACtD;CAEA,OACE,CAAC,QACC,WAAW,YAAY,OACnB,gBAAgB,GACpB,MAAM,YAAyB,UAAU,MAAM,KAAK,OAAO,GAC3D,cAAc,UAAU,IAAK,UAAU,mBAAmB,SAAU,KAAA,GACpE,eAAe,WAAW,KAAK,UAAU,KAAK,KAAA,GAC9C,OAAO,YAAY,MAAM,GACzB,OAAO,YAAY,GACnB,cAAc,UAAU,KAAK,KAAA,GAC7B,eAAe,WAAW,KAAK,KAAA,GAC/B,cAAc,UAAU,KAAK,KAAA,GAC7B,cAAc,UAAU,KAAK,KAAA,GAC7B,oBAAoB,eAAe,KAAK,KAAA,GACxC,cAAc,UAAU,KAAK,KAAA,GAC9B;OACE,YAAY,eAAe,EAAE;IAChC,EAAE;AAEN;AAEA,YAAY,OAAO"}
1
+ {"version":3,"file":"Breadcrumbs.jsx","names":["resolveChildren","mergeProps"],"sources":["../src/Breadcrumbs.tsx"],"sourcesContent":["/**\n * Breadcrumbs component for solidaria-components\n *\n * A pre-wired headless breadcrumbs component that combines aria hooks.\n * Port of react-aria-components Breadcrumbs.\n */\n\nimport {\n type Accessor,\n type JSX,\n createContext,\n createMemo,\n createSignal,\n children as resolveChildren,\n splitProps,\n useContext,\n For,\n Show,\n} from \"solid-js\";\nimport { ElementTag } from \"./ElementTag\";\nimport {\n createBreadcrumbs,\n createBreadcrumbItem,\n createFocusRing,\n createHover,\n mergeProps,\n type AriaBreadcrumbsProps,\n type AriaBreadcrumbItemProps,\n type PressEvent,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from \"./utils\";\n\ntype RefLike<T> = ((el: T) => void) | { current?: T | null } | undefined;\n\nfunction assignRef<T>(ref: RefLike<T>, el: T): void {\n if (!ref) {\n return;\n }\n\n if (typeof ref === \"function\") {\n ref(el);\n } else {\n ref.current = el;\n }\n}\n\nexport interface BreadcrumbsRenderProps {\n /** Whether the breadcrumbs are disabled. */\n isDisabled: boolean;\n}\n\nexport interface BreadcrumbsProps<T> extends Omit<AriaBreadcrumbsProps, \"isDisabled\">, SlotProps {\n /** The items to render in the breadcrumbs. */\n items?: T[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => string | number;\n /** Whether the breadcrumbs are disabled. */\n isDisabled?: boolean;\n /** Handler called when a breadcrumb item is activated. */\n onAction?: (key: string | number) => void;\n /** The children of the component, or a render function for collection items. */\n children?: JSX.Element | ((item: T) => JSX.Element);\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<BreadcrumbsRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<BreadcrumbsRenderProps>;\n /** Ref for the navigation element. */\n ref?: RefLike<HTMLElement>;\n}\n\nexport interface BreadcrumbItemRenderProps {\n /** Whether this is the current/last item. */\n isCurrent: boolean;\n /** Whether the item is disabled. */\n isDisabled: boolean;\n /** Whether the item is pressed. */\n isPressed: boolean;\n /** Whether the item is focused. */\n isFocused: boolean;\n /** Whether the item has visible focus ring. */\n isFocusVisible: boolean;\n /** Whether the item is hovered. */\n isHovered: boolean;\n}\n\nexport interface BreadcrumbItemProps\n extends Omit<AriaBreadcrumbItemProps, \"isDisabled\">, SlotProps {\n /** The children of the breadcrumb item. */\n children?: RenderChildren<BreadcrumbItemRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<BreadcrumbItemRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<BreadcrumbItemRenderProps>;\n /** Whether this item is disabled. */\n isDisabled?: boolean;\n /** Ref for the breadcrumb item element. */\n ref?: RefLike<HTMLElement>;\n}\n\ninterface BreadcrumbsContextValue {\n isDisabled: Accessor<boolean>;\n onAction?: (key: string | number) => void;\n registerStaticItem?: () => number;\n staticItemCount?: Accessor<number>;\n resetStaticItems?: () => void;\n setStaticItemCount?: (count: number) => void;\n}\n\nexport const BreadcrumbsContext = createContext<BreadcrumbsContextValue | null>(null);\n\ninterface BreadcrumbItemContextValue {\n itemKey: string | number | null;\n isLast: Accessor<boolean>;\n}\n\nexport const BreadcrumbItemContext = createContext<BreadcrumbItemContextValue | null>(null);\n\nfunction defaultItemKey(item: unknown, index: number): string | number {\n const maybeItem = item as { key?: string | number; id?: string | number };\n return maybeItem.key ?? maybeItem.id ?? index;\n}\n\n/**\n * Breadcrumbs show hierarchy and navigational context for a user's location within an application.\n */\nexport function Breadcrumbs<T>(props: BreadcrumbsProps<T>): JSX.Element {\n const [local, ariaProps, rest] = splitProps(\n props,\n [\"children\", \"class\", \"style\", \"slot\", \"items\", \"getKey\", \"isDisabled\", \"onAction\", \"ref\"],\n [\"aria-label\", \"aria-labelledby\", \"aria-describedby\", \"aria-details\"],\n );\n\n const isDisabled = () => local.isDisabled ?? false;\n const items = () => local.items ?? [];\n const hasCollectionItems = () => local.items !== undefined;\n const getItemKey = (item: T, index: number): string | number =>\n local.getKey?.(item) ?? defaultItemKey(item, index);\n const [staticItemCount, setStaticItemCount] = createSignal(0);\n let nextStaticIndex = 0;\n const resetStaticItems = () => {\n nextStaticIndex = 0;\n setStaticItemCount(0);\n };\n const registerStaticItem = () => {\n const index = nextStaticIndex;\n nextStaticIndex += 1;\n return index;\n };\n\n const { navProps } = createBreadcrumbs({\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"];\n },\n get \"aria-labelledby\"() {\n return ariaProps[\"aria-labelledby\"];\n },\n get \"aria-describedby\"() {\n return ariaProps[\"aria-describedby\"];\n },\n get isDisabled() {\n return isDisabled();\n },\n });\n\n const renderValues = createMemo<BreadcrumbsRenderProps>(() => ({\n isDisabled: isDisabled(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Breadcrumbs\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() =>\n filterDOMProps(rest as Record<string, unknown>, { global: true }),\n );\n return (\n <BreadcrumbsContext.Provider\n value={{\n isDisabled,\n onAction: local.onAction,\n registerStaticItem,\n staticItemCount,\n resetStaticItems,\n setStaticItemCount,\n }}\n >\n {/*\n Faithful to react-aria-components Breadcrumbs: the accessible name (navProps'\n aria-label) sits directly on the <ol> (role=\"list\"), with NO wrapping <nav>\n landmark (react-spectrum/packages/react-aria-components/src/Breadcrumbs.tsx\n renders `<dom.ol {...mergeProps(DOMProps, navProps)} style={props.style}>`).\n The <ol> carries ONLY the consumer's class/style — no hard-coded inline\n layout reset. An inline reset would beat the styled layer's class (inline\n wins over class), which is exactly what broke S2 parity: the solid-spectrum\n `wrapperStyles` class supplies display:flex / list-style:none / padding:0 /\n marginStart and deliberately leaves align-items at its `normal` default, so\n a hard-coded inline `align-items:center` + `margin:0` clobbered the\n wrapper's margin and diverged from S2 (whose <ol> has neither).\n */}\n <ol\n {...navProps}\n {...domProps()}\n ref={(element) => assignRef(local.ref, element)}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={isDisabled() || undefined}\n >\n <Show\n when={hasCollectionItems()}\n fallback={<StaticBreadcrumbItems>{local.children as JSX.Element}</StaticBreadcrumbItems>}\n >\n <For each={items()}>\n {(item, index) => {\n const itemKey = getItemKey(item, index());\n const isLast = () => index() === items().length - 1;\n const renderItem = local.children as ((item: T) => JSX.Element) | undefined;\n\n return (\n <li style={{ display: \"flex\", \"align-items\": \"center\" }}>\n <BreadcrumbItemContext.Provider value={{ itemKey, isLast }}>\n {renderItem?.(item)}\n </BreadcrumbItemContext.Provider>\n </li>\n );\n }}\n </For>\n </Show>\n </ol>\n </BreadcrumbsContext.Provider>\n );\n}\n\nfunction StaticBreadcrumbItems(props: { children?: JSX.Element }): JSX.Element {\n const context = useContext(BreadcrumbsContext);\n const staticChildren = resolveChildren(() => props.children);\n const childArray = createMemo(() => {\n context?.resetStaticItems?.();\n const array = staticChildren.toArray();\n context?.setStaticItemCount?.(array.length);\n return array;\n });\n\n return (\n <For each={childArray()}>\n {(child) => <li style={{ display: \"flex\", \"align-items\": \"center\" }}>{child}</li>}\n </For>\n );\n}\n\n/**\n * A BreadcrumbItem represents an individual breadcrumb in the navigation trail.\n */\nexport function BreadcrumbItem(props: BreadcrumbItemProps): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\"class\", \"style\", \"slot\", \"isDisabled\", \"ref\"]);\n\n const context = useContext(BreadcrumbsContext);\n const itemContext = useContext(BreadcrumbItemContext);\n const staticIndex = itemContext ? null : context?.registerStaticItem?.();\n const isDisabled = () => local.isDisabled ?? context?.isDisabled() ?? false;\n const isCurrent = () =>\n ariaProps.isCurrent ??\n itemContext?.isLast() ??\n (staticIndex !== null &&\n staticIndex !== undefined &&\n context?.staticItemCount !== undefined &&\n staticIndex === context.staticItemCount() - 1);\n const itemKey = () => itemContext?.itemKey ?? ariaProps.id ?? null;\n\n // Mirror react-aria-components' Link: render an <a> only when there is an\n // href on an enabled, non-current item; otherwise fall back to a <span\n // role=\"link\"> (via createLink). A styled layer may force the element type\n // (S2 renders the current item as a plain <div>), which takes precedence.\n const elementType = () =>\n ariaProps.elementType ?? (ariaProps.href && !isDisabled() && !isCurrent() ? \"a\" : \"span\");\n // The current breadcrumb is the current page and is non-interactive: S2\n // renders it as a plain element with no link role. createLink only omits\n // role=\"link\" for an <a>, so treat the current item as an \"a\" purely for the\n // role decision while still rendering the resolved element type above.\n const linkElementType = () => (isCurrent() ? \"a\" : elementType());\n\n const handlePress = (e: PressEvent) => {\n ariaProps.onPress?.(e);\n const key = itemKey();\n if (key !== null && !isCurrent() && !isDisabled()) {\n context?.onAction?.(key);\n }\n };\n\n const itemAria = createBreadcrumbItem({\n get id() {\n return ariaProps.id;\n },\n get isCurrent() {\n return isCurrent();\n },\n get isDisabled() {\n return isDisabled();\n },\n get href() {\n return ariaProps.href;\n },\n get target() {\n return ariaProps.target;\n },\n get rel() {\n return ariaProps.rel;\n },\n get elementType() {\n return linkElementType();\n },\n get onPress() {\n return handlePress;\n },\n get onPressStart() {\n return ariaProps.onPressStart;\n },\n get onPressEnd() {\n return ariaProps.onPressEnd;\n },\n get onClick() {\n return ariaProps.onClick;\n },\n get onFocus() {\n return ariaProps.onFocus;\n },\n get onBlur() {\n return ariaProps.onBlur;\n },\n get onFocusChange() {\n return ariaProps.onFocusChange;\n },\n get onKeyDown() {\n return ariaProps.onKeyDown;\n },\n get onKeyUp() {\n return ariaProps.onKeyUp;\n },\n get autoFocus() {\n return ariaProps.autoFocus;\n },\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"];\n },\n get \"aria-labelledby\"() {\n return ariaProps[\"aria-labelledby\"];\n },\n get \"aria-describedby\"() {\n return ariaProps[\"aria-describedby\"];\n },\n get \"aria-details\"() {\n return ariaProps[\"aria-details\"];\n },\n get \"aria-current\"() {\n return ariaProps[\"aria-current\"];\n },\n });\n\n const isPressed = itemAria.isPressed;\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return isDisabled();\n },\n });\n // Read itemAria.itemProps fresh inside the memo (do NOT destructure it above):\n // the reactive getter re-runs createBreadcrumbItem → createLink each time this\n // memo re-evaluates, so role/tabIndex track elementType once isCurrent settles.\n const mergedItemProps = createMemo(() =>\n mergeProps(\n itemAria.itemProps as Record<string, unknown>,\n focusProps as Record<string, unknown>,\n hoverProps as Record<string, unknown>,\n ),\n );\n\n const renderValues = createMemo<BreadcrumbItemRenderProps>(() => ({\n isCurrent: isCurrent(),\n isDisabled: isDisabled(),\n isPressed: isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-BreadcrumbItem\",\n },\n renderValues,\n );\n\n const mergedStyle = () => {\n const userStyle = renderProps.style();\n const baseStyle = { display: \"inline-flex\", \"align-items\": \"center\" };\n return userStyle ? { ...baseStyle, ...userStyle } : baseStyle;\n };\n\n return (\n <ElementTag\n tag={elementType()}\n {...mergedItemProps()}\n ref={(element: HTMLElement) => assignRef(local.ref, element)}\n aria-current={isCurrent() ? (ariaProps[\"aria-current\"] ?? \"page\") : undefined}\n aria-disabled={isDisabled() || isCurrent() || undefined}\n class={renderProps.class()}\n style={mergedStyle()}\n data-current={isCurrent() || undefined}\n data-disabled={isDisabled() || undefined}\n data-pressed={isPressed() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n >\n {renderProps.renderChildren()}\n </ElementTag>\n );\n}\n\nBreadcrumbs.Item = BreadcrumbItem;\n"],"mappings":";;;;;;;;;;;AAyCA,SAAS,UAAa,KAAiB,IAAa;CAClD,IAAI,CAAC,KACH;CAGF,IAAI,OAAO,QAAQ,YACjB,IAAI,EAAE;MAEN,IAAI,UAAU;AAElB;AAgEA,MAAa,qBAAqB,cAA8C,IAAI;AAOpF,MAAa,wBAAwB,cAAiD,IAAI;AAE1F,SAAS,eAAe,MAAe,OAAgC;CACrE,MAAM,YAAY;CAClB,OAAO,UAAU,OAAO,UAAU,MAAM;AAC1C;;;;AAKA,SAAgB,YAAe,OAAyC;CACtE,MAAM,CAAC,OAAO,WAAW,QAAQ,WAC/B,OACA;EAAC;EAAY;EAAS;EAAS;EAAQ;EAAS;EAAU;EAAc;EAAY;CAAK,GACzF;EAAC;EAAc;EAAmB;EAAoB;CAAc,CACtE;CAEA,MAAM,mBAAmB,MAAM,cAAc;CAC7C,MAAM,cAAc,MAAM,SAAS,CAAC;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AAG,GAAG,CAAC,OAAO,CAOtE;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,GAAG,CAAC,OAAO,CAOlF;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,GAAG,GAAG,CAAC,OAAO,CAOpF;AAED,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DateField2.js","names":["createContext","useContext","createDateRangePicker","DateFieldState","DateValue","RangeCalendarState","DateRangePickerFieldContextValue","state","aria","labelProps","Record","inputProps","hiddenInputProps","descriptionProps","errorMessageProps","DateRangePickerContextValue","calendarState","startFieldState","endFieldState","startFieldContext","endFieldContext","overlayState","isOpen","open","close","toggle","triggerRef","HTMLElement","setTriggerRef","element","pickerAria","ReturnType","DateRangePickerContext","useDateRangePickerContext","context","Error","JSX","Context","createContext","createEffect","createMemo","createSignal","onCleanup","splitProps","useContext","Index","Show","createDateField","createDateSegment","createFocusRing","createHover","createVisuallyHidden","mergeProps","AriaDateFieldProps","parseDate","parseDateTime","toCalendarDate","toCalendarDateTime","toLocalTimeZone","createDateFieldState","access","DateFieldState","DateFieldStateProps","DateSegment","DateSegmentType","CalendarDate","DateValue","RenderChildren","ClassNameOrFunction","StyleOrFunction","SlotProps","useRenderProps","dataAttr","useIsHydrated","Provider","TextContext","FormContext","FormProps","DateRangePickerContext","DateRangePickerFieldContextValue","DateFieldRenderProps","isDisabled","isReadOnly","isRequired","isInvalid","DateFieldProps","Omit","T","children","Element","segment","class","style","locale","DateInputRenderProps","isFocused","DateInputProps","onPointerDownCapture","EventHandler","HTMLDivElement","PointerEvent","DateSegmentRenderProps","isHovered","isFocusVisible","isPlaceholder","type","text","DateSegmentProps","DateFieldContextValue","state","aria","labelProps","Record","inputProps","hiddenInputProps","descriptionProps","errorMessageProps","DateFieldContext","DateFieldStateContext","withFormValidationBehavior","props","P","formContext","validationBehavior","Proxy","get","target","property","receiver","localValue","Reflect","undefined","has","ownKeys","keys","Set","add","Array","from","getOwnPropertyDescriptor","descriptor","enumerable","configurable","useDateFieldContext","context","Error","useDateInputContext","slot","dateFieldContext","dateRangePickerContext","startFieldContext","endFieldContext","DateField","isHydrated","_$createComponent","when","fallback","_$getNextElement","_tmpl$","DateFieldInner","_$mergeProps","__formContext","DateFieldInnerProps","mergedProps","local","stateProps","rest","fieldRef","setFieldRef","validationInputRef","setValidationInputRef","HTMLInputElement","fieldAria","description","errorMessage","inputRef","renderValues","renderProps","defaultClassName","textSlots","slots","value","fieldProps","ref","_el$2","_tmpl$2","_$use","_$insert","values","_$effect","_p$","_v$","_v$2","_v$3","_v$4","_v$5","_v$6","e","_$className","t","_$style","a","_$setAttribute","o","i","n","RootHiddenDateInput","autoComplete","name","HIDDEN_DATE_SEGMENTS","HIDDEN_TIME_SEGMENTS","HIDDEN_GRANULARITY_MAP","hour","minute","second","RootHiddenDateInputProps","visuallyHiddenProps","position","top","left","granularity","inputStep","g","inputType","dateValue","toString","onChange","Event","event","targetString","currentTarget","targetValue","timeSegments","includes","slice","setSegment","setValue","_el$3","_tmpl$3","_el$4","firstChild","_$spread","addEventListener","_v$7","_v$8","_v$9","_v$0","_v$1","_$setProperty","_$runHydrationEvents","DateInput","setIsFocused","setInputRef","inputDivProps","onFocusIn","onFocusOut","element","handler","listener","capture","removeEventListener","_el$5","data-disabled","data-focused","each","segments","liveSegment","_t","key","PropertyKey","_el$6","_tmpl$4","InputHTMLAttributes","segmentRef","setSegmentRef","HTMLElement","segmentAria","focusProps","hoverProps","getChildren","renderChildren","segmentElementProps","segmentProps","_el$7","_tmpl$5","data-placeholder","data-invalid","data-readonly","data-type","data-hovered","data-focus-visible","DateFieldLabelProps","DateFieldLabel","_el$8","DateFieldDescriptionProps","DateFieldDescription","_el$9","DateFieldErrorMessageProps","DateFieldErrorMessage","_el$0"],"sources":["../src/DateRangePickerContext.tsx","../src/DateField.tsx"],"sourcesContent":["import { createContext, useContext } from \"solid-js\";\nimport { type createDateRangePicker } from \"@proyecto-viviana/solidaria\";\nimport {\n type DateFieldState,\n type DateValue,\n type RangeCalendarState,\n} from \"@proyecto-viviana/solid-stately\";\n\nexport interface DateRangePickerFieldContextValue {\n state: DateFieldState<DateValue>;\n aria: {\n labelProps: Record<string, unknown>;\n inputProps: Record<string, unknown>;\n /** Optional hidden validation <input> props (unused by the range fields). */\n hiddenInputProps?: Record<string, unknown>;\n descriptionProps: Record<string, unknown>;\n errorMessageProps: Record<string, unknown>;\n };\n}\n\nexport interface DateRangePickerContextValue {\n calendarState: RangeCalendarState<DateValue>;\n startFieldState: DateFieldState<DateValue>;\n endFieldState: DateFieldState<DateValue>;\n startFieldContext: DateRangePickerFieldContextValue;\n endFieldContext: DateRangePickerFieldContextValue;\n overlayState: {\n isOpen: boolean;\n open: () => void;\n close: () => void;\n toggle: () => void;\n };\n triggerRef: () => HTMLElement | null;\n setTriggerRef: (element: HTMLElement | null) => void;\n pickerAria: ReturnType<typeof createDateRangePicker>;\n}\n\nexport const DateRangePickerContext = createContext<DateRangePickerContextValue | null>(null);\n\nexport function useDateRangePickerContext(): DateRangePickerContextValue {\n const context = useContext(DateRangePickerContext);\n if (!context) {\n throw new Error(\"DateRangePicker components must be used within a DateRangePicker\");\n }\n return context;\n}\n","/**\n * DateField component for solidaria-components\n *\n * Pre-wired headless date field component with segment-based editing.\n * Port of react-aria-components/src/DateField.tsx\n */\n\nimport {\n type JSX,\n type Context,\n createContext,\n createEffect,\n createMemo,\n createSignal,\n onCleanup,\n splitProps,\n useContext,\n Index,\n Show,\n} from \"solid-js\";\nimport {\n createDateField,\n createDateSegment,\n createFocusRing,\n createHover,\n createVisuallyHidden,\n mergeProps,\n type AriaDateFieldProps,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n parseDate,\n parseDateTime,\n toCalendarDate,\n toCalendarDateTime,\n toLocalTimeZone,\n} from \"@internationalized/date\";\nimport {\n createDateFieldState,\n access,\n type DateFieldState,\n type DateFieldStateProps,\n type DateSegment as DateSegmentType,\n type CalendarDate,\n type DateValue,\n} from \"@proyecto-viviana/solid-stately\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n dataAttr,\n useIsHydrated,\n Provider,\n} from \"./utils\";\nimport { TextContext } from \"./Text\";\nimport { FormContext, type FormProps } from \"./Form\";\nimport {\n DateRangePickerContext,\n type DateRangePickerFieldContextValue,\n} from \"./DateRangePickerContext\";\n\nexport interface DateFieldRenderProps {\n /** Whether the field is disabled. */\n isDisabled: boolean;\n /** Whether the field is read-only. */\n isReadOnly: boolean;\n /** Whether the field is required. */\n isRequired: boolean;\n /** Whether the field is invalid. */\n isInvalid: boolean;\n}\n\nexport interface DateFieldProps<T extends DateValue = DateValue>\n extends\n Omit<AriaDateFieldProps, \"id\" | \"isDisabled\" | \"isReadOnly\" | \"isRequired\">,\n Omit<DateFieldStateProps<T>, \"locale\">,\n SlotProps {\n /** The children of the component. */\n children?: JSX.Element | ((segment: DateSegmentType) => JSX.Element);\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateFieldRenderProps>;\n /** The locale to use for formatting. */\n locale?: string;\n}\n\nexport interface DateInputRenderProps {\n /** Whether the input is disabled. */\n isDisabled: boolean;\n /** Whether the input is focused. */\n isFocused: boolean;\n}\n\nexport interface DateInputProps extends SlotProps {\n /** The children of the component (render function receiving segments). */\n children?: (segment: DateSegmentType) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateInputRenderProps>;\n /** Handler called during the pointer down capture phase. */\n onPointerDownCapture?: JSX.EventHandler<HTMLDivElement, PointerEvent>;\n}\n\nexport interface DateSegmentRenderProps {\n /** Whether the segment is hovered. */\n isHovered: boolean;\n /** Whether the segment is focused. */\n isFocused: boolean;\n /** Whether the segment is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the segment is a placeholder. */\n isPlaceholder: boolean;\n /** Whether the segment is read only. */\n isReadOnly: boolean;\n /** Whether the segment is disabled. */\n isDisabled: boolean;\n /** Whether the segment is invalid. */\n isInvalid: boolean;\n /** The segment type. */\n type: DateSegmentType[\"type\"];\n /** The text to display. */\n text: string;\n}\n\nexport interface DateSegmentProps extends SlotProps {\n /** The segment data. */\n segment: DateSegmentType;\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<DateSegmentRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateSegmentRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateSegmentRenderProps>;\n}\n\nexport interface DateFieldContextValue {\n state: DateFieldState<DateValue>;\n aria: {\n labelProps: Record<string, unknown>;\n inputProps: Record<string, unknown>;\n // The hidden validation <input> props (native type/required/onChange). Only\n // the standalone DateField provides these; DatePicker/DateRangePicker manage\n // their own hidden inputs, so this stays optional and its <input> is gated.\n hiddenInputProps?: Record<string, unknown>;\n descriptionProps: Record<string, unknown>;\n errorMessageProps: Record<string, unknown>;\n };\n}\n\nexport const DateFieldContext = createContext<DateFieldContextValue | null>(null);\nexport const DateFieldStateContext = createContext<DateFieldState<DateValue> | null>(null);\n\nfunction withFormValidationBehavior<P extends object>(props: P, formContext: FormProps | null): P {\n if (!formContext?.validationBehavior) {\n return props;\n }\n\n return new Proxy(props, {\n get(target, property, receiver) {\n const localValue = Reflect.get(target, property, receiver);\n if (property === \"validationBehavior\" && localValue === undefined) {\n return formContext.validationBehavior;\n }\n\n return localValue;\n },\n has(target, property) {\n return (\n Reflect.has(target, property) ||\n (property === \"validationBehavior\" && formContext.validationBehavior !== undefined)\n );\n },\n ownKeys(target) {\n const keys = new Set(Reflect.ownKeys(target));\n if (formContext.validationBehavior !== undefined) {\n keys.add(\"validationBehavior\");\n }\n\n return Array.from(keys);\n },\n getOwnPropertyDescriptor(target, property) {\n const descriptor = Reflect.getOwnPropertyDescriptor(target, property);\n if (descriptor) {\n return descriptor;\n }\n\n if (property === \"validationBehavior\" && formContext.validationBehavior !== undefined) {\n return {\n enumerable: true,\n configurable: true,\n get: () => formContext.validationBehavior,\n };\n }\n\n return undefined;\n },\n });\n}\n\nexport function useDateFieldContext(): DateFieldContextValue {\n const context = useContext(DateFieldContext);\n if (!context) {\n throw new Error(\"DateField components must be used within a DateField\");\n }\n return context;\n}\n\nfunction useDateInputContext(\n slot?: string,\n): DateFieldContextValue | DateRangePickerFieldContextValue {\n const dateFieldContext = useContext(DateFieldContext);\n if (dateFieldContext) {\n return dateFieldContext;\n }\n\n const dateRangePickerContext = useContext(DateRangePickerContext);\n if (dateRangePickerContext && slot === \"start\") {\n return dateRangePickerContext.startFieldContext;\n }\n if (dateRangePickerContext && slot === \"end\") {\n return dateRangePickerContext.endFieldContext;\n }\n\n throw new Error(\"DateInput components must be used within a DateField or DateRangePicker slot\");\n}\n\n/**\n * A date field allows users to enter and edit date values using a keyboard.\n *\n * @example\n * ```tsx\n * <DateField label=\"Date\">\n * <Label>Date</Label>\n * <DateInput>\n * {(segment) => <DateSegment segment={segment} />}\n * </DateInput>\n * </DateField>\n * ```\n */\nexport function DateField<T extends DateValue = CalendarDate>(\n props: DateFieldProps<T>,\n): JSX.Element {\n // Use hydration-safe pattern for client-only rendering\n const isHydrated = useIsHydrated();\n const formContext = useContext(FormContext);\n\n return (\n <Show\n when={isHydrated()}\n fallback={\n <div class=\"solidaria-DateField solidaria-DateField--placeholder\" aria-hidden=\"true\" />\n }\n >\n <DateFieldInner {...props} __formContext={formContext} />\n </Show>\n );\n}\n\ntype DateFieldInnerProps<T extends DateValue = DateValue> = DateFieldProps<T> & {\n __formContext?: FormProps | null;\n};\n\n/**\n * Internal DateField component that renders after client mount.\n */\nfunction DateFieldInner<T extends DateValue = CalendarDate>(\n props: DateFieldInnerProps<T>,\n): JSX.Element {\n const formContext = props.__formContext ?? useContext(FormContext);\n const mergedProps = withFormValidationBehavior(props, formContext);\n const [local, stateProps, rest] = splitProps(\n mergedProps,\n [\"children\", \"class\", \"style\", \"slot\", \"__formContext\"],\n [\n \"value\",\n \"defaultValue\",\n \"onChange\",\n \"minValue\",\n \"maxValue\",\n \"isInvalid\",\n \"isDisabled\",\n \"isReadOnly\",\n \"isRequired\",\n \"locale\",\n \"granularity\",\n \"hourCycle\",\n \"hideTimeZone\",\n \"placeholderValue\",\n \"shouldForceLeadingZeros\",\n \"validationState\",\n \"validationBehavior\",\n \"validate\",\n \"description\",\n \"errorMessage\",\n \"isDateUnavailable\",\n ],\n );\n\n const [fieldRef, setFieldRef] = createSignal<HTMLDivElement | null>(null);\n // Ref to the hidden validation <input> (the DateInput's `<Input>` sibling).\n // RAC's DateField creates this ref, passes it to useDateField, and threads it\n // onto the <Input> via InputContext so useFormReset/useFormValidation target\n // that element. We mirror that: create it here, hand it to createDateField\n // below, and attach it to the same input through the context getter.\n const [validationInputRef, setValidationInputRef] =\n createSignal<HTMLInputElement | null>(null);\n\n const state = createDateFieldState(stateProps);\n\n const fieldAria = createDateField(\n () => ({\n ...(rest as Record<string, unknown>),\n // RAC threads the same props into both useDateFieldState and useDateField;\n // these live in `stateProps` here, so forward them so the field hook can\n // build aria-disabled and the native validation <input> (type/required).\n // access() unwraps the MaybeAccessor state-prop declarations.\n isDisabled: access(stateProps.isDisabled),\n isReadOnly: access(stateProps.isReadOnly),\n isRequired: access(stateProps.isRequired),\n // Mirror RAC DateField: validationBehavior ?? formValidationBehavior ??\n // 'native'. withFormValidationBehavior already folds the form default into\n // stateProps.validationBehavior; the last `?? 'native'` is the standalone\n // default that flips the hidden input to type=\"text\".\n validationBehavior: stateProps.validationBehavior ?? \"native\",\n description: stateProps.description,\n errorMessage: stateProps.errorMessage,\n // Form-reset + native constraint validation are wired onto this input by\n // createDateField (see its createFormReset/createFormValidation calls),\n // exactly as RAC's useDateField wires them onto props.inputRef.\n inputRef: () => validationInputRef() ?? undefined,\n }),\n state as unknown as DateFieldState<DateValue>,\n fieldRef,\n );\n\n const renderValues = createMemo<DateFieldRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isReadOnly: state.isReadOnly(),\n isRequired: state.isRequired(),\n isInvalid: state.isInvalid(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-DateField\",\n },\n renderValues,\n );\n\n const textSlots = {\n slots: {\n get description() {\n return fieldAria.descriptionProps;\n },\n get errorMessage() {\n return fieldAria.errorMessageProps;\n },\n },\n };\n\n return (\n <DateFieldStateContext.Provider value={state as unknown as DateFieldState<DateValue>}>\n <DateFieldContext.Provider\n value={{\n state: state as unknown as DateFieldState<DateValue>,\n // Read through getters so consumers see the LIVE memo values, not a\n // snapshot frozen at first render. `createDescription` appends the\n // value-description id via a deferred effect; the group's\n // aria-describedby only picks it up if the props stay reactive here.\n aria: {\n get labelProps() {\n return fieldAria.labelProps;\n },\n // The segment group props (role=\"group\", aria-labelledby, unicode-bidi\n // isolate style, arrow-key nav, focus-within handlers) are routed to the\n // DateInput element — mirroring RAC, where useDateField.fieldProps is\n // published through GroupContext and consumed by the DateInput <Group>.\n // The outer wrapper stays roleless.\n get inputProps() {\n return fieldAria.fieldProps;\n },\n // The REAL hidden validation input props (type/hidden/required/onChange\n // under native validation). Rendered as the DateInput's <input> sibling.\n // Thread the validation-input ref through here — mirroring RAC's\n // `[InputContext, {...inputProps, ref: inputRef}]` — so createDateField's\n // form-reset/validation wiring resolves to the mounted element.\n get hiddenInputProps() {\n return mergeProps(fieldAria.inputProps, { ref: setValidationInputRef });\n },\n get descriptionProps() {\n return fieldAria.descriptionProps;\n },\n get errorMessageProps() {\n return fieldAria.errorMessageProps;\n },\n },\n }}\n >\n <div\n ref={setFieldRef}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-readonly={dataAttr(state.isReadOnly())}\n data-required={dataAttr(state.isRequired())}\n data-invalid={dataAttr(state.isInvalid())}\n >\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n {local.children as JSX.Element}\n </Provider>\n </div>\n {/*\n RAC renders <HiddenDateInput> UNCONDITIONALLY at the DateField root\n (react-aria-components DateField.mjs). It is NOT a validation input — it\n is a clipped, aria-hidden, tabIndex={-1} native date input that mirrors\n the value for browser autofill. Its `form=\"\"` detaches it from form\n submission (the DateInput's <Input> above is what submits), so it never\n double-counts in FormData. It renders regardless of `name` — hence no\n <Show> gate — which is why it appears in the focus trail as the trailing\n tabindex=\"-1\" element.\n */}\n <RootHiddenDateInput\n autoComplete={(rest as Record<string, unknown>).autoComplete as string | undefined}\n name={(rest as Record<string, unknown>).name as string | undefined}\n isDisabled={state.isDisabled()}\n state={state as unknown as DateFieldState<DateValue>}\n />\n </DateFieldContext.Provider>\n </DateFieldStateContext.Provider>\n );\n}\n\nconst HIDDEN_DATE_SEGMENTS: readonly string[] = [\"day\", \"month\", \"year\"];\nconst HIDDEN_TIME_SEGMENTS: readonly string[] = [\"hour\", \"minute\", \"second\"];\nconst HIDDEN_GRANULARITY_MAP: Record<string, number> = { hour: 1, minute: 2, second: 3 };\n\ninterface RootHiddenDateInputProps {\n autoComplete?: string;\n name?: string;\n isDisabled?: boolean;\n state: DateFieldState<DateValue>;\n}\n\n/**\n * The always-rendered hidden date input at the DateField root — a faithful port\n * of react-aria-components' HiddenDateInput (private/HiddenDateInput.mjs). It is\n * NOT a validation input: it is a clipped, aria-hidden, tabIndex={-1} native\n * date input that mirrors the current value for browser autofill. `form=\"\"`\n * detaches it from form submission (the DateInput's <Input> submits), so it\n * never double-counts in FormData. RAC renders it unconditionally, which is why\n * it appears as the trailing tabindex=\"-1\" element in the focus trail.\n */\nfunction RootHiddenDateInput(props: RootHiddenDateInputProps): JSX.Element {\n // RAC uses useVisuallyHidden with position:fixed/top:0/left:0 to keep the\n // clipped input from scrolling the page.\n const { visuallyHiddenProps } = createVisuallyHidden(() => ({\n style: { position: \"fixed\", top: \"0\", left: \"0\" },\n }));\n\n const granularity = () => props.state.granularity ?? \"day\";\n const inputStep = () => {\n const g = granularity();\n if (g === \"second\") return 1;\n if (g === \"hour\") return 3600;\n return 60;\n };\n const inputType = () => (granularity() === \"day\" ? \"date\" : \"datetime-local\");\n const dateValue = () => {\n const value = props.state.value();\n if (!value) return \"\";\n if (granularity() === \"day\") return toCalendarDate(value).toString();\n return toCalendarDateTime(\n \"timeZone\" in value ? toLocalTimeZone(value) : value,\n ).toString();\n };\n\n const onChange: JSX.EventHandler<HTMLInputElement, Event> = (event) => {\n const targetString = (event.currentTarget.value ?? \"\").toString();\n if (!targetString) return;\n try {\n const g = granularity();\n const targetValue = (g === \"day\" ? parseDate(targetString) : parseDateTime(targetString)) as\n unknown as Record<string, number>;\n let timeSegments = HIDDEN_TIME_SEGMENTS;\n if (HIDDEN_TIME_SEGMENTS.includes(g)) {\n timeSegments = HIDDEN_TIME_SEGMENTS.slice(0, HIDDEN_GRANULARITY_MAP[g]);\n }\n const state = props.state as unknown as {\n setSegment?: (type: string, value: number) => void;\n setValue: (value: unknown) => void;\n };\n // Only DateFieldState (not DatePickerState) exposes setSegment; validate\n // each parsed segment before committing the new value, mirroring RAC.\n if (typeof state.setSegment === \"function\") {\n for (const type in targetValue) {\n if (HIDDEN_DATE_SEGMENTS.includes(type)) state.setSegment(type, targetValue[type]);\n if (timeSegments.includes(type)) state.setSegment(type, targetValue[type]);\n }\n }\n state.setValue(targetValue);\n } catch {\n // ignore unparseable autofill values\n }\n };\n\n return (\n <div\n {...(visuallyHiddenProps() as unknown as Record<string, unknown>)}\n aria-hidden=\"true\"\n data-testid=\"hidden-dateinput-container\"\n >\n <input\n tabIndex={-1}\n autocomplete={props.autoComplete}\n disabled={props.isDisabled}\n type={inputType()}\n form=\"\"\n name={props.name}\n step={inputStep()}\n value={dateValue()}\n onChange={onChange}\n />\n </div>\n );\n}\n\n/**\n * The input area containing date segments.\n */\nexport function DateInput(props: DateInputProps): JSX.Element {\n const context = useDateInputContext(props.slot);\n const { state, aria } = context;\n const [isFocused, setIsFocused] = createSignal(false);\n const [inputRef, setInputRef] = createSignal<HTMLDivElement | null>(null);\n\n const renderValues = createMemo<DateInputRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isFocused: isFocused(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: props.class,\n style: props.style,\n defaultClassName: \"solidaria-DateInput\",\n },\n renderValues,\n );\n\n // The group props (role=\"group\", aria-labelledby, unicode-bidi:isolate,\n // arrow-key nav, focus-within handlers) carry the field's own `style` and\n // focus handlers. Merge — not clobber — so the group keeps its unicode-bidi\n // isolation and the local isFocused signal chains onto the field's\n // focusWithin handlers. Solid onFocus/onBlur do not bubble, so track focus\n // via onFocusIn/onFocusOut.\n const inputDivProps = createMemo(() =>\n mergeProps(aria.inputProps, {\n onFocusIn: () => setIsFocused(true),\n onFocusOut: () => setIsFocused(false),\n style: renderProps.style(),\n }),\n );\n\n createEffect(() => {\n const element = inputRef();\n const handler = props.onPointerDownCapture;\n if (!element || !handler) return;\n\n const listener = (event: PointerEvent) =>\n (handler as unknown as (event: PointerEvent) => void)(event);\n element.addEventListener(\"pointerdown\", listener, { capture: true });\n onCleanup(() => element.removeEventListener(\"pointerdown\", listener, { capture: true }));\n });\n\n return (\n <DateFieldContext.Provider value={context as DateFieldContextValue}>\n <div\n ref={setInputRef}\n {...inputDivProps()}\n class={renderProps.class()}\n data-disabled={dataAttr(state.isDisabled())}\n data-focused={dataAttr(isFocused())}\n >\n {/*\n <Index> keys by position, not identity, so each DateSegment instance\n stays alive across keystrokes (state.segments() re-mints segment\n objects every edit). A stable Proxy forwards property reads to the\n live per-index accessor so the child stays reactive.\n */}\n <Index each={state.segments()}>\n {(segment) => {\n const liveSegment = new Proxy({} as DateSegmentType, {\n get: (_t, key) => (segment() as unknown as Record<PropertyKey, unknown>)[key],\n has: (_t, key) => key in (segment() as object),\n });\n return props.children?.(liveSegment);\n }}\n </Index>\n </div>\n {/*\n The hidden validation input, sibling of the group — mirrors RAC's\n DateInputInner `<><Group/><Input/></>`. Under native validation\n (default) `useDateField` publishes it as `type=\"text\" hidden required`\n so browser constraint validation fires; under aria validation it stays\n `type=\"hidden\"`. Both carry the ISO value string. Only the standalone\n DateField supplies these props; inside a DatePicker/DateRangePicker the\n field is presentation and its owner renders the hidden input instead.\n */}\n <Show when={aria.hiddenInputProps}>\n {(hiddenInputProps) => (\n <input {...(hiddenInputProps() as JSX.InputHTMLAttributes<HTMLInputElement>)} />\n )}\n </Show>\n </DateFieldContext.Provider>\n );\n}\n\n/**\n * A segment of a date field (year, month, day, etc.).\n */\nexport function DateSegment(props: DateSegmentProps): JSX.Element {\n const { state } = useDateFieldContext();\n const [segmentRef, setSegmentRef] = createSignal<HTMLElement | null>(null);\n\n const segmentAria = createDateSegment(\n {\n get segment() {\n return props.segment;\n },\n },\n state,\n segmentRef,\n );\n\n // Mirror upstream DateSegment: focus/focus-visible come from useFocusRing()\n // and hover from useHover({isDisabled: field disabled || literal segment}).\n // Literals never hover; the field being disabled suppresses hover entirely.\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n const { isHovered, hoverProps } = createHover(() => ({\n isDisabled: state.isDisabled() || props.segment.type === \"literal\",\n }));\n\n const renderValues = createMemo<DateSegmentRenderProps>(() => ({\n isHovered: isHovered(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isPlaceholder: props.segment.isPlaceholder,\n isReadOnly: state.isReadOnly(),\n isDisabled: state.isDisabled(),\n isInvalid: state.isInvalid(),\n type: props.segment.type,\n text: props.segment.text,\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: props.class,\n style: props.style,\n defaultClassName: \"solidaria-DateSegment\",\n },\n renderValues,\n );\n\n // Determine children content - avoid Show for SSR hydration compatibility\n const getChildren = () => {\n if (typeof props.children === \"function\") {\n return renderProps.renderChildren();\n }\n return props.segment.text;\n };\n\n // Mirror upstream's `mergeProps(filterDOMProps(otherProps), segmentProps,\n // focusProps, hoverProps)`: the segment's behavior/style props (caretColor +\n // RTL direction) chain with the focus-ring and hover handlers so neither\n // clobbers the other.\n const segmentElementProps = createMemo(() =>\n mergeProps(\n segmentAria.segmentProps,\n focusProps as Record<string, unknown>,\n hoverProps as Record<string, unknown>,\n {\n style: renderProps.style(),\n },\n ),\n );\n\n return (\n <span\n ref={setSegmentRef}\n {...segmentElementProps()}\n class={renderProps.class()}\n data-placeholder={props.segment.isPlaceholder || undefined}\n data-invalid={state.isInvalid() || undefined}\n data-readonly={state.isReadOnly() || undefined}\n data-disabled={state.isDisabled() || undefined}\n data-type={props.segment.type}\n data-hovered={isHovered() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n >\n {getChildren()}\n </span>\n );\n}\n\nexport interface DateFieldLabelProps {\n children?: JSX.Element;\n class?: string;\n}\n\nexport function DateFieldLabel(props: DateFieldLabelProps): JSX.Element {\n const { aria } = useDateFieldContext();\n return (\n <span {...aria.labelProps} class={props.class}>\n {props.children}\n </span>\n );\n}\n\nexport interface DateFieldDescriptionProps {\n children?: JSX.Element;\n class?: string;\n}\n\nexport function DateFieldDescription(props: DateFieldDescriptionProps): JSX.Element {\n const { aria } = useDateFieldContext();\n return (\n <span {...aria.descriptionProps} class={props.class}>\n {props.children}\n </span>\n );\n}\n\nexport interface DateFieldErrorMessageProps {\n children?: JSX.Element;\n class?: string;\n}\n\nexport function DateFieldErrorMessage(props: DateFieldErrorMessageProps): JSX.Element {\n const { aria } = useDateFieldContext();\n return (\n <span {...aria.errorMessageProps} class={props.class}>\n {props.children}\n </span>\n );\n}\n\nexport type { DateFieldState, DateSegmentType };\n"],"mappings":";;;;;;;;;AAqCA,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ext","useContext","createDateRangePicker","DateFieldState","DateValue","RangeCalendarState","DateRangePickerFieldContextValue","state","aria","labelProps","Record","inputProps","hiddenInputProps","descriptionProps","errorMessageProps","DateRangePickerContextValue","calendarState","startFieldState","endFieldState","startFieldContext","endFieldContext","overlayState","isOpen","open","close","toggle","triggerRef","HTMLElement","setTriggerRef","element","pickerAria","ReturnType","DateRangePickerContext","useDateRangePickerContext","context","Error","JSX","Context","createContext","createEffect","createMemo","createSignal","onCleanup","splitProps","useContext","Index","Show","createDateField","createDateSegment","createFocusRing","createHover","createVisuallyHidden","mergeProps","AriaDateFieldProps","parseDate","parseDateTime","toCalendarDate","toCalendarDateTime","toLocalTimeZone","createDateFieldState","access","DateFieldState","DateFieldStateProps","DateSegment","DateSegmentType","CalendarDate","DateValue","RenderChildren","ClassNameOrFunction","StyleOrFunction","SlotProps","useRenderProps","dataAttr","useIsHydrated","Provider","TextContext","FormContext","FormProps","DateRangePickerContext","DateRangePickerFieldContextValue","DateFieldRenderProps","isDisabled","isReadOnly","isRequired","isInvalid","DateFieldProps","Omit","T","children","Element","segment","class","style","locale","DateInputRenderProps","isFocused","DateInputProps","onPointerDownCapture","EventHandler","HTMLDivElement","PointerEvent","DateSegmentRenderProps","isHovered","isFocusVisible","isPlaceholder","type","text","DateSegmentProps","DateFieldContextValue","state","aria","labelProps","Record","inputProps","hiddenInputProps","descriptionProps","errorMessageProps","DateFieldContext","DateFieldStateContext","withFormValidationBehavior","props","P","formContext","validationBehavior","Proxy","get","target","property","receiver","localValue","Reflect","undefined","has","ownKeys","keys","Set","add","Array","from","getOwnPropertyDescriptor","descriptor","enumerable","configurable","useDateFieldContext","context","Error","useDateInputContext","slot","dateFieldContext","dateRangePickerContext","startFieldContext","endFieldContext","DateField","isHydrated","_$createComponent","when","fallback","_$getNextElement","_tmpl$","DateFieldInner","_$mergeProps","__formContext","DateFieldInnerProps","mergedProps","local","stateProps","rest","fieldRef","setFieldRef","validationInputRef","setValidationInputRef","HTMLInputElement","fieldAria","description","errorMessage","inputRef","renderValues","renderProps","defaultClassName","textSlots","slots","value","fieldProps","ref","_el$2","_tmpl$2","_$use","_$insert","values","_$effect","_p$","_v$","_v$2","_v$3","_v$4","_v$5","_v$6","e","_$className","t","_$style","a","_$setAttribute","o","i","n","RootHiddenDateInput","autoComplete","name","HIDDEN_DATE_SEGMENTS","HIDDEN_TIME_SEGMENTS","HIDDEN_GRANULARITY_MAP","hour","minute","second","RootHiddenDateInputProps","visuallyHiddenProps","position","top","left","granularity","inputStep","g","inputType","dateValue","toString","onChange","Event","event","targetString","currentTarget","targetValue","timeSegments","includes","slice","setSegment","setValue","_el$3","_tmpl$3","_el$4","firstChild","_$spread","addEventListener","_v$7","_v$8","_v$9","_v$0","_v$1","_$setProperty","_$runHydrationEvents","DateInput","setIsFocused","setInputRef","inputDivProps","onFocusIn","onFocusOut","element","handler","listener","capture","removeEventListener","_el$5","data-disabled","data-focused","each","segments","liveSegment","_t","key","PropertyKey","_el$6","_tmpl$4","InputHTMLAttributes","segmentRef","setSegmentRef","HTMLElement","segmentAria","focusProps","hoverProps","getChildren","renderChildren","segmentElementProps","segmentProps","_el$7","_tmpl$5","data-placeholder","data-invalid","data-readonly","data-type","data-hovered","data-focus-visible","DateFieldLabelProps","DateFieldLabel","_el$8","DateFieldDescriptionProps","DateFieldDescription","_el$9","DateFieldErrorMessageProps","DateFieldErrorMessage","_el$0"],"sources":["../src/DateRangePickerContext.tsx","../src/DateField.tsx"],"sourcesContent":["import { createContext, useContext } from \"solid-js\";\nimport { type createDateRangePicker } from \"@proyecto-viviana/solidaria\";\nimport {\n type DateFieldState,\n type DateValue,\n type RangeCalendarState,\n} from \"@proyecto-viviana/solid-stately\";\n\nexport interface DateRangePickerFieldContextValue {\n state: DateFieldState<DateValue>;\n aria: {\n labelProps: Record<string, unknown>;\n inputProps: Record<string, unknown>;\n /** Optional hidden validation <input> props (unused by the range fields). */\n hiddenInputProps?: Record<string, unknown>;\n descriptionProps: Record<string, unknown>;\n errorMessageProps: Record<string, unknown>;\n };\n}\n\nexport interface DateRangePickerContextValue {\n calendarState: RangeCalendarState<DateValue>;\n startFieldState: DateFieldState<DateValue>;\n endFieldState: DateFieldState<DateValue>;\n startFieldContext: DateRangePickerFieldContextValue;\n endFieldContext: DateRangePickerFieldContextValue;\n overlayState: {\n isOpen: boolean;\n open: () => void;\n close: () => void;\n toggle: () => void;\n };\n triggerRef: () => HTMLElement | null;\n setTriggerRef: (element: HTMLElement | null) => void;\n pickerAria: ReturnType<typeof createDateRangePicker>;\n}\n\nexport const DateRangePickerContext = createContext<DateRangePickerContextValue | null>(null);\n\nexport function useDateRangePickerContext(): DateRangePickerContextValue {\n const context = useContext(DateRangePickerContext);\n if (!context) {\n throw new Error(\"DateRangePicker components must be used within a DateRangePicker\");\n }\n return context;\n}\n","/**\n * DateField component for solidaria-components\n *\n * Pre-wired headless date field component with segment-based editing.\n * Port of react-aria-components/src/DateField.tsx\n */\n\nimport {\n type JSX,\n type Context,\n createContext,\n createEffect,\n createMemo,\n createSignal,\n onCleanup,\n splitProps,\n useContext,\n Index,\n Show,\n} from \"solid-js\";\nimport {\n createDateField,\n createDateSegment,\n createFocusRing,\n createHover,\n createVisuallyHidden,\n mergeProps,\n type AriaDateFieldProps,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n parseDate,\n parseDateTime,\n toCalendarDate,\n toCalendarDateTime,\n toLocalTimeZone,\n} from \"@internationalized/date\";\nimport {\n createDateFieldState,\n access,\n type DateFieldState,\n type DateFieldStateProps,\n type DateSegment as DateSegmentType,\n type CalendarDate,\n type DateValue,\n} from \"@proyecto-viviana/solid-stately\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n dataAttr,\n useIsHydrated,\n Provider,\n} from \"./utils\";\nimport { TextContext } from \"./Text\";\nimport { FormContext, type FormProps } from \"./Form\";\nimport {\n DateRangePickerContext,\n type DateRangePickerFieldContextValue,\n} from \"./DateRangePickerContext\";\n\nexport interface DateFieldRenderProps {\n /** Whether the field is disabled. */\n isDisabled: boolean;\n /** Whether the field is read-only. */\n isReadOnly: boolean;\n /** Whether the field is required. */\n isRequired: boolean;\n /** Whether the field is invalid. */\n isInvalid: boolean;\n}\n\nexport interface DateFieldProps<T extends DateValue = DateValue>\n extends\n Omit<AriaDateFieldProps, \"id\" | \"isDisabled\" | \"isReadOnly\" | \"isRequired\">,\n Omit<DateFieldStateProps<T>, \"locale\">,\n SlotProps {\n /** The children of the component. */\n children?: JSX.Element | ((segment: DateSegmentType) => JSX.Element);\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateFieldRenderProps>;\n /** The locale to use for formatting. */\n locale?: string;\n}\n\nexport interface DateInputRenderProps {\n /** Whether the input is disabled. */\n isDisabled: boolean;\n /** Whether the input is focused. */\n isFocused: boolean;\n}\n\nexport interface DateInputProps extends SlotProps {\n /** The children of the component (render function receiving segments). */\n children?: (segment: DateSegmentType) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateInputRenderProps>;\n /** Handler called during the pointer down capture phase. */\n onPointerDownCapture?: JSX.EventHandler<HTMLDivElement, PointerEvent>;\n}\n\nexport interface DateSegmentRenderProps {\n /** Whether the segment is hovered. */\n isHovered: boolean;\n /** Whether the segment is focused. */\n isFocused: boolean;\n /** Whether the segment is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the segment is a placeholder. */\n isPlaceholder: boolean;\n /** Whether the segment is read only. */\n isReadOnly: boolean;\n /** Whether the segment is disabled. */\n isDisabled: boolean;\n /** Whether the segment is invalid. */\n isInvalid: boolean;\n /** The segment type. */\n type: DateSegmentType[\"type\"];\n /** The text to display. */\n text: string;\n}\n\nexport interface DateSegmentProps extends SlotProps {\n /** The segment data. */\n segment: DateSegmentType;\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<DateSegmentRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateSegmentRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateSegmentRenderProps>;\n}\n\nexport interface DateFieldContextValue {\n state: DateFieldState<DateValue>;\n aria: {\n labelProps: Record<string, unknown>;\n inputProps: Record<string, unknown>;\n // The hidden validation <input> props (native type/required/onChange). Only\n // the standalone DateField provides these; DatePicker/DateRangePicker manage\n // their own hidden inputs, so this stays optional and its <input> is gated.\n hiddenInputProps?: Record<string, unknown>;\n descriptionProps: Record<string, unknown>;\n errorMessageProps: Record<string, unknown>;\n };\n}\n\nexport const DateFieldContext = createContext<DateFieldContextValue | null>(null);\nexport const DateFieldStateContext = createContext<DateFieldState<DateValue> | null>(null);\n\nfunction withFormValidationBehavior<P extends object>(props: P, formContext: FormProps | null): P {\n if (!formContext?.validationBehavior) {\n return props;\n }\n\n return new Proxy(props, {\n get(target, property, receiver) {\n const localValue = Reflect.get(target, property, receiver);\n if (property === \"validationBehavior\" && localValue === undefined) {\n return formContext.validationBehavior;\n }\n\n return localValue;\n },\n has(target, property) {\n return (\n Reflect.has(target, property) ||\n (property === \"validationBehavior\" && formContext.validationBehavior !== undefined)\n );\n },\n ownKeys(target) {\n const keys = new Set(Reflect.ownKeys(target));\n if (formContext.validationBehavior !== undefined) {\n keys.add(\"validationBehavior\");\n }\n\n return Array.from(keys);\n },\n getOwnPropertyDescriptor(target, property) {\n const descriptor = Reflect.getOwnPropertyDescriptor(target, property);\n if (descriptor) {\n return descriptor;\n }\n\n if (property === \"validationBehavior\" && formContext.validationBehavior !== undefined) {\n return {\n enumerable: true,\n configurable: true,\n get: () => formContext.validationBehavior,\n };\n }\n\n return undefined;\n },\n });\n}\n\nexport function useDateFieldContext(): DateFieldContextValue {\n const context = useContext(DateFieldContext);\n if (!context) {\n throw new Error(\"DateField components must be used within a DateField\");\n }\n return context;\n}\n\nfunction useDateInputContext(\n slot?: string,\n): DateFieldContextValue | DateRangePickerFieldContextValue {\n const dateFieldContext = useContext(DateFieldContext);\n if (dateFieldContext) {\n return dateFieldContext;\n }\n\n const dateRangePickerContext = useContext(DateRangePickerContext);\n if (dateRangePickerContext && slot === \"start\") {\n return dateRangePickerContext.startFieldContext;\n }\n if (dateRangePickerContext && slot === \"end\") {\n return dateRangePickerContext.endFieldContext;\n }\n\n throw new Error(\"DateInput components must be used within a DateField or DateRangePicker slot\");\n}\n\n/**\n * A date field allows users to enter and edit date values using a keyboard.\n *\n * @example\n * ```tsx\n * <DateField label=\"Date\">\n * <Label>Date</Label>\n * <DateInput>\n * {(segment) => <DateSegment segment={segment} />}\n * </DateInput>\n * </DateField>\n * ```\n */\nexport function DateField<T extends DateValue = CalendarDate>(\n props: DateFieldProps<T>,\n): JSX.Element {\n // Use hydration-safe pattern for client-only rendering\n const isHydrated = useIsHydrated();\n const formContext = useContext(FormContext);\n\n return (\n <Show\n when={isHydrated()}\n fallback={\n <div class=\"solidaria-DateField solidaria-DateField--placeholder\" aria-hidden=\"true\" />\n }\n >\n <DateFieldInner {...props} __formContext={formContext} />\n </Show>\n );\n}\n\ntype DateFieldInnerProps<T extends DateValue = DateValue> = DateFieldProps<T> & {\n __formContext?: FormProps | null;\n};\n\n/**\n * Internal DateField component that renders after client mount.\n */\nfunction DateFieldInner<T extends DateValue = CalendarDate>(\n props: DateFieldInnerProps<T>,\n): JSX.Element {\n const formContext = props.__formContext ?? useContext(FormContext);\n const mergedProps = withFormValidationBehavior(props, formContext);\n const [local, stateProps, rest] = splitProps(\n mergedProps,\n [\"children\", \"class\", \"style\", \"slot\", \"__formContext\"],\n [\n \"value\",\n \"defaultValue\",\n \"onChange\",\n \"minValue\",\n \"maxValue\",\n \"isInvalid\",\n \"isDisabled\",\n \"isReadOnly\",\n \"isRequired\",\n \"locale\",\n \"granularity\",\n \"hourCycle\",\n \"hideTimeZone\",\n \"placeholderValue\",\n \"shouldForceLeadingZeros\",\n \"validationState\",\n \"validationBehavior\",\n \"validate\",\n \"description\",\n \"errorMessage\",\n \"isDateUnavailable\",\n ],\n );\n\n const [fieldRef, setFieldRef] = createSignal<HTMLDivElement | null>(null);\n // Ref to the hidden validation <input> (the DateInput's `<Input>` sibling).\n // RAC's DateField creates this ref, passes it to useDateField, and threads it\n // onto the <Input> via InputContext so useFormReset/useFormValidation target\n // that element. We mirror that: create it here, hand it to createDateField\n // below, and attach it to the same input through the context getter.\n const [validationInputRef, setValidationInputRef] = createSignal<HTMLInputElement | null>(null);\n\n const state = createDateFieldState(stateProps);\n\n const fieldAria = createDateField(\n () => ({\n ...(rest as Record<string, unknown>),\n // RAC threads the same props into both useDateFieldState and useDateField;\n // these live in `stateProps` here, so forward them so the field hook can\n // build aria-disabled and the native validation <input> (type/required).\n // access() unwraps the MaybeAccessor state-prop declarations.\n isDisabled: access(stateProps.isDisabled),\n isReadOnly: access(stateProps.isReadOnly),\n isRequired: access(stateProps.isRequired),\n // Mirror RAC DateField: validationBehavior ?? formValidationBehavior ??\n // 'native'. withFormValidationBehavior already folds the form default into\n // stateProps.validationBehavior; the last `?? 'native'` is the standalone\n // default that flips the hidden input to type=\"text\".\n validationBehavior: stateProps.validationBehavior ?? \"native\",\n description: stateProps.description,\n errorMessage: stateProps.errorMessage,\n // Form-reset + native constraint validation are wired onto this input by\n // createDateField (see its createFormReset/createFormValidation calls),\n // exactly as RAC's useDateField wires them onto props.inputRef.\n inputRef: () => validationInputRef() ?? undefined,\n }),\n state as unknown as DateFieldState<DateValue>,\n fieldRef,\n );\n\n const renderValues = createMemo<DateFieldRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isReadOnly: state.isReadOnly(),\n isRequired: state.isRequired(),\n isInvalid: state.isInvalid(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-DateField\",\n },\n renderValues,\n );\n\n const textSlots = {\n slots: {\n get description() {\n return fieldAria.descriptionProps;\n },\n get errorMessage() {\n return fieldAria.errorMessageProps;\n },\n },\n };\n\n return (\n <DateFieldStateContext.Provider value={state as unknown as DateFieldState<DateValue>}>\n <DateFieldContext.Provider\n value={{\n state: state as unknown as DateFieldState<DateValue>,\n // Read through getters so consumers see the LIVE memo values, not a\n // snapshot frozen at first render. `createDescription` appends the\n // value-description id via a deferred effect; the group's\n // aria-describedby only picks it up if the props stay reactive here.\n aria: {\n get labelProps() {\n return fieldAria.labelProps;\n },\n // The segment group props (role=\"group\", aria-labelledby, unicode-bidi\n // isolate style, arrow-key nav, focus-within handlers) are routed to the\n // DateInput element — mirroring RAC, where useDateField.fieldProps is\n // published through GroupContext and consumed by the DateInput <Group>.\n // The outer wrapper stays roleless.\n get inputProps() {\n return fieldAria.fieldProps;\n },\n // The REAL hidden validation input props (type/hidden/required/onChange\n // under native validation). Rendered as the DateInput's <input> sibling.\n // Thread the validation-input ref through here — mirroring RAC's\n // `[InputContext, {...inputProps, ref: inputRef}]` — so createDateField's\n // form-reset/validation wiring resolves to the mounted element.\n get hiddenInputProps() {\n return mergeProps(fieldAria.inputProps, { ref: setValidationInputRef });\n },\n get descriptionProps() {\n return fieldAria.descriptionProps;\n },\n get errorMessageProps() {\n return fieldAria.errorMessageProps;\n },\n },\n }}\n >\n <div\n ref={setFieldRef}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-readonly={dataAttr(state.isReadOnly())}\n data-required={dataAttr(state.isRequired())}\n data-invalid={dataAttr(state.isInvalid())}\n >\n <Provider values={[[TextContext, textSlots]] as Array<[Context<unknown>, unknown]>}>\n {local.children as JSX.Element}\n </Provider>\n </div>\n {/*\n RAC renders <HiddenDateInput> UNCONDITIONALLY at the DateField root\n (react-aria-components DateField.mjs). It is NOT a validation input — it\n is a clipped, aria-hidden, tabIndex={-1} native date input that mirrors\n the value for browser autofill. Its `form=\"\"` detaches it from form\n submission (the DateInput's <Input> above is what submits), so it never\n double-counts in FormData. It renders regardless of `name` — hence no\n <Show> gate — which is why it appears in the focus trail as the trailing\n tabindex=\"-1\" element.\n */}\n <RootHiddenDateInput\n autoComplete={(rest as Record<string, unknown>).autoComplete as string | undefined}\n name={(rest as Record<string, unknown>).name as string | undefined}\n isDisabled={state.isDisabled()}\n state={state as unknown as DateFieldState<DateValue>}\n />\n </DateFieldContext.Provider>\n </DateFieldStateContext.Provider>\n );\n}\n\nconst HIDDEN_DATE_SEGMENTS: readonly string[] = [\"day\", \"month\", \"year\"];\nconst HIDDEN_TIME_SEGMENTS: readonly string[] = [\"hour\", \"minute\", \"second\"];\nconst HIDDEN_GRANULARITY_MAP: Record<string, number> = { hour: 1, minute: 2, second: 3 };\n\ninterface RootHiddenDateInputProps {\n autoComplete?: string;\n name?: string;\n isDisabled?: boolean;\n state: DateFieldState<DateValue>;\n}\n\n/**\n * The always-rendered hidden date input at the DateField root — a faithful port\n * of react-aria-components' HiddenDateInput (private/HiddenDateInput.mjs). It is\n * NOT a validation input: it is a clipped, aria-hidden, tabIndex={-1} native\n * date input that mirrors the current value for browser autofill. `form=\"\"`\n * detaches it from form submission (the DateInput's <Input> submits), so it\n * never double-counts in FormData. RAC renders it unconditionally, which is why\n * it appears as the trailing tabindex=\"-1\" element in the focus trail.\n */\nfunction RootHiddenDateInput(props: RootHiddenDateInputProps): JSX.Element {\n // RAC uses useVisuallyHidden with position:fixed/top:0/left:0 to keep the\n // clipped input from scrolling the page.\n const { visuallyHiddenProps } = createVisuallyHidden(() => ({\n style: { position: \"fixed\", top: \"0\", left: \"0\" },\n }));\n\n const granularity = () => props.state.granularity ?? \"day\";\n const inputStep = () => {\n const g = granularity();\n if (g === \"second\") return 1;\n if (g === \"hour\") return 3600;\n return 60;\n };\n const inputType = () => (granularity() === \"day\" ? \"date\" : \"datetime-local\");\n const dateValue = () => {\n const value = props.state.value();\n if (!value) return \"\";\n if (granularity() === \"day\") return toCalendarDate(value).toString();\n return toCalendarDateTime(\"timeZone\" in value ? toLocalTimeZone(value) : value).toString();\n };\n\n const onChange: JSX.EventHandler<HTMLInputElement, Event> = (event) => {\n const targetString = (event.currentTarget.value ?? \"\").toString();\n if (!targetString) return;\n try {\n const g = granularity();\n const targetValue = (g === \"day\"\n ? parseDate(targetString)\n : parseDateTime(targetString)) as unknown as Record<string, number>;\n let timeSegments = HIDDEN_TIME_SEGMENTS;\n if (HIDDEN_TIME_SEGMENTS.includes(g)) {\n timeSegments = HIDDEN_TIME_SEGMENTS.slice(0, HIDDEN_GRANULARITY_MAP[g]);\n }\n const state = props.state as unknown as {\n setSegment?: (type: string, value: number) => void;\n setValue: (value: unknown) => void;\n };\n // Only DateFieldState (not DatePickerState) exposes setSegment; validate\n // each parsed segment before committing the new value, mirroring RAC.\n if (typeof state.setSegment === \"function\") {\n for (const type in targetValue) {\n if (HIDDEN_DATE_SEGMENTS.includes(type)) state.setSegment(type, targetValue[type]);\n if (timeSegments.includes(type)) state.setSegment(type, targetValue[type]);\n }\n }\n state.setValue(targetValue);\n } catch {\n // ignore unparseable autofill values\n }\n };\n\n return (\n <div\n {...(visuallyHiddenProps() as unknown as Record<string, unknown>)}\n aria-hidden=\"true\"\n data-testid=\"hidden-dateinput-container\"\n >\n <input\n tabIndex={-1}\n autocomplete={props.autoComplete}\n disabled={props.isDisabled}\n type={inputType()}\n form=\"\"\n name={props.name}\n step={inputStep()}\n value={dateValue()}\n onChange={onChange}\n />\n </div>\n );\n}\n\n/**\n * The input area containing date segments.\n */\nexport function DateInput(props: DateInputProps): JSX.Element {\n const context = useDateInputContext(props.slot);\n const { state, aria } = context;\n const [isFocused, setIsFocused] = createSignal(false);\n const [inputRef, setInputRef] = createSignal<HTMLDivElement | null>(null);\n\n const renderValues = createMemo<DateInputRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isFocused: isFocused(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: props.class,\n style: props.style,\n defaultClassName: \"solidaria-DateInput\",\n },\n renderValues,\n );\n\n // The group props (role=\"group\", aria-labelledby, unicode-bidi:isolate,\n // arrow-key nav, focus-within handlers) carry the field's own `style` and\n // focus handlers. Merge — not clobber — so the group keeps its unicode-bidi\n // isolation and the local isFocused signal chains onto the field's\n // focusWithin handlers. Solid onFocus/onBlur do not bubble, so track focus\n // via onFocusIn/onFocusOut.\n const inputDivProps = createMemo(() =>\n mergeProps(aria.inputProps, {\n onFocusIn: () => setIsFocused(true),\n onFocusOut: () => setIsFocused(false),\n style: renderProps.style(),\n }),\n );\n\n createEffect(() => {\n const element = inputRef();\n const handler = props.onPointerDownCapture;\n if (!element || !handler) return;\n\n const listener = (event: PointerEvent) =>\n (handler as unknown as (event: PointerEvent) => void)(event);\n element.addEventListener(\"pointerdown\", listener, { capture: true });\n onCleanup(() => element.removeEventListener(\"pointerdown\", listener, { capture: true }));\n });\n\n return (\n <DateFieldContext.Provider value={context as DateFieldContextValue}>\n <div\n ref={setInputRef}\n {...inputDivProps()}\n class={renderProps.class()}\n data-disabled={dataAttr(state.isDisabled())}\n data-focused={dataAttr(isFocused())}\n >\n {/*\n <Index> keys by position, not identity, so each DateSegment instance\n stays alive across keystrokes (state.segments() re-mints segment\n objects every edit). A stable Proxy forwards property reads to the\n live per-index accessor so the child stays reactive.\n */}\n <Index each={state.segments()}>\n {(segment) => {\n const liveSegment = new Proxy({} as DateSegmentType, {\n get: (_t, key) => (segment() as unknown as Record<PropertyKey, unknown>)[key],\n has: (_t, key) => key in (segment() as object),\n });\n return props.children?.(liveSegment);\n }}\n </Index>\n </div>\n {/*\n The hidden validation input, sibling of the group — mirrors RAC's\n DateInputInner `<><Group/><Input/></>`. Under native validation\n (default) `useDateField` publishes it as `type=\"text\" hidden required`\n so browser constraint validation fires; under aria validation it stays\n `type=\"hidden\"`. Both carry the ISO value string. Only the standalone\n DateField supplies these props; inside a DatePicker/DateRangePicker the\n field is presentation and its owner renders the hidden input instead.\n */}\n <Show when={aria.hiddenInputProps}>\n {(hiddenInputProps) => (\n <input {...(hiddenInputProps() as JSX.InputHTMLAttributes<HTMLInputElement>)} />\n )}\n </Show>\n </DateFieldContext.Provider>\n );\n}\n\n/**\n * A segment of a date field (year, month, day, etc.).\n */\nexport function DateSegment(props: DateSegmentProps): JSX.Element {\n const { state } = useDateFieldContext();\n const [segmentRef, setSegmentRef] = createSignal<HTMLElement | null>(null);\n\n const segmentAria = createDateSegment(\n {\n get segment() {\n return props.segment;\n },\n },\n state,\n segmentRef,\n );\n\n // Mirror upstream DateSegment: focus/focus-visible come from useFocusRing()\n // and hover from useHover({isDisabled: field disabled || literal segment}).\n // Literals never hover; the field being disabled suppresses hover entirely.\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n const { isHovered, hoverProps } = createHover(() => ({\n isDisabled: state.isDisabled() || props.segment.type === \"literal\",\n }));\n\n const renderValues = createMemo<DateSegmentRenderProps>(() => ({\n isHovered: isHovered(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isPlaceholder: props.segment.isPlaceholder,\n isReadOnly: state.isReadOnly(),\n isDisabled: state.isDisabled(),\n isInvalid: state.isInvalid(),\n type: props.segment.type,\n text: props.segment.text,\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: props.class,\n style: props.style,\n defaultClassName: \"solidaria-DateSegment\",\n },\n renderValues,\n );\n\n // Determine children content - avoid Show for SSR hydration compatibility\n const getChildren = () => {\n if (typeof props.children === \"function\") {\n return renderProps.renderChildren();\n }\n return props.segment.text;\n };\n\n // Mirror upstream's `mergeProps(filterDOMProps(otherProps), segmentProps,\n // focusProps, hoverProps)`: the segment's behavior/style props (caretColor +\n // RTL direction) chain with the focus-ring and hover handlers so neither\n // clobbers the other.\n const segmentElementProps = createMemo(() =>\n mergeProps(\n segmentAria.segmentProps,\n focusProps as Record<string, unknown>,\n hoverProps as Record<string, unknown>,\n {\n style: renderProps.style(),\n },\n ),\n );\n\n return (\n <span\n ref={setSegmentRef}\n {...segmentElementProps()}\n class={renderProps.class()}\n data-placeholder={props.segment.isPlaceholder || undefined}\n data-invalid={state.isInvalid() || undefined}\n data-readonly={state.isReadOnly() || undefined}\n data-disabled={state.isDisabled() || undefined}\n data-type={props.segment.type}\n data-hovered={isHovered() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n >\n {getChildren()}\n </span>\n );\n}\n\nexport interface DateFieldLabelProps {\n children?: JSX.Element;\n class?: string;\n}\n\nexport function DateFieldLabel(props: DateFieldLabelProps): JSX.Element {\n const { aria } = useDateFieldContext();\n return (\n <span {...aria.labelProps} class={props.class}>\n {props.children}\n </span>\n );\n}\n\nexport interface DateFieldDescriptionProps {\n children?: JSX.Element;\n class?: string;\n}\n\nexport function DateFieldDescription(props: DateFieldDescriptionProps): JSX.Element {\n const { aria } = useDateFieldContext();\n return (\n <span {...aria.descriptionProps} class={props.class}>\n {props.children}\n </span>\n );\n}\n\nexport interface DateFieldErrorMessageProps {\n children?: JSX.Element;\n class?: string;\n}\n\nexport function DateFieldErrorMessage(props: DateFieldErrorMessageProps): JSX.Element {\n const { aria } = useDateFieldContext();\n return (\n <span {...aria.errorMessageProps} class={props.class}>\n {props.children}\n </span>\n );\n}\n\nexport type { DateFieldState, DateSegmentType };\n"],"mappings":";;;;;;;;;AAqCA,MAAagC,yBAAyBhC,cAAkD,IAAI;AAE5F,SAAgBiC,4BAAyD;CACvE,MAAMC,UAAUjC,WAAW+B,sBAAsB;CACjD,IAAI,CAACE,SACH,MAAM,IAAIC,MAAM,kEAAkE;CAEpF,OAAOD;AACT;;;;;;;;;;AC2GA,MAAamF,mBAAmB/E,cAA4C,IAAI;AAChF,MAAagF,wBAAwBhF,cAAgD,IAAI;AAEzF,SAASiF,2BAA6CC,OAAUE,aAAkC;CAChG,IAAI,CAACA,aAAaC,oBAChB,OAAOH;CAGT,OAAO,IAAII,MAAMJ,OAAO;EACtBK,IAAIC,QAAQC,UAAUC,UAAU;GAC9B,MAAMC,aAAaC,QAAQL,IAAIC,QAAQC,UAAUC,QAAQ;GACzD,IAAID,aAAa,wBAAwBE,eAAeE,KAAAA,GACtD,OAAOT,YAAYC;GAGrB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