@okam/stack-ui 1.44.6 → 2.0.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.
- package/CHANGELOG.md +14 -0
- package/index122.js +1 -1
- package/index122.mjs +2 -2
- package/index131.js +1 -1
- package/index131.mjs +1 -1
- package/index170.js +1 -1
- package/index170.mjs +10 -6
- package/index171.js +1 -2
- package/index171.mjs +6 -47
- package/index172.js +2 -1
- package/index172.mjs +47 -10
- package/index40.js +1 -1
- package/index40.mjs +11 -11
- package/index81.js +1 -1
- package/index81.mjs +1 -1
- package/index82.js +1 -1
- package/index82.mjs +1 -1
- package/index83.js +1 -1
- package/index83.mjs +1 -1
- package/index84.js +1 -1
- package/index84.mjs +1 -1
- package/index86.js +1 -1
- package/index86.mjs +1 -1
- package/index87.js +1 -1
- package/index87.mjs +12 -20
- package/index89.js +1 -1
- package/index89.mjs +1 -1
- package/index90.js +1 -1
- package/index90.mjs +1 -1
- package/package.json +3 -3
- package/providers/Theme/index.d.ts +0 -1
- package/theme/Alerts/index.d.ts +62 -62
- package/theme/Carousel/index.d.ts +20 -20
- package/theme/LightBox/index.d.ts +40 -40
- package/theme/ListBox/index.d.ts +140 -140
- package/theme/Popover/index.d.ts +11 -11
- package/theme/SkipToMain/index.d.ts +22 -22
- package/theme/TabList/index.d.ts +20 -20
- package/theme/TagGroup/index.d.ts +60 -60
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 2.0.1 (2026-02-27)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- remove async from option render ([#418](https://github.com/OKAMca/stack/pull/418))
|
|
6
|
+
|
|
7
|
+
### ❤️ Thank You
|
|
8
|
+
|
|
9
|
+
- Marie-Maxime Tanguay @marie-maxime
|
|
10
|
+
|
|
11
|
+
# 2.0.0 (2026-02-05)
|
|
12
|
+
|
|
13
|
+
This was a version bump only for stack-ui to align it with other projects, there were no code changes.
|
|
14
|
+
|
|
1
15
|
## 1.44.6 (2026-01-23)
|
|
2
16
|
|
|
3
17
|
### 🩹 Fixes
|
package/index122.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";const r=require("react/jsx-runtime"),j=require("react-aria"),s=require("./index7.js"),$=require("./
|
|
2
|
+
"use strict";const r=require("react/jsx-runtime"),j=require("react-aria"),s=require("./index7.js"),$=require("./index171.js"),b=require("./index172.js"),B={narrow:{value:"narrow"},abbreviated:{value:"short",transform:e=>e.map(o=>o.slice(0,2))},short:{value:"short"},long:{value:"long"}};function v({themeName:e="calendar",customTheme:o,tokens:a,state:l,weekdayStyle:i="abbreviated",...c}){const{value:u,transform:y}=B[i],d=j.useCalendarGrid({...c,weekdayStyle:u},l),{gridProps:x,headerProps:h,weeksInMonth:m}=d,w=y?.(d.weekDays)??d.weekDays;return r.jsxs(s.Box,{as:"table",...x,themeName:`${e}.calendarTable`,tokens:a,children:[r.jsx(s.Box,{as:"thead",themeName:`${e}.calendarHeaderContainer`,...h,tokens:a,children:r.jsx(s.Box,{as:"tr",themeName:`${e}.calendarHeaderRow`,tokens:a,children:w.map(n=>r.jsx(s.Box,{as:"th",themeName:`${e}.calendarDayLabel`,tokens:a,children:n},`day-${n}`))})}),r.jsx(s.Box,{as:"tbody",themeName:`${e}.calendarBody`,tokens:a,children:[...Array.from({length:m}).keys()].map(n=>r.jsx(s.Box,{as:"tr",themeName:`${e}.calendarWeekRow`,tokens:a,children:l.getDatesInWeek(n).map((t,p)=>{if(t==null)return r.jsx(s.Box,{themeName:`${e}.calendarCellContainer`,tokens:{isEmpty:!0,...a},as:"td"},p);const g=$.getIsDateOutsideRange(t,l);return r.jsx(b,{themeName:e,tokens:{isOutsideRange:g,isEmpty:!1,...a},state:l,date:t},t?.day)})},`week-${n}`))})]})}module.exports=v;
|
package/index122.mjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsxs as b, jsx as r } from "react/jsx-runtime";
|
|
3
3
|
import { useCalendarGrid as g } from "react-aria";
|
|
4
4
|
import { Box as l } from "./index7.mjs";
|
|
5
|
-
import { getIsDateOutsideRange as v } from "./
|
|
6
|
-
import C from "./
|
|
5
|
+
import { getIsDateOutsideRange as v } from "./index171.mjs";
|
|
6
|
+
import C from "./index172.mjs";
|
|
7
7
|
const k = {
|
|
8
8
|
narrow: {
|
|
9
9
|
value: "narrow"
|
package/index131.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),p=require("react"),h=require("react-aria"),$=require("./index88.js"),u=require("./index7.js"),f=require("./index74.js"),B=require("./
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),p=require("react"),h=require("react-aria"),$=require("./index88.js"),u=require("./index7.js"),f=require("./index74.js"),B=require("./index170.js");function l({item:o,state:i,themeName:n="li"}){const r=p.useRef(null),{optionProps:e,isFocusVisible:c}=h.useOption({key:o.key},i,r),a=$(n);return t.jsx(f.TypographyWithForwardRef,{as:"li",...e,tokens:{className:`${a} ${c?"has-focus-ring":""}`},ref:r,children:o.rendered})}function x(o){const{children:i,listBoxRef:n,themeName:r,...e}=o;return t.jsx(h.FocusScope,{autoFocus:!0,restoreFocus:!0,contain:!0,children:t.jsx(u.BoxWithForwardRef,{...e,ref:n,as:"ul",themeName:`${r}.ul`,children:i})})}function k(o){const i=p.useRef(null),{listBoxRef:n=i,state:r,themeName:e="option",optionsWithHeaders:c}=o,{listBoxProps:a}=h.useListBox(o,r,n),d=Array.from(r.collection),y=B.getListboxSections(d,c??[]);return c?.some(s=>s.key?.includes("header-"))?t.jsx(x,{...a,listBoxRef:n,themeName:e,children:y.map(s=>{const j=s.header!=null?`section-${s.header.key}`:`section-${s.items[0]?.key??"empty"}`;return t.jsx(u.Box,{as:"li",themeName:`${e}.group`,children:t.jsxs(u.Box,{as:"section",themeName:`${e}.section`,children:[s.header!=null&&t.jsx(f.Typography,{as:"header",themeName:`${e}.headerText`,children:s.header.rendered},s.header.key),t.jsx(u.Box,{as:"ul",themeName:`${e}.list`,children:s.items.map(m=>t.jsx(l,{themeName:`${e}.li`,item:m,state:r},String(m.key)))})]})},j)})}):t.jsx(x,{...a,listBoxRef:n,themeName:e,children:d.map(s=>t.jsx(l,{themeName:`${e}.li`,item:s,state:r},s.key))})}exports.ListBox=k;exports.Option=l;
|
package/index131.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { useListBox as $, FocusScope as N, useOption as k } from "react-aria";
|
|
|
5
5
|
import B from "./index88.mjs";
|
|
6
6
|
import { Box as c, BoxWithForwardRef as g } from "./index7.mjs";
|
|
7
7
|
import { Typography as F, TypographyWithForwardRef as R } from "./index74.mjs";
|
|
8
|
-
import { getListboxSections as L } from "./
|
|
8
|
+
import { getListboxSections as L } from "./index170.mjs";
|
|
9
9
|
function u({ item: s, state: i, themeName: n = "li" }) {
|
|
10
10
|
const t = p(null), { optionProps: e, isFocusVisible: a } = k({ key: s.key }, i, t), m = B(n);
|
|
11
11
|
return /* @__PURE__ */ r(
|
package/index170.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function
|
|
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/index170.mjs
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
function r
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
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];
|
|
6
10
|
}
|
|
7
11
|
export {
|
|
8
|
-
|
|
12
|
+
d as getListboxSections
|
|
9
13
|
};
|
package/index171.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/index171.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/index172.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use
|
|
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/index172.mjs
CHANGED
|
@@ -1,13 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
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
|
+
);
|
|
10
47
|
}
|
|
11
48
|
export {
|
|
12
|
-
|
|
49
|
+
U as default
|
|
13
50
|
};
|
package/index40.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";const n=require("react/jsx-runtime"),e=require("react"),l=require("react-aria"),w=require("./index77.js"),a=require("./index7.js"),M=require("./index8.js");function O({item:d,state:o,...f}){const{key:t,rendered:s,type:k}=d,{themeName:i="option",tokens:g,as:b="li",customTheme:C,linkElementType:P=M.Anchor,...j}=w.mergeDefaultComponentProps(f,d.props),m=e.useRef(null),{optionProps:q,isFocused:
|
|
2
|
+
"use strict";const n=require("react/jsx-runtime"),e=require("react"),l=require("react-aria"),w=require("./index77.js"),a=require("./index7.js"),M=require("./index8.js");function O({item:d,state:o,...f}){const{key:t,rendered:s,type:k}=d,{themeName:i="option",tokens:g,as:b="li",customTheme:C,linkElementType:P=M.Anchor,...j}=w.mergeDefaultComponentProps(f,d.props),m=e.useRef(null),{optionProps:q,isFocused:E,isDisabled:y,isFocusVisible:F,isPressed:R,isSelected:V,allowsSelection:A,descriptionProps:D,labelProps:L,hasAction:N}=l.useOption({key:t},o,m),r=o.selectionManager.isLink(t),S=o.selectionManager.canSelectItem(t),c={...g,type:k,isFocused:E,isDisabled:y,isFocusVisible:F,isPressed:R,isSelected:V,allowsSelection:A,hasAction:N,isLink:r,isSelectable:S},T=r?P:a.BoxWithForwardRef,$=r?"a":b,B=()=>{if(e.Children.count(s)>1){const[p,u]=e.Children.toArray(s),h=e.isValidElement(p),x=e.isValidElement(u);return!h&&!x?s:n.jsxs(n.Fragment,{children:[h&&n.jsx(a.Box,{themeName:`${i}.label`,tokens:c,children:e.cloneElement(p,L)}),x&&n.jsx(a.Box,{themeName:`${i}.description`,tokens:c,children:e.cloneElement(u,D)})]})}return s};return n.jsx(l.FocusRing,{focusRingClass:"has-focus-ring",children:n.jsx(T,{as:$,...l.mergeProps(j,q),ref:m,themeName:`${i}.option`,tokens:c,customTheme:C,children:B()})})}module.exports=O;
|
package/index40.mjs
CHANGED
|
@@ -6,18 +6,18 @@ import { mergeDefaultComponentProps as G } from "./index77.mjs";
|
|
|
6
6
|
import { BoxWithForwardRef as H, Box as k } from "./index7.mjs";
|
|
7
7
|
import { Anchor as J } from "./index8.mjs";
|
|
8
8
|
function _({
|
|
9
|
-
item:
|
|
9
|
+
item: l,
|
|
10
10
|
state: n,
|
|
11
11
|
...g
|
|
12
12
|
}) {
|
|
13
|
-
const { key: s, rendered: e, type: b } =
|
|
13
|
+
const { key: s, rendered: e, type: b } = l, {
|
|
14
14
|
themeName: t = "option",
|
|
15
|
-
tokens:
|
|
16
|
-
as:
|
|
17
|
-
customTheme:
|
|
15
|
+
tokens: P,
|
|
16
|
+
as: x = "li",
|
|
17
|
+
customTheme: y,
|
|
18
18
|
linkElementType: C = J,
|
|
19
19
|
...F
|
|
20
|
-
} = G(g,
|
|
20
|
+
} = G(g, l.props), c = W(null), {
|
|
21
21
|
optionProps: E,
|
|
22
22
|
isFocused: L,
|
|
23
23
|
isDisabled: N,
|
|
@@ -28,8 +28,8 @@ function _({
|
|
|
28
28
|
descriptionProps: A,
|
|
29
29
|
labelProps: D,
|
|
30
30
|
hasAction: $
|
|
31
|
-
} = q({ key: s }, n,
|
|
32
|
-
...
|
|
31
|
+
} = q({ key: s }, n, c), i = n.selectionManager.isLink(s), j = n.selectionManager.canSelectItem(s), r = {
|
|
32
|
+
...P,
|
|
33
33
|
type: b,
|
|
34
34
|
isFocused: L,
|
|
35
35
|
isDisabled: N,
|
|
@@ -40,7 +40,7 @@ function _({
|
|
|
40
40
|
hasAction: $,
|
|
41
41
|
isLink: i,
|
|
42
42
|
isSelectable: j
|
|
43
|
-
}, w = i ? C : H, B = i ? "a" :
|
|
43
|
+
}, w = i ? C : H, B = i ? "a" : x, M = () => {
|
|
44
44
|
if (u.count(e) > 1) {
|
|
45
45
|
const [m, a] = u.toArray(e), p = f(m), d = f(a);
|
|
46
46
|
return !p && !d ? e : /* @__PURE__ */ O(I, { children: [
|
|
@@ -55,10 +55,10 @@ function _({
|
|
|
55
55
|
{
|
|
56
56
|
as: B,
|
|
57
57
|
...z(F, E),
|
|
58
|
-
ref:
|
|
58
|
+
ref: c,
|
|
59
59
|
themeName: `${t}.option`,
|
|
60
60
|
tokens: r,
|
|
61
|
-
customTheme:
|
|
61
|
+
customTheme: y,
|
|
62
62
|
children: M()
|
|
63
63
|
}
|
|
64
64
|
) });
|
package/index81.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),s=require("@okam/
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),s=require("@okam/react-utils"),u=require("react"),e=s.createCtxNullable(),d=e[0],a=e[1];function l(r){const{state:o,children:c,TransitionAnimation:t}=r,n=u.useMemo(()=>({state:o,TransitionAnimation:t}),[o,t]);return i.jsx(a,{value:n,children:c})}exports.AccordionContextProvider=l;exports.useAccordionCtx=d;
|
package/index81.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import { createCtxNullable as s } from "@okam/
|
|
3
|
+
import { createCtxNullable as s } from "@okam/react-utils";
|
|
4
4
|
import { useMemo as m } from "react";
|
|
5
5
|
const r = s(), l = r[0], a = r[1];
|
|
6
6
|
function f(n) {
|
package/index82.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react/jsx-runtime"),S=require("@okam/
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react/jsx-runtime"),S=require("@okam/react-utils"),e=require("react"),[p,R]=S.createCtxNullable();function v(x){const{controller:t,children:f,id:o,slides:s,modules:n,...l}=x,[i,u]=e.useState(),c=e.useRef(null),a=e.useRef(null),r=e.useRef(null),[C,d]=e.useState(0),w=e.useMemo(()=>({swiper:r.current?.swiper,activeIndex:C,setActiveIndex:d,swiperRef:r,slides:s,controller:t??i,setController:u,prevNavigationRef:c,nextNavigationRef:a,id:o,modules:n,swiperProps:l}),[r,C,d,s,t,i,u,c,a,o,n,l]);return P.jsx(R,{value:w,children:f})}const g=v,m=p;exports.CarouselContextProvider=v;exports.SwiperControllerContextProvider=g;exports.useCarousel=p;exports.useSwiperController=m;
|
package/index82.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as x } from "react/jsx-runtime";
|
|
3
|
-
import { createCtxNullable as w } from "@okam/
|
|
3
|
+
import { createCtxNullable as w } from "@okam/react-utils";
|
|
4
4
|
import { useState as v, useRef as o, useMemo as P } from "react";
|
|
5
5
|
const [R, N] = w();
|
|
6
6
|
function S(C) {
|
package/index83.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),o=require("@okam/
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),o=require("@okam/react-utils"),e=require("react"),[u,c]=o.createCtx();function l({children:s}){const[t,r]=e.useState(!1);e.useEffect(()=>{r(!0)},[]);const n=e.useMemo(()=>({isClient:t}),[t]);return i.jsx(c,{value:n,children:s})}exports.IsClientContextProvider=l;exports.useIsClient=u;
|
package/index83.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as s } from "react/jsx-runtime";
|
|
3
|
-
import { createCtx as i } from "@okam/
|
|
3
|
+
import { createCtx as i } from "@okam/react-utils";
|
|
4
4
|
import { useState as n, useEffect as u, useMemo as f } from "react";
|
|
5
5
|
const [a, l] = i();
|
|
6
6
|
function p({ children: t }) {
|
package/index84.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),M=require("@okam/react-utils"),b=require("react"),v=require("react-stately"),P=require("./index86.js"),s=M.createCtxNullable(),d=s[0],q=s[1];function S({children:i,defaultSelectedKey:e,defaultIsOpen:u,onCloseCallback:c,onOpenCallback:a,tabs:l,openBtn:r,closeBtn:n,...x}){const t=v.useTabListState({...x,children:l,defaultSelectedKey:e}),C=b.useMemo(()=>({openBtn:r,closeBtn:n,tabState:t,defaultSelectedKey:e}),[r,n,t,e]);return o.jsx(q,{value:C,children:o.jsx(P.SidePanelContextProvider,{onCloseCallback:()=>{c?.(),t?.setSelectedKey?.(e)},onOpenCallback:a,defaultIsOpen:u,defaultSelectedKey:e.toString(),children:i})})}exports.MenuContextProvider=S;exports.useMenu=d;
|
package/index84.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import { createCtxNullable as p } from "@okam/
|
|
3
|
+
import { createCtxNullable as p } from "@okam/react-utils";
|
|
4
4
|
import { useMemo as b } from "react";
|
|
5
5
|
import { useTabListState as l } from "react-stately";
|
|
6
6
|
import { SidePanelContextProvider as v } from "./index86.mjs";
|
package/index86.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),b=require("@okam/
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),b=require("@okam/react-utils"),n=require("react"),x=require("react-stately"),q=require("./index79.js"),[R,B]=b.createCtx();function h(a){const{children:u,defaultSelectedKey:o,onOpenCallback:c,onCloseCallback:i,defaultIsOpen:p=!1,onOpenChange:d,isOpen:P,defaultOpen:f,type:O="dialog"}=a,S=f??p,g=n.useRef(null),y=n.useRef(null),e=x.useOverlayTriggerState({isOpen:P,defaultOpen:S,onOpenChange(s){if(d?.(s),!s){i?.();return}c?.()}}),{triggerProps:t,overlayProps:r,labelProps:l}=q({type:O},e),v=n.useMemo(()=>({labelProps:l,overlayProps:r,defaultSelectedKey:o,overlayState:e,buttonProps:{closeButtonProps:t,closeButtonRef:y,openButtonProps:t,openButtonRef:g}}),[l,r,o,e,t]);return C.jsx(B,{value:v,children:u})}exports.SidePanelContextProvider=h;exports.useSidePanel=R;
|
package/index86.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as C } from "react/jsx-runtime";
|
|
3
|
-
import { createCtx as S } from "@okam/
|
|
3
|
+
import { createCtx as S } from "@okam/react-utils";
|
|
4
4
|
import { useRef as a, useMemo as b } from "react";
|
|
5
5
|
import { useOverlayTriggerState as x } from "react-stately";
|
|
6
6
|
import B from "./index79.mjs";
|
package/index87.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 o=require("react/jsx-runtime"),i=require("@okam/react-utils"),c=require("react"),u={typography:()=>""},[s,m]=i.createCtxNullableStrict();function n({children:e,brandTheme:t=u}){const r=c.useMemo(()=>({brandTheme:t}),[t]);return o.jsx(m,{value:r,children:e})}function a(e){return({children:r})=>o.jsx(n,{brandTheme:e,children:r})}exports.ThemeContextProvider=n;exports.createThemeProvider=a;exports.useTheme=s;
|
package/index87.mjs
CHANGED
|
@@ -1,27 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function r() {
|
|
7
|
-
const t = c(e);
|
|
8
|
-
return t === void 0 ? null : t;
|
|
9
|
-
}
|
|
10
|
-
return [r, e.Provider];
|
|
11
|
-
}
|
|
12
|
-
const m = {
|
|
3
|
+
import { createCtxNullableStrict as m } from "@okam/react-utils";
|
|
4
|
+
import { useMemo as n } from "react";
|
|
5
|
+
const i = {
|
|
13
6
|
typography: () => ""
|
|
14
|
-
}, [
|
|
15
|
-
function
|
|
16
|
-
const
|
|
17
|
-
return /* @__PURE__ */ o(
|
|
7
|
+
}, [p, c] = m();
|
|
8
|
+
function u({ children: e, brandTheme: t = i }) {
|
|
9
|
+
const r = n(() => ({ brandTheme: t }), [t]);
|
|
10
|
+
return /* @__PURE__ */ o(c, { value: r, children: e });
|
|
18
11
|
}
|
|
19
|
-
function
|
|
20
|
-
return ({ children:
|
|
12
|
+
function v(e) {
|
|
13
|
+
return ({ children: r }) => /* @__PURE__ */ o(u, { brandTheme: e, children: r });
|
|
21
14
|
}
|
|
22
15
|
export {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
f as useTheme
|
|
16
|
+
u as ThemeContextProvider,
|
|
17
|
+
v as createThemeProvider,
|
|
18
|
+
p as useTheme
|
|
27
19
|
};
|
package/index89.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),x=require("@okam/
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),x=require("@okam/react-utils"),T=require("radashi"),a=require("react"),q=require("./index80.js"),i=x.createCtx(),v=i[0],C=i[1];function b({useTranslationFunc:c,children:u,namespace:o="common",translateFunctionName:e="t"}){const l=c(o),d=(t,n)=>(q.log(`translation function not found: translateFunctionName: ${e}`,"warn",{key:t,obj:n,namespace:o}),t),r=T.get(l,e,d),s=a.useCallback((t,n)=>n==null?r(t):r(t,n),[r]),f=a.useMemo(()=>({t:s}),[s]);return g.jsx(C,{value:f,children:u})}exports.TranslationContextProvider=b;exports.useTranslation=v;
|
package/index89.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as m } from "react/jsx-runtime";
|
|
3
|
-
import { createCtx as f } from "@okam/
|
|
3
|
+
import { createCtx as f } from "@okam/react-utils";
|
|
4
4
|
import { get as p } from "radashi";
|
|
5
5
|
import { useCallback as x, useMemo as C } from "react";
|
|
6
6
|
import { log as b } from "./index80.mjs";
|
package/index90.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("@okam/
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("@okam/react-utils"),s=require("react"),t=i.createCtx(),l=t[0],S=t[1];function h(c){const{userQuery:o,children:u}=c,[e,r]=s.useState(o),a=s.useMemo(()=>({userSearchQuery:e,setUserSearchQuery:r}),[e,r]);return n.jsx(S,{value:a,children:u})}exports.SearchBarProvider=h;exports.useUserQueryValHook=l;
|
package/index90.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
-
import { createCtx as n } from "@okam/
|
|
3
|
+
import { createCtx as n } from "@okam/react-utils";
|
|
4
4
|
import { useState as i, useMemo as m } from "react";
|
|
5
5
|
const o = n(), p = o[0], h = o[1];
|
|
6
6
|
function x(s) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@okam/stack-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "https://github.com/OKAMca/stack.git"
|
|
6
6
|
},
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@internationalized/date": "^3.10.1",
|
|
33
|
-
"@okam/core-lib": "1.17.4",
|
|
34
33
|
"@okam/logger": "1.1.0",
|
|
34
|
+
"@okam/react-utils": "0.0.1",
|
|
35
35
|
"@react-aria/selection": "^3.27.0",
|
|
36
36
|
"@react-aria/utils": "^3.32.0",
|
|
37
37
|
"@react-spring/web": "^10.0.3",
|
|
@@ -49,4 +49,4 @@
|
|
|
49
49
|
"tailwind-variants": "^3.2.2",
|
|
50
50
|
"usehooks-ts": "^3.1.0"
|
|
51
51
|
}
|
|
52
|
-
}
|
|
52
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { TTheme, TThemePanelContext, TThemeProviderProps } from './interface';
|
|
3
|
-
export declare function createCtxNullable<A extends object | null>(): readonly [() => A | null, import('react').Provider<A | undefined>];
|
|
4
3
|
declare const useTheme: () => TThemePanelContext<TTheme> | null;
|
|
5
4
|
export declare function ThemeContextProvider({ children, brandTheme }: TThemeProviderProps<TTheme>): import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export declare function createThemeProvider(brandTheme: TTheme): ({ children }: {
|