@anoki/fse-ui 1.0.698 → 1.0.700

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 (187) hide show
  1. package/dist/components/ui/CardDoctor/CardDoctor.css +1 -1
  2. package/dist/components/ui/filters/CheckboxFilter/CheckboxFilter.css +1 -1
  3. package/dist/index.cjs240.js +1 -1
  4. package/dist/index.cjs244.js +1 -1
  5. package/dist/index.cjs251.js +1 -1
  6. package/dist/index.cjs261.js +1 -1
  7. package/dist/index.cjs267.js +1 -1
  8. package/dist/index.cjs274.js +1 -1
  9. package/dist/index.cjs279.js +1 -1
  10. package/dist/index.cjs286.js +1 -1
  11. package/dist/index.cjs294.js +1 -1
  12. package/dist/index.cjs333.js +1 -1
  13. package/dist/index.cjs361.js +1 -1
  14. package/dist/index.cjs362.js +1 -1
  15. package/dist/index.cjs380.js +1 -1
  16. package/dist/index.cjs380.js.map +1 -1
  17. package/dist/index.cjs383.js +1 -1
  18. package/dist/index.cjs383.js.map +1 -1
  19. package/dist/index.cjs384.js +1 -1
  20. package/dist/index.cjs384.js.map +1 -1
  21. package/dist/index.cjs385.js +1 -1
  22. package/dist/index.cjs385.js.map +1 -1
  23. package/dist/index.cjs386.js +1 -1
  24. package/dist/index.cjs386.js.map +1 -1
  25. package/dist/index.cjs387.js +2 -0
  26. package/dist/index.cjs387.js.map +1 -0
  27. package/dist/index.cjs388.js +2 -0
  28. package/dist/index.cjs388.js.map +1 -0
  29. package/dist/index.cjs389.js +2 -0
  30. package/dist/index.cjs389.js.map +1 -0
  31. package/dist/index.cjs392.js +1 -1
  32. package/dist/index.cjs393.js +2 -0
  33. package/dist/index.cjs393.js.map +1 -0
  34. package/dist/index.cjs394.js +2 -0
  35. package/dist/index.cjs394.js.map +1 -0
  36. package/dist/{index.cjs400.js → index.cjs395.js} +2 -2
  37. package/dist/{index.cjs400.js.map → index.cjs395.js.map} +1 -1
  38. package/dist/{index.cjs401.js → index.cjs396.js} +1 -1
  39. package/dist/{index.cjs401.js.map → index.cjs396.js.map} +1 -1
  40. package/dist/{index.cjs402.js → index.cjs397.js} +1 -1
  41. package/dist/{index.cjs402.js.map → index.cjs397.js.map} +1 -1
  42. package/dist/index.cjs398.js +1 -1
  43. package/dist/index.cjs398.js.map +1 -1
  44. package/dist/index.cjs399.js +1 -1
  45. package/dist/index.cjs399.js.map +1 -1
  46. package/dist/{index.cjs405.js → index.cjs406.js} +1 -1
  47. package/dist/{index.cjs405.js.map → index.cjs406.js.map} +1 -1
  48. package/dist/index.cjs420.js +1 -1
  49. package/dist/index.cjs424.js +1 -1
  50. package/dist/index.cjs426.js +1 -1
  51. package/dist/index.cjs427.js +1 -1
  52. package/dist/index.cjs431.js +1 -1
  53. package/dist/index.cjs431.js.map +1 -1
  54. package/dist/index.cjs432.js +1 -1
  55. package/dist/index.cjs433.js +1 -1
  56. package/dist/index.cjs433.js.map +1 -1
  57. package/dist/index.cjs434.js +1 -1
  58. package/dist/index.cjs434.js.map +1 -1
  59. package/dist/index.cjs436.js +1 -1
  60. package/dist/index.cjs437.js +1 -1
  61. package/dist/index.cjs449.js +1 -1
  62. package/dist/index.cjs451.js +1 -1
  63. package/dist/index.cjs453.js +1 -1
  64. package/dist/index.cjs463.js +1 -1
  65. package/dist/index.cjs463.js.map +1 -1
  66. package/dist/index.cjs464.js +1 -38
  67. package/dist/index.cjs464.js.map +1 -1
  68. package/dist/index.cjs465.js +1 -1
  69. package/dist/index.cjs465.js.map +1 -1
  70. package/dist/index.cjs466.js +38 -1
  71. package/dist/index.cjs466.js.map +1 -1
  72. package/dist/index.cjs467.js +1 -1
  73. package/dist/index.cjs467.js.map +1 -1
  74. package/dist/index.cjs468.js +1 -1
  75. package/dist/index.cjs468.js.map +1 -1
  76. package/dist/index.cjs469.js +1 -1
  77. package/dist/index.cjs469.js.map +1 -1
  78. package/dist/index.cjs470.js +1 -1
  79. package/dist/index.cjs470.js.map +1 -1
  80. package/dist/index.cjs51.js +1 -1
  81. package/dist/index.cjs51.js.map +1 -1
  82. package/dist/index.cjs62.js +1 -1
  83. package/dist/index.cjs62.js.map +1 -1
  84. package/dist/index.d.ts +2 -1
  85. package/dist/index.es240.js +7 -7
  86. package/dist/index.es244.js +1 -1
  87. package/dist/index.es251.js +5 -5
  88. package/dist/index.es261.js +1 -1
  89. package/dist/index.es267.js +13 -13
  90. package/dist/index.es274.js +1 -1
  91. package/dist/index.es279.js +1 -1
  92. package/dist/index.es286.js +1 -1
  93. package/dist/index.es294.js +5 -5
  94. package/dist/index.es333.js +4 -4
  95. package/dist/index.es361.js +1 -1
  96. package/dist/index.es362.js +2 -2
  97. package/dist/index.es380.js +15 -27
  98. package/dist/index.es380.js.map +1 -1
  99. package/dist/index.es383.js +6 -32
  100. package/dist/index.es383.js.map +1 -1
  101. package/dist/index.es384.js +23 -618
  102. package/dist/index.es384.js.map +1 -1
  103. package/dist/index.es385.js +67 -10
  104. package/dist/index.es385.js.map +1 -1
  105. package/dist/index.es386.js +30 -15
  106. package/dist/index.es386.js.map +1 -1
  107. package/dist/index.es387.js +36 -0
  108. package/dist/index.es387.js.map +1 -0
  109. package/dist/index.es388.js +625 -0
  110. package/dist/index.es388.js.map +1 -0
  111. package/dist/index.es389.js +14 -0
  112. package/dist/index.es389.js.map +1 -0
  113. package/dist/index.es392.js +1 -1
  114. package/dist/index.es393.js +128 -0
  115. package/dist/index.es393.js.map +1 -0
  116. package/dist/index.es394.js +138 -0
  117. package/dist/index.es394.js.map +1 -0
  118. package/dist/{index.es400.js → index.es395.js} +2 -2
  119. package/dist/{index.es400.js.map → index.es395.js.map} +1 -1
  120. package/dist/{index.es401.js → index.es396.js} +1 -1
  121. package/dist/{index.es401.js.map → index.es396.js.map} +1 -1
  122. package/dist/{index.es402.js → index.es397.js} +1 -1
  123. package/dist/{index.es402.js.map → index.es397.js.map} +1 -1
  124. package/dist/index.es398.js +47 -122
  125. package/dist/index.es398.js.map +1 -1
  126. package/dist/index.es399.js +47 -129
  127. package/dist/index.es399.js.map +1 -1
  128. package/dist/{index.es405.js → index.es406.js} +1 -1
  129. package/dist/{index.es405.js.map → index.es406.js.map} +1 -1
  130. package/dist/index.es420.js +1 -1
  131. package/dist/index.es424.js +3 -3
  132. package/dist/index.es426.js +3 -3
  133. package/dist/index.es427.js +6 -6
  134. package/dist/index.es431.js +8 -131
  135. package/dist/index.es431.js.map +1 -1
  136. package/dist/index.es432.js +1 -1
  137. package/dist/index.es433.js +3 -9
  138. package/dist/index.es433.js.map +1 -1
  139. package/dist/index.es434.js +131 -2
  140. package/dist/index.es434.js.map +1 -1
  141. package/dist/index.es436.js +1 -1
  142. package/dist/index.es437.js +3 -3
  143. package/dist/index.es449.js +4 -4
  144. package/dist/index.es451.js +1 -1
  145. package/dist/index.es453.js +4 -4
  146. package/dist/index.es463.js +512 -54
  147. package/dist/index.es463.js.map +1 -1
  148. package/dist/index.es464.js +126 -68
  149. package/dist/index.es464.js.map +1 -1
  150. package/dist/index.es465.js +128 -8
  151. package/dist/index.es465.js.map +1 -1
  152. package/dist/index.es466.js +68 -13
  153. package/dist/index.es466.js.map +1 -1
  154. package/dist/index.es467.js +8 -61
  155. package/dist/index.es467.js.map +1 -1
  156. package/dist/index.es468.js +11 -520
  157. package/dist/index.es468.js.map +1 -1
  158. package/dist/index.es469.js +61 -126
  159. package/dist/index.es469.js.map +1 -1
  160. package/dist/index.es470.js +61 -125
  161. package/dist/index.es470.js.map +1 -1
  162. package/dist/index.es51.js +11 -10
  163. package/dist/index.es51.js.map +1 -1
  164. package/dist/index.es62.js +43 -20
  165. package/dist/index.es62.js.map +1 -1
  166. package/package.json +1 -1
  167. package/dist/index.cjs379.js +0 -2
  168. package/dist/index.cjs379.js.map +0 -1
  169. package/dist/index.cjs381.js +0 -2
  170. package/dist/index.cjs381.js.map +0 -1
  171. package/dist/index.cjs382.js +0 -2
  172. package/dist/index.cjs382.js.map +0 -1
  173. package/dist/index.cjs403.js +0 -2
  174. package/dist/index.cjs403.js.map +0 -1
  175. package/dist/index.cjs404.js +0 -2
  176. package/dist/index.cjs404.js.map +0 -1
  177. package/dist/index.es379.js +0 -10
  178. package/dist/index.es379.js.map +0 -1
  179. package/dist/index.es381.js +0 -71
  180. package/dist/index.es381.js.map +0 -1
  181. package/dist/index.es382.js +0 -33
  182. package/dist/index.es382.js.map +0 -1
  183. package/dist/index.es403.js +0 -53
  184. package/dist/index.es403.js.map +0 -1
  185. package/dist/index.es404.js +0 -56
  186. package/dist/index.es404.js.map +0 -1
  187. /package/dist/components/ui/{DoctorModal/DoctorModalFooter/DoctorModalFooter.css → ConsentModal/ConsentModalFooter/ConsentModalFooter.css} +0 -0
