@anoki/fse-ui 1.0.403 → 1.0.405

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 (110) hide show
  1. package/dist/components/ui/InfoCardSkeleton/InfoCardSkeleton.css +1 -1
  2. package/dist/index.cjs201.js +1 -1
  3. package/dist/index.cjs208.js +1 -1
  4. package/dist/index.cjs209.js +1 -1
  5. package/dist/index.cjs213.js +1 -1
  6. package/dist/index.cjs218.js +1 -1
  7. package/dist/index.cjs220.js +1 -1
  8. package/dist/index.cjs275.js +1 -1
  9. package/dist/index.cjs276.js +1 -1
  10. package/dist/index.cjs277.js +1 -1
  11. package/dist/index.cjs278.js +1 -1
  12. package/dist/index.cjs283.js +1 -1
  13. package/dist/index.cjs284.js +1 -1
  14. package/dist/index.cjs289.js +2 -0
  15. package/dist/index.cjs289.js.map +1 -0
  16. package/dist/index.cjs290.js +1 -1
  17. package/dist/index.cjs290.js.map +1 -1
  18. package/dist/index.cjs291.js +1 -1
  19. package/dist/index.cjs291.js.map +1 -1
  20. package/dist/index.cjs292.js +1 -1
  21. package/dist/index.cjs292.js.map +1 -1
  22. package/dist/index.cjs293.js +1 -1
  23. package/dist/index.cjs293.js.map +1 -1
  24. package/dist/index.cjs294.js +1 -1
  25. package/dist/index.cjs294.js.map +1 -1
  26. package/dist/index.cjs295.js +1 -1
  27. package/dist/index.cjs295.js.map +1 -1
  28. package/dist/index.cjs296.js +1 -1
  29. package/dist/index.cjs296.js.map +1 -1
  30. package/dist/index.cjs297.js +1 -1
  31. package/dist/index.cjs297.js.map +1 -1
  32. package/dist/index.cjs298.js +1 -1
  33. package/dist/index.cjs298.js.map +1 -1
  34. package/dist/index.cjs299.js +1 -1
  35. package/dist/index.cjs299.js.map +1 -1
  36. package/dist/index.cjs300.js +1 -1
  37. package/dist/index.cjs300.js.map +1 -1
  38. package/dist/index.cjs301.js +1 -1
  39. package/dist/index.cjs301.js.map +1 -1
  40. package/dist/index.cjs314.js +1 -1
  41. package/dist/index.cjs330.js +1 -1
  42. package/dist/index.cjs331.js +1 -1
  43. package/dist/index.cjs336.js +1 -1
  44. package/dist/index.cjs336.js.map +1 -1
  45. package/dist/index.cjs337.js +1 -1
  46. package/dist/index.cjs337.js.map +1 -1
  47. package/dist/index.cjs338.js +1 -1
  48. package/dist/index.cjs338.js.map +1 -1
  49. package/dist/index.cjs339.js +1 -1
  50. package/dist/index.cjs339.js.map +1 -1
  51. package/dist/index.cjs73.js +1 -1
  52. package/dist/index.cjs73.js.map +1 -1
  53. package/dist/index.es201.js +7 -7
  54. package/dist/index.es208.js +1 -1
  55. package/dist/index.es209.js +1 -1
  56. package/dist/index.es213.js +1 -1
  57. package/dist/index.es218.js +1 -1
  58. package/dist/index.es220.js +1 -1
  59. package/dist/index.es275.js +1 -1
  60. package/dist/index.es276.js +1 -1
  61. package/dist/index.es277.js +12 -12
  62. package/dist/index.es278.js +1 -1
  63. package/dist/index.es283.js +1 -1
  64. package/dist/index.es284.js +1 -1
  65. package/dist/index.es289.js +14 -0
  66. package/dist/index.es289.js.map +1 -0
  67. package/dist/index.es290.js +41 -10
  68. package/dist/index.es290.js.map +1 -1
  69. package/dist/index.es291.js +44 -40
  70. package/dist/index.es291.js.map +1 -1
  71. package/dist/index.es292.js +7 -45
  72. package/dist/index.es292.js.map +1 -1
  73. package/dist/index.es293.js +124 -7
  74. package/dist/index.es293.js.map +1 -1
  75. package/dist/index.es294.js +12 -122
  76. package/dist/index.es294.js.map +1 -1
  77. package/dist/index.es295.js +134 -14
  78. package/dist/index.es295.js.map +1 -1
  79. package/dist/index.es296.js +210 -127
  80. package/dist/index.es296.js.map +1 -1
  81. package/dist/index.es297.js +13 -217
  82. package/dist/index.es297.js.map +1 -1
  83. package/dist/index.es298.js +178 -14
  84. package/dist/index.es298.js.map +1 -1
  85. package/dist/index.es299.js +48 -176
  86. package/dist/index.es299.js.map +1 -1
  87. package/dist/index.es300.js +9 -50
  88. package/dist/index.es300.js.map +1 -1
  89. package/dist/index.es301.js +4 -9
  90. package/dist/index.es301.js.map +1 -1
  91. package/dist/index.es314.js +1 -1
  92. package/dist/index.es330.js +1 -1
  93. package/dist/index.es331.js +1 -1
  94. package/dist/index.es336.js +11 -21
  95. package/dist/index.es336.js.map +1 -1
  96. package/dist/index.es337.js +26 -11
  97. package/dist/index.es337.js.map +1 -1
  98. package/dist/index.es338.js +4 -27
  99. package/dist/index.es338.js.map +1 -1
  100. package/dist/index.es339.js +22 -4
  101. package/dist/index.es339.js.map +1 -1
  102. package/dist/index.es73.js +2 -2
  103. package/dist/index.es73.js.map +1 -1
  104. package/package.json +1 -1
  105. package/dist/index.cjs302.js +0 -2
  106. package/dist/index.cjs302.js.map +0 -1
  107. package/dist/index.es302.js +0 -7
  108. package/dist/index.es302.js.map +0 -1
  109. /package/dist/components/ui/{ConsentModal/ConsentModalContent/ConsentModalContent.css → DoctorConfirmModal/DoctorConfirmModalContent/DoctorConfirmModalContent.css} +0 -0
  110. /package/dist/components/ui/{ConsentModal/ConsentModalFooter/ConsentModalFooter.css → DoctorConfirmModal/DoctorConfirmModalFooter/DoctorConfirmModalFooter.css} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs73.js","sources":["../src/components/ui/InfoCardSkeleton/index.tsx"],"sourcesContent":["import \"./InfoCardSkeleton.scss\";\n\nexport const InfoCardSkeleton = () => {\n return (\n <div className=\"data-banner-skeleton\">\n <div className=\"data-banner-skeleton-content\">\n {/*<div className=\"data-banner-skeleton-text pulse\"></div>*/}\n {/*<div className=\"data-banner-skeleton-link pulse\"></div>*/}\n </div>\n </div>\n );\n};\n"],"names":["InfoCardSkeleton","jsx"],"mappings":"kJAEO,MAAMA,EAAmB,IAE5BC,wBAAC,OAAI,UAAU,uBACb,iCAAC,MAAI,CAAA,UAAU,+BAGf,CACF,CAAA"}
