@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,8 +1,39 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { T as
|
|
3
|
-
import { NotificationSign as
|
|
4
|
-
import { T as
|
|
5
|
-
const
|
|
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
|
+
) });
|
|
6
37
|
export {
|
|
7
|
-
|
|
38
|
+
N as Tab
|
|
8
39
|
};
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { isEmpty as
|
|
1
|
+
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { isEmpty as k } from "lodash";
|
|
3
3
|
import { styled as b } from "styled-components";
|
|
4
|
-
import { v as
|
|
5
|
-
import "../../styles-
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { IconButton as
|
|
8
|
-
import { Link as
|
|
4
|
+
import { v as w } from "../../utils-V0EumEPM.mjs";
|
|
5
|
+
import "../../styles-CplEd2kw.mjs";
|
|
6
|
+
import { Icon as v } from "../icon/index.js";
|
|
7
|
+
import { IconButton as z } from "../icon-button/index.js";
|
|
8
|
+
import { Link as S } from "../link/index.js";
|
|
9
9
|
import "../typography/heading/index.js";
|
|
10
|
-
import { Span as
|
|
10
|
+
import { Span as j } from "../typography/span/index.js";
|
|
11
11
|
import "../typography/text/index.js";
|
|
12
|
-
const { getVariant:
|
|
12
|
+
const { getVariant: T } = w(
|
|
13
|
+
(o) => ({
|
|
14
|
+
default: `
|
|
13
15
|
background-color: ${o.palette.gray[200]};
|
|
14
16
|
color: ${o.palette.gray[800]};
|
|
15
|
-
`,
|
|
17
|
+
`,
|
|
18
|
+
error: `
|
|
16
19
|
&.high {
|
|
17
20
|
background-color: ${o.palette.error[700]};
|
|
18
21
|
color: ${o.palette.white};
|
|
@@ -25,10 +28,12 @@ const { getVariant: S } = k((o) => ({ default: `
|
|
|
25
28
|
background-color: ${o.palette.error[500]};
|
|
26
29
|
color: ${o.palette.error[50]};
|
|
27
30
|
}
|
|
28
|
-
`,
|
|
31
|
+
`,
|
|
32
|
+
inactive: `
|
|
29
33
|
background-color: ${o.palette.gray[200]};
|
|
30
34
|
color: ${o.palette.gray[600]};
|
|
31
|
-
`,
|
|
35
|
+
`,
|
|
36
|
+
info: `
|
|
32
37
|
&.high {
|
|
33
38
|
background-color: ${o.palette.info[700]};
|
|
34
39
|
color: ${o.palette.white};
|
|
@@ -41,17 +46,21 @@ const { getVariant: S } = k((o) => ({ default: `
|
|
|
41
46
|
background-color: ${o.palette.info[500]};
|
|
42
47
|
color: ${o.palette.info[50]};
|
|
43
48
|
}
|
|
44
|
-
`,
|
|
49
|
+
`,
|
|
50
|
+
reachable: `
|
|
45
51
|
background-color: ${o.palette.gray[50]};
|
|
46
52
|
color: ${o.palette.gray[800]};
|
|
47
|
-
`,
|
|
53
|
+
`,
|
|
54
|
+
remediation: `
|
|
48
55
|
background-color: inherit;
|
|
49
56
|
border: 1px solid ${o.palette.gray[300]};
|
|
50
57
|
color: ${o.palette.gray[400]};
|
|
51
|
-
`,
|
|
58
|
+
`,
|
|
59
|
+
role: `
|
|
52
60
|
background-color: ${o.palette.gray[800]};
|
|
53
61
|
color: ${o.palette.white};
|
|
54
|
-
`,
|
|
62
|
+
`,
|
|
63
|
+
success: `
|
|
55
64
|
&.high {
|
|
56
65
|
background-color: ${o.palette.success[700]};
|
|
57
66
|
color: ${o.palette.white};
|
|
@@ -64,14 +73,16 @@ const { getVariant: S } = k((o) => ({ default: `
|
|
|
64
73
|
background-color: ${o.palette.success[500]};
|
|
65
74
|
color: ${o.palette.success[50]};
|
|
66
75
|
}
|
|
67
|
-
`,
|
|
76
|
+
`,
|
|
77
|
+
technique: `
|
|
68
78
|
--tag-padding-y: ${o.spacing[0.25]};
|
|
69
79
|
--tag-padding-x: ${o.spacing[0.75]};
|
|
70
80
|
|
|
71
81
|
background-color: inherit;
|
|
72
82
|
border: 1px solid ${o.palette.success[800]};
|
|
73
83
|
color: ${o.palette.success[800]};
|
|
74
|
-
`,
|
|
84
|
+
`,
|
|
85
|
+
warning: `
|
|
75
86
|
&.high {
|
|
76
87
|
background-color: ${o.palette.warning[600]};
|
|
77
88
|
color: ${o.palette.white};
|
|
@@ -84,14 +95,16 @@ const { getVariant: S } = k((o) => ({ default: `
|
|
|
84
95
|
background-color: ${o.palette.warning[400]};
|
|
85
96
|
color: ${o.palette.warning[700]};
|
|
86
97
|
}
|
|
87
|
-
`
|
|
88
|
-
|
|
98
|
+
`
|
|
99
|
+
})
|
|
100
|
+
), q = b.span`
|
|
101
|
+
${({ theme: o, $fontSize: a = o.typography.text.xs, $variant: l }) => `
|
|
89
102
|
align-items: center;
|
|
90
|
-
border-radius: ${o.spacing[
|
|
103
|
+
border-radius: ${o.spacing[l === "technique" ? 1 : 0.25]};
|
|
91
104
|
display: inline-flex;
|
|
92
105
|
gap: ${o.spacing[0.25]};
|
|
93
106
|
font-family: ${o.typography.type.primary};
|
|
94
|
-
font-size: ${
|
|
107
|
+
font-size: ${a};
|
|
95
108
|
font-style: normal;
|
|
96
109
|
font-weight: ${o.typography.weight.regular};
|
|
97
110
|
justify-content: center;
|
|
@@ -105,12 +118,67 @@ const { getVariant: S } = k((o) => ({ default: `
|
|
|
105
118
|
display: flex;
|
|
106
119
|
}
|
|
107
120
|
|
|
108
|
-
${
|
|
121
|
+
${T(o, l)}
|
|
109
122
|
`}
|
|
110
|
-
`,
|
|
111
|
-
|
|
112
|
-
|
|
123
|
+
`, K = ({
|
|
124
|
+
disabled: o,
|
|
125
|
+
icon: a,
|
|
126
|
+
iconColor: l = "inherit",
|
|
127
|
+
iconType: s = "fa-light",
|
|
128
|
+
id: g = "close-tag",
|
|
129
|
+
filterValues: c = "",
|
|
130
|
+
fontSize: d,
|
|
131
|
+
href: t,
|
|
132
|
+
linkLabel: $,
|
|
133
|
+
onClose: p,
|
|
134
|
+
priority: u = "default",
|
|
135
|
+
tagTitle: e = "",
|
|
136
|
+
tagLabel: i,
|
|
137
|
+
variant: y = "default"
|
|
138
|
+
}) => {
|
|
139
|
+
const f = i.length > 25 && k(e + c), x = `${i.slice(0, 25)}...`;
|
|
140
|
+
return /* @__PURE__ */ n(
|
|
141
|
+
j,
|
|
142
|
+
{
|
|
143
|
+
className: "gap-0.5",
|
|
144
|
+
display: t === void 0 ? "initial" : "flex",
|
|
145
|
+
size: "sm",
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ n(q, { $fontSize: d, $variant: y, className: u, children: [
|
|
148
|
+
a && /* @__PURE__ */ r(
|
|
149
|
+
v,
|
|
150
|
+
{
|
|
151
|
+
icon: a,
|
|
152
|
+
iconColor: l,
|
|
153
|
+
iconSize: "xxs",
|
|
154
|
+
iconType: s
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
/* @__PURE__ */ n("span", { children: [
|
|
158
|
+
/* @__PURE__ */ r("strong", { children: e }),
|
|
159
|
+
/* @__PURE__ */ r("span", { children: f ? x : i }),
|
|
160
|
+
/* @__PURE__ */ r("strong", { children: c })
|
|
161
|
+
] }),
|
|
162
|
+
p ? /* @__PURE__ */ r(
|
|
163
|
+
z,
|
|
164
|
+
{
|
|
165
|
+
disabled: o,
|
|
166
|
+
icon: "xmark",
|
|
167
|
+
iconSize: "xxs",
|
|
168
|
+
iconType: "fa-light",
|
|
169
|
+
id: g,
|
|
170
|
+
onClick: p,
|
|
171
|
+
px: 0.125,
|
|
172
|
+
py: 0.125,
|
|
173
|
+
variant: "ghost"
|
|
174
|
+
}
|
|
175
|
+
) : void 0
|
|
176
|
+
] }),
|
|
177
|
+
t === void 0 ? void 0 : /* @__PURE__ */ r(S, { href: t, children: $ })
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
);
|
|
113
181
|
};
|
|
114
182
|
export {
|
|
115
|
-
|
|
183
|
+
K as Tag
|
|
116
184
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "styled-components";
|
|
3
|
-
import { a as e } from "../../../index-
|
|
3
|
+
import { a as e } from "../../../index-C6LbClYh.mjs";
|
|
4
4
|
import "../../typography/heading/index.js";
|
|
5
5
|
import "../../typography/span/index.js";
|
|
6
6
|
import "../../typography/text/index.js";
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { T as
|
|
3
|
-
const
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { T as n, a as o } from "../../index-C6LbClYh.mjs";
|
|
3
|
+
const p = ({ items: t }) => /* @__PURE__ */ e(n, { children: t.map(
|
|
4
|
+
(i, r) => /* @__PURE__ */ e(
|
|
5
|
+
o,
|
|
6
|
+
{
|
|
7
|
+
date: i.date,
|
|
8
|
+
description: i.description,
|
|
9
|
+
title: i.title
|
|
10
|
+
},
|
|
11
|
+
`${i.title}-${r}`
|
|
12
|
+
)
|
|
13
|
+
) });
|
|
4
14
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
15
|
+
p as TimeLine,
|
|
16
|
+
o as TimeLineCard
|
|
7
17
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as f, useCallback as x } from "react";
|
|
3
3
|
import { styled as a } from "styled-components";
|
|
4
|
-
import { Container as
|
|
5
|
-
const
|
|
6
|
-
${({ theme:
|
|
4
|
+
import { Container as k } from "../container/index.js";
|
|
5
|
+
const e = a.div`
|
|
6
|
+
${({ theme: o }) => `
|
|
7
7
|
align-items: center;
|
|
8
|
-
background-color: ${
|
|
8
|
+
background-color: ${o.palette.gray[200]};
|
|
9
9
|
border-radius: 34px;
|
|
10
10
|
cursor: pointer;
|
|
11
11
|
display: flex;
|
|
@@ -15,17 +15,17 @@ const i = a.div`
|
|
|
15
15
|
width: 36px;
|
|
16
16
|
`}
|
|
17
17
|
`, y = a.div`
|
|
18
|
-
${({ theme:
|
|
19
|
-
background-color: ${
|
|
18
|
+
${({ theme: o }) => `
|
|
19
|
+
background-color: ${o.palette.white};
|
|
20
20
|
border-radius: 50%;
|
|
21
|
-
height: ${
|
|
21
|
+
height: ${o.spacing[1]};
|
|
22
22
|
left: 2px;
|
|
23
23
|
position: absolute;
|
|
24
24
|
transition: 0.2s;
|
|
25
|
-
width: ${
|
|
25
|
+
width: ${o.spacing[1]};
|
|
26
26
|
z-index: 1;
|
|
27
27
|
`}
|
|
28
|
-
`,
|
|
28
|
+
`, m = a.label`
|
|
29
29
|
display: inline-block;
|
|
30
30
|
|
|
31
31
|
input {
|
|
@@ -35,29 +35,69 @@ const i = a.div`
|
|
|
35
35
|
width: 0;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
input:checked + ${
|
|
39
|
-
background-color: ${({ theme:
|
|
38
|
+
input:checked + ${e} {
|
|
39
|
+
background-color: ${({ theme: o }) => o.palette.primary[500]};
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
input:checked + ${
|
|
42
|
+
input:checked + ${e} > div {
|
|
43
43
|
transform: translateX(100%);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
input:disabled + ${
|
|
46
|
+
input:disabled + ${e} {
|
|
47
47
|
cursor: not-allowed;
|
|
48
|
-
background-color: ${({ theme:
|
|
48
|
+
background-color: ${({ theme: o }) => o.palette.gray[100]};
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
input:disabled + ${
|
|
52
|
-
background-color: ${({ theme:
|
|
53
|
-
border: 1px solid ${({ theme:
|
|
51
|
+
input:disabled + ${e} > div {
|
|
52
|
+
background-color: ${({ theme: o }) => o.palette.gray[200]};
|
|
53
|
+
border: 1px solid ${({ theme: o }) => o.palette.gray[200]};
|
|
54
54
|
}
|
|
55
|
-
`,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
`, j = f(function({
|
|
56
|
+
defaultChecked: l,
|
|
57
|
+
disabled: n = !1,
|
|
58
|
+
justify: s,
|
|
59
|
+
name: i,
|
|
60
|
+
leftDescription: t,
|
|
61
|
+
rightDescription: d,
|
|
62
|
+
...p
|
|
63
|
+
}, g) {
|
|
64
|
+
const u = l === !0 ? "on" : "off", b = typeof t == "object" && t.on && t.off ? t[u] : t, h = x(
|
|
65
|
+
($) => {
|
|
66
|
+
$.stopPropagation();
|
|
67
|
+
},
|
|
68
|
+
[]
|
|
69
|
+
);
|
|
70
|
+
return /* @__PURE__ */ c(
|
|
71
|
+
k,
|
|
72
|
+
{
|
|
73
|
+
alignItems: "center",
|
|
74
|
+
display: "flex",
|
|
75
|
+
fontSize: "14px",
|
|
76
|
+
gap: 0.75,
|
|
77
|
+
justify: s,
|
|
78
|
+
children: [
|
|
79
|
+
b,
|
|
80
|
+
/* @__PURE__ */ c(m, { onClick: h, role: "switch", children: [
|
|
81
|
+
/* @__PURE__ */ r(
|
|
82
|
+
"input",
|
|
83
|
+
{
|
|
84
|
+
...p,
|
|
85
|
+
"aria-disabled": n,
|
|
86
|
+
"aria-label": i,
|
|
87
|
+
checked: l === !0,
|
|
88
|
+
disabled: n,
|
|
89
|
+
name: i,
|
|
90
|
+
ref: g,
|
|
91
|
+
type: "checkbox"
|
|
92
|
+
}
|
|
93
|
+
),
|
|
94
|
+
/* @__PURE__ */ r(e, { "aria-label": "Toggle Switch", id: `${i}Toggle`, children: /* @__PURE__ */ r(y, {}) })
|
|
95
|
+
] }),
|
|
96
|
+
d
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
);
|
|
60
100
|
});
|
|
61
101
|
export {
|
|
62
|
-
|
|
102
|
+
j as Toggle
|
|
63
103
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { styled as
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as l, useCallback as g } from "react";
|
|
3
|
+
import { styled as n } from "styled-components";
|
|
4
4
|
import "../typography/heading/index.js";
|
|
5
5
|
import "../typography/span/index.js";
|
|
6
6
|
import { Text as p } from "../typography/text/index.js";
|
|
7
|
-
const
|
|
8
|
-
${({ theme:
|
|
7
|
+
const b = n.div`
|
|
8
|
+
${({ theme: r }) => `
|
|
9
9
|
align-items: center;
|
|
10
10
|
display: flex;
|
|
11
11
|
position: relative;
|
|
12
12
|
width: 352px;
|
|
13
13
|
|
|
14
14
|
> button:first-child {
|
|
15
|
-
border-radius: ${
|
|
15
|
+
border-radius: ${r.spacing[2]} 0 0 ${r.spacing[2]};
|
|
16
16
|
}
|
|
17
17
|
> button:last-child {
|
|
18
18
|
--angle-grad: -45deg;
|
|
19
|
-
border-radius: 0 ${
|
|
19
|
+
border-radius: 0 ${r.spacing[2]} ${r.spacing[2]} 0;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
&::before {
|
|
23
|
-
background: ${
|
|
24
|
-
border-radius: ${
|
|
23
|
+
background: ${r.palette.gradients["01"]} border-box;
|
|
24
|
+
border-radius: ${r.spacing[2]};
|
|
25
25
|
content: "";
|
|
26
26
|
position: absolute;
|
|
27
27
|
inset: 0;
|
|
@@ -30,26 +30,26 @@ const m = r.div`
|
|
|
30
30
|
mask-composite: exclude;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
@media screen and (max-width: ${
|
|
33
|
+
@media screen and (max-width: ${r.breakpoints.mobile}) {
|
|
34
34
|
width: 320px;
|
|
35
35
|
}
|
|
36
36
|
`}
|
|
37
|
-
`,
|
|
38
|
-
${({ theme:
|
|
37
|
+
`, u = n.button`
|
|
38
|
+
${({ theme: r }) => `
|
|
39
39
|
align-items: center;
|
|
40
40
|
background: linear-gradient(
|
|
41
41
|
var(--angle-grad),
|
|
42
42
|
rgba(243, 38, 55, var(--opacity-grad)),
|
|
43
43
|
rgba(184, 7, 93, var(--opacity-grad))
|
|
44
44
|
);
|
|
45
|
-
color: ${
|
|
45
|
+
color: ${r.palette.primary[500]};
|
|
46
46
|
cursor: pointer;
|
|
47
47
|
display: flex;
|
|
48
48
|
flex: 1 0 0;
|
|
49
49
|
justify-content: center;
|
|
50
|
-
gap: ${
|
|
51
|
-
height: ${
|
|
52
|
-
padding: ${
|
|
50
|
+
gap: ${r.spacing[0.625]};
|
|
51
|
+
height: ${r.spacing[4]};
|
|
52
|
+
padding: ${r.spacing[1.25]};
|
|
53
53
|
position: relative;
|
|
54
54
|
transition: color, --opacity-grad 0.5s ease-in-out;
|
|
55
55
|
|
|
@@ -60,14 +60,43 @@ const m = r.div`
|
|
|
60
60
|
rgba(243, 38, 55, var(--opacity-grad)),
|
|
61
61
|
rgba(184, 7, 93, var(--opacity-grad))
|
|
62
62
|
);
|
|
63
|
-
color: ${
|
|
63
|
+
color: ${r.palette.white};
|
|
64
64
|
}
|
|
65
65
|
`}
|
|
66
|
-
`, k = ({
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
`, k = ({
|
|
67
|
+
defaultSelection: r,
|
|
68
|
+
options: e,
|
|
69
|
+
handleClick: t
|
|
70
|
+
}) => {
|
|
71
|
+
const [o, d] = l(
|
|
72
|
+
r ?? e[0]
|
|
73
|
+
), s = g(
|
|
74
|
+
(a) => () => {
|
|
75
|
+
d(a), t(a);
|
|
76
|
+
},
|
|
77
|
+
[t]
|
|
78
|
+
);
|
|
79
|
+
return /* @__PURE__ */ i(b, { children: e.map(
|
|
80
|
+
(a, c) => /* @__PURE__ */ i(
|
|
81
|
+
u,
|
|
82
|
+
{
|
|
83
|
+
className: `${a.includes(o) && "selected"}`,
|
|
84
|
+
onClick: s(a),
|
|
85
|
+
children: /* @__PURE__ */ i(
|
|
86
|
+
p,
|
|
87
|
+
{
|
|
88
|
+
color: "inherit",
|
|
89
|
+
fontWeight: "bold",
|
|
90
|
+
size: "md",
|
|
91
|
+
sizeSm: "sm",
|
|
92
|
+
textAlign: "center",
|
|
93
|
+
children: a
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
},
|
|
97
|
+
`${a}-${c}`
|
|
98
|
+
)
|
|
99
|
+
) });
|
|
71
100
|
};
|
|
72
101
|
export {
|
|
73
102
|
k as ToggleButton
|