@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.
- package/CHANGELOG.md +25 -0
- package/components/fields/ComboBox/interface.d.ts +6 -0
- package/components/fields/ListBox/interface.d.ts +1 -1
- package/components/fields/SearchField/interface.d.ts +9 -2
- package/components/fields/TextArea/attributes.d.ts +1 -0
- package/components/fields/TextInputField/attributes.d.ts +1 -0
- package/index.d.ts +1 -0
- package/index119.js +1 -1
- package/index119.mjs +1 -1
- package/index12.js +1 -1
- package/index12.mjs +6 -6
- package/index122.js +1 -1
- package/index122.mjs +22 -22
- package/index127.js +1 -1
- package/index127.mjs +10 -10
- package/index131.js +1 -1
- package/index131.mjs +1 -1
- package/index133.js +1 -1
- package/index133.mjs +11 -14
- package/index134.js +1 -1
- package/index134.mjs +12 -7
- package/index135.js +1 -1
- package/index135.mjs +14 -7
- package/index136.js +1 -1
- package/index136.mjs +6 -15
- package/index137.js +1 -1
- package/index137.mjs +7 -31
- package/index138.js +1 -2
- package/index138.mjs +15 -8
- package/index139.js +1 -2
- package/index139.mjs +30 -9
- package/index140.js +2 -1
- package/index140.mjs +8 -23
- package/index141.js +1 -1
- package/index141.mjs +8 -45
- package/index142.js +1 -1
- package/index142.mjs +24 -52
- package/index143.js +2 -6
- package/index143.mjs +45 -92
- package/index144.js +1 -1
- package/index144.mjs +52 -70
- package/index145.js +6 -1
- package/index145.mjs +82 -29
- package/index146.js +1 -51
- package/index146.mjs +65 -86
- package/index147.js +1 -64
- package/index147.mjs +33 -220
- package/index148.js +51 -10
- package/index148.mjs +85 -65
- package/index149.js +64 -1
- package/index149.mjs +214 -31
- package/index150.js +10 -1
- package/index150.mjs +68 -10
- package/index151.js +1 -6
- package/index151.mjs +42 -46
- package/index152.js +1 -5
- package/index152.mjs +10 -85
- package/index153.js +7 -1
- package/index153.mjs +50 -6
- package/index154.js +4 -11
- package/index154.mjs +78 -30
- package/index155.js +1 -1
- package/index155.mjs +6 -96
- package/index156.js +12 -1
- package/index156.mjs +39 -12
- package/index157.js +1 -1
- package/index157.mjs +96 -8
- package/index158.js +1 -1
- package/index158.mjs +13 -29
- package/index159.js +1 -1
- package/index159.mjs +7 -12
- package/index160.js +1 -7
- package/index160.mjs +23 -13
- package/index161.js +1 -15
- package/index161.mjs +9 -67
- package/index162.js +7 -1
- package/index162.mjs +22 -6
- package/index163.js +15 -9
- package/index163.mjs +68 -12
- package/index164.js +1 -41
- package/index164.mjs +7 -106
- package/index165.js +9 -47
- package/index165.mjs +13 -100
- package/index166.js +40 -15
- package/index166.mjs +100 -19
- package/index167.js +45 -18
- package/index167.mjs +85 -59
- package/index168.js +16 -1
- package/index168.mjs +20 -37
- package/index169.js +20 -1
- package/index169.mjs +76 -12
- package/index17.js +1 -1
- package/index17.mjs +14 -14
- package/index170.js +1 -1
- package/index170.mjs +41 -10
- package/index171.js +1 -1
- package/index171.mjs +11 -6
- package/index172.js +1 -2
- package/index172.mjs +6 -47
- package/index173.js +2 -0
- package/index173.mjs +50 -0
- package/index174.js +1 -0
- package/index174.mjs +13 -0
- package/index18.js +1 -1
- package/index18.mjs +7 -7
- package/index2.js +1 -1
- package/index2.mjs +4 -4
- package/index26.js +1 -1
- package/index26.mjs +15 -15
- package/index27.js +1 -1
- package/index27.mjs +15 -15
- package/index32.js +1 -1
- package/index32.mjs +105 -85
- package/index35.js +1 -1
- package/index35.mjs +14 -14
- package/index38.js +1 -1
- package/index38.mjs +115 -107
- package/index39.js +1 -1
- package/index39.mjs +11 -11
- package/index43.js +1 -1
- package/index43.mjs +55 -52
- package/index46.js +1 -1
- package/index46.mjs +86 -87
- package/index47.js +1 -1
- package/index47.mjs +110 -111
- package/index48.js +1 -1
- package/index48.mjs +3 -3
- package/index52.js +1 -1
- package/index52.mjs +1 -1
- package/index53.js +1 -1
- package/index53.mjs +1 -1
- package/index54.js +1 -1
- package/index54.mjs +3 -3
- package/index56.js +1 -1
- package/index56.mjs +33 -32
- package/index66.js +1 -1
- package/index66.mjs +1 -1
- package/index68.js +1 -1
- package/index68.mjs +11 -11
- package/index72.js +1 -1
- package/index72.mjs +13 -13
- package/index76.js +1 -1
- package/index76.mjs +1 -1
- package/index8.js +1 -1
- package/index8.mjs +30 -30
- package/index91.js +1 -1
- package/index91.mjs +50 -49
- package/package.json +2 -2
- package/theme/Search/index.d.ts +2 -1
package/index170.mjs
CHANGED
|
@@ -1,13 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
10
|
-
}
|
|
41
|
+
});
|
|
11
42
|
export {
|
|
12
|
-
|
|
43
|
+
o as default
|
|
13
44
|
};
|
package/index171.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
13
|
+
w as default
|
|
9
14
|
};
|
package/index172.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
3
|
-
import { useCarousel as
|
|
4
|
-
function
|
|
5
|
-
const { isDisabled: o, handlePress:
|
|
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(),
|
|
7
|
+
s?.slidePrev(), r?.(m);
|
|
8
8
|
},
|
|
9
9
|
isDisabled: e
|
|
10
10
|
});
|
|
11
11
|
return {
|
|
12
12
|
isDisabled: e,
|
|
13
|
-
navigationProps:
|
|
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
|
-
|
|
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"),
|
|
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
|
|
7
|
-
import
|
|
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
|
-
|
|
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:
|
|
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
|
|
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
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { mergeProps as
|
|
5
|
-
function
|
|
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
|
|
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:
|
|
19
|
+
swiper: t,
|
|
20
20
|
...c
|
|
21
|
-
} = e, { itemRoleDescriptionMessage:
|
|
22
|
-
const r =
|
|
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
|
-
}, [
|
|
29
|
+
}, [a.current]);
|
|
30
30
|
return {
|
|
31
|
-
ref:
|
|
32
|
-
slideProps:
|
|
33
|
-
...
|
|
34
|
-
"aria-roledescription":
|
|
35
|
-
role:
|
|
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
|
-
|
|
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
|
|
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
|
|
3
|
-
import { mergeProps as
|
|
4
|
-
import * as
|
|
5
|
-
import { useCarousel as
|
|
6
|
-
const b = ["A11y", "Controller"],
|
|
7
|
-
function h(
|
|
8
|
-
const { children: C, ...
|
|
9
|
-
controller:
|
|
10
|
-
setController:
|
|
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
|
-
} =
|
|
20
|
-
(e) =>
|
|
21
|
-
), { containerRoleDescriptionMessage: g = "carousel" } =
|
|
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:
|
|
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
|
-
...
|
|
41
|
+
...t
|
|
42
42
|
},
|
|
43
43
|
"aria-roledescription": g ?? void 0,
|
|
44
44
|
tabIndex: 0
|
|
45
45
|
};
|
|
46
46
|
return {
|
|
47
|
-
swiperProps:
|
|
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
|
|
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;
|