1
+ {"version":3,"file":"index.cjs73.js","sources":["../src/components/ui/InfoCardSkeleton/index.tsx"],"sourcesContent":["import \"./InfoCardSkeleton.scss\";\n\nexport const InfoCardSkeleton = () => {\n return (\n <div className=\"data-banner-skeleton pulse\">\n <div className=\"data-banner-skeleton-content\">\n {/*<div className=\"data-banner-skeleton-text pulse\"></div>*/}\n {/*<div className=\"data-banner-skeleton-link pulse\"></div>*/}\n </div>\n </div>\n );\n};\n"],"names":["InfoCardSkeleton","jsx"],"mappings":"kJAEO,MAAMA,EAAmB,IAE5BC,wBAAC,OAAI,UAAU,6BACb,iCAAC,MAAI,CAAA,UAAU,+BAGf,CACF,CAAA"}
@@ -4,15 +4,15 @@ import { useComposedRefs as C } from "./index.es273.js";
4
4
  import { createContextScope as L, createContext as $ } from "./index.es274.js";
5
5
  import { useId as x } from "./index.es278.js";
6
6
  import { useControllableState as B } from "./index.es275.js";
7
- import { DismissableLayer as H } from "./index.es294.js";
8
- import { FocusScope as V } from "./index.es296.js";
9
- import { Portal as q } from "./index.es298.js";
7
+ import { DismissableLayer as H } from "./index.es293.js";
8
+ import { FocusScope as V } from "./index.es295.js";
9
+ import { Portal as q } from "./index.es297.js";
10
10
  import { Presence as R } from "./index.es284.js";
11
11
  import { Primitive as m } from "./index.es276.js";
12
- import { useFocusGuards as K } from "./index.es295.js";
13
- import U from "./index.es301.js";
14
- import { hideOthers as Y } from "./index.es300.js";
15
- import { Slot as Z } from "./index.es291.js";
12
+ import { useFocusGuards as K } from "./index.es294.js";
13
+ import U from "./index.es300.js";
14
+ import { hideOthers as Y } from "./index.es299.js";
15
+ import { Slot as Z } from "./index.es290.js";
16
16
  import { j as i } from "./index.es154.js";
