@fluidattacks/design 3.1.12 → 3.1.13
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/components/@core/index.js +2 -2
- package/dist/components/accordion/accordion-content/index.js +18 -5
- package/dist/components/accordion/index.js +71 -14
- package/dist/components/alert/index.js +108 -57
- package/dist/components/button/index.js +64 -13
- package/dist/components/card/card-header/index.js +78 -9
- package/dist/components/card/card-with-image/index.js +88 -13
- package/dist/components/card/card-with-input/index.js +72 -23
- package/dist/components/card/card-with-selector/index.js +63 -8
- package/dist/components/card/card-with-switch/index.js +46 -8
- package/dist/components/carousel/index.js +54 -28
- package/dist/components/checkbox/index.js +66 -32
- package/dist/components/cloud-image/index.js +2 -2
- package/dist/components/code-snippet/index.js +64 -19
- package/dist/components/code-snippet/location-code/index.js +146 -100
- package/dist/components/colors/index.js +220 -5
- package/dist/components/confirm-dialog/index.js +41 -18
- package/dist/components/container/index.js +39 -15
- package/dist/components/content-card/category-tag/index.js +37 -8
- package/dist/components/content-card/event-date/index.js +53 -10
- package/dist/components/content-card/index.js +118 -13
- package/dist/components/content-card-carousel/index.js +87 -7
- package/dist/components/content-card-carousel/scroll-buttons/index.js +1 -1
- package/dist/components/divider/index.js +22 -7
- package/dist/components/empty-state/empty-button/index.js +4 -4
- package/dist/components/empty-state/index.js +52 -15
- package/dist/components/file-preview/index.js +28 -12
- package/dist/components/form/index.js +46 -9
- package/dist/components/grid-container/index.js +31 -11
- package/dist/components/group-selector/index.js +126 -17
- package/dist/components/group-selector/option-container/index.js +1 -1
- package/dist/components/icon/index.js +78 -18
- package/dist/components/icon-button/index.js +63 -14
- package/dist/components/indicator-card/index.js +70 -11
- package/dist/components/info-sidebar/index.js +107 -7
- package/dist/components/inputs/fields/combobox/index.js +141 -21
- package/dist/components/inputs/fields/combobox/option/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/cell/index.js +22 -11
- package/dist/components/inputs/fields/date/calendar/grid/index.js +21 -10
- package/dist/components/inputs/fields/date/calendar/header/index.js +35 -13
- package/dist/components/inputs/fields/date/calendar/index.js +26 -11
- package/dist/components/inputs/fields/date/index.js +65 -15
- package/dist/components/inputs/fields/date-range/calendar/index.js +29 -10
- package/dist/components/inputs/fields/date-range/index.js +98 -18
- package/dist/components/inputs/fields/date-time/calendar/index.js +44 -15
- package/dist/components/inputs/fields/date-time/index.js +65 -14
- package/dist/components/inputs/fields/editable/index.js +22 -10
- package/dist/components/inputs/fields/input/index.js +74 -10
- package/dist/components/inputs/fields/input-file/index.js +114 -21
- package/dist/components/inputs/fields/input-tags/index.js +60 -11
- package/dist/components/inputs/fields/number/index.js +54 -7
- package/dist/components/inputs/fields/number-range/index.js +46 -8
- package/dist/components/inputs/fields/phone/index.js +446 -286
- package/dist/components/inputs/fields/text-area/index.js +78 -10
- package/dist/components/inputs/label/index.js +34 -8
- package/dist/components/inputs/outline-container/index.js +98 -12
- package/dist/components/inputs/utils/action-button/index.js +28 -7
- package/dist/components/inputs/utils/calendar-button/index.js +34 -10
- package/dist/components/inputs/utils/date-selector/index.js +60 -6
- package/dist/components/inputs/utils/date-time-field/index.js +129 -28
- package/dist/components/inputs/utils/dialog/index.js +10 -7
- package/dist/components/inputs/utils/number-field/index.js +81 -8
- package/dist/components/inputs/utils/popover/index.js +41 -10
- package/dist/components/interactive-card/icon/index.js +1 -1
- package/dist/components/interactive-card/index.js +110 -7
- package/dist/components/language-selector/index.js +34 -10
- package/dist/components/language-selector/item-list/index.js +1 -1
- package/dist/components/link/index.js +71 -17
- package/dist/components/list-item/index.js +64 -13
- package/dist/components/little-flag/index.js +26 -9
- package/dist/components/loading/index.js +48 -21
- package/dist/components/logo/index.js +10 -4
- package/dist/components/logo-carousel/index.js +40 -5
- package/dist/components/lottie/index.js +12 -7
- package/dist/components/menu/index.js +53 -9
- package/dist/components/message-banner/index.js +79 -13
- package/dist/components/modal/index.js +59 -13
- package/dist/components/modal/modal-confirm/index.js +48 -7
- package/dist/components/modal/modal-footer/index.js +22 -13
- package/dist/components/modal/modal-header/index.js +45 -19
- package/dist/components/notification/index.js +65 -20
- package/dist/components/notification-sign/index.js +27 -10
- package/dist/components/number-input/index.js +58 -21
- package/dist/components/oauth-selector/index.js +97 -23
- package/dist/components/oauth-selector/option-container/index.js +68 -7
- package/dist/components/plan-card/index.js +99 -28
- package/dist/components/plan-card/recommended-tag/index.js +23 -2
- package/dist/components/pop-up/description/index.js +47 -9
- package/dist/components/pop-up/index.js +146 -17
- package/dist/components/premium-feature/index.js +56 -16
- package/dist/components/priority-score/index.js +24 -9
- package/dist/components/progress/index.js +30 -17
- package/dist/components/progress-bar/index.js +99 -41
- package/dist/components/radio-button/index.js +64 -27
- package/dist/components/scroll-button/index.js +33 -15
- package/dist/components/search/index.js +77 -35
- package/dist/components/search-bar/index.js +211 -24
- package/dist/components/search-bar/item-searching/index.js +1 -1
- package/dist/components/severity-badge/index.js +66 -6
- package/dist/components/severity-overview/badge/index.js +62 -11
- package/dist/components/severity-overview/index.js +15 -5
- package/dist/components/show-on-hover/index.js +16 -10
- package/dist/components/slide-out-menu/index.js +2611 -1164
- package/dist/components/slide-out-menu/menu-item/index.js +58 -6
- package/dist/components/slider/index.js +79 -48
- package/dist/components/slider/thumb/index.js +13 -6
- package/dist/components/step-lapse/index.js +81 -23
- package/dist/components/table-button/index.js +65 -24
- package/dist/components/tabs/fixed-tabs/index.js +24 -4
- package/dist/components/tabs/index.js +54 -11
- package/dist/components/tabs/tab/index.js +37 -6
- package/dist/components/tag/index.js +95 -27
- package/dist/components/timeline/card/index.js +1 -1
- package/dist/components/timeline/index.js +15 -5
- package/dist/components/toggle/index.js +65 -25
- package/dist/components/toggle-buttons/index.js +51 -22
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tour/index.js +3897 -1829
- package/dist/components/typography/heading/index.js +43 -5
- package/dist/components/typography/span/index.js +38 -6
- package/dist/components/typography/text/index.js +44 -6
- package/dist/components/web-form/index.js +28 -19
- package/dist/hooks/index.js +5 -5
- package/dist/index-BMHVi812.mjs +234 -0
- package/dist/index-BzAniA2J.mjs +135 -0
- package/dist/index-C6LbClYh.mjs +146 -0
- package/dist/index-CAIe8hBv.mjs +130 -0
- package/dist/index-CUQBAqt_.mjs +75 -0
- package/dist/index-CWlrSlUk.mjs +68 -0
- package/dist/index-Ckmu1TfV.mjs +86 -0
- package/dist/index-DwznImvK.mjs +1678 -0
- package/dist/index-maWH3JYC.mjs +3561 -0
- package/dist/index.js +11 -11
- package/dist/styles-B2N0JLw1.mjs +114 -0
- package/dist/styles-B64DVBIF.mjs +115 -0
- package/dist/{styles-lSVV9kjn.mjs → styles-BXFVwnWT.mjs} +28 -28
- package/dist/styles-BZQOqe8p.mjs +141 -0
- package/dist/styles-Bdque9TT.mjs +65 -0
- package/dist/{styles-CI-I6joH.mjs → styles-BlHspTrz.mjs} +18 -18
- package/dist/{styles-Cx93EcVo.mjs → styles-CROOwXEH.mjs} +5 -5
- package/dist/styles-CplEd2kw.mjs +228 -0
- package/dist/styles-D1eTIklB.mjs +110 -0
- package/dist/styles-ePGii_9g.mjs +74 -0
- package/dist/use-carousel-CgAF78h3.mjs +23 -0
- package/dist/use-click-outside-BUll8Ag-.mjs +18 -0
- package/dist/use-cloudinary-image-BCxwj15o.mjs +1176 -0
- package/dist/use-modal-CtgexKnf.mjs +14 -0
- package/dist/use-search-Dj47QDw9.mjs +15 -0
- package/dist/utils-V0EumEPM.mjs +6 -0
- package/package.json +1 -3
- package/dist/index-38JqtnAI.mjs +0 -122
- package/dist/index-B5yoGFs6.mjs +0 -54
- package/dist/index-BLbKylyw.mjs +0 -209
- package/dist/index-Bu448Tz2.mjs +0 -106
- package/dist/index-BwFnfaRh.mjs +0 -2310
- package/dist/index-Co_k0WFk.mjs +0 -75
- package/dist/index-Cu7uUMlx.mjs +0 -82
- package/dist/index-D-lcuEHY.mjs +0 -1018
- package/dist/index-DrfjITyT.mjs +0 -61
- package/dist/styles-7_q7nHce.mjs +0 -110
- package/dist/styles-BA0WIQL-.mjs +0 -74
- package/dist/styles-C3cZmKVJ.mjs +0 -131
- package/dist/styles-D85YYIjM.mjs +0 -131
- package/dist/styles-EIbGRPlk.mjs +0 -106
- package/dist/styles-Q1VXuWI7.mjs +0 -65
- package/dist/styles-fH2c4cfc.mjs +0 -77
- package/dist/use-carousel-CvRxi2FI.mjs +0 -17
- package/dist/use-click-outside-BtZLIoU1.mjs +0 -18
- package/dist/use-cloudinary-image-fG7ODNgr.mjs +0 -611
- package/dist/use-modal-CkrZ-_-M.mjs +0 -14
- package/dist/use-search-DpLNvt7Q.mjs +0 -12
- package/dist/utils-CQvBF-wY.mjs +0 -4
|
@@ -1,13 +1,81 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import { OutlineContainer as
|
|
5
|
-
import { S as
|
|
6
|
-
import { Icon as
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx as i, jsxs as T } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as $ } from "react";
|
|
3
|
+
import { useTheme as b } from "styled-components";
|
|
4
|
+
import { OutlineContainer as j } from "../../outline-container/index.js";
|
|
5
|
+
import { S as A } from "../../../../styles-BXFVwnWT.mjs";
|
|
6
|
+
import { Icon as I } from "../../../icon/index.js";
|
|
7
|
+
const R = $(function({
|
|
8
|
+
disabled: o = !1,
|
|
9
|
+
error: r,
|
|
10
|
+
helpLink: s,
|
|
11
|
+
helpText: l,
|
|
12
|
+
label: c,
|
|
13
|
+
name: e = "input-text",
|
|
14
|
+
id: f,
|
|
15
|
+
maskValue: d = !1,
|
|
16
|
+
maxLength: a,
|
|
17
|
+
placeholder: m,
|
|
18
|
+
required: n,
|
|
19
|
+
rows: p,
|
|
20
|
+
tooltip: x,
|
|
21
|
+
value: t,
|
|
22
|
+
weight: u,
|
|
23
|
+
...h
|
|
24
|
+
}, C) {
|
|
25
|
+
const S = b();
|
|
26
|
+
return /* @__PURE__ */ i(
|
|
27
|
+
j,
|
|
28
|
+
{
|
|
29
|
+
error: r,
|
|
30
|
+
helpLink: s,
|
|
31
|
+
helpText: l,
|
|
32
|
+
htmlFor: e,
|
|
33
|
+
label: c,
|
|
34
|
+
maxLength: a,
|
|
35
|
+
required: n,
|
|
36
|
+
tooltip: x,
|
|
37
|
+
value: t ? String(t) : void 0,
|
|
38
|
+
weight: u,
|
|
39
|
+
children: /* @__PURE__ */ T(
|
|
40
|
+
A,
|
|
41
|
+
{
|
|
42
|
+
className: `${o ? "disabled" : ""} ${r ? "error" : ""}`,
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ i(
|
|
45
|
+
"textarea",
|
|
46
|
+
{
|
|
47
|
+
"aria-hidden": !1,
|
|
48
|
+
"aria-invalid": r ? "true" : "false",
|
|
49
|
+
"aria-label": e,
|
|
50
|
+
"aria-required": n,
|
|
51
|
+
className: d ? "sr-block" : "",
|
|
52
|
+
"data-testid": `${e}-text-area`,
|
|
53
|
+
disabled: o,
|
|
54
|
+
id: f ?? e,
|
|
55
|
+
maxLength: a,
|
|
56
|
+
name: e,
|
|
57
|
+
placeholder: m,
|
|
58
|
+
ref: C,
|
|
59
|
+
rows: p,
|
|
60
|
+
value: t,
|
|
61
|
+
...h
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
r ? /* @__PURE__ */ i(
|
|
65
|
+
I,
|
|
66
|
+
{
|
|
67
|
+
icon: "exclamation-circle",
|
|
68
|
+
iconClass: "error-icon",
|
|
69
|
+
iconColor: S.palette.error[500],
|
|
70
|
+
iconSize: "xs"
|
|
71
|
+
}
|
|
72
|
+
) : void 0
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
);
|
|
10
78
|
});
|
|
11
79
|
export {
|
|
12
|
-
|
|
80
|
+
R as TextArea
|
|
13
81
|
};
|
|
@@ -1,11 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { isEmpty as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { T as x } from "../../../index-
|
|
6
|
-
const j = ({
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsxs as c, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { isEmpty as m } from "lodash";
|
|
3
|
+
import { useTheme as a } from "styled-components";
|
|
4
|
+
import { Icon as f } from "../../icon/index.js";
|
|
5
|
+
import { T as x } from "../../../index-DwznImvK.mjs";
|
|
6
|
+
const j = ({
|
|
7
|
+
htmlFor: e,
|
|
8
|
+
label: r,
|
|
9
|
+
required: t,
|
|
10
|
+
tooltip: o,
|
|
11
|
+
weight: l = "normal"
|
|
12
|
+
}) => {
|
|
13
|
+
const n = a(), s = `${e}-tooltip`, p = o !== void 0 && !m(o);
|
|
14
|
+
return /* @__PURE__ */ c("label", { className: `flex font-${l} gap-1 w-full`, htmlFor: e, children: [
|
|
15
|
+
r,
|
|
16
|
+
t && /* @__PURE__ */ i(
|
|
17
|
+
f,
|
|
18
|
+
{
|
|
19
|
+
icon: "asterisk",
|
|
20
|
+
iconColor: n.palette.error[500],
|
|
21
|
+
iconSize: "xxss"
|
|
22
|
+
}
|
|
23
|
+
),
|
|
24
|
+
p ? /* @__PURE__ */ i(
|
|
25
|
+
x,
|
|
26
|
+
{
|
|
27
|
+
display: "inline-flex",
|
|
28
|
+
icon: "circle-info",
|
|
29
|
+
id: s,
|
|
30
|
+
place: "top",
|
|
31
|
+
tip: o
|
|
32
|
+
}
|
|
33
|
+
) : null
|
|
34
|
+
] });
|
|
9
35
|
};
|
|
10
36
|
export {
|
|
11
37
|
j as Label
|
|
@@ -1,17 +1,103 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useTheme as
|
|
3
|
-
import { Label as
|
|
4
|
-
import { a as
|
|
5
|
-
import { Container as
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { Link as
|
|
8
|
-
import { Tag as
|
|
1
|
+
import { jsxs as r, jsx as e, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme as w } from "styled-components";
|
|
3
|
+
import { Label as x } from "../label/index.js";
|
|
4
|
+
import { a as C } from "../../../styles-BXFVwnWT.mjs";
|
|
5
|
+
import { Container as c } from "../../container/index.js";
|
|
6
|
+
import { Icon as j } from "../../icon/index.js";
|
|
7
|
+
import { Link as z } from "../../link/index.js";
|
|
8
|
+
import { Tag as S } from "../../tag/index.js";
|
|
9
9
|
import "../../typography/heading/index.js";
|
|
10
10
|
import "../../typography/span/index.js";
|
|
11
|
-
import { Text as
|
|
12
|
-
const B = ({
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
import { Text as d } from "../../typography/text/index.js";
|
|
12
|
+
const B = ({
|
|
13
|
+
children: s,
|
|
14
|
+
error: i,
|
|
15
|
+
helpLink: n,
|
|
16
|
+
helpLinkText: f = "Link here",
|
|
17
|
+
helpText: o,
|
|
18
|
+
htmlFor: p,
|
|
19
|
+
label: m,
|
|
20
|
+
maxLength: t,
|
|
21
|
+
required: g,
|
|
22
|
+
tooltip: h,
|
|
23
|
+
value: a,
|
|
24
|
+
weight: u
|
|
25
|
+
}) => {
|
|
26
|
+
const l = w(), y = a ? a.length : 0;
|
|
27
|
+
return /* @__PURE__ */ r(C, { children: [
|
|
28
|
+
m === void 0 ? void 0 : /* @__PURE__ */ e(
|
|
29
|
+
x,
|
|
30
|
+
{
|
|
31
|
+
htmlFor: p,
|
|
32
|
+
label: m,
|
|
33
|
+
required: g,
|
|
34
|
+
tooltip: h,
|
|
35
|
+
weight: u
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
s,
|
|
39
|
+
i || t ? /* @__PURE__ */ r(
|
|
40
|
+
c,
|
|
41
|
+
{
|
|
42
|
+
display: "flex",
|
|
43
|
+
justify: i === void 0 ? "end" : "space-between",
|
|
44
|
+
width: "100%",
|
|
45
|
+
children: [
|
|
46
|
+
i && /* @__PURE__ */ e(
|
|
47
|
+
d,
|
|
48
|
+
{
|
|
49
|
+
className: "error-msg",
|
|
50
|
+
color: l.palette.error[500],
|
|
51
|
+
display: "block",
|
|
52
|
+
lineSpacing: 1,
|
|
53
|
+
size: "sm",
|
|
54
|
+
children: i
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
t && /* @__PURE__ */ e(
|
|
58
|
+
S,
|
|
59
|
+
{
|
|
60
|
+
priority: "low",
|
|
61
|
+
tagLabel: `${y}/${t}`,
|
|
62
|
+
variant: "error"
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
) : void 0,
|
|
68
|
+
o || n ? /* @__PURE__ */ r(
|
|
69
|
+
c,
|
|
70
|
+
{
|
|
71
|
+
alignItems: "center",
|
|
72
|
+
display: "flex",
|
|
73
|
+
gap: 0.25,
|
|
74
|
+
width: "100%",
|
|
75
|
+
children: [
|
|
76
|
+
o && /* @__PURE__ */ r(b, { children: [
|
|
77
|
+
/* @__PURE__ */ e(
|
|
78
|
+
j,
|
|
79
|
+
{
|
|
80
|
+
icon: "circle-info",
|
|
81
|
+
iconColor: l.palette.gray[400],
|
|
82
|
+
iconSize: "xxs",
|
|
83
|
+
iconType: "fa-light"
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
/* @__PURE__ */ e(
|
|
87
|
+
d,
|
|
88
|
+
{
|
|
89
|
+
color: l.palette.gray[400],
|
|
90
|
+
display: "inline-block",
|
|
91
|
+
size: "sm",
|
|
92
|
+
children: o
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
] }),
|
|
96
|
+
n && /* @__PURE__ */ e(z, { href: n, children: f })
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
) : void 0
|
|
100
|
+
] });
|
|
15
101
|
};
|
|
16
102
|
export {
|
|
17
103
|
B as OutlineContainer
|
|
@@ -1,10 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { S as
|
|
4
|
-
import { Icon as
|
|
5
|
-
const
|
|
6
|
-
return
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as e } from "react";
|
|
3
|
+
import { S as m } from "../../../../styles-D1eTIklB.mjs";
|
|
4
|
+
import { Icon as f } from "../../../icon/index.js";
|
|
5
|
+
const d = e(function({ disabled: n, icon: t, margin: i, onClick: r, ...a }, c) {
|
|
6
|
+
return /* @__PURE__ */ o(
|
|
7
|
+
m,
|
|
8
|
+
{
|
|
9
|
+
$margin: i,
|
|
10
|
+
"aria-label": t,
|
|
11
|
+
className: "action-btn",
|
|
12
|
+
disabled: n,
|
|
13
|
+
onClick: r,
|
|
14
|
+
ref: c,
|
|
15
|
+
type: "button",
|
|
16
|
+
...a,
|
|
17
|
+
children: /* @__PURE__ */ o(
|
|
18
|
+
f,
|
|
19
|
+
{
|
|
20
|
+
icon: t,
|
|
21
|
+
iconClass: "action",
|
|
22
|
+
iconSize: "xs",
|
|
23
|
+
iconType: "fa-light"
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
);
|
|
7
28
|
});
|
|
8
29
|
export {
|
|
9
|
-
|
|
30
|
+
d as ActionButton
|
|
10
31
|
};
|
|
@@ -1,13 +1,37 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { useButton as
|
|
4
|
-
import { C as
|
|
5
|
-
import { theme as
|
|
6
|
-
import { Icon as
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as m } from "react";
|
|
3
|
+
import { useButton as c } from "react-aria";
|
|
4
|
+
import { C as p } from "../../../../styles-D1eTIklB.mjs";
|
|
5
|
+
import { theme as f } from "../../../colors/index.js";
|
|
6
|
+
import { Icon as i } from "../../../icon/index.js";
|
|
7
|
+
const B = ({
|
|
8
|
+
disabled: o = !1,
|
|
9
|
+
icon: t,
|
|
10
|
+
props: a
|
|
11
|
+
}) => {
|
|
12
|
+
const r = m(null), { buttonProps: e } = c(a, r);
|
|
13
|
+
return /* @__PURE__ */ n(
|
|
14
|
+
p,
|
|
15
|
+
{
|
|
16
|
+
...e,
|
|
17
|
+
$disabled: o,
|
|
18
|
+
$focus: !!e["aria-expanded"],
|
|
19
|
+
$header: t === "calendar" || t === "calendar-clock",
|
|
20
|
+
disabled: o,
|
|
21
|
+
ref: r,
|
|
22
|
+
type: "button",
|
|
23
|
+
children: /* @__PURE__ */ n(
|
|
24
|
+
i,
|
|
25
|
+
{
|
|
26
|
+
icon: t,
|
|
27
|
+
iconColor: f.palette.gray[o ? 400 : 700],
|
|
28
|
+
iconSize: "xs",
|
|
29
|
+
iconType: "fa-light"
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
);
|
|
10
34
|
};
|
|
11
35
|
export {
|
|
12
|
-
|
|
36
|
+
B as Button
|
|
13
37
|
};
|
|
@@ -1,8 +1,62 @@
|
|
|
1
|
-
import { jsxs as u, jsx as
|
|
2
|
-
import { S as m } from "../../../../styles-
|
|
3
|
-
import { Button as
|
|
4
|
-
import { DateField as
|
|
5
|
-
const
|
|
1
|
+
import { jsxs as u, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { S as m } from "../../../../styles-BXFVwnWT.mjs";
|
|
3
|
+
import { Button as f } from "../calendar-button/index.js";
|
|
4
|
+
import { DateField as d } from "../date-time-field/index.js";
|
|
5
|
+
const j = ({
|
|
6
|
+
error: t,
|
|
7
|
+
buttonProps: n,
|
|
8
|
+
datePickerRef: s,
|
|
9
|
+
disabled: e = !1,
|
|
10
|
+
granularity: o = "day",
|
|
11
|
+
fieldProps: p,
|
|
12
|
+
groupProps: c,
|
|
13
|
+
inputRef: l,
|
|
14
|
+
name: a,
|
|
15
|
+
...i
|
|
16
|
+
}) => /* @__PURE__ */ u(
|
|
17
|
+
m,
|
|
18
|
+
{
|
|
19
|
+
...c,
|
|
20
|
+
className: `${e ? "disabled" : ""} ${t ? "error" : ""}`,
|
|
21
|
+
ref: s,
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ r(
|
|
24
|
+
d,
|
|
25
|
+
{
|
|
26
|
+
disabled: e,
|
|
27
|
+
error: t != null,
|
|
28
|
+
props: {
|
|
29
|
+
...p,
|
|
30
|
+
autoFocus: !1,
|
|
31
|
+
granularity: o,
|
|
32
|
+
shouldForceLeadingZeros: !0
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
/* @__PURE__ */ r(
|
|
37
|
+
f,
|
|
38
|
+
{
|
|
39
|
+
disabled: e,
|
|
40
|
+
icon: o === "minute" ? "calendar-clock" : "calendar",
|
|
41
|
+
props: n
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ r(
|
|
45
|
+
"input",
|
|
46
|
+
{
|
|
47
|
+
...i,
|
|
48
|
+
"aria-label": a,
|
|
49
|
+
className: "date-input",
|
|
50
|
+
disabled: e,
|
|
51
|
+
name: a,
|
|
52
|
+
ref: l,
|
|
53
|
+
type: "text",
|
|
54
|
+
value: ""
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
);
|
|
6
60
|
export {
|
|
7
|
-
|
|
61
|
+
j as DateSelector
|
|
8
62
|
};
|
|
@@ -1,32 +1,133 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { createCalendar as
|
|
3
|
-
import { isNil as
|
|
4
|
-
import { useRef as y, useCallback as
|
|
5
|
-
import { useDateField as
|
|
6
|
-
import { useDateFieldState as
|
|
1
|
+
import { jsxs as f, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { createCalendar as D } from "@internationalized/date";
|
|
3
|
+
import { isNil as u } from "lodash";
|
|
4
|
+
import { useRef as y, useCallback as P, useState as S } from "react";
|
|
5
|
+
import { useDateField as C, useTimeField as F, useDateSegment as T } from "react-aria";
|
|
6
|
+
import { useDateFieldState as b, useTimeFieldState as k } from "react-stately";
|
|
7
7
|
import { useTheme as M } from "styled-components";
|
|
8
|
-
import { I as
|
|
9
|
-
import { Icon as
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
8
|
+
import { I as A, T as v, a as h, b as g } from "../../../../styles-D1eTIklB.mjs";
|
|
9
|
+
import { Icon as I } from "../../../icon/index.js";
|
|
10
|
+
const x = ({
|
|
11
|
+
segment: i,
|
|
12
|
+
state: a
|
|
13
|
+
}) => {
|
|
14
|
+
const t = M(), n = y(null), e = { ...i, placeholder: {
|
|
15
|
+
day: "dd",
|
|
16
|
+
dayPeriod: "(AM/PM)",
|
|
17
|
+
era: "",
|
|
18
|
+
hour: "hh",
|
|
19
|
+
literal: "",
|
|
20
|
+
minute: "mm",
|
|
21
|
+
month: "mm",
|
|
22
|
+
second: "",
|
|
23
|
+
timeZoneName: "",
|
|
24
|
+
year: "yyyy"
|
|
25
|
+
}[i.type] }, { segmentProps: c } = T(e, a, n), m = t.palette.gray[e.isEditable ? 800 : 500];
|
|
26
|
+
return /* @__PURE__ */ r(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
...e.type !== "literal" && {
|
|
30
|
+
...c,
|
|
31
|
+
className: "segment-cell"
|
|
32
|
+
},
|
|
33
|
+
ref: n,
|
|
34
|
+
style: e.type === "literal" ? void 0 : {
|
|
35
|
+
color: e.isPlaceholder ? t.palette.gray[400] : m
|
|
36
|
+
},
|
|
37
|
+
children: e.isPlaceholder ? e.placeholder : e.text
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}, $ = ({
|
|
41
|
+
disabled: i,
|
|
42
|
+
error: a = !1,
|
|
43
|
+
props: t
|
|
44
|
+
}) => {
|
|
45
|
+
const n = M(), d = y(null), e = b({
|
|
46
|
+
...t,
|
|
47
|
+
createCalendar: D,
|
|
48
|
+
locale: "en-US"
|
|
49
|
+
}), { fieldProps: c } = C(t, e, d), m = P(
|
|
50
|
+
(l) => {
|
|
51
|
+
const s = document.getElementsByClassName("segment-cell"), o = l.currentTarget;
|
|
52
|
+
Object.values(s).some(
|
|
53
|
+
(p) => p.contains(o)
|
|
54
|
+
) || (l.preventDefault(), l.stopPropagation());
|
|
55
|
+
},
|
|
56
|
+
[]
|
|
57
|
+
);
|
|
58
|
+
return /* @__PURE__ */ f(A, { ...c, onClick: m, children: [
|
|
59
|
+
/* @__PURE__ */ r(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
className: "flex flex-row",
|
|
63
|
+
style: { color: n.palette.gray[u(e.value) ? 400 : 800] },
|
|
64
|
+
tabIndex: -1,
|
|
65
|
+
children: e.segments.map((l, s) => {
|
|
66
|
+
const o = `key_${s}`;
|
|
67
|
+
return /* @__PURE__ */ r(
|
|
68
|
+
x,
|
|
69
|
+
{
|
|
70
|
+
segment: { ...l, isEditable: !i },
|
|
71
|
+
state: e
|
|
72
|
+
},
|
|
73
|
+
o
|
|
74
|
+
);
|
|
75
|
+
})
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
a ? /* @__PURE__ */ r(
|
|
79
|
+
I,
|
|
80
|
+
{
|
|
81
|
+
icon: "exclamation-circle",
|
|
82
|
+
iconColor: n.palette.error[500],
|
|
83
|
+
iconSize: "xs"
|
|
84
|
+
}
|
|
85
|
+
) : void 0
|
|
86
|
+
] });
|
|
87
|
+
}, w = (i) => {
|
|
88
|
+
const a = y(null), t = k({
|
|
89
|
+
...i,
|
|
90
|
+
locale: "en-US",
|
|
91
|
+
shouldForceLeadingZeros: !0
|
|
92
|
+
}), { timeValue: n } = t, d = !u(n) && n.hour < 12 ? "AM" : "PM", [e, c] = S(
|
|
93
|
+
u(n) ? "AM" : d
|
|
94
|
+
), { fieldProps: m } = F(i, t, a), l = P(
|
|
95
|
+
(s) => {
|
|
96
|
+
const o = s.currentTarget.name;
|
|
97
|
+
o !== e && (u(n) || (o === "AM" ? t.setSegment("dayPeriod", 0) : o === "PM" && t.setSegment("dayPeriod", 12))), c(o);
|
|
98
|
+
},
|
|
99
|
+
[e, t, n]
|
|
100
|
+
);
|
|
101
|
+
return /* @__PURE__ */ f(v, { children: [
|
|
102
|
+
/* @__PURE__ */ r(h, { ...m, ref: a, children: t.segments.slice(0, -2).map((s, o) => {
|
|
103
|
+
const p = `key_${o}`;
|
|
104
|
+
return /* @__PURE__ */ r(x, { segment: s, state: t }, p);
|
|
105
|
+
}) }),
|
|
106
|
+
/* @__PURE__ */ f(h, { children: [
|
|
107
|
+
/* @__PURE__ */ r(
|
|
108
|
+
g,
|
|
109
|
+
{
|
|
110
|
+
id: e === "AM" ? "active" : "",
|
|
111
|
+
name: "AM",
|
|
112
|
+
onClick: l,
|
|
113
|
+
type: "button",
|
|
114
|
+
children: "AM"
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
/* @__PURE__ */ r(
|
|
118
|
+
g,
|
|
119
|
+
{
|
|
120
|
+
id: e === "PM" ? "active" : "",
|
|
121
|
+
name: "PM",
|
|
122
|
+
onClick: l,
|
|
123
|
+
type: "button",
|
|
124
|
+
children: "PM"
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
] })
|
|
128
|
+
] });
|
|
28
129
|
};
|
|
29
130
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
131
|
+
$ as DateField,
|
|
132
|
+
w as TimeField
|
|
32
133
|
};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { useDialog as
|
|
4
|
-
import { D as
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { useRef as m } from "react";
|
|
3
|
+
import { useDialog as s } from "react-aria";
|
|
4
|
+
import { D as a } from "../../../../styles-D1eTIklB.mjs";
|
|
5
|
+
const g = ({
|
|
6
|
+
children: r,
|
|
7
|
+
...i
|
|
8
|
+
}) => {
|
|
9
|
+
const o = m(null), { dialogProps: t } = s(i, o);
|
|
10
|
+
return /* @__PURE__ */ e(a, { ...t, ref: o, children: r });
|
|
8
11
|
};
|
|
9
12
|
export {
|
|
10
|
-
|
|
13
|
+
g as Dialog
|
|
11
14
|
};
|