@okam/stack-ui 1.37.0 → 1.37.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/components/Dialog/interface.d.ts +5 -3
  2. package/components/Modal/interface.d.ts +6 -4
  3. package/components/SidePanel/interface.d.ts +9 -6
  4. package/hooks/useLabelledOverlay/index.d.ts +9 -0
  5. package/hooks/useLabelledOverlay/interface.d.ts +14 -0
  6. package/index.d.ts +2 -1
  7. package/index.js +1 -1
  8. package/index.mjs +72 -70
  9. package/index100.js +5 -1
  10. package/index100.mjs +88 -6
  11. package/index101.js +1 -12
  12. package/index101.mjs +6 -40
  13. package/index102.js +12 -1
  14. package/index102.mjs +36 -25
  15. package/index103.js +1 -1
  16. package/index103.mjs +24 -8
  17. package/index104.js +1 -7
  18. package/index104.mjs +7 -13
  19. package/index105.js +6 -14
  20. package/index105.mjs +13 -65
  21. package/index106.js +15 -1
  22. package/index106.mjs +71 -7
  23. package/index107.js +1 -41
  24. package/index107.mjs +7 -106
  25. package/index108.js +32 -38
  26. package/index108.mjs +78 -74
  27. package/index109.js +46 -15
  28. package/index109.mjs +96 -19
  29. package/index110.js +16 -1
  30. package/index110.mjs +20 -37
  31. package/index111.js +1 -1
  32. package/index111.mjs +42 -48
  33. package/index112.js +1 -1
  34. package/index112.mjs +47 -22
  35. package/index113.js +1 -2
  36. package/index113.mjs +22 -21
  37. package/index114.js +1 -1
  38. package/index114.mjs +2 -2
  39. package/index115.js +1 -1
  40. package/index115.mjs +1 -1
  41. package/index123.js +1 -1
  42. package/index123.mjs +1 -1
  43. package/index131.js +1 -1
  44. package/index131.mjs +23 -8
  45. package/index139.js +1 -1
  46. package/index139.mjs +6 -18
  47. package/index145.js +1 -1
  48. package/index145.mjs +1 -1
  49. package/index150.js +1 -1
  50. package/index150.mjs +54 -18
  51. package/index151.js +1 -1
  52. package/index151.mjs +21 -6
  53. package/index152.js +1 -1
  54. package/index152.mjs +6 -46
  55. package/index153.js +1 -2
  56. package/index153.mjs +11 -12
  57. package/index154.js +1 -1
  58. package/index154.mjs +46 -30
  59. package/index155.js +2 -1
  60. package/index155.mjs +13 -57
  61. package/index156.js +1 -1
  62. package/index156.mjs +29 -11
  63. package/index178.js +1 -1
  64. package/index178.mjs +1 -1
  65. package/index18.js +1 -1
  66. package/index18.mjs +1 -1
  67. package/index2.js +1 -1
  68. package/index2.mjs +21 -21
  69. package/index250.js +1 -1
  70. package/index250.mjs +1 -1
  71. package/index30.js +1 -1
  72. package/index30.mjs +15 -12
  73. package/index310.js +1 -1
  74. package/index310.mjs +1 -1
  75. package/index35.js +1 -1
  76. package/index35.mjs +20 -20
  77. package/index38.js +1 -1
  78. package/index38.mjs +13 -13
  79. package/index4.js +1 -1
  80. package/index4.mjs +1 -1
  81. package/index43.js +1 -1
  82. package/index43.mjs +1 -1
  83. package/index45.js +1 -1
  84. package/index45.mjs +1 -1
  85. package/index75.js +1 -1
  86. package/index75.mjs +34 -29
  87. package/index8.js +1 -1
  88. package/index8.mjs +45 -34
  89. package/index81.js +1 -1
  90. package/index81.mjs +1 -1
  91. package/index89.js +2 -1
  92. package/index89.mjs +20 -5
  93. package/index9.js +1 -1
  94. package/index9.mjs +21 -21
  95. package/index90.js +1 -1
  96. package/index90.mjs +5 -2
  97. package/index91.js +1 -6
  98. package/index91.mjs +2 -94
  99. package/index92.js +6 -1
  100. package/index92.mjs +79 -54
  101. package/index93.js +1 -1
  102. package/index93.mjs +61 -33
  103. package/index94.js +1 -42
  104. package/index94.mjs +34 -67
  105. package/index95.js +38 -60
  106. package/index95.mjs +65 -219
  107. package/index96.js +63 -8
  108. package/index96.mjs +215 -44
  109. package/index97.js +9 -1
  110. package/index97.mjs +48 -36
  111. package/index98.js +1 -1
  112. package/index98.mjs +40 -8
  113. package/index99.js +1 -5
  114. package/index99.mjs +10 -85
  115. package/package.json +1 -1
  116. package/providers/SidePanel/interface.d.ts +13 -4
  117. package/theme/SidePanel/index.d.ts +1 -1
  118. package/components/Lightbox/hooks/overlay/index.d.ts +0 -79