17
17
  var _ = "Dialog", [P, _e] = L(_), [z, u] = P(_), y = (e) => {
18
18
  const {
@@ -1,5 +1,5 @@
1
1
  import { j as t } from "./index.es154.js";
2
- import './components/ui/ConsentModal/ConsentModalFooter/ConsentModalFooter.css';/* empty css */
2
+ import './components/ui/DoctorConfirmModal/DoctorConfirmModalFooter/DoctorConfirmModalFooter.css';/* empty css */
3
3
  const s = ({ children: o }) => /* @__PURE__ */ t.jsx("footer", { className: "ui-consent-modal-footer bg-white shadow", children: o });
4
4
  export {
5
5
  s as ConsentModalFooter
@@ -1,6 +1,6 @@
1
1
  import { j as n } from "./index.es154.js";
2
2
  import { clsx as r } from "./index.es156.js";
3
- import './components/ui/ConsentModal/ConsentModalContent/ConsentModalContent.css';/* empty css */
3
+ import './components/ui/DoctorConfirmModal/DoctorConfirmModalContent/DoctorConfirmModalContent.css';/* empty css */
4
4
  const i = ({
5
5
  overrideClassNames: o,
6
6
  children: t
@@ -1,5 +1,5 @@
1
1
  import { j as t } from "./index.es154.js";
2
- import './components/ui/ConsentModal/ConsentModalFooter/ConsentModalFooter.css';/* empty css */
2
+ import './components/ui/DoctorConfirmModal/DoctorConfirmModalFooter/DoctorConfirmModalFooter.css';/* empty css */
3
3
  const s = ({ children: o }) => /* @__PURE__ */ t.jsx("footer", { className: "ui-consent-modal-footer bg-white shadow", children: o });
4
4
  export {
5
5
  s as DoctorModalFooter
@@ -1,6 +1,6 @@
1
1
  import { j as r } from "./index.es154.js";
2
2
  import { clsx as m } from "./index.es156.js";
3
- import './components/ui/ConsentModal/ConsentModalContent/ConsentModalContent.css';/* empty css */
3
+ import './components/ui/DoctorConfirmModal/DoctorConfirmModalContent/DoctorConfirmModalContent.css';/* empty css */
4
4
  const e = ({
5
5
  overrideClassNames: o,
6
6
  children: t
@@ -1,5 +1,5 @@
1
1
  import { j as t } from "./index.es154.js";
2
- import './components/ui/ConsentModal/ConsentModalFooter/ConsentModalFooter.css';/* empty css */
2
+ import './components/ui/DoctorConfirmModal/DoctorConfirmModalFooter/DoctorConfirmModalFooter.css';/* empty css */
3
3
  const s = ({
4
4
  children: o
5
5
  }) => /* @__PURE__ */ t.jsx("footer", { className: "ui-consent-modal-footer bg-white shadow", children: o });
@@ -1,5 +1,5 @@
1
1
  import * as l from "react";
2
- import { useCallbackRef as f } from "./index.es290.js";
2
+ import { useCallbackRef as f } from "./index.es289.js";
3
3
  function R({
4
4
  prop: t,
5
5
  defaultProp: r,
@@ -1,6 +1,6 @@
1
1
  import * as n from "react";
2
2
  import * as p from "react-dom";
3
- import { Slot as f } from "./index.es291.js";
3
+ import { Slot as f } from "./index.es290.js";
4
4
  import { j as u } from "./index.es154.js";
5
5
  var c = [
6
6
  "a",
@@ -1,21 +1,21 @@
1
1
  import * as r from "react";
2
2
  import { composeEventHandlers as M } from "./index.es272.js";
3
- import { createCollection as Xe } from "./index.es292.js";
3
+ import { createCollection as Xe } from "./index.es291.js";
4
4
  import { useComposedRefs as k, composeRefs as He } from "./index.es273.js";
5
5
  import { createContextScope as We } from "./index.es274.js";
6
- import { useDirection as ze } from "./index.es293.js";
7
- import { DismissableLayer as Ze } from "./index.es294.js";
8
- import { useFocusGuards as $e } from "./index.es295.js";
9
- import { FocusScope as qe } from "./index.es296.js";
10
- import { createPopperScope as pe, Root as Je, Anchor as Qe, Content as et, Arrow as tt } from "./index.es297.js";
11
- import { Portal as nt } from "./index.es298.js";
6
+ import { useDirection as ze } from "./index.es292.js";
7
+ import { DismissableLayer as Ze } from "./index.es293.js";
8
+ import { useFocusGuards as $e } from "./index.es294.js";
9
+ import { FocusScope as qe } from "./index.es295.js";
10
+ import { createPopperScope as pe, Root as Je, Anchor as Qe, Content as et, Arrow as tt } from "./index.es296.js";
11
+ import { Portal as nt } from "./index.es297.js";
12
12
  import { Presence as H } from "./index.es284.js";
13
13
  import { Primitive as N, dispatchDiscreteCustomEvent as ot } from "./index.es276.js";
14
- import { createRovingFocusGroupScope as ve, Item as rt, Root as ct } from "./index.es299.js";
15
- import { Slot as st } from "./index.es291.js";
16
- import { useCallbackRef as Me } from "./index.es290.js";
17
- import { hideOthers as at } from "./index.es300.js";
18
- import ut from "./index.es301.js";
14
+ import { createRovingFocusGroupScope as ve, Item as rt, Root as ct } from "./index.es298.js";
15
+ import { Slot as st } from "./index.es290.js";
16
+ import { useCallbackRef as Me } from "./index.es289.js";
17
+ import { hideOthers as at } from "./index.es299.js";
18
+ import ut from "./index.es300.js";
19
19
  import { j as u } from "./index.es154.js";
20
20
  var Q = ["Enter", " "], it = ["ArrowDown", "PageUp", "Home"], he = ["ArrowUp", "PageDown", "End"], lt = [...it, ...he], dt = {
21
21
  ltr: [...Q, "ArrowRight"],
@@ -1,5 +1,5 @@
1
1
  import * as o from "react";
2
- import { useLayoutEffect as a } from "./index.es302.js";
2
+ import { useLayoutEffect as a } from "./index.es301.js";
3
3
  var s = o.useId || (() => {
4
4
  }), f = 0;
5
5
  function n(t) {
@@ -1,5 +1,5 @@
1
1
  import * as h from "react";
2
- import { useLayoutEffect as z } from "./index.es302.js";
2
+ import { useLayoutEffect as z } from "./index.es301.js";
3
3
  function c(r) {
4
4
  const [d, e] = h.useState(void 0);
5
5
  return z(() => {
@@ -1,6 +1,6 @@
1
1
  import * as a from "react";
2
2
  import { useComposedRefs as E } from "./index.es273.js";
3
- import { useLayoutEffect as A } from "./index.es302.js";
3
+ import { useLayoutEffect as A } from "./index.es301.js";
4
4
  function T(n, e) {
5
5
  return a.useReducer((r, t) => e[r][t] ?? r, n);
6
6
  }
@@ -0,0 +1,14 @@
1
+ import * as r from "react";
2
+ function o(t) {
3
+ const e = r.useRef(t);
4
+ return r.useEffect(() => {
5
+ e.current = t;
6
+ }), r.useMemo(() => (...n) => {
7
+ var u;
8
+ return (u = e.current) == null ? void 0 : u.call(e, ...n);
9
+ }, []);
10
+ }
11
+ export {
12
+ o as useCallbackRef
13
+ };
14
+ //# sourceMappingURL=index.es289.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es289.js","sources":["../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"],"sourcesContent":["// packages/react/use-callback-ref/src/useCallbackRef.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useCallbackRef","callback","callbackRef","React","args","_a"],"mappings":";AAEA,SAASA,EAAeC,GAAU;AAChC,QAAMC,IAAcC,EAAM,OAAOF,CAAQ;AACzC,SAAAE,EAAM,UAAU,MAAM;AACpB,IAAAD,EAAY,UAAUD;AAAA,EAC1B,CAAG,GACME,EAAM,QAAQ,MAAM,IAAIC;;AAAS,YAAAC,IAAAH,EAAY,YAAZ,gBAAAG,EAAA,KAAAH,GAAsB,GAAGE;AAAA,KAAO,EAAE;AAC5E;","x_google_ignoreList":[0]}
@@ -1,14 +1,45 @@
1
- import * as r from "react";
2
- function o(t) {
3
- const e = r.useRef(t);
4
- return r.useEffect(() => {
5
- e.current = t;
6
- }), r.useMemo(() => (...n) => {
7
- var u;
8
- return (u = e.current) == null ? void 0 : u.call(e, ...n);
9
- }, []);
1
+ import * as l from "react";
2
+ import { composeRefs as u } from "./index.es273.js";
3
+ import { j as c } from "./index.es154.js";
4
+ var m = l.forwardRef((r, n) => {
5
+ const { children: e, ...t } = r, o = l.Children.toArray(e), i = o.find(g);
6
+ if (i) {
7
+ const s = i.props.children, a = o.map((f) => f === i ? l.Children.count(s) > 1 ? l.Children.only(null) : l.isValidElement(s) ? s.props.children : null : f);
8
+ return /* @__PURE__ */ c.jsx(p, { ...t, ref: n, children: l.isValidElement(s) ? l.cloneElement(s, void 0, a) : null });
9
+ }
10
+ return /* @__PURE__ */ c.jsx(p, { ...t, ref: n, children: e });
11
+ });
12
+ m.displayName = "Slot";
13
+ var p = l.forwardRef((r, n) => {
14
+ const { children: e, ...t } = r;
15
+ if (l.isValidElement(e)) {
16
+ const o = h(e), i = y(t, e.props);
17
+ return e.type !== l.Fragment && (i.ref = n ? u(n, o) : o), l.cloneElement(e, i);
18
+ }
19
+ return l.Children.count(e) > 1 ? l.Children.only(null) : null;
20
+ });
21
+ p.displayName = "SlotClone";
22
+ var d = ({ children: r }) => /* @__PURE__ */ c.jsx(c.Fragment, { children: r });
23
+ function g(r) {
24
+ return l.isValidElement(r) && r.type === d;
25
+ }
26
+ function y(r, n) {
27
+ const e = { ...n };
28
+ for (const t in n) {
29
+ const o = r[t], i = n[t];
30
+ /^on[A-Z]/.test(t) ? o && i ? e[t] = (...a) => {
31
+ i(...a), o(...a);
32
+ } : o && (e[t] = o) : t === "style" ? e[t] = { ...o, ...i } : t === "className" && (e[t] = [o, i].filter(Boolean).join(" "));
33
+ }
34
+ return { ...r, ...e };
35
+ }
36
+ function h(r) {
37
+ var t, o;
38
+ let n = (t = Object.getOwnPropertyDescriptor(r.props, "ref")) == null ? void 0 : t.get, e = n && "isReactWarning" in n && n.isReactWarning;
39
+ return e ? r.ref : (n = (o = Object.getOwnPropertyDescriptor(r, "ref")) == null ? void 0 : o.get, e = n && "isReactWarning" in n && n.isReactWarning, e ? r.props.ref : r.props.ref || r.ref);
10
40
  }
11
41
  export {
12
- o as useCallbackRef
42
+ m as Slot,
43
+ d as Slottable
13
44
  };
14
45
  //# sourceMappingURL=index.es290.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es290.js","sources":["../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"],"sourcesContent":["// packages/react/use-callback-ref/src/useCallbackRef.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useCallbackRef","callback","callbackRef","React","args","_a"],"mappings":";AAEA,SAASA,EAAeC,GAAU;AAChC,QAAMC,IAAcC,EAAM,OAAOF,CAAQ;AACzC,SAAAE,EAAM,UAAU,MAAM;AACpB,IAAAD,EAAY,UAAUD;AAAA,EAC1B,CAAG,GACME,EAAM,QAAQ,MAAM,IAAIC;;AAAS,YAAAC,IAAAH,EAAY,YAAZ,gBAAAG,EAAA,KAAAH,GAAsB,GAAGE;AAAA,KAAO,EAAE;AAC5E;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es290.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\";\nvar Slot = 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});\nSlot.displayName = \"Slot\";\nvar 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});\nSlotClone.displayName = \"SlotClone\";\nvar Slottable = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n};\nfunction isSlottable(child) {\n return React.isValidElement(child) && child.type === Slottable;\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}\nvar Root = Slot;\nexport {\n Root,\n Slot,\n Slottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["Slot","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","SlotClone","childrenRef","getElementRef","props2","mergeProps","composeRefs","Slottable","Fragment2","childProps","overrideProps","propName","slotPropValue","childPropValue","args","element","getter","_a","mayWarn","_b"],"mappings":";;;AAIG,IAACA,IAAOC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACnD,QAAM,EAAE,UAAAC,GAAU,GAAGC,EAAS,IAAKH,GAC7BI,IAAgBL,EAAM,SAAS,QAAQG,CAAQ,GAC/CG,IAAYD,EAAc,KAAKE,CAAW;AAChD,MAAID,GAAW;AACb,UAAME,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,WAAuBC,gBAAAA,EAAAA,IAAIC,GAAW,EAAE,GAAGR,GAAW,KAAKF,GAAc,UAAUF,EAAM,eAAeQ,CAAU,IAAIR,EAA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AAE,GAAGC,GAAe,GAAGC,EAAgB,IACxDF,MAAa,gBACtBD,EAAcC,CAAQ,IAAI,CAACC,GAAeC,CAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,EAExF;AACE,SAAO,EAAE,GAAGpB,GAAW,GAAGiB,EAAe;AAC3C;AACA,SAASP,EAAcY,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,45 +1,49 @@
1
- import * as l from "react";
2
- import { composeRefs as u } from "./index.es273.js";
3
- import { j as c } from "./index.es154.js";
4
- var m = l.forwardRef((r, n) => {
5
- const { children: e, ...t } = r, o = l.Children.toArray(e), i = o.find(g);
6
- if (i) {
7
- const s = i.props.children, a = o.map((f) => f === i ? l.Children.count(s) > 1 ? l.Children.only(null) : l.isValidElement(s) ? s.props.children : null : f);
8
- return /* @__PURE__ */ c.jsx(p, { ...t, ref: n, children: l.isValidElement(s) ? l.cloneElement(s, void 0, a) : null });
1
+ import n from "react";
2
+ import { createContextScope as O } from "./index.es274.js";
3
+ import { useComposedRefs as I } from "./index.es273.js";
4
+ import { Slot as S } from "./index.es290.js";
5
+ import { j as u } from "./index.es154.js";
6
+ function L(s) {
7
+ const f = s + "CollectionProvider", [A, E] = O(f), [N, m] = A(
8
+ f,
9
+ { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
10
+ ), a = (c) => {
11
+ const { scope: e, children: l } = c, o = n.useRef(null), t = n.useRef(/* @__PURE__ */ new Map()).current;
12
+ return /* @__PURE__ */ u.jsx(N, { scope: e, itemMap: t, collectionRef: o, children: l });
13
+ };
14
+ a.displayName = f;
15
+ const d = s + "CollectionSlot", p = n.forwardRef(
16
+ (c, e) => {
17
+ const { scope: l, children: o } = c, t = m(d, l), r = I(e, t.collectionRef);
18
+ return /* @__PURE__ */ u.jsx(S, { ref: r, children: o });
19
+ }
20
+ );
21
+ p.displayName = d;
22
+ const C = s + "CollectionItemSlot", R = "data-radix-collection-item", x = n.forwardRef(
23
+ (c, e) => {
24
+ const { scope: l, children: o, ...t } = c, r = n.useRef(null), M = I(e, r), i = m(C, l);
25
+ return n.useEffect(() => (i.itemMap.set(r, { ref: r, ...t }), () => void i.itemMap.delete(r))), /* @__PURE__ */ u.jsx(S, { [R]: "", ref: M, children: o });
26
+ }
27
+ );
28
+ x.displayName = C;
29
+ function _(c) {
30
+ const e = m(s + "CollectionConsumer", c);
31
+ return n.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, T) => t.indexOf(i.ref.current) - t.indexOf(T.ref.current)
37
+ );
38
+ }, [e.collectionRef, e.itemMap]);
9
39
  }
10
- return /* @__PURE__ */ c.jsx(p, { ...t, ref: n, children: e });
11
- });
12
- m.displayName = "Slot";
13
- var p = l.forwardRef((r, n) => {
14
- const { children: e, ...t } = r;
15
- if (l.isValidElement(e)) {
16
- const o = h(e), i = y(t, e.props);
17
- return e.type !== l.Fragment && (i.ref = n ? u(n, o) : o), l.cloneElement(e, i);
18
- }
19
- return l.Children.count(e) > 1 ? l.Children.only(null) : null;
20
- });
21
- p.displayName = "SlotClone";
22
- var d = ({ children: r }) => /* @__PURE__ */ c.jsx(c.Fragment, { children: r });
23
- function g(r) {
24
- return l.isValidElement(r) && r.type === d;
25
- }
26
- function y(r, n) {
27
- const e = { ...n };
28
- for (const t in n) {
29
- const o = r[t], i = n[t];
30
- /^on[A-Z]/.test(t) ? o && i ? e[t] = (...a) => {
31
- i(...a), o(...a);
32
- } : o && (e[t] = o) : t === "style" ? e[t] = { ...o, ...i } : t === "className" && (e[t] = [o, i].filter(Boolean).join(" "));
33
- }
34
- return { ...r, ...e };
35
- }
36
- function h(r) {
37
- var t, o;
38
- let n = (t = Object.getOwnPropertyDescriptor(r.props, "ref")) == null ? void 0 : t.get, e = n && "isReactWarning" in n && n.isReactWarning;
39
- return e ? r.ref : (n = (o = Object.getOwnPropertyDescriptor(r, "ref")) == null ? void 0 : o.get, e = n && "isReactWarning" in n && n.isReactWarning, e ? r.props.ref : r.props.ref || r.ref);
40
+ return [
41
+ { Provider: a, Slot: p, ItemSlot: x },
42
+ _,
43
+ E
44
+ ];
40
45
  }
41
46
  export {
42
- m as Slot,
43
- d as Slottable
47
+ L as createCollection
44
48
  };
45
49
  //# sourceMappingURL=index.es291.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es291.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\";\nvar Slot = 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});\nSlot.displayName = \"Slot\";\nvar 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});\nSlotClone.displayName = \"SlotClone\";\nvar Slottable = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n};\nfunction isSlottable(child) {\n return React.isValidElement(child) && child.type === Slottable;\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}\nvar Root = Slot;\nexport {\n Root,\n Slot,\n Slottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["Slot","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","SlotClone","childrenRef","getElementRef","props2","mergeProps","composeRefs","Slottable","Fragment2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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 { Slot } 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 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(Slot, { 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 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(Slot, { ...{ [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","CollectionSlot","forwardedRef","context","composedRefs","useComposedRefs","Slot","ITEM_SLOT_NAME","ITEM_DATA_ATTR","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,GAAO,SAAAI,GAAS,eAAeF,GAAK,UAAAD,GAAU;AAAA,EACpG;AACD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AAQ,QAAQ,QAAQ,EACtB;AAAA,QACzB,CAACW,GAAGC,MAAMF,EAAa,QAAQC,EAAE,IAAI,OAAO,IAAID,EAAa,QAAQE,EAAE,IAAI,OAAO;AAAA,MACnF;AAAA,IAEF,GAAE,CAACZ,EAAQ,eAAeA,EAAQ,OAAO,CAAC;AAAA,EAE/C;AACE,SAAO;AAAA,IACL,EAAE,UAAUX,GAAoB,MAAMS,GAAgB,UAAUQ,EAAoB;AAAA,IACpFE;AAAA,IACAvB;AAAA,EACD;AACH;","x_google_ignoreList":[0]}
@@ -1,49 +1,11 @@
1
- import n from "react";
2
- import { createContextScope as O } from "./index.es274.js";
3
- import { useComposedRefs as I } from "./index.es273.js";
4
- import { Slot as S } from "./index.es291.js";
5
- import { j as u } from "./index.es154.js";
6
- function L(s) {
7
- const f = s + "CollectionProvider", [A, E] = O(f), [N, m] = A(
8
- f,
9
- { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
10
- ), a = (c) => {
11
- const { scope: e, children: l } = c, o = n.useRef(null), t = n.useRef(/* @__PURE__ */ new Map()).current;
12
- return /* @__PURE__ */ u.jsx(N, { scope: e, itemMap: t, collectionRef: o, children: l });
13
- };
14
- a.displayName = f;
15
- const d = s + "CollectionSlot", p = n.forwardRef(
16
- (c, e) => {
17
- const { scope: l, children: o } = c, t = m(d, l), r = I(e, t.collectionRef);
18
- return /* @__PURE__ */ u.jsx(S, { ref: r, children: o });
19
- }
20
- );
21
- p.displayName = d;
22
- const C = s + "CollectionItemSlot", R = "data-radix-collection-item", x = n.forwardRef(
23
- (c, e) => {
24
- const { scope: l, children: o, ...t } = c, r = n.useRef(null), M = I(e, r), i = m(C, l);
25
- return n.useEffect(() => (i.itemMap.set(r, { ref: r, ...t }), () => void i.itemMap.delete(r))), /* @__PURE__ */ u.jsx(S, { [R]: "", ref: M, children: o });
26
- }
27
- );
28
- x.displayName = C;
29
- function _(c) {
30
- const e = m(s + "CollectionConsumer", c);
31
- return n.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, T) => t.indexOf(i.ref.current) - t.indexOf(T.ref.current)
37
- );
38
- }, [e.collectionRef, e.itemMap]);
39
- }
40
- return [
41
- { Provider: a, Slot: p, ItemSlot: x },
42
- _,
43
- E
44
- ];
1
+ import * as t from "react";
2
+ import "./index.es154.js";
3
+ var r = t.createContext(void 0);
4
+ function n(o) {
5
+ const e = t.useContext(r);
6
+ return o || e || "ltr";
45
7
  }
46
8
  export {
47
- L as createCollection
9
+ n as useDirection
48
10
  };
49
11
  //# sourceMappingURL=index.es292.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es292.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 { Slot } 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 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(Slot, { 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 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(Slot, { ...{ [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","CollectionSlot","forwardedRef","context","composedRefs","useComposedRefs","Slot","ITEM_SLOT_NAME","ITEM_DATA_ATTR","CollectionItemSlot","itemData","useCollection","collectionNode","orderedNodes","a","b"],"mappings":";;;;;AAQA,SAASA,EAAiBC,G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A,GAAK,GAAGc,GAAU,GACtC,MAAM,KAAKP,EAAQ,QAAQ,OAAOP,CAAG,EAC7C,GACsBG,gBAAAA,MAAIO,GAAM,EAAO,CAACE,CAAc,GAAG,IAAM,KAAKJ,GAAc,UAAAT,GAAU;AAAA,IACnG;AAAA,EACG;AACD,EAAAc,EAAmB,cAAcF;AACjC,WAASI,EAAcjB,GAAO;AAC5B,UAAMS,IAAUZ,EAAqBN,IAAO,sBAAsBS,CAAK;AAWvE,WAViBG,EAAM,YAAY,MAAM;AACvC,YAAMe,IAAiBT,EAAQ,cAAc;AAC7C,UAAI,CAACS,EAAgB,QAAO,CAAE;AAC9B,YAAMC,IAAe,MAAM,KAAKD,EAAe,iBAAiB,IAAIJ,CAAc,GAAG,CAAC;AAKtF,aAJc,MAAM,KAAKL,EAAQ,QAAQ,QAAQ,EACtB;AAAA,QACzB,CAACW,GAAGC,MAAMF,EAAa,QAAQC,EAAE,IAAI,OAAO,IAAID,EAAa,QAAQE,EAAE,IAAI,OAAO;AAAA,MACnF;AAAA,IAEF,GAAE,CAACZ,EAAQ,eAAeA,EAAQ,OAAO,CAAC;AAAA,EAE/C;AACE,SAAO;AAAA,IACL,EAAE,UAAUX,GAAoB,MAAMS,GAAgB,UAAUQ,EAAoB;AAAA,IACpFE;AAAA,IACAvB;AAAA,EACD;AACH;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es292.js","sources":["../node_modules/@radix-ui/react-direction/dist/index.mjs"],"sourcesContent":["// packages/react/direction/src/Direction.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DirectionContext = React.createContext(void 0);\nvar DirectionProvider = (props) => {\n const { dir, children } = props;\n return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children });\n};\nfunction useDirection(localDir) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || \"ltr\";\n}\nvar Provider = DirectionProvider;\nexport {\n DirectionProvider,\n Provider,\n useDirection\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DirectionContext","React","useDirection","localDir","globalDir"],"mappings":";;AAGA,IAAIA,IAAmBC,EAAM,cAAc,MAAM;AAKjD,SAASC,EAAaC,GAAU;AAC9B,QAAMC,IAAYH,EAAM,WAAWD,CAAgB;AACnD,SAAOG,KAAYC,KAAa;AAClC;","x_google_ignoreList":[0]}
@@ -1,11 +1,128 @@
1
- import * as t from "react";
2
- import "./index.es154.js";
3
- var r = t.createContext(void 0);
4
- function n(o) {
5
- const e = t.useContext(r);
6
- return o || e || "ltr";
1
+ import * as n from "react";
2
+ import { composeEventHandlers as m } from "./index.es272.js";
3
+ import { Primitive as R, dispatchDiscreteCustomEvent as k } from "./index.es276.js";
4
+ import { useComposedRefs as g } from "./index.es273.js";
5
+ import { useCallbackRef as w } from "./index.es289.js";
6
+ import { useEscapeKeydown as U } from "./index.es314.js";
7
+ import { j as x } from "./index.es154.js";
8
+ var j = "DismissableLayer", p = "dismissableLayer.update", z = "dismissableLayer.pointerDownOutside", H = "dismissableLayer.focusOutside", L, T = n.createContext({
9
+ layers: /* @__PURE__ */ new Set(),
10
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
11
+ branches: /* @__PURE__ */ new Set()
12
+ }), M = n.forwardRef(
13
+ (r, e) => {
14
+ const {
15
+ disableOutsidePointerEvents: i = !1,
16
+ onEscapeKeyDown: o,
17
+ onPointerDownOutside: t,
18
+ onFocusOutside: a,
19
+ onInteractOutside: l,
20
+ onDismiss: d,
21
+ ...v
22
+ } = r, c = n.useContext(T), [u, S] = n.useState(null), f = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, F] = n.useState({}), W = g(e, (s) => S(s)), y = Array.from(c.layers), [A] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), N = y.indexOf(A), b = u ? y.indexOf(u) : -1, I = c.layersWithOutsidePointerEventsDisabled.size > 0, P = b >= N, _ = q((s) => {
23
+ const E = s.target, C = [...c.branches].some((h) => h.contains(E));
24
+ !P || C || (t == null || t(s), l == null || l(s), s.defaultPrevented || d == null || d());
25
+ }, f), D = G((s) => {
26
+ const E = s.target;
27
+ [...c.branches].some((h) => h.contains(E)) || (a == null || a(s), l == null || l(s), s.defaultPrevented || d == null || d());
28
+ }, f);
29
+ return U((s) => {
30
+ b === c.layers.size - 1 && (o == null || o(s), !s.defaultPrevented && d && (s.preventDefault(), d()));
31
+ }, f), n.useEffect(() => {
32
+ if (u)
33
+ return i && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (L = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(u)), c.layers.add(u), O(), () => {
34
+ i && c.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = L);
35
+ };
36
+ }, [u, f, i, c]), n.useEffect(() => () => {
37
+ u && (c.layers.delete(u), c.layersWithOutsidePointerEventsDisabled.delete(u), O());
38
+ }, [u, c]), n.useEffect(() => {
39
+ const s = () => F({});
40
+ return document.addEventListener(p, s), () => document.removeEventListener(p, s);
41
+ }, []), /* @__PURE__ */ x.jsx(
42
+ R.div,
43
+ {
44
+ ...v,
45
+ ref: W,
46
+ style: {
47
+ pointerEvents: I ? P ? "auto" : "none" : void 0,
48
+ ...r.style
49
+ },
50
+ onFocusCapture: m(r.onFocusCapture, D.onFocusCapture),
51
+ onBlurCapture: m(r.onBlurCapture, D.onBlurCapture),
52
+ onPointerDownCapture: m(
53
+ r.onPointerDownCapture,
54
+ _.onPointerDownCapture
55
+ )
56
+ }
57
+ );
58
+ }
59
+ );
60
+ M.displayName = j;
61
+ var X = "DismissableLayerBranch", Y = n.forwardRef((r, e) => {
62
+ const i = n.useContext(T), o = n.useRef(null), t = g(e, o);
63
+ return n.useEffect(() => {
64
+ const a = o.current;
65
+ if (a)
66
+ return i.branches.add(a), () => {
67
+ i.branches.delete(a);
68
+ };
69
+ }, [i.branches]), /* @__PURE__ */ x.jsx(R.div, { ...r, ref: t });
70
+ });
71
+ Y.displayName = X;
72
+ function q(r, e = globalThis == null ? void 0 : globalThis.document) {
73
+ const i = w(r), o = n.useRef(!1), t = n.useRef(() => {
74
+ });
75
+ return n.useEffect(() => {
76
+ const a = (d) => {
77
+ if (d.target && !o.current) {
78
+ let v = function() {
79
+ B(
80
+ z,
81
+ i,
82
+ c,
83
+ { discrete: !0 }
84
+ );
85
+ };
86
+ const c = { originalEvent: d };
87
+ d.pointerType === "touch" ? (e.removeEventListener("click", t.current), t.current = v, e.addEventListener("click", t.current, { once: !0 })) : v();
88
+ } else
89
+ e.removeEventListener("click", t.current);
90
+ o.current = !1;
91
+ }, l = window.setTimeout(() => {
92
+ e.addEventListener("pointerdown", a);
93
+ }, 0);
94
+ return () => {
95
+ window.clearTimeout(l), e.removeEventListener("pointerdown", a), e.removeEventListener("click", t.current);
96
+ };
97
+ }, [e, i]), {
98
+ // ensures we check React component tree (not just DOM tree)
99
+ onPointerDownCapture: () => o.current = !0
100
+ };
101
+ }
102
+ function G(r, e = globalThis == null ? void 0 : globalThis.document) {
103
+ const i = w(r), o = n.useRef(!1);
104
+ return n.useEffect(() => {
105
+ const t = (a) => {
106
+ a.target && !o.current && B(H, i, { originalEvent: a }, {
107
+ discrete: !1
108
+ });
109
+ };
110
+ return e.addEventListener("focusin", t), () => e.removeEventListener("focusin", t);
111
+ }, [e, i]), {
112
+ onFocusCapture: () => o.current = !0,
113
+ onBlurCapture: () => o.current = !1
114
+ };
115
+ }
116
+ function O() {
117
+ const r = new CustomEvent(p);
118
+ document.dispatchEvent(r);
119
+ }
120
+ function B(r, e, i, { discrete: o }) {
121
+ const t = i.originalEvent.target, a = new CustomEvent(r, { bubbles: !1, cancelable: !0, detail: i });
122
+ e && t.addEventListener(r, e, { once: !0 }), o ? k(t, a) : t.dispatchEvent(a);
7
123
  }
8
124
  export {
9
- n as useDirection
125
+ M as DismissableLayer,
126
+ Y as DismissableLayerBranch
10
127
  };
11
128
  //# sourceMappingURL=index.es293.js.map