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
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as de, c as Y, s as $, i as fe, g as Z, b as B, d as me } from "./YV4JVR4I-DPC8mMuG.mjs";
|
|
3
|
+
import { B as _, A as j, P as ve, C as T, Q as Ie, H as ge, G as Se, c as pe, _ as se, i as Ee, R as ye, S as we, E as ee, T as O, U as be, V as he, b as H, o as z, u as xe, p as ie, D as Pe, d as _e, e as Fe, g as te, m as Ce, W as Ae, f as ke, h as Be } from "./LVA2YJMS-C-kJ1lkr.mjs";
|
|
4
|
+
import { b as Re, g as L, s as De, i as Q, a as Ke, f as Le, c as Te } from "./P2CTZE2T-DOT1mNnX.mjs";
|
|
5
|
+
import { useRef as ne, useEffect as ue, useState as Me, useCallback as Oe } from "react";
|
|
6
|
+
import { j as ze } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
7
|
+
function We(e) {
|
|
8
|
+
var s;
|
|
9
|
+
const n = e.find((c) => !!c.element), t = [...e].reverse().find((c) => !!c.element);
|
|
10
|
+
let i = (s = n == null ? void 0 : n.element) == null ? void 0 : s.parentElement;
|
|
11
|
+
for (; i && (t != null && t.element); ) {
|
|
12
|
+
if (t && i.contains(t.element))
|
|
13
|
+
return i;
|
|
14
|
+
i = i.parentElement;
|
|
15
|
+
}
|
|
16
|
+
return ge(i).body;
|
|
17
|
+
}
|
|
18
|
+
function Ve(e) {
|
|
19
|
+
return e == null ? void 0 : e.__unstablePrivateStore;
|
|
20
|
+
}
|
|
21
|
+
function He(e = {}) {
|
|
22
|
+
var s;
|
|
23
|
+
de(e, e.store);
|
|
24
|
+
const n = (s = e.store) == null ? void 0 : s.getState(), t = _(
|
|
25
|
+
e.items,
|
|
26
|
+
n == null ? void 0 : n.items,
|
|
27
|
+
e.defaultItems,
|
|
28
|
+
[]
|
|
29
|
+
), i = new Map(t.map((u) => [u.id, u])), c = {
|
|
30
|
+
items: t,
|
|
31
|
+
renderedItems: _(n == null ? void 0 : n.renderedItems, [])
|
|
32
|
+
}, l = Ve(e.store), a = Y(
|
|
33
|
+
{ items: t, renderedItems: c.renderedItems },
|
|
34
|
+
l
|
|
35
|
+
), r = Y(c, e.store), x = (u) => {
|
|
36
|
+
const f = Ie(u, (m) => m.element);
|
|
37
|
+
a.setState("renderedItems", f), r.setState("renderedItems", f);
|
|
38
|
+
};
|
|
39
|
+
$(r, () => fe(a)), $(a, () => Z(a, ["items"], (u) => {
|
|
40
|
+
r.setState("items", u.items);
|
|
41
|
+
})), $(a, () => Z(a, ["renderedItems"], (u) => {
|
|
42
|
+
let f = !0, m = requestAnimationFrame(() => {
|
|
43
|
+
const { renderedItems: S } = r.getState();
|
|
44
|
+
u.renderedItems !== S && x(u.renderedItems);
|
|
45
|
+
});
|
|
46
|
+
if (typeof IntersectionObserver != "function")
|
|
47
|
+
return () => cancelAnimationFrame(m);
|
|
48
|
+
const w = () => {
|
|
49
|
+
if (f) {
|
|
50
|
+
f = !1;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
cancelAnimationFrame(m), m = requestAnimationFrame(() => x(u.renderedItems));
|
|
54
|
+
}, D = We(u.renderedItems), g = new IntersectionObserver(w, { root: D });
|
|
55
|
+
for (const S of u.renderedItems)
|
|
56
|
+
S.element && g.observe(S.element);
|
|
57
|
+
return () => {
|
|
58
|
+
cancelAnimationFrame(m), g.disconnect();
|
|
59
|
+
};
|
|
60
|
+
}));
|
|
61
|
+
const v = (u, f, m = !1) => {
|
|
62
|
+
let w;
|
|
63
|
+
return f((g) => {
|
|
64
|
+
const S = g.findIndex(({ id: b }) => b === u.id), F = g.slice();
|
|
65
|
+
if (S !== -1) {
|
|
66
|
+
w = g[S];
|
|
67
|
+
const b = T(T({}, w), u);
|
|
68
|
+
F[S] = b, i.set(u.id, b);
|
|
69
|
+
} else
|
|
70
|
+
F.push(u), i.set(u.id, u);
|
|
71
|
+
return F;
|
|
72
|
+
}), () => {
|
|
73
|
+
f((g) => {
|
|
74
|
+
if (!w)
|
|
75
|
+
return m && i.delete(u.id), g.filter(({ id: b }) => b !== u.id);
|
|
76
|
+
const S = g.findIndex(({ id: b }) => b === u.id);
|
|
77
|
+
if (S === -1) return g;
|
|
78
|
+
const F = g.slice();
|
|
79
|
+
return F[S] = w, i.set(u.id, w), F;
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
}, K = (u) => v(
|
|
83
|
+
u,
|
|
84
|
+
(f) => a.setState("items", f),
|
|
85
|
+
!0
|
|
86
|
+
);
|
|
87
|
+
return j(T({}, r), {
|
|
88
|
+
registerItem: K,
|
|
89
|
+
renderItem: (u) => ve(
|
|
90
|
+
K(u),
|
|
91
|
+
v(
|
|
92
|
+
u,
|
|
93
|
+
(f) => a.setState("renderedItems", f)
|
|
94
|
+
)
|
|
95
|
+
),
|
|
96
|
+
item: (u) => {
|
|
97
|
+
if (!u) return null;
|
|
98
|
+
let f = i.get(u);
|
|
99
|
+
if (!f) {
|
|
100
|
+
const { items: m } = a.getState();
|
|
101
|
+
f = m.find((w) => w.id === u), f && i.set(u, f);
|
|
102
|
+
}
|
|
103
|
+
return f || null;
|
|
104
|
+
},
|
|
105
|
+
// @ts-expect-error Internal
|
|
106
|
+
__unstablePrivateStore: a
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function Ne(e, s, n) {
|
|
110
|
+
return Se(s, [n.store]), B(e, n, "items", "setItems"), e;
|
|
111
|
+
}
|
|
112
|
+
function ae(e) {
|
|
113
|
+
const s = [];
|
|
114
|
+
for (const n of e)
|
|
115
|
+
s.push(...n);
|
|
116
|
+
return s;
|
|
117
|
+
}
|
|
118
|
+
function J(e) {
|
|
119
|
+
return e.slice().reverse();
|
|
120
|
+
}
|
|
121
|
+
var Ue = { id: null };
|
|
122
|
+
function R(e, s) {
|
|
123
|
+
return e.find((n) => s ? !n.disabled && n.id !== s : !n.disabled);
|
|
124
|
+
}
|
|
125
|
+
function $e(e, s) {
|
|
126
|
+
return e.filter((n) => s ? !n.disabled && n.id !== s : !n.disabled);
|
|
127
|
+
}
|
|
128
|
+
function re(e, s) {
|
|
129
|
+
return e.filter((n) => n.rowId === s);
|
|
130
|
+
}
|
|
131
|
+
function je(e, s, n = !1) {
|
|
132
|
+
const t = e.findIndex((i) => i.id === s);
|
|
133
|
+
return [
|
|
134
|
+
...e.slice(t + 1),
|
|
135
|
+
...n ? [Ue] : [],
|
|
136
|
+
...e.slice(0, t)
|
|
137
|
+
];
|
|
138
|
+
}
|
|
139
|
+
function ce(e) {
|
|
140
|
+
const s = [];
|
|
141
|
+
for (const n of e) {
|
|
142
|
+
const t = s.find((i) => {
|
|
143
|
+
var c;
|
|
144
|
+
return ((c = i[0]) == null ? void 0 : c.rowId) === n.rowId;
|
|
145
|
+
});
|
|
146
|
+
t ? t.push(n) : s.push([n]);
|
|
147
|
+
}
|
|
148
|
+
return s;
|
|
149
|
+
}
|
|
150
|
+
function le(e) {
|
|
151
|
+
let s = 0;
|
|
152
|
+
for (const { length: n } of e)
|
|
153
|
+
n > s && (s = n);
|
|
154
|
+
return s;
|
|
155
|
+
}
|
|
156
|
+
function qe(e) {
|
|
157
|
+
return {
|
|
158
|
+
id: "__EMPTY_ITEM__",
|
|
159
|
+
disabled: !0,
|
|
160
|
+
rowId: e
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
function Ge(e, s, n) {
|
|
164
|
+
const t = le(e);
|
|
165
|
+
for (const i of e)
|
|
166
|
+
for (let c = 0; c < t; c += 1) {
|
|
167
|
+
const l = i[c];
|
|
168
|
+
if (!l || n && l.disabled) {
|
|
169
|
+
const r = c === 0 && n ? R(i) : i[c - 1];
|
|
170
|
+
i[c] = r && s !== r.id && n ? r : qe(r == null ? void 0 : r.rowId);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return e;
|
|
174
|
+
}
|
|
175
|
+
function Qe(e) {
|
|
176
|
+
const s = ce(e), n = le(s), t = [];
|
|
177
|
+
for (let i = 0; i < n; i += 1)
|
|
178
|
+
for (const c of s) {
|
|
179
|
+
const l = c[i];
|
|
180
|
+
l && t.push(j(T({}, l), {
|
|
181
|
+
// If there's no rowId, it means that it's not a grid composite, but
|
|
182
|
+
// a single row instead. So, instead of verticalizing it, that is,
|
|
183
|
+
// assigning a different rowId based on the column index, we keep it
|
|
184
|
+
// undefined so they will be part of the same row. This is useful
|
|
185
|
+
// when using up/down on one-dimensional composites.
|
|
186
|
+
rowId: l.rowId ? `${i}` : void 0
|
|
187
|
+
}));
|
|
188
|
+
}
|
|
189
|
+
return t;
|
|
190
|
+
}
|
|
191
|
+
function dt(e = {}) {
|
|
192
|
+
var s;
|
|
193
|
+
const n = (s = e.store) == null ? void 0 : s.getState(), t = He(e), i = _(
|
|
194
|
+
e.activeId,
|
|
195
|
+
n == null ? void 0 : n.activeId,
|
|
196
|
+
e.defaultActiveId
|
|
197
|
+
), c = j(T({}, t.getState()), {
|
|
198
|
+
id: _(
|
|
199
|
+
e.id,
|
|
200
|
+
n == null ? void 0 : n.id,
|
|
201
|
+
`id-${Math.random().toString(36).slice(2, 8)}`
|
|
202
|
+
),
|
|
203
|
+
activeId: i,
|
|
204
|
+
baseElement: _(n == null ? void 0 : n.baseElement, null),
|
|
205
|
+
includesBaseElement: _(
|
|
206
|
+
e.includesBaseElement,
|
|
207
|
+
n == null ? void 0 : n.includesBaseElement,
|
|
208
|
+
i === null
|
|
209
|
+
),
|
|
210
|
+
moves: _(n == null ? void 0 : n.moves, 0),
|
|
211
|
+
orientation: _(
|
|
212
|
+
e.orientation,
|
|
213
|
+
n == null ? void 0 : n.orientation,
|
|
214
|
+
"both"
|
|
215
|
+
),
|
|
216
|
+
rtl: _(e.rtl, n == null ? void 0 : n.rtl, !1),
|
|
217
|
+
virtualFocus: _(
|
|
218
|
+
e.virtualFocus,
|
|
219
|
+
n == null ? void 0 : n.virtualFocus,
|
|
220
|
+
!1
|
|
221
|
+
),
|
|
222
|
+
focusLoop: _(e.focusLoop, n == null ? void 0 : n.focusLoop, !1),
|
|
223
|
+
focusWrap: _(e.focusWrap, n == null ? void 0 : n.focusWrap, !1),
|
|
224
|
+
focusShift: _(e.focusShift, n == null ? void 0 : n.focusShift, !1)
|
|
225
|
+
}), l = Y(c, t, e.store);
|
|
226
|
+
$(
|
|
227
|
+
l,
|
|
228
|
+
() => me(l, ["renderedItems", "activeId"], (r) => {
|
|
229
|
+
l.setState("activeId", (x) => {
|
|
230
|
+
var v;
|
|
231
|
+
return x !== void 0 ? x : (v = R(r.renderedItems)) == null ? void 0 : v.id;
|
|
232
|
+
});
|
|
233
|
+
})
|
|
234
|
+
);
|
|
235
|
+
const a = (r = "next", x = {}) => {
|
|
236
|
+
var v, K;
|
|
237
|
+
const u = l.getState(), {
|
|
238
|
+
skip: f = 0,
|
|
239
|
+
activeId: m = u.activeId,
|
|
240
|
+
focusShift: w = u.focusShift,
|
|
241
|
+
focusLoop: D = u.focusLoop,
|
|
242
|
+
focusWrap: g = u.focusWrap,
|
|
243
|
+
includesBaseElement: S = u.includesBaseElement,
|
|
244
|
+
renderedItems: F = u.renderedItems,
|
|
245
|
+
rtl: b = u.rtl
|
|
246
|
+
} = x, C = r === "up" || r === "down", W = r === "next" || r === "down", q = W ? b && !C : !b || C, N = w && !f;
|
|
247
|
+
let p = C ? ae(
|
|
248
|
+
Ge(ce(F), m, N)
|
|
249
|
+
) : F;
|
|
250
|
+
if (p = q ? J(p) : p, p = C ? Qe(p) : p, m == null)
|
|
251
|
+
return (v = R(p)) == null ? void 0 : v.id;
|
|
252
|
+
const M = p.find((I) => I.id === m);
|
|
253
|
+
if (!M)
|
|
254
|
+
return (K = R(p)) == null ? void 0 : K.id;
|
|
255
|
+
const U = p.some((I) => I.rowId), G = p.indexOf(M), o = p.slice(G + 1), d = re(o, M.rowId);
|
|
256
|
+
if (f) {
|
|
257
|
+
const I = $e(d, m), h = I.slice(f)[0] || // If we can't find an item, just return the last one.
|
|
258
|
+
I[I.length - 1];
|
|
259
|
+
return h == null ? void 0 : h.id;
|
|
260
|
+
}
|
|
261
|
+
const E = D && (C ? D !== "horizontal" : D !== "vertical"), y = U && g && (C ? g !== "horizontal" : g !== "vertical"), P = W ? (!U || C) && E && S : C ? S : !1;
|
|
262
|
+
if (E) {
|
|
263
|
+
const I = y && !P ? p : re(p, M.rowId), h = je(I, m, P), k = R(h, m);
|
|
264
|
+
return k == null ? void 0 : k.id;
|
|
265
|
+
}
|
|
266
|
+
if (y) {
|
|
267
|
+
const I = R(
|
|
268
|
+
// We can use nextItems, which contains all the next items, including
|
|
269
|
+
// items from other rows, to wrap between rows. However, if there is a
|
|
270
|
+
// null item (the composite container), we'll only use the next items in
|
|
271
|
+
// the row. So moving next from the last item will focus on the
|
|
272
|
+
// composite container. On grid composites, horizontal navigation never
|
|
273
|
+
// focuses on the composite container, only vertical.
|
|
274
|
+
P ? d : o,
|
|
275
|
+
m
|
|
276
|
+
);
|
|
277
|
+
return P ? (I == null ? void 0 : I.id) || null : I == null ? void 0 : I.id;
|
|
278
|
+
}
|
|
279
|
+
const A = R(d, m);
|
|
280
|
+
return !A && P ? null : A == null ? void 0 : A.id;
|
|
281
|
+
};
|
|
282
|
+
return j(T(T({}, t), l), {
|
|
283
|
+
setBaseElement: (r) => l.setState("baseElement", r),
|
|
284
|
+
setActiveId: (r) => l.setState("activeId", r),
|
|
285
|
+
move: (r) => {
|
|
286
|
+
r !== void 0 && (l.setState("activeId", r), l.setState("moves", (x) => x + 1));
|
|
287
|
+
},
|
|
288
|
+
first: () => {
|
|
289
|
+
var r;
|
|
290
|
+
return (r = R(l.getState().renderedItems)) == null ? void 0 : r.id;
|
|
291
|
+
},
|
|
292
|
+
last: () => {
|
|
293
|
+
var r;
|
|
294
|
+
return (r = R(J(l.getState().renderedItems))) == null ? void 0 : r.id;
|
|
295
|
+
},
|
|
296
|
+
next: (r) => (r !== void 0 && typeof r == "number" && (r = { skip: r }), a("next", r)),
|
|
297
|
+
previous: (r) => (r !== void 0 && typeof r == "number" && (r = { skip: r }), a("previous", r)),
|
|
298
|
+
down: (r) => (r !== void 0 && typeof r == "number" && (r = { skip: r }), a("down", r)),
|
|
299
|
+
up: (r) => (r !== void 0 && typeof r == "number" && (r = { skip: r }), a("up", r))
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
function ft(e, s, n) {
|
|
303
|
+
return e = Ne(e, s, n), B(e, n, "activeId", "setActiveId"), B(e, n, "includesBaseElement"), B(e, n, "virtualFocus"), B(e, n, "orientation"), B(e, n, "rtl"), B(e, n, "focusLoop"), B(e, n, "focusWrap"), B(e, n, "focusShift"), e;
|
|
304
|
+
}
|
|
305
|
+
var Ye = "div";
|
|
306
|
+
function Je(e) {
|
|
307
|
+
return e.some((s) => !!s.rowId);
|
|
308
|
+
}
|
|
309
|
+
function Xe(e) {
|
|
310
|
+
const s = e.target;
|
|
311
|
+
return s && !ie(s) ? !1 : e.key.length === 1 && !e.ctrlKey && !e.metaKey;
|
|
312
|
+
}
|
|
313
|
+
function Ze(e) {
|
|
314
|
+
return e.key === "Shift" || e.key === "Control" || e.key === "Alt" || e.key === "Meta";
|
|
315
|
+
}
|
|
316
|
+
function oe(e, s, n) {
|
|
317
|
+
return H((t) => {
|
|
318
|
+
var i;
|
|
319
|
+
if (s == null || s(t), t.defaultPrevented || t.isPropagationStopped() || !z(t) || Ze(t) || Xe(t)) return;
|
|
320
|
+
const c = e.getState(), l = (i = L(e, c.activeId)) == null ? void 0 : i.element;
|
|
321
|
+
if (!l) return;
|
|
322
|
+
const a = t, { view: r } = a, x = se(a, ["view"]), v = n == null ? void 0 : n.current;
|
|
323
|
+
l !== v && l.focus(), Ae(l, t.type, x) || t.preventDefault(), t.currentTarget.contains(l) && t.stopPropagation();
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
function et(e) {
|
|
327
|
+
return Le(
|
|
328
|
+
ae(J(Te(e)))
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
function tt(e) {
|
|
332
|
+
const [s, n] = Me(!1), t = Oe(() => n(!0), []), i = e.useState(
|
|
333
|
+
(c) => L(e, c.activeId)
|
|
334
|
+
);
|
|
335
|
+
return ue(() => {
|
|
336
|
+
const c = i == null ? void 0 : i.element;
|
|
337
|
+
s && c && (n(!1), c.focus({ preventScroll: !0 }));
|
|
338
|
+
}, [i, s]), t;
|
|
339
|
+
}
|
|
340
|
+
var nt = pe(
|
|
341
|
+
function(s) {
|
|
342
|
+
var n = s, {
|
|
343
|
+
store: t,
|
|
344
|
+
composite: i = !0,
|
|
345
|
+
focusOnMove: c = i,
|
|
346
|
+
moveOnKeyPress: l = !0
|
|
347
|
+
} = n, a = se(n, [
|
|
348
|
+
"store",
|
|
349
|
+
"composite",
|
|
350
|
+
"focusOnMove",
|
|
351
|
+
"moveOnKeyPress"
|
|
352
|
+
]);
|
|
353
|
+
const r = Re();
|
|
354
|
+
t = t || r, Ee(
|
|
355
|
+
t,
|
|
356
|
+
process.env.NODE_ENV !== "production" && "Composite must receive a `store` prop or be wrapped in a CompositeProvider component."
|
|
357
|
+
);
|
|
358
|
+
const x = ne(null), v = ne(null), K = tt(t), u = t.useState("moves"), [, f] = ye(
|
|
359
|
+
i ? t.setBaseElement : null
|
|
360
|
+
);
|
|
361
|
+
ue(() => {
|
|
362
|
+
var o;
|
|
363
|
+
if (!t || !u || !i || !c) return;
|
|
364
|
+
const { activeId: d } = t.getState(), E = (o = L(t, d)) == null ? void 0 : o.element;
|
|
365
|
+
E && we(E);
|
|
366
|
+
}, [t, u, i, c]), ee(() => {
|
|
367
|
+
if (!t || !u || !i) return;
|
|
368
|
+
const { baseElement: o, activeId: d } = t.getState();
|
|
369
|
+
if (!(d === null) || !o) return;
|
|
370
|
+
const y = v.current;
|
|
371
|
+
v.current = null, y && O(y, { relatedTarget: o }), be(o) || o.focus();
|
|
372
|
+
}, [t, u, i]);
|
|
373
|
+
const m = t.useState("activeId"), w = t.useState("virtualFocus");
|
|
374
|
+
ee(() => {
|
|
375
|
+
var o;
|
|
376
|
+
if (!t || !i || !w) return;
|
|
377
|
+
const d = v.current;
|
|
378
|
+
if (v.current = null, !d) return;
|
|
379
|
+
const y = ((o = L(t, m)) == null ? void 0 : o.element) || he(d);
|
|
380
|
+
y !== d && O(d, { relatedTarget: y });
|
|
381
|
+
}, [t, m, w, i]);
|
|
382
|
+
const D = oe(
|
|
383
|
+
t,
|
|
384
|
+
a.onKeyDownCapture,
|
|
385
|
+
v
|
|
386
|
+
), g = oe(
|
|
387
|
+
t,
|
|
388
|
+
a.onKeyUpCapture,
|
|
389
|
+
v
|
|
390
|
+
), S = a.onFocusCapture, F = H((o) => {
|
|
391
|
+
if (S == null || S(o), o.defaultPrevented || !t) return;
|
|
392
|
+
const { virtualFocus: d } = t.getState();
|
|
393
|
+
if (!d) return;
|
|
394
|
+
const E = o.relatedTarget, y = De(o.currentTarget);
|
|
395
|
+
z(o) && y && (o.stopPropagation(), v.current = E);
|
|
396
|
+
}), b = a.onFocus, C = H((o) => {
|
|
397
|
+
if (b == null || b(o), o.defaultPrevented || !i || !t) return;
|
|
398
|
+
const { relatedTarget: d } = o, { virtualFocus: E } = t.getState();
|
|
399
|
+
E ? z(o) && !Q(t, d) && queueMicrotask(K) : z(o) && t.setActiveId(null);
|
|
400
|
+
}), W = a.onBlurCapture, q = H((o) => {
|
|
401
|
+
var d;
|
|
402
|
+
if (W == null || W(o), o.defaultPrevented || !t) return;
|
|
403
|
+
const { virtualFocus: E, activeId: y } = t.getState();
|
|
404
|
+
if (!E) return;
|
|
405
|
+
const P = (d = L(t, y)) == null ? void 0 : d.element, A = o.relatedTarget, I = Q(t, A), h = v.current;
|
|
406
|
+
v.current = null, z(o) && I ? (A === P ? h && h !== A && O(h, o) : P ? O(P, o) : h && O(h, o), o.stopPropagation()) : !Q(t, o.target) && P && O(P, o);
|
|
407
|
+
}), N = a.onKeyDown, p = xe(l), M = H((o) => {
|
|
408
|
+
var d;
|
|
409
|
+
if (N == null || N(o), o.defaultPrevented || !t || !z(o)) return;
|
|
410
|
+
const { orientation: E, renderedItems: y, activeId: P } = t.getState(), A = L(t, P);
|
|
411
|
+
if ((d = A == null ? void 0 : A.element) != null && d.isConnected) return;
|
|
412
|
+
const I = E !== "horizontal", h = E !== "vertical", k = Je(y);
|
|
413
|
+
if ((o.key === "ArrowLeft" || o.key === "ArrowRight" || o.key === "Home" || o.key === "End") && ie(o.currentTarget)) return;
|
|
414
|
+
const X = {
|
|
415
|
+
ArrowUp: (k || I) && (() => {
|
|
416
|
+
if (k) {
|
|
417
|
+
const V = et(y);
|
|
418
|
+
return V == null ? void 0 : V.id;
|
|
419
|
+
}
|
|
420
|
+
return t == null ? void 0 : t.last();
|
|
421
|
+
}),
|
|
422
|
+
ArrowRight: (k || h) && t.first,
|
|
423
|
+
ArrowDown: (k || I) && t.first,
|
|
424
|
+
ArrowLeft: (k || h) && t.last,
|
|
425
|
+
Home: t.first,
|
|
426
|
+
End: t.last,
|
|
427
|
+
PageUp: t.first,
|
|
428
|
+
PageDown: t.last
|
|
429
|
+
}[o.key];
|
|
430
|
+
if (X) {
|
|
431
|
+
const V = X();
|
|
432
|
+
if (V !== void 0) {
|
|
433
|
+
if (!p(o)) return;
|
|
434
|
+
o.preventDefault(), t.move(V);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
});
|
|
438
|
+
a = Pe(
|
|
439
|
+
a,
|
|
440
|
+
(o) => /* @__PURE__ */ ze.jsx(Ke, { value: t, children: o }),
|
|
441
|
+
[t]
|
|
442
|
+
);
|
|
443
|
+
const U = t.useState((o) => {
|
|
444
|
+
var d;
|
|
445
|
+
if (t && i && o.virtualFocus)
|
|
446
|
+
return (d = L(t, o.activeId)) == null ? void 0 : d.id;
|
|
447
|
+
});
|
|
448
|
+
a = _e(te({
|
|
449
|
+
"aria-activedescendant": U
|
|
450
|
+
}, a), {
|
|
451
|
+
ref: Fe(x, f, a.ref),
|
|
452
|
+
onKeyDownCapture: D,
|
|
453
|
+
onKeyUpCapture: g,
|
|
454
|
+
onFocusCapture: F,
|
|
455
|
+
onFocus: C,
|
|
456
|
+
onBlurCapture: q,
|
|
457
|
+
onKeyDown: M
|
|
458
|
+
});
|
|
459
|
+
const G = t.useState(
|
|
460
|
+
(o) => i && (o.virtualFocus || o.activeId === null)
|
|
461
|
+
);
|
|
462
|
+
return a = Ce(te({ focusable: G }, a)), a;
|
|
463
|
+
}
|
|
464
|
+
);
|
|
465
|
+
ke(function(s) {
|
|
466
|
+
const n = nt(s);
|
|
467
|
+
return Be(Ye, n);
|
|
468
|
+
});
|
|
469
|
+
export {
|
|
470
|
+
nt as a,
|
|
471
|
+
He as b,
|
|
472
|
+
dt as c,
|
|
473
|
+
ft as u
|
|
474
|
+
};
|
package/dist/Icon.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import a from "
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
2
|
+
import { j as a } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
|
+
import { forwardRef as m } from "./System.mjs";
|
|
4
|
+
import d, { css as i } from "@xstyled/styled-components";
|
|
5
5
|
const g = i`
|
|
6
6
|
g,
|
|
7
7
|
path {
|
|
@@ -13,38 +13,38 @@ const g = i`
|
|
|
13
13
|
path {
|
|
14
14
|
stroke: none;
|
|
15
15
|
}
|
|
16
|
-
`,
|
|
17
|
-
const
|
|
16
|
+
`, n = d.svgBox(({ isFlag: o, size: s = "md", stroked: r, theme: t }) => {
|
|
17
|
+
const e = t.icons[s] || s;
|
|
18
18
|
return i`
|
|
19
|
-
${!
|
|
20
|
-
width: ${
|
|
21
|
-
height: ${
|
|
19
|
+
${!o && (r ? g : f)};
|
|
20
|
+
width: ${e};
|
|
21
|
+
height: ${e};
|
|
22
22
|
`;
|
|
23
|
-
}), u =
|
|
24
|
-
({ content:
|
|
25
|
-
const c =
|
|
26
|
-
return
|
|
27
|
-
|
|
23
|
+
}), u = m(
|
|
24
|
+
({ content: o, dataTestId: s, size: r = "md", title: t, ...e }, l) => {
|
|
25
|
+
const c = e.className || "";
|
|
26
|
+
return o ? /* @__PURE__ */ a.jsx(
|
|
27
|
+
n,
|
|
28
28
|
{
|
|
29
|
-
alt:
|
|
30
|
-
dangerouslySetInnerHTML: { __html:
|
|
31
|
-
"data-testid":
|
|
32
|
-
isFlag:
|
|
33
|
-
ref:
|
|
29
|
+
alt: t,
|
|
30
|
+
dangerouslySetInnerHTML: { __html: o.block },
|
|
31
|
+
"data-testid": s && `icon-${s}`,
|
|
32
|
+
isFlag: o.isFlag,
|
|
33
|
+
ref: l,
|
|
34
34
|
role: "img",
|
|
35
35
|
size: r,
|
|
36
|
-
stroked:
|
|
37
|
-
title:
|
|
38
|
-
viewBox:
|
|
39
|
-
...
|
|
36
|
+
stroked: o.stroked,
|
|
37
|
+
title: t,
|
|
38
|
+
viewBox: o.viewBox || "0 0 100 100",
|
|
39
|
+
...e,
|
|
40
40
|
className: `${c} wui-icon`
|
|
41
41
|
}
|
|
42
42
|
) : null;
|
|
43
43
|
}
|
|
44
44
|
);
|
|
45
45
|
u.displayName = "Icon";
|
|
46
|
-
const
|
|
46
|
+
const k = n;
|
|
47
47
|
export {
|
|
48
48
|
u as Icon,
|
|
49
|
-
|
|
49
|
+
k as StyledIcon
|
|
50
50
|
};
|