@okam/stack-ui 2.0.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/components/fields/ComboBox/interface.d.ts +6 -0
  3. package/components/fields/ListBox/interface.d.ts +1 -1
  4. package/components/fields/SearchField/interface.d.ts +9 -2
  5. package/components/fields/TextArea/attributes.d.ts +1 -0
  6. package/components/fields/TextInputField/attributes.d.ts +1 -0
  7. package/index.d.ts +1 -0
  8. package/index119.js +1 -1
  9. package/index119.mjs +1 -1
  10. package/index12.js +1 -1
  11. package/index12.mjs +6 -6
  12. package/index122.js +1 -1
  13. package/index122.mjs +22 -22
  14. package/index127.js +1 -1
  15. package/index127.mjs +10 -10
  16. package/index131.js +1 -1
  17. package/index131.mjs +1 -1
  18. package/index133.js +1 -1
  19. package/index133.mjs +11 -14
  20. package/index134.js +1 -1
  21. package/index134.mjs +12 -7
  22. package/index135.js +1 -1
  23. package/index135.mjs +14 -7
  24. package/index136.js +1 -1
  25. package/index136.mjs +6 -15
  26. package/index137.js +1 -1
  27. package/index137.mjs +7 -31
  28. package/index138.js +1 -2
  29. package/index138.mjs +15 -8
  30. package/index139.js +1 -2
  31. package/index139.mjs +30 -9
  32. package/index140.js +2 -1
  33. package/index140.mjs +8 -23
  34. package/index141.js +1 -1
  35. package/index141.mjs +8 -45
  36. package/index142.js +1 -1
  37. package/index142.mjs +24 -52
  38. package/index143.js +2 -6
  39. package/index143.mjs +45 -92
  40. package/index144.js +1 -1
  41. package/index144.mjs +52 -70
  42. package/index145.js +6 -1
  43. package/index145.mjs +82 -29
  44. package/index146.js +1 -51
  45. package/index146.mjs +65 -86
  46. package/index147.js +1 -64
  47. package/index147.mjs +33 -220
  48. package/index148.js +51 -10
  49. package/index148.mjs +85 -65
  50. package/index149.js +64 -1
  51. package/index149.mjs +214 -31
  52. package/index150.js +10 -1
  53. package/index150.mjs +68 -10
  54. package/index151.js +1 -6
  55. package/index151.mjs +42 -46
  56. package/index152.js +1 -5
  57. package/index152.mjs +10 -85
  58. package/index153.js +7 -1
  59. package/index153.mjs +50 -6
  60. package/index154.js +4 -11
  61. package/index154.mjs +78 -30
  62. package/index155.js +1 -1
  63. package/index155.mjs +6 -96
  64. package/index156.js +12 -1
  65. package/index156.mjs +39 -12
  66. package/index157.js +1 -1
  67. package/index157.mjs +96 -8
  68. package/index158.js +1 -1
  69. package/index158.mjs +13 -29
  70. package/index159.js +1 -1
  71. package/index159.mjs +7 -12
  72. package/index160.js +1 -7
  73. package/index160.mjs +23 -13
  74. package/index161.js +1 -15
  75. package/index161.mjs +9 -67
  76. package/index162.js +7 -1
  77. package/index162.mjs +22 -6
  78. package/index163.js +15 -9
  79. package/index163.mjs +68 -12
  80. package/index164.js +1 -41
  81. package/index164.mjs +7 -106
  82. package/index165.js +9 -47
  83. package/index165.mjs +13 -100
  84. package/index166.js +40 -15
  85. package/index166.mjs +100 -19
  86. package/index167.js +45 -18
  87. package/index167.mjs +85 -59
  88. package/index168.js +16 -1
  89. package/index168.mjs +20 -37
  90. package/index169.js +20 -1
  91. package/index169.mjs +76 -12
  92. package/index17.js +1 -1
  93. package/index17.mjs +14 -14
  94. package/index170.js +1 -1
  95. package/index170.mjs +41 -10
  96. package/index171.js +1 -1
  97. package/index171.mjs +11 -6
  98. package/index172.js +1 -2
  99. package/index172.mjs +6 -47
  100. package/index173.js +2 -0
  101. package/index173.mjs +50 -0
  102. package/index174.js +1 -0
  103. package/index174.mjs +13 -0
  104. package/index18.js +1 -1
  105. package/index18.mjs +7 -7
  106. package/index2.js +1 -1
  107. package/index2.mjs +4 -4
  108. package/index26.js +1 -1
  109. package/index26.mjs +15 -15
  110. package/index27.js +1 -1
  111. package/index27.mjs +15 -15
  112. package/index32.js +1 -1
  113. package/index32.mjs +105 -85
  114. package/index35.js +1 -1
  115. package/index35.mjs +14 -14
  116. package/index38.js +1 -1
  117. package/index38.mjs +115 -107
  118. package/index39.js +1 -1
  119. package/index39.mjs +11 -11
  120. package/index43.js +1 -1
  121. package/index43.mjs +55 -52
  122. package/index46.js +1 -1
  123. package/index46.mjs +86 -87
  124. package/index47.js +1 -1
  125. package/index47.mjs +110 -111
  126. package/index48.js +1 -1
  127. package/index48.mjs +3 -3
  128. package/index52.js +1 -1
  129. package/index52.mjs +1 -1
  130. package/index53.js +1 -1
  131. package/index53.mjs +1 -1
  132. package/index54.js +1 -1
  133. package/index54.mjs +3 -3
  134. package/index56.js +1 -1
  135. package/index56.mjs +33 -32
  136. package/index66.js +1 -1
  137. package/index66.mjs +1 -1
  138. package/index68.js +1 -1
  139. package/index68.mjs +11 -11
  140. package/index72.js +1 -1
  141. package/index72.mjs +13 -13
  142. package/index76.js +1 -1
  143. package/index76.mjs +1 -1
  144. package/index8.js +1 -1
  145. package/index8.mjs +30 -30
  146. package/index91.js +1 -1
  147. package/index91.mjs +50 -49
  148. package/package.json +2 -2
  149. package/theme/Search/index.d.ts +2 -1
