@fluidattacks/design 3.1.11 → 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/_commonjsHelpers-C6fGbg64.mjs +6 -0
- package/dist/components/@core/index.js +18 -1
- package/dist/components/accordion/accordion-content/index.js +22 -1
- package/dist/components/accordion/index.js +78 -1
- package/dist/components/alert/index.js +162 -4
- package/dist/components/button/index.js +69 -1
- package/dist/components/card/card-header/index.js +83 -1
- package/dist/components/card/card-with-image/index.js +93 -1
- package/dist/components/card/card-with-input/index.js +106 -3
- package/dist/components/card/card-with-selector/index.js +71 -1
- package/dist/components/card/card-with-switch/index.js +50 -1
- package/dist/components/card/index.js +12 -1
- package/dist/components/carousel/index.js +62 -10
- package/dist/components/checkbox/index.js +118 -3
- package/dist/components/cloud-image/index.js +8 -1
- package/dist/components/code-snippet/index.js +72 -1
- package/dist/components/code-snippet/location-code/index.js +171 -1
- package/dist/components/colors/index.js +224 -1
- package/dist/components/confirm-dialog/index.js +46 -1
- package/dist/components/container/index.js +51 -3
- package/dist/components/content-card/category-tag/index.js +42 -1
- package/dist/components/content-card/event-date/index.js +61 -1
- package/dist/components/content-card/index.js +168 -3
- package/dist/components/content-card-carousel/index.js +95 -1
- package/dist/components/content-card-carousel/scroll-buttons/index.js +9 -1
- package/dist/components/divider/index.js +25 -1
- package/dist/components/empty-state/empty-button/index.js +6 -1
- package/dist/components/empty-state/index.js +58 -8
- package/dist/components/file-preview/index.js +31 -3
- package/dist/components/form/index.js +63 -3
- package/dist/components/grid-container/index.js +46 -5
- package/dist/components/group-selector/index.js +135 -1
- package/dist/components/group-selector/option-container/index.js +12 -1
- package/dist/components/icon/index.js +102 -4
- package/dist/components/icon-button/index.js +76 -3
- package/dist/components/indicator-card/index.js +74 -1
- package/dist/components/info-sidebar/index.js +116 -1
- package/dist/components/inputs/fields/combobox/index.js +146 -1
- package/dist/components/inputs/fields/combobox/option/index.js +8 -1
- package/dist/components/inputs/fields/date/calendar/cell/index.js +27 -1
- package/dist/components/inputs/fields/date/calendar/grid/index.js +26 -1
- package/dist/components/inputs/fields/date/calendar/header/index.js +38 -1
- package/dist/components/inputs/fields/date/calendar/index.js +30 -1
- package/dist/components/inputs/fields/date/index.js +68 -1
- package/dist/components/inputs/fields/date-range/calendar/index.js +35 -1
- package/dist/components/inputs/fields/date-range/index.js +108 -3
- package/dist/components/inputs/fields/date-time/calendar/index.js +60 -5
- package/dist/components/inputs/fields/date-time/index.js +69 -1
- package/dist/components/inputs/fields/editable/index.js +28 -1
- package/dist/components/inputs/fields/input/index.js +77 -1
- package/dist/components/inputs/fields/input-file/index.js +117 -4
- package/dist/components/inputs/fields/input-tags/index.js +63 -2
- package/dist/components/inputs/fields/number/index.js +57 -1
- package/dist/components/inputs/fields/number-range/index.js +49 -1
- package/dist/components/inputs/fields/phone/index.js +574 -11
- package/dist/components/inputs/fields/text-area/index.js +81 -1
- package/dist/components/inputs/index.js +28 -1
- package/dist/components/inputs/label/index.js +38 -1
- package/dist/components/inputs/outline-container/index.js +104 -1
- package/dist/components/inputs/utils/action-button/index.js +31 -1
- package/dist/components/inputs/utils/calendar-button/index.js +37 -1
- package/dist/components/inputs/utils/date-selector/index.js +62 -1
- package/dist/components/inputs/utils/date-time-field/index.js +133 -1
- package/dist/components/inputs/utils/dialog/index.js +14 -1
- package/dist/components/inputs/utils/number-field/index.js +86 -1
- package/dist/components/inputs/utils/popover/index.js +44 -1
- package/dist/components/interactive-card/icon/index.js +7 -1
- package/dist/components/interactive-card/index.js +118 -1
- package/dist/components/language-selector/index.js +37 -1
- package/dist/components/language-selector/item-list/index.js +8 -1
- package/dist/components/link/index.js +106 -7
- package/dist/components/list-item/index.js +67 -1
- package/dist/components/little-flag/index.js +32 -3
- package/dist/components/loading/index.js +55 -14
- package/dist/components/logo/index.js +13 -1
- package/dist/components/logo-carousel/index.js +45 -4
- package/dist/components/lottie/index.js +20 -3
- package/dist/components/menu/index.js +67 -1
- package/dist/components/message-banner/index.js +87 -4
- package/dist/components/modal/index.js +65 -1
- package/dist/components/modal/modal-confirm/index.js +51 -1
- package/dist/components/modal/modal-footer/index.js +25 -1
- package/dist/components/modal/modal-header/index.js +51 -1
- package/dist/components/notification/index.js +113 -5
- package/dist/components/notification-sign/index.js +43 -6
- package/dist/components/number-input/index.js +62 -7
- package/dist/components/oauth-selector/index.js +100 -1
- package/dist/components/oauth-selector/option-container/index.js +76 -1
- package/dist/components/plan-card/index.js +155 -5
- package/dist/components/plan-card/recommended-tag/index.js +31 -1
- package/dist/components/pop-up/description/index.js +51 -1
- package/dist/components/pop-up/index.js +152 -1
- package/dist/components/premium-feature/index.js +85 -3
- package/dist/components/priority-score/index.js +29 -1
- package/dist/components/progress/index.js +36 -3
- package/dist/components/progress-bar/index.js +153 -5
- package/dist/components/radio-button/index.js +125 -3
- package/dist/components/scroll-button/index.js +38 -2
- package/dist/components/search/index.js +105 -7
- package/dist/components/search-bar/index.js +219 -1
- package/dist/components/search-bar/item-searching/index.js +10 -1
- package/dist/components/severity-badge/index.js +74 -1
- package/dist/components/severity-overview/badge/index.js +69 -1
- package/dist/components/severity-overview/index.js +17 -1
- package/dist/components/show-on-hover/index.js +31 -3
- package/dist/components/slide-out-menu/index.js +3456 -3
- package/dist/components/slide-out-menu/menu-item/index.js +67 -1
- package/dist/components/slider/index.js +124 -7
- package/dist/components/slider/thumb/index.js +17 -1
- package/dist/components/step-lapse/index.js +153 -9
- package/dist/components/table-button/index.js +97 -3
- package/dist/components/tabs/fixed-tabs/index.js +29 -1
- package/dist/components/tabs/index.js +57 -1
- package/dist/components/tabs/tab/index.js +39 -1
- package/dist/components/tag/index.js +184 -3
- package/dist/components/timeline/card/index.js +9 -1
- package/dist/components/timeline/index.js +17 -1
- package/dist/components/toggle/index.js +85 -14
- package/dist/components/toggle-buttons/index.js +103 -5
- package/dist/components/tooltip/index.js +13 -1
- package/dist/components/tour/index.js +4549 -4
- package/dist/components/typography/heading/index.js +47 -1
- package/dist/components/typography/index.js +8 -1
- package/dist/components/typography/span/index.js +41 -1
- package/dist/components/typography/text/index.js +47 -1
- package/dist/components/web-form/index.js +68 -7
- package/dist/hooks/index.js +13 -1
- 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 +206 -1
- package/dist/styles-B2N0JLw1.mjs +114 -0
- package/dist/styles-B64DVBIF.mjs +115 -0
- package/dist/{styles-BAhpqi6C.mjs → styles-BXFVwnWT.mjs} +28 -28
- package/dist/styles-BZQOqe8p.mjs +141 -0
- package/dist/styles-Bdque9TT.mjs +65 -0
- package/dist/styles-BlHspTrz.mjs +144 -0
- package/dist/styles-CROOwXEH.mjs +76 -0
- 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/_commonjsHelpers-C37NGDzP.js +0 -1
- package/dist/_commonjsHelpers-D6CrkqQz.mjs +0 -6
- package/dist/index-BH27NQKA.mjs +0 -2311
- package/dist/index-Bcw2vW_n.mjs +0 -75
- package/dist/index-C0_LPuYU.mjs +0 -106
- package/dist/index-C8zdgAVH.mjs +0 -82
- package/dist/index-CA_9DXWd.js +0 -5
- package/dist/index-CmylnDrF.js +0 -14
- package/dist/index-DUMgwAbO.js +0 -26
- package/dist/index-DpQYiwGu.js +0 -5
- package/dist/index-Dy8ZUIYs.js +0 -5
- package/dist/index-JPf5Yzg6.js +0 -17
- package/dist/index-OBZtKZuT.mjs +0 -1021
- package/dist/index-SsXlDjK4.mjs +0 -122
- package/dist/index-TKLFHcRp.js +0 -18
- package/dist/index-TnyKqJHo.mjs +0 -61
- package/dist/index-Yr95Cb7Z.mjs +0 -54
- package/dist/index-h9-U5wxq.mjs +0 -209
- package/dist/index-qCiUU4sZ.js +0 -9
- package/dist/index-qe0nJwzl.js +0 -15
- package/dist/styles--Elze-LV.js +0 -3
- package/dist/styles-3pR4Xdvy.js +0 -33
- package/dist/styles-59h91S9m.mjs +0 -65
- package/dist/styles-BCwLWpC3.mjs +0 -126
- package/dist/styles-BJ7-0I5X.mjs +0 -74
- package/dist/styles-BKObp9bh.mjs +0 -76
- package/dist/styles-BWVdbvFu.js +0 -5
- package/dist/styles-Bl-CstrT.js +0 -5
- package/dist/styles-Bn42XCW5.js +0 -7
- package/dist/styles-C2CoGJl7.js +0 -33
- package/dist/styles-CNzziAXG.js +0 -5
- package/dist/styles-CdD9waPD.js +0 -29
- package/dist/styles-CnKTwnFk.mjs +0 -110
- package/dist/styles-D4R-eerv.mjs +0 -77
- package/dist/styles-DNIIhyRC.mjs +0 -144
- package/dist/styles-DV8yOaqV.mjs +0 -131
- package/dist/styles-DYoftbd3.js +0 -42
- package/dist/styles-DlmKLhPh.js +0 -7
- package/dist/styles-be8gOdgy.mjs +0 -106
- package/dist/use-carousel-64dKFW4E.js +0 -1
- package/dist/use-carousel-D7xeL3YZ.mjs +0 -17
- package/dist/use-click-outside-BqkLISED.js +0 -1
- package/dist/use-click-outside-C4Z4pdiW.mjs +0 -18
- package/dist/use-cloudinary-image-DKMl7jbx.mjs +0 -612
- package/dist/use-cloudinary-image-YMMafagv.js +0 -1
- package/dist/use-modal-CNbLSSQb.mjs +0 -14
- package/dist/use-modal-_bYY6M_n.js +0 -1
- package/dist/use-search-75ip5xR-.mjs +0 -12
- package/dist/use-search-DeL4UDMh.js +0 -1
- package/dist/utils-C2whpEd3.js +0 -1
- package/dist/utils-Da0qL35u.mjs +0 -4
|
@@ -1 +1,67 @@
|
|
|
1
|
-
|
|
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
|
+
import { Icon as d } from "../../icon/index.js";
|
|
5
|
+
import { PremiumFeature as g } from "../../premium-feature/index.js";
|
|
6
|
+
import "../../typography/heading/index.js";
|
|
7
|
+
import "../../typography/span/index.js";
|
|
8
|
+
import { Text as o } from "../../typography/text/index.js";
|
|
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
|
+
);
|
|
64
|
+
};
|
|
65
|
+
export {
|
|
66
|
+
j as MenuItem
|
|
67
|
+
};
|
|
@@ -1,7 +1,124 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
+
import "../typography/heading/index.js";
|
|
9
|
+
import "../typography/span/index.js";
|
|
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 }) => `
|
|
24
|
+
align-items: center;
|
|
25
|
+
align-self: stretch;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
justify-content: end;
|
|
29
|
+
gap: ${r.spacing[0.75]};
|
|
30
|
+
width: 304px;
|
|
31
|
+
|
|
32
|
+
.track {
|
|
33
|
+
background: linear-gradient(
|
|
34
|
+
to right,
|
|
35
|
+
${t >= 0 ? `
|
|
36
|
+
${r.palette.primary[500]} ${i}%,
|
|
37
|
+
${r.palette.gray[200]} ${i}%
|
|
38
|
+
` : w(r, i)}
|
|
39
|
+
);
|
|
40
|
+
border-radius: ${r.spacing[0.125]};
|
|
41
|
+
height: ${r.spacing[0.25]};
|
|
42
|
+
width: 100%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.track.disabled {
|
|
46
|
+
opacity: 0.4;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.thumb {
|
|
50
|
+
background: ${r.palette.white};
|
|
51
|
+
border-radius: ${r.spacing[1.25]};
|
|
52
|
+
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.30);
|
|
53
|
+
top: 50%;
|
|
54
|
+
height: 20px;
|
|
55
|
+
width: 20px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.thumb.dragging {
|
|
59
|
+
border: 1px solid ${r.palette.primary[500]};
|
|
60
|
+
}
|
|
61
|
+
`}
|
|
62
|
+
`, S = o.div`
|
|
63
|
+
${({ theme: r }) => `
|
|
64
|
+
align-items: center;
|
|
65
|
+
display: flex;
|
|
66
|
+
justify-content: space-between;
|
|
67
|
+
height: ${r.spacing[0.625]};
|
|
68
|
+
width: 100%;
|
|
69
|
+
|
|
70
|
+
p {
|
|
71
|
+
color: ${r.palette.gray[400]};
|
|
72
|
+
font-family: ${r.typography.type.primary};
|
|
73
|
+
font-size: ${r.spacing[0.5]};
|
|
74
|
+
}
|
|
75
|
+
`}
|
|
76
|
+
`, V = o.output`
|
|
77
|
+
${({ theme: r }) => `
|
|
78
|
+
align-items: flex-end;
|
|
79
|
+
border-radius: ${r.spacing[0.5]};
|
|
80
|
+
border: 1px solid ${r.palette.gray[300]};
|
|
81
|
+
background: ${r.palette.white};
|
|
82
|
+
display: flex;
|
|
83
|
+
gap: ${r.spacing[0.625]};
|
|
84
|
+
padding: ${r.spacing[0.625]} ${r.spacing[0.75]};
|
|
85
|
+
width: 59px;
|
|
86
|
+
`}
|
|
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
|
+
] });
|
|
121
|
+
};
|
|
122
|
+
export {
|
|
123
|
+
D as Slider
|
|
124
|
+
};
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
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 }) }) });
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
g as Thumb
|
|
17
|
+
};
|
|
@@ -1,15 +1,159 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
+
import { Button as d } from "../button/index.js";
|
|
7
|
+
import { Container as g } from "../container/index.js";
|
|
8
|
+
import { Icon as C } from "../icon/index.js";
|
|
9
|
+
import { Heading as z } from "../typography/heading/index.js";
|
|
10
|
+
import "../typography/span/index.js";
|
|
11
|
+
import "../typography/text/index.js";
|
|
12
|
+
const { getVariant: B } = w(
|
|
13
|
+
(t) => ({
|
|
14
|
+
completed: `
|
|
15
|
+
background-color: ${t.palette.primary[500]};
|
|
16
|
+
color: ${t.palette.white};
|
|
17
|
+
|
|
18
|
+
&::after {
|
|
19
|
+
background-color: ${t.palette.primary[500]};
|
|
20
|
+
}
|
|
21
|
+
`,
|
|
22
|
+
current: `
|
|
23
|
+
background-color: ${t.palette.primary[500]};
|
|
24
|
+
color: ${t.palette.white};
|
|
25
|
+
|
|
26
|
+
&::after {
|
|
27
|
+
background-color: ${t.palette.gray[200]};
|
|
28
|
+
}
|
|
29
|
+
`,
|
|
30
|
+
disabled: `
|
|
31
|
+
background-color: ${t.palette.gray[200]};
|
|
32
|
+
outline: 1px solid ${t.palette.gray[400]};
|
|
33
|
+
outline-offset: -1px;
|
|
34
|
+
color: ${t.palette.gray[400]};
|
|
35
|
+
|
|
36
|
+
&::after {
|
|
37
|
+
background-color: ${t.palette.gray[200]};
|
|
38
|
+
}
|
|
39
|
+
`
|
|
40
|
+
})
|
|
41
|
+
), N = e.div`
|
|
42
|
+
${({ theme: t }) => `
|
|
43
|
+
align-items: stretch;
|
|
44
|
+
background-color: ${t.palette.white};
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
height: 100%;
|
|
48
|
+
padding: ${`${t.spacing[1]} ${t.spacing[1]}`};
|
|
49
|
+
scroll-behavior: unset;
|
|
50
|
+
`}
|
|
51
|
+
`, j = e.div`
|
|
4
52
|
display: flex;
|
|
5
53
|
flex-direction: row;
|
|
6
|
-
margin-bottom: ${({theme:
|
|
54
|
+
margin-bottom: ${({ theme: t }) => t.spacing[2]};
|
|
7
55
|
|
|
8
56
|
&:last-child > div:first-child > span::after {
|
|
9
57
|
display: none;
|
|
10
58
|
}
|
|
11
|
-
`,
|
|
12
|
-
${({theme:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
59
|
+
`, A = e.div`
|
|
60
|
+
${({ theme: t }) => `
|
|
61
|
+
display: inline-flex;
|
|
62
|
+
font-family: ${t.typography.type.primary};
|
|
63
|
+
font-size: ${t.typography.text.sm};
|
|
64
|
+
line-height: ${t.spacing[1.25]};
|
|
65
|
+
margin-top: ${t.spacing[1]};
|
|
66
|
+
|
|
67
|
+
& > button:first-child {
|
|
68
|
+
margin-right: ${t.spacing[0.5]};
|
|
69
|
+
}
|
|
70
|
+
`}
|
|
71
|
+
`, D = e.span`
|
|
72
|
+
${({ theme: t, $variant: l }) => `
|
|
73
|
+
border-radius: 6px;
|
|
74
|
+
display: inline-block;
|
|
75
|
+
text-align: center;
|
|
76
|
+
font-size: ${t.typography.text.sm};
|
|
77
|
+
font-weight: ${t.typography.weight.bold};
|
|
78
|
+
font-family: ${t.typography.type.primary};
|
|
79
|
+
line-height: ${t.spacing[1]};
|
|
80
|
+
padding: ${`${t.spacing[0.5]} ${t.spacing[0.5]}`};
|
|
81
|
+
height: ${t.spacing[2]};
|
|
82
|
+
width: ${t.spacing[2]};
|
|
83
|
+
|
|
84
|
+
&::after {
|
|
85
|
+
content: "";
|
|
86
|
+
position: absolute;
|
|
87
|
+
top: calc(32px + ${t.spacing[0.5]});
|
|
88
|
+
left: 50%;
|
|
89
|
+
bottom: 0;
|
|
90
|
+
width: 2px;
|
|
91
|
+
height: calc(100% - ${t.spacing[1]});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
${B(t, l)}
|
|
95
|
+
`}
|
|
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);
|
|
155
|
+
}) });
|
|
156
|
+
};
|
|
157
|
+
export {
|
|
158
|
+
J as StepLapse
|
|
159
|
+
};
|
|
@@ -1,3 +1,97 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
+
import "../typography/heading/index.js";
|
|
6
|
+
import "../typography/span/index.js";
|
|
7
|
+
import { Text as f } from "../typography/text/index.js";
|
|
8
|
+
const x = u.button`
|
|
9
|
+
${({ theme: o }) => `
|
|
10
|
+
align-items: center;
|
|
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
|
+
cursor: pointer;
|
|
16
|
+
display: flex;
|
|
17
|
+
font-size: ${o.typography.text.sm};
|
|
18
|
+
gap: ${o.spacing[0.25]};
|
|
19
|
+
height: 21px;
|
|
20
|
+
width: 21px;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
padding: 6px;
|
|
23
|
+
transition: all 0.25s ease;
|
|
24
|
+
|
|
25
|
+
&[aria-label] {
|
|
26
|
+
height: auto;
|
|
27
|
+
width: auto;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&.success {
|
|
31
|
+
border-color: ${o.palette.success[500]};
|
|
32
|
+
color: ${o.palette.success[500]};
|
|
33
|
+
|
|
34
|
+
&:hover {
|
|
35
|
+
background-color: ${o.palette.success[200]};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:disabled {
|
|
40
|
+
cursor: not-allowed;
|
|
41
|
+
background: ${o.palette.gray[200]};
|
|
42
|
+
border-color: ${o.palette.gray[200]};
|
|
43
|
+
color: ${o.palette.gray[300]};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:hover:not(.success) {
|
|
47
|
+
background-color: ${o.palette.gray[100]};
|
|
48
|
+
}
|
|
49
|
+
`}
|
|
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
|
+
] });
|
|
94
|
+
};
|
|
95
|
+
export {
|
|
96
|
+
v as TableButton
|
|
97
|
+
};
|
|
@@ -1 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { S as s, a } from "../../../styles-ePGii_9g.mjs";
|
|
3
|
+
import { Heading as d } from "../../typography/heading/index.js";
|
|
4
|
+
import "../../typography/span/index.js";
|
|
5
|
+
import "../../typography/text/index.js";
|
|
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
|
+
) });
|
|
27
|
+
export {
|
|
28
|
+
h as FixedTabs
|
|
29
|
+
};
|
|
@@ -1 +1,57 @@
|
|
|
1
|
-
|
|
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
|
+
);
|
|
52
|
+
};
|
|
53
|
+
export {
|
|
54
|
+
w as FixedTabs,
|
|
55
|
+
u as Tab,
|
|
56
|
+
b as Tabs
|
|
57
|
+
};
|
|
@@ -1 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as s, jsxs as T } from "react/jsx-runtime";
|
|
2
|
+
import { T as h } from "../../../styles-ePGii_9g.mjs";
|
|
3
|
+
import { NotificationSign as x } from "../../notification-sign/index.js";
|
|
4
|
+
import { T as u } from "../../../index-DwznImvK.mjs";
|
|
5
|
+
const N = ({
|
|
6
|
+
label: m,
|
|
7
|
+
id: e,
|
|
8
|
+
isActive: l = !1,
|
|
9
|
+
link: p,
|
|
10
|
+
notificationSign: r,
|
|
11
|
+
onClick: d,
|
|
12
|
+
tooltip: b = ""
|
|
13
|
+
}) => /* @__PURE__ */ s(u, { display: "flex", id: `${e}-tooltip`, tip: b, children: /* @__PURE__ */ T(
|
|
14
|
+
h,
|
|
15
|
+
{
|
|
16
|
+
"aria-selected": l,
|
|
17
|
+
className: l ? "active" : "",
|
|
18
|
+
id: e,
|
|
19
|
+
onClick: d,
|
|
20
|
+
role: "tab",
|
|
21
|
+
to: p,
|
|
22
|
+
children: [
|
|
23
|
+
m,
|
|
24
|
+
/* @__PURE__ */ s(
|
|
25
|
+
x,
|
|
26
|
+
{
|
|
27
|
+
left: r == null ? void 0 : r.left,
|
|
28
|
+
numberIndicator: r == null ? void 0 : r.numberIndicator,
|
|
29
|
+
show: r == null ? void 0 : r.show,
|
|
30
|
+
top: r == null ? void 0 : r.top,
|
|
31
|
+
variant: r == null ? void 0 : r.variant
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
) });
|
|
37
|
+
export {
|
|
38
|
+
N as Tab
|
|
39
|
+
};
|