welcome-ui 0.0.0-dev.1764320474970 → 0.0.0-dev.1765989103659
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/dist/Alert.css +1 -1
- package/dist/Alert.js +72 -72
- package/dist/Breadcrumb.css +1 -1
- package/dist/Breadcrumb.js +19 -19
- package/dist/Checkbox.js +12 -11
- package/dist/DatePicker.js +69 -68
- package/dist/DateTimePicker.js +10 -10
- package/dist/Field.css +1 -1
- package/dist/Field.js +47 -48
- package/dist/FileDrop.css +1 -1
- package/dist/FileDrop.js +319 -298
- package/dist/Icon.js +212 -211
- package/dist/InputText.js +6 -6
- package/dist/Modal.js +65 -56
- package/dist/Search.js +1 -1
- package/dist/Select.js +350 -332
- package/dist/Slider.js +1 -1
- package/dist/StickyNote.css +1 -1
- package/dist/StickyNote.js +52 -38
- package/dist/Swiper.js +201 -191
- package/dist/Tabs.css +1 -1
- package/dist/Tabs.js +312 -311
- package/dist/Textarea.js +14 -13
- package/dist/TimePicker.js +46 -45
- package/dist/Toggle.js +11 -11
- package/dist/types/components/Alert/components/Buttons.d.ts +2 -2
- package/dist/types/components/Alert/index.d.ts +2 -2
- package/dist/types/components/FileDrop/components/Message.d.ts +1 -1
- package/dist/types/components/FileDrop/types.d.ts +5 -0
- package/dist/types/components/Icon/icons.d.ts +2 -2
- package/dist/types/components/Modal/Assets/AssetContent.d.ts +1 -1
- package/dist/types/components/Modal/Assets/index.d.ts +1 -1
- package/dist/types/components/Modal/components/Content.d.ts +1 -1
- package/dist/types/components/Modal/index.d.ts +2 -2
- package/dist/types/components/Modal/types.d.ts +1 -1
- package/dist/types/components/Select/types.d.ts +1 -0
- package/dist/types/components/StickyNote/types.d.ts +1 -0
- package/dist/types/components/Tabs/Tab.d.ts +2 -0
- package/dist/types/components/Tabs/{components/TabPanel/index.d.ts → TabPanel.d.ts} +1 -1
- package/dist/types/components/Tabs/index.d.ts +6 -5
- package/dist/types/components/Tabs/types.d.ts +6 -12
- package/dist/types/components/Tabs/utils.d.ts +4 -7
- package/package.json +1 -1
- package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +0 -5
- package/dist/types/components/Tabs/components/TabList/index.d.ts +0 -3
- package/dist/use-viewport-CgrficYB.js +0 -17
- package/dist/useForkRef-D807AV7D.js +0 -22
package/dist/Alert.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.
|
|
1
|
+
@layer components{._root_8fyu4_2{position:relative;display:flex;align-items:flex-start;width:100%;gap:var(--gap, var(--components-dimensions-alert-gap-content-md));border-radius:var(--components-dimensions-alert-border-radius);border-width:var(--border-width-sm);border-style:solid;padding:var(--padding);max-width:var(--maxWidth, max-content);background-color:var(--backgroundColor, var(--components-colors-alert-color-background-brand));border-color:var(--borderColor, var(--components-colors-alert-color-background-brand));color:var(--color, var(--components-colors-alert-color-text-brand-body))}._size-md_8fyu4_18{--padding: var(--components-dimensions-alert-padding-inline-md)}._size-md_8fyu4_18 ._content-actions_8fyu4_21{--gap: var(--components-dimensions-alert-gap-actions-md)}._size-md_8fyu4_18 ._without-title_8fyu4_24 ._icon-wrapper_8fyu4_24{margin-top:-2px}._size-lg_8fyu4_27{--padding: var(--components-dimensions-alert-padding-inline-lg);--gap: var(--components-dimensions-alert-gap-content-lg)}._size-lg_8fyu4_27 ._content-actions_8fyu4_21{--gap: var(--components-dimensions-alert-gap-actions-lg)}._variant-ai_8fyu4_34{--backgroundColor: var(--components-colors-alert-color-background-ai);--borderColor: transparent;background:linear-gradient(var(--components-colors-alert-color-background-ai) 0 0) padding-box,linear-gradient(90deg,var(--color-green-30) 0%,var(--color-teal-40) 20%,var(--color-blue-40) 40%,var(--color-violet-40) 60%,var(--color-pink-40) 80%,var(--color-red-orange-40) 100%) border-box}._variant-danger_8fyu4_39{--backgroundColor: var(--components-colors-alert-color-background-danger);--borderColor: var(--components-colors-alert-color-background-danger);--color: var(--color-icon-danger-primary)}._variant-info_8fyu4_44{--backgroundColor: var(--components-colors-alert-color-background-information);--borderColor: var(--components-colors-alert-color-background-information);--color: var(--color-icon-accent-blue-primary)}._variant-success_8fyu4_49{--backgroundColor: var(--components-colors-alert-color-background-success);--borderColor: var(--components-colors-alert-color-background-success);--color: var(--color-icon-accent-green-primary)}._variant-warning_8fyu4_54{--backgroundColor: var(--components-colors-alert-color-background-warning);--borderColor: var(--components-colors-alert-color-background-warning);--color: var(--color-icon-warning-primary)}._full-width_8fyu4_59{--maxWidth: 100%}._content_8fyu4_21{overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;gap:var(--gap, var(--components-dimensions-alert-gap-content-md))}._content-text_8fyu4_71{display:flex;flex-direction:column;gap:var(--gap, var(--components-dimensions-alert-gap-content-md))}._content-text_8fyu4_71._without-title_8fyu4_24{flex-direction:row}._content-text_8fyu4_71._without-title_8fyu4_24 ._icon-wrapper_8fyu4_24{align-self:flex-start}._content-actions_8fyu4_21{display:flex;align-items:center;gap:var(--gap)}._title-close-button_8fyu4_88{margin-right:var(--spacing-xl)}._title-with-icon_8fyu4_91{display:flex;align-items:center;gap:var(--spacing-sm)}._close-button_8fyu4_97{position:absolute;right:var(--spacing-sm);top:var(--spacing-sm)}._icon-wrapper_8fyu4_24{display:flex;flex-shrink:0;padding:var(--components-dimensions-alert-icon-padding-block);border-radius:var(--components-dimensions-alert-icon-border-radius);background-color:var(--iconWrapperBackgroundColor, var(--components-colors-alert-icon-color-background-brand));color:var(--iconWrapperColor, var(--components-colors-alert-icon-color-icon-brand))}._icon-wrapper-success_8fyu4_111{--iconWrapperBackgroundColor: var(--components-colors-alert-icon-color-background-success);--iconWrapperColor: var(--components-colors-alert-icon-color-icon-success)}._icon-wrapper-danger_8fyu4_115{--iconWrapperBackgroundColor: var(--components-colors-alert-icon-color-background-danger);--iconWrapperColor: var(--components-colors-alert-icon-color-icon-danger)}._icon-wrapper-info_8fyu4_119{--iconWrapperBackgroundColor: var( --components-colors-alert-icon-color-background-information );--iconWrapperColor: var(--components-colors-alert-icon-color-icon-information)}._icon-wrapper-warning_8fyu4_125{--iconWrapperBackgroundColor: var(--components-colors-alert-icon-color-background-warning);--iconWrapperColor: var(--components-colors-alert-icon-color-icon-warning)}._icon-wrapper-ai_8fyu4_129{background:conic-gradient(from 30deg at 50% 50%,var(--color-green-30) 0deg,var(--color-blue-40) 25.96deg,var(--color-violet-40) 51.92deg,var(--color-pink-40) 76.15deg,var(--color-red-orange-40) 110.77deg,var(--color-pink-40) 162.69deg,var(--color-violet-40) 209.42deg,var(--color-blue-40) 254.42deg,var(--color-teal-40) 306.35deg,var(--color-green-30) 360deg);--iconWrapperColor: var(--components-colors-alert-icon-color-icon-ai)}}
|
package/dist/Alert.js
CHANGED
|
@@ -1,107 +1,107 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './Alert.css';
|
|
3
|
-
import { jsx as i, jsxs as
|
|
4
|
-
import p, { forwardRef as
|
|
5
|
-
import { CloseButton as
|
|
3
|
+
import { jsx as i, jsxs as l } from "react/jsx-runtime";
|
|
4
|
+
import p, { forwardRef as E, Children as f, cloneElement as m } from "react";
|
|
5
|
+
import { CloseButton as R } from "./CloseButton.js";
|
|
6
6
|
import { Icon as V } from "./Icon.js";
|
|
7
|
-
import { Text as
|
|
8
|
-
import { c as
|
|
9
|
-
import { Button as
|
|
10
|
-
|
|
7
|
+
import { Text as A } from "./Text.js";
|
|
8
|
+
import { c as b } from "./index-PAaZGbyz.js";
|
|
9
|
+
import { Button as h } from "./Button.js";
|
|
10
|
+
import { f as x } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
11
|
+
const I = "_root_8fyu4_2", O = "_content_8fyu4_21", B = {
|
|
11
12
|
root: I,
|
|
12
|
-
"size-md": "_size-
|
|
13
|
-
"content-actions": "_content-
|
|
14
|
-
"without-title": "_without-
|
|
15
|
-
"icon-wrapper": "_icon-
|
|
16
|
-
"size-lg": "_size-
|
|
17
|
-
"variant-ai": "_variant-
|
|
18
|
-
"variant-danger": "_variant-
|
|
19
|
-
"variant-info": "_variant-
|
|
20
|
-
"variant-success": "_variant-
|
|
21
|
-
"variant-warning": "_variant-
|
|
22
|
-
"full-width": "_full-
|
|
13
|
+
"size-md": "_size-md_8fyu4_18",
|
|
14
|
+
"content-actions": "_content-actions_8fyu4_21",
|
|
15
|
+
"without-title": "_without-title_8fyu4_24",
|
|
16
|
+
"icon-wrapper": "_icon-wrapper_8fyu4_24",
|
|
17
|
+
"size-lg": "_size-lg_8fyu4_27",
|
|
18
|
+
"variant-ai": "_variant-ai_8fyu4_34",
|
|
19
|
+
"variant-danger": "_variant-danger_8fyu4_39",
|
|
20
|
+
"variant-info": "_variant-info_8fyu4_44",
|
|
21
|
+
"variant-success": "_variant-success_8fyu4_49",
|
|
22
|
+
"variant-warning": "_variant-warning_8fyu4_54",
|
|
23
|
+
"full-width": "_full-width_8fyu4_59",
|
|
23
24
|
content: O,
|
|
24
|
-
"content-text": "_content-
|
|
25
|
-
"title-close-button": "_title-close-
|
|
26
|
-
"title-with-icon": "_title-with-
|
|
27
|
-
"close-button": "_close-
|
|
28
|
-
"icon-wrapper-success": "_icon-wrapper-
|
|
29
|
-
"icon-wrapper-danger": "_icon-wrapper-
|
|
30
|
-
"icon-wrapper-info": "_icon-wrapper-
|
|
31
|
-
"icon-wrapper-warning": "_icon-wrapper-
|
|
32
|
-
"icon-wrapper-ai": "_icon-wrapper-
|
|
33
|
-
},
|
|
34
|
-
({ variant: t = "primary", ...o }, n) => /* @__PURE__ */ i(
|
|
25
|
+
"content-text": "_content-text_8fyu4_71",
|
|
26
|
+
"title-close-button": "_title-close-button_8fyu4_88",
|
|
27
|
+
"title-with-icon": "_title-with-icon_8fyu4_91",
|
|
28
|
+
"close-button": "_close-button_8fyu4_97",
|
|
29
|
+
"icon-wrapper-success": "_icon-wrapper-success_8fyu4_111",
|
|
30
|
+
"icon-wrapper-danger": "_icon-wrapper-danger_8fyu4_115",
|
|
31
|
+
"icon-wrapper-info": "_icon-wrapper-info_8fyu4_119",
|
|
32
|
+
"icon-wrapper-warning": "_icon-wrapper-warning_8fyu4_125",
|
|
33
|
+
"icon-wrapper-ai": "_icon-wrapper-ai_8fyu4_129"
|
|
34
|
+
}, y = x(
|
|
35
|
+
({ variant: t = "primary", ...o }, n) => /* @__PURE__ */ i(h, { className: "shrink-0 w-fit", ref: n, variant: t, ...o })
|
|
36
|
+
), w = x(
|
|
37
|
+
({ variant: t = "secondary", ...o }, n) => /* @__PURE__ */ i(h, { className: "shrink-0 w-fit", ref: n, variant: t, ...o })
|
|
35
38
|
);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const R = A(x), l = ({ children: t, hasCloseButton: o, ...n }) => /* @__PURE__ */ i(N, { as: "span", className: R(o && "title-close-button"), ...n, children: t });
|
|
42
|
-
l.displayName = "Alert.Title";
|
|
43
|
-
const a = A(x), z = {
|
|
39
|
+
y.displayName = "Alert.Button";
|
|
40
|
+
w.displayName = "Alert.SecondaryButton";
|
|
41
|
+
const z = b(B), _ = ({ children: t, hasCloseButton: o, ...n }) => /* @__PURE__ */ i(A, { as: "span", className: z(o && "title-close-button"), ...n, children: t });
|
|
42
|
+
_.displayName = "Alert.Title";
|
|
43
|
+
const a = b(B), F = {
|
|
44
44
|
ai: "sparkles",
|
|
45
45
|
brand: "lightbulb-alt",
|
|
46
46
|
danger: "exclamation-octagon",
|
|
47
47
|
info: "info-circle",
|
|
48
48
|
success: "check-circle",
|
|
49
49
|
warning: "exclamation-triangle"
|
|
50
|
-
},
|
|
51
|
-
({ children: t, className: o, cta: n, handleClose:
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
hasCloseButton: !!
|
|
56
|
-
variant: `body-${
|
|
50
|
+
}, $ = E(
|
|
51
|
+
({ children: t, className: o, cta: n, handleClose: u, isFullWidth: k, size: s = "md", variant: c = "brand", ...T }, C) => {
|
|
52
|
+
const S = c === "ai", d = f.toArray(t).some((e) => p.isValidElement(e) ? e.type === _ : !1), g = /* @__PURE__ */ i("div", { className: a("icon-wrapper", `icon-wrapper-${c}`), children: /* @__PURE__ */ i(V, { name: F[c] }) }), j = f.toArray(t).map((e) => e.type === _ ? /* @__PURE__ */ l("div", { className: a("title-with-icon"), children: [
|
|
53
|
+
g,
|
|
54
|
+
m(e, {
|
|
55
|
+
hasCloseButton: !!u,
|
|
56
|
+
variant: `body-${s}-strong`
|
|
57
57
|
})
|
|
58
|
-
] }) : e),
|
|
59
|
-
size:
|
|
60
|
-
variant:
|
|
61
|
-
}) : r.type ===
|
|
62
|
-
size:
|
|
63
|
-
}) : r),
|
|
64
|
-
return /* @__PURE__ */
|
|
58
|
+
] }) : e), v = (e) => f.toArray(e).flatMap((r) => p.isValidElement(r) && r.type === p.Fragment ? v(r.props.children) : r.type === y ? m(r, {
|
|
59
|
+
size: s,
|
|
60
|
+
variant: S ? "primary-ai" : void 0
|
|
61
|
+
}) : r.type === w ? m(r, {
|
|
62
|
+
size: s
|
|
63
|
+
}) : r), N = !!n && v(n);
|
|
64
|
+
return /* @__PURE__ */ l(
|
|
65
65
|
"div",
|
|
66
66
|
{
|
|
67
67
|
className: a(
|
|
68
68
|
"root",
|
|
69
|
-
|
|
70
|
-
`size-${
|
|
71
|
-
|
|
69
|
+
k && "full-width",
|
|
70
|
+
`size-${s}`,
|
|
71
|
+
c && `variant-${c}`,
|
|
72
72
|
o
|
|
73
73
|
),
|
|
74
|
-
ref:
|
|
75
|
-
...
|
|
74
|
+
ref: C,
|
|
75
|
+
...T,
|
|
76
76
|
children: [
|
|
77
|
-
!!
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
|
|
77
|
+
!!u && /* @__PURE__ */ i(R, { className: a("close-button"), onClick: u }),
|
|
78
|
+
/* @__PURE__ */ l("div", { className: a("content"), children: [
|
|
79
|
+
/* @__PURE__ */ l(
|
|
80
|
+
A,
|
|
81
81
|
{
|
|
82
82
|
as: "div",
|
|
83
|
-
className: a("content-text", !
|
|
84
|
-
variant: `body-${
|
|
83
|
+
className: a("content-text", !d && "without-title"),
|
|
84
|
+
variant: `body-${s}`,
|
|
85
85
|
children: [
|
|
86
|
-
!
|
|
87
|
-
|
|
86
|
+
!d && g,
|
|
87
|
+
j
|
|
88
88
|
]
|
|
89
89
|
}
|
|
90
90
|
),
|
|
91
|
-
!!
|
|
91
|
+
!!N && /* @__PURE__ */ i("div", { className: a("content-actions"), children: N })
|
|
92
92
|
] })
|
|
93
93
|
]
|
|
94
94
|
}
|
|
95
95
|
);
|
|
96
96
|
}
|
|
97
97
|
);
|
|
98
|
-
|
|
99
|
-
const
|
|
100
|
-
Button:
|
|
101
|
-
SecondaryButton:
|
|
102
|
-
Title:
|
|
98
|
+
$.displayName = "Alert";
|
|
99
|
+
const L = Object.assign($, {
|
|
100
|
+
Button: y,
|
|
101
|
+
SecondaryButton: w,
|
|
102
|
+
Title: _
|
|
103
103
|
});
|
|
104
104
|
export {
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
L as Alert,
|
|
106
|
+
F as ICON
|
|
107
107
|
};
|
package/dist/Breadcrumb.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.
|
|
1
|
+
@layer components{._root_13qa2_2{position:relative;overflow-x:hidden;font-size:var(--font-size-14);font-weight:var(--font-weight-regular);letter-spacing:0;line-height:var(--font-line-height-md);font-family:var(--font-family-body);--breadcrumbItemGap: var(--spacing-xs)}._list_13qa2_12{display:inline-flex;align-items:center;max-width:100%;overflow-x:auto;margin:0;padding:var(--spacing-sm) 0;list-style:none;white-space:nowrap;gap:var(--breadcrumbItemGap)}._start-gradient_13qa2_23{left:0;transform-origin:left}._end-gradient_13qa2_27{right:0;transform-origin:right}._start-gradient_13qa2_23,._end-gradient_13qa2_27{position:absolute;bottom:0;top:0;width:var(--size-icon-xl)}._item-wrapper_13qa2_38{display:inline-flex;flex:0 0 auto;gap:var(--breadcrumbItemGap)}._item-content_13qa2_43{color:var(--breadcrumbItemColor, var(--components-colors-breadcrumb-color-text-default));text-decoration:none;display:inline-flex;align-items:center;gap:var(--breadcrumbItemGap);transition:var(--duration-medium);direction:initial}._item-content_13qa2_43:hover{--breadcrumbItemColor: var(--components-colors-breadcrumb-color-text-hover)}._item-content_13qa2_43[aria-current=page]{--breadcrumbItemColor: var(--components-colors-breadcrumb-color-text-active);font-weight:var(--font-weight-medium)}._item-content_13qa2_43[aria-disabled=true]{pointer-events:none;cursor:default}._item-separator_13qa2_63{color:var(--components-colors-breadcrumb-color-icon-default);display:flex;align-items:center}}
|
package/dist/Breadcrumb.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './Breadcrumb.css';
|
|
3
3
|
import { jsxs as I, jsx as w } from "react/jsx-runtime";
|
|
4
|
-
import { forwardRef as ge, Children as me, cloneElement as
|
|
4
|
+
import { forwardRef as ge, Children as me, cloneElement as xe, useRef as M, useState as V, useCallback as X, useMemo as ze, useEffect as $ } from "react";
|
|
5
5
|
import { Icon as re } from "./Icon.js";
|
|
6
6
|
import { c as ne } from "./index-PAaZGbyz.js";
|
|
7
7
|
import { t as we } from "./throttle-BDBzFeFj.js";
|
|
@@ -72,22 +72,22 @@ var m = function(e) {
|
|
|
72
72
|
return !1;
|
|
73
73
|
}, R = typeof window < "u" ? window : {}, S = /* @__PURE__ */ new WeakMap(), Y = /auto|scroll/, Se = /^tb|vertical/, _e = /msie|trident/i.test(R.navigator && R.navigator.userAgent), h = function(e) {
|
|
74
74
|
return parseFloat(e || "0");
|
|
75
|
-
},
|
|
75
|
+
}, z = function(e, t, r) {
|
|
76
76
|
return e === void 0 && (e = 0), t === void 0 && (t = 0), r === void 0 && (r = !1), new Be((r ? t : e) || 0, (r ? e : t) || 0);
|
|
77
77
|
}, j = m({
|
|
78
|
-
devicePixelContentBoxSize:
|
|
79
|
-
borderBoxSize:
|
|
80
|
-
contentBoxSize:
|
|
78
|
+
devicePixelContentBoxSize: z(),
|
|
79
|
+
borderBoxSize: z(),
|
|
80
|
+
contentBoxSize: z(),
|
|
81
81
|
contentRect: new ie(0, 0, 0, 0)
|
|
82
82
|
}), se = function(e, t) {
|
|
83
83
|
if (t === void 0 && (t = !1), S.has(e) && !t)
|
|
84
84
|
return S.get(e);
|
|
85
85
|
if (oe(e))
|
|
86
86
|
return S.set(e, j), j;
|
|
87
|
-
var r = getComputedStyle(e), n = q(e) && e.ownerSVGElement && e.getBBox(), i = !_e && r.boxSizing === "border-box", o = Se.test(r.writingMode || ""), s = !n && Y.test(r.overflowY || ""), a = !n && Y.test(r.overflowX || ""), l = n ? 0 : h(r.paddingTop), u = n ? 0 : h(r.paddingRight), f = n ? 0 : h(r.paddingBottom), v = n ? 0 : h(r.paddingLeft), E = n ? 0 : h(r.borderTopWidth), c = n ? 0 : h(r.borderRightWidth), d = n ? 0 : h(r.borderBottomWidth), p = n ? 0 : h(r.borderLeftWidth), b = v + u,
|
|
88
|
-
devicePixelContentBoxSize:
|
|
89
|
-
borderBoxSize:
|
|
90
|
-
contentBoxSize:
|
|
87
|
+
var r = getComputedStyle(e), n = q(e) && e.ownerSVGElement && e.getBBox(), i = !_e && r.boxSizing === "border-box", o = Se.test(r.writingMode || ""), s = !n && Y.test(r.overflowY || ""), a = !n && Y.test(r.overflowX || ""), l = n ? 0 : h(r.paddingTop), u = n ? 0 : h(r.paddingRight), f = n ? 0 : h(r.paddingBottom), v = n ? 0 : h(r.paddingLeft), E = n ? 0 : h(r.borderTopWidth), c = n ? 0 : h(r.borderRightWidth), d = n ? 0 : h(r.borderBottomWidth), p = n ? 0 : h(r.borderLeftWidth), b = v + u, x = l + f, O = p + c, D = E + d, G = a ? e.offsetHeight - D - e.clientHeight : 0, F = s ? e.offsetWidth - O - e.clientWidth : 0, fe = i ? b + O : 0, he = i ? x + D : 0, B = n ? n.width : h(r.width) - fe - F, T = n ? n.height : h(r.height) - he - G, pe = B + b + F + O, be = T + x + G + D, H = m({
|
|
88
|
+
devicePixelContentBoxSize: z(Math.round(B * devicePixelRatio), Math.round(T * devicePixelRatio), o),
|
|
89
|
+
borderBoxSize: z(pe, be, o),
|
|
90
|
+
contentBoxSize: z(B, T, o),
|
|
91
91
|
contentRect: new ie(v, l, B, T)
|
|
92
92
|
});
|
|
93
93
|
return S.set(e, H), H;
|
|
@@ -289,14 +289,14 @@ var m = function(e) {
|
|
|
289
289
|
return "function ResizeObserver () { [polyfill code] }";
|
|
290
290
|
}, e;
|
|
291
291
|
}();
|
|
292
|
-
const Ve = (e, t, r) => Math.min(Math.max(e, t), r), Xe = "
|
|
292
|
+
const Ve = (e, t, r) => Math.min(Math.max(e, t), r), Xe = "_root_13qa2_2", $e = "_list_13qa2_12", ue = {
|
|
293
293
|
root: Xe,
|
|
294
294
|
list: $e,
|
|
295
|
-
"start-gradient": "_start-
|
|
296
|
-
"end-gradient": "_end-
|
|
297
|
-
"item-wrapper": "_item-
|
|
298
|
-
"item-content": "_item-
|
|
299
|
-
"item-separator": "_item-
|
|
295
|
+
"start-gradient": "_start-gradient_13qa2_23",
|
|
296
|
+
"end-gradient": "_end-gradient_13qa2_27",
|
|
297
|
+
"item-wrapper": "_item-wrapper_13qa2_38",
|
|
298
|
+
"item-content": "_item-content_13qa2_43",
|
|
299
|
+
"item-separator": "_item-separator_13qa2_63"
|
|
300
300
|
}, A = ne(ue), ve = Oe(
|
|
301
301
|
({
|
|
302
302
|
as: e = "a",
|
|
@@ -340,7 +340,7 @@ const k = ne(ue), de = ge(
|
|
|
340
340
|
}, o) => {
|
|
341
341
|
const s = me.toArray(e).filter(Boolean), a = s.length, l = s.map((c, d) => {
|
|
342
342
|
const p = a === 1 || a === d + 1;
|
|
343
|
-
return
|
|
343
|
+
return xe(c, {
|
|
344
344
|
icon: t,
|
|
345
345
|
isActive: p && r,
|
|
346
346
|
key: `breadcrumb-${d}`,
|
|
@@ -369,7 +369,7 @@ const et = Object.assign(de, {
|
|
|
369
369
|
current: { offsetWidth: c, scrollLeft: d, scrollWidth: p }
|
|
370
370
|
} = e, b = p - c, O = Ve(Math.abs(d - o), 0, b) / b;
|
|
371
371
|
l(O);
|
|
372
|
-
}, [o, l]), f =
|
|
372
|
+
}, [o, l]), f = ze(
|
|
373
373
|
() => we(
|
|
374
374
|
(c) => {
|
|
375
375
|
const [
|
|
@@ -379,8 +379,8 @@ const et = Object.assign(de, {
|
|
|
379
379
|
// @ts-ignore
|
|
380
380
|
target: { offsetWidth: d, scrollLeft: p, scrollWidth: b }
|
|
381
381
|
}
|
|
382
|
-
] = c,
|
|
383
|
-
o || s(p === 0 ? 0 :
|
|
382
|
+
] = c, x = b - d;
|
|
383
|
+
o || s(p === 0 ? 0 : x), i(x > 0);
|
|
384
384
|
},
|
|
385
385
|
300,
|
|
386
386
|
!1
|
package/dist/Checkbox.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './Checkbox.css';
|
|
3
|
-
import { jsxs as b, jsx as
|
|
3
|
+
import { jsxs as b, jsx as i } from "react/jsx-runtime";
|
|
4
4
|
import { a as x } from "./KPUWHTQJ-Dv3cAqjP.js";
|
|
5
5
|
import { forwardRef as C, useState as l } from "react";
|
|
6
6
|
import { useField as g } from "./Field.js";
|
|
@@ -14,9 +14,9 @@ const y = "_root_luk8p_2", F = "_indeterminate_luk8p_67", I = {
|
|
|
14
14
|
"variant-success": "_variant-success_luk8p_61",
|
|
15
15
|
indeterminate: F
|
|
16
16
|
}, N = w(I), j = C(
|
|
17
|
-
({ checked: m = !1, className: u, indeterminate:
|
|
18
|
-
const [e, _] = l(m), [k,
|
|
19
|
-
_(!e),
|
|
17
|
+
({ checked: m = !1, className: u, indeterminate: s = !1, onChange: a, variant: f, ...t }, p) => {
|
|
18
|
+
const [e, _] = l(m), [k, n] = l(!1), { getInputProps: o, variant: v } = g(), r = v || f, { disabled: c } = o(t), h = () => {
|
|
19
|
+
_(!e), a && a(!e);
|
|
20
20
|
};
|
|
21
21
|
return /* @__PURE__ */ b(
|
|
22
22
|
"div",
|
|
@@ -26,24 +26,25 @@ const y = "_root_luk8p_2", F = "_indeterminate_luk8p_67", I = {
|
|
|
26
26
|
className: N(
|
|
27
27
|
"root",
|
|
28
28
|
r && `variant-${r}`,
|
|
29
|
-
|
|
29
|
+
s && "indeterminate",
|
|
30
|
+
"field-input",
|
|
30
31
|
u
|
|
31
32
|
),
|
|
32
33
|
"data-focus-visible": k || void 0,
|
|
33
34
|
onClick: c ? void 0 : h,
|
|
34
35
|
children: [
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ i(V, { children: /* @__PURE__ */ i(
|
|
36
37
|
x,
|
|
37
38
|
{
|
|
38
|
-
...
|
|
39
|
+
...o(t),
|
|
39
40
|
checked: e,
|
|
40
|
-
onBlur: () =>
|
|
41
|
-
onFocusVisible: () =>
|
|
41
|
+
onBlur: () => n(!1),
|
|
42
|
+
onFocusVisible: () => n(!0),
|
|
42
43
|
ref: p
|
|
43
44
|
}
|
|
44
45
|
) }),
|
|
45
|
-
e ? /* @__PURE__ */
|
|
46
|
-
!e &&
|
|
46
|
+
e ? /* @__PURE__ */ i(d, { name: "check", size: "sm" }) : null,
|
|
47
|
+
!e && s ? /* @__PURE__ */ i(d, { name: "minus", size: "sm" }) : null
|
|
47
48
|
]
|
|
48
49
|
}
|
|
49
50
|
);
|
package/dist/DatePicker.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './DatePicker.css';
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { D as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { Icon as
|
|
8
|
-
import { Select as
|
|
9
|
-
import { c as
|
|
10
|
-
import { g as
|
|
11
|
-
import { InputText as
|
|
12
|
-
const
|
|
3
|
+
import { jsxs as G, jsx as l } from "react/jsx-runtime";
|
|
4
|
+
import { useState as A, useMemo as $, useEffect as S, forwardRef as J, useRef as Q } from "react";
|
|
5
|
+
import { D as V, C as W } from "./CustomPopper-C1wIDHbM.js";
|
|
6
|
+
import { Button as j } from "./Button.js";
|
|
7
|
+
import { Icon as F } from "./Icon.js";
|
|
8
|
+
import { Select as M } from "./Select.js";
|
|
9
|
+
import { c as v } from "./index-PAaZGbyz.js";
|
|
10
|
+
import { g as X, a as Z, s as B, b as Y, D as K } from "./utils-BD597oo6.js";
|
|
11
|
+
import { InputText as g } from "./InputText.js";
|
|
12
|
+
const C = v(B), L = ({
|
|
13
13
|
changeMonth: x,
|
|
14
14
|
changeYear: N,
|
|
15
15
|
date: f,
|
|
@@ -22,49 +22,49 @@ const g = P(v), B = ({
|
|
|
22
22
|
locale: D,
|
|
23
23
|
startYear: a
|
|
24
24
|
}) => {
|
|
25
|
-
const [
|
|
26
|
-
return
|
|
27
|
-
const b = new Date(f),
|
|
28
|
-
R(
|
|
29
|
-
}, [f,
|
|
25
|
+
const [p, R] = A(null), [m, w] = A(null), i = $(() => X(D), [D]), r = $(() => Z(a, c), [a, c]), o = (t || p === i[0].label) && m === a, E = (t || p === i[i.length - 1].label) && m === c;
|
|
26
|
+
return S(() => {
|
|
27
|
+
const b = new Date(f), u = i[b.getMonth()].label, H = b.getFullYear();
|
|
28
|
+
R(u), w(H);
|
|
29
|
+
}, [f, i]), /* @__PURE__ */ G("div", { className: C("custom-header"), children: [
|
|
30
30
|
/* @__PURE__ */ l(
|
|
31
|
-
|
|
31
|
+
j,
|
|
32
32
|
{
|
|
33
|
-
disabled:
|
|
33
|
+
disabled: o,
|
|
34
34
|
onClick: t ? z : T,
|
|
35
35
|
size: "sm",
|
|
36
36
|
title: `Previous ${t ? "year" : "month"}`,
|
|
37
37
|
variant: "tertiary",
|
|
38
|
-
children: /* @__PURE__ */ l(
|
|
38
|
+
children: /* @__PURE__ */ l(F, { name: "angle-left-b", size: "xs" })
|
|
39
39
|
}
|
|
40
40
|
),
|
|
41
41
|
!t && /* @__PURE__ */ l(
|
|
42
|
-
|
|
42
|
+
M,
|
|
43
43
|
{
|
|
44
44
|
id: "month",
|
|
45
45
|
name: "month",
|
|
46
46
|
onChange: x,
|
|
47
|
-
options:
|
|
47
|
+
options: i,
|
|
48
48
|
size: "md",
|
|
49
|
-
value:
|
|
49
|
+
value: p
|
|
50
50
|
}
|
|
51
51
|
),
|
|
52
|
-
/* @__PURE__ */ l(
|
|
52
|
+
/* @__PURE__ */ l(M, { id: "year", name: "year", onChange: N, options: r, size: "md", value: m }),
|
|
53
53
|
/* @__PURE__ */ l(
|
|
54
|
-
|
|
54
|
+
j,
|
|
55
55
|
{
|
|
56
|
-
disabled:
|
|
56
|
+
disabled: E,
|
|
57
57
|
onClick: t ? y : I,
|
|
58
58
|
size: "sm",
|
|
59
59
|
title: `Next ${t ? "year" : "month"}`,
|
|
60
60
|
variant: "tertiary",
|
|
61
|
-
children: /* @__PURE__ */ l(
|
|
61
|
+
children: /* @__PURE__ */ l(F, { name: "angle-right-b", size: "xs" })
|
|
62
62
|
}
|
|
63
63
|
)
|
|
64
64
|
] });
|
|
65
65
|
};
|
|
66
|
-
|
|
67
|
-
const
|
|
66
|
+
L.displayName = "DateTimePicker.CustomHeader";
|
|
67
|
+
const P = v(B), h = J(
|
|
68
68
|
({
|
|
69
69
|
autoFocus: x,
|
|
70
70
|
className: N,
|
|
@@ -77,93 +77,94 @@ const h = P(v), C = G(
|
|
|
77
77
|
onChange: t,
|
|
78
78
|
placeholder: D,
|
|
79
79
|
preventVirtualKeyboard: a = !1,
|
|
80
|
-
showMonthYearPicker:
|
|
80
|
+
showMonthYearPicker: p,
|
|
81
81
|
size: R = "md",
|
|
82
|
-
startYear:
|
|
83
|
-
transparent:
|
|
84
|
-
useWeekdaysShort:
|
|
82
|
+
startYear: m = 1900,
|
|
83
|
+
transparent: w,
|
|
84
|
+
useWeekdaysShort: i = !0,
|
|
85
85
|
value: r = K,
|
|
86
|
-
...
|
|
87
|
-
},
|
|
88
|
-
const b =
|
|
89
|
-
|
|
90
|
-
t == null || t(
|
|
91
|
-
}, []),
|
|
92
|
-
var
|
|
93
|
-
const e =
|
|
94
|
-
((
|
|
86
|
+
...o
|
|
87
|
+
}, E) => {
|
|
88
|
+
const b = o == null ? void 0 : o.timeIntervals, u = (e) => Y(e, b), [H, d] = A(u(r)), O = Q(), k = E || O;
|
|
89
|
+
S(() => {
|
|
90
|
+
t == null || t(u(r));
|
|
91
|
+
}, []), S(() => {
|
|
92
|
+
var n;
|
|
93
|
+
const e = u(r), s = typeof r == "object" ? r == null ? void 0 : r.toISOString() : r;
|
|
94
|
+
((n = new Date(Date.parse(s))) == null ? void 0 : n.getTime()) - (e == null ? void 0 : e.getTime()) !== 0 && (t == null || t(e)), d(e);
|
|
95
95
|
}, [r]);
|
|
96
|
-
const
|
|
96
|
+
const U = (e) => {
|
|
97
97
|
var s;
|
|
98
|
-
["Enter", "Escape"].includes(e.key) && ((s =
|
|
99
|
-
}, U = (e) => {
|
|
100
|
-
var s;
|
|
101
|
-
e.preventDefault(), (s = S.current) == null || s.blur(), n(null), t == null || t(null);
|
|
98
|
+
["Enter", "Escape"].includes(e.key) && ((s = k.current) == null || s.blur());
|
|
102
99
|
}, _ = (e) => {
|
|
100
|
+
var s;
|
|
101
|
+
e.preventDefault(), (s = k.current) == null || s.blur(), d(null), t == null || t(null);
|
|
102
|
+
}, q = (e) => {
|
|
103
103
|
if (!e) {
|
|
104
|
-
|
|
104
|
+
d(null), t == null || t(null);
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
107
|
const s = Array.isArray(e) ? e[0] : e;
|
|
108
108
|
if (!s) {
|
|
109
|
-
|
|
109
|
+
d(null), t == null || t(null);
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
|
-
const
|
|
113
|
-
s.setHours(
|
|
112
|
+
const n = u(s);
|
|
113
|
+
s.setHours(n.getHours(), n.getMinutes()), d(s), t == null || t(new Date(s));
|
|
114
114
|
};
|
|
115
115
|
return (
|
|
116
116
|
// type issue in react-datepicker (https://github.com/Hacker0x01/react-datepicker/issues/5391)
|
|
117
117
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
118
118
|
// @ts-expect-error
|
|
119
119
|
/* @__PURE__ */ l(
|
|
120
|
-
|
|
120
|
+
V,
|
|
121
121
|
{
|
|
122
122
|
autoComplete: "off",
|
|
123
123
|
calendarClassName: "date-picker-popper",
|
|
124
124
|
customInput: /* @__PURE__ */ l(
|
|
125
|
-
|
|
125
|
+
g,
|
|
126
126
|
{
|
|
127
127
|
autoFocus: x,
|
|
128
|
-
className:
|
|
129
|
-
"data-testid":
|
|
128
|
+
className: P("date-picker", N),
|
|
129
|
+
"data-testid": o["data-testid"],
|
|
130
130
|
disabled: T,
|
|
131
131
|
icon: c,
|
|
132
132
|
iconPlacement: I,
|
|
133
133
|
inputMode: a ? "none" : "text",
|
|
134
134
|
isClearable: !0,
|
|
135
|
-
onReset:
|
|
135
|
+
onReset: _,
|
|
136
136
|
placeholder: D,
|
|
137
|
-
ref:
|
|
137
|
+
ref: k,
|
|
138
138
|
size: R,
|
|
139
|
-
transparent:
|
|
139
|
+
transparent: w
|
|
140
140
|
}
|
|
141
141
|
),
|
|
142
142
|
dateFormat: f,
|
|
143
143
|
locale: y,
|
|
144
|
-
onChange:
|
|
145
|
-
onKeyDown:
|
|
146
|
-
popperContainer:
|
|
144
|
+
onChange: q,
|
|
145
|
+
onKeyDown: U,
|
|
146
|
+
popperContainer: W,
|
|
147
147
|
renderCustomHeader: (e) => /* @__PURE__ */ l(
|
|
148
|
-
|
|
148
|
+
L,
|
|
149
149
|
{
|
|
150
150
|
endYear: z,
|
|
151
|
-
isMonthYearPicker:
|
|
151
|
+
isMonthYearPicker: p,
|
|
152
152
|
locale: y,
|
|
153
|
-
startYear:
|
|
153
|
+
startYear: m,
|
|
154
154
|
...e
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
|
-
selected:
|
|
158
|
-
showMonthYearPicker:
|
|
159
|
-
useWeekdaysShort:
|
|
160
|
-
...
|
|
157
|
+
selected: H,
|
|
158
|
+
showMonthYearPicker: p,
|
|
159
|
+
useWeekdaysShort: i,
|
|
160
|
+
...o,
|
|
161
|
+
wrapperClassName: P(o.wrapperClassName, "date-picker-wrapper", "field-input")
|
|
161
162
|
}
|
|
162
163
|
)
|
|
163
164
|
);
|
|
164
165
|
}
|
|
165
166
|
);
|
|
166
|
-
|
|
167
|
+
h.displayName = "DatePicker";
|
|
167
168
|
export {
|
|
168
|
-
|
|
169
|
+
h as DatePicker
|
|
169
170
|
};
|
package/dist/DateTimePicker.js
CHANGED
|
@@ -10,11 +10,11 @@ const L = F(j), M = E(
|
|
|
10
10
|
locale: p,
|
|
11
11
|
onChange: s,
|
|
12
12
|
size: D = "md",
|
|
13
|
-
transparent:
|
|
14
|
-
value:
|
|
13
|
+
transparent: n,
|
|
14
|
+
value: i = b,
|
|
15
15
|
...l
|
|
16
|
-
},
|
|
17
|
-
const u = l == null ? void 0 : l.timeIntervals,
|
|
16
|
+
}, k) => {
|
|
17
|
+
const u = l == null ? void 0 : l.timeIntervals, r = (t) => I(t, u), [T, c] = P(r(i)), y = x(), R = k || y, m = (t) => {
|
|
18
18
|
if (!t) {
|
|
19
19
|
c(null), s == null || s(null);
|
|
20
20
|
return;
|
|
@@ -24,16 +24,16 @@ const L = F(j), M = E(
|
|
|
24
24
|
c(null), s == null || s(null);
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
const f =
|
|
27
|
+
const f = r(e);
|
|
28
28
|
e.setHours(f.getHours(), f.getMinutes()), c(e), s == null || s(new Date(e));
|
|
29
29
|
};
|
|
30
30
|
return a(() => {
|
|
31
|
-
m(i
|
|
31
|
+
m(r(i));
|
|
32
32
|
}, []), a(() => {
|
|
33
33
|
var e;
|
|
34
|
-
const t = i
|
|
35
|
-
((e = new Date(
|
|
36
|
-
}, [
|
|
34
|
+
const t = r(i);
|
|
35
|
+
((e = new Date(i)) == null ? void 0 : e.getTime()) - (t == null ? void 0 : t.getTime()) !== 0 && m(t), c(t);
|
|
36
|
+
}, [i]), /* @__PURE__ */ A("div", { className: L("date-time-picker", "field-input"), children: N.map(o, (t, e) => H(t, {
|
|
37
37
|
disabled: d,
|
|
38
38
|
inputRef: e === 0 ? R : null,
|
|
39
39
|
// give ref only to the DatePicker
|
|
@@ -42,7 +42,7 @@ const L = F(j), M = E(
|
|
|
42
42
|
onChange: m,
|
|
43
43
|
size: D,
|
|
44
44
|
timeIntervals: u,
|
|
45
|
-
transparent:
|
|
45
|
+
transparent: n,
|
|
46
46
|
value: T
|
|
47
47
|
})) });
|
|
48
48
|
}
|