@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,14 +1,66 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useTheme as
|
|
3
|
-
import { Container as
|
|
1
|
+
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme as c } from "styled-components";
|
|
3
|
+
import { Container as t } from "../../container/index.js";
|
|
4
4
|
import { Icon as d } from "../../icon/index.js";
|
|
5
5
|
import { PremiumFeature as g } from "../../premium-feature/index.js";
|
|
6
6
|
import "../../typography/heading/index.js";
|
|
7
7
|
import "../../typography/span/index.js";
|
|
8
8
|
import { Text as o } from "../../typography/text/index.js";
|
|
9
|
-
const j = ({
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const j = ({
|
|
10
|
+
customBadge: l = void 0,
|
|
11
|
+
description: n,
|
|
12
|
+
icon: p,
|
|
13
|
+
onClick: a,
|
|
14
|
+
requiresUpgrade: m = !1,
|
|
15
|
+
title: s
|
|
16
|
+
}) => {
|
|
17
|
+
const e = c();
|
|
18
|
+
return /* @__PURE__ */ i(
|
|
19
|
+
t,
|
|
20
|
+
{
|
|
21
|
+
bgColor: e.palette.white,
|
|
22
|
+
bgColorHover: e.palette.gray[100],
|
|
23
|
+
cursor: "pointer",
|
|
24
|
+
display: "flex",
|
|
25
|
+
gap: 0.5,
|
|
26
|
+
onClick: a,
|
|
27
|
+
px: 1.25,
|
|
28
|
+
py: 1,
|
|
29
|
+
width: "100%",
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ r(
|
|
32
|
+
t,
|
|
33
|
+
{
|
|
34
|
+
alignItems: "center",
|
|
35
|
+
bgColor: e.palette.gray[300],
|
|
36
|
+
borderRadius: e.spacing[0.25],
|
|
37
|
+
display: "flex",
|
|
38
|
+
height: "24px",
|
|
39
|
+
justify: "center",
|
|
40
|
+
width: "24px",
|
|
41
|
+
children: /* @__PURE__ */ r(
|
|
42
|
+
d,
|
|
43
|
+
{
|
|
44
|
+
icon: p,
|
|
45
|
+
iconColor: e.palette.gray[800],
|
|
46
|
+
iconSize: "xxs",
|
|
47
|
+
ml: 0.5,
|
|
48
|
+
mr: 0.5
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ i(t, { children: [
|
|
54
|
+
/* @__PURE__ */ i(t, { alignItems: "center", display: "inline-flex", gap: 0.5, children: [
|
|
55
|
+
/* @__PURE__ */ r(o, { color: e.palette.gray[800], size: "sm", children: s }),
|
|
56
|
+
m ? /* @__PURE__ */ r(g, { text: "Upgrade" }) : void 0,
|
|
57
|
+
l
|
|
58
|
+
] }),
|
|
59
|
+
/* @__PURE__ */ r(o, { color: e.palette.gray[400], size: "xs", children: n })
|
|
60
|
+
] })
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
);
|
|
12
64
|
};
|
|
13
65
|
export {
|
|
14
66
|
j as MenuItem
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { useNumberFormatter as
|
|
4
|
-
import { useSliderState as
|
|
5
|
-
import { styled as o, useTheme as
|
|
6
|
-
import { Thumb as
|
|
7
|
-
import { Container as
|
|
1
|
+
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as $ } from "react";
|
|
3
|
+
import { useNumberFormatter as u, useSlider as y } from "react-aria";
|
|
4
|
+
import { useSliderState as m } from "react-stately";
|
|
5
|
+
import { styled as o, useTheme as f } from "styled-components";
|
|
6
|
+
import { Thumb as b } from "./thumb/index.js";
|
|
7
|
+
import { Container as x } from "../container/index.js";
|
|
8
8
|
import "../typography/heading/index.js";
|
|
9
9
|
import "../typography/span/index.js";
|
|
10
|
-
import { Text as
|
|
11
|
-
const
|
|
12
|
-
|
|
10
|
+
import { Text as h } from "../typography/text/index.js";
|
|
11
|
+
const w = (r, t) => t >= 50 ? `
|
|
12
|
+
${r.palette.gray[200]} 50%,
|
|
13
|
+
${r.palette.primary[500]} 50.05%,
|
|
14
|
+
${r.palette.primary[500]} ${t}%,
|
|
15
|
+
${r.palette.gray[200]} ${t}%
|
|
16
|
+
` : `
|
|
17
|
+
${r.palette.gray[200]} ${t}%,
|
|
18
|
+
${r.palette.primary[500]} ${t}%,
|
|
19
|
+
${r.palette.primary[500]} 50%,
|
|
20
|
+
${r.palette.gray[200]} 50.05%,
|
|
21
|
+
${r.palette.gray[200]} 100%
|
|
22
|
+
`, k = o.div`
|
|
23
|
+
${({ theme: r, $min: t, $value: i }) => `
|
|
13
24
|
align-items: center;
|
|
14
25
|
align-self: stretch;
|
|
15
26
|
display: flex;
|
|
16
27
|
flex-direction: column;
|
|
17
28
|
justify-content: end;
|
|
18
|
-
gap: ${
|
|
29
|
+
gap: ${r.spacing[0.75]};
|
|
19
30
|
width: 304px;
|
|
20
31
|
|
|
21
32
|
.track {
|
|
22
33
|
background: linear-gradient(
|
|
23
34
|
to right,
|
|
24
|
-
${
|
|
25
|
-
${
|
|
26
|
-
${
|
|
27
|
-
` : (
|
|
28
|
-
${a.palette.gray[200]} 50%,
|
|
29
|
-
${a.palette.primary[500]} 50.05%,
|
|
30
|
-
${a.palette.primary[500]} ${t}%,
|
|
31
|
-
${a.palette.gray[200]} ${t}%
|
|
32
|
-
` : `
|
|
33
|
-
${a.palette.gray[200]} ${t}%,
|
|
34
|
-
${a.palette.primary[500]} ${t}%,
|
|
35
|
-
${a.palette.primary[500]} 50%,
|
|
36
|
-
${a.palette.gray[200]} 50.05%,
|
|
37
|
-
${a.palette.gray[200]} 100%
|
|
38
|
-
`)(e, r)}
|
|
35
|
+
${t >= 0 ? `
|
|
36
|
+
${r.palette.primary[500]} ${i}%,
|
|
37
|
+
${r.palette.gray[200]} ${i}%
|
|
38
|
+
` : w(r, i)}
|
|
39
39
|
);
|
|
40
|
-
border-radius: ${
|
|
41
|
-
height: ${
|
|
40
|
+
border-radius: ${r.spacing[0.125]};
|
|
41
|
+
height: ${r.spacing[0.25]};
|
|
42
42
|
width: 100%;
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -47,8 +47,8 @@ const v = o.div`
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.thumb {
|
|
50
|
-
background: ${
|
|
51
|
-
border-radius: ${
|
|
50
|
+
background: ${r.palette.white};
|
|
51
|
+
border-radius: ${r.spacing[1.25]};
|
|
52
52
|
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.30);
|
|
53
53
|
top: 50%;
|
|
54
54
|
height: 20px;
|
|
@@ -56,38 +56,69 @@ const v = o.div`
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.thumb.dragging {
|
|
59
|
-
border: 1px solid ${
|
|
59
|
+
border: 1px solid ${r.palette.primary[500]};
|
|
60
60
|
}
|
|
61
61
|
`}
|
|
62
|
-
`,
|
|
63
|
-
${({ theme:
|
|
62
|
+
`, S = o.div`
|
|
63
|
+
${({ theme: r }) => `
|
|
64
64
|
align-items: center;
|
|
65
65
|
display: flex;
|
|
66
66
|
justify-content: space-between;
|
|
67
|
-
height: ${
|
|
67
|
+
height: ${r.spacing[0.625]};
|
|
68
68
|
width: 100%;
|
|
69
69
|
|
|
70
70
|
p {
|
|
71
|
-
color: ${
|
|
72
|
-
font-family: ${
|
|
73
|
-
font-size: ${
|
|
71
|
+
color: ${r.palette.gray[400]};
|
|
72
|
+
font-family: ${r.typography.type.primary};
|
|
73
|
+
font-size: ${r.spacing[0.5]};
|
|
74
74
|
}
|
|
75
75
|
`}
|
|
76
|
-
`,
|
|
77
|
-
${({ theme:
|
|
76
|
+
`, V = o.output`
|
|
77
|
+
${({ theme: r }) => `
|
|
78
78
|
align-items: flex-end;
|
|
79
|
-
border-radius: ${
|
|
80
|
-
border: 1px solid ${
|
|
81
|
-
background: ${
|
|
79
|
+
border-radius: ${r.spacing[0.5]};
|
|
80
|
+
border: 1px solid ${r.palette.gray[300]};
|
|
81
|
+
background: ${r.palette.white};
|
|
82
82
|
display: flex;
|
|
83
|
-
gap: ${
|
|
84
|
-
padding: ${
|
|
83
|
+
gap: ${r.spacing[0.625]};
|
|
84
|
+
padding: ${r.spacing[0.625]} ${r.spacing[0.75]};
|
|
85
85
|
width: 59px;
|
|
86
86
|
`}
|
|
87
|
-
`,
|
|
88
|
-
const
|
|
89
|
-
|
|
87
|
+
`, T = (r, t, i) => Math.round((i - r) / (t - r) * 100), D = (r) => {
|
|
88
|
+
const t = f(), i = $(null), { minValue: p = 0, maxValue: s = 100 } = r, l = u(), e = m({ ...r, numberFormatter: l }), d = T(p, s, e.getThumbValue(0)), { groupProps: c, trackProps: g } = y(
|
|
89
|
+
{ ...r, "aria-label": "slider" },
|
|
90
|
+
e,
|
|
91
|
+
i
|
|
92
|
+
);
|
|
93
|
+
return /* @__PURE__ */ n(x, { alignItems: "center", display: "inline-flex", gap: 1.25, children: [
|
|
94
|
+
/* @__PURE__ */ n(
|
|
95
|
+
k,
|
|
96
|
+
{
|
|
97
|
+
...c,
|
|
98
|
+
$min: p ?? 0,
|
|
99
|
+
$value: d,
|
|
100
|
+
className: "slider",
|
|
101
|
+
children: [
|
|
102
|
+
/* @__PURE__ */ a(
|
|
103
|
+
"div",
|
|
104
|
+
{
|
|
105
|
+
...g,
|
|
106
|
+
className: `track ${e.isDisabled ? "disabled" : ""}`,
|
|
107
|
+
ref: i,
|
|
108
|
+
children: /* @__PURE__ */ a(b, { index: 0, state: e, trackRef: i })
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
/* @__PURE__ */ n(S, { children: [
|
|
112
|
+
/* @__PURE__ */ a("p", { children: `${l.format(p)} (Low)` }),
|
|
113
|
+
p < 0 && /* @__PURE__ */ a("p", { children: "0" }),
|
|
114
|
+
/* @__PURE__ */ a("p", { children: `${l.format(s)} (High)` })
|
|
115
|
+
] })
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
/* @__PURE__ */ a(V, { children: /* @__PURE__ */ a(h, { color: t.palette.gray[800], size: "sm", textAlign: "right", children: e.getThumbValueLabel(0) }) })
|
|
120
|
+
] });
|
|
90
121
|
};
|
|
91
122
|
export {
|
|
92
|
-
|
|
123
|
+
D as Slider
|
|
93
124
|
};
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { useSliderThumb as
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { useRef as m } from "react";
|
|
3
|
+
import { useSliderThumb as p, VisuallyHidden as l } from "react-aria";
|
|
4
|
+
const g = ({
|
|
5
|
+
state: n,
|
|
6
|
+
trackRef: t,
|
|
7
|
+
index: e
|
|
8
|
+
}) => {
|
|
9
|
+
const i = m(null), { thumbProps: o, inputProps: s, isDragging: u } = p(
|
|
10
|
+
{ index: e, trackRef: t, inputRef: i },
|
|
11
|
+
n
|
|
12
|
+
);
|
|
13
|
+
return /* @__PURE__ */ r("div", { ...o, className: `thumb ${u ? "dragging" : ""}`, children: /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r("input", { ref: i, ...s }) }) });
|
|
7
14
|
};
|
|
8
15
|
export {
|
|
9
|
-
|
|
16
|
+
g as Thumb
|
|
10
17
|
};
|
|
@@ -1,29 +1,33 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { styled as
|
|
4
|
-
import { v as w } from "../../utils-
|
|
5
|
-
import "../../styles-
|
|
1
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as k, useCallback as S } from "react";
|
|
3
|
+
import { styled as e } from "styled-components";
|
|
4
|
+
import { v as w } from "../../utils-V0EumEPM.mjs";
|
|
5
|
+
import "../../styles-CplEd2kw.mjs";
|
|
6
6
|
import { Button as d } from "../button/index.js";
|
|
7
7
|
import { Container as g } from "../container/index.js";
|
|
8
8
|
import { Icon as C } from "../icon/index.js";
|
|
9
9
|
import { Heading as z } from "../typography/heading/index.js";
|
|
10
10
|
import "../typography/span/index.js";
|
|
11
11
|
import "../typography/text/index.js";
|
|
12
|
-
const { getVariant:
|
|
12
|
+
const { getVariant: B } = w(
|
|
13
|
+
(t) => ({
|
|
14
|
+
completed: `
|
|
13
15
|
background-color: ${t.palette.primary[500]};
|
|
14
16
|
color: ${t.palette.white};
|
|
15
17
|
|
|
16
18
|
&::after {
|
|
17
19
|
background-color: ${t.palette.primary[500]};
|
|
18
20
|
}
|
|
19
|
-
`,
|
|
21
|
+
`,
|
|
22
|
+
current: `
|
|
20
23
|
background-color: ${t.palette.primary[500]};
|
|
21
24
|
color: ${t.palette.white};
|
|
22
25
|
|
|
23
26
|
&::after {
|
|
24
27
|
background-color: ${t.palette.gray[200]};
|
|
25
28
|
}
|
|
26
|
-
`,
|
|
29
|
+
`,
|
|
30
|
+
disabled: `
|
|
27
31
|
background-color: ${t.palette.gray[200]};
|
|
28
32
|
outline: 1px solid ${t.palette.gray[400]};
|
|
29
33
|
outline-offset: -1px;
|
|
@@ -32,17 +36,19 @@ const { getVariant: S } = w((t) => ({ completed: `
|
|
|
32
36
|
&::after {
|
|
33
37
|
background-color: ${t.palette.gray[200]};
|
|
34
38
|
}
|
|
35
|
-
`
|
|
39
|
+
`
|
|
40
|
+
})
|
|
41
|
+
), N = e.div`
|
|
36
42
|
${({ theme: t }) => `
|
|
37
43
|
align-items: stretch;
|
|
38
44
|
background-color: ${t.palette.white};
|
|
39
45
|
display: flex;
|
|
40
46
|
flex-direction: column;
|
|
41
47
|
height: 100%;
|
|
42
|
-
padding: ${t.spacing[1]} ${t.spacing[1]};
|
|
48
|
+
padding: ${`${t.spacing[1]} ${t.spacing[1]}`};
|
|
43
49
|
scroll-behavior: unset;
|
|
44
50
|
`}
|
|
45
|
-
`,
|
|
51
|
+
`, j = e.div`
|
|
46
52
|
display: flex;
|
|
47
53
|
flex-direction: row;
|
|
48
54
|
margin-bottom: ${({ theme: t }) => t.spacing[2]};
|
|
@@ -50,7 +56,7 @@ const { getVariant: S } = w((t) => ({ completed: `
|
|
|
50
56
|
&:last-child > div:first-child > span::after {
|
|
51
57
|
display: none;
|
|
52
58
|
}
|
|
53
|
-
`,
|
|
59
|
+
`, A = e.div`
|
|
54
60
|
${({ theme: t }) => `
|
|
55
61
|
display: inline-flex;
|
|
56
62
|
font-family: ${t.typography.type.primary};
|
|
@@ -62,7 +68,7 @@ const { getVariant: S } = w((t) => ({ completed: `
|
|
|
62
68
|
margin-right: ${t.spacing[0.5]};
|
|
63
69
|
}
|
|
64
70
|
`}
|
|
65
|
-
`,
|
|
71
|
+
`, D = e.span`
|
|
66
72
|
${({ theme: t, $variant: l }) => `
|
|
67
73
|
border-radius: 6px;
|
|
68
74
|
display: inline-block;
|
|
@@ -71,7 +77,7 @@ const { getVariant: S } = w((t) => ({ completed: `
|
|
|
71
77
|
font-weight: ${t.typography.weight.bold};
|
|
72
78
|
font-family: ${t.typography.type.primary};
|
|
73
79
|
line-height: ${t.spacing[1]};
|
|
74
|
-
padding: ${t.spacing[0.5]} ${t.spacing[0.5]};
|
|
80
|
+
padding: ${`${t.spacing[0.5]} ${t.spacing[0.5]}`};
|
|
75
81
|
height: ${t.spacing[2]};
|
|
76
82
|
width: ${t.spacing[2]};
|
|
77
83
|
|
|
@@ -85,17 +91,69 @@ const { getVariant: S } = w((t) => ({ completed: `
|
|
|
85
91
|
height: calc(100% - ${t.spacing[1]});
|
|
86
92
|
}
|
|
87
93
|
|
|
88
|
-
${
|
|
94
|
+
${B(t, l)}
|
|
89
95
|
`}
|
|
90
|
-
`,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
`, J = ({
|
|
97
|
+
button: { disabled: t = !1, text: l, type: f = "button", onClick: u },
|
|
98
|
+
steps: y
|
|
99
|
+
}) => {
|
|
100
|
+
const [n, b] = k(1), $ = S(
|
|
101
|
+
(r, o) => () => {
|
|
102
|
+
b((p) => p + r), o == null || o();
|
|
103
|
+
},
|
|
104
|
+
[]
|
|
105
|
+
);
|
|
106
|
+
return /* @__PURE__ */ i(N, { children: y.map((r, o) => {
|
|
107
|
+
const { content: p, title: x, nextAction: h, previousAction: m } = r, c = o + 1, v = c === n ? "current" : "disabled", s = c < n ? "completed" : v;
|
|
108
|
+
return /* @__PURE__ */ a(j, { children: [
|
|
109
|
+
/* @__PURE__ */ i(g, { maxWidth: "40px", position: "relative", children: /* @__PURE__ */ i(D, { $variant: s, children: s === "completed" ? /* @__PURE__ */ i(C, { icon: "check", iconSize: "xs", iconType: "fa-solid" }) : c }) }),
|
|
110
|
+
/* @__PURE__ */ a(g, { ml: 1.5, width: "100%", children: [
|
|
111
|
+
/* @__PURE__ */ i(
|
|
112
|
+
z,
|
|
113
|
+
{
|
|
114
|
+
fontWeight: "bold",
|
|
115
|
+
lineSpacing: 1.25,
|
|
116
|
+
mb: 1.5,
|
|
117
|
+
size: "xs",
|
|
118
|
+
children: x
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
s === "current" && /* @__PURE__ */ a(g, { children: [
|
|
122
|
+
p,
|
|
123
|
+
/* @__PURE__ */ a(A, { children: [
|
|
124
|
+
n > 1 && /* @__PURE__ */ i(
|
|
125
|
+
d,
|
|
126
|
+
{
|
|
127
|
+
disabled: r.isDisabledPrevious ?? !1,
|
|
128
|
+
onClick: $(-1, m),
|
|
129
|
+
variant: "tertiary",
|
|
130
|
+
children: "Previous"
|
|
131
|
+
}
|
|
132
|
+
),
|
|
133
|
+
n < y.length ? /* @__PURE__ */ i(
|
|
134
|
+
d,
|
|
135
|
+
{
|
|
136
|
+
disabled: r.isDisabledNext ?? !1,
|
|
137
|
+
onClick: $(1, h),
|
|
138
|
+
variant: "primary",
|
|
139
|
+
children: "Next step"
|
|
140
|
+
}
|
|
141
|
+
) : /* @__PURE__ */ i(
|
|
142
|
+
d,
|
|
143
|
+
{
|
|
144
|
+
disabled: t,
|
|
145
|
+
onClick: u,
|
|
146
|
+
type: f,
|
|
147
|
+
variant: "primary",
|
|
148
|
+
children: l
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
] })
|
|
152
|
+
] })
|
|
153
|
+
] })
|
|
154
|
+
] }, r.title);
|
|
97
155
|
}) });
|
|
98
156
|
};
|
|
99
157
|
export {
|
|
100
|
-
|
|
158
|
+
J as StepLapse
|
|
101
159
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { styled as
|
|
3
|
-
import { Container as
|
|
4
|
-
import { Icon as
|
|
1
|
+
import { jsxs as c, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { styled as u, useTheme as g } from "styled-components";
|
|
3
|
+
import { Container as b } from "../container/index.js";
|
|
4
|
+
import { Icon as y } from "../icon/index.js";
|
|
5
5
|
import "../typography/heading/index.js";
|
|
6
6
|
import "../typography/span/index.js";
|
|
7
|
-
import { Text as
|
|
8
|
-
const
|
|
9
|
-
${({ theme:
|
|
7
|
+
import { Text as f } from "../typography/text/index.js";
|
|
8
|
+
const x = u.button`
|
|
9
|
+
${({ theme: o }) => `
|
|
10
10
|
align-items: center;
|
|
11
|
-
background-color: ${
|
|
12
|
-
border: 1px solid ${
|
|
13
|
-
border-radius: ${
|
|
14
|
-
color: ${
|
|
11
|
+
background-color: ${o.palette.white};
|
|
12
|
+
border: 1px solid ${o.palette.gray[100]};
|
|
13
|
+
border-radius: ${o.spacing[0.25]};
|
|
14
|
+
color: ${o.palette.gray[800]};
|
|
15
15
|
cursor: pointer;
|
|
16
16
|
display: flex;
|
|
17
|
-
font-size: ${
|
|
18
|
-
gap: ${
|
|
17
|
+
font-size: ${o.typography.text.sm};
|
|
18
|
+
gap: ${o.spacing[0.25]};
|
|
19
19
|
height: 21px;
|
|
20
20
|
width: 21px;
|
|
21
21
|
justify-content: center;
|
|
@@ -28,29 +28,70 @@ const y = m.button`
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
&.success {
|
|
31
|
-
border-color: ${
|
|
32
|
-
color: ${
|
|
31
|
+
border-color: ${o.palette.success[500]};
|
|
32
|
+
color: ${o.palette.success[500]};
|
|
33
33
|
|
|
34
34
|
&:hover {
|
|
35
|
-
background-color: ${
|
|
35
|
+
background-color: ${o.palette.success[200]};
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
&:disabled {
|
|
40
40
|
cursor: not-allowed;
|
|
41
|
-
background: ${
|
|
42
|
-
border-color: ${
|
|
43
|
-
color: ${
|
|
41
|
+
background: ${o.palette.gray[200]};
|
|
42
|
+
border-color: ${o.palette.gray[200]};
|
|
43
|
+
color: ${o.palette.gray[300]};
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
&:hover:not(.success) {
|
|
47
|
-
background-color: ${
|
|
47
|
+
background-color: ${o.palette.gray[100]};
|
|
48
48
|
}
|
|
49
49
|
`}
|
|
50
|
-
`,
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
`, $ = {
|
|
51
|
+
add: { icon: "plus" },
|
|
52
|
+
approve: { icon: "check" },
|
|
53
|
+
disabled: { icon: "ban" },
|
|
54
|
+
reject: { icon: "xmark" },
|
|
55
|
+
submit: { icon: "arrow-right" },
|
|
56
|
+
success: { icon: "check" }
|
|
57
|
+
}, v = ({
|
|
58
|
+
disabled: o = !1,
|
|
59
|
+
icon: a,
|
|
60
|
+
id: i,
|
|
61
|
+
label: e,
|
|
62
|
+
name: r,
|
|
63
|
+
onClick: n,
|
|
64
|
+
type: l = "button",
|
|
65
|
+
variant: t
|
|
66
|
+
}) => {
|
|
67
|
+
const p = g(), d = /* @__PURE__ */ c(
|
|
68
|
+
x,
|
|
69
|
+
{
|
|
70
|
+
"aria-label": r ?? void 0,
|
|
71
|
+
className: t,
|
|
72
|
+
disabled: o,
|
|
73
|
+
id: i,
|
|
74
|
+
onClick: n,
|
|
75
|
+
type: l,
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ s(
|
|
78
|
+
y,
|
|
79
|
+
{
|
|
80
|
+
clickable: !1,
|
|
81
|
+
icon: a ?? $[t].icon,
|
|
82
|
+
iconSize: r === void 0 ? "xxs" : "xs",
|
|
83
|
+
iconType: "fa-light"
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
r ?? void 0
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
return /* @__PURE__ */ c(b, { alignItems: "center", display: "flex", children: [
|
|
91
|
+
d,
|
|
92
|
+
e && /* @__PURE__ */ s(f, { color: p.palette.gray[800], ml: 0.5, size: "sm", children: e })
|
|
93
|
+
] });
|
|
53
94
|
};
|
|
54
95
|
export {
|
|
55
|
-
|
|
96
|
+
v as TableButton
|
|
56
97
|
};
|
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { S as
|
|
3
|
-
import { Heading as
|
|
2
|
+
import { S as s, a } from "../../../styles-ePGii_9g.mjs";
|
|
3
|
+
import { Heading as d } from "../../typography/heading/index.js";
|
|
4
4
|
import "../../typography/span/index.js";
|
|
5
5
|
import "../../typography/text/index.js";
|
|
6
|
-
const
|
|
6
|
+
const h = ({ items: t }) => /* @__PURE__ */ i(s, { children: t.map(
|
|
7
|
+
({ isActive: r, label: e, onClick: o }, m) => /* @__PURE__ */ i(
|
|
8
|
+
a,
|
|
9
|
+
{
|
|
10
|
+
className: r ? "active" : "",
|
|
11
|
+
onClick: o,
|
|
12
|
+
type: "button",
|
|
13
|
+
children: /* @__PURE__ */ i(
|
|
14
|
+
d,
|
|
15
|
+
{
|
|
16
|
+
color: "inherit",
|
|
17
|
+
fontWeight: "semibold",
|
|
18
|
+
size: "sm",
|
|
19
|
+
sizeSm: "xs",
|
|
20
|
+
children: e
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
},
|
|
24
|
+
`${e}-${m}`
|
|
25
|
+
)
|
|
26
|
+
) });
|
|
7
27
|
export {
|
|
8
|
-
|
|
28
|
+
h as FixedTabs
|
|
9
29
|
};
|
|
@@ -1,14 +1,57 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useTheme as
|
|
3
|
-
import { FixedTabs as
|
|
4
|
-
import { Tab as
|
|
5
|
-
import { Container as
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme as s } from "styled-components";
|
|
3
|
+
import { FixedTabs as w } from "./fixed-tabs/index.js";
|
|
4
|
+
import { Tab as u } from "./tab/index.js";
|
|
5
|
+
import { Container as g } from "../container/index.js";
|
|
6
|
+
const b = ({
|
|
7
|
+
items: i,
|
|
8
|
+
borders: r = !0,
|
|
9
|
+
box: e = !1
|
|
10
|
+
}) => {
|
|
11
|
+
const n = s();
|
|
12
|
+
return /* @__PURE__ */ d(
|
|
13
|
+
g,
|
|
14
|
+
{
|
|
15
|
+
bgColor: n.palette.white,
|
|
16
|
+
border: e ? "1px solid" : void 0,
|
|
17
|
+
borderBottom: r ? `1px solid ${n.palette.gray[300]}` : void 0,
|
|
18
|
+
borderColor: e ? n.palette.gray[200] : void 0,
|
|
19
|
+
borderRadius: e ? n.spacing[0.25] : void 0,
|
|
20
|
+
display: "inline-flex",
|
|
21
|
+
gap: 0.25,
|
|
22
|
+
padding: e ? [0, 0, 0, 0] : void 0,
|
|
23
|
+
pl: r ? 1.25 : void 0,
|
|
24
|
+
pr: r ? 1.25 : void 0,
|
|
25
|
+
role: "tablist",
|
|
26
|
+
width: e ? "max-content" : "100%",
|
|
27
|
+
children: i.map(
|
|
28
|
+
({
|
|
29
|
+
id: t,
|
|
30
|
+
isActive: o,
|
|
31
|
+
link: a,
|
|
32
|
+
label: p,
|
|
33
|
+
notificationSign: l,
|
|
34
|
+
onClick: f,
|
|
35
|
+
tooltip: m
|
|
36
|
+
}) => /* @__PURE__ */ d(
|
|
37
|
+
u,
|
|
38
|
+
{
|
|
39
|
+
id: t,
|
|
40
|
+
isActive: o,
|
|
41
|
+
label: p,
|
|
42
|
+
link: a,
|
|
43
|
+
notificationSign: l,
|
|
44
|
+
onClick: f,
|
|
45
|
+
tooltip: m
|
|
46
|
+
},
|
|
47
|
+
t
|
|
48
|
+
)
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
);
|
|
9
52
|
};
|
|
10
53
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
54
|
+
w as FixedTabs,
|
|
55
|
+
u as Tab,
|
|
56
|
+
b as Tabs
|
|
14
57
|
};
|