welcome-ui 1.0.0-beta.9 → 7.0.0-alpha.7
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-DCqNWRx3.mjs → AXB53BZF-CGoc4K3d.mjs} +3 -3
- package/dist/{AXB53BZF-CAQ85RSy.js → AXB53BZF-KWM2jKTz.js} +1 -1
- package/dist/Accordion.js +3 -3
- package/dist/Accordion.mjs +11 -11
- package/dist/Alert.js +4 -4
- package/dist/Alert.mjs +29 -29
- package/dist/AspectRatio.js +1 -1
- package/dist/AspectRatio.mjs +5 -5
- package/dist/Avatar.js +3 -3
- package/dist/Avatar.mjs +8 -8
- package/dist/{BYC7LY2E-BE1a2svb.js → BYC7LY2E-BkAEL2VD.js} +1 -1
- package/dist/{BYC7LY2E-BNqcw1O8.mjs → BYC7LY2E-CVjUW1dr.mjs} +4 -4
- package/dist/Badge.js +1 -1
- package/dist/Badge.mjs +5 -5
- package/dist/Breadcrumb.js +54 -1
- package/dist/Breadcrumb.mjs +438 -8
- package/dist/Button.js +4 -4
- package/dist/Button.mjs +10 -10
- package/dist/ButtonGroup.js +1 -1
- package/dist/ButtonGroup.mjs +5 -5
- package/dist/Card.js +2 -2
- package/dist/Card.mjs +4 -4
- package/dist/Checkbox.js +1 -1
- package/dist/Checkbox.mjs +1 -1
- package/dist/ClearButton.js +3 -3
- package/dist/ClearButton.mjs +10 -10
- package/dist/CloseButton.js +2 -2
- package/dist/CloseButton.mjs +6 -6
- package/dist/CustomInput-BCCxIle7.mjs +7826 -0
- package/dist/CustomInput-CDNZy-pz.js +1070 -0
- package/dist/DatePicker.js +1 -1
- package/dist/DatePicker.mjs +1 -1
- package/dist/DateTimePicker.js +1 -1
- package/dist/DateTimePicker.mjs +15 -15
- package/dist/DateTimePickerCommon.js +1 -1
- package/dist/DateTimePickerCommon.mjs +1 -1
- package/dist/Drawer.js +64 -1
- package/dist/Drawer.mjs +266 -10
- package/dist/DropdownMenu.js +1 -1
- package/dist/DropdownMenu.mjs +9 -9
- package/dist/Field.js +2 -2
- package/dist/Field.mjs +10 -10
- package/dist/FieldGroup.js +1 -1
- package/dist/FieldGroup.mjs +8 -8
- package/dist/FileDrop.js +46 -1
- package/dist/FileDrop.mjs +2324 -8
- package/dist/FileUpload.js +2 -2
- package/dist/FileUpload.mjs +10 -10
- package/dist/Hint.js +1 -1
- package/dist/Hint.mjs +6 -6
- package/dist/{ITI7HKP4-Couz1Z73.mjs → ITI7HKP4-BONrZ9Pq.mjs} +3 -3
- package/dist/Icon.js +1 -1
- package/dist/Icon.mjs +5 -5
- package/dist/{index.js → Icons.js} +6 -23
- package/dist/{index.mjs → Icons.mjs} +1348 -3484
- package/dist/{IconFont.js → IconsFont.js} +1 -1
- package/dist/{IconFont.mjs → IconsFont.mjs} +2 -2
- package/dist/InputText.js +3 -3
- package/dist/InputText.mjs +14 -14
- package/dist/{JC64G2H7-HxATiU-t.mjs → JC64G2H7-Dey-8h60.mjs} +4 -4
- package/dist/{JC64G2H7-VmOGyhc1.js → JC64G2H7-YkBMNrtl.js} +1 -1
- package/dist/{KUU7WJ55-bC4FU_j7.mjs → KUU7WJ55-3sP-w1F1.mjs} +13 -13
- package/dist/{LVA2YJMS-Dm5ieEMw.mjs → LVA2YJMS-qFC9J-lt.mjs} +18 -18
- package/dist/Label.js +35 -1
- package/dist/Label.mjs +76 -7
- package/dist/Link.js +2 -2
- package/dist/Link.mjs +9 -9
- package/dist/Loader.js +3 -3
- package/dist/Loader.mjs +9 -9
- package/dist/Logo.js +3 -1
- package/dist/Logo.mjs +45 -5
- package/dist/{MTZPJQMC-D0pYOjc_.js → MTZPJQMC-5Xg78Uyy.js} +1 -1
- package/dist/MTZPJQMC-C0Xe_WK4.mjs +13 -0
- package/dist/Modal.js +5 -5
- package/dist/Modal.mjs +14 -14
- package/dist/{NLEBE274-FThuwZH_.mjs → NLEBE274-C94QU78N.mjs} +19 -19
- package/dist/{P2CTZE2T-5jxBu6ix.mjs → P2CTZE2T-YPes1GXe.mjs} +28 -28
- package/dist/{P4IRICAX-C0oIr4wI.mjs → P4IRICAX-DzXqUYe-.mjs} +10 -10
- package/dist/{P4IRICAX-t3xfwWga.js → P4IRICAX-nhgZ26A1.js} +1 -1
- package/dist/Pagination.js +3 -3
- package/dist/Pagination.mjs +10 -10
- package/dist/PasswordInput.js +1 -1
- package/dist/PasswordInput.mjs +53 -5
- package/dist/Picker.js +2 -2
- package/dist/Picker.mjs +13 -13
- package/dist/Popover.js +31 -1
- package/dist/Popover.mjs +141 -5
- package/dist/{QYJ6MIDR-YegHsExc.mjs → QYJ6MIDR-BLLqyXdd.mjs} +12 -12
- package/dist/{QYJ6MIDR-T-fJ_t8N.js → QYJ6MIDR-CRK3satR.js} +1 -1
- package/dist/Radio.js +3 -3
- package/dist/Radio.mjs +16 -16
- package/dist/RadioGroup.js +1 -1
- package/dist/RadioGroup.mjs +11 -11
- package/dist/RadioTab.js +4 -4
- package/dist/RadioTab.mjs +12 -12
- package/dist/{SYRFVSLH-Babm193P.js → SYRFVSLH-BpAfr7UE.js} +1 -1
- package/dist/{SYRFVSLH-DXZgEwus.mjs → SYRFVSLH-cVmYtx36.mjs} +6 -6
- package/dist/Search.js +8 -8
- package/dist/Search.mjs +46 -46
- package/dist/Select.js +122 -1
- package/dist/Select.mjs +1070 -11
- package/dist/Shape.js +3 -3
- package/dist/Shape.mjs +5 -5
- package/dist/Slider.js +1 -1
- package/dist/Slider.mjs +3 -3
- package/dist/Swiper.js +2 -2
- package/dist/Swiper.mjs +1 -1
- package/dist/Table.js +1 -1
- package/dist/Table.mjs +1 -1
- package/dist/Tabs.js +8 -8
- package/dist/Tabs.mjs +178 -173
- package/dist/Tag.js +3 -3
- package/dist/Tag.mjs +10 -10
- package/dist/Text.js +1 -1
- package/dist/Text.mjs +4 -4
- package/dist/Textarea.js +1 -1
- package/dist/Textarea.mjs +9 -9
- package/dist/TimePicker.js +2 -2
- package/dist/TimePicker.mjs +11 -11
- package/dist/Toast.js +1 -1
- package/dist/Toast.mjs +1 -1
- package/dist/Toggle.js +1 -1
- package/dist/Toggle.mjs +7 -7
- package/dist/Tooltip.js +1 -1
- package/dist/Tooltip.mjs +10 -10
- package/dist/UniversalLink.js +1 -1
- package/dist/UniversalLink.mjs +4 -4
- package/dist/VEVQD5MH-ZMnHV8ZJ.mjs +20 -0
- package/dist/{VEVQD5MH-Cal9SWXl.js → VEVQD5MH-mN1wMozH.js} +1 -1
- package/dist/{VGCJ63VH-BqPfqkK_.mjs → VGCJ63VH-B39w1tBw.mjs} +19 -19
- package/dist/{VGCJ63VH-Cuf7P3qW.js → VGCJ63VH-BNLwLOaC.js} +1 -1
- package/dist/VariantIcon.js +8 -1
- package/dist/VariantIcon.mjs +30 -4
- package/dist/WelcomeLoader.js +11 -1
- package/dist/WelcomeLoader.mjs +5086 -25
- package/dist/X5NMLKT6-uFSu0Lii.mjs +25 -0
- package/dist/{YV4JVR4I-1ezWeCCz.mjs → YV4JVR4I-BGfUf3Nu.mjs} +1 -1
- package/dist/downshift.esm-BOfUfcgd.mjs +1085 -0
- package/dist/downshift.esm-dvOEflhK.js +1 -0
- package/dist/hex-to-rgba-BIDK-3ab.mjs +11 -0
- package/dist/hex-to-rgba-cCYXRc5D.js +1 -0
- package/dist/index-23RJrN0D.js +1 -0
- package/dist/{index-CQyLvMJP.js → index-BHi0wohR.js} +23 -23
- package/dist/index-BJAZgeHL.mjs +11 -0
- package/dist/index-BJzGkA7x.js +1 -0
- package/dist/index-BLom3M2B.js +2 -0
- package/dist/index-BNGGwOCo.mjs +11 -0
- package/dist/index-BQtDgQBH.mjs +11 -0
- package/dist/{index-BZmKn5VO.mjs → index-BYdkhqH4.mjs} +14 -11
- package/dist/{index-DCOLdphy.mjs → index-CDjY0N2Z.mjs} +11 -11
- package/dist/index-CExLVjET.mjs +26 -0
- package/dist/{index-C_r0bVmL.js → index-CUtaVckz.js} +1 -1
- package/dist/{index-BxWjuyQw.js → index-CxDKPhvU.js} +1 -1
- package/dist/index-D4H6DSEx.mjs +133 -0
- package/dist/index-D6MJAN7T.js +1 -0
- package/dist/index-DEJJvyGk.mjs +66 -0
- package/dist/index-DTx8atxB.js +1 -0
- package/dist/index-Db47iJVz.js +1 -0
- package/dist/{index-DRa_xux4.mjs → index-RUkz9Z2V.mjs} +27 -53
- package/dist/index-SbQUT2mU.mjs +639 -0
- package/dist/index-_wqLxu7x.js +1 -0
- package/dist/index-gts_19_n.js +1 -0
- package/dist/{index-CQ1IPLlk.mjs → index-u1oHKa7X.mjs} +13 -61
- package/dist/{radio-group-29lMl-2M.mjs → radio-group-CGC6DTFJ.mjs} +14 -14
- package/dist/theme.js +18 -0
- package/dist/theme.mjs +1649 -0
- package/dist/types/components/Alert/styles.d.ts +2 -2
- package/dist/types/components/Avatar/styles.d.ts +2 -2
- package/dist/types/components/Badge/styles.d.ts +1 -1
- package/dist/types/components/Button/theme.d.ts +1 -1
- package/dist/types/components/Card/Cover.styles.d.ts +1 -1
- package/dist/types/components/Checkbox/index.d.ts +1 -1
- package/dist/types/components/ClearButton/styles.d.ts +1 -1
- package/dist/types/components/CloseButton/styles.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/CustomInput.d.ts +1 -1
- package/dist/types/components/Drawer/index.d.ts +2 -2
- package/dist/types/components/Drawer/styles.d.ts +1 -1
- package/dist/types/components/DropdownMenu/index.d.ts +1 -1
- package/dist/types/components/DropdownMenu/styles.d.ts +1 -1
- package/dist/types/components/Field/index.d.ts +1 -1
- package/dist/types/components/Field/styles.d.ts +1 -1
- package/dist/types/components/FileDrop/FilePreview.d.ts +1 -1
- package/dist/types/components/FileDrop/index.d.ts +1 -1
- package/dist/types/components/FileUpload/index.d.ts +1 -1
- package/dist/types/components/Icon/styles.d.ts +1 -1
- package/dist/types/components/IconsFont/_hash.d.ts +1 -0
- package/dist/types/components/{IconFont → IconsFont}/index.d.ts +4 -4
- package/dist/types/components/InputText/index.d.ts +1 -1
- package/dist/types/components/Logo/index.d.ts +1 -1
- package/dist/types/components/Modal/Assets/index.d.ts +4 -4
- package/dist/types/components/Modal/Assets/styles.d.ts +2 -2
- package/dist/types/components/Modal/index.d.ts +4 -4
- package/dist/types/components/Modal/styles.d.ts +2 -2
- package/dist/types/components/Popover/Popover.d.ts +1 -1
- package/dist/types/components/Popover/PopoverHover.d.ts +1 -1
- package/dist/types/components/Popover/Trigger.d.ts +1 -1
- package/dist/types/components/Radio/index.d.ts +1 -1
- package/dist/types/components/RadioTab/index.d.ts +1 -1
- package/dist/types/components/Search/index.d.ts +1 -1
- package/dist/types/components/Select/index.d.ts +2 -2
- package/dist/types/components/Shape/styles.d.ts +1 -1
- package/dist/types/components/Slider/Range.d.ts +1 -1
- package/dist/types/components/Slider/index.d.ts +1 -1
- package/dist/types/components/Slider/styles.d.ts +5 -5
- package/dist/types/components/Tabs/TabList.d.ts +1 -1
- package/dist/types/components/Tabs/TabPanel.d.ts +1 -1
- package/dist/types/components/Tag/index.d.ts +1 -1
- package/dist/types/components/Tag/styles.d.ts +1 -1
- package/dist/types/components/Tag/theme.d.ts +1 -1
- package/dist/types/components/Textarea/index.d.ts +1 -1
- package/dist/types/components/Toast/index.d.ts +3 -3
- package/dist/types/components/Toast/styles.d.ts +8 -8
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/utils.js +1 -0
- package/dist/utils.mjs +81 -0
- package/package.json +52 -67
- package/dist/CustomInput-CHhz-wtr.js +0 -1064
- package/dist/CustomInput-DsJYqH0X.mjs +0 -1272
- package/dist/MTZPJQMC-C9lHSyrL.mjs +0 -13
- package/dist/VEVQD5MH-DOp_qaPw.mjs +0 -20
- package/dist/Welcome-BNr4uu5n.mjs +0 -48
- package/dist/Welcome-Dw9OaREs.js +0 -3
- package/dist/X5NMLKT6-DGZEtYXj.mjs +0 -25
- package/dist/index-B8roHPE-.js +0 -64
- package/dist/index-BFQbRuqA.mjs +0 -165
- package/dist/index-BjGfAqCk.mjs +0 -209
- package/dist/index-Bn9aiaUQ.mjs +0 -193
- package/dist/index-CiYwvMF0.js +0 -8
- package/dist/index-Cjf3wLkx.mjs +0 -272
- package/dist/index-CmBs24Im.mjs +0 -413
- package/dist/index-D3Tnfi3U.mjs +0 -83
- package/dist/index-DG7ovxHW.js +0 -117
- package/dist/index-DHCyCfRv.js +0 -35
- package/dist/index-DSZG0Sqy.js +0 -54
- package/dist/index-DhF591OM.js +0 -42
- package/dist/index-gPtu0TOV.js +0 -1
- package/dist/types/components/index.d.ts +0 -61
- package/dist/types/index.d.ts +0 -3
- package/dist/usePopover-AbS2gpZq.mjs +0 -144
- package/dist/usePopover-CzPtX0h_.js +0 -31
- package/dist/types/components/{IconFont → IconsFont}/styles.d.ts +1 -1
package/dist/Tabs.mjs
CHANGED
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import L, { createContext as ae, useMemo as ie, useCallback as ce, useRef as z, useEffect as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { u as
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
[
|
|
17
|
-
|
|
18
|
-
), Xe = Ue.useContext;
|
|
2
|
+
import L, { createContext as ae, useMemo as ie, useCallback as ce, useRef as z, useEffect as Z, useState as K, Children as Pe, Fragment as Ce, cloneElement as Ee } from "react";
|
|
3
|
+
import { u as $e } from "./use-viewport-m3glsbna.mjs";
|
|
4
|
+
import { u as ye } from "./use-isomorphic-layout-effect-Izr-e2pi.mjs";
|
|
5
|
+
import j, { css as D, th as x, system as we } from "@xstyled/styled-components";
|
|
6
|
+
import { C as le, a as de, d as ee, u as _e, e as Re } from "./P2CTZE2T-YPes1GXe.mjs";
|
|
7
|
+
import { v as ue, A as Le, B as V, C as O, D as k, Q as te, d as g, g as p, H as ne, c as Q, _ as U, i as X, x as me, l as Ne, b as H, t as M, w as Be, f as Y, h as q, E as fe, aa as Oe, e as ke, r as Ae } from "./LVA2YJMS-qFC9J-lt.mjs";
|
|
8
|
+
import { c as De, b as Ve, u as Fe, a as Me } from "./ITI7HKP4-BONrZ9Pq.mjs";
|
|
9
|
+
import { e as je, f as ze } from "./VGCJ63VH-B39w1tBw.mjs";
|
|
10
|
+
import { m as He, o as oe, s as A, d as y, g as We, c as Ke, a as be, b as se, u as F } from "./YV4JVR4I-BGfUf3Nu.mjs";
|
|
11
|
+
import { forwardRef as G } from "./System.mjs";
|
|
12
|
+
import { u as Qe } from "./VEVQD5MH-ZMnHV8ZJ.mjs";
|
|
13
|
+
import { P as Ue, a as Xe } from "./MTZPJQMC-C0Xe_WK4.mjs";
|
|
14
|
+
var Ye = ue(
|
|
15
|
+
[Xe, de],
|
|
16
|
+
[Ue, le]
|
|
17
|
+
), qe = Ye.useContext;
|
|
19
18
|
ae(!1);
|
|
20
19
|
ae(null);
|
|
21
|
-
function
|
|
22
|
-
var
|
|
23
|
-
composite:
|
|
20
|
+
function Ge(t = {}) {
|
|
21
|
+
var n = t, {
|
|
22
|
+
composite: o,
|
|
24
23
|
combobox: e
|
|
25
|
-
} =
|
|
24
|
+
} = n, s = Le(n, [
|
|
26
25
|
"composite",
|
|
27
26
|
"combobox"
|
|
28
27
|
]);
|
|
@@ -37,11 +36,11 @@ function Ye(t = {}) {
|
|
|
37
36
|
"focusLoop",
|
|
38
37
|
"focusShift",
|
|
39
38
|
"focusWrap"
|
|
40
|
-
], m =
|
|
39
|
+
], m = He(
|
|
41
40
|
s.store,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
), c = m == null ? void 0 : m.getState(), d =
|
|
41
|
+
oe(o, r),
|
|
42
|
+
oe(e, r)
|
|
43
|
+
), c = m == null ? void 0 : m.getState(), d = De(V(k({}, s), {
|
|
45
44
|
store: m,
|
|
46
45
|
// We need to explicitly set the default value of `includesBaseElement` to
|
|
47
46
|
// `false` since we don't want the composite store to default it to `true`
|
|
@@ -58,7 +57,7 @@ function Ye(t = {}) {
|
|
|
58
57
|
"horizontal"
|
|
59
58
|
),
|
|
60
59
|
focusLoop: O(s.focusLoop, c == null ? void 0 : c.focusLoop, !0)
|
|
61
|
-
})), a =
|
|
60
|
+
})), a = Ve(), T = V(k({}, d.getState()), {
|
|
62
61
|
selectedId: O(
|
|
63
62
|
s.selectedId,
|
|
64
63
|
c == null ? void 0 : c.selectedId,
|
|
@@ -69,10 +68,10 @@ function Ye(t = {}) {
|
|
|
69
68
|
c == null ? void 0 : c.selectOnMove,
|
|
70
69
|
!0
|
|
71
70
|
)
|
|
72
|
-
}), i =
|
|
73
|
-
|
|
71
|
+
}), i = Ke(T, d, m);
|
|
72
|
+
A(
|
|
74
73
|
i,
|
|
75
|
-
() =>
|
|
74
|
+
() => y(i, ["moves"], () => {
|
|
76
75
|
const { activeId: u, selectOnMove: b } = i.getState();
|
|
77
76
|
if (!b || !u) return;
|
|
78
77
|
const I = d.item(u);
|
|
@@ -80,62 +79,62 @@ function Ye(t = {}) {
|
|
|
80
79
|
})
|
|
81
80
|
);
|
|
82
81
|
let v = !0;
|
|
83
|
-
|
|
82
|
+
A(
|
|
84
83
|
i,
|
|
85
|
-
() =>
|
|
84
|
+
() => We(i, ["selectedId"], (u, b) => {
|
|
86
85
|
if (!v) {
|
|
87
86
|
v = !0;
|
|
88
87
|
return;
|
|
89
88
|
}
|
|
90
|
-
|
|
89
|
+
o && u.selectedId === b.selectedId || i.setState("activeId", u.selectedId);
|
|
91
90
|
})
|
|
92
|
-
),
|
|
91
|
+
), A(
|
|
93
92
|
i,
|
|
94
|
-
() =>
|
|
93
|
+
() => y(i, ["selectedId", "renderedItems"], (u) => {
|
|
95
94
|
if (u.selectedId !== void 0) return;
|
|
96
95
|
const { activeId: b, renderedItems: I } = i.getState(), S = d.item(b);
|
|
97
96
|
if (S && !S.disabled && !S.dimmed)
|
|
98
97
|
i.setState("selectedId", S.id);
|
|
99
98
|
else {
|
|
100
99
|
const E = I.find(
|
|
101
|
-
(
|
|
100
|
+
(P) => !P.disabled && !P.dimmed
|
|
102
101
|
);
|
|
103
102
|
i.setState("selectedId", E == null ? void 0 : E.id);
|
|
104
103
|
}
|
|
105
104
|
})
|
|
106
|
-
),
|
|
105
|
+
), A(
|
|
107
106
|
i,
|
|
108
|
-
() =>
|
|
107
|
+
() => y(i, ["renderedItems"], (u) => {
|
|
109
108
|
const b = u.renderedItems;
|
|
110
109
|
if (b.length)
|
|
111
|
-
return
|
|
110
|
+
return y(a, ["renderedItems"], (I) => {
|
|
112
111
|
const S = I.renderedItems;
|
|
113
|
-
S.some((
|
|
114
|
-
if (
|
|
112
|
+
S.some((P) => !P.tabId) && S.forEach((P, _) => {
|
|
113
|
+
if (P.tabId) return;
|
|
115
114
|
const N = b[_];
|
|
116
|
-
N && a.renderItem(
|
|
115
|
+
N && a.renderItem(V(k({}, P), { tabId: N.id }));
|
|
117
116
|
});
|
|
118
117
|
});
|
|
119
118
|
})
|
|
120
119
|
);
|
|
121
120
|
let h = null;
|
|
122
|
-
return
|
|
121
|
+
return A(i, () => {
|
|
123
122
|
const u = () => {
|
|
124
123
|
h = i.getState().selectedId;
|
|
125
124
|
}, b = () => {
|
|
126
125
|
v = !1, i.setState("selectedId", h);
|
|
127
126
|
};
|
|
128
|
-
if (
|
|
127
|
+
if (o && "setSelectElement" in o)
|
|
129
128
|
return te(
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
y(o, ["value"], u),
|
|
130
|
+
y(o, ["mounted"], b)
|
|
132
131
|
);
|
|
133
132
|
if (e)
|
|
134
133
|
return te(
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
y(e, ["selectedValue"], u),
|
|
135
|
+
y(e, ["mounted"], b)
|
|
137
136
|
);
|
|
138
|
-
}),
|
|
137
|
+
}), V(k(k({}, d), i), {
|
|
139
138
|
panels: a,
|
|
140
139
|
setSelectedId: (u) => i.setState("selectedId", u),
|
|
141
140
|
select: (u) => {
|
|
@@ -143,54 +142,54 @@ function Ye(t = {}) {
|
|
|
143
142
|
}
|
|
144
143
|
});
|
|
145
144
|
}
|
|
146
|
-
function
|
|
147
|
-
|
|
145
|
+
function Je(t, n, o) {
|
|
146
|
+
ne(n, [o.composite, o.combobox]), t = Fe(t, n, o), se(t, o, "selectedId", "setSelectedId"), se(t, o, "selectOnMove");
|
|
148
147
|
const [e, s] = be(() => t.panels, {});
|
|
149
|
-
return
|
|
148
|
+
return ne(s, [t, s]), Object.assign(
|
|
150
149
|
ie(() => g(p({}, t), { panels: e }), [t, e]),
|
|
151
|
-
{ composite:
|
|
150
|
+
{ composite: o.composite, combobox: o.combobox }
|
|
152
151
|
);
|
|
153
152
|
}
|
|
154
|
-
function
|
|
155
|
-
const
|
|
153
|
+
function Ze(t = {}) {
|
|
154
|
+
const n = Qe(), o = qe() || n;
|
|
156
155
|
t = g(p({}, t), {
|
|
157
|
-
composite: t.composite !== void 0 ? t.composite :
|
|
158
|
-
combobox: t.combobox !== void 0 ? t.combobox :
|
|
156
|
+
composite: t.composite !== void 0 ? t.composite : o,
|
|
157
|
+
combobox: t.combobox !== void 0 ? t.combobox : n
|
|
159
158
|
});
|
|
160
|
-
const [e, s] = be(
|
|
161
|
-
return
|
|
159
|
+
const [e, s] = be(Ge, t);
|
|
160
|
+
return Je(e, s, t);
|
|
162
161
|
}
|
|
163
|
-
var
|
|
162
|
+
var J = ue(
|
|
164
163
|
[de],
|
|
165
164
|
[le]
|
|
166
|
-
),
|
|
167
|
-
var
|
|
165
|
+
), et = J.useScopedContext, pe = J.useProviderContext, ve = J.ScopedContextProvider, tt = "button", nt = Q(function(n) {
|
|
166
|
+
var o = n, {
|
|
168
167
|
store: e,
|
|
169
168
|
getItem: s
|
|
170
|
-
} =
|
|
169
|
+
} = o, r = U(o, [
|
|
171
170
|
"store",
|
|
172
171
|
"getItem"
|
|
173
172
|
]), m;
|
|
174
|
-
const c =
|
|
173
|
+
const c = et();
|
|
175
174
|
e = e || c, X(
|
|
176
175
|
e,
|
|
177
176
|
process.env.NODE_ENV !== "production" && "Tab must be wrapped in a TabList component."
|
|
178
177
|
);
|
|
179
|
-
const d = me(), a = r.id || d, T =
|
|
178
|
+
const d = me(), a = r.id || d, T = Ne(r), i = ce(
|
|
180
179
|
(f) => {
|
|
181
|
-
const
|
|
182
|
-
return s ? s(
|
|
180
|
+
const w = g(p({}, f), { dimmed: T });
|
|
181
|
+
return s ? s(w) : w;
|
|
183
182
|
},
|
|
184
183
|
[T, s]
|
|
185
184
|
), v = r.onClick, h = H((f) => {
|
|
186
185
|
v == null || v(f), !f.defaultPrevented && (e == null || e.setSelectedId(a));
|
|
187
186
|
}), u = e.panels.useState(
|
|
188
187
|
(f) => {
|
|
189
|
-
var
|
|
190
|
-
return (
|
|
188
|
+
var w;
|
|
189
|
+
return (w = f.items.find((l) => l.tabId === a)) == null ? void 0 : w.id;
|
|
191
190
|
}
|
|
192
|
-
), b = d ? r.shouldRegisterItem : !1, I = e.useState((f) => !!a && f.activeId === a), S = e.useState((f) => !!a && f.selectedId === a), E = e.useState((f) => !!e.item(f.activeId)),
|
|
193
|
-
if (
|
|
191
|
+
), b = d ? r.shouldRegisterItem : !1, I = e.useState((f) => !!a && f.activeId === a), S = e.useState((f) => !!a && f.selectedId === a), E = e.useState((f) => !!e.item(f.activeId)), P = I || S && !E, _ = S || ((m = r.accessibleWhenDisabled) != null ? m : !0);
|
|
192
|
+
if (F(
|
|
194
193
|
e.combobox || e.composite,
|
|
195
194
|
"virtualFocus"
|
|
196
195
|
) && (r = g(p({}, r), {
|
|
@@ -207,34 +206,34 @@ var G = ue(
|
|
|
207
206
|
id: a,
|
|
208
207
|
accessibleWhenDisabled: _,
|
|
209
208
|
store: e.composite,
|
|
210
|
-
shouldRegisterItem:
|
|
209
|
+
shouldRegisterItem: P && b,
|
|
211
210
|
rowId: r.rowId,
|
|
212
211
|
render: r.render
|
|
213
212
|
};
|
|
214
213
|
r = g(p({}, r), {
|
|
215
|
-
render: /* @__PURE__ */
|
|
214
|
+
render: /* @__PURE__ */ M.jsx(
|
|
216
215
|
ee,
|
|
217
216
|
g(p({}, f), {
|
|
218
|
-
render: e.combobox && e.composite !== e.combobox ? /* @__PURE__ */
|
|
217
|
+
render: e.combobox && e.composite !== e.combobox ? /* @__PURE__ */ M.jsx(ee, g(p({}, f), { store: e.combobox })) : f.render
|
|
219
218
|
})
|
|
220
219
|
)
|
|
221
220
|
});
|
|
222
221
|
}
|
|
223
|
-
return r =
|
|
222
|
+
return r = _e(g(p({
|
|
224
223
|
store: e
|
|
225
224
|
}, r), {
|
|
226
225
|
accessibleWhenDisabled: _,
|
|
227
226
|
getItem: i,
|
|
228
227
|
shouldRegisterItem: b
|
|
229
228
|
})), r;
|
|
230
|
-
}),
|
|
231
|
-
Y(function(
|
|
232
|
-
const
|
|
233
|
-
return q(
|
|
229
|
+
}), ot = Be(
|
|
230
|
+
Y(function(n) {
|
|
231
|
+
const o = nt(n);
|
|
232
|
+
return q(tt, o);
|
|
234
233
|
})
|
|
235
|
-
),
|
|
236
|
-
function(
|
|
237
|
-
var
|
|
234
|
+
), st = "div", rt = Q(
|
|
235
|
+
function(n) {
|
|
236
|
+
var o = n, { store: e } = o, s = U(o, ["store"]);
|
|
238
237
|
const r = pe();
|
|
239
238
|
e = e || r, X(
|
|
240
239
|
e,
|
|
@@ -245,28 +244,28 @@ var G = ue(
|
|
|
245
244
|
);
|
|
246
245
|
return s = fe(
|
|
247
246
|
s,
|
|
248
|
-
(c) => /* @__PURE__ */
|
|
247
|
+
(c) => /* @__PURE__ */ M.jsx(ve, { value: e, children: c }),
|
|
249
248
|
[e]
|
|
250
249
|
), e.composite && (s = p({
|
|
251
250
|
focusable: !1
|
|
252
251
|
}, s)), s = p({
|
|
253
252
|
role: "tablist",
|
|
254
253
|
"aria-orientation": m
|
|
255
|
-
}, s), s =
|
|
254
|
+
}, s), s = Me(p({ store: e }, s)), s;
|
|
256
255
|
}
|
|
257
|
-
),
|
|
258
|
-
const
|
|
259
|
-
return q(
|
|
260
|
-
}),
|
|
261
|
-
function(
|
|
262
|
-
var
|
|
256
|
+
), at = Y(function(n) {
|
|
257
|
+
const o = rt(n);
|
|
258
|
+
return q(st, o);
|
|
259
|
+
}), it = "div", ct = Q(
|
|
260
|
+
function(n) {
|
|
261
|
+
var o = n, {
|
|
263
262
|
store: e,
|
|
264
263
|
unmountOnHide: s,
|
|
265
264
|
tabId: r,
|
|
266
265
|
getItem: m,
|
|
267
266
|
scrollRestoration: c,
|
|
268
267
|
scrollElement: d
|
|
269
|
-
} =
|
|
268
|
+
} = o, a = U(o, [
|
|
270
269
|
"store",
|
|
271
270
|
"unmountOnHide",
|
|
272
271
|
"tabId",
|
|
@@ -279,48 +278,48 @@ var G = ue(
|
|
|
279
278
|
e,
|
|
280
279
|
process.env.NODE_ENV !== "production" && "TabPanel must receive a `store` prop or be wrapped in a TabProvider component."
|
|
281
280
|
);
|
|
282
|
-
const i = z(null), v = me(a.id), h =
|
|
281
|
+
const i = z(null), v = me(a.id), h = F(
|
|
283
282
|
e.panels,
|
|
284
283
|
() => {
|
|
285
284
|
var l;
|
|
286
285
|
return r || ((l = e == null ? void 0 : e.panels.item(v)) == null ? void 0 : l.tabId);
|
|
287
286
|
}
|
|
288
|
-
), u =
|
|
287
|
+
), u = F(
|
|
289
288
|
e,
|
|
290
289
|
(l) => !!h && l.selectedId === h
|
|
291
|
-
), b = je({ open: u }), I =
|
|
290
|
+
), b = je({ open: u }), I = F(b, "mounted"), S = z(
|
|
292
291
|
/* @__PURE__ */ new Map()
|
|
293
292
|
), E = H(() => {
|
|
294
293
|
const l = i.current;
|
|
295
294
|
return l ? d ? typeof d == "function" ? d(l) : "current" in d ? d.current : d : l : null;
|
|
296
295
|
});
|
|
297
|
-
|
|
296
|
+
Z(() => {
|
|
298
297
|
var l, $;
|
|
299
298
|
if (!c || !I) return;
|
|
300
|
-
const
|
|
301
|
-
if (!
|
|
299
|
+
const C = E();
|
|
300
|
+
if (!C) return;
|
|
302
301
|
if (c === "reset") {
|
|
303
|
-
|
|
302
|
+
C.scroll(0, 0);
|
|
304
303
|
return;
|
|
305
304
|
}
|
|
306
305
|
if (!h) return;
|
|
307
306
|
const R = S.current.get(h);
|
|
308
|
-
|
|
307
|
+
C.scroll((l = R == null ? void 0 : R.x) != null ? l : 0, ($ = R == null ? void 0 : R.y) != null ? $ : 0);
|
|
309
308
|
const B = () => {
|
|
310
309
|
S.current.set(h, {
|
|
311
|
-
x:
|
|
312
|
-
y:
|
|
310
|
+
x: C.scrollLeft,
|
|
311
|
+
y: C.scrollTop
|
|
313
312
|
});
|
|
314
313
|
};
|
|
315
|
-
return
|
|
316
|
-
|
|
314
|
+
return C.addEventListener("scroll", B), () => {
|
|
315
|
+
C.removeEventListener("scroll", B);
|
|
317
316
|
};
|
|
318
317
|
}, [c, I, h, E, e]);
|
|
319
|
-
const [
|
|
320
|
-
|
|
318
|
+
const [P, _] = K(!1);
|
|
319
|
+
Z(() => {
|
|
321
320
|
const l = i.current;
|
|
322
321
|
if (!l) return;
|
|
323
|
-
const $ =
|
|
322
|
+
const $ = Oe(l);
|
|
324
323
|
_(!!$.length);
|
|
325
324
|
}, []);
|
|
326
325
|
const N = ce(
|
|
@@ -329,21 +328,21 @@ var G = ue(
|
|
|
329
328
|
return m ? m($) : $;
|
|
330
329
|
},
|
|
331
330
|
[v, r, m]
|
|
332
|
-
), f = a.onKeyDown,
|
|
331
|
+
), f = a.onKeyDown, w = H((l) => {
|
|
333
332
|
if (f == null || f(l), l.defaultPrevented || !(e != null && e.composite)) return;
|
|
334
|
-
const
|
|
333
|
+
const C = {
|
|
335
334
|
ArrowLeft: e.previous,
|
|
336
335
|
ArrowRight: e.next,
|
|
337
336
|
Home: e.first,
|
|
338
337
|
End: e.last
|
|
339
338
|
}[l.key];
|
|
340
|
-
if (!
|
|
341
|
-
const { selectedId: R } = e.getState(), B =
|
|
339
|
+
if (!C) return;
|
|
340
|
+
const { selectedId: R } = e.getState(), B = C({ activeId: R });
|
|
342
341
|
B && (l.preventDefault(), e.move(B));
|
|
343
342
|
});
|
|
344
343
|
return a = fe(
|
|
345
344
|
a,
|
|
346
|
-
(l) => /* @__PURE__ */
|
|
345
|
+
(l) => /* @__PURE__ */ M.jsx(ve, { value: e, children: l }),
|
|
347
346
|
[e]
|
|
348
347
|
), a = g(p({
|
|
349
348
|
id: v,
|
|
@@ -351,28 +350,34 @@ var G = ue(
|
|
|
351
350
|
"aria-labelledby": h || void 0
|
|
352
351
|
}, a), {
|
|
353
352
|
children: s && !I ? null : a.children,
|
|
354
|
-
ref:
|
|
355
|
-
onKeyDown:
|
|
356
|
-
}), a =
|
|
353
|
+
ref: ke(i, a.ref),
|
|
354
|
+
onKeyDown: w
|
|
355
|
+
}), a = Ae(p({
|
|
357
356
|
// If the tab panel is rendered as part of another composite widget such
|
|
358
357
|
// as combobox, it should not be focusable.
|
|
359
|
-
focusable: !e.composite && !
|
|
360
|
-
}, a)), a =
|
|
358
|
+
focusable: !e.composite && !P
|
|
359
|
+
}, a)), a = ze(p({ store: b }, a)), a = Re(g(p({ store: e.panels }, a), { getItem: N })), a;
|
|
361
360
|
}
|
|
362
|
-
),
|
|
363
|
-
const
|
|
364
|
-
return q(
|
|
361
|
+
), lt = Y(function(n) {
|
|
362
|
+
const o = ct(n);
|
|
363
|
+
return q(it, o);
|
|
365
364
|
});
|
|
366
|
-
function
|
|
367
|
-
|
|
365
|
+
function W(t) {
|
|
366
|
+
var n = Pe.toArray(t);
|
|
367
|
+
return n.reduce(function(o, e) {
|
|
368
|
+
return e.type === Ce ? o.concat(W(e.props.children)) : (o.push(e), o);
|
|
369
|
+
}, []);
|
|
370
|
+
}
|
|
371
|
+
function re(t, n) {
|
|
372
|
+
typeof t == "function" ? t(n) : t && (t.current = n);
|
|
368
373
|
}
|
|
369
|
-
function
|
|
370
|
-
return ie(() => t == null &&
|
|
371
|
-
re(t,
|
|
372
|
-
}, [t,
|
|
374
|
+
function dt(t, n) {
|
|
375
|
+
return ie(() => t == null && n == null ? null : (o) => {
|
|
376
|
+
re(t, o), re(n, o);
|
|
377
|
+
}, [t, n]);
|
|
373
378
|
}
|
|
374
|
-
const
|
|
375
|
-
({ size: t }) =>
|
|
379
|
+
const ut = j(at)(
|
|
380
|
+
({ size: t }) => D`
|
|
376
381
|
position: relative;
|
|
377
382
|
width: 100%;
|
|
378
383
|
overflow-x: auto;
|
|
@@ -390,9 +395,9 @@ const lt = M(st)(
|
|
|
390
395
|
${Ie} {
|
|
391
396
|
${x(`tabs.item.size.${t}`)}
|
|
392
397
|
}
|
|
393
|
-
${
|
|
398
|
+
${we};
|
|
394
399
|
`
|
|
395
|
-
), Ie =
|
|
400
|
+
), Ie = j.button`
|
|
396
401
|
border: 0;
|
|
397
402
|
background: none;
|
|
398
403
|
${x("tabs.item.default")};
|
|
@@ -434,101 +439,101 @@ const lt = M(st)(
|
|
|
434
439
|
& > span {
|
|
435
440
|
${x("tabs.badge")};
|
|
436
441
|
}
|
|
437
|
-
`,
|
|
438
|
-
({ orientation: t }) =>
|
|
442
|
+
`, mt = j(lt)(
|
|
443
|
+
({ orientation: t }) => D`
|
|
439
444
|
${t === "vertical" ? x("tabs.panel.vertical") : x("tabs.panel.horizontal")};
|
|
440
445
|
`
|
|
441
|
-
),
|
|
446
|
+
), ft = ({ offset: t = 0, size: n = 0 }) => D`
|
|
442
447
|
${x("tabs.activeBar.horizontal")};
|
|
443
448
|
left: 0;
|
|
444
449
|
bottom: 0;
|
|
445
|
-
width: ${
|
|
450
|
+
width: ${n}px;
|
|
446
451
|
transform: translateX(${t}px);
|
|
447
|
-
`,
|
|
452
|
+
`, bt = ({ offset: t = 0, size: n = 0 }) => D`
|
|
448
453
|
${x("tabs.activeBar.vertical")};
|
|
449
454
|
right: 0;
|
|
450
455
|
top: 0;
|
|
451
|
-
height: ${
|
|
456
|
+
height: ${n}px;
|
|
452
457
|
transform: translateY(${t}px);
|
|
453
|
-
`,
|
|
454
|
-
({ orientation: t, ...
|
|
458
|
+
`, pt = j.span(
|
|
459
|
+
({ orientation: t, ...n }) => D`
|
|
455
460
|
position: absolute;
|
|
456
|
-
${t === "vertical" ?
|
|
461
|
+
${t === "vertical" ? bt(n) : ft(n)}
|
|
457
462
|
will-change: width, transform;
|
|
458
463
|
transition: medium;
|
|
459
464
|
transition-property: transform, width;
|
|
460
465
|
`
|
|
461
466
|
), Se = (t) => {
|
|
462
467
|
if (!t || typeof window > "u") return 1;
|
|
463
|
-
const
|
|
464
|
-
return isNaN(
|
|
468
|
+
const n = Number(window.getComputedStyle(t).scale);
|
|
469
|
+
return isNaN(n) ? Se(t.parentElement) : n;
|
|
465
470
|
};
|
|
466
|
-
function
|
|
467
|
-
const [e, s] =
|
|
468
|
-
return
|
|
471
|
+
function vt(t, n, o) {
|
|
472
|
+
const [e, s] = K({}), { height: r, width: m } = $e();
|
|
473
|
+
return ye(() => {
|
|
469
474
|
const c = t.current;
|
|
470
|
-
if (!c || !
|
|
471
|
-
const d = c.getBoundingClientRect(), a =
|
|
472
|
-
if (
|
|
475
|
+
if (!c || !n) return;
|
|
476
|
+
const d = c.getBoundingClientRect(), a = n.getBoundingClientRect(), T = Se(c);
|
|
477
|
+
if (o === "vertical") {
|
|
473
478
|
const i = a.top - d.top, v = a.height;
|
|
474
479
|
s({
|
|
475
480
|
size: v,
|
|
476
481
|
offset: i,
|
|
477
|
-
orientation:
|
|
482
|
+
orientation: o
|
|
478
483
|
});
|
|
479
484
|
} else {
|
|
480
485
|
const i = (a.left - d.left + c.scrollLeft) / T, v = a.width / T;
|
|
481
486
|
s({
|
|
482
487
|
size: isNaN(v) ? 0 : v,
|
|
483
488
|
offset: isNaN(i) ? 0 : i,
|
|
484
|
-
orientation:
|
|
489
|
+
orientation: o
|
|
485
490
|
});
|
|
486
491
|
}
|
|
487
|
-
}, [t,
|
|
492
|
+
}, [t, n, m, r, o]), e;
|
|
488
493
|
}
|
|
489
|
-
const xe = ({ activeTab: t, listRef:
|
|
490
|
-
const e =
|
|
491
|
-
return /* @__PURE__ */ L.createElement(
|
|
494
|
+
const xe = ({ activeTab: t, listRef: n, orientation: o }) => {
|
|
495
|
+
const e = vt(n, t, o);
|
|
496
|
+
return /* @__PURE__ */ L.createElement(pt, { ...e });
|
|
492
497
|
};
|
|
493
498
|
xe.displayName = "ActiveBar";
|
|
494
|
-
const
|
|
495
|
-
function
|
|
496
|
-
const [
|
|
497
|
-
return [
|
|
499
|
+
const It = W.default || W;
|
|
500
|
+
function St(t, n) {
|
|
501
|
+
const [o, e] = K(null);
|
|
502
|
+
return [It(n).map((r) => r.props.id === t ? Ee(r, { ref: e }) : r), o];
|
|
498
503
|
}
|
|
499
|
-
const he =
|
|
500
|
-
({ children: t, size:
|
|
501
|
-
const r = z(), m =
|
|
502
|
-
return /* @__PURE__ */ L.createElement(
|
|
504
|
+
const he = G(
|
|
505
|
+
({ children: t, size: n = "md", store: o, ...e }, s) => {
|
|
506
|
+
const r = z(), m = dt(s, r), { orientation: c, selectedId: d } = o.useState(), [a, T] = St(d, t);
|
|
507
|
+
return /* @__PURE__ */ L.createElement(ut, { orientation: c, ref: m, size: n, store: o, ...e }, a, a.length > 1 && /* @__PURE__ */ L.createElement(xe, { activeTab: T, listRef: r, orientation: c }));
|
|
503
508
|
}
|
|
504
509
|
);
|
|
505
510
|
he.displayName = "TabList";
|
|
506
|
-
const ge =
|
|
507
|
-
({ children: t, store:
|
|
508
|
-
const r =
|
|
509
|
-
return /* @__PURE__ */ L.createElement(
|
|
511
|
+
const ge = G(
|
|
512
|
+
({ children: t, store: n, tabId: o, ...e }, s) => {
|
|
513
|
+
const r = n.useState("orientation");
|
|
514
|
+
return /* @__PURE__ */ L.createElement(mt, { orientation: r, ref: s, store: n, tabId: o, ...e }, t);
|
|
510
515
|
}
|
|
511
516
|
);
|
|
512
517
|
ge.displayName = "TabPanel";
|
|
513
|
-
const Te =
|
|
514
|
-
({ as: t, children:
|
|
515
|
-
|
|
518
|
+
const Te = G(
|
|
519
|
+
({ as: t, children: n, id: o, store: e, ...s }, r) => /* @__PURE__ */ L.createElement(
|
|
520
|
+
ot,
|
|
516
521
|
{
|
|
517
|
-
id:
|
|
522
|
+
id: o,
|
|
518
523
|
render: (m) => /* @__PURE__ */ L.createElement(Ie, { as: t, ...m, ref: r }),
|
|
519
524
|
store: e,
|
|
520
525
|
...s
|
|
521
526
|
},
|
|
522
|
-
|
|
527
|
+
n
|
|
523
528
|
)
|
|
524
529
|
);
|
|
525
530
|
Te.displayName = "Tab";
|
|
526
|
-
const
|
|
527
|
-
function
|
|
528
|
-
return
|
|
531
|
+
const Lt = Object.assign(Te, { List: he, Panel: ge });
|
|
532
|
+
function Nt(t) {
|
|
533
|
+
return Ze(t);
|
|
529
534
|
}
|
|
530
535
|
export {
|
|
531
|
-
|
|
536
|
+
Lt as Tab,
|
|
532
537
|
Te as TabComponent,
|
|
533
|
-
|
|
538
|
+
Nt as useTab
|
|
534
539
|
};
|
package/dist/Tag.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),v=require("./
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),v=require("./wrap-children-BLDjJiiy.js"),t=require("@xstyled/styled-components"),d=require("./overflow-ellipsis-C2ESrF8C.js"),h=require("./get-max-width-height-CDLBnp_J.js"),S=require("./Icon.js"),w=require("./System.js"),q=require("./index-C1FV1q-F.js"),C=(s,e,n)=>t.css`
|
|
2
2
|
${t.th(`tags.shape.${s}`)}
|
|
3
3
|
padding: 0;
|
|
4
4
|
${(e||n)&&t.css`
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
> *:not(:only-child) {
|
|
56
|
-
${
|
|
56
|
+
${S.StyledIcon}:last-child {
|
|
57
57
|
opacity: 1;
|
|
58
58
|
transition: opacity ${t.th.transition("medium")};
|
|
59
59
|
cursor: pointer;
|
|
@@ -75,4 +75,4 @@
|
|
|
75
75
|
`),E=t.buttonBox`
|
|
76
76
|
all: unset;
|
|
77
77
|
display: flex;
|
|
78
|
-
`,u=w.forwardRef(({as:s,children:e,dataTestId:n,href:r,onClick:o,onRemove:i,size:a="md",to:c,variant:p="default",...$},y)=>{const m=
|
|
78
|
+
`,u=w.forwardRef(({as:s,children:e,dataTestId:n,href:r,onClick:o,onRemove:i,size:a="md",to:c,variant:p="default",...$},y)=>{const m=v.wrapChildren(e),f=!!(e||e===0)&&["number","string"].includes(typeof e)?e.toString().length:void 0,x=!!r||!!c;return l.createElement(g,{as:s,"data-testid":n,hasClickAction:!!o,hasLink:x,hasRemoveAction:!!i,href:r,length:f,onClick:o,ref:y,size:a,to:c,variant:p,...$},m,!!i&&l.createElement(b,{size:a},l.createElement(E,{onClick:i,title:"Remove",type:"button"},l.createElement(q.CrossIcon,{size:"xs",title:"Remove"}))))});u.displayName="Tag";const T=g;exports.StyledTag=T;exports.Tag=u;
|