@okam/stack-ui 1.44.5 → 2.0.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 +19 -0
- package/index.js +1 -1
- package/index.mjs +12 -12
- package/index123.js +1 -1
- package/index123.mjs +11 -11
- package/index126.mjs +3 -3
- package/index129.js +1 -1
- package/index129.mjs +1 -1
- package/index141.js +1 -1
- package/index141.mjs +6 -6
- package/index20.js +1 -1
- package/index20.mjs +6 -6
- package/index43.js +1 -1
- package/index43.mjs +24 -24
- package/index49.js +1 -1
- package/index49.mjs +8 -8
- package/index50.js +1 -1
- package/index50.mjs +4 -4
- package/index53.js +1 -1
- package/index53.mjs +24 -21
- package/index58.js +1 -1
- package/index58.mjs +6 -6
- package/index59.js +1 -1
- package/index59.mjs +6 -6
- package/index6.js +1 -1
- package/index6.mjs +3 -3
- package/index67.js +1 -1
- package/index67.mjs +14 -14
- 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/index85.mjs +3 -3
- 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/index58.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { Button as c } from "./index8.mjs";
|
|
4
4
|
import p from "./index48.mjs";
|
|
5
|
-
function h(
|
|
6
|
-
const { ariaLabel:
|
|
5
|
+
function h(o) {
|
|
6
|
+
const { ariaLabel: e, icon: i, customTheme: s, themeName: t = "printButton", tokens: r, ...a } = o, m = () => {
|
|
7
7
|
typeof window < "u" && typeof window.print == "function" && window.print();
|
|
8
8
|
};
|
|
9
9
|
return /* @__PURE__ */ n(
|
|
@@ -11,9 +11,9 @@ function h(e) {
|
|
|
11
11
|
{
|
|
12
12
|
themeName: `${t}.button`,
|
|
13
13
|
tokens: r,
|
|
14
|
-
"aria-label":
|
|
15
|
-
handlePress:
|
|
16
|
-
...
|
|
14
|
+
"aria-label": e,
|
|
15
|
+
handlePress: m,
|
|
16
|
+
...a,
|
|
17
17
|
children: /* @__PURE__ */ n(p, { themeName: `${t}.icon`, icon: i ?? "Print" })
|
|
18
18
|
}
|
|
19
19
|
);
|
package/index59.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),N=require("react"),v=require("react-aria"),b=require("./index88.js"),
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),N=require("react"),v=require("react-aria"),b=require("./index88.js"),j=require("./index8.js"),C=require("./index48.js");function L(h){const{sharingLinksList:p,id:d,isOpen:l,setIsOpen:m,onShare:k,themeName:a="shareButton",tokens:o,customTheme:c}=h,w=b(`${a}.linksList`,{...o,isOpen:l},c),t=v.useFocusManager(),f=n=>{n.key==="Escape"&&m(!1);const{listDirection:u}=o??{};u==="row"&&(n.key==="ArrowRight"&&(t?.focusNext({wrap:!0}),n.preventDefault()),n.key==="ArrowLeft"&&(t?.focusPrevious({wrap:!0}),n.preventDefault())),u==="column"&&(n.key==="ArrowDown"&&(t?.focusNext({wrap:!0}),n.preventDefault()),n.key==="ArrowUp"&&(t?.focusPrevious({wrap:!0}),n.preventDefault()))};return s.jsx("div",{className:w,id:d,role:"listbox",tabIndex:-1,onKeyDown:f,children:p?.map(n=>{const{ariaLabel:u,onClick:x,href:e,icon:r,key:i}=n;return s.jsx(j.Button,{themeName:`${a}.link`,tokens:{...o,isOpen:l},handlePress:()=>{k?.(i),x?.(i)},"aria-label":u,...e!=null&&e!==""?{href:e,rel:"noopener noreferrer",target:"_blank",as:"a"}:{},role:"option",children:s.jsx(C,{themeName:`${a}.linkIcons`,icon:r})},i)})})}function S(h){const{ariaLabel:p,icon:d,id:l,sharingLinksList:m,onShare:k,customTheme:a,themeName:o="shareButton",tokens:c,...w}=h,[t,f]=N.useState(!1),n=b(`${o}.container`,c,a),u=e=>{f(!t),!t&&setTimeout(()=>{e.target.parentElement?.lastChild?.firstChild?.focus()})},x=e=>{const r=e.currentTarget.firstChild,i=e.currentTarget.lastChild,y=i.firstChild,g=i.lastChild,{listDirection:D}=c??{};D==="row"&&(e.key==="ArrowRight"&&e.target===r&&(y?.focus(),e.preventDefault()),e.key==="ArrowLeft"&&e.target===r&&(g.focus(),e.preventDefault())),D==="column"&&(e.key==="ArrowDown"&&e.target===r&&(y?.focus(),e.preventDefault()),e.key==="ArrowUp"&&e.target===r&&(g.focus(),e.preventDefault())),e.key==="Escape"&&(f(!1),r?.focus()),document.activeElement===i&&r?.focus()};return s.jsx(v.FocusScope,{autoFocus:!0,restoreFocus:!0,contain:t,children:s.jsxs("div",{className:n,onKeyDown:x,children:[s.jsx(j.ButtonWithForwardRef,{themeName:`${o}.button`,tokens:{...c,isOpen:t},"aria-label":p,"aria-haspopup":"listbox","aria-expanded":t,...t&&{"aria-controls":l},handlePress:u,...w,children:s.jsx(C,{themeName:`${o}.icon`,icon:d??"Share"})}),t&&s.jsx(L,{id:l,sharingLinksList:m,onShare:k,isOpen:t,setIsOpen:f,themeName:o,customTheme:a,tokens:c})]})})}exports.IconsContainer=L;exports.ShareButton=S;
|
package/index59.mjs
CHANGED
|
@@ -3,9 +3,9 @@ import { jsx as i, jsxs as L } from "react/jsx-runtime";
|
|
|
3
3
|
import { useState as N } from "react";
|
|
4
4
|
import { FocusScope as b, useFocusManager as A } from "react-aria";
|
|
5
5
|
import x from "./index88.mjs";
|
|
6
|
-
import { ButtonWithForwardRef as
|
|
6
|
+
import { ButtonWithForwardRef as B, Button as O } from "./index8.mjs";
|
|
7
7
|
import C from "./index48.mjs";
|
|
8
|
-
function
|
|
8
|
+
function T(h) {
|
|
9
9
|
const { sharingLinksList: p, id: m, isOpen: u, setIsOpen: d, onShare: k, themeName: a = "shareButton", tokens: r, customTheme: c } = h, w = x(`${a}.linksList`, { ...r, isOpen: u }, c), t = A();
|
|
10
10
|
return /* @__PURE__ */ i("div", { className: w, id: m, role: "listbox", tabIndex: -1, onKeyDown: (o) => {
|
|
11
11
|
o.key === "Escape" && d(!1);
|
|
@@ -14,7 +14,7 @@ function B(h) {
|
|
|
14
14
|
}, children: p?.map((o) => {
|
|
15
15
|
const { ariaLabel: l, onClick: D, href: e, icon: n, key: s } = o;
|
|
16
16
|
return /* @__PURE__ */ i(
|
|
17
|
-
|
|
17
|
+
O,
|
|
18
18
|
{
|
|
19
19
|
themeName: `${a}.link`,
|
|
20
20
|
tokens: { ...r, isOpen: u },
|
|
@@ -51,7 +51,7 @@ function P(h) {
|
|
|
51
51
|
v === "row" && (e.key === "ArrowRight" && e.target === n && (y?.focus(), e.preventDefault()), e.key === "ArrowLeft" && e.target === n && (g.focus(), e.preventDefault())), v === "column" && (e.key === "ArrowDown" && e.target === n && (y?.focus(), e.preventDefault()), e.key === "ArrowUp" && e.target === n && (g.focus(), e.preventDefault())), e.key === "Escape" && (f(!1), n?.focus()), document.activeElement === s && n?.focus();
|
|
52
52
|
}, children: [
|
|
53
53
|
/* @__PURE__ */ i(
|
|
54
|
-
|
|
54
|
+
B,
|
|
55
55
|
{
|
|
56
56
|
themeName: `${r}.button`,
|
|
57
57
|
tokens: { ...c, isOpen: t },
|
|
@@ -65,7 +65,7 @@ function P(h) {
|
|
|
65
65
|
}
|
|
66
66
|
),
|
|
67
67
|
t && /* @__PURE__ */ i(
|
|
68
|
-
|
|
68
|
+
T,
|
|
69
69
|
{
|
|
70
70
|
id: u,
|
|
71
71
|
sharingLinksList: d,
|
|
@@ -80,6 +80,6 @@ function P(h) {
|
|
|
80
80
|
] }) });
|
|
81
81
|
}
|
|
82
82
|
export {
|
|
83
|
-
|
|
83
|
+
T as IconsContainer,
|
|
84
84
|
P as ShareButton
|
|
85
85
|
};
|
package/index6.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";const n=require("react/jsx-runtime"),u=require("react"),h=require("./index82.js"),o=require("./index7.js"),$=require("./index8.js"),j=require("./index48.js");function q(c){const{title:i,button:s,content:e,themeName:t="alerts.item",tokens:l,icon:r,id:m,swiperSlideIndex:a=0}=c,{activeIndex:x}=h.useCarousel(),d=x===a;return i==null&&s==null&&e==null&&r==null?null:n.jsxs(n.Fragment,{children:[r!=null&&n.jsx(j,{icon:r,themeName:`${t}.icon`,tokens:l}),(i!=null||s!=null||e!=null)&&n.jsxs(o.Box,{themeName:`${t}.container`,tokens:l,children:[i!=null&&n.jsx(o.Box,{as:"span",themeName:`${t}.title`,tokens:l,id:m,children:i}),s!=null&&n.jsx($.
|
|
2
|
+
"use strict";const n=require("react/jsx-runtime"),u=require("react"),h=require("./index82.js"),o=require("./index7.js"),$=require("./index8.js"),j=require("./index48.js");function q(c){const{title:i,button:s,content:e,themeName:t="alerts.item",tokens:l,icon:r,id:m,swiperSlideIndex:a=0}=c,{activeIndex:x}=h.useCarousel(),d=x===a;return i==null&&s==null&&e==null&&r==null?null:n.jsxs(n.Fragment,{children:[r!=null&&n.jsx(j,{icon:r,themeName:`${t}.icon`,tokens:l}),(i!=null||s!=null||e!=null)&&n.jsxs(o.Box,{themeName:`${t}.container`,tokens:l,children:[i!=null&&n.jsx(o.Box,{as:"span",themeName:`${t}.title`,tokens:l,id:m,children:i}),s!=null&&n.jsx($.Button,{tabIndex:d?0:-1,themeName:`${t}.button`,tokens:l,...s}),e!=null&&(u.isValidElement(e)?u.cloneElement(e,{themeName:`${t}.content`,tokens:l}):e)]})]})}module.exports=q;
|
package/index6.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as i, Fragment as h, jsx as r } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { isValidElement as f, cloneElement as x } from "react";
|
|
4
4
|
import { useCarousel as N } from "./index82.mjs";
|
|
5
5
|
import { Box as u } from "./index7.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { Button as I } from "./index8.mjs";
|
|
7
7
|
import $ from "./index48.mjs";
|
|
8
8
|
function E(a) {
|
|
9
9
|
const { title: l, button: o, content: e, themeName: t = "alerts.item", tokens: n, icon: m, id: s, swiperSlideIndex: c = 0 } = a, { activeIndex: p } = N(), d = p === c;
|
|
@@ -12,7 +12,7 @@ function E(a) {
|
|
|
12
12
|
(l != null || o != null || e != null) && /* @__PURE__ */ i(u, { themeName: `${t}.container`, tokens: n, children: [
|
|
13
13
|
l != null && /* @__PURE__ */ r(u, { as: "span", themeName: `${t}.title`, tokens: n, id: s, children: l }),
|
|
14
14
|
o != null && /* @__PURE__ */ r(I, { tabIndex: d ? 0 : -1, themeName: `${t}.button`, tokens: n, ...o }),
|
|
15
|
-
e != null && (
|
|
15
|
+
e != null && (f(e) ? x(e, {
|
|
16
16
|
themeName: `${t}.content`,
|
|
17
17
|
tokens: n
|
|
18
18
|
}) : e)
|
package/index67.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),p=require("react"),M=require("react-aria"),f=require("./index7.js"),k=require("./index8.js");function c({href:
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),p=require("react"),M=require("react-aria"),f=require("./index7.js"),k=require("./index8.js");function c({href:i="#main",themeName:n="skipToMain",tokens:e,customTheme:a,children:r,ariaLabel:t,...o}){return u.jsx(k.Button,{as:"a",href:i,themeName:n,tokens:e,customTheme:a,"aria-label":t,...o,children:r})}function l({as:i="main",id:n="main",tabIndex:e=-1,themeName:a="main",tokens:r,customTheme:t,children:o,...m}){const s=p.useRef(null),{landmarkProps:d}=M.useLandmark({role:"main"},s);return u.jsx(f.BoxWithForwardRef,{as:i,id:n,themeName:a,tokens:r,customTheme:t,ref:s,...m,...d,tabIndex:e,children:o})}c.displayName="SkipToMain";l.displayName="Main";exports.Main=l;exports.SkipToMain=c;
|
package/index67.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as p } from "react/jsx-runtime";
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { useLandmark as
|
|
3
|
+
import { useRef as u } from "react";
|
|
4
|
+
import { useLandmark as l } from "react-aria";
|
|
5
5
|
import { BoxWithForwardRef as d } from "./index7.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { Button as k } from "./index8.mjs";
|
|
7
7
|
function M({
|
|
8
8
|
href: o = "#main",
|
|
9
9
|
themeName: a = "skipToMain",
|
|
10
|
-
tokens:
|
|
11
|
-
customTheme:
|
|
10
|
+
tokens: n,
|
|
11
|
+
customTheme: i,
|
|
12
12
|
children: r,
|
|
13
13
|
ariaLabel: m,
|
|
14
14
|
...t
|
|
@@ -19,8 +19,8 @@ function M({
|
|
|
19
19
|
as: "a",
|
|
20
20
|
href: o,
|
|
21
21
|
themeName: a,
|
|
22
|
-
tokens:
|
|
23
|
-
customTheme:
|
|
22
|
+
tokens: n,
|
|
23
|
+
customTheme: i,
|
|
24
24
|
"aria-label": m,
|
|
25
25
|
...t,
|
|
26
26
|
children: r
|
|
@@ -30,14 +30,14 @@ function M({
|
|
|
30
30
|
function c({
|
|
31
31
|
as: o = "main",
|
|
32
32
|
id: a = "main",
|
|
33
|
-
tabIndex:
|
|
34
|
-
themeName:
|
|
33
|
+
tabIndex: n = -1,
|
|
34
|
+
themeName: i = "main",
|
|
35
35
|
tokens: r,
|
|
36
36
|
customTheme: m,
|
|
37
37
|
children: t,
|
|
38
|
-
...
|
|
38
|
+
...s
|
|
39
39
|
}) {
|
|
40
|
-
const e =
|
|
40
|
+
const e = u(null), { landmarkProps: f } = l(
|
|
41
41
|
{
|
|
42
42
|
role: "main"
|
|
43
43
|
},
|
|
@@ -48,13 +48,13 @@ function c({
|
|
|
48
48
|
{
|
|
49
49
|
as: o,
|
|
50
50
|
id: a,
|
|
51
|
-
themeName:
|
|
51
|
+
themeName: i,
|
|
52
52
|
tokens: r,
|
|
53
53
|
customTheme: m,
|
|
54
54
|
ref: e,
|
|
55
|
-
...f,
|
|
56
55
|
...s,
|
|
57
|
-
|
|
56
|
+
...f,
|
|
57
|
+
tabIndex: n,
|
|
58
58
|
children: t
|
|
59
59
|
}
|
|
60
60
|
);
|
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/index85.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
const o =
|
|
3
|
+
import { use as u, createContext as i } from "react";
|
|
4
|
+
const o = i(null);
|
|
5
5
|
function s(t) {
|
|
6
6
|
const { children: r, state: n } = t;
|
|
7
7
|
return /* @__PURE__ */ e(o, { value: n, children: r });
|
|
8
8
|
}
|
|
9
9
|
function a() {
|
|
10
|
-
const t =
|
|
10
|
+
const t = u(o);
|
|
11
11
|
return t !== null ? t : null;
|
|
12
12
|
}
|
|
13
13
|
export {
|
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.0",
|
|
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.3",
|
|
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 }: {
|
package/theme/Alerts/index.d.ts
CHANGED
|
@@ -3,46 +3,46 @@ declare const alertsTheme: {
|
|
|
3
3
|
carouselWrapper: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "flex flex-wrap justify-between items-center gap-4 relative", {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "flex flex-wrap justify-between items-center gap-4 relative", unknown, unknown, undefined>>;
|
|
4
4
|
closeBtn: import('tailwind-variants').TVReturnType<{} | {
|
|
5
5
|
type: {
|
|
6
|
-
button: import('tailwind-
|
|
7
|
-
base?: import('tailwind-
|
|
6
|
+
button: import('tailwind-variants').ClassValue | {
|
|
7
|
+
base?: import('tailwind-variants').ClassValue;
|
|
8
8
|
};
|
|
9
|
-
menu: import('tailwind-
|
|
10
|
-
base?: import('tailwind-
|
|
9
|
+
menu: import('tailwind-variants').ClassValue | {
|
|
10
|
+
base?: import('tailwind-variants').ClassValue;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
buttonStyle: {
|
|
14
|
-
default: import('tailwind-
|
|
15
|
-
base?: import('tailwind-
|
|
14
|
+
default: import('tailwind-variants').ClassValue | {
|
|
15
|
+
base?: import('tailwind-variants').ClassValue;
|
|
16
16
|
};
|
|
17
|
-
outline: import('tailwind-
|
|
18
|
-
base?: import('tailwind-
|
|
17
|
+
outline: import('tailwind-variants').ClassValue | {
|
|
18
|
+
base?: import('tailwind-variants').ClassValue;
|
|
19
19
|
};
|
|
20
|
-
hollow: import('tailwind-
|
|
21
|
-
base?: import('tailwind-
|
|
20
|
+
hollow: import('tailwind-variants').ClassValue | {
|
|
21
|
+
base?: import('tailwind-variants').ClassValue;
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
intent: {
|
|
25
|
-
danger: import('tailwind-
|
|
26
|
-
base?: import('tailwind-
|
|
25
|
+
danger: import('tailwind-variants').ClassValue | {
|
|
26
|
+
base?: import('tailwind-variants').ClassValue;
|
|
27
27
|
};
|
|
28
|
-
error: import('tailwind-
|
|
29
|
-
base?: import('tailwind-
|
|
28
|
+
error: import('tailwind-variants').ClassValue | {
|
|
29
|
+
base?: import('tailwind-variants').ClassValue;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
size: {
|
|
33
|
-
default: import('tailwind-
|
|
34
|
-
base?: import('tailwind-
|
|
33
|
+
default: import('tailwind-variants').ClassValue | {
|
|
34
|
+
base?: import('tailwind-variants').ClassValue;
|
|
35
35
|
};
|
|
36
|
-
large: import('tailwind-
|
|
37
|
-
base?: import('tailwind-
|
|
36
|
+
large: import('tailwind-variants').ClassValue | {
|
|
37
|
+
base?: import('tailwind-variants').ClassValue;
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
40
|
shape: {
|
|
41
|
-
rounded: import('tailwind-
|
|
42
|
-
base?: import('tailwind-
|
|
41
|
+
rounded: import('tailwind-variants').ClassValue | {
|
|
42
|
+
base?: import('tailwind-variants').ClassValue;
|
|
43
43
|
};
|
|
44
|
-
circular: import('tailwind-
|
|
45
|
-
base?: import('tailwind-
|
|
44
|
+
circular: import('tailwind-variants').ClassValue | {
|
|
45
|
+
base?: import('tailwind-variants').ClassValue;
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
48
|
}, undefined, "self-end", {
|
|
@@ -143,36 +143,36 @@ declare const alertsTheme: {
|
|
|
143
143
|
container: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "", {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "", unknown, unknown, undefined>>;
|
|
144
144
|
title: import('tailwind-variants').TVReturnType<{} | {
|
|
145
145
|
size: {
|
|
146
|
-
h1: import('tailwind-
|
|
147
|
-
h2: import('tailwind-
|
|
148
|
-
h3: import('tailwind-
|
|
149
|
-
h4: import('tailwind-
|
|
150
|
-
h5: import('tailwind-
|
|
151
|
-
h6: import('tailwind-
|
|
152
|
-
leading: import('tailwind-
|
|
153
|
-
paragraph: import('tailwind-
|
|
154
|
-
footnotes: import('tailwind-
|
|
155
|
-
xs: import('tailwind-
|
|
146
|
+
h1: import('tailwind-variants').ClassValue | {};
|
|
147
|
+
h2: import('tailwind-variants').ClassValue | {};
|
|
148
|
+
h3: import('tailwind-variants').ClassValue | {};
|
|
149
|
+
h4: import('tailwind-variants').ClassValue | {};
|
|
150
|
+
h5: import('tailwind-variants').ClassValue | {};
|
|
151
|
+
h6: import('tailwind-variants').ClassValue | {};
|
|
152
|
+
leading: import('tailwind-variants').ClassValue | {};
|
|
153
|
+
paragraph: import('tailwind-variants').ClassValue | {};
|
|
154
|
+
footnotes: import('tailwind-variants').ClassValue | {};
|
|
155
|
+
xs: import('tailwind-variants').ClassValue | {};
|
|
156
156
|
};
|
|
157
157
|
font: {
|
|
158
|
-
body: import('tailwind-
|
|
158
|
+
body: import('tailwind-variants').ClassValue | {};
|
|
159
159
|
};
|
|
160
160
|
weight: {
|
|
161
|
-
normal: import('tailwind-
|
|
162
|
-
light: import('tailwind-
|
|
163
|
-
bold: import('tailwind-
|
|
161
|
+
normal: import('tailwind-variants').ClassValue | {};
|
|
162
|
+
light: import('tailwind-variants').ClassValue | {};
|
|
163
|
+
bold: import('tailwind-variants').ClassValue | {};
|
|
164
164
|
};
|
|
165
165
|
color: {
|
|
166
|
-
gray: import('tailwind-
|
|
167
|
-
white: import('tailwind-
|
|
166
|
+
gray: import('tailwind-variants').ClassValue | {};
|
|
167
|
+
white: import('tailwind-variants').ClassValue | {};
|
|
168
168
|
};
|
|
169
169
|
isError: {
|
|
170
|
-
true: import('tailwind-
|
|
170
|
+
true: import('tailwind-variants').ClassValue | {};
|
|
171
171
|
};
|
|
172
172
|
align: {
|
|
173
|
-
center: import('tailwind-
|
|
174
|
-
left: import('tailwind-
|
|
175
|
-
right: import('tailwind-
|
|
173
|
+
center: import('tailwind-variants').ClassValue | {};
|
|
174
|
+
left: import('tailwind-variants').ClassValue | {};
|
|
175
|
+
right: import('tailwind-variants').ClassValue | {};
|
|
176
176
|
};
|
|
177
177
|
}, undefined, undefined, {
|
|
178
178
|
size: {
|
|
@@ -309,36 +309,36 @@ declare const alertsTheme: {
|
|
|
309
309
|
}, undefined, undefined, unknown, unknown, undefined>>>;
|
|
310
310
|
content: import('tailwind-variants').TVReturnType<{} | {
|
|
311
311
|
size: {
|
|
312
|
-
h1: import('tailwind-
|
|
313
|
-
h2: import('tailwind-
|
|
314
|
-
h3: import('tailwind-
|
|
315
|
-
h4: import('tailwind-
|
|
316
|
-
h5: import('tailwind-
|
|
317
|
-
h6: import('tailwind-
|
|
318
|
-
leading: import('tailwind-
|
|
319
|
-
paragraph: import('tailwind-
|
|
320
|
-
footnotes: import('tailwind-
|
|
321
|
-
xs: import('tailwind-
|
|
312
|
+
h1: import('tailwind-variants').ClassValue | {};
|
|
313
|
+
h2: import('tailwind-variants').ClassValue | {};
|
|
314
|
+
h3: import('tailwind-variants').ClassValue | {};
|
|
315
|
+
h4: import('tailwind-variants').ClassValue | {};
|
|
316
|
+
h5: import('tailwind-variants').ClassValue | {};
|
|
317
|
+
h6: import('tailwind-variants').ClassValue | {};
|
|
318
|
+
leading: import('tailwind-variants').ClassValue | {};
|
|
319
|
+
paragraph: import('tailwind-variants').ClassValue | {};
|
|
320
|
+
footnotes: import('tailwind-variants').ClassValue | {};
|
|
321
|
+
xs: import('tailwind-variants').ClassValue | {};
|
|
322
322
|
};
|
|
323
323
|
font: {
|
|
324
|
-
body: import('tailwind-
|
|
324
|
+
body: import('tailwind-variants').ClassValue | {};
|
|
325
325
|
};
|
|
326
326
|
weight: {
|
|
327
|
-
normal: import('tailwind-
|
|
328
|
-
light: import('tailwind-
|
|
329
|
-
bold: import('tailwind-
|
|
327
|
+
normal: import('tailwind-variants').ClassValue | {};
|
|
328
|
+
light: import('tailwind-variants').ClassValue | {};
|
|
329
|
+
bold: import('tailwind-variants').ClassValue | {};
|
|
330
330
|
};
|
|
331
331
|
color: {
|
|
332
|
-
gray: import('tailwind-
|
|
333
|
-
white: import('tailwind-
|
|
332
|
+
gray: import('tailwind-variants').ClassValue | {};
|
|
333
|
+
white: import('tailwind-variants').ClassValue | {};
|
|
334
334
|
};
|
|
335
335
|
isError: {
|
|
336
|
-
true: import('tailwind-
|
|
336
|
+
true: import('tailwind-variants').ClassValue | {};
|
|
337
337
|
};
|
|
338
338
|
align: {
|
|
339
|
-
center: import('tailwind-
|
|
340
|
-
left: import('tailwind-
|
|
341
|
-
right: import('tailwind-
|
|
339
|
+
center: import('tailwind-variants').ClassValue | {};
|
|
340
|
+
left: import('tailwind-variants').ClassValue | {};
|
|
341
|
+
right: import('tailwind-variants').ClassValue | {};
|
|
342
342
|
};
|
|
343
343
|
}, undefined, undefined, {
|
|
344
344
|
size: {
|