@anoki/fse-ui 1.0.621 → 1.0.622

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 (220) hide show
  1. package/dist/index.cjs242.js +1 -1
  2. package/dist/index.cjs249.js +1 -1
  3. package/dist/index.cjs254.js +1 -1
  4. package/dist/index.cjs261.js +1 -1
  5. package/dist/index.cjs308.js +1 -1
  6. package/dist/index.cjs336.js +1 -1
  7. package/dist/index.cjs337.js +1 -1
  8. package/dist/index.cjs344.js +1 -1
  9. package/dist/index.cjs351.js +1 -1
  10. package/dist/index.cjs355.js +1 -1
  11. package/dist/index.cjs356.js +1 -1
  12. package/dist/index.cjs360.js +1 -1
  13. package/dist/index.cjs361.js +1 -1
  14. package/dist/index.cjs362.js +1 -1
  15. package/dist/index.cjs363.js +1 -1
  16. package/dist/index.cjs369.js +1 -1
  17. package/dist/index.cjs370.js +1 -1
  18. package/dist/index.cjs375.js +2 -0
  19. package/dist/index.cjs375.js.map +1 -0
  20. package/dist/index.cjs376.js +2 -0
  21. package/dist/index.cjs376.js.map +1 -0
  22. package/dist/index.cjs377.js +1 -1
  23. package/dist/index.cjs377.js.map +1 -1
  24. package/dist/index.cjs378.js +1 -1
  25. package/dist/index.cjs378.js.map +1 -1
  26. package/dist/index.cjs379.js +1 -1
  27. package/dist/index.cjs379.js.map +1 -1
  28. package/dist/index.cjs380.js +1 -1
  29. package/dist/index.cjs380.js.map +1 -1
  30. package/dist/index.cjs381.js +1 -1
  31. package/dist/index.cjs381.js.map +1 -1
  32. package/dist/{index.cjs387.js → index.cjs391.js} +1 -1
  33. package/dist/index.cjs391.js.map +1 -0
  34. package/dist/index.cjs392.js +1 -1
  35. package/dist/index.cjs392.js.map +1 -1
  36. package/dist/index.cjs396.js +1 -1
  37. package/dist/index.cjs396.js.map +1 -1
  38. package/dist/index.cjs397.js +1 -1
  39. package/dist/index.cjs397.js.map +1 -1
  40. package/dist/{index.cjs394.js → index.cjs398.js} +1 -1
  41. package/dist/{index.cjs394.js.map → index.cjs398.js.map} +1 -1
  42. package/dist/{index.cjs395.js → index.cjs399.js} +2 -2
  43. package/dist/{index.cjs395.js.map → index.cjs399.js.map} +1 -1
  44. package/dist/index.cjs400.js +2 -0
  45. package/dist/index.cjs400.js.map +1 -0
  46. package/dist/index.cjs401.js +2 -0
  47. package/dist/index.cjs401.js.map +1 -0
  48. package/dist/index.cjs402.js +1 -1
  49. package/dist/index.cjs419.js +1 -1
  50. package/dist/index.cjs420.js +1 -1
  51. package/dist/index.cjs425.js +1 -1
  52. package/dist/index.cjs425.js.map +1 -1
  53. package/dist/index.cjs428.js +1 -1
  54. package/dist/index.cjs428.js.map +1 -1
  55. package/dist/{index.cjs426.js → index.cjs429.js} +2 -2
  56. package/dist/{index.cjs426.js.map → index.cjs429.js.map} +1 -1
  57. package/dist/{index.cjs427.js → index.cjs430.js} +1 -1
  58. package/dist/{index.cjs427.js.map → index.cjs430.js.map} +1 -1
  59. package/dist/index.cjs431.js +1 -1
  60. package/dist/index.cjs434.js +1 -1
  61. package/dist/index.cjs435.js +1 -1
  62. package/dist/index.cjs437.js +1 -1
  63. package/dist/index.cjs438.js +1 -1
  64. package/dist/index.cjs441.js +1 -1
  65. package/dist/index.cjs442.js +27 -1
  66. package/dist/index.cjs442.js.map +1 -1
  67. package/dist/index.cjs443.js +1 -1
  68. package/dist/index.cjs443.js.map +1 -1
  69. package/dist/index.cjs444.js +1 -1
  70. package/dist/index.cjs444.js.map +1 -1
  71. package/dist/index.cjs445.js +2 -1
  72. package/dist/index.cjs445.js.map +1 -1
  73. package/dist/index.cjs446.js +1 -5
  74. package/dist/index.cjs446.js.map +1 -1
  75. package/dist/index.cjs447.js +1 -1
  76. package/dist/index.cjs447.js.map +1 -1
  77. package/dist/index.cjs448.js +1 -1
  78. package/dist/index.cjs448.js.map +1 -1
  79. package/dist/index.cjs449.js +1 -1
  80. package/dist/index.cjs449.js.map +1 -1
  81. package/dist/index.cjs450.js +5 -1
  82. package/dist/index.cjs450.js.map +1 -1
  83. package/dist/index.cjs451.js +1 -1
  84. package/dist/index.cjs451.js.map +1 -1
  85. package/dist/index.cjs452.js +1 -1
  86. package/dist/index.cjs452.js.map +1 -1
  87. package/dist/index.cjs453.js +1 -1
  88. package/dist/index.cjs453.js.map +1 -1
  89. package/dist/index.cjs454.js +1 -1
  90. package/dist/index.cjs454.js.map +1 -1
  91. package/dist/index.cjs455.js +1 -1
  92. package/dist/index.cjs455.js.map +1 -1
  93. package/dist/index.cjs456.js +1 -2
  94. package/dist/index.cjs456.js.map +1 -1
  95. package/dist/index.cjs457.js +1 -27
  96. package/dist/index.cjs457.js.map +1 -1
  97. package/dist/index.cjs458.js +1 -1
  98. package/dist/index.cjs458.js.map +1 -1
  99. package/dist/index.cjs60.js +1 -1
  100. package/dist/index.cjs60.js.map +1 -1
  101. package/dist/index.es242.js +7 -7
  102. package/dist/index.es249.js +1 -1
  103. package/dist/index.es254.js +1 -1
  104. package/dist/index.es261.js +1 -1
  105. package/dist/index.es308.js +1 -1
  106. package/dist/index.es336.js +2 -2
  107. package/dist/index.es337.js +3 -3
  108. package/dist/index.es344.js +1 -1
  109. package/dist/index.es351.js +1 -1
  110. package/dist/index.es355.js +1 -1
  111. package/dist/index.es356.js +1 -1
  112. package/dist/index.es360.js +1 -1
  113. package/dist/index.es361.js +1 -1
  114. package/dist/index.es362.js +12 -12
  115. package/dist/index.es363.js +1 -1
  116. package/dist/index.es369.js +1 -1
  117. package/dist/index.es370.js +1 -1
  118. package/dist/index.es375.js +128 -0
  119. package/dist/index.es375.js.map +1 -0
  120. package/dist/index.es376.js +138 -0
  121. package/dist/index.es376.js.map +1 -0
  122. package/dist/index.es377.js +13 -124
  123. package/dist/index.es377.js.map +1 -1
  124. package/dist/index.es378.js +14 -134
  125. package/dist/index.es378.js.map +1 -1
  126. package/dist/index.es379.js +7 -12
  127. package/dist/index.es379.js.map +1 -1
  128. package/dist/index.es380.js +50 -15
  129. package/dist/index.es380.js.map +1 -1
  130. package/dist/index.es381.js +53 -9
  131. package/dist/index.es381.js.map +1 -1
  132. package/dist/{index.es387.js → index.es391.js} +1 -1
  133. package/dist/index.es391.js.map +1 -0
  134. package/dist/index.es392.js +2 -11
  135. package/dist/index.es392.js.map +1 -1
  136. package/dist/index.es396.js +10 -177
  137. package/dist/index.es396.js.map +1 -1
  138. package/dist/index.es397.js +46 -4
  139. package/dist/index.es397.js.map +1 -1
  140. package/dist/{index.es394.js → index.es398.js} +1 -1
  141. package/dist/{index.es394.js.map → index.es398.js.map} +1 -1
  142. package/dist/{index.es395.js → index.es399.js} +3 -3
  143. package/dist/{index.es395.js.map → index.es399.js.map} +1 -1
  144. package/dist/index.es400.js +181 -0
  145. package/dist/index.es400.js.map +1 -0
  146. package/dist/index.es401.js +7 -0
  147. package/dist/index.es401.js.map +1 -0
  148. package/dist/index.es402.js +1 -1
  149. package/dist/index.es419.js +1 -1
  150. package/dist/index.es420.js +1 -1
  151. package/dist/index.es425.js +21 -11
  152. package/dist/index.es425.js.map +1 -1
  153. package/dist/index.es428.js +11 -21
  154. package/dist/index.es428.js.map +1 -1
  155. package/dist/{index.es426.js → index.es429.js} +2 -2
  156. package/dist/{index.es426.js.map → index.es429.js.map} +1 -1
  157. package/dist/{index.es427.js → index.es430.js} +1 -1
  158. package/dist/{index.es427.js.map → index.es430.js.map} +1 -1
  159. package/dist/index.es431.js +2 -2
  160. package/dist/index.es434.js +1 -1
  161. package/dist/index.es435.js +2 -2
  162. package/dist/index.es437.js +1 -1
  163. package/dist/index.es438.js +3 -3
  164. package/dist/index.es441.js +4 -4
  165. package/dist/index.es442.js +3674 -9
  166. package/dist/index.es442.js.map +1 -1
  167. package/dist/index.es443.js +2 -178
  168. package/dist/index.es443.js.map +1 -1
  169. package/dist/index.es444.js +5 -3
  170. package/dist/index.es444.js.map +1 -1
  171. package/dist/index.es445.js +510 -122
  172. package/dist/index.es445.js.map +1 -1
  173. package/dist/index.es446.js +129 -36
  174. package/dist/index.es446.js.map +1 -1
  175. package/dist/index.es447.js +178 -2
  176. package/dist/index.es447.js.map +1 -1
  177. package/dist/index.es448.js +10 -2
  178. package/dist/index.es448.js.map +1 -1
  179. package/dist/index.es449.js +4 -2
  180. package/dist/index.es449.js.map +1 -1
  181. package/dist/index.es450.js +40 -3
  182. package/dist/index.es450.js.map +1 -1
  183. package/dist/index.es451.js +2 -2
  184. package/dist/index.es451.js.map +1 -1
  185. package/dist/index.es452.js +2 -4
  186. package/dist/index.es452.js.map +1 -1
  187. package/dist/index.es453.js +2 -5
  188. package/dist/index.es453.js.map +1 -1
  189. package/dist/index.es454.js +3 -4
  190. package/dist/index.es454.js.map +1 -1
  191. package/dist/index.es455.js +2 -6
  192. package/dist/index.es455.js.map +1 -1
  193. package/dist/index.es456.js +3 -520
  194. package/dist/index.es456.js.map +1 -1
  195. package/dist/index.es457.js +4 -3674
  196. package/dist/index.es457.js.map +1 -1
  197. package/dist/index.es458.js +4 -2
  198. package/dist/index.es458.js.map +1 -1
  199. package/dist/index.es60.js +1 -1
  200. package/dist/index.es60.js.map +1 -1
  201. package/package.json +1 -1
  202. package/dist/index.cjs382.js +0 -2
  203. package/dist/index.cjs382.js.map +0 -1
  204. package/dist/index.cjs383.js +0 -2
  205. package/dist/index.cjs383.js.map +0 -1
  206. package/dist/index.cjs387.js.map +0 -1
  207. package/dist/index.cjs388.js +0 -2
  208. package/dist/index.cjs388.js.map +0 -1
  209. package/dist/index.cjs393.js +0 -2
  210. package/dist/index.cjs393.js.map +0 -1
  211. package/dist/index.es382.js +0 -53
  212. package/dist/index.es382.js.map +0 -1
  213. package/dist/index.es383.js +0 -56
  214. package/dist/index.es383.js.map +0 -1
  215. package/dist/index.es387.js.map +0 -1
  216. package/dist/index.es388.js +0 -5
  217. package/dist/index.es388.js.map +0 -1
  218. package/dist/index.es393.js +0 -49
  219. package/dist/index.es393.js.map +0 -1
  220. /package/dist/components/ui/{DoctorModal/DoctorModalFooter/DoctorModalFooter.css → ConsentModal/ConsentModalFooter/ConsentModalFooter.css} +0 -0