package/index108.mjs CHANGED
@@ -1,104 +1,108 @@
1
- import { tv as e } from "tailwind-variants";
2
- import t from "./index110.mjs";
3
- const o = e({
1
+ import { tv as t } from "tailwind-variants";
2
+ import r from "./index111.mjs";
3
+ const a = t({
4
4
  base: `
5
5
  flex
6
6
  flex-col
7
7
  gap-4
8
8
  `
9
- }), r = e({
9
+ }), o = t({
10
10
  base: `
11
- w-full
12
11
  flex
13
- flex-wrap
14
- gap-2
15
- `
16
- }), a = e({
17
- extend: t,
18
- defaultVariants: {
19
- size: "h4"
12
+ gap-4
13
+ `,
14
+ variants: {
15
+ orientation: {
16
+ horizontal: "flex-col",
17
+ vertical: "flex-row"
18
+ }
20
19
  }
21
- }), s = e({
22
- extend: t,
20
+ }), e = t({
21
+ base: `
22
+ flex
23
+ flex-wrap
24
+ gap-4
25
+ `,
26
+ variants: {
27
+ orientation: {
28
+ horizontal: "flex-row items-center",
29
+ vertical: "flex-col items-end"
30
+ }
31
+ },
23
32
  defaultVariants: {
24
- size: "paragraph"
33
+ orientation: "horizontal"
25
34
  }
26
- }), i = e({
27
- extend: t,
35
+ }), i = t({
36
+ extend: r,
28
37
  defaultVariants: {
29
- size: "paragraph",
30
- isError: !0
38
+ size: "h3"
31
39
  }
32
- }), l = e({
40
+ }), n = t({
33
41
  base: `
34
- focus-visible:outline
35
- focus-visible:outline-offset-2
36
- focus-visible:outline-2
37
- focus-visible:outline-black
38
- cursor-pointer
42
+ focus-ring-black
39
43
  transition-all
40
44
  duration-200
45
+ `
46
+ }), s = t({
47
+ base: `
48
+ mt-4
49
+ p-4
50
+ bg-color-1-100
51
+ rounded-md
52
+ focus-ring-black
53
+ transition-all
54
+ duration-200
55
+ `
56
+ }), l = t({
57
+ extend: r,
58
+ base: `
59
+ focus-ring-black
60
+ transition-all
61
+ duration-200
62
+ px-4
63
+ py-2
41
64
  `,
42
65
  variants: {
43
- isSelected: {
44
- true: "bg-color-1-800 text-white"
45
- },
46
- isDisabled: {
47
- true: "opacity-50 pointer-events-none"
66
+ orientation: {
67
+ horizontal: "border-b border-b-4",
68
+ vertical: "border-r border-r-4"
48
69
  },
49
- isLink: {
70
+ isSelected: {
50
71
  true: `
51
- border-b
52
- border-color-1-300
53
- px-2
54
- py-0.5
55
- mx-2
56
- text-color-1-500
57
- hover:text-color-1-700
58
- hover:border-color-1-700
59
- active:text-color-1-900
72
+ border-color-1-500
73
+ hover:border-color-1-900
60
74
  active:border-color-1-900
61
75
  `,
62
76
  false: `
63
- p-2
64
- bg-color-1-200
65
- rounded-full
66
- hover:bg-color-1-300
67
- active:bg-color-1-400
68
- active:text-white
77
+ border-color-1-200
78
+ hover:border-color-1-400
79
+ active:border-color-1-400
69
80
  `
81
+ },
82
+ isDisabled: {
83
+ true: `
84
+ opacity-30
85
+ pointer-events-none
86
+ `
87
+ },
88
+ isFocusVisible: {
89
+ true: "has-focus-ring"
70
90
  }
71
91
  },
72
92
  defaultVariants: {
73
- isLink: !1
74
- }
75
- }), n = e({
76
- base: `
77
- flex
78
- items-center
79
- gap-2
80
- `
81
- }), p = e({
82
- base: `
83
- aspect-square
84
- rounded-full
85
- bg-black/30
86
- p-1
87
- h-auto
88
- w-8
89
- `
90
- }), g = {
91
- wrapper: o,
92
- tags: r,
93
- label: a,
94
- description: s,
95
- errorMessage: i,
96
- tag: {
97
- wrapper: l,
98
- container: n,
99
- removeButton: p
93
+ size: "h6"
100
94
  }
95
+ }), d = {
96
+ wrapper: a,
97
+ container: o,
98
+ list: e,
99
+ label: i,
100
+ panel: {
101
+ transition: n,
102
+ container: s
103
+ },
104
+ tab: l
101
105
  };
102
106
  export {
103
- g as default
107
+ d as default
104
108
  };
package/index109.js CHANGED
@@ -1,16 +1,47 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("tailwind-variants"),e=r.tv({base:`
1
+ "use strict";const e=require("tailwind-variants"),t=require("./index111.js"),r=e.tv({base:`
2
+ flex
3
+ flex-col
4
+ gap-4
5
+ `}),o=e.tv({base:`
2
6
  w-full
3
- min-h-32
4
- rounded-2xl
5
- px-6
6
- h-12
7
- border-2
8
- border-solid
9
- transition
10
- duration-300
11
- ease-in-out
12
- text-gray-2
13
- placeholder:text-gray-2
14
- focus-ring-black
15
-
16
- `,variants:{isError:{true:"border-red-500"}}});exports.textArea=e;
7
+ flex
8
+ flex-wrap
9
+ gap-2
10
+ `}),a=e.tv({extend:t,defaultVariants:{size:"h4"}}),s=e.tv({extend:t,defaultVariants:{size:"paragraph"}}),i=e.tv({extend:t,defaultVariants:{size:"paragraph",isError:!0}}),n=e.tv({base:`
11
+ focus-visible:outline
12
+ focus-visible:outline-offset-2
13
+ focus-visible:outline-2
14
+ focus-visible:outline-black
15
+ cursor-pointer
16
+ transition-all
17
+ duration-200
18
+ `,variants:{isSelected:{true:"bg-color-1-800 text-white"},isDisabled:{true:"opacity-50 pointer-events-none"},isLink:{true:`
19
+ border-b
20
+ border-color-1-300
21
+ px-2
22
+ py-0.5
23
+ mx-2
24
+ text-color-1-500
25
+ hover:text-color-1-700
26
+ hover:border-color-1-700
27
+ active:text-color-1-900
28
+ active:border-color-1-900
29
+ `,false:`
30
+ p-2
31
+ bg-color-1-200
32
+ rounded-full
33
+ hover:bg-color-1-300
34
+ active:bg-color-1-400
35
+ active:text-white
36
+ `}},defaultVariants:{isLink:!1}}),l=e.tv({base:`
37
+ flex
38
+ items-center
39
+ gap-2
40
+ `}),c=e.tv({base:`
41
+ aspect-square
42
+ rounded-full
43
+ bg-black/30
44
+ p-1
45
+ h-auto
46
+ w-8
47
+ `}),u={wrapper:r,tags:o,label:a,description:s,errorMessage:i,tag:{wrapper:n,container:l,removeButton:c}};module.exports=u;
package/index109.mjs CHANGED
@@ -1,27 +1,104 @@
1
- import { tv as r } from "tailwind-variants";
2
- const t = r({
1
+ import { tv as e } from "tailwind-variants";
2
+ import t from "./index111.mjs";
3
+ const o = e({
4
+ base: `
5
+ flex
6
+ flex-col
7
+ gap-4
8
+ `
9
+ }), r = e({
3
10
  base: `
4
11
  w-full
5
- min-h-32
6
- rounded-2xl
7
- px-6
8
- h-12
9
- border-2
10
- border-solid
11
- transition
12
- duration-300
13
- ease-in-out
14
- text-gray-2
15
- placeholder:text-gray-2
16
- focus-ring-black
17
-
12
+ flex
13
+ flex-wrap
14
+ gap-2
15
+ `
16
+ }), a = e({
17
+ extend: t,
18
+ defaultVariants: {
19
+ size: "h4"
20
+ }
21
+ }), s = e({
22
+ extend: t,
23
+ defaultVariants: {
24
+ size: "paragraph"
25
+ }
26
+ }), i = e({
27
+ extend: t,
28
+ defaultVariants: {
29
+ size: "paragraph",
30
+ isError: !0
31
+ }
32
+ }), l = e({
33
+ base: `
34
+ focus-visible:outline
35
+ focus-visible:outline-offset-2
36
+ focus-visible:outline-2
37
+ focus-visible:outline-black
38
+ cursor-pointer
39
+ transition-all
40
+ duration-200
18
41
  `,
19
42
  variants: {
20
- isError: {
21
- true: "border-red-500"
43
+ isSelected: {
44
+ true: "bg-color-1-800 text-white"
45
+ },
46
+ isDisabled: {
47
+ true: "opacity-50 pointer-events-none"
48
+ },
49
+ isLink: {
50
+ true: `
51
+ border-b
52
+ border-color-1-300
53
+ px-2
54
+ py-0.5
55
+ mx-2
56
+ text-color-1-500
57
+ hover:text-color-1-700
58
+ hover:border-color-1-700
59
+ active:text-color-1-900
60
+ active:border-color-1-900
61
+ `,
62
+ false: `
63
+ p-2
64
+ bg-color-1-200
65
+ rounded-full
66
+ hover:bg-color-1-300
67
+ active:bg-color-1-400
68
+ active:text-white
69
+ `
22
70
  }
71
+ },
72
+ defaultVariants: {
73
+ isLink: !1
23
74
  }
24
- });
75
+ }), n = e({
76
+ base: `
77
+ flex
78
+ items-center
79
+ gap-2
80
+ `
81
+ }), p = e({
82
+ base: `
83
+ aspect-square
84
+ rounded-full
85
+ bg-black/30
86
+ p-1
87
+ h-auto
88
+ w-8
89
+ `
90
+ }), g = {
91
+ wrapper: o,
92
+ tags: r,
93
+ label: a,
94
+ description: s,
95
+ errorMessage: i,
96
+ tag: {
97
+ wrapper: l,
98
+ container: n,
99
+ removeButton: p
100
+ }
101
+ };
25
102
  export {
26
- t as textArea
103
+ g as default
27
104
  };
package/index110.js CHANGED
@@ -1 +1,16 @@
1
- "use strict";const t=require("tailwind-variants"),e=t.tv({variants:{size:{h1:"text-5xl",h2:"text-4xl",h3:"text-3xl",h4:"text-2xl",h5:"text-xl",h6:"text-lg",leading:"text-md font-bold leading-normal",paragraph:"text-md inline",footnotes:"text-sm",xs:"text-xs"},font:{body:"font-body"},weight:{normal:"font-normal",light:"font-light",bold:"font-bold"},color:{gray:"text-gray-500",white:"text-white"},isError:{true:"text-sm text-error py-3"},align:{center:"text-center",left:"text-left",right:"text-right"}},defaultVariants:{size:"paragraph",font:"body"}});module.exports=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("tailwind-variants"),e=r.tv({base:`
2
+ w-full
3
+ min-h-32
4
+ rounded-2xl
5
+ px-6
6
+ h-12
7
+ border-2
8
+ border-solid
9
+ transition
10
+ duration-300
11
+ ease-in-out
12
+ text-gray-2
13
+ placeholder:text-gray-2
14
+ focus-ring-black
15
+
16
+ `,variants:{isError:{true:"border-red-500"}}});exports.textArea=e;
package/index110.mjs CHANGED
@@ -1,44 +1,27 @@
1
- import { tv as t } from "tailwind-variants";
2
- const o = t({
1
+ import { tv as r } from "tailwind-variants";
2
+ const t = r({
3
+ base: `
4
+ w-full
5
+ min-h-32
6
+ rounded-2xl
7
+ px-6
8
+ h-12
9
+ border-2
10
+ border-solid
11
+ transition
12
+ duration-300
13
+ ease-in-out
14
+ text-gray-2
15
+ placeholder:text-gray-2
16
+ focus-ring-black
17
+
18
+ `,
3
19
  variants: {
4
- size: {
5
- h1: "text-5xl",
6
- h2: "text-4xl",
7
- h3: "text-3xl",
8
- h4: "text-2xl",
9
- h5: "text-xl",
10
- h6: "text-lg",
11
- leading: "text-md font-bold leading-normal",
12
- paragraph: "text-md inline",
13
- footnotes: "text-sm",
14
- xs: "text-xs"
15
- },
16
- font: {
17
- body: "font-body"
18
- },
19
- weight: {
20
- normal: "font-normal",
21
- light: "font-light",
22
- bold: "font-bold"
23
- },
24
- color: {
25
- gray: "text-gray-500",
26
- white: "text-white"
27
- },
28
20
  isError: {
29
- true: "text-sm text-error py-3"
30
- },
31
- align: {
32
- center: "text-center",
33
- left: "text-left",
34
- right: "text-right"
21
+ true: "border-red-500"
35
22
  }
36
- },
37
- defaultVariants: {
38
- size: "paragraph",
39
- font: "body"
40
23
  }
41
24
  });
42
25
  export {
43
- o as default
26
+ t as textArea
44
27
  };
package/index111.js CHANGED
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),y=require("@react-aria/accordion"),R=require("react"),m=require("react-aria"),T=require("react-use"),b=require("./index78.js"),F=require("./index156.js"),i=require("./index27.js"),w=require("./index6.js"),C=require("./index14.js"),I=c=>{const{item:r,tokens:l,customTheme:h}=c,{props:x,rendered:k,key:f}=r,{icon:u,title:j,onOpenChange:a,tokens:q,themeName:g}=x??{},{themeName:t=g}=c,d=R.useRef(null),{state:s,TransitionAnimation:N=F}=b.useAccordionCtx(),{buttonProps:{onClick:K,onKeyDown:B,onPointerDown:D,...$},regionProps:p}=y.useAccordionItem(c,s,d),o=s.selectionManager.selectedKeys.has(f),n={...l,isOpen:o,...q},A=P=>{P.continuePropagation(),s.selectionManager.select(r.key),s.toggleKey(r.key)};return T.useUpdateEffect(()=>{a==null||a(o)},[o]),e.jsxs(i.default,{themeName:`${t}.container`,tokens:n,customTheme:h,children:[e.jsx(m.FocusRing,{focusRingClass:"has-focus-ring",children:e.jsxs(w.ButtonWithForwardRef,{...$,"aria-expanded":o,handlePress:A,ref:d,themeName:`${t}.button`,tokens:n,children:[e.jsx(i.default,{themeName:`${t}.title`,tokens:n,children:j}),u&&e.jsx(i.default,{themeName:`${t}.icon`,tokens:n,children:e.jsx(C,{icon:u})})]})}),e.jsx(N,{isVisible:o,themeName:`${t}.region`,...p,tokens:n,children:e.jsx(i.default,{themeName:`${t}.content`,tokens:n,children:e.jsx(m.FocusScope,{autoFocus:!0,children:k})})})]})};module.exports=I;
1
+ "use strict";const t=require("tailwind-variants"),e=t.tv({variants:{size:{h1:"text-5xl",h2:"text-4xl",h3:"text-3xl",h4:"text-2xl",h5:"text-xl",h6:"text-lg",leading:"text-md font-bold leading-normal",paragraph:"text-md inline",footnotes:"text-sm",xs:"text-xs"},font:{body:"font-body"},weight:{normal:"font-normal",light:"font-light",bold:"font-bold"},color:{gray:"text-gray-500",white:"text-white"},isError:{true:"text-sm text-error py-3"},align:{center:"text-center",left:"text-left",right:"text-right"}},defaultVariants:{size:"paragraph",font:"body"}});module.exports=e;
package/index111.mjs CHANGED
@@ -1,50 +1,44 @@
1
- import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import { useAccordionItem as b } from "@react-aria/accordion";
3
- import { useRef as F } from "react";
4
- import { FocusRing as I, FocusScope as R } from "react-aria";
5
- import { useUpdateEffect as w } from "react-use";
6
- import { useAccordionCtx as B } from "./index78.mjs";
7
- import C from "./index156.mjs";
8
- import i from "./index27.mjs";
9
- import { ButtonWithForwardRef as D } from "./index6.mjs";
10
- import K from "./index14.mjs";
11
- const L = (s) => {
12
- const { item: c, tokens: h, customTheme: u } = s, { props: f, rendered: p, key: k } = c, { icon: a, title: g, onOpenChange: m, tokens: N, themeName: P } = f ?? {}, { themeName: o = P } = s, l = F(null), { state: r, TransitionAnimation: x = C } = B(), {
13
- buttonProps: { onClick: j, onKeyDown: M, onPointerDown: E, ...y },
14
- regionProps: A
15
- } = b(s, r, l), n = r.selectionManager.selectedKeys.has(k), t = { ...h, isOpen: n, ...N }, T = ($) => {
16
- $.continuePropagation(), r.selectionManager.select(c.key), r.toggleKey(c.key);
17
- };
18
- return w(() => {
19
- m == null || m(n);
20
- }, [n]), /* @__PURE__ */ d(i, { themeName: `${o}.container`, tokens: t, customTheme: u, children: [
21
- /* @__PURE__ */ e(I, { focusRingClass: "has-focus-ring", children: /* @__PURE__ */ d(
22
- D,
23
- {
24
- ...y,
25
- "aria-expanded": n,
26
- handlePress: T,
27
- ref: l,
28
- themeName: `${o}.button`,
29
- tokens: t,
30
- children: [
31
- /* @__PURE__ */ e(i, { themeName: `${o}.title`, tokens: t, children: g }),
32
- a && /* @__PURE__ */ e(i, { themeName: `${o}.icon`, tokens: t, children: /* @__PURE__ */ e(K, { icon: a }) })
33
- ]
34
- }
35
- ) }),
36
- /* @__PURE__ */ e(
37
- x,
38
- {
39
- isVisible: n,
40
- themeName: `${o}.region`,
41
- ...A,
42
- tokens: t,
43
- children: /* @__PURE__ */ e(i, { themeName: `${o}.content`, tokens: t, children: /* @__PURE__ */ e(R, { autoFocus: !0, children: p }) })
44
- }
45
- )
46
- ] });
47
- };
1
+ import { tv as t } from "tailwind-variants";
2
+ const o = t({
3
+ variants: {
4
+ size: {
5
+ h1: "text-5xl",
6
+ h2: "text-4xl",
7
+ h3: "text-3xl",
8
+ h4: "text-2xl",
9
+ h5: "text-xl",
10
+ h6: "text-lg",
11
+ leading: "text-md font-bold leading-normal",
12
+ paragraph: "text-md inline",
13
+ footnotes: "text-sm",
14
+ xs: "text-xs"
15
+ },
16
+ font: {
17
+ body: "font-body"
18
+ },
19
+ weight: {
20
+ normal: "font-normal",
21
+ light: "font-light",
22
+ bold: "font-bold"
23
+ },
24
+ color: {
25
+ gray: "text-gray-500",
26
+ white: "text-white"
27
+ },
28
+ isError: {
29
+ true: "text-sm text-error py-3"
30
+ },
31
+ align: {
32
+ center: "text-center",
33
+ left: "text-left",
34
+ right: "text-right"
35
+ }
36
+ },
37
+ defaultVariants: {
38
+ size: "paragraph",
39
+ font: "body"
40
+ }
41
+ });
48
42
  export {
49
- L as default
43
+ o as default
50
44
  };
package/index112.js CHANGED
@@ -1 +1 @@
1
- "use strict";const f=require("react/jsx-runtime"),t=require("@react-spring/web"),u=require("./index73.js"),d="fixed",m=({isVisible:e,children:i,themeName:o,tokens:n,customTheme:s})=>{const r=u(o,n,s);return t.useTransition(e,{from:{opacity:0,position:d,left:0,top:0,zIndex:1e3,bottom:0,height:"100%"},enter:{opacity:1},leave:{opacity:0},config:t.config.stiff})((c,a)=>a&&f.jsx(t.animated.div,{className:r,style:c,children:i}))};module.exports=m;
1
+ "use strict";const e=require("react/jsx-runtime"),y=require("@react-aria/accordion"),R=require("react"),m=require("react-aria"),T=require("react-use"),b=require("./index78.js"),F=require("./index153.js"),i=require("./index27.js"),w=require("./index6.js"),C=require("./index14.js"),I=c=>{const{item:r,tokens:l,customTheme:h}=c,{props:x,rendered:k,key:f}=r,{icon:u,title:j,onOpenChange:a,tokens:q,themeName:g}=x??{},{themeName:t=g}=c,d=R.useRef(null),{state:s,TransitionAnimation:N=F}=b.useAccordionCtx(),{buttonProps:{onClick:K,onKeyDown:B,onPointerDown:D,...$},regionProps:p}=y.useAccordionItem(c,s,d),o=s.selectionManager.selectedKeys.has(f),n={...l,isOpen:o,...q},A=P=>{P.continuePropagation(),s.selectionManager.select(r.key),s.toggleKey(r.key)};return T.useUpdateEffect(()=>{a==null||a(o)},[o]),e.jsxs(i.default,{themeName:`${t}.container`,tokens:n,customTheme:h,children:[e.jsx(m.FocusRing,{focusRingClass:"has-focus-ring",children:e.jsxs(w.ButtonWithForwardRef,{...$,"aria-expanded":o,handlePress:A,ref:d,themeName:`${t}.button`,tokens:n,children:[e.jsx(i.default,{themeName:`${t}.title`,tokens:n,children:j}),u&&e.jsx(i.default,{themeName:`${t}.icon`,tokens:n,children:e.jsx(C,{icon:u})})]})}),e.jsx(N,{isVisible:o,themeName:`${t}.region`,...p,tokens:n,children:e.jsx(i.default,{themeName:`${t}.content`,tokens:n,children:e.jsx(m.FocusScope,{autoFocus:!0,children:k})})})]})};module.exports=I;
package/index112.mjs CHANGED
@@ -1,25 +1,50 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import { useTransition as m, config as c, animated as p } from "@react-spring/web";
3
- import d from "./index73.mjs";
4
- const l = "fixed", g = ({ isVisible: t, children: o, themeName: e, tokens: i, customTheme: n }) => {
5
- const s = d(e, i, n);
6
- return m(t, {
7
- from: {
8
- opacity: 0,
9
- position: l,
10
- left: 0,
11
- top: 0,
12
- zIndex: 1e3,
13
- bottom: 0,
14
- height: "100%"
15
- },
16
- enter: { opacity: 1 },
17
- leave: { opacity: 0 },
18
- config: c.stiff
19
- })(
20
- (a, r) => r && /* @__PURE__ */ f(p.div, { className: s, style: a, children: o })
21
- );
1
+ import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
+ import { useAccordionItem as b } from "@react-aria/accordion";
3
+ import { useRef as F } from "react";
4
+ import { FocusRing as I, FocusScope as R } from "react-aria";
5
+ import { useUpdateEffect as w } from "react-use";
6
+ import { useAccordionCtx as B } from "./index78.mjs";
7
+ import C from "./index153.mjs";
8
+ import i from "./index27.mjs";
9
+ import { ButtonWithForwardRef as D } from "./index6.mjs";
10
+ import K from "./index14.mjs";
11
+ const L = (s) => {
12
+ const { item: c, tokens: h, customTheme: u } = s, { props: f, rendered: p, key: k } = c, { icon: a, title: g, onOpenChange: m, tokens: N, themeName: P } = f ?? {}, { themeName: o = P } = s, l = F(null), { state: r, TransitionAnimation: x = C } = B(), {
13
+ buttonProps: { onClick: j, onKeyDown: M, onPointerDown: E, ...y },
14
+ regionProps: A
15
+ } = b(s, r, l), n = r.selectionManager.selectedKeys.has(k), t = { ...h, isOpen: n, ...N }, T = ($) => {
16
+ $.continuePropagation(), r.selectionManager.select(c.key), r.toggleKey(c.key);
17
+ };
18
+ return w(() => {
19
+ m == null || m(n);
20
+ }, [n]), /* @__PURE__ */ d(i, { themeName: `${o}.container`, tokens: t, customTheme: u, children: [
21
+ /* @__PURE__ */ e(I, { focusRingClass: "has-focus-ring", children: /* @__PURE__ */ d(
22
+ D,
23
+ {
24
+ ...y,
25
+ "aria-expanded": n,
26
+ handlePress: T,
27
+ ref: l,
28
+ themeName: `${o}.button`,
29
+ tokens: t,
30
+ children: [
31
+ /* @__PURE__ */ e(i, { themeName: `${o}.title`, tokens: t, children: g }),
32
+ a && /* @__PURE__ */ e(i, { themeName: `${o}.icon`, tokens: t, children: /* @__PURE__ */ e(K, { icon: a }) })
33
+ ]
34
+ }
35
+ ) }),
36
+ /* @__PURE__ */ e(
37
+ x,
38
+ {
39
+ isVisible: n,
40
+ themeName: `${o}.region`,
41
+ ...A,
42
+ tokens: t,
43
+ children: /* @__PURE__ */ e(i, { themeName: `${o}.content`, tokens: t, children: /* @__PURE__ */ e(R, { autoFocus: !0, children: p }) })
44
+ }
45
+ )
46
+ ] });
22
47
  };
23
48
  export {
24
- g as default
49
+ L as default
25
50
  };
package/index113.js CHANGED
@@ -1,2 +1 @@
1
- "use client";
2
- "use strict";const n=require("./index155.js"),p=require("react-aria");function P(o,s,t){const{type:a="dialog"}=o,{triggerProps:{onPress:l,...i},overlayProps:g}=p.useOverlayTrigger({type:a},s,t),e={handlePress:l,...i},r=n.useSlotId();return{openTriggerProps:{"aria-labelledby":r,...e},triggerProps:e,labelProps:{id:r},overlayProps:{...g,"aria-labelledby":r}}}module.exports=P;
1
+ "use strict";const f=require("react/jsx-runtime"),t=require("@react-spring/web"),u=require("./index73.js"),d="fixed",m=({isVisible:e,children:i,themeName:o,tokens:n,customTheme:s})=>{const r=u(o,n,s);return t.useTransition(e,{from:{opacity:0,position:d,left:0,top:0,zIndex:1e3,bottom:0,height:"100%"},enter:{opacity:1},leave:{opacity:0},config:t.config.stiff})((c,a)=>a&&f.jsx(t.animated.div,{className:r,style:c,children:i}))};module.exports=m;