@proyecto-viviana/solidaria-components 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/dist/ActionBar.d.ts.map +1 -1
  2. package/dist/ActionBar.js +2 -11
  3. package/dist/ActionBar.js.map +1 -1
  4. package/dist/ActionBar.jsx +2 -11
  5. package/dist/ActionBar.jsx.map +1 -1
  6. package/dist/ActionGroup.d.ts.map +1 -1
  7. package/dist/ActionGroup.js +1 -1
  8. package/dist/ActionGroup.js.map +1 -1
  9. package/dist/ActionGroup.jsx +1 -1
  10. package/dist/ActionGroup.jsx.map +1 -1
  11. package/dist/Autocomplete.d.ts +2 -2
  12. package/dist/Autocomplete.d.ts.map +1 -1
  13. package/dist/Autocomplete.js +7 -7
  14. package/dist/Autocomplete.js.map +1 -1
  15. package/dist/Autocomplete.jsx +7 -7
  16. package/dist/Autocomplete.jsx.map +1 -1
  17. package/dist/Breadcrumbs.d.ts.map +1 -1
  18. package/dist/Breadcrumbs.js +18 -18
  19. package/dist/Breadcrumbs.js.map +1 -1
  20. package/dist/Breadcrumbs.jsx +21 -26
  21. package/dist/Breadcrumbs.jsx.map +1 -1
  22. package/dist/Calendar.d.ts.map +1 -1
  23. package/dist/Calendar.js +100 -65
  24. package/dist/Calendar.js.map +1 -1
  25. package/dist/Calendar.jsx +10 -1
  26. package/dist/Calendar.jsx.map +1 -1
  27. package/dist/Color.d.ts.map +1 -1
  28. package/dist/Color.js +15 -18
  29. package/dist/Color.js.map +1 -1
  30. package/dist/Color.jsx +15 -19
  31. package/dist/Color.jsx.map +1 -1
  32. package/dist/ComboBox.d.ts +4 -0
  33. package/dist/ComboBox.d.ts.map +1 -1
  34. package/dist/ComboBox.js +21 -13
  35. package/dist/ComboBox.js.map +1 -1
  36. package/dist/ComboBox.jsx +23 -13
  37. package/dist/ComboBox.jsx.map +1 -1
  38. package/dist/DateField.d.ts +11 -2
  39. package/dist/DateField.d.ts.map +1 -1
  40. package/dist/DateField2.js +237 -234
  41. package/dist/DateField2.js.map +1 -1
  42. package/dist/DateField2.jsx +134 -97
  43. package/dist/DateField2.jsx.map +1 -1
  44. package/dist/DatePicker.d.ts +42 -3
  45. package/dist/DatePicker.d.ts.map +1 -1
  46. package/dist/DatePicker.js +6 -990
  47. package/dist/DatePicker.jsx +6 -681
  48. package/dist/DatePicker2.js +1171 -0
  49. package/dist/DatePicker2.js.map +1 -0
  50. package/dist/DatePicker2.jsx +820 -0
  51. package/dist/DatePicker2.jsx.map +1 -0
  52. package/dist/DateRangePickerContext.d.ts +2 -0
  53. package/dist/DateRangePickerContext.d.ts.map +1 -1
  54. package/dist/Disclosure.d.ts.map +1 -1
  55. package/dist/Disclosure.js +3 -0
  56. package/dist/Disclosure.js.map +1 -1
  57. package/dist/Disclosure.jsx +1 -1
  58. package/dist/Disclosure.jsx.map +1 -1
  59. package/dist/ElementTag.d.ts +29 -0
  60. package/dist/ElementTag.d.ts.map +1 -0
  61. package/dist/ElementTag.js +220 -0
  62. package/dist/ElementTag.js.map +1 -0
  63. package/dist/ElementTag.jsx +67 -0
  64. package/dist/ElementTag.jsx.map +1 -0
  65. package/dist/GridList.d.ts.map +1 -1
  66. package/dist/GridList.js +2 -2
  67. package/dist/GridList.js.map +1 -1
  68. package/dist/GridList.jsx +2 -2
  69. package/dist/GridList.jsx.map +1 -1
  70. package/dist/Landmark.js +4 -3
  71. package/dist/Landmark.js.map +1 -1
  72. package/dist/Landmark.jsx +3 -3
  73. package/dist/Landmark.jsx.map +1 -1
  74. package/dist/Link.js +3 -2
  75. package/dist/Link.js.map +1 -1
  76. package/dist/Link.jsx +3 -3
  77. package/dist/Link.jsx.map +1 -1
  78. package/dist/ListBox.d.ts +2 -2
  79. package/dist/ListBox.d.ts.map +1 -1
  80. package/dist/ListBox.js +327 -166
  81. package/dist/ListBox.js.map +1 -1
  82. package/dist/ListBox.jsx +161 -25
  83. package/dist/ListBox.jsx.map +1 -1
  84. package/dist/Modal.d.ts.map +1 -1
  85. package/dist/Modal.js +7 -5
  86. package/dist/Modal.js.map +1 -1
  87. package/dist/Modal.jsx +5 -5
  88. package/dist/Modal.jsx.map +1 -1
  89. package/dist/Popover.d.ts.map +1 -1
  90. package/dist/Popover.js +16 -9
  91. package/dist/Popover.js.map +1 -1
  92. package/dist/Popover.jsx +25 -4
  93. package/dist/Popover.jsx.map +1 -1
  94. package/dist/RangeCalendar.d.ts.map +1 -1
  95. package/dist/RangeCalendar.js +182 -46
  96. package/dist/RangeCalendar.js.map +1 -1
  97. package/dist/RangeCalendar.jsx +72 -2
  98. package/dist/RangeCalendar.jsx.map +1 -1
  99. package/dist/SearchField.d.ts.map +1 -1
  100. package/dist/SearchField.js +26 -2
  101. package/dist/SearchField.js.map +1 -1
  102. package/dist/SearchField.jsx +26 -2
  103. package/dist/SearchField.jsx.map +1 -1
  104. package/dist/Select.d.ts +7 -0
  105. package/dist/Select.d.ts.map +1 -1
  106. package/dist/Select.js +64 -51
  107. package/dist/Select.js.map +1 -1
  108. package/dist/Select.jsx +35 -20
  109. package/dist/Select.jsx.map +1 -1
  110. package/dist/Separator.js +3 -2
  111. package/dist/Separator.js.map +1 -1
  112. package/dist/Separator.jsx +2 -2
  113. package/dist/Separator.jsx.map +1 -1
  114. package/dist/SharedElementTransition.d.ts.map +1 -1
  115. package/dist/SharedElementTransition.js +35 -33
  116. package/dist/SharedElementTransition.js.map +1 -1
  117. package/dist/SharedElementTransition.jsx +35 -33
  118. package/dist/SharedElementTransition.jsx.map +1 -1
  119. package/dist/StepList.d.ts.map +1 -1
  120. package/dist/StepList.js +2 -9
  121. package/dist/StepList.js.map +1 -1
  122. package/dist/StepList.jsx +1 -6
  123. package/dist/StepList.jsx.map +1 -1
  124. package/dist/Table.d.ts +2 -0
  125. package/dist/Table.d.ts.map +1 -1
  126. package/dist/Table.js +10 -3
  127. package/dist/Table.js.map +1 -1
  128. package/dist/Table.jsx +10 -3
  129. package/dist/Table.jsx.map +1 -1
  130. package/dist/Tabs.d.ts.map +1 -1
  131. package/dist/Tabs.js +3 -0
  132. package/dist/Tabs.js.map +1 -1
  133. package/dist/Tabs.jsx +1 -1
  134. package/dist/Tabs.jsx.map +1 -1
  135. package/dist/TagGroup.d.ts +3 -1
  136. package/dist/TagGroup.d.ts.map +1 -1
  137. package/dist/TagGroup.js +12 -8
  138. package/dist/TagGroup.js.map +1 -1
  139. package/dist/TagGroup.jsx +11 -8
  140. package/dist/TagGroup.jsx.map +1 -1
  141. package/dist/Text.d.ts.map +1 -1
  142. package/dist/Text.js +9 -8
  143. package/dist/Text.js.map +1 -1
  144. package/dist/Text.jsx +3 -3
  145. package/dist/Text.jsx.map +1 -1
  146. package/dist/TextField.js +4 -1
  147. package/dist/TextField.js.map +1 -1
  148. package/dist/TextField.jsx +4 -1
  149. package/dist/TextField.jsx.map +1 -1
  150. package/dist/TimeField.d.ts +14 -50
  151. package/dist/TimeField.d.ts.map +1 -1
  152. package/dist/TimeField.js +111 -205
  153. package/dist/TimeField.js.map +1 -1
  154. package/dist/TimeField.jsx +76 -82
  155. package/dist/TimeField.jsx.map +1 -1
  156. package/dist/Tree.d.ts.map +1 -1
  157. package/dist/Tree.js +3 -3
  158. package/dist/Tree.js.map +1 -1
  159. package/dist/Tree.jsx +3 -3
  160. package/dist/Tree.jsx.map +1 -1
  161. package/dist/VisuallyHidden.d.ts.map +1 -1
  162. package/dist/VisuallyHidden.js +3 -11
  163. package/dist/VisuallyHidden.js.map +1 -1
  164. package/dist/VisuallyHidden.jsx +3 -4
  165. package/dist/VisuallyHidden.jsx.map +1 -1
  166. package/dist/index.d.ts +3 -3
  167. package/dist/index.d.ts.map +1 -1
  168. package/dist/index.js +6 -6
  169. package/dist/index.jsx +6 -6
  170. package/dist/useDragAndDrop.d.ts +0 -8
  171. package/dist/useDragAndDrop.d.ts.map +1 -1
  172. package/dist/useDragAndDrop2.js +6 -2
  173. package/dist/useDragAndDrop2.js.map +1 -1
  174. package/dist/useDragAndDrop2.jsx +6 -2
  175. package/dist/useDragAndDrop2.jsx.map +1 -1
  176. package/dist/utils.d.ts +1 -0
  177. package/dist/utils.d.ts.map +1 -1
  178. package/dist/utils.js +2 -2
  179. package/dist/utils.js.map +1 -1
  180. package/dist/utils.jsx +2 -2
  181. package/dist/utils.jsx.map +1 -1
  182. package/package.json +3 -9
  183. package/src/ActionBar.tsx +10 -12
  184. package/src/ActionGroup.tsx +5 -3
  185. package/src/Autocomplete.tsx +14 -9
  186. package/src/Breadcrumbs.tsx +57 -42
  187. package/src/Calendar.tsx +30 -1
  188. package/src/Color.tsx +42 -27
  189. package/src/ComboBox.tsx +49 -17
  190. package/src/DateField.tsx +285 -52
  191. package/src/DatePicker.tsx +345 -57
  192. package/src/DateRangePickerContext.tsx +2 -0
  193. package/src/Disclosure.tsx +4 -0
  194. package/src/ElementTag.tsx +116 -0
  195. package/src/GridList.tsx +8 -2
  196. package/src/Landmark.tsx +4 -4
  197. package/src/Link.tsx +4 -4
  198. package/src/ListBox.tsx +323 -21
  199. package/src/Modal.tsx +21 -5
  200. package/src/Popover.tsx +28 -7
  201. package/src/RangeCalendar.tsx +120 -1
  202. package/src/SearchField.tsx +53 -1
  203. package/src/Select.tsx +114 -22
  204. package/src/Separator.tsx +3 -3
  205. package/src/SharedElementTransition.tsx +92 -36
  206. package/src/StepList.tsx +0 -7
  207. package/src/Table.tsx +19 -4
  208. package/src/Tabs.tsx +1 -0
  209. package/src/TagGroup.tsx +26 -6
  210. package/src/Text.tsx +5 -4
  211. package/src/TextField.tsx +1 -1
  212. package/src/TimeField.tsx +113 -196
  213. package/src/Tree.tsx +14 -4
  214. package/src/VisuallyHidden.tsx +8 -12
  215. package/src/index.ts +3 -8
  216. package/src/useDragAndDrop.ts +8 -10
  217. package/src/utils.tsx +3 -3
  218. package/dist/DatePicker.js.map +0 -1
  219. package/dist/DatePicker.jsx.map +0 -1
  220. package/dist/HiddenTimeInput.d.ts +0 -25
  221. package/dist/HiddenTimeInput.d.ts.map +0 -1
  222. package/dist/HiddenTimeInput.js +0 -104
  223. package/dist/HiddenTimeInput.js.map +0 -1
  224. package/dist/HiddenTimeInput.jsx +0 -69
  225. package/dist/HiddenTimeInput.jsx.map +0 -1
  226. package/src/HiddenTimeInput.tsx +0 -133