package/index170.mjs CHANGED
@@ -1,13 +1,44 @@
1
- function d(r, o) {
2
- const l = [];
3
- let e = null;
4
- const s = [];
5
- for (const n of o) {
6
- const u = n.key === "header" || n.key?.toString().includes("header-"), t = r.find((i) => typeof i.rendered != "string" ? !1 : i.rendered === n.value);
7
- u ? (e != null && l.push(e), e = { header: { key: n.key, rendered: n.value }, items: [] }) : e != null ? t != null && e.items.push(t) : t != null && s.push(t);
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"
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"
8
40
  }
9
- return e != null && l.push(e), [...s.length > 0 ? [{ items: s }] : [], ...l];
10
- }
41
+ });
11
42
  export {
12
- d as getListboxSections
43
+ o as default
13
44
  };
package/index171.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function l(e,u){if(e==null)return!1;const{minValue:t,maxValue:n}=u;return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}exports.getIsDateOutsideRange=l;
1
+ "use strict";const u=require("react/jsx-runtime"),e=require("@react-spring/web"),T=require("./index88.js");function g(t){const{isVisible:o,children:i,themeName:n,tokens:r,customTheme:s,...a}=t,d=e.useTransition(o,{from:{gridTemplateRows:"0fr",paddingTop:"0",paddingBottom:"0"},enter:{gridTemplateRows:"1fr",paddingTop:"1rem",paddingBottom:"1rem"},leave:{gridTemplateRows:"0fr",paddingTop:"0",paddingBottom:"0"}}),m=T(n,r,s);return d((c,p)=>p&&u.jsx(e.animated.div,{...a,style:c,className:m,children:i}))}module.exports=g;
package/index171.mjs CHANGED
@@ -1,9 +1,14 @@
1
- function r(e, u) {
2
- if (e == null)
3
- return !1;
4
- const { minValue: n, maxValue: l } = u;
5
- return n != null && e.compare(n) < 0 || l != null && e.compare(l) > 0;
1
+ import { jsx as T } from "react/jsx-runtime";
2
+ import { useTransition as c, animated as f } from "@react-spring/web";
3
+ import g from "./index88.mjs";
4
+ function w(e) {
5
+ const { isVisible: t, children: o, themeName: i, tokens: r, customTheme: n, ...m } = e, s = c(t, {
6
+ from: { gridTemplateRows: "0fr", paddingTop: "0", paddingBottom: "0" },
7
+ enter: { gridTemplateRows: "1fr", paddingTop: "1rem", paddingBottom: "1rem" },
8
+ leave: { gridTemplateRows: "0fr", paddingTop: "0", paddingBottom: "0" }
9
+ }), a = g(i, r, n);
10
+ return s((d, p) => p && /* @__PURE__ */ T(f.div, { ...m, style: d, className: a, children: o }));
6
11
  }
7
12
  export {
8
- r as getIsDateOutsideRange
13
+ w as default
9
14
  };
package/index172.js CHANGED
@@ -1,2 +1 @@
1
- "use client";
2
- "use strict";const o=require("react/jsx-runtime"),i=require("@internationalized/date"),B=require("react"),n=require("react-aria"),c=require("./index7.js");function F(r){const{themeName:a="calendar",tokens:R,state:d,date:e}=r,u=B.useRef(null),{isUnavailable:k,cellProps:y,buttonProps:b,isSelected:t,isOutsideVisibleRange:h,isDisabled:C,formattedDate:S,isInvalid:q}=n.useCalendarCell(r,d,u),s=d?.highlightedRange,m=s?.start,f=s?.end,g=s!=null&&m!=null?i.isSameDay(e,m):t,x=s!=null&&f!=null?i.isSameDay(e,f):t,{locale:j}=n.useLocale(),D=i.getDayOfWeek(e,j),N=t&&(g||D===0||e.day===1),P=t&&(x||D===6||e.day===e.calendar.getDaysInMonth(e)),{focusProps:$,isFocusVisible:p}=n.useFocusRing(),l={isInvalid:q,isDisabled:C,isUnavailable:k,isSelected:t,isFocusVisible:p,isOutsideVisibleRange:h,...R};return o.jsx(c.Box,{as:"td",...y,"aria-disabled":!1,themeName:`${a}.cellContainer`,tokens:l,children:o.jsx(c.BoxWithForwardRef,{...n.mergeProps(b,$),ref:u,"aria-hidden":h,themeName:`${a}.cell`,tokens:{...l,isRoundedLeft:N,isRoundedRight:P},children:o.jsx(c.Box,{themeName:`${a}.cellDate`,tokens:{...l,isSelectionStart:g,isSelectionEnd:x},children:S})})})}module.exports=F;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function l(e,u){if(e==null)return!1;const{minValue:t,maxValue:n}=u;return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}exports.getIsDateOutsideRange=l;
package/index172.mjs CHANGED
@@ -1,50 +1,9 @@
1
- "use client";
2
- import { jsx as o } from "react/jsx-runtime";
3
- import { isSameDay as g, getDayOfWeek as W } from "@internationalized/date";
4
- import { useRef as $ } from "react";
5
- import { useCalendarCell as v, useLocale as B, useFocusRing as I, mergeProps as L } from "react-aria";
6
- import { Box as p, BoxWithForwardRef as V } from "./index7.mjs";
7
- function U(l) {
8
- const { themeName: s = "calendar", tokens: D, state: i, date: e } = l, r = $(null), {
9
- isUnavailable: R,
10
- cellProps: k,
11
- buttonProps: b,
12
- isSelected: t,
13
- isOutsideVisibleRange: c,
14
- isDisabled: y,
15
- formattedDate: C,
16
- isInvalid: S
17
- } = v(l, i, r), n = i?.highlightedRange, d = n?.start, m = n?.end, u = n != null && d != null ? g(e, d) : t, f = n != null && m != null ? g(e, m) : t, { locale: x } = B(), h = W(e, x), N = t && (u || h === 0 || e.day === 1), P = t && (f || h === 6 || e.day === e.calendar.getDaysInMonth(e)), { focusProps: F, isFocusVisible: O } = I(), a = {
18
- isInvalid: S,
19
- isDisabled: y,
20
- isUnavailable: R,
21
- isSelected: t,
22
- isFocusVisible: O,
23
- isOutsideVisibleRange: c,
24
- ...D
25
- };
26
- return /* @__PURE__ */ o(
27
- p,
28
- {
29
- as: "td",
30
- ...k,
31
- "aria-disabled": !1,
32
- themeName: `${s}.cellContainer`,
33
- tokens: a,
34
- children: /* @__PURE__ */ o(
35
- V,
36
- {
37
- ...L(b, F),
38
- ref: r,
39
- "aria-hidden": c,
40
- themeName: `${s}.cell`,
41
- tokens: { ...a, isRoundedLeft: N, isRoundedRight: P },
42
- children: /* @__PURE__ */ o(p, { themeName: `${s}.cellDate`, tokens: { ...a, isSelectionStart: u, isSelectionEnd: f }, children: C })
43
- }
44
- )
45
- }
46
- );
1
+ function r(e, u) {
2
+ if (e == null)
3
+ return !1;
4
+ const { minValue: n, maxValue: l } = u;
5
+ return n != null && e.compare(n) < 0 || l != null && e.compare(l) > 0;
47
6
  }
48
7
  export {
49
- U as default
8
+ r as getIsDateOutsideRange
50
9
  };
package/index173.js ADDED
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";const o=require("react/jsx-runtime"),i=require("@internationalized/date"),B=require("react"),n=require("react-aria"),c=require("./index7.js");function F(r){const{themeName:a="calendar",tokens:R,state:d,date:e}=r,u=B.useRef(null),{isUnavailable:k,cellProps:y,buttonProps:b,isSelected:t,isOutsideVisibleRange:h,isDisabled:C,formattedDate:S,isInvalid:q}=n.useCalendarCell(r,d,u),s=d?.highlightedRange,m=s?.start,f=s?.end,g=s!=null&&m!=null?i.isSameDay(e,m):t,x=s!=null&&f!=null?i.isSameDay(e,f):t,{locale:j}=n.useLocale(),D=i.getDayOfWeek(e,j),N=t&&(g||D===0||e.day===1),P=t&&(x||D===6||e.day===e.calendar.getDaysInMonth(e)),{focusProps:$,isFocusVisible:p}=n.useFocusRing(),l={isInvalid:q,isDisabled:C,isUnavailable:k,isSelected:t,isFocusVisible:p,isOutsideVisibleRange:h,...R};return o.jsx(c.Box,{as:"td",...y,"aria-disabled":!1,themeName:`${a}.cellContainer`,tokens:l,children:o.jsx(c.BoxWithForwardRef,{...n.mergeProps(b,$),ref:u,"aria-hidden":h,themeName:`${a}.cell`,tokens:{...l,isRoundedLeft:N,isRoundedRight:P},children:o.jsx(c.Box,{themeName:`${a}.cellDate`,tokens:{...l,isSelectionStart:g,isSelectionEnd:x},children:S})})})}module.exports=F;
package/index173.mjs ADDED
@@ -0,0 +1,50 @@
1
+ "use client";
2
+ import { jsx as o } from "react/jsx-runtime";
3
+ import { isSameDay as g, getDayOfWeek as W } from "@internationalized/date";
4
+ import { useRef as $ } from "react";
5
+ import { useCalendarCell as v, useLocale as B, useFocusRing as I, mergeProps as L } from "react-aria";
6
+ import { Box as p, BoxWithForwardRef as V } from "./index7.mjs";
7
+ function U(l) {
8
+ const { themeName: s = "calendar", tokens: D, state: i, date: e } = l, r = $(null), {
9
+ isUnavailable: R,
10
+ cellProps: k,
11
+ buttonProps: b,
12
+ isSelected: t,
13
+ isOutsideVisibleRange: c,
14
+ isDisabled: y,
15
+ formattedDate: C,
16
+ isInvalid: S
17
+ } = v(l, i, r), n = i?.highlightedRange, d = n?.start, m = n?.end, u = n != null && d != null ? g(e, d) : t, f = n != null && m != null ? g(e, m) : t, { locale: x } = B(), h = W(e, x), N = t && (u || h === 0 || e.day === 1), P = t && (f || h === 6 || e.day === e.calendar.getDaysInMonth(e)), { focusProps: F, isFocusVisible: O } = I(), a = {
18
+ isInvalid: S,
19
+ isDisabled: y,
20
+ isUnavailable: R,
21
+ isSelected: t,
22
+ isFocusVisible: O,
23
+ isOutsideVisibleRange: c,
24
+ ...D
25
+ };
26
+ return /* @__PURE__ */ o(
27
+ p,
28
+ {
29
+ as: "td",
30
+ ...k,
31
+ "aria-disabled": !1,
32
+ themeName: `${s}.cellContainer`,
33
+ tokens: a,
34
+ children: /* @__PURE__ */ o(
35
+ V,
36
+ {
37
+ ...L(b, F),
38
+ ref: r,
39
+ "aria-hidden": c,
40
+ themeName: `${s}.cell`,
41
+ tokens: { ...a, isRoundedLeft: N, isRoundedRight: P },
42
+ children: /* @__PURE__ */ o(p, { themeName: `${s}.cellDate`, tokens: { ...a, isSelectionStart: u, isSelectionEnd: f }, children: C })
43
+ }
44
+ )
45
+ }
46
+ );
47
+ }
48
+ export {
49
+ U as default
50
+ };
package/index174.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function c(o,r){const i=[];let e=null;const s=[];for(const t of r){const u=t.key==="header"||t.key?.toString().includes("header-"),n=o.find(l=>typeof l.rendered!="string"?!1:l.rendered===t.value);u?(e!=null&&i.push(e),e={header:{key:t.key,rendered:t.value},items:[]}):e!=null?n!=null&&e.items.push(n):n!=null&&s.push(n)}return e!=null&&i.push(e),[...s.length>0?[{items:s}]:[],...i]}exports.getListboxSections=c;
package/index174.mjs ADDED
@@ -0,0 +1,13 @@
1
+ function d(r, o) {
2
+ const l = [];
3
+ let e = null;
4
+ const s = [];
5
+ for (const n of o) {
6
+ const u = n.key === "header" || n.key?.toString().includes("header-"), t = r.find((i) => typeof i.rendered != "string" ? !1 : i.rendered === n.value);
7
+ u ? (e != null && l.push(e), e = { header: { key: n.key, rendered: n.value }, items: [] }) : e != null ? t != null && e.items.push(t) : t != null && s.push(t);
8
+ }
9
+ return e != null && l.push(e), [...s.length > 0 ? [{ items: s }] : [], ...l];
10
+ }
11
+ export {
12
+ d as getListboxSections
13
+ };
package/index18.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react-aria"),b=require("./index82.js");function f(a){const{isDisabled:o,handlePress:i,...t}=a,{controller:e,prevNavigationRef:n,id:l,activeIndex:c}=b.useCarousel(),{params:u}=e??{},{a11y:d}=e?.params??{},{loop:v}=u??{},P=c>0,s=o||!v&&!P,{pressProps:p}=r.usePress({onPress:g=>{e?.slidePrev(),i?.(g)},isDisabled:s});return{isDisabled:s,navigationProps:r.mergeProps(p,{"aria-disabled":s,"aria-controls":l,"aria-label":d?.prevSlideMessage},t),ref:n}}exports.useCarouselPrevNavigation=f;
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react-aria"),b=require("./index82.js");function y(r){const{isDisabled:o,handlePress:i,...t}=r,{controller:e,prevNavigationRef:n,id:l,activeIndex:c}=b.useCarousel(),{params:d}=e??{},u=typeof e?.params?.a11y=="object"?e.params.a11y:void 0,{loop:v}=d??{},p=c>0,s=o||!v&&!p,{pressProps:P}=a.usePress({onPress:g=>{e?.slidePrev(),i?.(g)},isDisabled:s});return{isDisabled:s,navigationProps:a.mergeProps(P,{"aria-disabled":s,"aria-controls":l,"aria-label":u?.prevSlideMessage},t),ref:n}}exports.useCarouselPrevNavigation=y;
package/index18.mjs CHANGED
@@ -1,16 +1,16 @@
1
1
  "use client";
2
- import { usePress as u, mergeProps as g } from "react-aria";
3
- import { useCarousel as b } from "./index82.mjs";
4
- function N(r) {
5
- const { isDisabled: o, handlePress: a, ...i } = r, { controller: s, prevNavigationRef: t, id: n, activeIndex: l } = b(), { params: p } = s ?? {}, { a11y: c } = s?.params ?? {}, { loop: d } = p ?? {}, v = l > 0, e = o || !d && !v, { pressProps: P } = u({
2
+ import { usePress as u, mergeProps as b } from "react-aria";
3
+ import { useCarousel as f } from "./index82.mjs";
4
+ function D(a) {
5
+ const { isDisabled: o, handlePress: r, ...i } = a, { controller: s, prevNavigationRef: t, id: n, activeIndex: l } = f(), { params: p } = s ?? {}, c = typeof s?.params?.a11y == "object" ? s.params.a11y : void 0, { loop: d } = p ?? {}, v = l > 0, e = o || !d && !v, { pressProps: P } = u({
6
6
  onPress: (m) => {
7
- s?.slidePrev(), a?.(m);
7
+ s?.slidePrev(), r?.(m);
8
8
  },
9
9
  isDisabled: e
10
10
  });
11
11
  return {
12
12
  isDisabled: e,
13
- navigationProps: g(
13
+ navigationProps: b(
14
14
  P,
15
15
  {
16
16
  "aria-disabled": e,
@@ -23,5 +23,5 @@ function N(r) {
23
23
  };
24
24
  }
25
25
  export {
26
- N as useCarouselPrevNavigation
26
+ D as useCarouselPrevNavigation
27
27
  };
package/index2.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";const o=require("react/jsx-runtime"),x=require("@react-aria/selection"),m=require("react"),h=require("./index81.js"),q=require("./index7.js"),A=require("./index119.js"),f=require("./index4.js");function b(t){const{id:s,themeName:n="accordion",tokens:r,customTheme:a,TransitionAnimation:d}=t,c=m.useRef(null),e=f(t),{listProps:l}=x.useSelectableList({collection:e.collection,disabledKeys:e.disabledKeys,selectionManager:e.selectionManager,allowsTabNavigation:!0,disallowTypeAhead:!0,ref:c}),u={...l,tabIndex:void 0};return o.jsx(h.AccordionContextProvider,{state:e,TransitionAnimation:d,children:o.jsx(q.BoxWithForwardRef,{themeName:`${n}.wrapper`,tokens:r,customTheme:a,ref:c,id:s,...u,children:[...e.collection].map(i=>o.jsx(A,{item:i,themeName:n,tokens:r},i.key))})})}module.exports=b;
2
+ "use strict";const o=require("react/jsx-runtime"),x=require("@react-aria/selection"),m=require("react"),A=require("./index81.js"),f=require("./index7.js"),h=require("./index119.js"),q=require("./index4.js");function b(r){const{id:s,themeName:t="accordion",tokens:n,customTheme:a,TransitionAnimation:d}=r,c=m.useRef(null),e=q(r),{listProps:l}=x.useSelectableList({collection:e.collection,disabledKeys:e.disabledKeys,selectionManager:e.selectionManager,allowsTabNavigation:!0,disallowTypeAhead:!0,ref:c}),u={...l,tabIndex:void 0};return o.jsx(A.AccordionContextProvider,{state:e,TransitionAnimation:d,children:o.jsx(f.BoxWithForwardRef,{themeName:`${t}.wrapper`,tokens:n,customTheme:a,ref:c,id:s,...u,children:Array.from(e.collection,i=>o.jsx(h,{item:i,themeName:t,tokens:n},i.key))})})}module.exports=b;
package/index2.mjs CHANGED
@@ -3,8 +3,8 @@ import { jsx as e } from "react/jsx-runtime";
3
3
  import { useSelectableList as f } from "@react-aria/selection";
4
4
  import { useRef as p } from "react";
5
5
  import { AccordionContextProvider as u } from "./index81.mjs";
6
- import { BoxWithForwardRef as h } from "./index7.mjs";
7
- import A from "./index119.mjs";
6
+ import { BoxWithForwardRef as A } from "./index7.mjs";
7
+ import h from "./index119.mjs";
8
8
  import b from "./index4.mjs";
9
9
  function P(r) {
10
10
  const { id: a, themeName: t = "accordion", tokens: i, customTheme: s, TransitionAnimation: l } = r, n = p(null), o = b(r), { listProps: m } = f({
@@ -16,7 +16,7 @@ function P(r) {
16
16
  ref: n
17
17
  }), d = { ...m, tabIndex: void 0 };
18
18
  return /* @__PURE__ */ e(u, { state: o, TransitionAnimation: l, children: /* @__PURE__ */ e(
19
- h,
19
+ A,
20
20
  {
21
21
  themeName: `${t}.wrapper`,
22
22
  tokens: i,
@@ -24,7 +24,7 @@ function P(r) {
24
24
  ref: n,
25
25
  id: a,
26
26
  ...d,
27
- children: [...o.collection].map((c) => /* @__PURE__ */ e(A, { item: c, themeName: t, tokens: i }, c.key))
27
+ children: Array.from(o.collection, (c) => /* @__PURE__ */ e(h, { item: c, themeName: t, tokens: i }, c.key))
28
28
  }
29
29
  ) });
30
30
  }
package/index26.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("radashi"),o=require("react"),w=require("react-aria");function g(e,s){if(s.current==null||e==null)return[];const{slideClass:l="swiper-slide"}=e.params;return s.current?.className.split(" ").filter(i=>i.indexOf("swiper-slide")===0||i.indexOf(l)===0)}function m(e){const{title:s,id:l,ariaLabel:a,"aria-label":i,children:v,swiperSlideIndex:y,swiper:n,...u}=e,{itemRoleDescriptionMessage:d="slide",slideRole:p="group"}=n?.params?.a11y??{},b=!f.isEmpty(s),t=o.useRef(null),c=o.useMemo(()=>{const r=g(n,t);return{isActive:r?.includes("swiper-slide-active"),isVisible:r?.includes("swiper-slide-visible"),isPrev:r?.includes("swiper-slide-prev"),isNext:r?.includes("swiper-slide-next")}},[t.current]);return{ref:t,slideProps:w.mergeProps(u,{...b?{"aria-labelledby":l}:{"aria-label":a??i},"aria-roledescription":d??void 0,role:p,inert:`!${c.isVisible}`}),titleProps:{},...c}}exports.useCarouselSlide=m;
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("radashi"),o=require("react"),y=require("react-aria");function v(e,s){if(s.current==null||e==null)return[];const{slideClass:l="swiper-slide"}=e.params;return s.current?.className.split(" ").filter(i=>i.indexOf("swiper-slide")===0||i.indexOf(l)===0)}function w(e){const{title:s,id:l,ariaLabel:n,"aria-label":i,children:g,swiperSlideIndex:P,swiper:t,...d}=e,u=typeof t?.params?.a11y=="object"?t.params.a11y:void 0,{itemRoleDescriptionMessage:p="slide",slideRole:b="group"}=u??{},f=!m.isEmpty(s),a=o.useRef(null),c=o.useMemo(()=>{const r=v(t,a);return{isActive:r?.includes("swiper-slide-active"),isVisible:r?.includes("swiper-slide-visible"),isPrev:r?.includes("swiper-slide-prev"),isNext:r?.includes("swiper-slide-next")}},[a.current]);return{ref:a,slideProps:y.mergeProps(d,{...f?{"aria-labelledby":l}:{"aria-label":n??i},"aria-roledescription":p??void 0,role:b,inert:`!${c.isVisible}`}),titleProps:{},...c}}exports.useCarouselSlide=w;
package/index26.mjs CHANGED
@@ -1,14 +1,14 @@
1
1
  "use client";
2
- import { isEmpty as m } from "radashi";
3
- import { useRef as b, useMemo as f } from "react";
4
- import { mergeProps as w } from "react-aria";
5
- function v(e, s) {
2
+ import { isEmpty as b } from "radashi";
3
+ import { useRef as f, useMemo as w } from "react";
4
+ import { mergeProps as v } from "react-aria";
5
+ function y(e, s) {
6
6
  if (s.current == null || e == null)
7
7
  return [];
8
8
  const { slideClass: l = "swiper-slide" } = e.params;
9
9
  return s.current?.className.split(" ").filter((i) => i.indexOf("swiper-slide") === 0 || i.indexOf(l) === 0);
10
10
  }
11
- function L(e) {
11
+ function R(e) {
12
12
  const {
13
13
  title: s,
14
14
  id: l,
@@ -16,23 +16,23 @@ function L(e) {
16
16
  "aria-label": i,
17
17
  children: x,
18
18
  swiperSlideIndex: g,
19
- swiper: a,
19
+ swiper: t,
20
20
  ...c
21
- } = e, { itemRoleDescriptionMessage: d = "slide", slideRole: p = "group" } = a?.params?.a11y ?? {}, u = !m(s), t = b(null), o = f(() => {
22
- const r = v(a, t);
21
+ } = e, d = typeof t?.params?.a11y == "object" ? t.params.a11y : void 0, { itemRoleDescriptionMessage: p = "slide", slideRole: u = "group" } = d ?? {}, m = !b(s), a = f(null), o = w(() => {
22
+ const r = y(t, a);
23
23
  return {
24
24
  isActive: r?.includes("swiper-slide-active"),
25
25
  isVisible: r?.includes("swiper-slide-visible"),
26
26
  isPrev: r?.includes("swiper-slide-prev"),
27
27
  isNext: r?.includes("swiper-slide-next")
28
28
  };
29
- }, [t.current]);
29
+ }, [a.current]);
30
30
  return {
31
- ref: t,
32
- slideProps: w(c, {
33
- ...u ? { "aria-labelledby": l } : { "aria-label": n ?? i },
34
- "aria-roledescription": d ?? void 0,
35
- role: p,
31
+ ref: a,
32
+ slideProps: v(c, {
33
+ ...m ? { "aria-labelledby": l } : { "aria-label": n ?? i },
34
+ "aria-roledescription": p ?? void 0,
35
+ role: u,
36
36
  inert: `!${o.isVisible}`
37
37
  }),
38
38
  titleProps: {},
@@ -40,5 +40,5 @@ function L(e) {
40
40
  };
41
41
  }
42
42
  export {
43
- L as useCarouselSlide
43
+ R as useCarouselSlide
44
44
  };
package/index27.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("@react-aria/utils"),P=require("react-aria"),y=require("swiper/modules"),S=require("./index82.js");function M(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const x=M(y),O=["A11y","Controller"],C="Pagination";function j(e){const{children:o,...r}=e,{controller:n,setController:a,modules:s,slides:l,id:c,nextNavigationRef:u,prevNavigationRef:p,swiperProps:d,swiperRef:f,setActiveIndex:g}=S.useCarousel(),{a11y:i}=n?.params??{},b=[...s?.filter(t=>t!==C)??[],...O].map(t=>x[t]),{containerRoleDescriptionMessage:w="carousel"}=i??{},m={navigation:{nextEl:u.current,prevEl:p.current,enabled:s?.includes("Navigation")},id:c,watchSlidesProgress:!0,role:"group",onSwiper:a,onSlideChange:t=>{g(t.activeIndex)},modules:b,keyboard:{enabled:!0,onlyInViewport:!1},a11y:{enabled:!0,...i},"aria-roledescription":w??void 0,tabIndex:0};return{swiperProps:P.mergeProps(d,m,v.filterDOMProps(r)),slides:l,ref:f}}exports.useCarouselSwiper=j;
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("@react-aria/utils"),v=require("react-aria"),P=require("swiper/modules"),S=require("./index82.js");function M(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const x=M(P),O=["A11y","Controller"],j="Pagination";function C(e){const{children:n,...r}=e,{controller:t,setController:a,modules:s,slides:l,id:c,nextNavigationRef:u,prevNavigationRef:p,swiperProps:d,swiperRef:f,setActiveIndex:g}=S.useCarousel(),i=typeof t?.params?.a11y=="object"?t.params.a11y:void 0,b=[...s?.filter(o=>o!==j)??[],...O].map(o=>x[o]),{containerRoleDescriptionMessage:w="carousel"}=i??{},y={navigation:{nextEl:u.current,prevEl:p.current,enabled:s?.includes("Navigation")},id:c,watchSlidesProgress:!0,role:"group",onSwiper:a,onSlideChange:o=>{g(o.activeIndex)},modules:b,keyboard:{enabled:!0,onlyInViewport:!1},a11y:{enabled:!0,...i},"aria-roledescription":w??void 0,tabIndex:0};return{swiperProps:v.mergeProps(d,y,m.filterDOMProps(r)),slides:l,ref:f}}exports.useCarouselSwiper=C;
package/index27.mjs CHANGED
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- import { filterDOMProps as v } from "@react-aria/utils";
3
- import { mergeProps as P } from "react-aria";
4
- import * as x from "swiper/modules";
5
- import { useCarousel as M } from "./index82.mjs";
6
- const b = ["A11y", "Controller"], y = "Pagination";
7
- function h(t) {
8
- const { children: C, ...n } = t, {
9
- controller: s,
10
- setController: i,
2
+ import { filterDOMProps as w } from "@react-aria/utils";
3
+ import { mergeProps as y } from "react-aria";
4
+ import * as P from "swiper/modules";
5
+ import { useCarousel as x } from "./index82.mjs";
6
+ const b = ["A11y", "Controller"], M = "Pagination";
7
+ function h(s) {
8
+ const { children: C, ...i } = s, {
9
+ controller: o,
10
+ setController: n,
11
11
  modules: r,
12
12
  slides: a,
13
13
  id: l,
@@ -16,9 +16,9 @@ function h(t) {
16
16
  swiperProps: c,
17
17
  swiperRef: u,
18
18
  setActiveIndex: m
19
- } = M(), { a11y: o } = s?.params ?? {}, f = [...r?.filter((e) => e !== y) ?? [], ...b].map(
20
- (e) => x[e]
21
- ), { containerRoleDescriptionMessage: g = "carousel" } = o ?? {}, w = {
19
+ } = x(), t = typeof o?.params?.a11y == "object" ? o.params.a11y : void 0, f = [...r?.filter((e) => e !== M) ?? [], ...b].map(
20
+ (e) => P[e]
21
+ ), { containerRoleDescriptionMessage: g = "carousel" } = t ?? {}, v = {
22
22
  navigation: {
23
23
  nextEl: p.current,
24
24
  prevEl: d.current,
@@ -27,7 +27,7 @@ function h(t) {
27
27
  id: l,
28
28
  watchSlidesProgress: !0,
29
29
  role: "group",
30
- onSwiper: i,
30
+ onSwiper: n,
31
31
  onSlideChange: (e) => {
32
32
  m(e.activeIndex);
33
33
  },
@@ -38,13 +38,13 @@ function h(t) {
38
38
  },
39
39
  a11y: {
40
40
  enabled: !0,
41
- ...o
41
+ ...t
42
42
  },
43
43
  "aria-roledescription": g ?? void 0,
44
44
  tabIndex: 0
45
45
  };
46
46
  return {
47
- swiperProps: P(c, w, v(n)),
47
+ swiperProps: y(c, v, w(i)),
48
48
  slides: a,
49
49
  ref: u
50
50
  };
package/index32.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";const e=require("react/jsx-runtime"),re=require("radashi"),n=require("react"),j=require("react-aria");require("react-hook-form");const ie=require("react-stately"),le=require("./index78.js"),ce=require("./index88.js"),p=require("./index7.js"),ue=require("./index48.js"),ae=require("./index93.js"),pe=require("./index99.js"),me=require("./index56.js"),k=require("./index74.js"),fe=require("./index38.js"),de=require("./index127.js");function xe(c){const{children:y,hookFormRef:m,errorMessage:f,themeName:t="comboBox",tokens:d,customTheme:N,label:x,icon:v=e.jsx(ae,{}),closeIcon:F=e.jsx(pe,{}),isDisabled:g=!1,isRequired:C=!1,isReadOnly:S=!1,defaultFilter:I,inputRef:M,buttonRef:T,popoverRef:V,listBoxRef:w,debounceDelay:D=200}=c,O=n.useRef(null),u=M??O,A=n.useRef(null),h=T??A,E=n.useRef(null),R=V??E,W=n.useRef(null),b=w??W,i=n.useRef(null),{contains:z}=j.useFilter({sensitivity:"base"}),L=I??z,o=ie.useComboBoxState({...c,defaultFilter:L}),{inputProps:G,listBoxProps:H,labelProps:J,buttonProps:K,errorMessageProps:Q,isInvalid:B}=j.useComboBox({...c,inputRef:u,buttonRef:h,popoverRef:R,listBoxRef:b},o),q=le.useDebounce(o.collection,D),P=n.useMemo(()=>({...o,collection:q}),[o,q]),{onPress:U,onPressStart:X,preventFocusOnPress:he,...Y}=K,{isOpen:l,selectedItem:a,selectionManager:Z}=o,{isFocused:_,isSelectAll:ee,isEmpty:te}=Z,$=!re.isEmpty(o.inputValue),s={...d,isInvalid:B,isOpen:l,isFocused:_,hasValue:$,hasSelectedItem:!te,isSelectAll:ee,isReadOnly:S,isDisabled:g,isRequired:C},oe=n.useCallback(r=>{r!=null&&(m?.(r),u.current=r)},[m,u]),se=n.useMemo(()=>a!=null&&!l?a.rendered:o.inputValue,[a,o.inputValue,l]),ne=ce(`${t}.input`,d);return e.jsxs(p.Box,{themeName:`${t}.wrapper`,tokens:s,customTheme:N,children:[x!=null&&e.jsx(k.Typography,{...J,as:"label",themeName:`${t}.label`,tokens:s,children:x}),e.jsxs(p.Box,{themeName:`${t}.container`,children:[e.jsxs(p.BoxWithForwardRef,{ref:i,themeName:`${t}.inputWrapper`,tokens:s,children:[e.jsx("input",{...G,ref:oe,value:se,className:ne}),e.jsx(de,{state:o,themeName:`${t}.button`,tokens:s,...Y,ref:h,handlePress:r=>{U?.(r),X?.(r)},children:e.jsx(ue,{themeName:`${t}.icon`,tokens:s,icon:$?F:v})})]}),l&&i.current!=null&&P.collection.size>0&&e.jsx(me.Popover,{themeName:`${t}.popover`,tokens:s,state:o,triggerRef:i,placement:"bottom",sizeRef:i,popoverRef:R,autoFocus:!1,children:e.jsx(fe.ControlledListBox,{...H,themeName:`${t}.list`,tokens:s,state:P,ref:b,children:y})}),B&&f!=null&&e.jsx(k.Typography,{tokens:s,themeName:`${t}.errorMessage`,...Q,children:f})]})]})}module.exports=xe;
2
+ "use strict";const n=require("react/jsx-runtime"),ae=require("radashi"),s=require("react"),y=require("react-aria");require("react-hook-form");const pe=require("react-stately"),fe=require("./index78.js"),de=require("./index88.js"),m=require("./index7.js"),me=require("./index48.js"),he=require("./index93.js"),xe=require("./index99.js"),Re=require("./index56.js"),v=require("./index74.js"),be=require("./index38.js"),Pe=require("./index127.js");function Be(i){const{children:I,hookFormRef:h,errorMessage:x,themeName:t="comboBox",tokens:R,customTheme:N,label:b,icon:S=n.jsx(he,{}),closeIcon:V=n.jsx(xe,{}),isDisabled:F=!1,isRequired:M=!1,isReadOnly:E=!1,defaultFilter:T,onInputChange:c,onSelectionChange:w,inputRef:D,buttonRef:O,popoverRef:A,listBoxRef:W,debounceDelay:z=200,isNonModal:P=!0}=i,L=s.useRef(null),a=D??L,K=s.useRef(null),B=O??K,G=s.useRef(null),q=A??G,H=s.useRef(null),g=W??H,u=s.useRef(null),{contains:J}=y.useFilter({sensitivity:"base"}),Q=T??J,p=i.inputValue!==void 0,e=pe.useComboBoxState({...i,defaultFilter:Q,onInputChange:p?c:void 0,onSelectionChange:w}),C=fe.useDebounce(e.inputValue,z);s.useEffect(()=>{p||c?.(C)},[C,p,c]);const{inputProps:U,listBoxProps:X,labelProps:Y,buttonProps:Z,errorMessageProps:_,isInvalid:$}=y.useComboBox({...i,inputRef:a,buttonRef:B,popoverRef:q,listBoxRef:g},e),{onPress:ee,onPressStart:j,onPressEnd:qe,onPressChange:ge,preventFocusOnPress:ne,...te}=Z,{isOpen:l,selectedItem:f,selectionManager:oe}=e,{isFocused:se,isSelectAll:re,isEmpty:ie}=oe,d=!ae.isEmpty(e.inputValue),k=!ie,o={...R,isInvalid:$,isOpen:l,isFocused:se,hasValue:d,hasSelectedItem:k,isSelectAll:re,isReadOnly:E,isDisabled:F,isRequired:M},ue=s.useCallback(r=>{r!=null&&(h?.(r),a.current=r)},[h,a]),le=s.useMemo(()=>f!=null&&!l?f.rendered:e.inputValue,[f,e.inputValue,l]),ce=de(`${t}.input`,R);return n.jsxs(m.Box,{themeName:`${t}.wrapper`,tokens:o,customTheme:N,children:[b!=null&&n.jsx(v.Typography,{...Y,as:"label",themeName:`${t}.label`,tokens:o,children:b}),n.jsxs(m.Box,{themeName:`${t}.container`,children:[n.jsxs(m.BoxWithForwardRef,{ref:u,themeName:`${t}.inputWrapper`,tokens:o,children:[n.jsx("input",{...U,ref:ue,value:le,className:ce}),n.jsx(Pe,{state:e,themeName:`${t}.button`,tokens:o,...te,preventFocusOnPress:ne,ref:B,handlePress:r=>{if(d||k){e.setSelectedKey(null),e.selectionManager.clearSelection(),e.setInputValue("");return}j!=null?j(r):ee?.(r)},children:n.jsx(me,{themeName:`${t}.icon`,tokens:o,icon:d?V:S})})]}),l&&u.current!=null&&e.collection.size>0&&n.jsx(Re.Popover,{themeName:`${t}.popover`,tokens:o,state:e,triggerRef:u,placement:"bottom",sizeRef:u,popoverRef:q,isNonModal:P,autoFocus:!1,contain:!P,children:n.jsx(be.ControlledListBox,{...X,themeName:`${t}.list`,tokens:o,state:e,ref:g,children:I})}),$&&x!=null&&n.jsx(v.Typography,{tokens:o,themeName:`${t}.errorMessage`,..._,children:x})]})]})}module.exports=Be;