@okam/stack-ui 2.0.0 → 2.0.3
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 +35 -0
- package/components/fields/ComboBox/interface.d.ts +6 -0
- package/components/fields/ListBox/interface.d.ts +1 -1
- package/index12.js +1 -1
- package/index12.mjs +6 -6
- package/index122.js +1 -1
- package/index122.mjs +2 -2
- package/index127.js +1 -1
- package/index127.mjs +10 -10
- package/index131.js +1 -1
- package/index131.mjs +1 -1
- package/index151.js +3 -2
- package/index151.mjs +5 -4
- package/index17.js +1 -1
- package/index17.mjs +14 -14
- 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/index18.js +1 -1
- package/index18.mjs +7 -7
- 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 +114 -106
- package/index40.js +1 -1
- package/index40.mjs +11 -11
- package/index56.js +1 -1
- package/index56.mjs +33 -32
- package/package.json +2 -2
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/index56.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("react"),o=require("react-aria"),p=require("./index7.js");function D(r){const{children:u,themeName:s="popover",tokens:m,customTheme:f,placement:d="bottom",offset:h=5,state:t,arrow:a,sizeRef:x,popoverRef:R,triggerRef:v,contain:P=!0,autoFocus:g=!0,restoreFocus:j=!0}=r,b=x??v,{isOpen:y}=t,k=i.useRef(null),l=R??k,{popoverProps:n,underlayProps:w,arrowProps:F,placement:N}=o.usePopover({...r,placement:d,offset:h,popoverRef:l},t),c={placement:N??"bottom",isOpen:y,...m},$={[`--${s?.replace(".","-")}-container-width`]:`${b?.current?.offsetWidth}px`,...n.style},q=r.isNonModal===!0?0:n.tabIndex;return e.jsxs(o.Overlay,{children:[e.jsx(p.Box,{themeName:`${s}.underlay`,tokens:c,...w}),e.jsx(o.FocusScope,{autoFocus:g,restoreFocus:j,contain:P,children:e.jsxs(p.BoxWithForwardRef,{themeName:`${s}.popover`,customTheme:f,tokens:c,ref:l,...n,tabIndex:q,style:$,children:[a!=null&&i.cloneElement(a,{...F,themeName:`${s}.arrow`,tokens:c}),e.jsx(o.DismissButton,{onDismiss:t.close}),i.Children.map(u,B=>e.jsx(o.FocusRing,{focusRingClass:"has-focus-ring",children:B})),e.jsx(o.DismissButton,{onDismiss:t.close})]})})]})}exports.Popover=D;
|
package/index56.mjs
CHANGED
|
@@ -1,61 +1,62 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import { useRef as D, cloneElement as
|
|
4
|
-
import { usePopover as
|
|
5
|
-
import { Box as E, BoxWithForwardRef as
|
|
6
|
-
function
|
|
3
|
+
import { useRef as D, cloneElement as I, Children as T } from "react";
|
|
4
|
+
import { usePopover as j, Overlay as C, FocusScope as O, DismissButton as l, FocusRing as W } from "react-aria";
|
|
5
|
+
import { Box as E, BoxWithForwardRef as M } from "./index7.mjs";
|
|
6
|
+
function H(t) {
|
|
7
7
|
const {
|
|
8
|
-
children:
|
|
8
|
+
children: m,
|
|
9
9
|
themeName: o = "popover",
|
|
10
10
|
tokens: a,
|
|
11
11
|
customTheme: f,
|
|
12
12
|
placement: u = "bottom",
|
|
13
|
-
offset:
|
|
13
|
+
offset: d = 5,
|
|
14
14
|
state: r,
|
|
15
|
-
arrow:
|
|
16
|
-
sizeRef:
|
|
17
|
-
popoverRef:
|
|
15
|
+
arrow: c,
|
|
16
|
+
sizeRef: h,
|
|
17
|
+
popoverRef: R,
|
|
18
18
|
triggerRef: v,
|
|
19
19
|
contain: P = !0,
|
|
20
|
-
autoFocus:
|
|
21
|
-
restoreFocus:
|
|
22
|
-
} =
|
|
20
|
+
autoFocus: x = !0,
|
|
21
|
+
restoreFocus: g = !0
|
|
22
|
+
} = t, b = h ?? v, { isOpen: k } = r, w = D(null), p = R ?? w, { popoverProps: n, underlayProps: y, arrowProps: F, placement: N } = j(
|
|
23
23
|
{
|
|
24
|
-
...
|
|
24
|
+
...t,
|
|
25
25
|
placement: u,
|
|
26
|
-
offset:
|
|
26
|
+
offset: d,
|
|
27
27
|
popoverRef: p
|
|
28
28
|
},
|
|
29
29
|
r
|
|
30
|
-
),
|
|
30
|
+
), s = {
|
|
31
31
|
placement: N ?? "bottom",
|
|
32
|
-
isOpen:
|
|
32
|
+
isOpen: k,
|
|
33
33
|
...a
|
|
34
|
-
},
|
|
35
|
-
[`--${o?.replace(".", "-")}-container-width`]: `${
|
|
36
|
-
...
|
|
37
|
-
};
|
|
38
|
-
return /* @__PURE__ */ i(
|
|
39
|
-
/* @__PURE__ */ e(E, { themeName: `${o}.underlay`, tokens:
|
|
40
|
-
/* @__PURE__ */ e(
|
|
41
|
-
|
|
34
|
+
}, $ = {
|
|
35
|
+
[`--${o?.replace(".", "-")}-container-width`]: `${b?.current?.offsetWidth}px`,
|
|
36
|
+
...n.style
|
|
37
|
+
}, z = t.isNonModal === !0 ? 0 : n.tabIndex;
|
|
38
|
+
return /* @__PURE__ */ i(C, { children: [
|
|
39
|
+
/* @__PURE__ */ e(E, { themeName: `${o}.underlay`, tokens: s, ...y }),
|
|
40
|
+
/* @__PURE__ */ e(O, { autoFocus: x, restoreFocus: g, contain: P, children: /* @__PURE__ */ i(
|
|
41
|
+
M,
|
|
42
42
|
{
|
|
43
43
|
themeName: `${o}.popover`,
|
|
44
44
|
customTheme: f,
|
|
45
|
-
tokens:
|
|
45
|
+
tokens: s,
|
|
46
46
|
ref: p,
|
|
47
|
-
...
|
|
48
|
-
|
|
47
|
+
...n,
|
|
48
|
+
tabIndex: z,
|
|
49
|
+
style: $,
|
|
49
50
|
children: [
|
|
50
|
-
|
|
51
|
-
/* @__PURE__ */ e(
|
|
52
|
-
|
|
53
|
-
/* @__PURE__ */ e(
|
|
51
|
+
c != null && I(c, { ...F, themeName: `${o}.arrow`, tokens: s }),
|
|
52
|
+
/* @__PURE__ */ e(l, { onDismiss: r.close }),
|
|
53
|
+
T.map(m, (B) => /* @__PURE__ */ e(W, { focusRingClass: "has-focus-ring", children: B })),
|
|
54
|
+
/* @__PURE__ */ e(l, { onDismiss: r.close })
|
|
54
55
|
]
|
|
55
56
|
}
|
|
56
57
|
) })
|
|
57
58
|
] });
|
|
58
59
|
}
|
|
59
60
|
export {
|
|
60
|
-
|
|
61
|
+
H as Popover
|
|
61
62
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@okam/stack-ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "https://github.com/OKAMca/stack.git"
|
|
6
6
|
},
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"react-stately": "^3.43.0",
|
|
46
46
|
"react-use": "^17.6.0",
|
|
47
47
|
"sanitize-html": "^2.13.1",
|
|
48
|
-
"swiper": "^12.
|
|
48
|
+
"swiper": "^12.1.2",
|
|
49
49
|
"tailwind-variants": "^3.2.2",
|
|
50
50
|
"usehooks-ts": "^3.1.0"
|
|
51
51
|
}
|