@@ -1 +1 @@
1
- {"version":3,"file":"Landmark.js","names":["JSX","createContext","createMemo","createSignal","splitProps","Dynamic","createLandmark","getLandmarkController","AriaLandmarkProps","AriaLandmarkRole","LandmarkController","SlotProps","filterDOMProps","LandmarkRenderProps","role","LandmarkProps","elementType","IntrinsicElements","class","renderProps","style","CSSProperties","children","Element","LandmarkContext","roleToSemanticElement","Partial","Record","main","navigation","search","banner","contentinfo","complementary","form","region","Landmark","props","local","ariaProps","ref","setRef","HTMLElement","landmarkAria","aria-label","aria-labelledby","id","focus","renderValues","resolvedClass","cls","resolvedStyle","domProps","global","_$createComponent","_$mergeProps","component","landmarkProps","slot","useLandmarkController"],"sources":["../src/Landmark.tsx"],"sourcesContent":["/**\n * Landmark component for solidaria-components\n *\n * Pre-wired headless landmark component that combines aria hooks.\n * Enables F6 keyboard navigation between major page sections.\n */\n\nimport { type JSX, createContext, createMemo, createSignal, splitProps } from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport {\n createLandmark,\n getLandmarkController,\n type AriaLandmarkProps,\n type AriaLandmarkRole,\n type LandmarkController,\n} from \"@proyecto-viviana/solidaria\";\nimport { type SlotProps, filterDOMProps } from \"./utils\";\n\nexport interface LandmarkRenderProps {\n /** The ARIA landmark role. */\n role: AriaLandmarkRole;\n}\n\nexport interface LandmarkProps extends AriaLandmarkProps, SlotProps {\n /**\n * The HTML element type to render.\n * @default 'div' (or semantic element based on role)\n */\n elementType?: keyof JSX.IntrinsicElements;\n /** The CSS className for the element. A function may be provided to receive render props. */\n class?: string | ((renderProps: LandmarkRenderProps) => string);\n /** The inline style for the element. A function may be provided to receive render props. */\n style?: JSX.CSSProperties | ((renderProps: LandmarkRenderProps) => JSX.CSSProperties);\n /** Children content. */\n children?: JSX.Element;\n}\n\nexport type { AriaLandmarkRole, LandmarkController };\n\nexport const LandmarkContext = createContext<LandmarkProps | null>(null);\n\n/**\n * Maps ARIA landmark roles to their semantic HTML elements.\n * Using semantic elements is preferred when possible.\n */\nconst roleToSemanticElement: Partial<Record<AriaLandmarkRole, keyof JSX.IntrinsicElements>> = {\n main: \"main\",\n navigation: \"nav\",\n search: \"search\", // HTML5.3 <search> element\n banner: \"header\",\n contentinfo: \"footer\",\n complementary: \"aside\",\n form: \"form\",\n region: \"section\",\n};\n\n/**\n * A landmark is a region of the page that helps screen reader users navigate.\n * Press F6 to cycle through landmarks, or Shift+F6 to go backwards.\n *\n * @example\n * ```tsx\n * // Main content area\n * <Landmark role=\"main\" aria-label=\"Main content\">\n * <h1>Welcome</h1>\n * <p>Page content here...</p>\n * </Landmark>\n *\n * // Navigation\n * <Landmark role=\"navigation\" aria-label=\"Primary navigation\">\n * <nav>...</nav>\n * </Landmark>\n *\n * // Search\n * <Landmark role=\"search\" aria-label=\"Site search\">\n * <form>...</form>\n * </Landmark>\n *\n * // Custom element type\n * <Landmark role=\"region\" aria-label=\"Featured content\" elementType=\"div\">\n * ...\n * </Landmark>\n * ```\n */\nexport function Landmark(props: LandmarkProps): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n \"class\",\n \"style\",\n \"slot\",\n \"children\",\n \"elementType\",\n ]);\n\n // Element ref\n const [ref, setRef] = createSignal<HTMLElement>();\n\n // Determine the element type - use semantic element for the role if not specified\n const elementType = createMemo(() => {\n if (local.elementType) {\n return local.elementType;\n }\n return roleToSemanticElement[ariaProps.role] ?? \"div\";\n });\n\n // Create landmark aria props\n const landmarkAria = createLandmark(\n {\n get role() {\n return ariaProps.role;\n },\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"];\n },\n get \"aria-labelledby\"() {\n return ariaProps[\"aria-labelledby\"];\n },\n get id() {\n return ariaProps.id;\n },\n get focus() {\n return ariaProps.focus;\n },\n },\n ref,\n );\n\n const renderValues = createMemo<LandmarkRenderProps>(() => ({\n role: ariaProps.role,\n }));\n\n const resolvedClass = createMemo(() => {\n const cls = local.class;\n if (typeof cls === \"function\") {\n return cls(renderValues());\n }\n return cls ?? `solidaria-Landmark solidaria-Landmark--${ariaProps.role}`;\n });\n\n const resolvedStyle = createMemo(() => {\n const style = local.style;\n if (typeof style === \"function\") {\n return style(renderValues());\n }\n return style;\n });\n\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n return (\n <Dynamic\n component={elementType()}\n ref={setRef}\n {...domProps()}\n {...landmarkAria.landmarkProps}\n class={resolvedClass()}\n style={resolvedStyle()}\n slot={local.slot}\n >\n {props.children}\n </Dynamic>\n );\n}\n\n/**\n * Returns a controller for programmatic landmark navigation.\n *\n * @example\n * ```tsx\n * const controller = useLandmarkController();\n *\n * <button onClick={() => controller.focusMain()}>Skip to main content</button>\n * <button onClick={() => controller.focusNext()}>Next landmark</button>\n * ```\n */\nexport function useLandmarkController(): LandmarkController {\n return getLandmarkController();\n}\n"],"mappings":";;;;;;;;;;;AAuCA,MAAawB,kBAAkBvB,cAAoC,IAAI;;;;;AAMvE,MAAMwB,wBAAwF;CAC5FG,MAAM;CACNC,YAAY;CACZC,QAAQ;CACRC,QAAQ;CACRC,aAAa;CACbC,eAAe;CACfC,MAAM;CACNC,QAAQ;AACV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAAgBC,SAASC,OAAmC;CAC1D,MAAM,CAACC,OAAOC,aAAanC,WAAWiC,OAAO;EAC3C;EACA;EACA;EACA;EACA;CAAa,CACd;CAGD,MAAM,CAACG,KAAKC,UAAUtC,aAA0B;CAGhD,MAAMa,cAAcd,iBAAiB;EACnC,IAAIoC,MAAMtB,aACR,OAAOsB,MAAMtB;EAEf,OAAOS,sBAAsBc,UAAUzB,SAAS;CAClD,CAAC;CAGD,MAAM6B,eAAerC,eACnB;EACE,IAAIQ,OAAO;GACT,OAAOyB,UAAUzB;EACnB;EACA,IAAI,eAAe;GACjB,OAAOyB,UAAU;EACnB;EACA,IAAI,oBAAoB;GACtB,OAAOA,UAAU;EACnB;EACA,IAAIO,KAAK;GACP,OAAOP,UAAUO;EACnB;EACA,IAAIC,QAAQ;GACV,OAAOR,UAAUQ;EACnB;CACF,GACAP,GACF;CAEA,MAAMQ,eAAe9C,kBAAuC,EAC1DY,MAAMyB,UAAUzB,KAClB,EAAE;CAEF,MAAMmC,gBAAgB/C,iBAAiB;EACrC,MAAMgD,MAAMZ,MAAMpB;EAClB,IAAI,OAAOgC,QAAQ,YACjB,OAAOA,IAAIF,aAAa,CAAC;EAE3B,OAAOE,OAAO,0CAA0CX,UAAUzB;CACpE,CAAC;CAED,MAAMqC,gBAAgBjD,iBAAiB;EACrC,MAAMkB,QAAQkB,MAAMlB;EACpB,IAAI,OAAOA,UAAU,YACnB,OAAOA,MAAM4B,aAAa,CAAC;EAE7B,OAAO5B;CACT,CAAC;CAED,MAAMgC,WAAWlD,iBAAiBU,eAAe2B,WAAW,EAAEc,QAAQ,KAAK,CAAC,CAAC;CAE7E,OAAAC,gBACGjD,SAAOkD,WAAA;EAAA,IACNC,YAAS;GAAA,OAAExC,YAAY;EAAC;EAAAwB,KACnBC;CAAM,GACPW,gBACAT,aAAac,eAAa;EAAA,KAAA,WAAA;GAAA,OACvBR,cAAc;EAAC;EAAA,IACtB7B,QAAK;GAAA,OAAE+B,cAAc;EAAC;EAAA,IACtBO,OAAI;GAAA,OAAEpB,MAAMoB;EAAI;EAAA,IAAApC,WAAA;GAAA,OAEfe,MAAMf;EAAQ;CAAA,CAAA,CAAA;AAGrB;;;;;;;;;;;;AAaA,SAAgBqC,wBAA4C;CAC1D,OAAOpD,sBAAsB;AAC/B"}
1
+ {"version":3,"file":"Landmark.js","names":["JSX","createContext","createMemo","createSignal","splitProps","ElementTag","createLandmark","getLandmarkController","AriaLandmarkProps","AriaLandmarkRole","LandmarkController","SlotProps","filterDOMProps","LandmarkRenderProps","role","LandmarkProps","elementType","IntrinsicElements","class","renderProps","style","CSSProperties","children","Element","LandmarkContext","roleToSemanticElement","Partial","Record","main","navigation","search","banner","contentinfo","complementary","form","region","Landmark","props","local","ariaProps","ref","setRef","HTMLElement","landmarkAria","aria-label","aria-labelledby","id","focus","renderValues","resolvedClass","cls","resolvedStyle","domProps","global","_$createComponent","_$mergeProps","tag","landmarkProps","slot","useLandmarkController"],"sources":["../src/Landmark.tsx"],"sourcesContent":["/**\n * Landmark component for solidaria-components\n *\n * Pre-wired headless landmark component that combines aria hooks.\n * Enables F6 keyboard navigation between major page sections.\n */\n\nimport { type JSX, createContext, createMemo, createSignal, splitProps } from \"solid-js\";\nimport { ElementTag } from \"./ElementTag\";\nimport {\n createLandmark,\n getLandmarkController,\n type AriaLandmarkProps,\n type AriaLandmarkRole,\n type LandmarkController,\n} from \"@proyecto-viviana/solidaria\";\nimport { type SlotProps, filterDOMProps } from \"./utils\";\n\nexport interface LandmarkRenderProps {\n /** The ARIA landmark role. */\n role: AriaLandmarkRole;\n}\n\nexport interface LandmarkProps extends AriaLandmarkProps, SlotProps {\n /**\n * The HTML element type to render.\n * @default 'div' (or semantic element based on role)\n */\n elementType?: keyof JSX.IntrinsicElements;\n /** The CSS className for the element. A function may be provided to receive render props. */\n class?: string | ((renderProps: LandmarkRenderProps) => string);\n /** The inline style for the element. A function may be provided to receive render props. */\n style?: JSX.CSSProperties | ((renderProps: LandmarkRenderProps) => JSX.CSSProperties);\n /** Children content. */\n children?: JSX.Element;\n}\n\nexport type { AriaLandmarkRole, LandmarkController };\n\nexport const LandmarkContext = createContext<LandmarkProps | null>(null);\n\n/**\n * Maps ARIA landmark roles to their semantic HTML elements.\n * Using semantic elements is preferred when possible.\n */\nconst roleToSemanticElement: Partial<Record<AriaLandmarkRole, keyof JSX.IntrinsicElements>> = {\n main: \"main\",\n navigation: \"nav\",\n search: \"search\", // HTML5.3 <search> element\n banner: \"header\",\n contentinfo: \"footer\",\n complementary: \"aside\",\n form: \"form\",\n region: \"section\",\n};\n\n/**\n * A landmark is a region of the page that helps screen reader users navigate.\n * Press F6 to cycle through landmarks, or Shift+F6 to go backwards.\n *\n * @example\n * ```tsx\n * // Main content area\n * <Landmark role=\"main\" aria-label=\"Main content\">\n * <h1>Welcome</h1>\n * <p>Page content here...</p>\n * </Landmark>\n *\n * // Navigation\n * <Landmark role=\"navigation\" aria-label=\"Primary navigation\">\n * <nav>...</nav>\n * </Landmark>\n *\n * // Search\n * <Landmark role=\"search\" aria-label=\"Site search\">\n * <form>...</form>\n * </Landmark>\n *\n * // Custom element type\n * <Landmark role=\"region\" aria-label=\"Featured content\" elementType=\"div\">\n * ...\n * </Landmark>\n * ```\n */\nexport function Landmark(props: LandmarkProps): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n \"class\",\n \"style\",\n \"slot\",\n \"children\",\n \"elementType\",\n ]);\n\n // Element ref\n const [ref, setRef] = createSignal<HTMLElement>();\n\n // Determine the element type - use semantic element for the role if not specified\n const elementType = createMemo(() => {\n if (local.elementType) {\n return local.elementType;\n }\n return roleToSemanticElement[ariaProps.role] ?? \"div\";\n });\n\n // Create landmark aria props\n const landmarkAria = createLandmark(\n {\n get role() {\n return ariaProps.role;\n },\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"];\n },\n get \"aria-labelledby\"() {\n return ariaProps[\"aria-labelledby\"];\n },\n get id() {\n return ariaProps.id;\n },\n get focus() {\n return ariaProps.focus;\n },\n },\n ref,\n );\n\n const renderValues = createMemo<LandmarkRenderProps>(() => ({\n role: ariaProps.role,\n }));\n\n const resolvedClass = createMemo(() => {\n const cls = local.class;\n if (typeof cls === \"function\") {\n return cls(renderValues());\n }\n return cls ?? `solidaria-Landmark solidaria-Landmark--${ariaProps.role}`;\n });\n\n const resolvedStyle = createMemo(() => {\n const style = local.style;\n if (typeof style === \"function\") {\n return style(renderValues());\n }\n return style;\n });\n\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n return (\n <ElementTag\n tag={elementType()}\n ref={setRef}\n {...domProps()}\n {...landmarkAria.landmarkProps}\n class={resolvedClass()}\n style={resolvedStyle()}\n slot={local.slot}\n >\n {props.children}\n </ElementTag>\n );\n}\n\n/**\n * Returns a controller for programmatic landmark navigation.\n *\n * @example\n * ```tsx\n * const controller = useLandmarkController();\n *\n * <button onClick={() => controller.focusMain()}>Skip to main content</button>\n * <button onClick={() => controller.focusNext()}>Next landmark</button>\n * ```\n */\nexport function useLandmarkController(): LandmarkController {\n return getLandmarkController();\n}\n"],"mappings":";;;;;;;;;;;;AAuCA,MAAawB,kBAAkBvB,cAAoC,IAAI;;;;;AAMvE,MAAMwB,wBAAwF;CAC5FG,MAAM;CACNC,YAAY;CACZC,QAAQ;CACRC,QAAQ;CACRC,aAAa;CACbC,eAAe;CACfC,MAAM;CACNC,QAAQ;AACV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAAgBC,SAASC,OAAmC;CAC1D,MAAM,CAACC,OAAOC,aAAanC,WAAWiC,OAAO;EAC3C;EACA;EACA;EACA;EACA;CAAa,CACd;CAGD,MAAM,CAACG,KAAKC,UAAUtC,aAA0B;CAGhD,MAAMa,cAAcd,iBAAiB;EACnC,IAAIoC,MAAMtB,aACR,OAAOsB,MAAMtB;EAEf,OAAOS,sBAAsBc,UAAUzB,SAAS;CAClD,CAAC;CAGD,MAAM6B,eAAerC,eACnB;EACE,IAAIQ,OAAO;GACT,OAAOyB,UAAUzB;EACnB;EACA,IAAI,eAAe;GACjB,OAAOyB,UAAU;EACnB;EACA,IAAI,oBAAoB;GACtB,OAAOA,UAAU;EACnB;EACA,IAAIO,KAAK;GACP,OAAOP,UAAUO;EACnB;EACA,IAAIC,QAAQ;GACV,OAAOR,UAAUQ;EACnB;CACF,GACAP,GACF;CAEA,MAAMQ,eAAe9C,kBAAuC,EAC1DY,MAAMyB,UAAUzB,KAClB,EAAE;CAEF,MAAMmC,gBAAgB/C,iBAAiB;EACrC,MAAMgD,MAAMZ,MAAMpB;EAClB,IAAI,OAAOgC,QAAQ,YACjB,OAAOA,IAAIF,aAAa,CAAC;EAE3B,OAAOE,OAAO,0CAA0CX,UAAUzB;CACpE,CAAC;CAED,MAAMqC,gBAAgBjD,iBAAiB;EACrC,MAAMkB,QAAQkB,MAAMlB;EACpB,IAAI,OAAOA,UAAU,YACnB,OAAOA,MAAM4B,aAAa,CAAC;EAE7B,OAAO5B;CACT,CAAC;CAED,MAAMgC,WAAWlD,iBAAiBU,eAAe2B,WAAW,EAAEc,QAAQ,KAAK,CAAC,CAAC;CAE7E,OAAAC,gBACGjD,YAAUkD,WAAA;EAAA,IACTC,MAAG;GAAA,OAAExC,YAAY;EAAC;EAAAwB,KACbC;CAAM,GACPW,gBACAT,aAAac,eAAa;EAAA,KAAA,WAAA;GAAA,OACvBR,cAAc;EAAC;EAAA,IACtB7B,QAAK;GAAA,OAAE+B,cAAc;EAAC;EAAA,IACtBO,OAAI;GAAA,OAAEpB,MAAMoB;EAAI;EAAA,IAAApC,WAAA;GAAA,OAEfe,MAAMf;EAAQ;CAAA,CAAA,CAAA;AAGrB;;;;;;;;;;;;AAaA,SAAgBqC,wBAA4C;CAC1D,OAAOpD,sBAAsB;AAC/B"}
package/dist/Landmark.jsx CHANGED
@@ -1,6 +1,6 @@
1
1
  import { filterDOMProps } from "./utils.jsx";