@@ -1,11 +1,11 @@
1
1
  import * as p from "react";
2
- import { composeEventHandlers as m } from "./index.es379.js";
3
- import { composeRefs as E } from "./index.es380.js";
4
- import { createContextScope as S } from "./index.es381.js";
5
- import { useControllableState as P } from "./index.es382.js";
6
- import { Primitive as y } from "./index.es383.js";
7
- import { createMenuScope as D, Root as O, Anchor as T, Portal as j, Content as G, Group as k, Item as L, Label as K, CheckboxItem as U, RadioGroup as B, RadioItem as F, ItemIndicator as H, Separator as W, Arrow as $, SubTrigger as X, SubContent as q } from "./index.es384.js";
8
- import { useId as g } from "./index.es385.js";
2
+ import { composeEventHandlers as m } from "./index.es383.js";
3
+ import { composeRefs as E } from "./index.es384.js";
4
+ import { createContextScope as S } from "./index.es385.js";
5
+ import { useControllableState as P } from "./index.es386.js";
6
+ import { Primitive as y } from "./index.es387.js";
7
+ import { createMenuScope as D, Root as O, Anchor as T, Portal as j, Content as G, Group as k, Item as L, Label as K, CheckboxItem as U, RadioGroup as B, RadioItem as F, ItemIndicator as H, Separator as W, Arrow as $, SubTrigger as X, SubContent as q } from "./index.es388.js";
8
+ import { useId as g } from "./index.es389.js";
9
9
  import { j as a } from "./index.es209.js";
