welcome-ui 8.0.0 → 8.1.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/AXB53BZF-XKOjjeWO.mjs +25 -0
- package/dist/Accordion.mjs +30 -23
- package/dist/Alert.mjs +76 -70
- package/dist/AspectRatio.mjs +8 -10
- package/dist/Avatar.mjs +48 -47
- package/dist/{BYC7LY2E-CVjUW1dr.mjs → BYC7LY2E-CWSI38FM.mjs} +355 -351
- package/dist/Badge.mjs +25 -25
- package/dist/Box.mjs +5 -5
- package/dist/Breadcrumb.mjs +173 -168
- package/dist/Button.mjs +72 -67
- package/dist/ButtonGroup.mjs +13 -12
- package/dist/Card.mjs +14 -14
- package/dist/Checkbox.mjs +2 -2
- package/dist/ClearButton.mjs +15 -15
- package/dist/CloseButton.mjs +9 -9
- package/dist/{CustomInput-D_13Gd_3.mjs → CustomPopper-CZt4RioF.mjs} +3200 -3047
- package/dist/DatePicker.mjs +81 -80
- package/dist/DateTimePicker.mjs +67 -62
- package/dist/DateTimePickerCommon.mjs +1 -1
- package/dist/Drawer.mjs +190 -174
- package/dist/DropdownMenu.mjs +389 -386
- package/dist/Field.mjs +104 -92
- package/dist/FieldGroup.mjs +12 -9
- package/dist/FileDrop.mjs +613 -576
- package/dist/FileUpload.mjs +95 -74
- package/dist/Files.mjs +46 -46
- package/dist/Flex.mjs +13 -13
- package/dist/Grid.mjs +29 -29
- package/dist/Hint.mjs +12 -12
- package/dist/ITI7HKP4-C89kOQb8.mjs +474 -0
- package/dist/Icon.mjs +24 -24
- package/dist/Icons.mjs +988 -988
- package/dist/IconsFont.mjs +159 -159
- package/dist/InputText.mjs +65 -57
- package/dist/{JC64G2H7-Dey-8h60.mjs → JC64G2H7-afsomHuH.mjs} +109 -108
- package/dist/KUU7WJ55-CzsjuIMv.mjs +61 -0
- package/dist/LVA2YJMS-C-kJ1lkr.mjs +873 -0
- package/dist/Label.mjs +37 -35
- package/dist/Link.mjs +28 -24
- package/dist/Loader.mjs +20 -16
- package/dist/Logo.mjs +55 -42
- package/dist/MTZPJQMC-TybFZCho.mjs +15 -0
- package/dist/Modal.mjs +276 -253
- package/dist/NLEBE274-oSxMftGy.mjs +84 -0
- package/dist/P2CTZE2T-DOT1mNnX.mjs +301 -0
- package/dist/P4IRICAX-CWSZLTGz.mjs +37 -0
- package/dist/Pagination.mjs +104 -104
- package/dist/PasswordInput.mjs +35 -34
- package/dist/Picker.mjs +35 -33
- package/dist/Popover.mjs +100 -93
- package/dist/QYJ6MIDR-DJ-vUdAM.mjs +98 -0
- package/dist/Radio.mjs +58 -52
- package/dist/RadioGroup.mjs +46 -46
- package/dist/RadioTab.mjs +37 -35
- package/dist/{SYRFVSLH-cVmYtx36.mjs → SYRFVSLH-B6m278Vb.mjs} +18 -17
- package/dist/Search.mjs +175 -161
- package/dist/Select.mjs +885 -847
- package/dist/Shape.mjs +9 -9
- package/dist/Slider.mjs +359 -336
- package/dist/Stack.mjs +22 -24
- package/dist/Swiper.mjs +324 -311
- package/dist/Table.mjs +23 -23
- package/dist/Tabs.mjs +250 -245
- package/dist/Tag.mjs +51 -49
- package/dist/Text.mjs +49 -47
- package/dist/Textarea.mjs +39 -39
- package/dist/TimePicker.mjs +57 -56
- package/dist/Toast.mjs +144 -137
- package/dist/Toggle.mjs +27 -24
- package/dist/Tooltip.mjs +115 -111
- package/dist/UniversalLink.mjs +16 -16
- package/dist/VEVQD5MH-0w9Y7Ytc.mjs +20 -0
- package/dist/{VGCJ63VH-B39w1tBw.mjs → VGCJ63VH-C0UPBY-5.mjs} +61 -62
- package/dist/VariantIcon.mjs +14 -22
- package/dist/WelcomeLoader.mjs +4863 -9223
- package/dist/WuiProvider.mjs +69 -58
- package/dist/X5NMLKT6-BJw3xE-K.mjs +25 -0
- package/dist/YV4JVR4I-DPC8mMuG.mjs +344 -0
- package/dist/downshift.esm-B7Jil1wW.mjs +1082 -0
- package/dist/{field-styles-DLIhqG_8.mjs → field-styles-BVlRlvuu.mjs} +2 -2
- package/dist/{hex-to-rgba-BIDK-3ab.mjs → hex-to-rgba-DU_XzKIK.mjs} +2 -2
- package/dist/hide-focus-rings-root-CCXdysih.mjs +15 -0
- package/dist/index-5HBq1O6Z.mjs +185 -0
- package/dist/{index-C7zM96J_.mjs → index-BaLGEKs7.mjs} +8 -8
- package/dist/{index-BYdkhqH4.mjs → index-CBBbX29m.mjs} +3652 -3584
- package/dist/index-CYmF7qCH.mjs +11 -0
- package/dist/index-C_k-m0Rl.mjs +36 -0
- package/dist/index-D8v_VJ9z.mjs +26 -0
- package/dist/{index-BNGGwOCo.mjs → index-DAZ1SYdj.mjs} +7 -7
- package/dist/{index-SbQUT2mU.mjs → index-DgSynio4.mjs} +244 -239
- package/dist/index-DpkNUfAS.mjs +11 -0
- package/dist/{index-DqBUFsqP.mjs → index-DvzWKxKE.mjs} +7 -7
- package/dist/{index-BJAZgeHL.mjs → index-QaLwIvZS.mjs} +8 -8
- package/dist/{index-BQtDgQBH.mjs → index-SQQQ4dEE.mjs} +8 -8
- package/dist/index-i_anpNhw.mjs +66 -0
- package/dist/index-wl3X6EM1.mjs +16 -0
- package/dist/jsx-runtime-B7I4PJ0H.mjs +613 -0
- package/dist/radio-group-C0fUHvam.mjs +52 -0
- package/dist/theme.mjs +1175 -1120
- package/dist/throttle-CW18pWlW.mjs +13 -0
- package/dist/types/components/Accordion/index.d.ts +1 -1
- 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/index.d.ts +2 -2
- package/dist/types/components/Alert/styles.d.ts +9 -9
- package/dist/types/components/Alert/theme.d.ts +4 -4
- package/dist/types/components/Avatar/index.d.ts +2 -3
- package/dist/types/components/Avatar/styles.d.ts +8 -8
- package/dist/types/components/Avatar/theme.d.ts +3 -3
- package/dist/types/components/Avatar/utils.d.ts +1 -1
- package/dist/types/components/Badge/index.d.ts +2 -2
- package/dist/types/components/Badge/styles.d.ts +5 -5
- package/dist/types/components/Badge/theme.d.ts +1 -1
- package/dist/types/components/Breadcrumb/Item.d.ts +1 -1
- package/dist/types/components/Breadcrumb/index.d.ts +2 -2
- package/dist/types/components/Breadcrumb/theme.d.ts +1 -1
- package/dist/types/components/Button/index.d.ts +4 -5
- package/dist/types/components/Button/styles.d.ts +1 -1
- package/dist/types/components/Button/theme.d.ts +7 -7
- package/dist/types/components/ButtonGroup/index.d.ts +3 -3
- package/dist/types/components/Card/Cover.styles.d.ts +4 -4
- package/dist/types/components/Card/index.d.ts +2 -3
- package/dist/types/components/Card/theme.d.ts +1 -1
- package/dist/types/components/Checkbox/index.d.ts +2 -2
- 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 +5 -6
- package/dist/types/components/ClearButton/styles.d.ts +4 -4
- package/dist/types/components/CloseButton/styles.d.ts +4 -4
- package/dist/types/components/DatePicker/index.d.ts +3 -3
- package/dist/types/components/DateTimePicker/index.d.ts +2 -2
- package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/CustomInput.d.ts +5 -5
- package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/index.d.ts +2 -2
- package/dist/types/components/DateTimePickerCommon/theme.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/utils.d.ts +2 -2
- package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +1 -1
- package/dist/types/components/Drawer/AssetDrawer/index.d.ts +1 -1
- package/dist/types/components/Drawer/index.d.ts +12 -12
- package/dist/types/components/Drawer/styles.d.ts +5 -5
- package/dist/types/components/Drawer/theme.d.ts +2 -2
- package/dist/types/components/DropdownMenu/index.d.ts +4 -4
- package/dist/types/components/DropdownMenu/theme.d.ts +1 -1
- package/dist/types/components/Field/index.d.ts +8 -8
- package/dist/types/components/Field/styles.d.ts +1 -1
- package/dist/types/components/Field/utils.d.ts +1 -1
- package/dist/types/components/FileDrop/FilePreview.d.ts +2 -2
- package/dist/types/components/FileDrop/Message.d.ts +1 -1
- package/dist/types/components/FileDrop/index.d.ts +20 -20
- package/dist/types/components/FileDrop/theme.d.ts +1 -1
- package/dist/types/components/FileUpload/index.d.ts +13 -13
- package/dist/types/components/Files/index.d.ts +5 -5
- package/dist/types/components/Files/types.d.ts +1 -1
- package/dist/types/components/Hint/index.d.ts +1 -2
- package/dist/types/components/Hint/theme.d.ts +1 -1
- package/dist/types/components/Icon/index.d.ts +3 -3
- package/dist/types/components/Icon/styles.d.ts +3 -3
- package/dist/types/components/Icon/theme.d.ts +3 -3
- package/dist/types/components/Icons/Sun/content.json.d.ts +2 -1
- package/dist/types/components/Icons/index.d.ts +2 -2
- package/dist/types/components/IconsFont/index.d.ts +2 -3
- package/dist/types/components/IconsFont/styles.d.ts +1 -1
- package/dist/types/components/InputText/index.d.ts +1 -1
- package/dist/types/components/InputText/styles.d.ts +1 -1
- package/dist/types/components/Label/index.d.ts +2 -3
- package/dist/types/components/Label/theme.d.ts +1 -1
- package/dist/types/components/Link/index.d.ts +5 -5
- 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/index.d.ts +1 -1
- package/dist/types/components/Loader/styles.d.ts +4 -4
- package/dist/types/components/Loader/theme.d.ts +4 -4
- package/dist/types/components/Logo/Solutions.d.ts +1 -2
- package/dist/types/components/Logo/Symbol.d.ts +1 -2
- package/dist/types/components/Logo/Wui.d.ts +1 -2
- package/dist/types/components/Logo/index.d.ts +5 -5
- package/dist/types/components/Modal/Assets/Backdrop.d.ts +5 -6
- package/dist/types/components/Modal/Assets/Iframe.d.ts +1 -2
- package/dist/types/components/Modal/Assets/index.d.ts +9 -9
- package/dist/types/components/Modal/Assets/styles.d.ts +8 -8
- package/dist/types/components/Modal/Close.d.ts +3 -4
- package/dist/types/components/Modal/Content.d.ts +4 -5
- package/dist/types/components/Modal/Footer.d.ts +1 -1
- package/dist/types/components/Modal/Header.d.ts +2 -2
- package/dist/types/components/Modal/index.d.ts +17 -17
- package/dist/types/components/Modal/styles.d.ts +7 -7
- package/dist/types/components/Modal/theme.d.ts +2 -2
- package/dist/types/components/Pagination/index.d.ts +2 -2
- package/dist/types/components/Pagination/theme.d.ts +1 -1
- package/dist/types/components/Pagination/utils.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/Arrow.d.ts +1 -2
- package/dist/types/components/Popover/Content.d.ts +2 -3
- package/dist/types/components/Popover/Popover.d.ts +4 -5
- package/dist/types/components/Popover/PopoverHover.d.ts +3 -4
- package/dist/types/components/Popover/Trigger.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/Popover/usePopover.d.ts +6 -6
- package/dist/types/components/Radio/index.d.ts +3 -3
- package/dist/types/components/Radio/styles.d.ts +5 -5
- package/dist/types/components/Radio/theme.d.ts +1 -1
- package/dist/types/components/RadioGroup/index.d.ts +2 -2
- package/dist/types/components/RadioTab/index.d.ts +3 -3
- package/dist/types/components/RadioTab/styles.d.ts +3 -9
- package/dist/types/components/RadioTab/theme.d.ts +1 -1
- package/dist/types/components/Search/index.d.ts +5 -5
- package/dist/types/components/Select/index.d.ts +11 -11
- package/dist/types/components/Select/styles.d.ts +6 -6
- package/dist/types/components/Select/utils.d.ts +11 -7
- package/dist/types/components/Shape/index.d.ts +1 -1
- package/dist/types/components/Shape/styles.d.ts +3 -3
- package/dist/types/components/Slider/Range.d.ts +3 -3
- package/dist/types/components/Slider/index.d.ts +2 -2
- package/dist/types/components/Slider/styles.d.ts +16 -16
- package/dist/types/components/Slider/theme.d.ts +1 -1
- package/dist/types/components/Stack/index.d.ts +1 -1
- package/dist/types/components/Swiper/index.d.ts +17 -18
- package/dist/types/components/Swiper/styles.d.ts +56 -56
- package/dist/types/components/Swiper/theme.d.ts +1 -1
- package/dist/types/components/System/index.d.ts +14 -14
- package/dist/types/components/Table/index.d.ts +6 -7
- package/dist/types/components/Table/styles.d.ts +1 -1
- package/dist/types/components/Table/theme.d.ts +1 -1
- package/dist/types/components/Tabs/ActiveBar.d.ts +5 -5
- package/dist/types/components/Tabs/TabList.d.ts +4 -4
- package/dist/types/components/Tabs/TabPanel.d.ts +2 -2
- package/dist/types/components/Tabs/styles.d.ts +2 -2
- package/dist/types/components/Tabs/theme.d.ts +2 -2
- package/dist/types/components/Tag/index.d.ts +2 -3
- package/dist/types/components/Tag/styles.d.ts +1 -1
- package/dist/types/components/Tag/theme.d.ts +3 -3
- package/dist/types/components/Text/index.d.ts +2 -2
- package/dist/types/components/Textarea/index.d.ts +1 -1
- package/dist/types/components/Textarea/theme.d.ts +1 -1
- package/dist/types/components/TimePicker/index.d.ts +2 -2
- package/dist/types/components/Toast/Growl.d.ts +1 -1
- package/dist/types/components/Toast/Snackbar.d.ts +1 -1
- package/dist/types/components/Toast/ToastWrapper.d.ts +5 -5
- package/dist/types/components/Toast/index.d.ts +6 -6
- package/dist/types/components/Toast/styles.d.ts +16 -16
- package/dist/types/components/Toast/theme.d.ts +2 -2
- package/dist/types/components/Toast/utils.d.ts +13 -13
- package/dist/types/components/Toggle/index.d.ts +3 -3
- package/dist/types/components/Toggle/styles.d.ts +5 -4
- package/dist/types/components/Toggle/theme.d.ts +6 -6
- 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/index.d.ts +1 -1
- package/dist/types/components/VariantIcon/styles.d.ts +1 -1
- package/dist/types/components/VariantIcon/theme.d.ts +3 -3
- package/dist/types/components/WuiProvider/font.d.ts +3 -5
- package/dist/types/components/WuiProvider/index.d.ts +1 -1
- package/dist/types/theme/colors.d.ts +3 -11
- package/dist/types/theme/dark.d.ts +1 -1
- package/dist/types/theme/defaultFields.d.ts +10 -10
- package/dist/types/theme/fonts.d.ts +5 -5
- package/dist/types/theme/index.d.ts +31 -31
- package/dist/types/theme/screens.d.ts +1 -1
- package/dist/types/theme/space.d.ts +1 -1
- package/dist/types/theme/typography.d.ts +1 -1
- package/dist/types/utils/field-styles.d.ts +6 -6
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/utils/ts-utils.d.ts +1 -1
- package/dist/types/utils/use-copy-text.d.ts +1 -1
- package/dist/types/utils/use-create-portal.d.ts +1 -1
- package/dist/types/utils/use-viewport.d.ts +2 -2
- package/dist/types/utils/wrap-children.d.ts +1 -1
- package/dist/{use-fork-ref-CUZErtAC.mjs → use-fork-ref-DvaCTfQ_.mjs} +4 -3
- package/dist/use-viewport-CWpjoHXy.mjs +16 -0
- package/dist/utils.mjs +96 -85
- package/dist/wrap-children-DBSD-X5-.mjs +9 -0
- package/package.json +9 -36
- package/dist/AXB53BZF-CGoc4K3d.mjs +0 -25
- package/dist/ITI7HKP4-BONrZ9Pq.mjs +0 -473
- package/dist/KUU7WJ55-3sP-w1F1.mjs +0 -61
- package/dist/LVA2YJMS-qFC9J-lt.mjs +0 -1479
- package/dist/MTZPJQMC-C0Xe_WK4.mjs +0 -13
- package/dist/NLEBE274-C94QU78N.mjs +0 -84
- package/dist/P2CTZE2T-YPes1GXe.mjs +0 -297
- package/dist/P4IRICAX-DzXqUYe-.mjs +0 -37
- package/dist/QYJ6MIDR-BLLqyXdd.mjs +0 -97
- package/dist/VEVQD5MH-ZMnHV8ZJ.mjs +0 -20
- package/dist/X5NMLKT6-uFSu0Lii.mjs +0 -25
- package/dist/YV4JVR4I-BGfUf3Nu.mjs +0 -341
- package/dist/downshift.esm-CEHW4VDy.mjs +0 -1085
- package/dist/hide-focus-rings-root-BNyva1yb.mjs +0 -14
- package/dist/index-BDeIsk2X.mjs +0 -184
- package/dist/index-BRDOakbf.mjs +0 -11
- package/dist/index-BpRjq7lj.mjs +0 -11
- package/dist/index-BrfXjmHY.mjs +0 -36
- package/dist/index-CExLVjET.mjs +0 -26
- package/dist/index-DEJJvyGk.mjs +0 -66
- package/dist/index-u1oHKa7X.mjs +0 -16
- package/dist/radio-group-CGC6DTFJ.mjs +0 -51
- package/dist/throttle-BDBzFeFj.mjs +0 -13
- package/dist/use-viewport-m3glsbna.mjs +0 -16
- package/dist/wrap-children-aq69jtFP.mjs +0 -12
package/dist/PasswordInput.mjs
CHANGED
|
@@ -1,55 +1,56 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
2
|
+
import { j as t } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
|
+
import { useState as c } from "react";
|
|
4
|
+
import { InputText as m } from "./InputText.mjs";
|
|
5
|
+
import { forwardRef as x } from "./System.mjs";
|
|
6
|
+
import { Button as d } from "./Button.mjs";
|
|
3
7
|
import "./Icon.mjs";
|
|
4
|
-
import { S as l, H as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const w = ({
|
|
9
|
-
dataTestId: e,
|
|
10
|
-
isHidden: o,
|
|
8
|
+
import { S as l, H as u } from "./index-wl3X6EM1.mjs";
|
|
9
|
+
const f = ({
|
|
10
|
+
dataTestId: o,
|
|
11
|
+
isHidden: s,
|
|
11
12
|
onClick: r,
|
|
12
|
-
title:
|
|
13
|
-
}) => /* @__PURE__ */ t.
|
|
14
|
-
|
|
13
|
+
title: e
|
|
14
|
+
}) => /* @__PURE__ */ t.jsx(
|
|
15
|
+
d,
|
|
15
16
|
{
|
|
16
17
|
"aria-controls": "password",
|
|
17
|
-
"aria-expanded": `${!
|
|
18
|
-
dataTestId:
|
|
18
|
+
"aria-expanded": `${!s}`,
|
|
19
|
+
dataTestId: o && `${o}-action`,
|
|
19
20
|
onClick: r,
|
|
20
21
|
shape: "circle",
|
|
21
22
|
size: "xs",
|
|
22
|
-
title:
|
|
23
|
-
variant: "ghost"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
),
|
|
27
|
-
({ dataTestId:
|
|
28
|
-
const [
|
|
29
|
-
|
|
23
|
+
title: e,
|
|
24
|
+
variant: "ghost",
|
|
25
|
+
children: s ? /* @__PURE__ */ t.jsx(l, {}) : /* @__PURE__ */ t.jsx(u, {})
|
|
26
|
+
}
|
|
27
|
+
), w = x(
|
|
28
|
+
({ dataTestId: o, title: s, ...r }, e) => {
|
|
29
|
+
const [n, a] = c("password"), p = n === "password", i = () => {
|
|
30
|
+
a(p ? "text" : "password");
|
|
30
31
|
};
|
|
31
|
-
return /* @__PURE__ */ t.
|
|
32
|
-
|
|
32
|
+
return /* @__PURE__ */ t.jsx(
|
|
33
|
+
m,
|
|
33
34
|
{
|
|
34
35
|
...r,
|
|
35
|
-
dataTestId:
|
|
36
|
-
icon: /* @__PURE__ */ t.
|
|
37
|
-
|
|
36
|
+
dataTestId: o,
|
|
37
|
+
icon: /* @__PURE__ */ t.jsx(
|
|
38
|
+
f,
|
|
38
39
|
{
|
|
39
|
-
dataTestId:
|
|
40
|
-
isHidden:
|
|
41
|
-
onClick:
|
|
42
|
-
title:
|
|
40
|
+
dataTestId: o,
|
|
41
|
+
isHidden: p,
|
|
42
|
+
onClick: i,
|
|
43
|
+
title: s
|
|
43
44
|
}
|
|
44
45
|
),
|
|
45
46
|
iconPlacement: "right",
|
|
46
|
-
ref:
|
|
47
|
-
type:
|
|
47
|
+
ref: e,
|
|
48
|
+
type: n
|
|
48
49
|
}
|
|
49
50
|
);
|
|
50
51
|
}
|
|
51
52
|
);
|
|
52
|
-
|
|
53
|
+
w.displayName = "PasswordInput";
|
|
53
54
|
export {
|
|
54
|
-
|
|
55
|
+
w as PasswordInput
|
|
55
56
|
};
|
package/dist/Picker.mjs
CHANGED
|
@@ -1,46 +1,48 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { u as
|
|
10
|
-
const h =
|
|
2
|
+
import { j as o } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
|
+
import { Box as u } from "./Box.mjs";
|
|
4
|
+
import { FieldGroup as R } from "./FieldGroup.mjs";
|
|
5
|
+
import { Label as $ } from "./Label.mjs";
|
|
6
|
+
import { shouldForwardProp as j, forwardRef as n } from "./System.mjs";
|
|
7
|
+
import k, { system as y } from "@xstyled/styled-components";
|
|
8
|
+
import { R as b } from "./NLEBE274-oSxMftGy.mjs";
|
|
9
|
+
import { u as w, R as P } from "./radio-group-C0fUHvam.mjs";
|
|
10
|
+
const h = k(b).withConfig({ shouldForwardProp: j })`
|
|
11
11
|
position: absolute;
|
|
12
12
|
top: 0;
|
|
13
13
|
left: 0;
|
|
14
14
|
opacity: 0;
|
|
15
15
|
|
|
16
|
-
${
|
|
17
|
-
`, F =
|
|
18
|
-
({ dataTestId:
|
|
19
|
-
const
|
|
20
|
-
|
|
16
|
+
${y};
|
|
17
|
+
`, F = n(
|
|
18
|
+
({ dataTestId: s, label: m, name: t, onChange: e, options: p, required: a, value: l, ...c }, d) => {
|
|
19
|
+
const f = w({ defaultValue: l }), x = (r) => {
|
|
20
|
+
r.stopPropagation(), e == null || e(r);
|
|
21
21
|
};
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
|
|
22
|
+
return /* @__PURE__ */ o.jsx(
|
|
23
|
+
R,
|
|
24
24
|
{
|
|
25
|
-
...
|
|
25
|
+
...c,
|
|
26
26
|
as: P,
|
|
27
|
-
dataTestId:
|
|
27
|
+
dataTestId: s,
|
|
28
28
|
mb: 0,
|
|
29
|
-
ref:
|
|
30
|
-
required:
|
|
31
|
-
store:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
29
|
+
ref: d,
|
|
30
|
+
required: a,
|
|
31
|
+
store: f,
|
|
32
|
+
children: /* @__PURE__ */ o.jsx(u, { display: "flex", flexWrap: "wrap", children: p.map(({ element: r, value: i }) => /* @__PURE__ */ o.jsxs(
|
|
33
|
+
$,
|
|
34
|
+
{
|
|
35
|
+
checkableField: !0,
|
|
36
|
+
dataTestId: s && `${s}-item-${t}-${i}`,
|
|
37
|
+
onClick: x,
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ o.jsx(h, { name: t, value: i }),
|
|
40
|
+
/* @__PURE__ */ o.jsx(r, { selected: l === i })
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
`${m}-${t}-${i}`
|
|
44
|
+
)) })
|
|
45
|
+
}
|
|
44
46
|
);
|
|
45
47
|
}
|
|
46
48
|
);
|
package/dist/Popover.mjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { forwardRef as i } from "./System.mjs";
|
|
2
|
+
import { j as e } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
|
+
import { forwardRef as c } from "./System.mjs";
|
|
4
|
+
import { Box as h } from "./Box.mjs";
|
|
5
|
+
import { Button as x } from "./Button.mjs";
|
|
7
6
|
import "./Icon.mjs";
|
|
8
|
-
import { C as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
import { C as j } from "./index-BaLGEKs7.mjs";
|
|
8
|
+
import i, { th as p, css as l, system as m } from "@xstyled/styled-components";
|
|
9
|
+
import { P, a as d } from "./QYJ6MIDR-DJ-vUdAM.mjs";
|
|
10
|
+
import { P as $, H as C, a as w, u as H, b as B } from "./BYC7LY2E-CWSI38FM.mjs";
|
|
11
|
+
const T = i(P)`
|
|
12
|
+
color: ${p("popovers.default.backgroundColor")};
|
|
13
|
+
`, b = i.svgBox(
|
|
14
|
+
({ $transform: t }) => l`
|
|
15
15
|
transform: ${t};
|
|
16
16
|
`
|
|
17
|
-
),
|
|
18
|
-
${
|
|
19
|
-
`, u =
|
|
17
|
+
), v = i.div`
|
|
18
|
+
${p("popovers.content")};
|
|
19
|
+
`, u = i.h6`
|
|
20
20
|
margin: 0;
|
|
21
|
-
${
|
|
22
|
-
`, f =
|
|
23
|
-
({ $withCloseButton: t }) =>
|
|
24
|
-
${
|
|
21
|
+
${p("popovers.title")};
|
|
22
|
+
`, f = i($)(
|
|
23
|
+
({ $withCloseButton: t }) => l`
|
|
24
|
+
${p("popovers.default")};
|
|
25
25
|
outline: none;
|
|
26
26
|
opacity: 0;
|
|
27
27
|
transition: opacity 150ms ease-in-out;
|
|
@@ -32,113 +32,120 @@ const b = a(h)`
|
|
|
32
32
|
opacity: 1;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
${t &&
|
|
35
|
+
${t && l`
|
|
36
36
|
${u} {
|
|
37
37
|
padding-right: 50;
|
|
38
38
|
}
|
|
39
39
|
`}
|
|
40
40
|
`
|
|
41
41
|
);
|
|
42
|
-
|
|
42
|
+
i(d)`
|
|
43
43
|
${m};
|
|
44
44
|
`;
|
|
45
|
-
const y =
|
|
45
|
+
const y = i(C)`
|
|
46
46
|
${m};
|
|
47
|
-
`, Z =
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
`, Z = {
|
|
48
|
+
bottom: "rotateZ(360deg)",
|
|
49
|
+
left: "rotateZ(90deg)",
|
|
50
|
+
right: "rotateZ(-90deg)",
|
|
51
|
+
top: "rotateZ(180deg)"
|
|
52
|
+
}, A = ({ store: t }) => {
|
|
53
|
+
const r = t.useState("currentPlacement"), [o] = r.split("-"), n = Z[o];
|
|
54
|
+
return /* @__PURE__ */ e.jsx(T, { store: t, children: /* @__PURE__ */ e.jsxs(b, { $transform: n, h: 30, w: 30, xmlns: "http://www.w3.org/2000/svg", children: [
|
|
55
|
+
/* @__PURE__ */ e.jsx("path", { d: "M7 30L15 22L23 30H7Z", fill: "currentColor", fillRule: "nonzero", id: "stroke" }),
|
|
56
|
+
/* @__PURE__ */ e.jsx("path", { d: "M8 30L15 23L22 30H8Z", fill: "currentColor", fillRule: "nonzero" })
|
|
57
|
+
] }) });
|
|
58
|
+
}, g = ({ children: t, onClose: r, store: o }) => {
|
|
59
|
+
const n = () => {
|
|
60
|
+
r && r(), o == null || o.hide();
|
|
61
|
+
}, { withCloseButton: s } = o;
|
|
62
|
+
return /* @__PURE__ */ e.jsxs(h, { position: "relative", children: [
|
|
63
|
+
/* @__PURE__ */ e.jsx(A, { store: o }),
|
|
64
|
+
t,
|
|
65
|
+
s && /* @__PURE__ */ e.jsx(
|
|
66
|
+
x,
|
|
67
|
+
{
|
|
68
|
+
flex: "0 0 auto",
|
|
69
|
+
ml: "md",
|
|
70
|
+
onClick: n,
|
|
71
|
+
position: "absolute",
|
|
72
|
+
right: 1,
|
|
73
|
+
shape: "square",
|
|
74
|
+
size: "xs",
|
|
75
|
+
top: 1,
|
|
76
|
+
variant: "secondary",
|
|
77
|
+
children: /* @__PURE__ */ e.jsx(j, {})
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
] });
|
|
81
|
+
}, L = c(
|
|
82
|
+
({ as: t, store: r, ...o }, n) => /* @__PURE__ */ e.jsx(
|
|
83
|
+
d,
|
|
50
84
|
{
|
|
51
85
|
ref: n,
|
|
52
|
-
render: t ? (s) => /* @__PURE__ */
|
|
53
|
-
store:
|
|
54
|
-
...
|
|
86
|
+
render: t ? (s) => /* @__PURE__ */ e.jsx(t, { ...s }) : void 0,
|
|
87
|
+
store: r,
|
|
88
|
+
...o
|
|
55
89
|
}
|
|
56
90
|
)
|
|
57
|
-
),
|
|
58
|
-
({ as: t, store:
|
|
59
|
-
),
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
left: "rotateZ(90deg)"
|
|
64
|
-
}, R = ({ store: t }) => {
|
|
65
|
-
const o = t.useState("currentPlacement"), [e] = o.split("-"), n = L[e];
|
|
66
|
-
return /* @__PURE__ */ r.createElement(b, { store: t }, /* @__PURE__ */ r.createElement(x, { $transform: n, h: 30, w: 30, xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ r.createElement("path", { d: "M7 30L15 22L23 30H7Z", fill: "currentColor", fillRule: "nonzero", id: "stroke" }), /* @__PURE__ */ r.createElement("path", { d: "M8 30L15 23L22 30H8Z", fill: "currentColor", fillRule: "nonzero" })));
|
|
67
|
-
}, g = ({ children: t, onClose: o, store: e }) => {
|
|
68
|
-
const n = () => {
|
|
69
|
-
o && o(), e == null || e.hide();
|
|
70
|
-
}, { withCloseButton: s } = e;
|
|
71
|
-
return /* @__PURE__ */ r.createElement(B, { position: "relative" }, /* @__PURE__ */ r.createElement(R, { store: e }), t, s && /* @__PURE__ */ r.createElement(
|
|
72
|
-
T,
|
|
73
|
-
{
|
|
74
|
-
flex: "0 0 auto",
|
|
75
|
-
ml: "md",
|
|
76
|
-
onClick: n,
|
|
77
|
-
position: "absolute",
|
|
78
|
-
right: 1,
|
|
79
|
-
shape: "square",
|
|
80
|
-
size: "xs",
|
|
81
|
-
top: 1,
|
|
82
|
-
variant: "secondary"
|
|
83
|
-
},
|
|
84
|
-
/* @__PURE__ */ r.createElement(H, null)
|
|
85
|
-
));
|
|
86
|
-
}, k = i(
|
|
87
|
-
({ children: t, onClose: o, store: e, ...n }, s) => {
|
|
88
|
-
const { withCloseButton: c } = e;
|
|
89
|
-
return /* @__PURE__ */ r.createElement(f, { $withCloseButton: c, ref: s, store: e, ...n }, /* @__PURE__ */ r.createElement(g, { onClose: o, store: e }, t));
|
|
91
|
+
), R = c(
|
|
92
|
+
({ as: t, store: r, ...o }, n) => /* @__PURE__ */ e.jsx(y, { store: r, ...o, forwardedAs: t, ref: n })
|
|
93
|
+
), k = c(
|
|
94
|
+
({ children: t, onClose: r, store: o, ...n }, s) => {
|
|
95
|
+
const { withCloseButton: a } = o;
|
|
96
|
+
return /* @__PURE__ */ e.jsx(f, { $withCloseButton: a, ref: s, store: o, ...n, children: /* @__PURE__ */ e.jsx(g, { onClose: r, store: o, children: t }) });
|
|
90
97
|
}
|
|
91
|
-
),
|
|
92
|
-
Content:
|
|
98
|
+
), J = Object.assign(k, {
|
|
99
|
+
Content: v,
|
|
93
100
|
Title: u,
|
|
94
|
-
Trigger:
|
|
95
|
-
}), z =
|
|
96
|
-
({ children: t, onClose:
|
|
97
|
-
const { withCloseButton:
|
|
98
|
-
return /* @__PURE__ */
|
|
101
|
+
Trigger: L
|
|
102
|
+
}), z = c(
|
|
103
|
+
({ children: t, onClose: r, store: o, ...n }, s) => {
|
|
104
|
+
const { withCloseButton: a } = o;
|
|
105
|
+
return /* @__PURE__ */ e.jsx(
|
|
99
106
|
f,
|
|
100
107
|
{
|
|
101
|
-
as:
|
|
102
|
-
store:
|
|
108
|
+
as: w,
|
|
109
|
+
store: o,
|
|
103
110
|
...n,
|
|
104
|
-
$withCloseButton:
|
|
105
|
-
ref: s
|
|
106
|
-
|
|
107
|
-
|
|
111
|
+
$withCloseButton: a,
|
|
112
|
+
ref: s,
|
|
113
|
+
children: /* @__PURE__ */ e.jsx(g, { onClose: r, store: o, children: t })
|
|
114
|
+
}
|
|
108
115
|
);
|
|
109
116
|
}
|
|
110
|
-
),
|
|
111
|
-
Content:
|
|
117
|
+
), K = Object.assign(z, {
|
|
118
|
+
Content: v,
|
|
112
119
|
Title: u,
|
|
113
|
-
Trigger:
|
|
114
|
-
}),
|
|
120
|
+
Trigger: R
|
|
121
|
+
}), N = ({
|
|
115
122
|
animated: t = 150,
|
|
116
|
-
withCloseButton:
|
|
117
|
-
...
|
|
123
|
+
withCloseButton: r = !1,
|
|
124
|
+
...o
|
|
118
125
|
} = {}) => ({
|
|
119
|
-
...
|
|
126
|
+
...H({
|
|
120
127
|
animated: t,
|
|
121
|
-
...
|
|
128
|
+
...o
|
|
122
129
|
}),
|
|
123
|
-
withCloseButton:
|
|
124
|
-
}),
|
|
130
|
+
withCloseButton: r
|
|
131
|
+
}), Q = ({
|
|
125
132
|
animated: t = 150,
|
|
126
|
-
hideTimeout:
|
|
127
|
-
showTimeout:
|
|
133
|
+
hideTimeout: r = 300,
|
|
134
|
+
showTimeout: o = 500,
|
|
128
135
|
withCloseButton: n = !1,
|
|
129
136
|
...s
|
|
130
137
|
} = {}) => ({
|
|
131
|
-
...
|
|
138
|
+
...B({
|
|
132
139
|
animated: t,
|
|
133
|
-
hideTimeout:
|
|
134
|
-
showTimeout:
|
|
140
|
+
hideTimeout: r,
|
|
141
|
+
showTimeout: o,
|
|
135
142
|
...s
|
|
136
143
|
}),
|
|
137
144
|
withCloseButton: n
|
|
138
145
|
});
|
|
139
146
|
export {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
147
|
+
J as Popover,
|
|
148
|
+
K as PopoverHover,
|
|
149
|
+
N as usePopover,
|
|
150
|
+
Q as usePopoverHover
|
|
144
151
|
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { u as E, b as j, P as C } from "./MTZPJQMC-TybFZCho.mjs";
|
|
3
|
+
import { c as d, _ as m, d as P, e as x, g as i, f, h, i as w, y as N, E as V, F as R, b as z, D as O } from "./LVA2YJMS-C-kJ1lkr.mjs";
|
|
4
|
+
import { useMemo as T, useState as W } from "react";
|
|
5
|
+
import { j as p } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
6
|
+
import { u as M } from "./AXB53BZF-XKOjjeWO.mjs";
|
|
7
|
+
var H = "div", y = d(
|
|
8
|
+
function(t) {
|
|
9
|
+
var r = t, { store: e } = r, o = m(r, ["store"]);
|
|
10
|
+
const s = E();
|
|
11
|
+
return e = e || s, o = P(i({}, o), {
|
|
12
|
+
ref: x(e == null ? void 0 : e.setAnchorElement, o.ref)
|
|
13
|
+
}), o;
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
f(function(t) {
|
|
17
|
+
const r = y(t);
|
|
18
|
+
return h(H, r);
|
|
19
|
+
});
|
|
20
|
+
var g = "M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z", L = "div", v = 30, a = v / 2, B = {
|
|
21
|
+
top: `rotate(180 ${a} ${a})`,
|
|
22
|
+
right: `rotate(-90 ${a} ${a})`,
|
|
23
|
+
bottom: `rotate(0 ${a} ${a})`,
|
|
24
|
+
left: `rotate(90 ${a} ${a})`
|
|
25
|
+
};
|
|
26
|
+
function F(c) {
|
|
27
|
+
const [t, r] = W(), e = c.useState("contentElement");
|
|
28
|
+
return V(() => {
|
|
29
|
+
if (!e) return;
|
|
30
|
+
const s = R(e).getComputedStyle(e);
|
|
31
|
+
r(s);
|
|
32
|
+
}, [e]), t;
|
|
33
|
+
}
|
|
34
|
+
var I = d(
|
|
35
|
+
function(t) {
|
|
36
|
+
var r = t, { store: e, size: o = v } = r, s = m(r, ["store", "size"]);
|
|
37
|
+
const l = j();
|
|
38
|
+
e = e || l, w(
|
|
39
|
+
e,
|
|
40
|
+
process.env.NODE_ENV !== "production" && "PopoverArrow must be wrapped in a Popover component."
|
|
41
|
+
);
|
|
42
|
+
const u = e.useState(
|
|
43
|
+
(k) => k.currentPlacement.split("-")[0]
|
|
44
|
+
), n = F(e), _ = (n == null ? void 0 : n.getPropertyValue("background-color")) || "none", A = (n == null ? void 0 : n.getPropertyValue(`border-${u}-color`)) || "none", S = (n == null ? void 0 : n.getPropertyValue(`border-${u}-width`)) || "0px", $ = Number.parseInt(S) * 2 * (v / o), b = B[u], D = T(
|
|
45
|
+
() => /* @__PURE__ */ p.jsx("svg", { display: "block", viewBox: "0 0 30 30", children: /* @__PURE__ */ p.jsxs("g", { transform: b, children: [
|
|
46
|
+
/* @__PURE__ */ p.jsx("path", { fill: "none", d: g }),
|
|
47
|
+
/* @__PURE__ */ p.jsx("path", { stroke: "none", d: g })
|
|
48
|
+
] }) }),
|
|
49
|
+
[b]
|
|
50
|
+
);
|
|
51
|
+
return s = P(i({
|
|
52
|
+
children: D,
|
|
53
|
+
"aria-hidden": !0
|
|
54
|
+
}, s), {
|
|
55
|
+
ref: x(e.setArrowElement, s.ref),
|
|
56
|
+
style: i({
|
|
57
|
+
// server side rendering
|
|
58
|
+
position: "absolute",
|
|
59
|
+
fontSize: o,
|
|
60
|
+
width: "1em",
|
|
61
|
+
height: "1em",
|
|
62
|
+
pointerEvents: "none",
|
|
63
|
+
fill: _,
|
|
64
|
+
stroke: A,
|
|
65
|
+
strokeWidth: $
|
|
66
|
+
}, s.style)
|
|
67
|
+
}), N(s);
|
|
68
|
+
}
|
|
69
|
+
), Y = f(function(t) {
|
|
70
|
+
const r = I(t);
|
|
71
|
+
return h(L, r);
|
|
72
|
+
}), U = "button", q = d(function(t) {
|
|
73
|
+
var r = t, { store: e } = r, o = m(r, ["store"]);
|
|
74
|
+
const s = E();
|
|
75
|
+
e = e || s, w(
|
|
76
|
+
e,
|
|
77
|
+
process.env.NODE_ENV !== "production" && "PopoverDisclosure must receive a `store` prop or be wrapped in a PopoverProvider component."
|
|
78
|
+
);
|
|
79
|
+
const l = o.onClick, u = z((n) => {
|
|
80
|
+
e == null || e.setAnchorElement(n.currentTarget), l == null || l(n);
|
|
81
|
+
});
|
|
82
|
+
return o = O(
|
|
83
|
+
o,
|
|
84
|
+
(n) => /* @__PURE__ */ p.jsx(C, { value: e, children: n }),
|
|
85
|
+
[e]
|
|
86
|
+
), o = P(i({}, o), {
|
|
87
|
+
onClick: u
|
|
88
|
+
}), o = y(i({ store: e }, o)), o = M(i({ store: e }, o)), o;
|
|
89
|
+
}), Z = f(function(t) {
|
|
90
|
+
const r = q(t);
|
|
91
|
+
return h(U, r);
|
|
92
|
+
});
|
|
93
|
+
export {
|
|
94
|
+
Y as P,
|
|
95
|
+
Z as a,
|
|
96
|
+
q as b,
|
|
97
|
+
I as u
|
|
98
|
+
};
|