2
+ import { ElementTag } from "./ElementTag.jsx";
2
3
  import { createContext, createMemo, createSignal, splitProps } from "solid-js";
3
- import { Dynamic } from "solid-js/web";
4
4
  import { createLandmark, getLandmarkController } from "@proyecto-viviana/solidaria";
5
5
  //#region src/Landmark.tsx
6
6
  /**
@@ -94,9 +94,9 @@ function Landmark(props) {
94
94
  return style;
95
95
  });
96
96
  const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));
97
- return <Dynamic component={elementType()} ref={setRef} {...domProps()} {...landmarkAria.landmarkProps} class={resolvedClass()} style={resolvedStyle()} slot={local.slot}>
97
+ return <ElementTag tag={elementType()} ref={setRef} {...domProps()} {...landmarkAria.landmarkProps} class={resolvedClass()} style={resolvedStyle()} slot={local.slot}>
98
98
  {props.children}
99
- </Dynamic>;
99
+ </ElementTag>;
100
100
  }
101
101
  /**
102
102
  * Returns a controller for programmatic landmark navigation.
@@ -1 +1 @@
1
- {"version":3,"file":"Landmark.jsx","names":[],"sources":["../src/Landmark.tsx"],"sourcesContent":["/**\n * Landmark component for solidaria-components\n *\n * Pre-wired headless landmark component that combines aria hooks.\n * Enables F6 keyboard navigation between major page sections.\n */\n\nimport { type JSX, createContext, createMemo, createSignal, splitProps } from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport {\n createLandmark,\n getLandmarkController,\n type AriaLandmarkProps,\n type AriaLandmarkRole,\n type LandmarkController,\n} from \"@proyecto-viviana/solidaria\";\nimport { type SlotProps, filterDOMProps } from \"./utils\";\n\nexport interface LandmarkRenderProps {\n /** The ARIA landmark role. */\n role: AriaLandmarkRole;\n}\n\nexport interface LandmarkProps extends AriaLandmarkProps, SlotProps {\n /**\n * The HTML element type to render.\n * @default 'div' (or semantic element based on role)\n */\n elementType?: keyof JSX.IntrinsicElements;\n /** The CSS className for the element. A function may be provided to receive render props. */\n class?: string | ((renderProps: LandmarkRenderProps) => string);\n /** The inline style for the element. A function may be provided to receive render props. */\n style?: JSX.CSSProperties | ((renderProps: LandmarkRenderProps) => JSX.CSSProperties);\n /** Children content. */\n children?: JSX.Element;\n}\n\nexport type { AriaLandmarkRole, LandmarkController };\n\nexport const LandmarkContext = createContext<LandmarkProps | null>(null);\n\n/**\n * Maps ARIA landmark roles to their semantic HTML elements.\n * Using semantic elements is preferred when possible.\n */\nconst roleToSemanticElement: Partial<Record<AriaLandmarkRole, keyof JSX.IntrinsicElements>> = {\n main: \"main\",\n navigation: \"nav\",\n search: \"search\", // HTML5.3 <search> element\n banner: \"header\",\n contentinfo: \"footer\",\n complementary: \"aside\",\n form: \"form\",\n region: \"section\",\n};\n\n/**\n * A landmark is a region of the page that helps screen reader users navigate.\n * Press F6 to cycle through landmarks, or Shift+F6 to go backwards.\n *\n * @example\n * ```tsx\n * // Main content area\n * <Landmark role=\"main\" aria-label=\"Main content\">\n * <h1>Welcome</h1>\n * <p>Page content here...</p>\n * </Landmark>\n *\n * // Navigation\n * <Landmark role=\"navigation\" aria-label=\"Primary navigation\">\n * <nav>...</nav>\n * </Landmark>\n *\n * // Search\n * <Landmark role=\"search\" aria-label=\"Site search\">\n * <form>...</form>\n * </Landmark>\n *\n * // Custom element type\n * <Landmark role=\"region\" aria-label=\"Featured content\" elementType=\"div\">\n * ...\n * </Landmark>\n * ```\n */\nexport function Landmark(props: LandmarkProps): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n \"class\",\n \"style\",\n \"slot\",\n \"children\",\n \"elementType\",\n ]);\n\n // Element ref\n const [ref, setRef] = createSignal<HTMLElement>();\n\n // Determine the element type - use semantic element for the role if not specified\n const elementType = createMemo(() => {\n if (local.elementType) {\n return local.elementType;\n }\n return roleToSemanticElement[ariaProps.role] ?? \"div\";\n });\n\n // Create landmark aria props\n const landmarkAria = createLandmark(\n {\n get role() {\n return ariaProps.role;\n },\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"];\n },\n get \"aria-labelledby\"() {\n return ariaProps[\"aria-labelledby\"];\n },\n get id() {\n return ariaProps.id;\n },\n get focus() {\n return ariaProps.focus;\n },\n },\n ref,\n );\n\n const renderValues = createMemo<LandmarkRenderProps>(() => ({\n role: ariaProps.role,\n }));\n\n const resolvedClass = createMemo(() => {\n const cls = local.class;\n if (typeof cls === \"function\") {\n return cls(renderValues());\n }\n return cls ?? `solidaria-Landmark solidaria-Landmark--${ariaProps.role}`;\n });\n\n const resolvedStyle = createMemo(() => {\n const style = local.style;\n if (typeof style === \"function\") {\n return style(renderValues());\n }\n return style;\n });\n\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n return (\n <Dynamic\n component={elementType()}\n ref={setRef}\n {...domProps()}\n {...landmarkAria.landmarkProps}\n class={resolvedClass()}\n style={resolvedStyle()}\n slot={local.slot}\n >\n {props.children}\n </Dynamic>\n );\n}\n\n/**\n * Returns a controller for programmatic landmark navigation.\n *\n * @example\n * ```tsx\n * const controller = useLandmarkController();\n *\n * <button onClick={() => controller.focusMain()}>Skip to main content</button>\n * <button onClick={() => controller.focusNext()}>Next landmark</button>\n * ```\n */\nexport function useLandmarkController(): LandmarkController {\n return getLandmarkController();\n}\n"],"mappings":";;;;;;;;;;;AAuCA,MAAa,kBAAkB,cAAoC,IAAI;;;;;AAMvE,MAAM,wBAAwF;CAC5F,MAAM;CACN,YAAY;CACZ,QAAQ;CACR,QAAQ;CACR,aAAa;CACb,eAAe;CACf,MAAM;CACN,QAAQ;AACV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAAgB,SAAS,OAAmC;CAC1D,MAAM,CAAC,OAAO,aAAa,WAAW,OAAO;EAC3C;EACA;EACA;EACA;EACA;CACF,CAAC;CAGD,MAAM,CAAC,KAAK,UAAU,aAA0B;CAGhD,MAAM,cAAc,iBAAiB;EACnC,IAAI,MAAM,aACR,OAAO,MAAM;EAEf,OAAO,sBAAsB,UAAU,SAAS;CAClD,CAAC;CAGD,MAAM,eAAe,eACnB;EACE,IAAI,OAAO;GACT,OAAO,UAAU;EACnB;EACA,IAAI,eAAe;GACjB,OAAO,UAAU;EACnB;EACA,IAAI,oBAAoB;GACtB,OAAO,UAAU;EACnB;EACA,IAAI,KAAK;GACP,OAAO,UAAU;EACnB;EACA,IAAI,QAAQ;GACV,OAAO,UAAU;EACnB;CACF,GACA,GACF;CAEA,MAAM,eAAe,kBAAuC,EAC1D,MAAM,UAAU,KAClB,EAAE;CAEF,MAAM,gBAAgB,iBAAiB;EACrC,MAAM,MAAM,MAAM;EAClB,IAAI,OAAO,QAAQ,YACjB,OAAO,IAAI,aAAa,CAAC;EAE3B,OAAO,OAAO,0CAA0C,UAAU;CACpE,CAAC;CAED,MAAM,gBAAgB,iBAAiB;EACrC,MAAM,QAAQ,MAAM;EACpB,IAAI,OAAO,UAAU,YACnB,OAAO,MAAM,aAAa,CAAC;EAE7B,OAAO;CACT,CAAC;CAED,MAAM,WAAW,iBAAiB,eAAe,WAAW,EAAE,QAAQ,KAAK,CAAC,CAAC;CAE7E,OACE,CAAC,QACC,WAAW,YAAY,GACvB,KAAK,YACD,SAAS,OACT,aAAa,eACjB,OAAO,cAAc,GACrB,OAAO,cAAc,GACrB,MAAM,MAAM,MACb;OACE,MAAM,SAAS;IAClB,EAAE;AAEN;;;;;;;;;;;;AAaA,SAAgB,wBAA4C;CAC1D,OAAO,sBAAsB;AAC/B"}
1
+ {"version":3,"file":"Landmark.jsx","names":[],"sources":["../src/Landmark.tsx"],"sourcesContent":["/**\n * Landmark component for solidaria-components\n *\n * Pre-wired headless landmark component that combines aria hooks.\n * Enables F6 keyboard navigation between major page sections.\n */\n\nimport { type JSX, createContext, createMemo, createSignal, splitProps } from \"solid-js\";\nimport { ElementTag } from \"./ElementTag\";\nimport {\n createLandmark,\n getLandmarkController,\n type AriaLandmarkProps,\n type AriaLandmarkRole,\n type LandmarkController,\n} from \"@proyecto-viviana/solidaria\";\nimport { type SlotProps, filterDOMProps } from \"./utils\";\n\nexport interface LandmarkRenderProps {\n /** The ARIA landmark role. */\n role: AriaLandmarkRole;\n}\n\nexport interface LandmarkProps extends AriaLandmarkProps, SlotProps {\n /**\n * The HTML element type to render.\n * @default 'div' (or semantic element based on role)\n */\n elementType?: keyof JSX.IntrinsicElements;\n /** The CSS className for the element. A function may be provided to receive render props. */\n class?: string | ((renderProps: LandmarkRenderProps) => string);\n /** The inline style for the element. A function may be provided to receive render props. */\n style?: JSX.CSSProperties | ((renderProps: LandmarkRenderProps) => JSX.CSSProperties);\n /** Children content. */\n children?: JSX.Element;\n}\n\nexport type { AriaLandmarkRole, LandmarkController };\n\nexport const LandmarkContext = createContext<LandmarkProps | null>(null);\n\n/**\n * Maps ARIA landmark roles to their semantic HTML elements.\n * Using semantic elements is preferred when possible.\n */\nconst roleToSemanticElement: Partial<Record<AriaLandmarkRole, keyof JSX.IntrinsicElements>> = {\n main: \"main\",\n navigation: \"nav\",\n search: \"search\", // HTML5.3 <search> element\n banner: \"header\",\n contentinfo: \"footer\",\n complementary: \"aside\",\n form: \"form\",\n region: \"section\",\n};\n\n/**\n * A landmark is a region of the page that helps screen reader users navigate.\n * Press F6 to cycle through landmarks, or Shift+F6 to go backwards.\n *\n * @example\n * ```tsx\n * // Main content area\n * <Landmark role=\"main\" aria-label=\"Main content\">\n * <h1>Welcome</h1>\n * <p>Page content here...</p>\n * </Landmark>\n *\n * // Navigation\n * <Landmark role=\"navigation\" aria-label=\"Primary navigation\">\n * <nav>...</nav>\n * </Landmark>\n *\n * // Search\n * <Landmark role=\"search\" aria-label=\"Site search\">\n * <form>...</form>\n * </Landmark>\n *\n * // Custom element type\n * <Landmark role=\"region\" aria-label=\"Featured content\" elementType=\"div\">\n * ...\n * </Landmark>\n * ```\n */\nexport function Landmark(props: LandmarkProps): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n \"class\",\n \"style\",\n \"slot\",\n \"children\",\n \"elementType\",\n ]);\n\n // Element ref\n const [ref, setRef] = createSignal<HTMLElement>();\n\n // Determine the element type - use semantic element for the role if not specified\n const elementType = createMemo(() => {\n if (local.elementType) {\n return local.elementType;\n }\n return roleToSemanticElement[ariaProps.role] ?? \"div\";\n });\n\n // Create landmark aria props\n const landmarkAria = createLandmark(\n {\n get role() {\n return ariaProps.role;\n },\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"];\n },\n get \"aria-labelledby\"() {\n return ariaProps[\"aria-labelledby\"];\n },\n get id() {\n return ariaProps.id;\n },\n get focus() {\n return ariaProps.focus;\n },\n },\n ref,\n );\n\n const renderValues = createMemo<LandmarkRenderProps>(() => ({\n role: ariaProps.role,\n }));\n\n const resolvedClass = createMemo(() => {\n const cls = local.class;\n if (typeof cls === \"function\") {\n return cls(renderValues());\n }\n return cls ?? `solidaria-Landmark solidaria-Landmark--${ariaProps.role}`;\n });\n\n const resolvedStyle = createMemo(() => {\n const style = local.style;\n if (typeof style === \"function\") {\n return style(renderValues());\n }\n return style;\n });\n\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n return (\n <ElementTag\n tag={elementType()}\n ref={setRef}\n {...domProps()}\n {...landmarkAria.landmarkProps}\n class={resolvedClass()}\n style={resolvedStyle()}\n slot={local.slot}\n >\n {props.children}\n </ElementTag>\n );\n}\n\n/**\n * Returns a controller for programmatic landmark navigation.\n *\n * @example\n * ```tsx\n * const controller = useLandmarkController();\n *\n * <button onClick={() => controller.focusMain()}>Skip to main content</button>\n * <button onClick={() => controller.focusNext()}>Next landmark</button>\n * ```\n */\nexport function useLandmarkController(): LandmarkController {\n return getLandmarkController();\n}\n"],"mappings":";;;;;;;;;;;AAuCA,MAAa,kBAAkB,cAAoC,IAAI;;;;;AAMvE,MAAM,wBAAwF;CAC5F,MAAM;CACN,YAAY;CACZ,QAAQ;CACR,QAAQ;CACR,aAAa;CACb,eAAe;CACf,MAAM;CACN,QAAQ;AACV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAAgB,SAAS,OAAmC;CAC1D,MAAM,CAAC,OAAO,aAAa,WAAW,OAAO;EAC3C;EACA;EACA;EACA;EACA;CACF,CAAC;CAGD,MAAM,CAAC,KAAK,UAAU,aAA0B;CAGhD,MAAM,cAAc,iBAAiB;EACnC,IAAI,MAAM,aACR,OAAO,MAAM;EAEf,OAAO,sBAAsB,UAAU,SAAS;CAClD,CAAC;CAGD,MAAM,eAAe,eACnB;EACE,IAAI,OAAO;GACT,OAAO,UAAU;EACnB;EACA,IAAI,eAAe;GACjB,OAAO,UAAU;EACnB;EACA,IAAI,oBAAoB;GACtB,OAAO,UAAU;EACnB;EACA,IAAI,KAAK;GACP,OAAO,UAAU;EACnB;EACA,IAAI,QAAQ;GACV,OAAO,UAAU;EACnB;CACF,GACA,GACF;CAEA,MAAM,eAAe,kBAAuC,EAC1D,MAAM,UAAU,KAClB,EAAE;CAEF,MAAM,gBAAgB,iBAAiB;EACrC,MAAM,MAAM,MAAM;EAClB,IAAI,OAAO,QAAQ,YACjB,OAAO,IAAI,aAAa,CAAC;EAE3B,OAAO,OAAO,0CAA0C,UAAU;CACpE,CAAC;CAED,MAAM,gBAAgB,iBAAiB;EACrC,MAAM,QAAQ,MAAM;EACpB,IAAI,OAAO,UAAU,YACnB,OAAO,MAAM,aAAa,CAAC;EAE7B,OAAO;CACT,CAAC;CAED,MAAM,WAAW,iBAAiB,eAAe,WAAW,EAAE,QAAQ,KAAK,CAAC,CAAC;CAE7E,OACE,CAAC,WACC,KAAK,YAAY,GACjB,KAAK,YACD,SAAS,OACT,aAAa,eACjB,OAAO,cAAc,GACrB,OAAO,cAAc,GACrB,MAAM,MAAM,MACb;OACE,MAAM,SAAS;IAClB,EAAE;AAEN;;;;;;;;;;;;AAaA,SAAgB,wBAA4C;CAC1D,OAAO,sBAAsB;AAC/B"}
package/dist/Link.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { filterDOMProps, useRenderProps } from "./utils.js";
2
+ import { ElementTag } from "./ElementTag.js";
2
3
  import { handleLinkClick, useRouter } from "./RouterProvider.js";