10
10
  var M = "DropdownMenu", [z, bo] = S(
11
11
  M,
@@ -3,7 +3,7 @@ import { Button as m } from "./index.es25.js";
3
3
  import { HeaderTopBanner as y } from "./index.es21.js";
4
4
  import { useState as g, useRef as w, useCallback as C, useEffect as u } from "react";
5
5
  import { clsx as r } from "./index.es211.js";
6
- import { useFocusTrap as N } from "./index.es386.js";
6
+ import { useFocusTrap as N } from "./index.es380.js";
7
7
  import { Container as k } from "./index.es6.js";
8
8
  import './components/navigations/HeaderMobile/HeaderMobile.css';/* empty css */
9
9
  import { Col as L } from "./index.es10.js";
@@ -1,12 +1,12 @@
1
1
  import * as n from "react";
2
- import { useComposedRefs as N } from "./index.es380.js";
3
- import { createContextScope as M } from "./index.es381.js";
4
- import { composeEventHandlers as S } from "./index.es379.js";
5
- import { useControllableState as O } from "./index.es382.js";
2
+ import { useComposedRefs as N } from "./index.es384.js";
3
+ import { createContextScope as M } from "./index.es385.js";
4
+ import { composeEventHandlers as S } from "./index.es383.js";
5
+ import { useControllableState as O } from "./index.es386.js";
6
6
  import { usePrevious as A } from "./index.es390.js";
7
7
  import { useSize as B } from "./index.es391.js";
8
8
  import { Presence as H } from "./index.es392.js";
9
- import { Primitive as j } from "./index.es383.js";
9
+ import { Primitive as j } from "./index.es387.js";
10
10
  import { j as f } from "./index.es209.js";
11
11
  var R = "Checkbox", [K, Y] = M(R), [L, q] = K(R), I = n.forwardRef(
12
12
  (e, l) => {
@@ -1,4 +1,4 @@
1
- import { useCopyToClipboard as s } from "./index.es405.js";
1
+ import { useCopyToClipboard as s } from "./index.es406.js";
2
2
  import { useState as i } from "react";
3
3
  const d = () => {
4
4
  const [e, t] = s(), [p, o] = i(!1);
@@ -1,18 +1,18 @@
1
1
  import * as s from "react";
2
- import { composeEventHandlers as p } from "./index.es379.js";
3
- import { useComposedRefs as C } from "./index.es380.js";
4
- import { createContextScope as B, createContext as H } from "./index.es381.js";
5
- import { useId as x } from "./index.es385.js";
6
- import { useControllableState as V } from "./index.es382.js";
7
- import { DismissableLayer as q } from "./index.es398.js";
8
- import { FocusScope as K } from "./index.es399.js";
9
- import { Portal as U } from "./index.es400.js";
2
+ import { composeEventHandlers as p } from "./index.es383.js";
3
+ import { useComposedRefs as C } from "./index.es384.js";
4
+ import { createContextScope as B, createContext as H } from "./index.es385.js";
5
+ import { useId as x } from "./index.es389.js";
6
+ import { useControllableState as V } from "./index.es386.js";
7
+ import { DismissableLayer as q } from "./index.es393.js";
8
+ import { FocusScope as K } from "./index.es394.js";
9
+ import { Portal as U } from "./index.es395.js";
10
10
  import { Presence as R } from "./index.es392.js";
11
- import { Primitive as m } from "./index.es383.js";
12
- import { useFocusGuards as Y } from "./index.es401.js";
13
- import Z from "./index.es402.js";
14
- import { hideOthers as z } from "./index.es403.js";
15
- import { createSlot as J } from "./index.es404.js";
11
+ import { Primitive as m } from "./index.es387.js";
12
+ import { useFocusGuards as Y } from "./index.es396.js";
13
+ import Z from "./index.es397.js";
14
+ import { hideOthers as z } from "./index.es398.js";
15
+ import { createSlot as J } from "./index.es399.js";
16
16
  import { j as i } from "./index.es209.js";
17
17
  var _ = "Dialog", [N, he] = B(_), [Q, u] = N(_), P = (e) => {
18
18
  const {
@@ -1,5 +1,5 @@
1
1
  import { j as t } from "./index.es209.js";
2
- import './components/ui/DoctorModal/DoctorModalFooter/DoctorModalFooter.css';/* empty css */
2
+ import './components/ui/ConsentModal/ConsentModalFooter/ConsentModalFooter.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,5 +1,5 @@
1
1
  import { j as t } from "./index.es209.js";
2
- import './components/ui/DoctorModal/DoctorModalFooter/DoctorModalFooter.css';/* empty css */
2
+ import './components/ui/ConsentModal/ConsentModalFooter/ConsentModalFooter.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,5 +1,5 @@
1
1
  import { j as t } from "./index.es209.js";
2
- import './components/ui/DoctorModal/DoctorModalFooter/DoctorModalFooter.css';/* empty css */
2
+ import './components/ui/ConsentModal/ConsentModalFooter/ConsentModalFooter.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,11 +1,11 @@
1
1
  import * as s from "react";
2
- import { composeEventHandlers as T } from "./index.es379.js";
3
- import { useComposedRefs as _ } from "./index.es380.js";
4
- import { createContextScope as H } from "./index.es381.js";
5
- import { useControllableState as I } from "./index.es382.js";
2
+ import { composeEventHandlers as T } from "./index.es383.js";
3
+ import { useComposedRefs as _ } from "./index.es384.js";
4
+ import { createContextScope as H } from "./index.es385.js";
5
+ import { useControllableState as I } from "./index.es386.js";
6
6
  import { usePrevious as M } from "./index.es390.js";
7
7
  import { useSize as N } from "./index.es391.js";
8
- import { Primitive as w } from "./index.es383.js";
8
+ import { Primitive as w } from "./index.es387.js";
9
9
  import { j as p } from "./index.es209.js";
10
10
  var S = "Switch", [B, J] = H(S), [q, z] = B(S), C = s.forwardRef(
11
11
  (e, n) => {
@@ -1,9 +1,9 @@
1
1
  import * as l from "react";
2
- import { createContextScope as T } from "./index.es381.js";
3
- import { useComposedRefs as A } from "./index.es380.js";
2
+ import { createContextScope as T } from "./index.es385.js";
3
+ import { useComposedRefs as A } from "./index.es384.js";
4
4
  import { createDialogScope as v, Root as O, Portal as j, Overlay as b, WarningProvider as w, Content as M, Title as I, Description as L, Close as f, Trigger as $ } from "./index.es267.js";
5
- import { composeEventHandlers as F } from "./index.es379.js";
6
- import { createSlottable as G } from "./index.es404.js";
5
+ import { composeEventHandlers as F } from "./index.es383.js";
6
+ import { createSlottable as G } from "./index.es399.js";
7
7
  import { j as i } from "./index.es209.js";
8
8
  var D = "AlertDialog", [W, te] = T(D, [
9
9
  v
@@ -1,4 +1,4 @@
1
- import { c as w } from "./index.es433.js";
1
+ import { c as w } from "./index.es431.js";
2
2
  import { m as l } from "./index.es432.js";
3
3
  function N(x) {
4
4
  let {
@@ -1,5 +1,5 @@
1
- import { c as $ } from "./index.es434.js";
2
- import { c as F } from "./index.es433.js";
1
+ import { c as $ } from "./index.es433.js";
2
+ import { c as F } from "./index.es431.js";
3
3
  import { m, a as E, f as T, h as S } from "./index.es432.js";
4
4
  function N(I) {
5
5
  let {
@@ -1,30 +1,18 @@
1
- import * as f from "react";
2
- function l(n, o) {
3
- if (typeof n == "function")
4
- return n(o);
5
- n != null && (n.current = o);
6
- }
7
- function i(...n) {
8
- return (o) => {
9
- let u = !1;
10
- const c = n.map((t) => {
11
- const e = l(t, o);
12
- return !u && typeof e == "function" && (u = !0), e;
13
- });
14
- if (u)
15
- return () => {
16
- for (let t = 0; t < c.length; t++) {
17
- const e = c[t];
18
- typeof e == "function" ? e() : l(n[t], null);
19
- }
20
- };
21
- };
22
- }
23
- function s(...n) {
24
- return f.useCallback(i(...n), n);
25
- }
1
+ import { useEffect as l } from "react";
2
+ const f = (t, n) => {
3
+ l(() => {
4
+ if (!n || !t.current) return;
5
+ const o = t.current.querySelectorAll(
6
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
7
+ ), c = o[0], r = o[o.length - 1], s = (e) => {
8
+ e.key === "Tab" && (e.shiftKey ? document.activeElement === c && (r.focus(), e.preventDefault()) : document.activeElement === r && (c.focus(), e.preventDefault()));
9
+ }, u = document.activeElement;
10
+ return c.focus(), document.addEventListener("keydown", s), () => {
11
+ document.removeEventListener("keydown", s), n && (u == null || u.focus());
12
+ };
13
+ }, [n, t]);
14
+ };
26
15
  export {
27
- i as composeRefs,
28
- s as useComposedRefs
16
+ f as useFocusTrap
29
17
  };
30
18
  //# sourceMappingURL=index.es380.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es380.js","sources":["../node_modules/@radix-ui/react-compose-refs/dist/index.mjs"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["setRef","ref","value","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","useComposedRefs","React"],"mappings":";AAEA,SAASA,EAAOC,GAAKC,GAAO;AAC1B,MAAI,OAAOD,KAAQ;AACjB,WAAOA,EAAIC,CAAK;AACX,EAAID,KAAQ,SACjBA,EAAI,UAAUC;AAElB;AACA,SAASC,KAAeC,GAAM;AAC5B,SAAO,CAACC,MAAS;AACf,QAAIC,IAAa;AACjB,UAAMC,IAAWH,EAAK,IAAI,CAACH,MAAQ;AACjC,YAAMO,IAAUR,EAAOC,GAAKI,CAAI;AAChC,aAAI,CAACC,KAAc,OAAOE,KAAW,eACnCF,IAAa,KAERE;AAAA,IACb,CAAK;AACD,QAAIF;AACF,aAAO,MAAM;AACX,iBAASG,IAAI,GAAGA,IAAIF,EAAS,QAAQE,KAAK;AACxC,gBAAMD,IAAUD,EAASE,CAAC;AAC1B,UAAI,OAAOD,KAAW,aACpBA,EAAS,IAETR,EAAOI,EAAKK,CAAC,GAAG,IAAI;AAAA,QAEhC;AAAA,MACO;AAAA,EAEJ;AACH;AACA,SAASC,KAAmBN,GAAM;AAChC,SAAOO,EAAM,YAAYR,EAAY,GAAGC,CAAI,GAAGA,CAAI;AACrD;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es380.js","sources":["../src/hooks/useFocusTrap.ts"],"sourcesContent":["import { useEffect } from \"react\";\r\n\r\nexport const useFocusTrap = (\r\n ref: React.RefObject<HTMLElement | null>,\r\n isActive: boolean,\r\n) => {\r\n useEffect(() => {\r\n if (!isActive || !ref.current) return;\r\n\r\n const focusableElements = ref.current.querySelectorAll(\r\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\r\n );\r\n const firstFocusableElement = focusableElements[0] as HTMLElement;\r\n const lastFocusableElement = focusableElements[\r\n focusableElements.length - 1\r\n ] as HTMLElement;\r\n\r\n const handleKeyDown = (e: KeyboardEvent) => {\r\n if (e.key !== \"Tab\") return;\r\n\r\n if (e.shiftKey) {\r\n if (document.activeElement === firstFocusableElement) {\r\n lastFocusableElement.focus();\r\n e.preventDefault();\r\n }\r\n } else {\r\n if (document.activeElement === lastFocusableElement) {\r\n firstFocusableElement.focus();\r\n e.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n const previousActiveElement = document.activeElement as HTMLElement;\r\n\r\n firstFocusableElement.focus();\r\n\r\n document.addEventListener(\"keydown\", handleKeyDown);\r\n\r\n return () => {\r\n document.removeEventListener(\"keydown\", handleKeyDown);\r\n\r\n if (isActive) {\r\n previousActiveElement?.focus();\r\n }\r\n };\r\n }, [isActive, ref]);\r\n};\r\n"],"names":["useFocusTrap","ref","isActive","useEffect","focusableElements","firstFocusableElement","lastFocusableElement","handleKeyDown","previousActiveElement"],"mappings":";AAEa,MAAAA,IAAe,CAC1BC,GACAC,MACG;AACH,EAAAC,EAAU,MAAM;AACd,QAAI,CAACD,KAAY,CAACD,EAAI,QAAS;AAEzB,UAAAG,IAAoBH,EAAI,QAAQ;AAAA,MACpC;AAAA,IACF,GACMI,IAAwBD,EAAkB,CAAC,GAC3CE,IAAuBF,EAC3BA,EAAkB,SAAS,CAC7B,GAEMG,IAAgB,CAAC,MAAqB;AACtC,MAAA,EAAE,QAAQ,UAEV,EAAE,WACA,SAAS,kBAAkBF,MAC7BC,EAAqB,MAAM,GAC3B,EAAE,eAAe,KAGf,SAAS,kBAAkBA,MAC7BD,EAAsB,MAAM,GAC5B,EAAE,eAAe;AAAA,IAGvB,GAEMG,IAAwB,SAAS;AAEvC,WAAAH,EAAsB,MAAM,GAEnB,SAAA,iBAAiB,WAAWE,CAAa,GAE3C,MAAM;AACF,eAAA,oBAAoB,WAAWA,CAAa,GAEjDL,MACFM,KAAA,QAAAA,EAAuB;AAAA,IAE3B;AAAA,EAAA,GACC,CAACN,GAAUD,CAAG,CAAC;AACpB;"}
@@ -1,36 +1,10 @@
1
- import * as p from "react";
2
- import * as f from "react-dom";
3
- import { createSlot as c } from "./index.es404.js";
4
- import { j as u } from "./index.es209.js";
5
- var l = [
6
- "a",
7
- "button",
8
- "div",
9
- "form",
10
- "h2",
11
- "h3",
12
- "img",
13
- "input",
14
- "label",
15
- "li",
16
- "nav",
17
- "ol",
18
- "p",
19
- "span",
20
- "svg",
21
- "ul"
22
- ], h = l.reduce((t, i) => {
23
- const o = c(`Primitive.${i}`), r = p.forwardRef((e, s) => {
24
- const { asChild: m, ...a } = e, n = m ? o : i;
25
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u.jsx(n, { ...a, ref: s });
26
- });
27
- return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
28
- }, {});
29
- function w(t, i) {
30
- t && f.flushSync(() => t.dispatchEvent(i));
1
+ function h(f, c, { checkForDefaultPrevented: p = !0 } = {}) {
2
+ return function(s) {
3
+ if (f == null || f(s), p === !1 || !s.defaultPrevented)
4
+ return c == null ? void 0 : c(s);
5
+ };
31
6
  }
32
7
  export {
33
- h as Primitive,
34
- w as dispatchDiscreteCustomEvent
8
+ h as composeEventHandlers
35
9
  };
36
10
  //# sourceMappingURL=index.es383.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es383.js","sources":["../node_modules/@radix-ui/react-primitive/dist/index.mjs"],"sourcesContent":["// packages/react/primitive/src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["NODES","Primitive","primitive","node","Slot","createSlot","Node","React","props","forwardedRef","asChild","primitiveProps","Comp","jsx","dispatchDiscreteCustomEvent","target","event","ReactDOM"],"mappings":";;;;AAKA,IAAIA,IAAQ;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GACIC,IAAYD,EAAM,OAAO,CAACE,GAAWC,MAAS;AAChD,QAAMC,IAAOC,EAAW,aAAaF,CAAI,EAAE,GACrCG,IAAOC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACrD,UAAM,EAAE,SAAAC,GAAS,GAAGC,EAAc,IAAKH,GACjCI,IAAOF,IAAUN,IAAOD;AAC9B,WAAI,OAAO,SAAW,QACpB,OAAO,OAAO,IAAI,UAAU,CAAC,IAAI,KAEZU,gBAAAA,EAAAA,IAAID,GAAM,EAAE,GAAGD,GAAgB,KAAKF,GAAc;AAAA,EAC7E,CAAG;AACD,SAAAH,EAAK,cAAc,aAAaH,CAAI,IAC7B,EAAE,GAAGD,GAAW,CAACC,CAAI,GAAGG,EAAM;AACvC,GAAG,CAAE,CAAA;AACL,SAASQ,EAA4BC,GAAQC,GAAO;AAClD,EAAID,KAAQE,EAAS,UAAU,MAAMF,EAAO,cAAcC,CAAK,CAAC;AAClE;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es383.js","sources":["../node_modules/@radix-ui/primitive/dist/index.mjs"],"sourcesContent":["// packages/core/primitive/src/primitive.tsx\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nexport {\n composeEventHandlers\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","event"],"mappings":"AACA,SAASA,EAAqBC,GAAsBC,GAAiB,EAAE,0BAAAC,IAA2B,GAAM,IAAG,IAAI;AAC7G,SAAO,SAAqBC,GAAO;AAEjC,QADAH,KAAA,QAAAA,EAAuBG,IACnBD,MAA6B,MAAS,CAACC,EAAM;AAC/C,aAAOF,KAAA,gBAAAA,EAAkBE;AAAA,EAE5B;AACH;","x_google_ignoreList":[0]}