welcome-ui 8.1.0 → 8.2.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Alert.mjs +28 -28
- package/dist/Avatar.mjs +47 -44
- package/dist/Breadcrumb.mjs +169 -167
- package/dist/ButtonGroup.mjs +14 -14
- package/dist/Checkbox.mjs +1 -1
- package/dist/{CustomPopper-B2Cqfph4.mjs → CustomPopper-DezjKb9n.mjs} +12 -17
- package/dist/DatePicker.mjs +74 -74
- package/dist/DateTimePicker.mjs +60 -59
- package/dist/DateTimePickerCommon.mjs +1 -1
- package/dist/Drawer.mjs +51 -55
- package/dist/DropdownMenu.mjs +183 -183
- package/dist/Field.mjs +9 -10
- package/dist/FileDrop.mjs +455 -465
- package/dist/FileUpload.mjs +74 -81
- package/dist/Files.mjs +15 -15
- package/dist/InputText.mjs +42 -42
- package/dist/Label.mjs +1 -1
- package/dist/Modal.mjs +115 -119
- package/dist/Pagination.mjs +31 -29
- package/dist/PasswordInput.mjs +9 -9
- package/dist/Picker.mjs +23 -23
- package/dist/Radio.mjs +35 -35
- package/dist/RadioTab.mjs +1 -1
- package/dist/Search.mjs +123 -127
- package/dist/Select.mjs +301 -318
- package/dist/Slider.mjs +228 -224
- package/dist/Stack.mjs +15 -12
- package/dist/Swiper.mjs +126 -127
- package/dist/Tabs.mjs +1 -1
- package/dist/Tag.mjs +19 -19
- package/dist/Text.mjs +35 -37
- package/dist/Textarea.mjs +1 -1
- package/dist/TimePicker.mjs +61 -61
- package/dist/Toast.mjs +3 -3
- package/dist/Toggle.mjs +1 -1
- package/dist/Tooltip.mjs +1 -1
- package/dist/VariantIcon.mjs +14 -5
- package/dist/WuiProvider.mjs +35 -38
- package/dist/{field-styles-BVlRlvuu.mjs → field-styles-CfVLcVQp.mjs} +1 -1
- package/dist/{hex-to-rgba-DU_XzKIK.mjs → hex-to-rgba-BIDK-3ab.mjs} +2 -2
- package/dist/{index-5HBq1O6Z.mjs → index-62h-enZF.mjs} +31 -31
- package/dist/index-BhcLigYU.mjs +77 -0
- package/dist/theme.mjs +23 -23
- package/dist/throttle-BDBzFeFj.mjs +13 -0
- package/dist/types/components/Accordion/styles.d.ts +2 -2
- package/dist/types/components/Accordion/theme.d.ts +1 -1
- package/dist/types/components/Alert/styles.d.ts +9 -9
- package/dist/types/components/Alert/theme.d.ts +3 -3
- package/dist/types/components/AspectRatio/styles.d.ts +2 -3
- package/dist/types/components/Avatar/index.d.ts +2 -1
- package/dist/types/components/Avatar/styles.d.ts +8 -8
- package/dist/types/components/Avatar/theme.d.ts +2 -2
- package/dist/types/components/Avatar/utils.d.ts +1 -1
- package/dist/types/components/Badge/styles.d.ts +4 -4
- package/dist/types/components/Badge/theme.d.ts +1 -1
- package/dist/types/components/Breadcrumb/index.d.ts +1 -1
- package/dist/types/components/Breadcrumb/theme.d.ts +1 -1
- package/dist/types/components/Button/index.d.ts +1 -1
- package/dist/types/components/Button/styles.d.ts +1 -1
- package/dist/types/components/Button/theme.d.ts +3 -3
- package/dist/types/components/ButtonGroup/index.d.ts +2 -2
- package/dist/types/components/Card/Cover.styles.d.ts +4 -4
- package/dist/types/components/Card/theme.d.ts +1 -1
- package/dist/types/components/Checkbox/styles.d.ts +1 -1
- package/dist/types/components/Checkbox/theme.d.ts +1 -1
- package/dist/types/components/ClearButton/index.d.ts +4 -4
- package/dist/types/components/ClearButton/styles.d.ts +4 -4
- package/dist/types/components/CloseButton/styles.d.ts +4 -4
- package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/theme.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/utils.d.ts +1 -1
- package/dist/types/components/Drawer/index.d.ts +5 -5
- package/dist/types/components/Drawer/styles.d.ts +4 -4
- package/dist/types/components/Drawer/theme.d.ts +2 -2
- package/dist/types/components/DropdownMenu/index.d.ts +1 -1
- package/dist/types/components/DropdownMenu/theme.d.ts +1 -1
- package/dist/types/components/Field/utils.d.ts +1 -1
- package/dist/types/components/FileDrop/index.d.ts +4 -4
- package/dist/types/components/FileDrop/theme.d.ts +1 -1
- package/dist/types/components/FileUpload/index.d.ts +2 -2
- package/dist/types/components/Files/index.d.ts +3 -3
- package/dist/types/components/Files/types.d.ts +1 -1
- package/dist/types/components/Hint/theme.d.ts +1 -1
- package/dist/types/components/Icon/theme.d.ts +2 -2
- package/dist/types/components/Icons/Sun/content.json.d.ts +1 -2
- package/dist/types/components/Label/theme.d.ts +1 -1
- package/dist/types/components/Link/index.d.ts +2 -2
- package/dist/types/components/Link/styles.d.ts +4 -4
- package/dist/types/components/Link/theme.d.ts +1 -1
- package/dist/types/components/Loader/styles.d.ts +4 -4
- package/dist/types/components/Loader/theme.d.ts +2 -2
- package/dist/types/components/Modal/Assets/Backdrop.d.ts +4 -4
- package/dist/types/components/Modal/Assets/index.d.ts +8 -8
- package/dist/types/components/Modal/Assets/styles.d.ts +8 -8
- package/dist/types/components/Modal/Close.d.ts +2 -2
- package/dist/types/components/Modal/Content.d.ts +5 -3
- package/dist/types/components/Modal/index.d.ts +10 -10
- package/dist/types/components/Modal/styles.d.ts +7 -7
- package/dist/types/components/Modal/theme.d.ts +1 -1
- package/dist/types/components/Pagination/theme.d.ts +1 -1
- package/dist/types/components/Picker/index.d.ts +1 -1
- package/dist/types/components/Picker/styles.d.ts +1 -1
- package/dist/types/components/Popover/styles.d.ts +4 -4
- package/dist/types/components/Popover/theme.d.ts +1 -1
- package/dist/types/components/Radio/index.d.ts +2 -2
- package/dist/types/components/Radio/styles.d.ts +5 -5
- package/dist/types/components/Radio/theme.d.ts +1 -1
- package/dist/types/components/RadioTab/index.d.ts +1 -1
- package/dist/types/components/RadioTab/styles.d.ts +10 -4
- package/dist/types/components/RadioTab/theme.d.ts +1 -1
- package/dist/types/components/Search/index.d.ts +1 -1
- package/dist/types/components/Select/index.d.ts +4 -4
- package/dist/types/components/Select/styles.d.ts +4 -4
- package/dist/types/components/Select/utils.d.ts +4 -8
- package/dist/types/components/Shape/styles.d.ts +3 -3
- package/dist/types/components/Slider/styles.d.ts +16 -16
- package/dist/types/components/Slider/theme.d.ts +1 -1
- package/dist/types/components/Swiper/index.d.ts +1 -1
- package/dist/types/components/Swiper/styles.d.ts +16 -16
- package/dist/types/components/Swiper/theme.d.ts +1 -1
- package/dist/types/components/System/index.d.ts +6 -6
- package/dist/types/components/Table/theme.d.ts +1 -1
- package/dist/types/components/Tabs/ActiveBar.d.ts +2 -2
- package/dist/types/components/Tabs/TabList.d.ts +2 -2
- package/dist/types/components/Tabs/styles.d.ts +2 -2
- package/dist/types/components/Tabs/theme.d.ts +1 -1
- package/dist/types/components/Tag/theme.d.ts +1 -1
- package/dist/types/components/Textarea/theme.d.ts +1 -1
- package/dist/types/components/Toast/ToastWrapper.d.ts +1 -1
- package/dist/types/components/Toast/index.d.ts +1 -1
- package/dist/types/components/Toast/styles.d.ts +14 -14
- package/dist/types/components/Toast/theme.d.ts +1 -1
- package/dist/types/components/Toggle/index.d.ts +2 -2
- package/dist/types/components/Toggle/styles.d.ts +4 -5
- package/dist/types/components/Toggle/theme.d.ts +1 -1
- package/dist/types/components/Tooltip/index.d.ts +2 -2
- package/dist/types/components/Tooltip/styles.d.ts +1 -1
- package/dist/types/components/Tooltip/theme.d.ts +1 -1
- package/dist/types/components/VariantIcon/theme.d.ts +1 -1
- package/dist/types/components/WuiProvider/font.d.ts +5 -3
- package/dist/types/components/WuiProvider/index.d.ts +1 -1
- package/dist/types/theme/colors.d.ts +9 -1
- package/dist/types/theme/defaultFields.d.ts +5 -5
- package/dist/types/theme/index.d.ts +2 -2
- package/dist/types/theme/screens.d.ts +7 -7
- package/dist/types/theme/space.d.ts +9 -9
- package/dist/types/theme/typography.d.ts +1 -1
- package/dist/types/utils/field-styles.d.ts +6 -6
- package/dist/types/utils/use-create-portal.d.ts +1 -1
- package/dist/types/utils/use-viewport.d.ts +2 -2
- package/dist/{use-fork-ref-DvaCTfQ_.mjs → use-fork-ref-CUZErtAC.mjs} +3 -4
- package/dist/utils.mjs +29 -102
- package/dist/wrap-children-CzmhoRzd.mjs +13 -0
- package/package.json +2 -2
- package/dist/throttle-CW18pWlW.mjs +0 -13
- package/dist/wrap-children-DBSD-X5-.mjs +0 -9
package/dist/Modal.mjs
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as o } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import i, { css as x, th as a, up as G, system as J, useTheme as w } from "@xstyled/styled-components";
|
|
4
|
+
import K, { useState as L, useMemo as Q, Children as D, useEffect as U, cloneElement as F } from "react";
|
|
5
5
|
import { Shape as X } from "./Shape.mjs";
|
|
6
6
|
import { forwardRef as c } from "./System.mjs";
|
|
7
7
|
import { Box as $ } from "./Box.mjs";
|
|
8
|
-
import { Text as
|
|
8
|
+
import { Text as p } from "./Text.mjs";
|
|
9
9
|
import { StyledSwiper as Y } from "./Swiper.mjs";
|
|
10
10
|
import { Button as Z } from "./Button.mjs";
|
|
11
11
|
import { IconsFont as tt } from "./IconsFont.mjs";
|
|
12
|
-
import { D as
|
|
12
|
+
import { D as H } from "./SYRFVSLH-B6m278Vb.mjs";
|
|
13
13
|
import { CloseButton as et } from "./CloseButton.mjs";
|
|
14
|
-
import { D as ot, u as
|
|
15
|
-
import { D as
|
|
16
|
-
const
|
|
14
|
+
import { D as ot, u as nt } from "./JC64G2H7-afsomHuH.mjs";
|
|
15
|
+
import { D as rt } from "./AXB53BZF-XKOjjeWO.mjs";
|
|
16
|
+
const S = "calc(100vw - 2 * 2rem);", W = "calc(100vw - 2 * 1rem);", E = "calc(100vh - 2 * 5rem);", M = x`
|
|
17
17
|
width: ${W};
|
|
18
|
-
max-height: ${
|
|
18
|
+
max-height: ${E};
|
|
19
19
|
|
|
20
20
|
@media (min-width: md) {
|
|
21
|
-
width: ${
|
|
21
|
+
width: ${S};
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
/* for big screens */
|
|
25
25
|
@media (min-width: 1700px) {
|
|
26
26
|
max-width: 1600;
|
|
27
27
|
}
|
|
28
|
-
`,
|
|
29
|
-
${
|
|
28
|
+
`, N = i.div`
|
|
29
|
+
${M};
|
|
30
30
|
flex: 1;
|
|
31
31
|
|
|
32
32
|
@media (min-width: md) {
|
|
@@ -37,16 +37,16 @@ const E = "calc(100vw - 2 * 2rem);", W = "calc(100vw - 2 * 1rem);", M = "calc(10
|
|
|
37
37
|
width: 100%;
|
|
38
38
|
height: 100%;
|
|
39
39
|
}
|
|
40
|
-
`, j =
|
|
40
|
+
`, j = i.divBox`
|
|
41
41
|
transition: margin-top 250ms ease-in-out;
|
|
42
42
|
|
|
43
43
|
> img,
|
|
44
44
|
> div {
|
|
45
45
|
max-width: ${W};
|
|
46
|
-
max-height: ${
|
|
46
|
+
max-height: ${E};
|
|
47
47
|
|
|
48
48
|
@media (min-width: md) {
|
|
49
|
-
max-width: ${
|
|
49
|
+
max-width: ${S};
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
/* for big screens */
|
|
@@ -54,8 +54,8 @@ const E = "calc(100vw - 2 * 2rem);", W = "calc(100vw - 2 * 1rem);", M = "calc(10
|
|
|
54
54
|
max-width: 1600;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
`,
|
|
58
|
-
${
|
|
57
|
+
`, st = i.div`
|
|
58
|
+
${a("modals.default")};
|
|
59
59
|
position: fixed;
|
|
60
60
|
inset: 0;
|
|
61
61
|
margin: auto;
|
|
@@ -67,7 +67,7 @@ const E = "calc(100vw - 2 * 2rem);", W = "calc(100vw - 2 * 1rem);", M = "calc(10
|
|
|
67
67
|
transition: opacity 250ms ease-in-out;
|
|
68
68
|
|
|
69
69
|
&:has(${Y}) {
|
|
70
|
-
${
|
|
70
|
+
${M};
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
${j} {
|
|
@@ -81,9 +81,9 @@ const E = "calc(100vw - 2 * 2rem);", W = "calc(100vw - 2 * 1rem);", M = "calc(10
|
|
|
81
81
|
margin-top: 0;
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
`,
|
|
84
|
+
`, T = i(p).attrs({ lines: 2, variant: "h4" })`
|
|
85
85
|
margin: 0;
|
|
86
|
-
`,
|
|
86
|
+
`, b = "4rem", v = "6rem", it = i.divBox`
|
|
87
87
|
display: flex;
|
|
88
88
|
flex-direction: column;
|
|
89
89
|
border-radius: xxl;
|
|
@@ -92,24 +92,24 @@ const E = "calc(100vw - 2 * 2rem);", W = "calc(100vw - 2 * 1rem);", M = "calc(10
|
|
|
92
92
|
> img {
|
|
93
93
|
width: auto;
|
|
94
94
|
max-width: fit-content;
|
|
95
|
-
max-height: calc(100vh - 2 * 5rem - ${
|
|
95
|
+
max-height: calc(100vh - 2 * 5rem - ${b});
|
|
96
96
|
flex-shrink: 0;
|
|
97
97
|
|
|
98
98
|
@media (min-width: md) {
|
|
99
|
-
max-height: calc(100vh - 2 * 5rem - ${
|
|
99
|
+
max-height: calc(100vh - 2 * 5rem - ${v});
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
${
|
|
103
|
+
${N} {
|
|
104
104
|
background-color: neutral-90;
|
|
105
|
-
max-height: calc(100vh - 2 * 5rem - ${
|
|
105
|
+
max-height: calc(100vh - 2 * 5rem - ${b});
|
|
106
106
|
|
|
107
107
|
@media (min-width: md) {
|
|
108
|
-
max-height: calc(100vh - 2 * 5rem - ${
|
|
108
|
+
max-height: calc(100vh - 2 * 5rem - ${v});
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
`, at = c(
|
|
112
|
-
({ children: t, customContent: e, subtitle:
|
|
112
|
+
({ children: t, customContent: e, subtitle: n, title: r }, l) => /* @__PURE__ */ o.jsxs(it, { ref: l, children: [
|
|
113
113
|
t,
|
|
114
114
|
/* @__PURE__ */ o.jsxs(
|
|
115
115
|
$,
|
|
@@ -119,23 +119,23 @@ const E = "calc(100vw - 2 * 2rem);", W = "calc(100vw - 2 * 1rem);", M = "calc(10
|
|
|
119
119
|
flexDirection: "column",
|
|
120
120
|
flexShrink: 0,
|
|
121
121
|
gap: "xxs",
|
|
122
|
-
h: { _:
|
|
122
|
+
h: { _: b, md: v },
|
|
123
123
|
justifyContent: "center",
|
|
124
124
|
px: { _: "md", md: "xl" },
|
|
125
125
|
w: "100%",
|
|
126
126
|
children: [
|
|
127
127
|
e,
|
|
128
|
-
!e &&
|
|
129
|
-
!e &&
|
|
128
|
+
!e && n ? /* @__PURE__ */ o.jsx(p, { variant: "subtitle-sm", children: n }) : null,
|
|
129
|
+
!e && r ? /* @__PURE__ */ o.jsx(T, { children: r }) : null
|
|
130
130
|
]
|
|
131
131
|
}
|
|
132
132
|
)
|
|
133
133
|
] })
|
|
134
|
-
),
|
|
134
|
+
), z = i.divBox.withConfig({
|
|
135
135
|
shouldForwardProp: (t) => !["hideOnInteractOutside"].includes(t)
|
|
136
136
|
})(
|
|
137
|
-
({ hideOnInteractOutside: t }) =>
|
|
138
|
-
${
|
|
137
|
+
({ hideOnInteractOutside: t }) => x`
|
|
138
|
+
${a("modals.backdrop")};
|
|
139
139
|
position: fixed;
|
|
140
140
|
top: 0;
|
|
141
141
|
right: 0;
|
|
@@ -144,7 +144,7 @@ const E = "calc(100vw - 2 * 2rem);", W = "calc(100vw - 2 * 1rem);", M = "calc(10
|
|
|
144
144
|
opacity: 0;
|
|
145
145
|
transition: opacity 150ms ease-in-out;
|
|
146
146
|
|
|
147
|
-
${t &&
|
|
147
|
+
${t && x`
|
|
148
148
|
cursor: pointer;
|
|
149
149
|
`}
|
|
150
150
|
|
|
@@ -152,10 +152,10 @@ const E = "calc(100vw - 2 * 2rem);", W = "calc(100vw - 2 * 1rem);", M = "calc(10
|
|
|
152
152
|
opacity: 1;
|
|
153
153
|
}
|
|
154
154
|
`
|
|
155
|
-
), lt =
|
|
156
|
-
({ size: t }) =>
|
|
157
|
-
${
|
|
158
|
-
${
|
|
155
|
+
), lt = i.divBox(
|
|
156
|
+
({ size: t }) => x`
|
|
157
|
+
${a("cards.default")};
|
|
158
|
+
${a("modals.default")};
|
|
159
159
|
position: fixed;
|
|
160
160
|
inset: 0;
|
|
161
161
|
margin: auto;
|
|
@@ -179,37 +179,37 @@ const E = "calc(100vw - 2 * 2rem);", W = "calc(100vw - 2 * 1rem);", M = "calc(10
|
|
|
179
179
|
margin-top: 0;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
${
|
|
182
|
+
${G(
|
|
183
183
|
"md",
|
|
184
|
-
|
|
184
|
+
x`
|
|
185
185
|
height: fit-content;
|
|
186
|
-
max-height: calc(100vh - ${
|
|
187
|
-
${
|
|
186
|
+
max-height: calc(100vh - ${a("space.xl")} * 2);
|
|
187
|
+
${a(`modals.sizes.${t}`)};
|
|
188
188
|
`
|
|
189
189
|
)}
|
|
190
190
|
`
|
|
191
|
-
), dt =
|
|
192
|
-
${
|
|
193
|
-
`, ct =
|
|
191
|
+
), dt = i.sectionBox`
|
|
192
|
+
${a("modals.body")};
|
|
193
|
+
`, ct = i.headerBox`
|
|
194
194
|
position: sticky;
|
|
195
195
|
top: 0;
|
|
196
196
|
flex-shrink: 0;
|
|
197
197
|
z-index: 1;
|
|
198
|
-
${
|
|
199
|
-
`, mt =
|
|
200
|
-
${
|
|
198
|
+
${a("modals.header")};
|
|
199
|
+
`, mt = i(p)`
|
|
200
|
+
${a(".modals.header.subtitle")};
|
|
201
201
|
margin-bottom: 0;
|
|
202
|
-
`, ut =
|
|
202
|
+
`, ut = i.footerBox`
|
|
203
203
|
position: sticky;
|
|
204
204
|
bottom: 0;
|
|
205
205
|
flex-shrink: 0;
|
|
206
206
|
z-index: 1;
|
|
207
|
-
${
|
|
208
|
-
`,
|
|
209
|
-
${
|
|
210
|
-
`,
|
|
211
|
-
${
|
|
212
|
-
`,
|
|
207
|
+
${a("modals.footer")};
|
|
208
|
+
`, pt = i($)`
|
|
209
|
+
${a("modals.footer.children")};
|
|
210
|
+
`, xt = i.divBox`
|
|
211
|
+
${a("modals.footer.information")};
|
|
212
|
+
`, ht = i(Z)`
|
|
213
213
|
position: absolute;
|
|
214
214
|
right: xl;
|
|
215
215
|
top: xl;
|
|
@@ -223,40 +223,40 @@ const E = "calc(100vw - 2 * 2rem);", W = "calc(100vw - 2 * 1rem);", M = "calc(10
|
|
|
223
223
|
background-color: neutral-40;
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
${
|
|
227
|
-
`,
|
|
228
|
-
({ hideOnInteractOutside: t, ...e },
|
|
229
|
-
|
|
226
|
+
${J}
|
|
227
|
+
`, I = c(
|
|
228
|
+
({ hideOnInteractOutside: t, ...e }, n) => /* @__PURE__ */ o.jsx(
|
|
229
|
+
z,
|
|
230
230
|
{
|
|
231
231
|
backgroundColor: "rgba(0, 0, 0, 0.9)",
|
|
232
232
|
hideOnInteractOutside: t,
|
|
233
233
|
...e,
|
|
234
|
-
ref:
|
|
234
|
+
ref: n,
|
|
235
235
|
children: /* @__PURE__ */ o.jsx(
|
|
236
|
-
|
|
236
|
+
H,
|
|
237
237
|
{
|
|
238
|
-
render: /* @__PURE__ */ o.jsx(
|
|
238
|
+
render: /* @__PURE__ */ o.jsx(ht, { shape: "circle", variant: "secondary", children: /* @__PURE__ */ o.jsx(tt.Cross, {}) })
|
|
239
239
|
}
|
|
240
240
|
)
|
|
241
241
|
}
|
|
242
242
|
)
|
|
243
243
|
);
|
|
244
|
-
|
|
245
|
-
const ft = ({ children: t }) => /* @__PURE__ */ o.jsx(
|
|
244
|
+
I.displayName = "Backdrop";
|
|
245
|
+
const ft = ({ children: t }) => /* @__PURE__ */ o.jsx(N, { children: /* @__PURE__ */ o.jsx($, { h: "100%", margin: "0 auto", style: { aspectRatio: 16 / 9 }, children: t }) }), gt = Object.assign(st, {
|
|
246
246
|
AssetWithTitle: at,
|
|
247
|
-
Backdrop:
|
|
247
|
+
Backdrop: I,
|
|
248
248
|
Content: j,
|
|
249
249
|
Iframe: ft,
|
|
250
|
-
Title:
|
|
251
|
-
}),
|
|
252
|
-
const
|
|
250
|
+
Title: T
|
|
251
|
+
}), _ = ({ isOnHeader: t, ...e }) => {
|
|
252
|
+
const n = w();
|
|
253
253
|
return /* @__PURE__ */ o.jsx(
|
|
254
|
-
|
|
254
|
+
H,
|
|
255
255
|
{
|
|
256
256
|
render: /* @__PURE__ */ o.jsx(
|
|
257
257
|
et,
|
|
258
258
|
{
|
|
259
|
-
left: t ? void 0 : `calc(100% - ${
|
|
259
|
+
left: t ? void 0 : `calc(100% - ${n.space.lg} - ${n.buttons.sizes.sm.height})`,
|
|
260
260
|
position: t ? "absolute" : "sticky",
|
|
261
261
|
right: t ? "lg" : void 0,
|
|
262
262
|
top: "lg",
|
|
@@ -266,97 +266,93 @@ const ft = ({ children: t }) => /* @__PURE__ */ o.jsx(T, { children: /* @__PURE_
|
|
|
266
266
|
)
|
|
267
267
|
}
|
|
268
268
|
);
|
|
269
|
-
},
|
|
270
|
-
({ children: t, store: e, withClosingButton:
|
|
271
|
-
const { borderWidths: u, space: m } = w(), [y,
|
|
269
|
+
}, A = c(
|
|
270
|
+
({ children: t, store: e, withClosingButton: n = !0, ...r }, l) => {
|
|
271
|
+
const { borderWidths: u, space: m } = w(), [y, h] = L(!1), f = e.useState("contentElement"), B = e.useState("open"), d = Q(
|
|
272
272
|
() => D.map(t, (s) => {
|
|
273
|
-
if (
|
|
273
|
+
if (K.isValidElement(s)) {
|
|
274
274
|
const g = s.type;
|
|
275
275
|
return g.displayName ?? g.name ?? "";
|
|
276
276
|
}
|
|
277
277
|
return "";
|
|
278
278
|
}),
|
|
279
279
|
[t]
|
|
280
|
-
),
|
|
280
|
+
), V = !d.includes("Header") && n, q = (s) => s === "Header" ? {
|
|
281
281
|
// if the Modal have a Body but not a Footer || have a Footer but not a Body
|
|
282
|
-
pb:
|
|
282
|
+
pb: d.includes("Body") && !d.includes("Footer") || d.includes("Footer") && !d.includes("Body") ? m.lg : m.xxl
|
|
283
283
|
} : s === "Body" ? {
|
|
284
|
-
pb:
|
|
285
|
-
pr:
|
|
284
|
+
pb: d.includes("Footer") ? m.lg : null,
|
|
285
|
+
pr: d.includes("Header") ? m.xxl : null
|
|
286
286
|
} : s === "Footer" ? {
|
|
287
287
|
borderWidth: y ? u.sm : "0",
|
|
288
|
-
pt:
|
|
288
|
+
pt: d.includes("Header") || d.includes("Body") ? null : m.lg
|
|
289
289
|
} : {};
|
|
290
290
|
return U(() => {
|
|
291
|
-
B ? f &&
|
|
292
|
-
}, [e, B, f]), /* @__PURE__ */ o.jsxs($, { ref:
|
|
293
|
-
|
|
291
|
+
B ? f && h(f.scrollHeight > f.offsetHeight) : h(!1);
|
|
292
|
+
}, [e, B, f]), /* @__PURE__ */ o.jsxs($, { ref: l, ...r, children: [
|
|
293
|
+
V ? /* @__PURE__ */ o.jsx(_, {}) : null,
|
|
294
294
|
D.map(t, (s) => {
|
|
295
295
|
var k, C;
|
|
296
296
|
if (!s) return null;
|
|
297
297
|
const g = ((k = s == null ? void 0 : s.type) == null ? void 0 : k.displayName) || ((C = s == null ? void 0 : s.type) == null ? void 0 : C.name);
|
|
298
|
-
return
|
|
299
|
-
...
|
|
298
|
+
return F(s, {
|
|
299
|
+
...q(g),
|
|
300
300
|
...s.props
|
|
301
301
|
});
|
|
302
302
|
})
|
|
303
303
|
] });
|
|
304
304
|
}
|
|
305
305
|
);
|
|
306
|
-
|
|
307
|
-
const
|
|
308
|
-
t ? /* @__PURE__ */ o.jsx(
|
|
309
|
-
e ? /* @__PURE__ */ o.jsxs(
|
|
310
|
-
/* @__PURE__ */ o.jsx(
|
|
311
|
-
/* @__PURE__ */ o.jsx(
|
|
306
|
+
A.displayName = "Content";
|
|
307
|
+
const O = c(({ children: t, information: e, ...n }, r) => /* @__PURE__ */ o.jsxs(ut, { ref: r, w: "100%", ...n, children: [
|
|
308
|
+
t ? /* @__PURE__ */ o.jsx(pt, { children: t }) : null,
|
|
309
|
+
e ? /* @__PURE__ */ o.jsxs(xt, { children: [
|
|
310
|
+
/* @__PURE__ */ o.jsx(p, { color: "neutral-90", fontWeight: "bold", variant: "subtitle-sm", children: e.title }),
|
|
311
|
+
/* @__PURE__ */ o.jsx(p, { color: "neutral-90", mb: "0", mt: "md", variant: "sm", children: e.subtitle })
|
|
312
312
|
] }) : null
|
|
313
313
|
] }));
|
|
314
|
-
|
|
315
|
-
const
|
|
316
|
-
/* @__PURE__ */ o.jsx(
|
|
314
|
+
O.displayName = "Footer";
|
|
315
|
+
const R = c(({ icon: t, subtitle: e, title: n, ...r }, l) => /* @__PURE__ */ o.jsxs(ct, { ref: l, textAlign: t ? "center" : null, w: "100%", ...r, children: [
|
|
316
|
+
/* @__PURE__ */ o.jsx(_, { isOnHeader: !0 }),
|
|
317
317
|
t,
|
|
318
|
-
/* @__PURE__ */ o.jsx(
|
|
318
|
+
/* @__PURE__ */ o.jsx(p, { mb: e ? "lg" : 0, mt: t ? "xl" : 0, variant: "h4", children: n }),
|
|
319
319
|
e ? /* @__PURE__ */ o.jsx(mt, { children: e }) : null
|
|
320
320
|
] }));
|
|
321
|
-
|
|
321
|
+
R.displayName = "Header";
|
|
322
322
|
function zt(t) {
|
|
323
|
-
const { onClose: e, setOpen:
|
|
324
|
-
return
|
|
323
|
+
const { onClose: e, setOpen: n, ...r } = t || {};
|
|
324
|
+
return nt({
|
|
325
325
|
animated: !0,
|
|
326
326
|
setOpen: (u) => {
|
|
327
|
-
!u && e && e(),
|
|
327
|
+
!u && e && e(), n == null || n(u);
|
|
328
328
|
},
|
|
329
|
-
...
|
|
329
|
+
...r
|
|
330
330
|
});
|
|
331
331
|
}
|
|
332
332
|
const $t = c(
|
|
333
|
-
({ backdrop: t, hideOnInteractOutside: e, ...
|
|
334
|
-
hideOnInteractOutside: e,
|
|
335
|
-
ref: n,
|
|
336
|
-
...r
|
|
337
|
-
}) : null
|
|
333
|
+
({ backdrop: t, hideOnInteractOutside: e, ...n }, r) => t === !0 ? /* @__PURE__ */ o.jsx(z, { hideOnInteractOutside: e, ref: r, ...n }) : F(t, { hideOnInteractOutside: e, ref: r, ...n })
|
|
338
334
|
), yt = c(
|
|
339
335
|
({
|
|
340
336
|
ariaLabel: t,
|
|
341
337
|
/** for render property */
|
|
342
338
|
as: e = lt,
|
|
343
|
-
backdrop:
|
|
344
|
-
children:
|
|
345
|
-
hideOnInteractOutside:
|
|
339
|
+
backdrop: n = !0,
|
|
340
|
+
children: r,
|
|
341
|
+
hideOnInteractOutside: l = !0,
|
|
346
342
|
size: u = "lg",
|
|
347
343
|
store: m,
|
|
348
344
|
...y
|
|
349
|
-
},
|
|
345
|
+
}, h) => /* @__PURE__ */ o.jsx(
|
|
350
346
|
ot,
|
|
351
347
|
{
|
|
352
348
|
"aria-label": t,
|
|
353
|
-
backdrop:
|
|
354
|
-
hideOnInteractOutside:
|
|
355
|
-
ref:
|
|
349
|
+
backdrop: n ? /* @__PURE__ */ o.jsx($t, { backdrop: n, hideOnInteractOutside: l }) : null,
|
|
350
|
+
hideOnInteractOutside: l,
|
|
351
|
+
ref: h,
|
|
356
352
|
render: /* @__PURE__ */ o.jsx(e, { size: u }),
|
|
357
353
|
store: m,
|
|
358
354
|
...y,
|
|
359
|
-
children:
|
|
355
|
+
children: r
|
|
360
356
|
}
|
|
361
357
|
)
|
|
362
358
|
), P = c((t, e) => /* @__PURE__ */ o.jsx(dt, { ref: e, ...t }));
|
|
@@ -364,21 +360,21 @@ P.displayName = "Body";
|
|
|
364
360
|
const jt = (t) => {
|
|
365
361
|
const { modals: e } = w();
|
|
366
362
|
return /* @__PURE__ */ o.jsx("div", { children: /* @__PURE__ */ o.jsx(X, { ...e.cover, ...t }) });
|
|
367
|
-
},
|
|
368
|
-
|
|
363
|
+
}, bt = c(({ as: t, store: e, ...n }, r) => /* @__PURE__ */ o.jsx(
|
|
364
|
+
rt,
|
|
369
365
|
{
|
|
370
|
-
ref:
|
|
371
|
-
render: t ? (
|
|
366
|
+
ref: r,
|
|
367
|
+
render: t ? (l) => /* @__PURE__ */ o.jsx(t, { ...l }) : void 0,
|
|
372
368
|
store: e,
|
|
373
|
-
...
|
|
369
|
+
...n
|
|
374
370
|
}
|
|
375
371
|
)), It = Object.assign(yt, {
|
|
376
372
|
Body: P,
|
|
377
|
-
Content:
|
|
373
|
+
Content: A,
|
|
378
374
|
Cover: jt,
|
|
379
|
-
Footer:
|
|
380
|
-
Header:
|
|
381
|
-
Trigger:
|
|
375
|
+
Footer: O,
|
|
376
|
+
Header: R,
|
|
377
|
+
Trigger: bt
|
|
382
378
|
}), _t = gt;
|
|
383
379
|
export {
|
|
384
380
|
_t as AssetModal,
|
package/dist/Pagination.mjs
CHANGED
|
@@ -57,53 +57,55 @@ const S = d.navBox``, q = d.ulBox`
|
|
|
57
57
|
${n["aria-current"] && h("paginations.active")}
|
|
58
58
|
`
|
|
59
59
|
), f = 5, O = 3;
|
|
60
|
-
function Q({ page: n, pageCount: t, rangeDisplay:
|
|
60
|
+
function Q({ page: n, pageCount: t, rangeDisplay: r }) {
|
|
61
61
|
return z(() => {
|
|
62
|
-
if (t <=
|
|
62
|
+
if (t <= r || t <= f + 1)
|
|
63
63
|
return x(t, (l) => l + 1);
|
|
64
|
-
const e = U(n, t), c = e === "before" ? x(f, (l) => l + 1) : [1],
|
|
65
|
-
return V([c,
|
|
66
|
-
}, [n, t,
|
|
64
|
+
const e = U(n, t), c = e === "before" ? x(f, (l) => l + 1) : [1], i = e === "center" ? x(O, (l) => l + n - 1) : [], u = e === "after" ? x(f, (l) => l + t - f + 1) : [t];
|
|
65
|
+
return V([c, i, u], "-");
|
|
66
|
+
}, [n, t, r]);
|
|
67
67
|
}
|
|
68
68
|
function x(n, t) {
|
|
69
|
-
return Array.from({ length: n }, (
|
|
69
|
+
return Array.from({ length: n }, (r, e) => t(e));
|
|
70
70
|
}
|
|
71
71
|
function U(n, t) {
|
|
72
|
-
|
|
72
|
+
if (n < f) return "before";
|
|
73
|
+
if (n >= f && n <= t - f + 1) return "center";
|
|
74
|
+
if (n > t - f + 1) return "after";
|
|
73
75
|
}
|
|
74
76
|
function V(n, t) {
|
|
75
|
-
return n.reduce((
|
|
76
|
-
const
|
|
77
|
-
return
|
|
77
|
+
return n.reduce((r, e, c) => {
|
|
78
|
+
const i = [];
|
|
79
|
+
return i.push(...r), i.push(...e), e.length && c < n.length - 1 && i.push(t), i;
|
|
78
80
|
}, []);
|
|
79
81
|
}
|
|
80
82
|
const g = F(
|
|
81
83
|
({
|
|
82
84
|
"aria-label": n,
|
|
83
85
|
dataTestId: t,
|
|
84
|
-
getHref:
|
|
86
|
+
getHref: r,
|
|
85
87
|
leftArrow: e,
|
|
86
88
|
onChange: c,
|
|
87
|
-
page:
|
|
89
|
+
page: i,
|
|
88
90
|
pageCount: u,
|
|
89
91
|
rangeDisplay: l = 5,
|
|
90
92
|
rightArrow: A,
|
|
91
93
|
...D
|
|
92
94
|
}, L) => {
|
|
93
|
-
const w = Q({ page:
|
|
95
|
+
const w = Q({ page: i, pageCount: u, rangeDisplay: l }), $ = k(null), R = k(null), j = i === 1, v = i === u, E = p(
|
|
94
96
|
(s) => {
|
|
95
97
|
s.preventDefault();
|
|
96
|
-
const a =
|
|
97
|
-
a === 1 &&
|
|
98
|
+
const a = i - 1;
|
|
99
|
+
a === 1 && $.current.focus(), c(a);
|
|
98
100
|
},
|
|
99
|
-
[
|
|
101
|
+
[i, c]
|
|
100
102
|
), N = p(
|
|
101
103
|
(s) => {
|
|
102
104
|
s.preventDefault();
|
|
103
|
-
const a =
|
|
104
|
-
a === u &&
|
|
105
|
+
const a = i + 1;
|
|
106
|
+
a === u && R.current.focus(), c(a);
|
|
105
107
|
},
|
|
106
|
-
[
|
|
108
|
+
[i, u, c]
|
|
107
109
|
);
|
|
108
110
|
return /* @__PURE__ */ o.jsx(
|
|
109
111
|
S,
|
|
@@ -117,11 +119,11 @@ const g = F(
|
|
|
117
119
|
/* @__PURE__ */ o.jsx(m, { children: /* @__PURE__ */ o.jsx(
|
|
118
120
|
y,
|
|
119
121
|
{
|
|
120
|
-
"aria-disabled":
|
|
122
|
+
"aria-disabled": j,
|
|
121
123
|
"data-testid": t ? `${t}-arrow-prev` : void 0,
|
|
122
|
-
href:
|
|
123
|
-
onClick:
|
|
124
|
-
ref:
|
|
124
|
+
href: r ? r(j ? i : i - 1) : "",
|
|
125
|
+
onClick: j ? void 0 : E,
|
|
126
|
+
ref: $,
|
|
125
127
|
children: e || /* @__PURE__ */ o.jsx(G, { size: "sm" })
|
|
126
128
|
}
|
|
127
129
|
) }),
|
|
@@ -129,9 +131,9 @@ const g = F(
|
|
|
129
131
|
(s, a) => s === "-" ? /* @__PURE__ */ o.jsx(m, { children: /* @__PURE__ */ o.jsx(J, { children: "..." }) }, `${a}-`) : /* @__PURE__ */ o.jsx(m, { children: /* @__PURE__ */ o.jsx(
|
|
130
132
|
K,
|
|
131
133
|
{
|
|
132
|
-
"aria-current": s ===
|
|
134
|
+
"aria-current": s === i,
|
|
133
135
|
"data-testid": t ? `${t}-${s}` : void 0,
|
|
134
|
-
href:
|
|
136
|
+
href: r ? r(s) : "",
|
|
135
137
|
onClick: (P) => {
|
|
136
138
|
P.preventDefault(), c(s);
|
|
137
139
|
},
|
|
@@ -142,11 +144,11 @@ const g = F(
|
|
|
142
144
|
/* @__PURE__ */ o.jsx(m, { children: /* @__PURE__ */ o.jsx(
|
|
143
145
|
y,
|
|
144
146
|
{
|
|
145
|
-
"aria-disabled":
|
|
147
|
+
"aria-disabled": v,
|
|
146
148
|
"data-testid": t ? `${t}-arrow-next` : void 0,
|
|
147
|
-
href:
|
|
148
|
-
onClick:
|
|
149
|
-
ref:
|
|
149
|
+
href: r ? r(v ? i : i + 1) : "",
|
|
150
|
+
onClick: v ? void 0 : N,
|
|
151
|
+
ref: R,
|
|
150
152
|
children: A || /* @__PURE__ */ o.jsx(_, { size: "sm" })
|
|
151
153
|
}
|
|
152
154
|
) })
|
package/dist/PasswordInput.mjs
CHANGED
|
@@ -3,31 +3,31 @@ import { j as t } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
|
3
3
|
import { useState as c } from "react";
|
|
4
4
|
import { InputText as m } from "./InputText.mjs";
|
|
5
5
|
import { forwardRef as x } from "./System.mjs";
|
|
6
|
-
import { Button as
|
|
6
|
+
import { Button as l } from "./Button.mjs";
|
|
7
7
|
import "./Icon.mjs";
|
|
8
|
-
import { S as
|
|
8
|
+
import { S as d, H as u } from "./index-wl3X6EM1.mjs";
|
|
9
9
|
const f = ({
|
|
10
10
|
dataTestId: o,
|
|
11
11
|
isHidden: s,
|
|
12
12
|
onClick: r,
|
|
13
13
|
title: e
|
|
14
14
|
}) => /* @__PURE__ */ t.jsx(
|
|
15
|
-
|
|
15
|
+
l,
|
|
16
16
|
{
|
|
17
17
|
"aria-controls": "password",
|
|
18
18
|
"aria-expanded": `${!s}`,
|
|
19
|
-
dataTestId: o ? `${o}-action` :
|
|
19
|
+
dataTestId: o ? `${o}-action` : null,
|
|
20
20
|
onClick: r,
|
|
21
21
|
shape: "circle",
|
|
22
22
|
size: "xs",
|
|
23
23
|
title: e,
|
|
24
24
|
variant: "ghost",
|
|
25
|
-
children: s ? /* @__PURE__ */ t.jsx(
|
|
25
|
+
children: s ? /* @__PURE__ */ t.jsx(d, {}) : /* @__PURE__ */ t.jsx(u, {})
|
|
26
26
|
}
|
|
27
27
|
), w = x(
|
|
28
28
|
({ dataTestId: o, title: s, ...r }, e) => {
|
|
29
|
-
const [n,
|
|
30
|
-
p
|
|
29
|
+
const [n, a] = c("password"), p = n === "password", i = () => {
|
|
30
|
+
a(p ? "text" : "password");
|
|
31
31
|
};
|
|
32
32
|
return /* @__PURE__ */ t.jsx(
|
|
33
33
|
m,
|
|
@@ -38,8 +38,8 @@ const f = ({
|
|
|
38
38
|
f,
|
|
39
39
|
{
|
|
40
40
|
dataTestId: o,
|
|
41
|
-
isHidden:
|
|
42
|
-
onClick:
|
|
41
|
+
isHidden: p,
|
|
42
|
+
onClick: i,
|
|
43
43
|
title: s
|
|
44
44
|
}
|
|
45
45
|
),
|