3
- import { Dynamic, createComponent, mergeProps } from "solid-js/web";
4
+ import { createComponent, mergeProps } from "solid-js/web";
4
5
  import { createContext, createMemo, splitProps } from "solid-js";
5
6
  import { createFocusRing, createHover, createLink } from "@proyecto-viviana/solidaria";
6
7
  //#region src/Link.tsx
@@ -177,7 +178,7 @@ function Link(props) {
177
178
  onClick?.(event);
178
179
  handleLinkClick(event, router, ariaProps.href, ariaProps.routerOptions);
179
180
  };
180
- return createComponent(Dynamic, mergeProps({ get component() {
181
+ return createComponent(ElementTag, mergeProps({ get tag() {
181
182
  return elementType();
182
183
  } }, domProps, cleanLinkProps, cleanHoverProps, cleanFocusProps, {
183
184
  ref: (element) => {
package/dist/Link.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Link.js","names":["JSX","ParentProps","createContext","createMemo","splitProps","Dynamic","createLink","createFocusRing","createHover","AriaLinkProps","HoverEvents","RenderChildren","ClassNameOrFunction","StyleOrFunction","SlotProps","useRenderProps","filterDOMProps","handleLinkClick","useRouter","RefLike","el","T","current","assignRef","ref","LinkRenderProps","isCurrent","isHovered","isPressed","isFocused","isFocusVisible","isDisabled","LinkProps","Omit","children","class","style","HTMLElement","LinkContext","Link","props","Element","local","ariaProps","router","resolvedHref","href","useHref","undefined","elementType","linkAria","hrefLang","target","rel","download","ping","referrerPolicy","onPress","onPressStart","onPressEnd","onPressUp","onPressChange","onClick","onFocus","onBlur","onFocusChange","onKeyDown","onKeyUp","autoFocus","aria-current","aria-label","aria-labelledby","aria-describedby","focusProps","hoverProps","onHoverStart","onHoverEnd","onHoverChange","renderValues","renderProps","defaultClassName","domProps","global","cleanLinkProps","_ref1","rest","linkProps","Record","cleanHoverProps","_ref2","cleanFocusProps","_ref3","onLinkClick","event","MouseEvent","routerOptions","_$createComponent","_$mergeProps","component","element","data-hovered","data-pressed","data-focused","data-focus-visible","data-current","data-disabled","renderChildren"],"sources":["../src/Link.tsx"],"sourcesContent":["/**\n * Link component for solidaria-components\n *\n * Pre-wired headless link component that combines aria hooks.\n * Port of react-aria-components/src/Link.tsx\n */\n\nimport { type JSX, type ParentProps, createContext, createMemo, splitProps } from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport {\n createLink,\n createFocusRing,\n createHover,\n type AriaLinkProps,\n type HoverEvents,\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\";\nimport { handleLinkClick, useRouter } from \"./RouterProvider\";\n\ntype RefLike<T> = ((el: T) => void) | { current?: T | null } | undefined;\n\nfunction assignRef<T>(ref: RefLike<T>, el: T): void {\n if (!ref) return;\n if (typeof ref === \"function\") {\n ref(el);\n } else {\n ref.current = el;\n }\n}\n\nexport interface LinkRenderProps {\n /** Whether the link is the current item within a list. */\n isCurrent: boolean;\n /** Whether the link is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the link is currently in a pressed state. */\n isPressed: boolean;\n /** Whether the link is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the link is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the link is disabled. */\n isDisabled: boolean;\n}\n\nexport interface LinkProps extends Omit<AriaLinkProps, \"elementType\">, HoverEvents, SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<LinkRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<LinkRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<LinkRenderProps>;\n /** Ref for the underlying link element. */\n ref?: RefLike<HTMLElement>;\n}\n\nexport const LinkContext = createContext<LinkProps | null>(null);\n\n/**\n * A link allows a user to navigate to another page or resource within a web page\n * or application.\n *\n * @example\n * ```tsx\n * <Link href=\"https://example.com\">Visit Example</Link>\n *\n * // With render props\n * <Link href=\"/about\">\n * {({ isHovered, isFocusVisible }) => (\n * <span class={isHovered ? 'underline' : ''}>\n * About Us\n * </span>\n * )}\n * </Link>\n * ```\n */\nexport function Link(props: ParentProps<LinkProps>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n \"children\",\n \"class\",\n \"style\",\n \"ref\",\n \"slot\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"onHoverChange\",\n ]);\n const router = useRouter();\n const resolvedHref = createMemo(() =>\n ariaProps.href ? router.useHref(ariaProps.href) : undefined,\n );\n\n const elementType = () => {\n if (ariaProps.href && !ariaProps.isDisabled) {\n return \"a\";\n }\n return \"span\";\n };\n\n const linkAria = createLink({\n get elementType() {\n return elementType();\n },\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get href() {\n return resolvedHref();\n },\n get hrefLang() {\n return ariaProps.hrefLang;\n },\n get target() {\n return ariaProps.target;\n },\n get rel() {\n return ariaProps.rel;\n },\n get download() {\n return ariaProps.download;\n },\n get ping() {\n return ariaProps.ping;\n },\n get referrerPolicy() {\n return ariaProps.referrerPolicy;\n },\n get onPress() {\n return ariaProps.onPress;\n },\n get onPressStart() {\n return ariaProps.onPressStart;\n },\n get onPressEnd() {\n return ariaProps.onPressEnd;\n },\n get onPressUp() {\n return ariaProps.onPressUp;\n },\n get onPressChange() {\n return ariaProps.onPressChange;\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-current\"() {\n return ariaProps[\"aria-current\"];\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 });\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return ariaProps.isDisabled ?? false;\n },\n get onHoverStart() {\n return local.onHoverStart;\n },\n get onHoverEnd() {\n return local.onHoverEnd;\n },\n get onHoverChange() {\n return local.onHoverChange;\n },\n });\n\n const renderValues = createMemo<LinkRenderProps>(() => ({\n isCurrent: !!ariaProps[\"aria-current\"],\n isHovered: isHovered(),\n isPressed: linkAria.isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: ariaProps.isDisabled ?? false,\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-Link\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n const cleanLinkProps = () => {\n const { ref: _ref1, ...rest } = linkAria.linkProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const onLinkClick = (event: MouseEvent) => {\n const onClick = cleanLinkProps().onClick as ((event: MouseEvent) => void) | undefined;\n onClick?.(event);\n handleLinkClick(event, router, ariaProps.href, ariaProps.routerOptions);\n };\n\n return (\n <Dynamic\n component={elementType()}\n {...domProps()}\n {...cleanLinkProps()}\n {...cleanHoverProps()}\n {...cleanFocusProps()}\n ref={(element: HTMLElement) => {\n assignRef(local.ref, element);\n }}\n onClick={onLinkClick}\n class={renderProps.class()}\n style={renderProps.style()}\n data-hovered={isHovered() || undefined}\n data-pressed={linkAria.isPressed() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-current={!!ariaProps[\"aria-current\"] || undefined}\n data-disabled={ariaProps.isDisabled || undefined}\n >\n {renderProps.renderChildren()}\n </Dynamic>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA4BA,SAASuB,UAAaC,KAAiBJ,IAAa;CAClD,IAAI,CAACI,KAAK;CACV,IAAI,OAAOA,QAAQ,YACjBA,IAAIJ,EAAE;MAENI,IAAIF,UAAUF;AAElB;AA4BA,MAAakB,cAAcpC,cAAgC,IAAI;;;;;;;;;;;;;;;;;;;AAoB/D,SAAgBqC,KAAKC,OAA4C;CAC/D,MAAM,CAACE,OAAOC,aAAavC,WAAWoC,OAAO;EAC3C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAe,CAChB;CACD,MAAMI,SAAS1B,UAAU;CACzB,MAAM2B,eAAe1C,iBACnBwC,UAAUG,OAAOF,OAAOG,QAAQJ,UAAUG,IAAI,IAAIE,KAAAA,CACpD;CAEA,MAAMC,oBAAoB;EACxB,IAAIN,UAAUG,QAAQ,CAACH,UAAUZ,YAC/B,OAAO;EAET,OAAO;CACT;CAEA,MAAMmB,WAAW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,UAAUmB,MAAMlB,KAAK2E,OAAO;EAC9B;EACArC,SAAS8B;EAAW,KAAA,WAAA;GAAA,OACbb,YAAY5C,MAAM;EAAC;EAAA,IAC1BC,QAAK;GAAA,OAAE2C,YAAY3C,MAAM;EAAC;EAAA,KAAA,kBAAA;GAAA,OACZT,UAAU,KAAKqB,KAAAA;EAAS;EAAA,KAAA,kBAAA;GAAA,OACxBE,SAAStB,UAAU,KAAKoB,KAAAA;EAAS;EAAA,KAAA,kBAAA;GAAA,OACjCnB,UAAU,KAAKmB,KAAAA;EAAS;EAAA,KAAA,wBAAA;GAAA,OAClBlB,eAAe,KAAKkB,KAAAA;EAAS;EAAA,KAAA,kBAAA;GAAA,OACnC,CAAC,CAACL,UAAU,mBAAmBK,KAAAA;EAAS;EAAA,KAAA,mBAAA;GAAA,OACvCL,UAAUZ,cAAciB,KAAAA;EAAS;EAAA,IAAAd,WAAA;GAAA,OAE/C6C,YAAY2B,eAAe;EAAC;CAAA,CAAA,CAAA;AAGnC"}
1
+ {"version":3,"file":"Link.js","names":["JSX","ParentProps","createContext","createMemo","splitProps","ElementTag","createLink","createFocusRing","createHover","AriaLinkProps","HoverEvents","RenderChildren","ClassNameOrFunction","StyleOrFunction","SlotProps","useRenderProps","filterDOMProps","handleLinkClick","useRouter","RefLike","el","T","current","assignRef","ref","LinkRenderProps","isCurrent","isHovered","isPressed","isFocused","isFocusVisible","isDisabled","LinkProps","Omit","children","class","style","HTMLElement","LinkContext","Link","props","Element","local","ariaProps","router","resolvedHref","href","useHref","undefined","elementType","linkAria","hrefLang","target","rel","download","ping","referrerPolicy","onPress","onPressStart","onPressEnd","onPressUp","onPressChange","onClick","onFocus","onBlur","onFocusChange","onKeyDown","onKeyUp","autoFocus","aria-current","aria-label","aria-labelledby","aria-describedby","focusProps","hoverProps","onHoverStart","onHoverEnd","onHoverChange","renderValues","renderProps","defaultClassName","domProps","global","cleanLinkProps","_ref1","rest","linkProps","Record","cleanHoverProps","_ref2","cleanFocusProps","_ref3","onLinkClick","event","MouseEvent","routerOptions","_$createComponent","_$mergeProps","tag","element","data-hovered","data-pressed","data-focused","data-focus-visible","data-current","data-disabled","renderChildren"],"sources":["../src/Link.tsx"],"sourcesContent":["/**\n * Link component for solidaria-components\n *\n * Pre-wired headless link component that combines aria hooks.\n * Port of react-aria-components/src/Link.tsx\n */\n\nimport { type JSX, type ParentProps, createContext, createMemo, splitProps } from \"solid-js\";\nimport { ElementTag } from \"./ElementTag\";\nimport {\n createLink,\n createFocusRing,\n createHover,\n type AriaLinkProps,\n type HoverEvents,\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\";\nimport { handleLinkClick, useRouter } from \"./RouterProvider\";\n\ntype RefLike<T> = ((el: T) => void) | { current?: T | null } | undefined;\n\nfunction assignRef<T>(ref: RefLike<T>, el: T): void {\n if (!ref) return;\n if (typeof ref === \"function\") {\n ref(el);\n } else {\n ref.current = el;\n }\n}\n\nexport interface LinkRenderProps {\n /** Whether the link is the current item within a list. */\n isCurrent: boolean;\n /** Whether the link is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the link is currently in a pressed state. */\n isPressed: boolean;\n /** Whether the link is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the link is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the link is disabled. */\n isDisabled: boolean;\n}\n\nexport interface LinkProps extends Omit<AriaLinkProps, \"elementType\">, HoverEvents, SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<LinkRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<LinkRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<LinkRenderProps>;\n /** Ref for the underlying link element. */\n ref?: RefLike<HTMLElement>;\n}\n\nexport const LinkContext = createContext<LinkProps | null>(null);\n\n/**\n * A link allows a user to navigate to another page or resource within a web page\n * or application.\n *\n * @example\n * ```tsx\n * <Link href=\"https://example.com\">Visit Example</Link>\n *\n * // With render props\n * <Link href=\"/about\">\n * {({ isHovered, isFocusVisible }) => (\n * <span class={isHovered ? 'underline' : ''}>\n * About Us\n * </span>\n * )}\n * </Link>\n * ```\n */\nexport function Link(props: ParentProps<LinkProps>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n \"children\",\n \"class\",\n \"style\",\n \"ref\",\n \"slot\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"onHoverChange\",\n ]);\n const router = useRouter();\n const resolvedHref = createMemo(() =>\n ariaProps.href ? router.useHref(ariaProps.href) : undefined,\n );\n\n const elementType = () => {\n if (ariaProps.href && !ariaProps.isDisabled) {\n return \"a\";\n }\n return \"span\";\n };\n\n const linkAria = createLink({\n get elementType() {\n return elementType();\n },\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get href() {\n return resolvedHref();\n },\n get hrefLang() {\n return ariaProps.hrefLang;\n },\n get target() {\n return ariaProps.target;\n },\n get rel() {\n return ariaProps.rel;\n },\n get download() {\n return ariaProps.download;\n },\n get ping() {\n return ariaProps.ping;\n },\n get referrerPolicy() {\n return ariaProps.referrerPolicy;\n },\n get onPress() {\n return ariaProps.onPress;\n },\n get onPressStart() {\n return ariaProps.onPressStart;\n },\n get onPressEnd() {\n return ariaProps.onPressEnd;\n },\n get onPressUp() {\n return ariaProps.onPressUp;\n },\n get onPressChange() {\n return ariaProps.onPressChange;\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-current\"() {\n return ariaProps[\"aria-current\"];\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 });\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return ariaProps.isDisabled ?? false;\n },\n get onHoverStart() {\n return local.onHoverStart;\n },\n get onHoverEnd() {\n return local.onHoverEnd;\n },\n get onHoverChange() {\n return local.onHoverChange;\n },\n });\n\n const renderValues = createMemo<LinkRenderProps>(() => ({\n isCurrent: !!ariaProps[\"aria-current\"],\n isHovered: isHovered(),\n isPressed: linkAria.isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: ariaProps.isDisabled ?? false,\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-Link\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n const cleanLinkProps = () => {\n const { ref: _ref1, ...rest } = linkAria.linkProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const onLinkClick = (event: MouseEvent) => {\n const onClick = cleanLinkProps().onClick as ((event: MouseEvent) => void) | undefined;\n onClick?.(event);\n handleLinkClick(event, router, ariaProps.href, ariaProps.routerOptions);\n };\n\n return (\n <ElementTag\n tag={elementType()}\n {...domProps()}\n {...cleanLinkProps()}\n {...cleanHoverProps()}\n {...cleanFocusProps()}\n ref={(element: HTMLElement) => {\n assignRef(local.ref, element);\n }}\n onClick={onLinkClick}\n class={renderProps.class()}\n style={renderProps.style()}\n data-hovered={isHovered() || undefined}\n data-pressed={linkAria.isPressed() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-current={!!ariaProps[\"aria-current\"] || undefined}\n data-disabled={ariaProps.isDisabled || undefined}\n >\n {renderProps.renderChildren()}\n </ElementTag>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AA4BA,SAASuB,UAAaC,KAAiBJ,IAAa;CAClD,IAAI,CAACI,KAAK;CACV,IAAI,OAAOA,QAAQ,YACjBA,IAAIJ,EAAE;MAENI,IAAIF,UAAUF;AAElB;AA4BA,MAAakB,cAAcpC,cAAgC,IAAI;;;;;;;;;;;;;;;;;;;AAoB/D,SAAgBqC,KAAKC,OAA4C;CAC/D,MAAM,CAACE,OAAOC,aAAavC,WAAWoC,OAAO;EAC3C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAe,CAChB;CACD,MAAMI,SAAS1B,UAAU;CACzB,MAAM2B,eAAe1C,iBACnBwC,UAAUG,OAAOF,OAAOG,QAAQJ,UAAUG,IAAI,IAAIE,KAAAA,CACpD;CAEA,MAAMC,oBAAoB;EACxB,IAAIN,UAAUG,QAAQ,CAACH,UAAUZ,YAC/B,OAAO;EAET,OAAO;CACT;CAEA,MAAMmB,WAAW5C,WAAW;EAC1B,IAAI2C,cAAc;GAChB,OAAOA,YAAY;EACrB;EACA,IAAIlB,aAAa;GACf,OAAOY,UAAUZ;EACnB;EACA,IAAIe,OAAO;GACT,OAAOD,aAAa;EACtB;EACA,IAAIM,WAAW;GACb,OAAOR,UAAUQ;EACnB;EACA,IAAIC,SAAS;GACX,OAAOT,UAAUS;EACnB;EACA,IAAIC,MAAM;GACR,OAAOV,UAAUU;EACnB;EACA,IAAIC,WAAW;GACb,OAAOX,UAAUW;EACnB;EACA,IAAIC,OAAO;GACT,OAAOZ,UAAUY;EACnB;EACA,IAAIC,iBAAiB;GACnB,OAAOb,UAAUa;EACnB;EACA,IAAIC,UAAU;GACZ,OAAOd,UAAUc;EACnB;EACA,IAAIC,eAAe;GACjB,OAAOf,UAAUe;EACnB;EACA,IAAIC,aAAa;GACf,OAAOhB,UAAUgB;EAC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EAAA,IAAAd,WAAA;GAAA,OAE/C6C,YAAY2B,eAAe;EAAC;CAAA,CAAA,CAAA;AAGnC"}
package/dist/Link.jsx CHANGED
@@ -1,7 +1,7 @@
1
1
  import { filterDOMProps, useRenderProps } from "./utils.jsx";
2
+ import { ElementTag } from "./ElementTag.jsx";
2
3
  import { handleLinkClick, useRouter } from "./RouterProvider.jsx";
3
4
  import { createContext, createMemo, splitProps } from "solid-js";
4
- import { Dynamic } from "solid-js/web";
5
5
  import { createFocusRing, createHover, createLink } from "@proyecto-viviana/solidaria";
6
6
  //#region src/Link.tsx
7
7
  /**
@@ -177,11 +177,11 @@ function Link(props) {
177
177
  onClick?.(event);
178
178
  handleLinkClick(event, router, ariaProps.href, ariaProps.routerOptions);
179
179
  };
180
- return <Dynamic component={elementType()} {...domProps()} {...cleanLinkProps()} {...cleanHoverProps()} {...cleanFocusProps()} ref={(element) => {
180
+ return <ElementTag tag={elementType()} {...domProps()} {...cleanLinkProps()} {...cleanHoverProps()} {...cleanFocusProps()} ref={(element) => {
181
181
  assignRef(local.ref, element);
182
182
  }} onClick={onLinkClick} class={renderProps.class()} style={renderProps.style()} data-hovered={isHovered() || void 0} data-pressed={linkAria.isPressed() || void 0} data-focused={isFocused() || void 0} data-focus-visible={isFocusVisible() || void 0} data-current={!!ariaProps["aria-current"] || void 0} data-disabled={ariaProps.isDisabled || void 0}>
183
183
  {renderProps.renderChildren()}
184
- </Dynamic>;
184
+ </ElementTag>;
185
185
  }
186
186
  //#endregion
187
187
  export { Link, LinkContext };
package/dist/Link.jsx.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Link.jsx","names":[],"sources":["../src/Link.tsx"],"sourcesContent":["/**\n * Link component for solidaria-components\n *\n * Pre-wired headless link component that combines aria hooks.\n * Port of react-aria-components/src/Link.tsx\n */\n\nimport { type JSX, type ParentProps, createContext, createMemo, splitProps } from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport {\n createLink,\n createFocusRing,\n createHover,\n type AriaLinkProps,\n type HoverEvents,\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\";\nimport { handleLinkClick, useRouter } from \"./RouterProvider\";\n\ntype RefLike<T> = ((el: T) => void) | { current?: T | null } | undefined;\n\nfunction assignRef<T>(ref: RefLike<T>, el: T): void {\n if (!ref) return;\n if (typeof ref === \"function\") {\n ref(el);\n } else {\n ref.current = el;\n }\n}\n\nexport interface LinkRenderProps {\n /** Whether the link is the current item within a list. */\n isCurrent: boolean;\n /** Whether the link is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the link is currently in a pressed state. */\n isPressed: boolean;\n /** Whether the link is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the link is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the link is disabled. */\n isDisabled: boolean;\n}\n\nexport interface LinkProps extends Omit<AriaLinkProps, \"elementType\">, HoverEvents, SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<LinkRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<LinkRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<LinkRenderProps>;\n /** Ref for the underlying link element. */\n ref?: RefLike<HTMLElement>;\n}\n\nexport const LinkContext = createContext<LinkProps | null>(null);\n\n/**\n * A link allows a user to navigate to another page or resource within a web page\n * or application.\n *\n * @example\n * ```tsx\n * <Link href=\"https://example.com\">Visit Example</Link>\n *\n * // With render props\n * <Link href=\"/about\">\n * {({ isHovered, isFocusVisible }) => (\n * <span class={isHovered ? 'underline' : ''}>\n * About Us\n * </span>\n * )}\n * </Link>\n * ```\n */\nexport function Link(props: ParentProps<LinkProps>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n \"children\",\n \"class\",\n \"style\",\n \"ref\",\n \"slot\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"onHoverChange\",\n ]);\n const router = useRouter();\n const resolvedHref = createMemo(() =>\n ariaProps.href ? router.useHref(ariaProps.href) : undefined,\n );\n\n const elementType = () => {\n if (ariaProps.href && !ariaProps.isDisabled) {\n return \"a\";\n }\n return \"span\";\n };\n\n const linkAria = createLink({\n get elementType() {\n return elementType();\n },\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get href() {\n return resolvedHref();\n },\n get hrefLang() {\n return ariaProps.hrefLang;\n },\n get target() {\n return ariaProps.target;\n },\n get rel() {\n return ariaProps.rel;\n },\n get download() {\n return ariaProps.download;\n },\n get ping() {\n return ariaProps.ping;\n },\n get referrerPolicy() {\n return ariaProps.referrerPolicy;\n },\n get onPress() {\n return ariaProps.onPress;\n },\n get onPressStart() {\n return ariaProps.onPressStart;\n },\n get onPressEnd() {\n return ariaProps.onPressEnd;\n },\n get onPressUp() {\n return ariaProps.onPressUp;\n },\n get onPressChange() {\n return ariaProps.onPressChange;\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-current\"() {\n return ariaProps[\"aria-current\"];\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 });\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return ariaProps.isDisabled ?? false;\n },\n get onHoverStart() {\n return local.onHoverStart;\n },\n get onHoverEnd() {\n return local.onHoverEnd;\n },\n get onHoverChange() {\n return local.onHoverChange;\n },\n });\n\n const renderValues = createMemo<LinkRenderProps>(() => ({\n isCurrent: !!ariaProps[\"aria-current\"],\n isHovered: isHovered(),\n isPressed: linkAria.isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: ariaProps.isDisabled ?? false,\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-Link\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n const cleanLinkProps = () => {\n const { ref: _ref1, ...rest } = linkAria.linkProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const onLinkClick = (event: MouseEvent) => {\n const onClick = cleanLinkProps().onClick as ((event: MouseEvent) => void) | undefined;\n onClick?.(event);\n handleLinkClick(event, router, ariaProps.href, ariaProps.routerOptions);\n };\n\n return (\n <Dynamic\n component={elementType()}\n {...domProps()}\n {...cleanLinkProps()}\n {...cleanHoverProps()}\n {...cleanFocusProps()}\n ref={(element: HTMLElement) => {\n assignRef(local.ref, element);\n }}\n onClick={onLinkClick}\n class={renderProps.class()}\n style={renderProps.style()}\n data-hovered={isHovered() || undefined}\n data-pressed={linkAria.isPressed() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-current={!!ariaProps[\"aria-current\"] || undefined}\n data-disabled={ariaProps.isDisabled || undefined}\n >\n {renderProps.renderChildren()}\n </Dynamic>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA4BA,SAAS,UAAa,KAAiB,IAAa;CAClD,IAAI,CAAC,KAAK;CACV,IAAI,OAAO,QAAQ,YACjB,IAAI,EAAE;MAEN,IAAI,UAAU;AAElB;AA4BA,MAAa,cAAc,cAAgC,IAAI;;;;;;;;;;;;;;;;;;;AAoB/D,SAAgB,KA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YAAyB;EAC7B,UAAU,MAAM,KAAK,OAAO;CAC9B,GACA,SAAS,aACT,OAAO,YAAY,MAAM,GACzB,OAAO,YAAY,MAAM,GACzB,cAAc,UAAU,KAAK,KAAA,GAC7B,cAAc,SAAS,UAAU,KAAK,KAAA,GACtC,cAAc,UAAU,KAAK,KAAA,GAC7B,oBAAoB,eAAe,KAAK,KAAA,GACxC,cAAc,CAAC,CAAC,UAAU,mBAAmB,KAAA,GAC7C,eAAe,UAAU,cAAc,KAAA,GACxC;OACE,YAAY,eAAe,EAAE;IAChC,EAAE;AAEN"}
1
+ {"version":3,"file":"Link.jsx","names":[],"sources":["../src/Link.tsx"],"sourcesContent":["/**\n * Link component for solidaria-components\n *\n * Pre-wired headless link component that combines aria hooks.\n * Port of react-aria-components/src/Link.tsx\n */\n\nimport { type JSX, type ParentProps, createContext, createMemo, splitProps } from \"solid-js\";\nimport { ElementTag } from \"./ElementTag\";\nimport {\n createLink,\n createFocusRing,\n createHover,\n type AriaLinkProps,\n type HoverEvents,\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\";\nimport { handleLinkClick, useRouter } from \"./RouterProvider\";\n\ntype RefLike<T> = ((el: T) => void) | { current?: T | null } | undefined;\n\nfunction assignRef<T>(ref: RefLike<T>, el: T): void {\n if (!ref) return;\n if (typeof ref === \"function\") {\n ref(el);\n } else {\n ref.current = el;\n }\n}\n\nexport interface LinkRenderProps {\n /** Whether the link is the current item within a list. */\n isCurrent: boolean;\n /** Whether the link is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the link is currently in a pressed state. */\n isPressed: boolean;\n /** Whether the link is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the link is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the link is disabled. */\n isDisabled: boolean;\n}\n\nexport interface LinkProps extends Omit<AriaLinkProps, \"elementType\">, HoverEvents, SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<LinkRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<LinkRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<LinkRenderProps>;\n /** Ref for the underlying link element. */\n ref?: RefLike<HTMLElement>;\n}\n\nexport const LinkContext = createContext<LinkProps | null>(null);\n\n/**\n * A link allows a user to navigate to another page or resource within a web page\n * or application.\n *\n * @example\n * ```tsx\n * <Link href=\"https://example.com\">Visit Example</Link>\n *\n * // With render props\n * <Link href=\"/about\">\n * {({ isHovered, isFocusVisible }) => (\n * <span class={isHovered ? 'underline' : ''}>\n * About Us\n * </span>\n * )}\n * </Link>\n * ```\n */\nexport function Link(props: ParentProps<LinkProps>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n \"children\",\n \"class\",\n \"style\",\n \"ref\",\n \"slot\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"onHoverChange\",\n ]);\n const router = useRouter();\n const resolvedHref = createMemo(() =>\n ariaProps.href ? router.useHref(ariaProps.href) : undefined,\n );\n\n const elementType = () => {\n if (ariaProps.href && !ariaProps.isDisabled) {\n return \"a\";\n }\n return \"span\";\n };\n\n const linkAria = createLink({\n get elementType() {\n return elementType();\n },\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get href() {\n return resolvedHref();\n },\n get hrefLang() {\n return ariaProps.hrefLang;\n },\n get target() {\n return ariaProps.target;\n },\n get rel() {\n return ariaProps.rel;\n },\n get download() {\n return ariaProps.download;\n },\n get ping() {\n return ariaProps.ping;\n },\n get referrerPolicy() {\n return ariaProps.referrerPolicy;\n },\n get onPress() {\n return ariaProps.onPress;\n },\n get onPressStart() {\n return ariaProps.onPressStart;\n },\n get onPressEnd() {\n return ariaProps.onPressEnd;\n },\n get onPressUp() {\n return ariaProps.onPressUp;\n },\n get onPressChange() {\n return ariaProps.onPressChange;\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-current\"() {\n return ariaProps[\"aria-current\"];\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 });\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return ariaProps.isDisabled ?? false;\n },\n get onHoverStart() {\n return local.onHoverStart;\n },\n get onHoverEnd() {\n return local.onHoverEnd;\n },\n get onHoverChange() {\n return local.onHoverChange;\n },\n });\n\n const renderValues = createMemo<LinkRenderProps>(() => ({\n isCurrent: !!ariaProps[\"aria-current\"],\n isHovered: isHovered(),\n isPressed: linkAria.isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: ariaProps.isDisabled ?? false,\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-Link\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n const cleanLinkProps = () => {\n const { ref: _ref1, ...rest } = linkAria.linkProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const onLinkClick = (event: MouseEvent) => {\n const onClick = cleanLinkProps().onClick as ((event: MouseEvent) => void) | undefined;\n onClick?.(event);\n handleLinkClick(event, router, ariaProps.href, ariaProps.routerOptions);\n };\n\n return (\n <ElementTag\n tag={elementType()}\n {...domProps()}\n {...cleanLinkProps()}\n {...cleanHoverProps()}\n {...cleanFocusProps()}\n ref={(element: HTMLElement) => {\n assignRef(local.ref, element);\n }}\n onClick={onLinkClick}\n class={renderProps.class()}\n style={renderProps.style()}\n data-hovered={isHovered() || undefined}\n data-pressed={linkAria.isPressed() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-current={!!ariaProps[\"aria-current\"] || undefined}\n data-disabled={ariaProps.isDisabled || undefined}\n >\n {renderProps.renderChildren()}\n </ElementTag>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA4BA,SAAS,UAAa,KAAiB,IAAa;CAClD,IAAI,CAAC,KAAK;CACV,IAAI,OAAO,QAAQ,YACjB,IAAI,EAAE;MAEN,IAAI,UAAU;AAElB;AA4BA,MAAa,cAAc,cAAgC,IAAI;;;;;;;;;;;;;;;;;;;AAoB/D,SAAgB,KAAK,OAA4C;CAC/D,MAAM,CAAC,OAAO,aAAa,WAAW,OAAO;EAC3C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CACD,MAAM,SAAS,UAAU;CACzB,MAAM,eAAe,iBACnB,UAAU,OAAO,OAAO,QAAQ,UAAU,IAAI,IAAI,KAAA,CACpD;CAEA,MAAM,oBAAoB;EACxB,IAAI,UAAU,QAAQ,CAAC,UAAU,YAC/B,OAAO;EAET,OAAO;CACT;CAEA,MAAM,WAAW,WAAW;EAC1B,IAAI,cAAc;GAChB,OAAO,YAAY;EACrB;EACA,IAAI,aAAa;GACf,OAAO,UAAU;EACnB;EACA,IAAI,OAAO;GACT,OAAO,aAAa;EACtB;EACA,IAAI,WAAW;GACb,OAAO,UAAU;EACnB;EACA,IAAI,SAAS;GACX,OAAO,UAAU;EACnB;EACA,IAAI,MAAM;GACR,OAAO,UAAU;EACnB;EACA,IAAI,WAAW;GACb,OAAO,UAAU;EACnB;EACA,IAAI,OAAO;GACT,O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A,OAAO,MAAM;EACb,OAAO,MAAM;EACb,kBAAkB;CACpB,GACA,YACF;CAEA,MAAM,WAAW,iBAAiB,eAAe,WAAW,EAAE,QAAQ,KAAK,CAAC,CAAC;CAE7E,MAAM,uBAAuB;EAC3B,MAAM,EAAE,KAAK,OAAO,GAAG,SAAS,SAAS;EACzC,OAAO;CACT;CACA,MAAM,wBAAwB;EAC5B,MAAM,EAAE,KAAK,OAAO,GAAG,SAAS;EAChC,OAAO;CACT;CACA,MAAM,wBAAwB;EAC5B,MAAM,EAAE,KAAK,OAAO,GAAG,SAAS;EAChC,OAAO;CACT;CACA,MAAM,eAAe,UAAsB;EACzC,MAAM,UAAU,eAAe,CAAC,CAAC;EACjC,UAAU,KAAK;EACf,gBAAgB,OAAO,QAAQ,UAAU,MAAM,UAAU,aAAa;CACxE;CAEA,OACE,CAAC,WACC,KAAK,YAAY,OACb,SAAS,OACT,eAAe,OACf,gBAAgB,OAChB,gBAAgB,GACpB,MAAM,YAAyB;EAC7B,UAAU,MAAM,KAAK,OAAO;CAC9B,GACA,SAAS,aACT,OAAO,YAAY,MAAM,GACzB,OAAO,YAAY,MAAM,GACzB,cAAc,UAAU,KAAK,KAAA,GAC7B,cAAc,SAAS,UAAU,KAAK,KAAA,GACtC,cAAc,UAAU,KAAK,KAAA,GAC7B,oBAAoB,eAAe,KAAK,KAAA,GACxC,cAAc,CAAC,CAAC,UAAU,mBAAmB,KAAA,GAC7C,eAAe,UAAU,cAAc,KAAA,GACxC;OACE,YAAY,eAAe,EAAE;IAChC,EAAE;AAEN"}
package/dist/ListBox.d.ts CHANGED
@@ -61,7 +61,7 @@ export interface ListBoxProps<T> extends Omit<AriaListBoxProps, "children">, Slo
61
61
  /** Called when the load more sentinel becomes visible. */
62
62
  onLoadMore?: () => void | Promise<void>;
63
63
  /** Ref for the listbox element. */
64
- ref?: RefLike<HTMLUListElement>;
64
+ ref?: RefLike<HTMLDivElement>;
65
65
  /** Drag and drop hooks from `useDragAndDrop`. */
66
66
  dragAndDropHooks?: DragAndDropHooks<T>;
67
67
  /** Layout hint for styling parity. */
@@ -99,7 +99,7 @@ export interface ListBoxOptionProps<T> extends Omit<AriaOptionProps, "children"
99
99
  /** The text value of the option (for typeahead). */
100
100
  textValue?: string;
101
101
  /** Ref for the option element. */
102
- ref?: RefLike<HTMLLIElement>;
102
+ ref?: RefLike<HTMLDivElement>;
103
103
  }
104
104
  export interface ListBoxLoadMoreItemProps extends SlotProps {
105
105
  /** Called when the sentinel becomes visible. */
@@ -1 +1 @@
1
- {"version":3,"file":"ListBox.d.ts","sourceRoot":"","sources":["../src/ListBox.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,GAAG,EAUT,MAAM,UAAU,CAAC;AAClB,OAAO,EAOL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,GAAG,EAET,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,SAAS,EAGf,MAAM,SAAS,CAAC;AAOjB,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAOzD,OAAO,EAKL,KAAK,eAAe,EAEpB,KAAK,YAAY,EAIlB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,kBAAkB;IACjC,qCAAqC;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,cAAc,EAAE,OAAO,CAAC;IACxB,uCAAuC;IACvC,UAAU,EAAE,OAAO,CAAC;IACpB,oCAAoC;IACpC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,CAAA;CAAE,GAAG,SAAS,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