@@ -1,5 +1,7 @@
1
- var o = { exports: {} };
1
+ function m(t, [a, n]) {
2
+ return Math.min(n, Math.max(a, t));
3
+ }
2
4
  export {
3
- o as __module
5
+ m as clamp
4
6
  };
5
7
  //# sourceMappingURL=index.es458.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es458.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index.es458.js","sources":["../node_modules/@radix-ui/number/dist/index.mjs"],"sourcesContent":["// packages/core/number/src/number.ts\nfunction clamp(value, [min, max]) {\n return Math.min(max, Math.max(min, value));\n}\nexport {\n clamp\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["clamp","value","min","max"],"mappings":"AACA,SAASA,EAAMC,GAAO,CAACC,GAAKC,CAAG,GAAG;AAChC,SAAO,KAAK,IAAIA,GAAK,KAAK,IAAID,GAAKD,CAAK,CAAC;AAC3C;","x_google_ignoreList":[0]}
@@ -38,7 +38,7 @@ const B = ({
38
38
  onClick: () => o && !i && o(),
39
39
  children: [
40
40
  !a && (c === "left" || c == null) && /* @__PURE__ */ t.jsx(n, { alignItems: "center", onClick: (s) => f(s), children: C }),
41
- /* @__PURE__ */ t.jsx("p", { className: u(h, "fw-semibold fs-7"), children: g }),
41
+ /* @__PURE__ */ t.jsx("p", { className: u("fw-semibold fs-7", h), children: g }),
42
42
  !a && c === "right" && /* @__PURE__ */ t.jsx(n, { alignItems: "center", onClick: (s) => f(s), children: m })
43
43
  ]
44
44
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.es60.js","sources":["../src/components/ui/ActionIconText/index.tsx"],"sourcesContent":["import { Favourite } from \"@/icons\";\nimport clsx from \"clsx\";\nimport React, { useMemo } from \"react\";\nimport { PropsWithChildren, ReactNode } from \"react\";\nimport { InfoPopup, InfoPopupProps } from \"../InfoPopup\";\nimport \"./ActionIconText.scss\";\nimport { ColorKeys } from \"@theme/colors.ts\";\nimport { Row } from \"@/components\";\n\ntype ActionIconTextProps = PropsWithChildren<{\n icon?: ReactNode;\n noIcon?: boolean;\n textLabel?: string;\n handleAction?: () => void;\n handleIconAction?: () => void;\n classNameComponent?: string;\n classNameText?: string;\n disablePointer?: boolean;\n iconPosition?: \"left\" | \"right\";\n popupInfo?: InfoPopupProps;\n iconColor?: ColorKeys;\n positionPopUp?: \"left\" | \"right\" | \"center\";\n}>;\n\nexport const ActionIconText = ({\n iconColor,\n icon = <Favourite color={iconColor} />,\n noIcon = false,\n textLabel = \"Default text\",\n handleAction = () => {},\n handleIconAction = () => {},\n classNameComponent = \"\",\n classNameText = \"\",\n disablePointer = false,\n iconPosition = \"left\",\n popupInfo,\n positionPopUp = \"right\",\n}: ActionIconTextProps) => {\n const runIconAction = (e: React.MouseEvent) => {\n if (!disablePointer && handleIconAction) {\n e.stopPropagation();\n if (popupInfo) {\n setPopupIsOpen(!popupIsOpen);\n }\n handleIconAction();\n }\n };\n\n const [popupIsOpen, setPopupIsOpen] = React.useState(false);\n\n const iconToRender = useMemo(() => {\n return icon || <Favourite color={iconColor} />;\n }, [iconColor, icon]);\n\n return (\n <>\n <Row\n justifyContent={\"center\"}\n alignItems={\"center\"}\n gap={\"x8\"}\n className={clsx(\n disablePointer ? \"text-muted\" : \"cursor-pointer text-primary\",\n classNameComponent,\n )}\n onClick={() => handleAction && !disablePointer && handleAction()}\n >\n {!noIcon && (iconPosition === \"left\" || iconPosition == null) && (\n <Row alignItems={\"center\"} onClick={(e) => runIconAction(e)}>\n {iconToRender}\n </Row>\n )}\n <p className={clsx(classNameText, \"fw-semibold fs-7\")}>{textLabel}</p>\n {!noIcon && iconPosition === \"right\" && (\n <Row alignItems={\"center\"} onClick={(e) => runIconAction(e)}>\n {icon}\n </Row>\n )}\n </Row>\n\n {popupIsOpen && popupInfo && (\n <InfoPopup\n title={popupInfo.title}\n description={popupInfo.description}\n isOpen={popupIsOpen}\n positionPopUp={positionPopUp}\n onClickCloseBtn={() => setPopupIsOpen(!popupIsOpen)}\n className={popupInfo.className}\n ></InfoPopup>\n )}\n </>\n );\n};\n"],"names":["ActionIconText","iconColor","icon","jsx","Favourite","noIcon","textLabel","handleAction","handleIconAction","classNameComponent","classNameText","disablePointer","iconPosition","popupInfo","positionPopUp","runIconAction","e","setPopupIsOpen","popupIsOpen","React","iconToRender","useMemo","jsxs","Fragment","Row","clsx","InfoPopup"],"mappings":";;;;;;;AAwBO,MAAMA,IAAiB,CAAC;AAAA,EAC7B,WAAAC;AAAA,EACA,MAAAC,IAAOC,gBAAAA,EAAAA,IAACC,GAAU,EAAA,OAAOH,EAAW,CAAA;AAAA,EACpC,QAAAI,IAAS;AAAA,EACT,WAAAC,IAAY;AAAA,EACZ,cAAAC,IAAe,MAAM;AAAA,EAAC;AAAA,EACtB,kBAAAC,IAAmB,MAAM;AAAA,EAAC;AAAA,EAC1B,oBAAAC,IAAqB;AAAA,EACrB,eAAAC,IAAgB;AAAA,EAChB,gBAAAC,IAAiB;AAAA,EACjB,cAAAC,IAAe;AAAA,EACf,WAAAC;AAAA,EACA,eAAAC,IAAgB;AAClB,MAA2B;AACnB,QAAAC,IAAgB,CAACC,MAAwB;AACzC,IAAA,CAACL,KAAkBH,MACrBQ,EAAE,gBAAgB,GACdH,KACFI,EAAe,CAACC,CAAW,GAEZV,EAAA;AAAA,EAErB,GAEM,CAACU,GAAaD,CAAc,IAAIE,EAAM,SAAS,EAAK,GAEpDC,IAAeC,EAAQ,MACpBnB,KAAQC,gBAAAA,EAAAA,IAACC,GAAU,EAAA,OAAOH,EAAW,CAAA,GAC3C,CAACA,GAAWC,CAAI,CAAC;AAEpB,SAEIoB,gBAAAA,EAAA,KAAAC,YAAA,EAAA,UAAA;AAAA,IAAAD,gBAAAA,EAAA;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,gBAAgB;AAAA,QAChB,YAAY;AAAA,QACZ,KAAK;AAAA,QACL,WAAWC;AAAA,UACTd,IAAiB,eAAe;AAAA,UAChCF;AAAA,QACF;AAAA,QACA,SAAS,MAAMF,KAAgB,CAACI,KAAkBJ,EAAa;AAAA,QAE9D,UAAA;AAAA,UAAA,CAACF,MAAWO,MAAiB,UAAUA,KAAgB,SACrDT,gBAAAA,EAAA,IAAAqB,GAAA,EAAI,YAAY,UAAU,SAAS,CAACR,MAAMD,EAAcC,CAAC,GACvD,UACHI,GAAA;AAAA,gCAED,KAAE,EAAA,WAAWK,EAAKf,GAAe,kBAAkB,GAAI,UAAUJ,GAAA;AAAA,UACjE,CAACD,KAAUO,MAAiB,iCAC1BY,GAAI,EAAA,YAAY,UAAU,SAAS,CAACR,MAAMD,EAAcC,CAAC,GACvD,UACHd,EAAA,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAEJ;AAAA,IAECgB,KAAeL,KACdV,gBAAAA,EAAA;AAAA,MAACuB;AAAA,MAAA;AAAA,QACC,OAAOb,EAAU;AAAA,QACjB,aAAaA,EAAU;AAAA,QACvB,QAAQK;AAAA,QACR,eAAAJ;AAAA,QACA,iBAAiB,MAAMG,EAAe,CAACC,CAAW;AAAA,QAClD,WAAWL,EAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EACtB,GAEL;AAEJ;"}
1
+ {"version":3,"file":"index.es60.js","sources":["../src/components/ui/ActionIconText/index.tsx"],"sourcesContent":["import { Favourite } from \"@/icons\";\nimport clsx from \"clsx\";\nimport React, { useMemo } from \"react\";\nimport { PropsWithChildren, ReactNode } from \"react\";\nimport { InfoPopup, InfoPopupProps } from \"../InfoPopup\";\nimport \"./ActionIconText.scss\";\nimport { ColorKeys } from \"@theme/colors.ts\";\nimport { Row } from \"@/components\";\n\ntype ActionIconTextProps = PropsWithChildren<{\n icon?: ReactNode;\n noIcon?: boolean;\n textLabel?: string;\n handleAction?: () => void;\n handleIconAction?: () => void;\n classNameComponent?: string;\n classNameText?: string;\n disablePointer?: boolean;\n iconPosition?: \"left\" | \"right\";\n popupInfo?: InfoPopupProps;\n iconColor?: ColorKeys;\n positionPopUp?: \"left\" | \"right\" | \"center\";\n}>;\n\nexport const ActionIconText = ({\n iconColor,\n icon = <Favourite color={iconColor} />,\n noIcon = false,\n textLabel = \"Default text\",\n handleAction = () => {},\n handleIconAction = () => {},\n classNameComponent = \"\",\n classNameText = \"\",\n disablePointer = false,\n iconPosition = \"left\",\n popupInfo,\n positionPopUp = \"right\",\n}: ActionIconTextProps) => {\n const runIconAction = (e: React.MouseEvent) => {\n if (!disablePointer && handleIconAction) {\n e.stopPropagation();\n if (popupInfo) {\n setPopupIsOpen(!popupIsOpen);\n }\n handleIconAction();\n }\n };\n\n const [popupIsOpen, setPopupIsOpen] = React.useState(false);\n\n const iconToRender = useMemo(() => {\n return icon || <Favourite color={iconColor} />;\n }, [iconColor, icon]);\n\n return (\n <>\n <Row\n justifyContent={\"center\"}\n alignItems={\"center\"}\n gap={\"x8\"}\n className={clsx(\n disablePointer ? \"text-muted\" : \"cursor-pointer text-primary\",\n classNameComponent,\n )}\n onClick={() => handleAction && !disablePointer && handleAction()}\n >\n {!noIcon && (iconPosition === \"left\" || iconPosition == null) && (\n <Row alignItems={\"center\"} onClick={(e) => runIconAction(e)}>\n {iconToRender}\n </Row>\n )}\n <p className={clsx(\"fw-semibold fs-7\", classNameText)}>{textLabel}</p>\n {!noIcon && iconPosition === \"right\" && (\n <Row alignItems={\"center\"} onClick={(e) => runIconAction(e)}>\n {icon}\n </Row>\n )}\n </Row>\n\n {popupIsOpen && popupInfo && (\n <InfoPopup\n title={popupInfo.title}\n description={popupInfo.description}\n isOpen={popupIsOpen}\n positionPopUp={positionPopUp}\n onClickCloseBtn={() => setPopupIsOpen(!popupIsOpen)}\n className={popupInfo.className}\n ></InfoPopup>\n )}\n </>\n );\n};\n"],"names":["ActionIconText","iconColor","icon","jsx","Favourite","noIcon","textLabel","handleAction","handleIconAction","classNameComponent","classNameText","disablePointer","iconPosition","popupInfo","positionPopUp","runIconAction","e","setPopupIsOpen","popupIsOpen","React","iconToRender","useMemo","jsxs","Fragment","Row","clsx","InfoPopup"],"mappings":";;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,EAAK,oBAAoBf,CAAa,GAAI,UAAUJ,GAAA;AAAA,UACjE,CAACD,KAAUO,MAAiB,iCAC1BY,GAAI,EAAA,YAAY,UAAU,SAAS,CAACR,MAAMD,EAAcC,CAAC,GACvD,UACHd,EAAA,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAEJ;AAAA,IAECgB,KAAeL,KACdV,gBAAAA,EAAA;AAAA,MAACuB;AAAA,MAAA;AAAA,QACC,OAAOb,EAAU;AAAA,QACjB,aAAaA,EAAU;AAAA,QACvB,QAAQK;AAAA,QACR,eAAAJ;AAAA,QACA,iBAAiB,MAAMG,EAAe,CAACC,CAAW;AAAA,QAClD,WAAWL,EAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EACtB,GAEL;AAEJ;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anoki/fse-ui",
3
- "version": "1.0.621",
3
+ "version": "1.0.622",
4
4
  "description": "FSE UI components library",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var k=function(r){if(typeof document>"u")return null;var u=Array.isArray(r)?r[0]:r;return u.ownerDocument.body},f=new WeakMap,v=new WeakMap,p={},h=0,b=function(r){return r&&(r.host||b(r.parentNode))},O=function(r,u){return u.map(function(t){if(r.contains(t))return t;var n=b(t);return n&&r.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",r,". Doing nothing"),null)}).filter(function(t){return!!t})},D=function(r,u,t,n){var i=O(u,Array.isArray(r)?r:[r]);p[t]||(p[t]=new WeakMap);var o=p[t],l=[],s=new Set,S=new Set(i),y=function(e){!e||s.has(e)||(s.add(e),y(e.parentNode))};i.forEach(y);var A=function(e){!e||S.has(e)||Array.prototype.forEach.call(e.children,function(a){if(s.has(a))A(a);else try{var c=a.getAttribute(n),d=c!==null&&c!=="false",w=(f.get(a)||0)+1,M=(o.get(a)||0)+1;f.set(a,w),o.set(a,M),l.push(a),w===1&&d&&v.set(a,!0),M===1&&a.setAttribute(t,"true"),d||a.setAttribute(n,"true")}catch(W){console.error("aria-hidden: cannot operate on ",a,W)}})};return A(u),s.clear(),h++,function(){l.forEach(function(e){var a=f.get(e)-1,c=o.get(e)-1;f.set(e,a),o.set(e,c),a||(v.has(e)||e.removeAttribute(n),v.delete(e)),c||e.removeAttribute(t)}),h--,h||(f=new WeakMap,f=new WeakMap,v=new WeakMap,p={})}},E=function(r,u,t){t===void 0&&(t="data-aria-hidden");var n=Array.from(Array.isArray(r)?r:[r]),i=k(r);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),D(n,i,t,"aria-hidden")):function(){return null}};exports.hideOthers=E;
2
- //# sourceMappingURL=index.cjs382.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs382.js","sources":["../node_modules/aria-hidden/dist/es2015/index.js"],"sourcesContent":["var getDefaultParent = function (originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n return targets\n .map(function (target) {\n if (parent.contains(target)) {\n return target;\n }\n var correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n return null;\n })\n .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n var elementsToStop = new Set(targets);\n var keep = function (el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n var deep = function (parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n }\n else {\n try {\n var attr = node.getAttribute(controlAttribute);\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n catch (e) {\n console.error('aria-hidden: cannot operate on ', node, e);\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var hideOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n // we should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10\n targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live]')));\n return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var inertOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-inert-ed'; }\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\n/**\n * @returns if current browser supports inert\n */\nexport var supportsInert = function () {\n return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var suppressOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-suppressed'; }\n return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);\n};\n"],"names":["getDefaultParent","originalTarget","sampleTarget","counterMap","uncontrolledNodes","markerMap","lockCount","unwrapHost","node","correctTargets","parent","targets","target","correctedTarget","x","applyAttributeToOthers","parentNode","markerName","controlAttribute","markerCounter","hiddenNodes","elementsToKeep","elementsToStop","keep","el","deep","attr","alreadyHidden","counterValue","markerValue","e","hideOthers","activeParentNode"],"mappings":"gFAAA,IAAIA,EAAmB,SAAUC,EAAgB,CAC7C,GAAI,OAAO,SAAa,IACpB,OAAO,KAEX,IAAIC,EAAe,MAAM,QAAQD,CAAc,EAAIA,EAAe,CAAC,EAAIA,EACvE,OAAOC,EAAa,cAAc,IACtC,EACIC,EAAa,IAAI,QACjBC,EAAoB,IAAI,QACxBC,EAAY,CAAE,EACdC,EAAY,EACZC,EAAa,SAAUC,EAAM,CAC7B,OAAOA,IAASA,EAAK,MAAQD,EAAWC,EAAK,UAAU,EAC3D,EACIC,EAAiB,SAAUC,EAAQC,EAAS,CAC5C,OAAOA,EACF,IAAI,SAAUC,EAAQ,CACvB,GAAIF,EAAO,SAASE,CAAM,EACtB,OAAOA,EAEX,IAAIC,EAAkBN,EAAWK,CAAM,EACvC,OAAIC,GAAmBH,EAAO,SAASG,CAAe,EAC3CA,GAEX,QAAQ,MAAM,cAAeD,EAAQ,0BAA2BF,EAAQ,iBAAiB,EAClF,KACV,CAAA,EACI,OAAO,SAAUI,EAAG,CAAE,MAAO,EAAQA,EAAK,CACnD,EASIC,EAAyB,SAAUd,EAAgBe,EAAYC,EAAYC,EAAkB,CAC7F,IAAIP,EAAUF,EAAeO,EAAY,MAAM,QAAQf,CAAc,EAAIA,EAAiB,CAACA,CAAc,CAAC,EACrGI,EAAUY,CAAU,IACrBZ,EAAUY,CAAU,EAAI,IAAI,SAEhC,IAAIE,EAAgBd,EAAUY,CAAU,EACpCG,EAAc,CAAE,EAChBC,EAAiB,IAAI,IACrBC,EAAiB,IAAI,IAAIX,CAAO,EAChCY,EAAO,SAAUC,EAAI,CACjB,CAACA,GAAMH,EAAe,IAAIG,CAAE,IAGhCH,EAAe,IAAIG,CAAE,EACrBD,EAAKC,EAAG,UAAU,EACrB,EACDb,EAAQ,QAAQY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,SAAU9B,EAAgBe,EAAYC,EAAY,CAClEA,IAAe,SAAUA,EAAa,oBAC1C,IAAIN,EAAU,MAAM,KAAK,MAAM,QAAQV,CAAc,EAAIA,EAAiB,CAACA,CAAc,CAAC,EACtF+B,EAAiChC,EAAiBC,CAAc,EACpE,OAAK+B,GAILrB,EAAQ,KAAK,MAAMA,EAAS,MAAM,KAAKqB,EAAiB,iBAAiB,aAAa,CAAC,CAAC,EACjFjB,EAAuBJ,EAASqB,EAAkBf,EAAY,aAAa,GAJvE,UAAY,CAAE,OAAO,IAAO,CAK3C","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),g=require("./index.cjs358.js"),u=require("./index.cjs196.js");function S(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const l=S(y);function b(e){const t=x(e),n=l.forwardRef((r,o)=>{const{children:i,...c}=r,s=l.Children.toArray(i),f=s.find(E);if(f){const a=f.props.children,m=s.map(p=>p===f?l.Children.count(a)>1?l.Children.only(null):l.isValidElement(a)?a.props.children:null:p);return u.jsxRuntimeExports.jsx(t,{...c,ref:o,children:l.isValidElement(a)?l.cloneElement(a,void 0,m):null})}return u.jsxRuntimeExports.jsx(t,{...c,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function x(e){const t=l.forwardRef((n,r)=>{const{children:o,...i}=n;if(l.isValidElement(o)){const c=O(o),s=R(i,o.props);return o.type!==l.Fragment&&(s.ref=r?g.composeRefs(r,c):c),l.cloneElement(o,s)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var d=Symbol("radix.slottable");function j(e){const t=({children:n})=>u.jsxRuntimeExports.jsx(u.jsxRuntimeExports.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=d,t}function E(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===d}function R(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function O(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}exports.createSlot=b;exports.createSlottable=j;
2
- //# sourceMappingURL=index.cjs383.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs383.js","sources":["../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// packages/react/slot/src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","composeRefs","SLOTTABLE_IDENTIFIER","createSlottable","Slottable2","Fragment2","childProps","overrideProps","propName","slotPropValue","childPropValue","args","element","getter","_a","mayWarn","_b"],"mappings":"icAKA,SAASA,EAAWC,EAAW,CAC7B,MAAMC,EAA4BC,EAAgBF,CAAS,EACrDG,EAAQC,EAAM,WAAW,CAACC,EAAOC,IAAiB,CACtD,KAAM,CAAE,SAAAC,EAAU,GAAGC,CAAS,EAAKH,EAC7BI,EAAgBL,EAAM,SAAS,QAAQG,CAAQ,EAC/CG,EAAYD,EAAc,KAAKE,CAAW,EAChD,GAAID,EAAW,CACb,MAAME,EAAaF,EAAU,MAAM,SAC7BG,EAAcJ,EAAc,IAAKK,GACjCA,IAAUJ,EACRN,EAAM,SAAS,MAAMQ,CAAU,EAAI,EAAUR,EAAM,SAAS,KAAK,IAAI,EAClEA,EAAM,eAAeQ,CAAU,EAAIA,EAAW,MAAM,SAAW,KAE/DE,CAEV,EACD,OAAuBC,EAAAA,kBAAAA,IAAId,EAAW,CAAE,GAAGO,EAAW,IAAKF,EAAc,SAAUF,EAAM,eAAeQ,CAAU,EAAIR,EAAM,aAAaQ,EAAY,OAAQC,CAAW,EAAI,KAAM,CACxL,CACI,OAAuBE,EAAAA,kBAAA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iBC,EACnBH,EAAcC,CAAQ,EAAI,IAAIG,IAAS,CACrCD,EAAe,GAAGC,CAAI,EACtBF,EAAc,GAAGE,CAAI,CACtB,EACQF,IACTF,EAAcC,CAAQ,EAAIC,GAEnBD,IAAa,QACtBD,EAAcC,CAAQ,EAAI,CAAE,GAAGC,EAAe,GAAGC,CAAgB,EACxDF,IAAa,cACtBD,EAAcC,CAAQ,EAAI,CAACC,EAAeC,CAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAExF,CACE,MAAO,CAAE,GAAGrB,EAAW,GAAGkB,CAAe,CAC3C,CACA,SAAST,EAAcc,EAAS,SAC9B,IAAIC,GAASC,EAAA,OAAO,yBAAyBF,EAAQ,MAAO,KAAK,IAApD,YAAAE,EAAuD,IAChEC,EAAUF,GAAU,mBAAoBA,GAAUA,EAAO,eAC7D,OAAIE,EACKH,EAAQ,KAEjBC,GAASG,EAAA,OAAO,yBAAyBJ,EAAS,KAAK,IAA9C,YAAAI,EAAiD,IAC1DD,EAAUF,GAAU,mBAAoBA,GAAUA,EAAO,eACrDE,EACKH,EAAQ,MAAM,IAEhBA,EAAQ,MAAM,KAAOA,EAAQ,IACtC","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs387.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
2
- //# sourceMappingURL=index.cjs388.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs388.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),v=require("./index.cjs359.js"),I=require("./index.cjs358.js"),M=require("./index.cjs383.js"),f=require("./index.cjs196.js");function _(s){const u=s+"CollectionProvider",[E,A]=v.createContextScope(u),[N,d]=E(u,{collectionRef:{current:null},itemMap:new Map}),p=c=>{const{scope:e,children:l}=c,t=r.useRef(null),o=r.useRef(new Map).current;return f.jsxRuntimeExports.jsx(N,{scope:e,itemMap:o,collectionRef:t,children:l})};p.displayName=u;const a=s+"CollectionSlot",T=M.createSlot(a),C=r.forwardRef((c,e)=>{const{scope:l,children:t}=c,o=d(a,l),n=I.useComposedRefs(e,o.collectionRef);return f.jsxRuntimeExports.jsx(T,{ref:n,children:t})});C.displayName=a;const m=s+"CollectionItemSlot",x="data-radix-collection-item",j=M.createSlot(m),R=r.forwardRef((c,e)=>{const{scope:l,children:t,...o}=c,n=r.useRef(null),S=I.useComposedRefs(e,n),i=d(m,l);return r.useEffect(()=>(i.itemMap.set(n,{ref:n,...o}),()=>void i.itemMap.delete(n))),f.jsxRuntimeExports.jsx(j,{[x]:"",ref:S,children:t})});R.displayName=m;function y(c){const e=d(s+"CollectionConsumer",c);return r.useCallback(()=>{const t=e.collectionRef.current;if(!t)return[];const o=Array.from(t.querySelectorAll(`[${x}]`));return Array.from(e.itemMap.values()).sort((i,O)=>o.indexOf(i.ref.current)-o.indexOf(O.ref.current))},[e.collectionRef,e.itemMap])}return[{Provider:p,Slot:C,ItemSlot:R},y,A]}exports.createCollection=_;
2
- //# sourceMappingURL=index.cjs393.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs393.js","sources":["../node_modules/@radix-ui/react-collection/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/collection/src/collection.tsx\nimport React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createCollection(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }\n );\n const CollectionProvider = (props) => {\n const { scope, children } = props;\n const ref = React.useRef(null);\n const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;\n return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...itemData });\n return () => void context.itemMap.delete(ref);\n });\n return /* @__PURE__ */ jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useCollection(scope) {\n const context = useCollectionContext(name + \"CollectionConsumer\", scope);\n const getItems = React.useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)\n );\n return orderedItems;\n }, [context.collectionRef, context.itemMap]);\n return getItems;\n }\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection,\n createCollectionScope\n ];\n}\nexport {\n createCollection\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createCollection","name","PROVIDER_NAME","createCollectionContext","createCollectionScope","createContextScope","CollectionProviderImpl","useCollectionContext","CollectionProvider","props","scope","children","ref","React","itemMap","jsx","COLLECTION_SLOT_NAME","CollectionSlotImpl","createSlot","CollectionSlot","forwardedRef","context","composedRefs","useComposedRefs","ITEM_SLOT_NAME","ITEM_DATA_ATTR","CollectionItemSlotImpl","CollectionItemSlot","itemData","useCollection","collectionNode","orderedNodes","a","b"],"mappings":"qOAQA,SAASA,EAAiBC,EAAM,CAC9B,MAAMC,EAAgBD,EAAO,qBACvB,CAACE,EAAyBC,CAAqB,EAAIC,EAAAA,mBAAmBH,CAAa,EACnF,CAACI,EAAwBC,CAAoB,EAAIJ,EACrDD,EACA,CAAE,cAAe,CAAE,QAAS,IAAI,EAAI,QAAyB,IAAI,GAAK,CACvE,EACKM,EAAsBC,GAAU,CACpC,KAAM,CAAE,MAAAC,EAAO,SAAAC,CAAQ,EAAKF,EACtBG,EAAMC,EAAM,OAAO,IAAI,EACvBC,EAAUD,EAAM,OAAuB,IAAI,GAAK,EAAE,QACxD,OAAuBE,EAAG,kBAAA,IAACT,EAAwB,CAAE,MAAAI,EAAO,QAAAI,EAAS,cAAeF,EAAK,SAAAD,EAAU,CACpG,EACDH,EAAmB,YAAcN,EACjC,MAAMc,EAAuBf,EAAO,iBAC9BgB,EAAqBC,EAAU,WAACF,CAAoB,EACpDG,EAAiBN,EAAM,WAC3B,CAACJ,EAAOW,IAAiB,CACvB,KAAM,CAAE,MAAAV,EAAO,SAAAC,CAAQ,EAAKF,EACtBY,EAAUd,EAAqBS,EAAsBN,CAAK,EAC1DY,EAAeC,EAAe,gBAACH,EAAcC,EAAQ,aAAa,EACxE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pFE,EACAzB,CACD,CACH","x_google_ignoreList":[0]}
@@ -1,53 +0,0 @@
1
- var S = function(r) {
2
- if (typeof document > "u")
3
- return null;
4
- var u = Array.isArray(r) ? r[0] : r;
5
- return u.ownerDocument.body;
6
- }, f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {}, h = 0, W = function(r) {
7
- return r && (r.host || W(r.parentNode));
8
- }, D = function(r, u) {
9
- return u.map(function(e) {
10
- if (r.contains(e))
11
- return e;
12
- var n = W(e);
13
- return n && r.contains(n) ? n : (console.error("aria-hidden", e, "in not contained inside", r, ". Doing nothing"), null);
14
- }).filter(function(e) {
15
- return !!e;
16
- });
17
- }, E = function(r, u, e, n) {
18
- var i = D(u, Array.isArray(r) ? r : [r]);
19
- p[e] || (p[e] = /* @__PURE__ */ new WeakMap());
20
- var o = p[e], l = [], s = /* @__PURE__ */ new Set(), b = new Set(i), y = function(t) {
21
- !t || s.has(t) || (s.add(t), y(t.parentNode));
22
- };
23
- i.forEach(y);
24
- var A = function(t) {
25
- !t || b.has(t) || Array.prototype.forEach.call(t.children, function(a) {
26
- if (s.has(a))
27
- A(a);
28
- else
29
- try {
30
- var c = a.getAttribute(n), w = c !== null && c !== "false", d = (f.get(a) || 0) + 1, M = (o.get(a) || 0) + 1;
31
- f.set(a, d), o.set(a, M), l.push(a), d === 1 && w && v.set(a, !0), M === 1 && a.setAttribute(e, "true"), w || a.setAttribute(n, "true");
32
- } catch (k) {
33
- console.error("aria-hidden: cannot operate on ", a, k);
34
- }
35
- });
36
- };
37
- return A(u), s.clear(), h++, function() {
38
- l.forEach(function(t) {
39
- var a = f.get(t) - 1, c = o.get(t) - 1;
40
- f.set(t, a), o.set(t, c), a || (v.has(t) || t.removeAttribute(n), v.delete(t)), c || t.removeAttribute(e);
41
- }), h--, h || (f = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {});
42
- };
43
- }, C = function(r, u, e) {
44
- e === void 0 && (e = "data-aria-hidden");
45
- var n = Array.from(Array.isArray(r) ? r : [r]), i = S(r);
46
- return i ? (n.push.apply(n, Array.from(i.querySelectorAll("[aria-live]"))), E(n, i, e, "aria-hidden")) : function() {
47
- return null;
48
- };
49
- };
50
- export {
51
- C as hideOthers
52
- };
53
- //# sourceMappingURL=index.es382.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.es382.js","sources":["../node_modules/aria-hidden/dist/es2015/index.js"],"sourcesContent":["var getDefaultParent = function (originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n return targets\n .map(function (target) {\n if (parent.contains(target)) {\n return target;\n }\n var correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n return null;\n })\n .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n var elementsToStop = new Set(targets);\n var keep = function (el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n var deep = function (parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n }\n else {\n try {\n var attr = node.getAttribute(controlAttribute);\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n catch (e) {\n console.error('aria-hidden: cannot operate on ', node, e);\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var hideOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n // we should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10\n targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live]')));\n return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var inertOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-inert-ed'; }\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\n/**\n * @returns if current browser supports inert\n */\nexport var supportsInert = function () {\n return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var suppressOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-suppressed'; }\n return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);\n};\n"],"names":["getDefaultParent","originalTarget","sampleTarget","counterMap","uncontrolledNodes","markerMap","lockCount","unwrapHost","node","correctTargets","parent","targets","target","correctedTarget","x","applyAttributeToOthers","parentNode","markerName","controlAttribute","markerCounter","hiddenNodes","elementsToKeep","elementsToStop","keep","el","deep","attr","alreadyHidden","counterValue","markerValue","e","hideOthers","activeParentNode"],"mappings":"AAAA,IAAIA,IAAmB,SAAUC,GAAgB;AAC7C,MAAI,OAAO,WAAa;AACpB,WAAO;AAEX,MAAIC,IAAe,MAAM,QAAQD,CAAc,IAAIA,EAAe,CAAC,IAAI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M,QAAQV,CAAc,IAAIA,IAAiB,CAACA,CAAc,CAAC,GACtF+B,IAAiChC,EAAiBC,CAAc;AACpE,SAAK+B,KAILrB,EAAQ,KAAK,MAAMA,GAAS,MAAM,KAAKqB,EAAiB,iBAAiB,aAAa,CAAC,CAAC,GACjFjB,EAAuBJ,GAASqB,GAAkBf,GAAY,aAAa,KAJvE,WAAY;AAAE,WAAO;AAAA,EAAO;AAK3C;","x_google_ignoreList":[0]}
@@ -1,56 +0,0 @@
1
- import * as l from "react";
2
- import { composeRefs as y } from "./index.es358.js";
3
- import { j as f } from "./index.es196.js";
4
- // @__NO_SIDE_EFFECTS__
5
- function b(e) {
6
- const t = /* @__PURE__ */ S(e), o = l.forwardRef((n, r) => {
7
- const { children: i, ...a } = n, s = l.Children.toArray(i), p = s.find(g);
8
- if (p) {
9
- const c = p.props.children, m = s.map((u) => u === p ? l.Children.count(c) > 1 ? l.Children.only(null) : l.isValidElement(c) ? c.props.children : null : u);
10
- return /* @__PURE__ */ f.jsx(t, { ...a, ref: r, children: l.isValidElement(c) ? l.cloneElement(c, void 0, m) : null });
11
- }
12
- return /* @__PURE__ */ f.jsx(t, { ...a, ref: r, children: i });
13
- });
14
- return o.displayName = `${e}.Slot`, o;
15
- }
16
- // @__NO_SIDE_EFFECTS__
17
- function S(e) {
18
- const t = l.forwardRef((o, n) => {
19
- const { children: r, ...i } = o;
20
- if (l.isValidElement(r)) {
21
- const a = x(r), s = E(i, r.props);
22
- return r.type !== l.Fragment && (s.ref = n ? y(n, a) : a), l.cloneElement(r, s);
23
- }
24
- return l.Children.count(r) > 1 ? l.Children.only(null) : null;
25
- });
26
- return t.displayName = `${e}.SlotClone`, t;
27
- }
28
- var d = Symbol("radix.slottable");
29
- // @__NO_SIDE_EFFECTS__
30
- function h(e) {
31
- const t = ({ children: o }) => /* @__PURE__ */ f.jsx(f.Fragment, { children: o });
32
- return t.displayName = `${e}.Slottable`, t.__radixId = d, t;
33
- }
34
- function g(e) {
35
- return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === d;
36
- }
37
- function E(e, t) {
38
- const o = { ...t };
39
- for (const n in t) {
40
- const r = e[n], i = t[n];
41
- /^on[A-Z]/.test(n) ? r && i ? o[n] = (...s) => {
42
- i(...s), r(...s);
43
- } : r && (o[n] = r) : n === "style" ? o[n] = { ...r, ...i } : n === "className" && (o[n] = [r, i].filter(Boolean).join(" "));
44
- }
45
- return { ...e, ...o };
46
- }
47
- function x(e) {
48
- var n, r;
49
- let t = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, o = t && "isReactWarning" in t && t.isReactWarning;
50
- return o ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
51
- }
52
- export {
53
- b as createSlot,
54
- h as createSlottable
55
- };
56
- //# sourceMappingURL=index.es383.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.es383.js","sources":["../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// packages/react/slot/src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","composeRefs","SLOTTABLE_IDENTIFIER","createSlottable","Slottable2","Fragment2","childProps","overrideProps","propName","slotPropValue","childPropValue","args","element","getter","_a","mayWarn","_b"],"mappings":";;;;AAKA,SAASA,EAAWC,GAAW;AAC7B,QAAMC,IAA4B,gBAAAC,EAAgBF,CAAS,GACrDG,IAAQC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACtD,UAAM,EAAE,UAAAC,GAAU,GAAGC,EAAS,IAAKH,GAC7BI,IAAgBL,EAAM,SAAS,QAAQG,CAAQ,GAC/CG,IAAYD,EAAc,KAAKE,CAAW;AAChD,QAAID,GAAW;AACb,YAAME,IAAaF,EAAU,MAAM,UAC7BG,IAAcJ,EAAc,IAAI,CAACK,MACjCA,MAAUJ,IACRN,EAAM,SAAS,MAAMQ,CAAU,IAAI,IAAUR,EAAM,SAAS,KAAK,IAAI,IAClEA,EAAM,eAAeQ,CAAU,IAAIA,EAAW,MAAM,WAAW,OAE/DE,CAEV;AACD,aAAuBC,gBAAAA,EAAAA,IAAId,GAAW,EAAE,GAAGO,GAAW,KAAKF,GAAc,UAAUF,EAAM,eAAeQ,CAAU,IAAIR,EAAM,aA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AMG,IAAgBpB,EAAUmB,CAAQ,GAClCE,IAAiBJ,EAAWE,CAAQ;AAE1C,IADkB,WAAW,KAAKA,CAAQ,IAEpCC,KAAiBC,IACnBH,EAAcC,CAAQ,IAAI,IAAIG,MAAS;AACrC,MAAAD,EAAe,GAAGC,CAAI,GACtBF,EAAc,GAAGE,CAAI;AAAA,IACtB,IACQF,MACTF,EAAcC,CAAQ,IAAIC,KAEnBD,MAAa,UACtBD,EAAcC,CAAQ,IAAI,EAAE,GAAGC,GAAe,GAAGC,EAAgB,IACxDF,MAAa,gBACtBD,EAAcC,CAAQ,IAAI,CAACC,GAAeC,CAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,EAExF;AACE,SAAO,EAAE,GAAGrB,GAAW,GAAGkB,EAAe;AAC3C;AACA,SAAST,EAAcc,GAAS;;AAC9B,MAAIC,KAASC,IAAA,OAAO,yBAAyBF,EAAQ,OAAO,KAAK,MAApD,gBAAAE,EAAuD,KAChEC,IAAUF,KAAU,oBAAoBA,KAAUA,EAAO;AAC7D,SAAIE,IACKH,EAAQ,OAEjBC,KAASG,IAAA,OAAO,yBAAyBJ,GAAS,KAAK,MAA9C,gBAAAI,EAAiD,KAC1DD,IAAUF,KAAU,oBAAoBA,KAAUA,EAAO,gBACrDE,IACKH,EAAQ,MAAM,MAEhBA,EAAQ,MAAM,OAAOA,EAAQ;AACtC;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.es387.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,5 +0,0 @@
1
- var e = {};
2
- export {
3
- e as __exports
4
- };
5
- //# sourceMappingURL=index.es388.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.es388.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,49 +0,0 @@
1
- import r from "react";
2
- import { createContextScope as y } from "./index.es359.js";
3
- import { useComposedRefs as S } from "./index.es358.js";
4
- import { createSlot as M } from "./index.es383.js";
5
- import { j as d } from "./index.es196.js";
6
- function D(s) {
7
- const m = s + "CollectionProvider", [A, E] = y(m), [N, f] = A(
8
- m,
9
- { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
10
- ), p = (c) => {
11
- const { scope: e, children: l } = c, o = r.useRef(null), t = r.useRef(/* @__PURE__ */ new Map()).current;
12
- return /* @__PURE__ */ d.jsx(N, { scope: e, itemMap: t, collectionRef: o, children: l });
13
- };
14
- p.displayName = m;
15
- const a = s + "CollectionSlot", _ = M(a), C = r.forwardRef(
16
- (c, e) => {
17
- const { scope: l, children: o } = c, t = f(a, l), n = S(e, t.collectionRef);
18
- return /* @__PURE__ */ d.jsx(_, { ref: n, children: o });
19
- }
20
- );
21
- C.displayName = a;
22
- const u = s + "CollectionItemSlot", R = "data-radix-collection-item", T = M(u), x = r.forwardRef(
23
- (c, e) => {
24
- const { scope: l, children: o, ...t } = c, n = r.useRef(null), I = S(e, n), i = f(u, l);
25
- return r.useEffect(() => (i.itemMap.set(n, { ref: n, ...t }), () => void i.itemMap.delete(n))), /* @__PURE__ */ d.jsx(T, { [R]: "", ref: I, children: o });
26
- }
27
- );
28
- x.displayName = u;
29
- function O(c) {
30
- const e = f(s + "CollectionConsumer", c);
31
- return r.useCallback(() => {
32
- const o = e.collectionRef.current;
33
- if (!o) return [];
34
- const t = Array.from(o.querySelectorAll(`[${R}]`));
35
- return Array.from(e.itemMap.values()).sort(
36
- (i, v) => t.indexOf(i.ref.current) - t.indexOf(v.ref.current)
37
- );
38
- }, [e.collectionRef, e.itemMap]);
39
- }
40
- return [
41
- { Provider: p, Slot: C, ItemSlot: x },
42
- O,
43
- E
44
- ];
45
- }
46
- export {
47
- D as createCollection
48
- };
49
- //# sourceMappingURL=index.es393.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.es393.js","sources":["../node_modules/@radix-ui/react-collection/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/collection/src/collection.tsx\nimport React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createCollection(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }\n );\n const CollectionProvider = (props) => {\n const { scope, children } = props;\n const ref = React.useRef(null);\n const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;\n return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...itemData });\n return () => void context.itemMap.delete(ref);\n });\n return /* @__PURE__ */ jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useCollection(scope) {\n const context = useCollectionContext(name + \"CollectionConsumer\", scope);\n const getItems = React.useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)\n );\n return orderedItems;\n }, [context.collectionRef, context.itemMap]);\n return getItems;\n }\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection,\n createCollectionScope\n ];\n}\nexport {\n createCollection\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createCollection","name","PROVIDER_NAME","createCollectionContext","createCollectionScope","createContextScope","CollectionProviderImpl","useCollectionContext","CollectionProvider","props","scope","children","ref","React","itemMap","jsx","COLLECTION_SLOT_NAME","CollectionSlotImpl","createSlot","CollectionSlot","forwardedRef","context","composedRefs","useComposedRefs","ITEM_SLOT_NAME","ITEM_DATA_ATTR","CollectionItemSlotImpl","CollectionItemSlot","itemData","useCollection","collectionNode","orderedNodes","a","b"],"mappings":";;;;;AAQA,SAASA,EAAiBC,GAAM;AAC9B,QAAMC,IAAgBD,IAAO,sBACvB,CAACE,GAAyBC,CAAqB,IAAIC,EAAmBH,CAAa,GACnF,CAACI,GAAwBC,CAAoB,IAAIJ;AAAA,IACrDD;AAAA,IACA,EAAE,eAAe,EAAE,SAAS,KAAI,GAAI,SAAyB,oBAAI,IAAK,EAAA;AAAA,EACvE,GACKM,IAAqB,CAACC,MAAU;AACpC,UAAM,EAAE,OAAAC,GAAO,UAAAC,EAAQ,IAAKF,GACtBG,IAAMC,EAAM,OAAO,IAAI,GACvBC,IAAUD,EAAM,OAAuB,oBAAI,IAAG,CAAE,EAAE;AACxD,WAAuBE,gBAAAA,EAAG,IAACT,GAAwB,EAAE,OAAAI,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