twenty-ui 2.49.0 → 2.50.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/CHANGELOG.md +18 -0
- package/dist/Button-CU8BS-Yd.js +75 -0
- package/dist/Button-iVyxlrwO.cjs +1 -0
- package/dist/Dropdown-ChTVyesF.js +1018 -0
- package/dist/Dropdown-DlItz8Gh.cjs +1 -0
- package/dist/Heading-CHvEXL6n.cjs +1 -0
- package/dist/{Heading-pXllCJCO.js → Heading-Nj5BlPqB.js} +3 -3
- package/dist/{ListItem-DwBb-I1D.cjs → ListItem-C6Xl00m1.cjs} +1 -1
- package/dist/{ListItem-DizNUBT8.js → ListItem-C84ANa76.js} +1 -1
- package/dist/{OverflowingTextWithTooltip-Z2daM0_x.cjs → OverflowingTextWithTooltip-BQmpPObX.cjs} +1 -1
- package/dist/{OverflowingTextWithTooltip-BmUROIah.js → OverflowingTextWithTooltip-BtB9cGdJ.js} +20 -21
- package/dist/ProgressBar-CzGs7cuE.cjs +1 -0
- package/dist/ProgressBar-D4tKQ7OA.js +84 -0
- package/dist/{Radio-BEAztmPu.js → Radio-BwBZ4e8g.js} +29 -29
- package/dist/{Radio-Dx6b4SYZ.cjs → Radio-sIYxZnR_.cjs} +1 -1
- package/dist/TabsTabContent-6rkARU9F.cjs +1 -0
- package/dist/TabsTabContent-DPkLTBi2.js +39 -0
- package/dist/Tooltip-6uS8_wdA.js +132 -0
- package/dist/Tooltip-DL3sfbuw.cjs +1 -0
- package/dist/components/data-display.cjs +1 -1
- package/dist/components/data-display.mjs +6 -7
- package/dist/components/feedback/InlineBanner/InlineBanner.d.ts +2 -2
- package/dist/components/feedback/InlineBanner/internal/InlineBannerComponent.d.ts +1 -1
- package/dist/components/feedback/InlineBanner/types/InlineBannerProps.d.ts +1 -0
- package/dist/components/feedback.cjs +1 -1
- package/dist/components/feedback.mjs +1 -1
- package/dist/components/input/SegmentedControl/types/SegmentedControlProps.d.ts +1 -1
- package/dist/components/input.cjs +1 -1
- package/dist/components/input.mjs +2 -2
- package/dist/components/layout.cjs +1 -1
- package/dist/components/layout.mjs +1 -1
- package/dist/components/navigation/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownSearch.d.ts +1 -1
- package/dist/components/navigation/Dropdown/internal/DropdownSearchEffect.d.ts +8 -0
- package/dist/components/navigation/index.d.ts +0 -11
- package/dist/components/navigation.cjs +1 -1
- package/dist/components/navigation.mjs +6 -11
- package/dist/components/settings.cjs +1 -1
- package/dist/components/settings.mjs +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.mjs +35 -41
- package/dist/data-display-C-eoJ5En.js +378 -0
- package/dist/data-display-CM1yXpnE.cjs +2 -0
- package/dist/data-display-CXw-mxeS.js +252 -0
- package/dist/data-display-DdES9XqZ.cjs +1 -0
- package/dist/{feedback-DTyVVcTb.js → feedback-4HKPcMRs.js} +216 -215
- package/dist/feedback-BSOWDBI0.js +38 -0
- package/dist/feedback-DBRXDPSP.cjs +1 -0
- package/dist/feedback-DspXawf9.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +605 -611
- package/dist/input-CWWp7cqL.cjs +1 -0
- package/dist/input-CvZ_uB_9.cjs +1 -0
- package/dist/{input-BrjD91wv.js → input-Qn5_aFYU.js} +5 -5
- package/dist/input-k5cMhFI_.js +428 -0
- package/dist/{layout-DQcjBu08.js → layout-DDqeMgFv.js} +2 -2
- package/dist/{layout-CthYckvl.cjs → layout-iSfGrMrH.cjs} +1 -1
- package/dist/navigation-7Y6gHFlj.cjs +1 -0
- package/dist/{navigation-CIVYqPc5.js → navigation-BY8X2w04.js} +31 -31
- package/dist/navigation-BcXCiLE1.js +86 -0
- package/dist/navigation-ByYN6NgX.cjs +1 -0
- package/dist/normalizeSearchText-DLmPiBUZ.js +19 -0
- package/dist/normalizeSearchText-Do0MELpQ.cjs +1 -0
- package/dist/preventDismissingClickActivation-BEBrL9aB.cjs +1 -0
- package/dist/preventDismissingClickActivation-BQFMKRey.js +29 -0
- package/dist/primitives/accessibility.cjs +1 -1
- package/dist/primitives/accessibility.mjs +1 -1
- package/dist/primitives/data-display/Avatar/constants/AvatarPropertiesBySize.d.ts +4 -0
- package/dist/primitives/data-display/Avatar/types/AvatarSize.d.ts +1 -1
- package/dist/primitives/data-display/Badge/types/BadgeColor.d.ts +1 -1
- package/dist/primitives/data-display/Chip/types/ChipVariant.d.ts +1 -1
- package/dist/primitives/data-display.cjs +1 -1
- package/dist/primitives/data-display.mjs +7 -8
- package/dist/primitives/feedback/Banner/Banner.d.ts +1 -1
- package/dist/primitives/feedback/Banner/internal/BannerAction.d.ts +1 -1
- package/dist/primitives/feedback.cjs +1 -1
- package/dist/primitives/feedback.mjs +2 -2
- package/dist/primitives/input/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/primitives/input/Autocomplete/internal/AutocompleteInput.d.ts +1 -1
- package/dist/primitives/input/Autocomplete/types/AutocompleteInputProps.d.ts +8 -1
- package/dist/primitives/input/Button/types/ButtonColor.d.ts +1 -1
- package/dist/primitives/input/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/primitives/input/RadioGroup/types/RadioGroupProps.d.ts +3 -1
- package/dist/primitives/input.cjs +1 -1
- package/dist/primitives/input.mjs +3 -3
- package/dist/primitives/navigation/Tabs/types/TabsSize.d.ts +1 -1
- package/dist/primitives/navigation.cjs +1 -1
- package/dist/primitives/navigation.mjs +2 -2
- package/dist/primitives/surfaces/Card/Card.d.ts +1 -1
- package/dist/primitives/surfaces/Card/internal/CardRoot.d.ts +1 -1
- package/dist/primitives/surfaces/Card/types/CardRootProps.d.ts +0 -1
- package/dist/primitives/surfaces/Tooltip/Tooltip.d.ts +1 -0
- package/dist/primitives/surfaces/Tooltip/__stories__/findTooltip.d.ts +1 -0
- package/dist/primitives/surfaces/Tooltip/internal/TooltipBody.d.ts +2 -8
- package/dist/primitives/surfaces/Tooltip/types/TooltipBodyProps.d.ts +6 -0
- package/dist/primitives/surfaces/index.d.ts +1 -0
- package/dist/primitives/surfaces.cjs +1 -1
- package/dist/primitives/surfaces.mjs +2 -2
- package/dist/primitives/typography/Heading/types/HeadingProps.d.ts +1 -1
- package/dist/primitives/typography.cjs +1 -1
- package/dist/primitives/typography.mjs +3 -3
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.mjs +45 -46
- package/dist/{settings-CPXhrmbK.cjs → settings-DT5bEO6A.cjs} +1 -1
- package/dist/{settings-BgVuLpg9.js → settings-XGSJtobU.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/surfaces-q8voTXEJ.cjs +1 -0
- package/dist/{surfaces-BLsR5ka0.js → surfaces-vhSZBmbz.js} +77 -78
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/utils/waitForStorybookFontsLoaded.d.ts +1 -0
- package/dist/testing.cjs +1 -1
- package/dist/testing.mjs +87 -77
- package/dist/{typography-DT2eKLvd.js → typography-BPdXzW2T.js} +1 -1
- package/dist/{typography-bKeSMuJd.cjs → typography-CWtuNruY.cjs} +1 -1
- package/dist/utilities.cjs +1 -1
- package/dist/utilities.mjs +11 -10
- package/package.json +1 -1
- package/dist/Avatar-C6WxBgjS.cjs +0 -1
- package/dist/Avatar-ifVlxbx_.js +0 -73
- package/dist/Button-DIw804CX.js +0 -72
- package/dist/Button-DTm1WDzp.cjs +0 -1
- package/dist/Dropdown-1OAJvS1f.js +0 -1000
- package/dist/Dropdown-Bl4OXCf9.cjs +0 -1
- package/dist/Heading-CTRYClCO.cjs +0 -1
- package/dist/ProgressBar-B3xACTV2.js +0 -84
- package/dist/ProgressBar-OpSMnDBz.cjs +0 -1
- package/dist/TabsTabContent-Co27Y2TU.cjs +0 -1
- package/dist/TabsTabContent-DVcObDp6.js +0 -39
- package/dist/TintedIconTile-B1XDtGrF.js +0 -40
- package/dist/TintedIconTile-DO1XJXCQ.cjs +0 -1
- package/dist/Tooltip-Bg9Uk01p.cjs +0 -1
- package/dist/Tooltip-cLCgtFBF.js +0 -124
- package/dist/components/navigation/MenuItem/MenuItem.d.ts +0 -2
- package/dist/components/navigation/MenuItem/parts/MenuItemIcon.d.ts +0 -9
- package/dist/components/navigation/MenuItem/parts/MenuItemIconBoxContainer.d.ts +0 -7
- package/dist/components/navigation/MenuItem/parts/MenuItemIconWithGripSwap.d.ts +0 -8
- package/dist/components/navigation/MenuItem/parts/MenuItemLeftContent.d.ts +0 -19
- package/dist/components/navigation/MenuItem/parts/StyledMenuItemBase.d.ts +0 -25
- package/dist/components/navigation/MenuItem/types/MenuItemDraggableGripMode.d.ts +0 -1
- package/dist/components/navigation/MenuItem/types/MenuItemProps.d.ts +0 -33
- package/dist/components/navigation/MenuItemAvatar/MenuItemAvatar.d.ts +0 -2
- package/dist/components/navigation/MenuItemAvatar/types/MenuItemAvatarProps.d.ts +0 -18
- package/dist/components/navigation/MenuItemDraggable/MenuItemDraggable.d.ts +0 -2
- package/dist/components/navigation/MenuItemDraggable/types/MenuItemDraggableProps.d.ts +0 -20
- package/dist/components/navigation/MenuItemSuggestion/MenuItemSuggestion.d.ts +0 -2
- package/dist/components/navigation/MenuItemSuggestion/types/MenuItemSuggestionProps.d.ts +0 -12
- package/dist/components/navigation/MenuPicker/MenuPicker.d.ts +0 -2
- package/dist/components/navigation/MenuPicker/types/MenuPickerProps.d.ts +0 -15
- package/dist/data-display-BSKGlijb.cjs +0 -1
- package/dist/data-display-BtXCGOGw.js +0 -345
- package/dist/data-display-DtXIhJ4B.js +0 -184
- package/dist/data-display-XV3ht1rC.cjs +0 -2
- package/dist/feedback-Cs-38OH4.cjs +0 -1
- package/dist/feedback-DA-AU5z5.js +0 -38
- package/dist/feedback-DNLERYY9.cjs +0 -1
- package/dist/input-B_rBplmn.cjs +0 -1
- package/dist/input-ChlFcqIS.cjs +0 -1
- package/dist/input-D1oyk0tD.js +0 -421
- package/dist/navigation-B6nka3bW.js +0 -400
- package/dist/navigation-CflGBYv-.cjs +0 -1
- package/dist/navigation-DoInK0Sp.cjs +0 -1
- package/dist/preventDismissingClickActivation-AaqHBLnW.js +0 -45
- package/dist/preventDismissingClickActivation-CIhWvKCu.cjs +0 -1
- package/dist/surfaces-0rL5DoHt.cjs +0 -1
- /package/dist/{handleClickableElementKeyDown-C8Uz61XJ.js → accessibility-C8Uz61XJ.js} +0 -0
- /package/dist/{handleClickableElementKeyDown-CByqtBhO.cjs → accessibility-CByqtBhO.cjs} +0 -0
|
@@ -1,155 +1,154 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { t as D } from "./isDefined-fMi6eQ4r.js";
|
|
2
2
|
import { t as _ } from "./theme-B2EaXhye.js";
|
|
3
3
|
import { t as p } from "./mergeClassNames-ClFMR1v0.js";
|
|
4
4
|
import { t as v } from "./useProvidedTextDirection-Dk8LBQeF.js";
|
|
5
|
-
import { t as
|
|
5
|
+
import { t as u } from "./Heading-Nj5BlPqB.js";
|
|
6
6
|
import { useRender as c } from "@base-ui/react/use-render";
|
|
7
|
-
import { isUndefined as
|
|
7
|
+
import { isUndefined as f } from "@sniptt/guards";
|
|
8
8
|
import { clsx as s } from "clsx";
|
|
9
9
|
import { jsx as i } from "react/jsx-runtime";
|
|
10
10
|
import { AlertDialog as d } from "@base-ui/react/alert-dialog";
|
|
11
11
|
import { Dialog as l } from "@base-ui/react/dialog";
|
|
12
|
-
var
|
|
13
|
-
backdrop:
|
|
14
|
-
viewport:
|
|
15
|
-
popup:
|
|
16
|
-
header:
|
|
17
|
-
body:
|
|
18
|
-
footer:
|
|
19
|
-
title:
|
|
20
|
-
description:
|
|
21
|
-
},
|
|
12
|
+
var C = "_backdrop_aak4r_1", N = "_viewport_aak4r_12", k = "_popup_aak4r_30", H = "_header_aak4r_82", P = "_body_aak4r_91", T = "_footer_aak4r_95", y = "_title_aak4r_106", A = "_description_aak4r_113", t = {
|
|
13
|
+
backdrop: C,
|
|
14
|
+
viewport: N,
|
|
15
|
+
popup: k,
|
|
16
|
+
header: H,
|
|
17
|
+
body: P,
|
|
18
|
+
footer: T,
|
|
19
|
+
title: y,
|
|
20
|
+
description: A
|
|
21
|
+
}, w = ({ className: r, ...a }) => /* @__PURE__ */ i(d.Backdrop, {
|
|
22
22
|
...a,
|
|
23
23
|
className: p(t.backdrop, r)
|
|
24
|
-
}),
|
|
24
|
+
}), B = ({ render: r, ref: a, className: e, ...o }) => c({
|
|
25
25
|
render: r,
|
|
26
26
|
ref: a,
|
|
27
27
|
props: {
|
|
28
28
|
...o,
|
|
29
29
|
className: s(t.body, e)
|
|
30
30
|
}
|
|
31
|
-
}),
|
|
31
|
+
}), F = ({ className: r, ...a }) => /* @__PURE__ */ i(d.Description, {
|
|
32
32
|
...a,
|
|
33
33
|
className: p(t.description, r)
|
|
34
|
-
}),
|
|
34
|
+
}), b = ({ render: r, ref: a, className: e, ...o }) => c({
|
|
35
35
|
render: r,
|
|
36
36
|
ref: a,
|
|
37
37
|
props: {
|
|
38
38
|
...o,
|
|
39
39
|
className: s(t.footer, e)
|
|
40
40
|
}
|
|
41
|
-
}),
|
|
41
|
+
}), h = ({ render: r, ref: a, className: e, ...o }) => c({
|
|
42
42
|
render: r,
|
|
43
43
|
ref: a,
|
|
44
44
|
props: {
|
|
45
45
|
...o,
|
|
46
46
|
className: s(t.header, e)
|
|
47
47
|
}
|
|
48
|
-
}),
|
|
48
|
+
}), R = ({ container: r, ...a }) => {
|
|
49
49
|
const e = _(), o = v();
|
|
50
50
|
return /* @__PURE__ */ i(d.Portal, {
|
|
51
51
|
dir: o,
|
|
52
52
|
...a,
|
|
53
53
|
container: r === void 0 ? e ?? void 0 : r
|
|
54
54
|
});
|
|
55
|
-
},
|
|
55
|
+
}, V = ({ size: r = "md", className: a, ...e }) => /* @__PURE__ */ i(d.Popup, {
|
|
56
56
|
...e,
|
|
57
57
|
"data-size": r,
|
|
58
58
|
className: p(t.popup, a)
|
|
59
|
-
}),
|
|
59
|
+
}), x = ({ className: r, ...a }) => /* @__PURE__ */ i(d.Title, {
|
|
60
60
|
...a,
|
|
61
61
|
className: p(t.title, r)
|
|
62
|
-
}),
|
|
62
|
+
}), $ = ({ className: r, ...a }) => {
|
|
63
63
|
const e = v();
|
|
64
64
|
return /* @__PURE__ */ i(d.Viewport, {
|
|
65
65
|
dir: e,
|
|
66
66
|
...a,
|
|
67
67
|
className: p(t.viewport, r)
|
|
68
68
|
});
|
|
69
|
-
},
|
|
69
|
+
}, z = () => ({
|
|
70
70
|
Root: d.Root,
|
|
71
71
|
Trigger: d.Trigger,
|
|
72
|
-
Portal:
|
|
73
|
-
Backdrop:
|
|
74
|
-
Viewport:
|
|
75
|
-
Popup:
|
|
76
|
-
Title:
|
|
77
|
-
Description:
|
|
72
|
+
Portal: R,
|
|
73
|
+
Backdrop: w,
|
|
74
|
+
Viewport: $,
|
|
75
|
+
Popup: V,
|
|
76
|
+
Title: x,
|
|
77
|
+
Description: F,
|
|
78
78
|
Close: d.Close,
|
|
79
|
-
Header:
|
|
80
|
-
Body:
|
|
81
|
-
Footer:
|
|
79
|
+
Header: h,
|
|
80
|
+
Body: B,
|
|
81
|
+
Footer: b,
|
|
82
82
|
Handle: d.Handle,
|
|
83
83
|
createHandle: d.createHandle
|
|
84
|
-
}),
|
|
84
|
+
}), Cr = /* @__PURE__ */ z(), j = "_cardContent_122dn_1", U = { cardContent: j }, q = ({ className: r, divider: a, render: e, ref: o, ...n }) => c({
|
|
85
85
|
render: e,
|
|
86
86
|
ref: o,
|
|
87
87
|
props: {
|
|
88
88
|
...n,
|
|
89
|
-
className: s(
|
|
89
|
+
className: s(U.cardContent, r),
|
|
90
90
|
"data-divider": a || void 0
|
|
91
91
|
}
|
|
92
|
-
}),
|
|
92
|
+
}), E = "_cardFooter_yo8y2_1", G = { cardFooter: E }, I = ({ className: r, divider: a, render: e, ref: o, ...n }) => c({
|
|
93
93
|
render: e,
|
|
94
94
|
ref: o,
|
|
95
95
|
props: {
|
|
96
96
|
...n,
|
|
97
|
-
className: s(
|
|
97
|
+
className: s(G.cardFooter, r),
|
|
98
98
|
"data-no-divider": a === !1 || void 0
|
|
99
99
|
}
|
|
100
|
-
}),
|
|
100
|
+
}), J = "_cardHeader_18psr_1", K = { cardHeader: J }, L = ({ className: r, render: a, ref: e, ...o }) => c({
|
|
101
101
|
render: a,
|
|
102
102
|
ref: e,
|
|
103
103
|
props: {
|
|
104
104
|
...o,
|
|
105
|
-
className: s(
|
|
105
|
+
className: s(K.cardHeader, r)
|
|
106
106
|
}
|
|
107
|
-
}),
|
|
108
|
-
render:
|
|
109
|
-
ref:
|
|
107
|
+
}), M = "_card_l2pp2_1", O = { card: M }, Q = ({ className: r, fullWidth: a, backgroundColor: e, style: o, render: n, ref: m, ...g }) => c({
|
|
108
|
+
render: n,
|
|
109
|
+
ref: m,
|
|
110
110
|
props: {
|
|
111
|
-
...
|
|
112
|
-
className: s(
|
|
111
|
+
...g,
|
|
112
|
+
className: s(O.card, r),
|
|
113
113
|
"data-full-width": a || void 0,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
} : n
|
|
114
|
+
style: D(e) ? {
|
|
115
|
+
...o,
|
|
116
|
+
"--card-background-color": e
|
|
117
|
+
} : o
|
|
119
118
|
}
|
|
120
|
-
}),
|
|
121
|
-
Root:
|
|
122
|
-
Header:
|
|
123
|
-
Content:
|
|
124
|
-
Footer:
|
|
125
|
-
},
|
|
119
|
+
}), Nr = {
|
|
120
|
+
Root: Q,
|
|
121
|
+
Header: L,
|
|
122
|
+
Content: q,
|
|
123
|
+
Footer: I
|
|
124
|
+
}, S = ({ className: r, ...a }) => /* @__PURE__ */ i(l.Backdrop, {
|
|
126
125
|
...a,
|
|
127
126
|
className: p(t.backdrop, r)
|
|
128
|
-
}),
|
|
127
|
+
}), W = ({ render: r, ref: a, className: e, ...o }) => c({
|
|
129
128
|
render: r,
|
|
130
129
|
ref: a,
|
|
131
130
|
props: {
|
|
132
131
|
...o,
|
|
133
132
|
className: s(t.body, e)
|
|
134
133
|
}
|
|
135
|
-
}),
|
|
134
|
+
}), X = "_description_3f4d1_1", Y = { description: X }, Z = ({ className: r, ...a }) => /* @__PURE__ */ i(l.Description, {
|
|
136
135
|
...a,
|
|
137
|
-
className: p(s(t.description,
|
|
138
|
-
}),
|
|
136
|
+
className: p(s(t.description, Y.description), r)
|
|
137
|
+
}), rr = ({ render: r, ref: a, className: e, ...o }) => c({
|
|
139
138
|
render: r,
|
|
140
139
|
ref: a,
|
|
141
140
|
props: {
|
|
142
141
|
...o,
|
|
143
142
|
className: s(t.footer, e)
|
|
144
143
|
}
|
|
145
|
-
}),
|
|
144
|
+
}), ar = ({ render: r, ref: a, className: e, ...o }) => c({
|
|
146
145
|
render: r,
|
|
147
146
|
ref: a,
|
|
148
147
|
props: {
|
|
149
148
|
...o,
|
|
150
149
|
className: s(t.header, e)
|
|
151
150
|
}
|
|
152
|
-
}),
|
|
151
|
+
}), er = ({ size: r = "md", className: a, ...e }) => {
|
|
153
152
|
const o = v();
|
|
154
153
|
return /* @__PURE__ */ i(l.Popup, {
|
|
155
154
|
dir: o,
|
|
@@ -157,46 +156,46 @@ var N = "_backdrop_aak4r_1", k = "_viewport_aak4r_12", H = "_popup_aak4r_30", P
|
|
|
157
156
|
"data-size": r,
|
|
158
157
|
className: p(t.popup, a)
|
|
159
158
|
});
|
|
160
|
-
},
|
|
159
|
+
}, or = ({ container: r, ...a }) => {
|
|
161
160
|
const e = _();
|
|
162
161
|
return /* @__PURE__ */ i(l.Portal, {
|
|
163
162
|
...a,
|
|
164
|
-
container:
|
|
163
|
+
container: f(r) ? e ?? void 0 : r
|
|
165
164
|
});
|
|
166
|
-
},
|
|
165
|
+
}, tr = "_title_yzpck_1", ir = { title: tr }, dr = ({ level: r = 2, size: a = "lg", color: e = "primary", className: o, render: n, ...m }) => /* @__PURE__ */ i(l.Title, {
|
|
167
166
|
...m,
|
|
168
|
-
className: p(
|
|
169
|
-
render: /* @__PURE__ */ i(
|
|
167
|
+
className: p(ir.title, o),
|
|
168
|
+
render: /* @__PURE__ */ i(u, {
|
|
170
169
|
level: r,
|
|
171
170
|
size: a,
|
|
172
171
|
color: e,
|
|
173
172
|
render: n
|
|
174
173
|
})
|
|
175
|
-
}),
|
|
174
|
+
}), lr = ({ className: r, ...a }) => {
|
|
176
175
|
const e = v();
|
|
177
176
|
return /* @__PURE__ */ i(l.Viewport, {
|
|
178
177
|
dir: e,
|
|
179
178
|
...a,
|
|
180
179
|
className: p(t.viewport, r)
|
|
181
180
|
});
|
|
182
|
-
},
|
|
181
|
+
}, kr = {
|
|
183
182
|
createHandle: l.createHandle,
|
|
184
183
|
Handle: l.Handle,
|
|
185
184
|
Root: l.Root,
|
|
186
185
|
Trigger: l.Trigger,
|
|
187
|
-
Portal:
|
|
188
|
-
Backdrop:
|
|
189
|
-
Viewport:
|
|
190
|
-
Popup:
|
|
191
|
-
Title:
|
|
192
|
-
Description:
|
|
186
|
+
Portal: or,
|
|
187
|
+
Backdrop: S,
|
|
188
|
+
Viewport: lr,
|
|
189
|
+
Popup: er,
|
|
190
|
+
Title: dr,
|
|
191
|
+
Description: Z,
|
|
193
192
|
Close: l.Close,
|
|
194
|
-
Header:
|
|
195
|
-
Body:
|
|
196
|
-
Footer:
|
|
193
|
+
Header: ar,
|
|
194
|
+
Body: W,
|
|
195
|
+
Footer: rr
|
|
197
196
|
};
|
|
198
197
|
export {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
198
|
+
Nr as n,
|
|
199
|
+
Cr as r,
|
|
200
|
+
kr as t
|
|
202
201
|
};
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export { GroupedCatalog } from './GroupedCatalog';
|
|
|
7
7
|
export { AVATAR_URL_MOCK } from './mocks/avatarUrlMock';
|
|
8
8
|
export type { CatalogStory } from './types/CatalogStory';
|
|
9
9
|
export { overrideMediaQueryMatches } from './utils/overrideMediaQueryMatches';
|
|
10
|
+
export { waitForStorybookFontsLoaded } from './utils/waitForStorybookFontsLoaded';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const waitForStorybookFontsLoaded: () => Promise<void>;
|
package/dist/testing.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("./theme-1XkFz8Qu.cjs"),
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("./theme-1XkFz8Qu.cjs"),w=require("./isDefined-DS2Q42p5.cjs"),B=require("./Heading-CHvEXL6n.cjs");let h=require("@sniptt/guards"),y=require("clsx"),r=require("react/jsx-runtime");var U={test:"error",config:{rules:[{id:"color-contrast",enabled:!1}]}},T="_layout_17ld0_1",j={layout:T},E=({width:e,backgroundColor:A,height:a,children:t})=>(0,r.jsx)("div",{className:j.layout,style:{background:A,height:w.isDefined(a)?`${a}px`:"fit-content",minWidth:e?"unset":"300px",width:e?`${e}px`:"fit-content"},children:t}),V="_columnTitle_5dert_1",M="_rowsTitle_5dert_7",F="_rowTitle_5dert_15",f="_elementTitle_5dert_23",S="_container_5dert_32",b="_columnContainer_5dert_37",k="_rowsContainer_5dert_43",D="_rowContainer_5dert_49",N="_elementContainer_5dert_56",I="_cellContainer_5dert_60",o={columnTitle:V,rowsTitle:M,rowTitle:F,elementTitle:f,container:S,columnContainer:b,rowsContainer:k,rowContainer:D,elementContainer:N,cellContainer:I},m={name:"",values:[void 0],props:()=>({})},g=e=>(0,h.isString)(e)||(0,h.isNumber)(e),L=(e,A)=>{const{catalog:{dimensions:a=[],options:t={}}={dimensions:[],options:{}}}=A.parameters||{};if(!a||!Array.isArray(a))return(0,r.jsx)(e,{});const[n=m,i=m,u=m,C=m]=a;return(0,r.jsx)("div",{className:o.container,children:C.values.map((l,_)=>(0,r.jsxs)("div",{className:o.columnContainer,children:[(0,r.jsx)("div",{className:o.columnTitle,children:C.labels?.(l)??(g(l)?l:"")}),u.values.map((d,R)=>(0,r.jsxs)("div",{className:o.rowsContainer,children:[(0,r.jsx)("div",{className:o.rowsTitle,children:u.labels?.(d)??(g(d)?d:"")}),i.values.map((c,v)=>(0,r.jsxs)("div",{className:o.rowContainer,children:[(0,r.jsx)("div",{className:o.rowTitle,children:i.labels?.(c)??(g(c)?c:"")}),n.values.map((s,Q)=>(0,r.jsxs)("div",{className:o.cellContainer,id:a.length>1?`catalog-cell-${_}-${R}-${v}-${Q}`:s,children:[(0,r.jsx)("span",{className:o.elementTitle,children:n.labels?.(s)??(g(s)?s:"")}),(0,r.jsx)("div",{className:(0,y.clsx)(o.elementContainer,t?.elementContainer?.className),style:{minWidth:t?.elementContainer?.width?`${t.elementContainer.width}px`:"auto",...t?.elementContainer?.style},children:(0,r.jsx)(e,{args:{...A.args,...n.props(s),...i.props(c),...u.props(d),...C.props(l)}})})]},`d1-${Q}`))]},`d2-${v}`))]},`d3-${R}`))]},`d4-${_}`))})},x=(e,A)=>{if(e)switch(A){case"default":return p.themeCssVariables.grayScale.gray11;case"danger":return p.themeCssVariables.color.red;case"blue":return p.themeCssVariables.color.blue;default:return}},O=(e,A)=>{const{container:a}=A.parameters,t=A.args.inverted,n=A.args.accent,i=x(t,n);return(0,r.jsx)(E,{width:a?.width,height:a?.height,backgroundColor:i,children:(0,r.jsx)(e,{})})},K=({groups:e,renderExample:A})=>(0,r.jsx)("div",{style:{display:"grid",gap:"var(--t-spacing-6)",width:"100%"},children:e.map(({label:a,examples:t})=>(0,r.jsxs)("section",{"aria-label":a,children:[(0,r.jsx)(B.Heading,{level:3,children:a}),(0,r.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"var(--t-spacing-6)",marginTop:"var(--t-spacing-3)"},children:t.map(n=>(0,r.jsx)("div",{style:{display:"grid",gap:"var(--t-spacing-2)",justifyItems:"start"},children:A(n)},n.label))})]},a))}),q="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAYABgAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABgAAAAAQAAAGAAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAABSgAwAEAAAAAQAAABQAAAAA/8AAEQgAFAAUAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/bAEMACwgICggHCwoJCg0MCw0RHBIRDw8RIhkaFBwpJCsqKCQnJy0yQDctMD0wJyc4TDk9Q0VISUgrNk9VTkZUQEdIRf/bAEMBDA0NEQ8RIRISIUUuJy5FRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRf/dAAQAAv/aAAwDAQACEQMRAD8Ava1q728otYY98joSCTgZrnbXWdTtrhrfVZXWLafmcAEkdgR/hVltQku9Q8+OIEBcGOT+ID0PY1ka1KH2u8ToqnPLbmIqG7u6LtbQ7RXBRec4Uck9eKXcPWsKDWVnhWSL5kYcFelSf2m3901POh8jP//QoyIAnTuKpXsY82NsksUyWPU5q/L9z8RVK++/F/uCsVsaEURwgA4HtT9x9TUcf3KfUGh//9k=",W=e=>Object.assign(new EventTarget,{media:e,matches:!1,onchange:null,addListener:()=>{},removeListener:()=>{}}),Y=e=>{const A=window.matchMedia;return window.matchMedia=a=>{const t=(0,h.isFunction)(A)?A.call(window,a):W(a),n=e[a];return w.isDefined(n)&&Object.defineProperty(t,"matches",{value:n}),t},()=>{window.matchMedia=A}},J=["400 1em Inter","500 1em Inter","600 1em Inter","700 1em Inter",'400 1em "DM Mono"','500 1em "DM Mono"'],X=async()=>{await Promise.all(J.map(e=>document.fonts.load(e))),await document.fonts.ready};exports.A11Y_DEFER_COLOR_CONTRAST=U;exports.AVATAR_URL_MOCK=q;exports.CatalogDecorator=L;exports.ComponentDecorator=O;exports.ComponentStorybookLayout=E;exports.GroupedCatalog=K;exports.overrideMediaQueryMatches=Y;exports.waitForStorybookFontsLoaded=X;
|
package/dist/testing.mjs
CHANGED
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { a as
|
|
3
|
-
import { t as
|
|
4
|
-
import { isFunction as _, isNumber as U, isString as
|
|
5
|
-
import { clsx as
|
|
1
|
+
import { t as B } from "./isDefined-fMi6eQ4r.js";
|
|
2
|
+
import { a as u } from "./theme-B2EaXhye.js";
|
|
3
|
+
import { t as E } from "./Heading-Nj5BlPqB.js";
|
|
4
|
+
import { isFunction as _, isNumber as U, isString as f } from "@sniptt/guards";
|
|
5
|
+
import { clsx as y } from "clsx";
|
|
6
6
|
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
7
|
-
var
|
|
7
|
+
var P = {
|
|
8
8
|
test: "error",
|
|
9
9
|
config: { rules: [{
|
|
10
10
|
id: "color-contrast",
|
|
11
11
|
enabled: !1
|
|
12
12
|
}] }
|
|
13
|
-
}, T = "_layout_17ld0_1",
|
|
14
|
-
className:
|
|
13
|
+
}, T = "_layout_17ld0_1", V = { layout: T }, F = ({ width: e, backgroundColor: A, height: r, children: t }) => /* @__PURE__ */ a("div", {
|
|
14
|
+
className: V.layout,
|
|
15
15
|
style: {
|
|
16
|
-
background:
|
|
17
|
-
height:
|
|
16
|
+
background: A,
|
|
17
|
+
height: B(r) ? `${r}px` : "fit-content",
|
|
18
18
|
minWidth: e ? "unset" : "300px",
|
|
19
19
|
width: e ? `${e}px` : "fit-content"
|
|
20
20
|
},
|
|
21
21
|
children: t
|
|
22
|
-
}), M = "_columnTitle_5dert_1",
|
|
22
|
+
}), M = "_columnTitle_5dert_1", S = "_rowsTitle_5dert_7", N = "_rowTitle_5dert_15", k = "_elementTitle_5dert_23", I = "_container_5dert_32", b = "_columnContainer_5dert_37", D = "_rowsContainer_5dert_43", L = "_rowContainer_5dert_49", K = "_elementContainer_5dert_56", W = "_cellContainer_5dert_60", o = {
|
|
23
23
|
columnTitle: M,
|
|
24
|
-
rowsTitle:
|
|
25
|
-
rowTitle:
|
|
26
|
-
elementTitle:
|
|
27
|
-
container:
|
|
28
|
-
columnContainer:
|
|
24
|
+
rowsTitle: S,
|
|
25
|
+
rowTitle: N,
|
|
26
|
+
elementTitle: k,
|
|
27
|
+
container: I,
|
|
28
|
+
columnContainer: b,
|
|
29
29
|
rowsContainer: D,
|
|
30
30
|
rowContainer: L,
|
|
31
|
-
elementContainer:
|
|
32
|
-
cellContainer:
|
|
31
|
+
elementContainer: K,
|
|
32
|
+
cellContainer: W
|
|
33
33
|
}, g = {
|
|
34
34
|
name: "",
|
|
35
35
|
values: [void 0],
|
|
36
36
|
props: () => ({})
|
|
37
|
-
}, p = (e) =>
|
|
38
|
-
const { catalog: { dimensions:
|
|
37
|
+
}, p = (e) => f(e) || U(e), $ = (e, A) => {
|
|
38
|
+
const { catalog: { dimensions: r = [], options: t = {} } = {
|
|
39
39
|
dimensions: [],
|
|
40
40
|
options: {}
|
|
41
|
-
} } =
|
|
42
|
-
if (!
|
|
43
|
-
const [n = g,
|
|
41
|
+
} } = A.parameters || {};
|
|
42
|
+
if (!r || !Array.isArray(r)) return /* @__PURE__ */ a(e, {});
|
|
43
|
+
const [n = g, i = g, C = g, h = g] = r;
|
|
44
44
|
return /* @__PURE__ */ a("div", {
|
|
45
|
-
className:
|
|
46
|
-
children: h.values.map((
|
|
47
|
-
className:
|
|
45
|
+
className: o.container,
|
|
46
|
+
children: h.values.map((d, v) => /* @__PURE__ */ l("div", {
|
|
47
|
+
className: o.columnContainer,
|
|
48
48
|
children: [/* @__PURE__ */ a("div", {
|
|
49
|
-
className:
|
|
50
|
-
children: h.labels?.(
|
|
51
|
-
}), C.values.map((
|
|
52
|
-
className:
|
|
49
|
+
className: o.columnTitle,
|
|
50
|
+
children: h.labels?.(d) ?? (p(d) ? d : "")
|
|
51
|
+
}), C.values.map((c, Q) => /* @__PURE__ */ l("div", {
|
|
52
|
+
className: o.rowsContainer,
|
|
53
53
|
children: [/* @__PURE__ */ a("div", {
|
|
54
|
-
className:
|
|
55
|
-
children: C.labels?.(
|
|
56
|
-
}),
|
|
57
|
-
className:
|
|
54
|
+
className: o.rowsTitle,
|
|
55
|
+
children: C.labels?.(c) ?? (p(c) ? c : "")
|
|
56
|
+
}), i.values.map((m, R) => /* @__PURE__ */ l("div", {
|
|
57
|
+
className: o.rowContainer,
|
|
58
58
|
children: [/* @__PURE__ */ a("div", {
|
|
59
|
-
className:
|
|
60
|
-
children:
|
|
61
|
-
}), n.values.map((s,
|
|
62
|
-
className:
|
|
63
|
-
id:
|
|
59
|
+
className: o.rowTitle,
|
|
60
|
+
children: i.labels?.(m) ?? (p(m) ? m : "")
|
|
61
|
+
}), n.values.map((s, w) => /* @__PURE__ */ l("div", {
|
|
62
|
+
className: o.cellContainer,
|
|
63
|
+
id: r.length > 1 ? `catalog-cell-${v}-${Q}-${R}-${w}` : s,
|
|
64
64
|
children: [/* @__PURE__ */ a("span", {
|
|
65
|
-
className:
|
|
65
|
+
className: o.elementTitle,
|
|
66
66
|
children: n.labels?.(s) ?? (p(s) ? s : "")
|
|
67
67
|
}), /* @__PURE__ */ a("div", {
|
|
68
|
-
className:
|
|
68
|
+
className: y(o.elementContainer, t?.elementContainer?.className),
|
|
69
69
|
style: {
|
|
70
70
|
minWidth: t?.elementContainer?.width ? `${t.elementContainer.width}px` : "auto",
|
|
71
71
|
...t?.elementContainer?.style
|
|
72
72
|
},
|
|
73
73
|
children: /* @__PURE__ */ a(e, { args: {
|
|
74
|
-
...
|
|
74
|
+
...A.args,
|
|
75
75
|
...n.props(s),
|
|
76
|
-
...
|
|
77
|
-
...C.props(
|
|
78
|
-
...h.props(
|
|
76
|
+
...i.props(m),
|
|
77
|
+
...C.props(c),
|
|
78
|
+
...h.props(d)
|
|
79
79
|
} })
|
|
80
80
|
})]
|
|
81
|
-
}, `d1-${
|
|
81
|
+
}, `d1-${w}`))]
|
|
82
82
|
}, `d2-${R}`))]
|
|
83
|
-
}, `d3-${
|
|
84
|
-
}, `d4-${
|
|
83
|
+
}, `d3-${Q}`))]
|
|
84
|
+
}, `d4-${v}`))
|
|
85
85
|
});
|
|
86
|
-
},
|
|
86
|
+
}, j = (e, A) => {
|
|
87
87
|
if (e)
|
|
88
|
-
switch (
|
|
88
|
+
switch (A) {
|
|
89
89
|
case "default":
|
|
90
|
-
return
|
|
90
|
+
return u.grayScale.gray11;
|
|
91
91
|
case "danger":
|
|
92
|
-
return
|
|
92
|
+
return u.color.red;
|
|
93
93
|
case "blue":
|
|
94
|
-
return
|
|
94
|
+
return u.color.blue;
|
|
95
95
|
default:
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
|
-
},
|
|
99
|
-
const { container:
|
|
98
|
+
}, x = (e, A) => {
|
|
99
|
+
const { container: r } = A.parameters, t = A.args.inverted, n = A.args.accent, i = j(t, n);
|
|
100
100
|
return /* @__PURE__ */ a(F, {
|
|
101
|
-
width:
|
|
102
|
-
height:
|
|
103
|
-
backgroundColor:
|
|
101
|
+
width: r?.width,
|
|
102
|
+
height: r?.height,
|
|
103
|
+
backgroundColor: i,
|
|
104
104
|
children: /* @__PURE__ */ a(e, {})
|
|
105
105
|
});
|
|
106
|
-
},
|
|
106
|
+
}, z = ({ groups: e, renderExample: A }) => /* @__PURE__ */ a("div", {
|
|
107
107
|
style: {
|
|
108
108
|
display: "grid",
|
|
109
109
|
gap: "var(--t-spacing-6)",
|
|
110
110
|
width: "100%"
|
|
111
111
|
},
|
|
112
|
-
children: e.map(({ label:
|
|
113
|
-
"aria-label":
|
|
114
|
-
children: [/* @__PURE__ */ a(
|
|
112
|
+
children: e.map(({ label: r, examples: t }) => /* @__PURE__ */ l("section", {
|
|
113
|
+
"aria-label": r,
|
|
114
|
+
children: [/* @__PURE__ */ a(E, {
|
|
115
115
|
level: 3,
|
|
116
|
-
children:
|
|
116
|
+
children: r
|
|
117
117
|
}), /* @__PURE__ */ a("div", {
|
|
118
118
|
style: {
|
|
119
119
|
display: "flex",
|
|
@@ -127,11 +127,11 @@ var q = {
|
|
|
127
127
|
gap: "var(--t-spacing-2)",
|
|
128
128
|
justifyItems: "start"
|
|
129
129
|
},
|
|
130
|
-
children:
|
|
130
|
+
children: A(n)
|
|
131
131
|
}, n.label))
|
|
132
132
|
})]
|
|
133
|
-
},
|
|
134
|
-
}),
|
|
133
|
+
}, r))
|
|
134
|
+
}), ee = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAYABgAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABgAAAAAQAAAGAAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAABSgAwAEAAAAAQAAABQAAAAA/8AAEQgAFAAUAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/bAEMACwgICggHCwoJCg0MCw0RHBIRDw8RIhkaFBwpJCsqKCQnJy0yQDctMD0wJyc4TDk9Q0VISUgrNk9VTkZUQEdIRf/bAEMBDA0NEQ8RIRISIUUuJy5FRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRf/dAAQAAv/aAAwDAQACEQMRAD8Ava1q728otYY98joSCTgZrnbXWdTtrhrfVZXWLafmcAEkdgR/hVltQku9Q8+OIEBcGOT+ID0PY1ka1KH2u8ToqnPLbmIqG7u6LtbQ7RXBRec4Uck9eKXcPWsKDWVnhWSL5kYcFelSf2m3901POh8jP//QoyIAnTuKpXsY82NsksUyWPU5q/L9z8RVK++/F/uCsVsaEURwgA4HtT9x9TUcf3KfUGh//9k=", Y = (e) => Object.assign(new EventTarget(), {
|
|
135
135
|
media: e,
|
|
136
136
|
matches: !1,
|
|
137
137
|
onchange: null,
|
|
@@ -139,21 +139,31 @@ var q = {
|
|
|
139
139
|
},
|
|
140
140
|
removeListener: () => {
|
|
141
141
|
}
|
|
142
|
-
}),
|
|
143
|
-
const
|
|
144
|
-
return window.matchMedia = (
|
|
145
|
-
const t = _(
|
|
146
|
-
return
|
|
142
|
+
}), re = (e) => {
|
|
143
|
+
const A = window.matchMedia;
|
|
144
|
+
return window.matchMedia = (r) => {
|
|
145
|
+
const t = _(A) ? A.call(window, r) : Y(r), n = e[r];
|
|
146
|
+
return B(n) && Object.defineProperty(t, "matches", { value: n }), t;
|
|
147
147
|
}, () => {
|
|
148
|
-
window.matchMedia =
|
|
148
|
+
window.matchMedia = A;
|
|
149
149
|
};
|
|
150
|
+
}, O = [
|
|
151
|
+
"400 1em Inter",
|
|
152
|
+
"500 1em Inter",
|
|
153
|
+
"600 1em Inter",
|
|
154
|
+
"700 1em Inter",
|
|
155
|
+
'400 1em "DM Mono"',
|
|
156
|
+
'500 1em "DM Mono"'
|
|
157
|
+
], Ae = async () => {
|
|
158
|
+
await Promise.all(O.map((e) => document.fonts.load(e))), await document.fonts.ready;
|
|
150
159
|
};
|
|
151
160
|
export {
|
|
152
|
-
|
|
153
|
-
|
|
161
|
+
P as A11Y_DEFER_COLOR_CONTRAST,
|
|
162
|
+
ee as AVATAR_URL_MOCK,
|
|
154
163
|
$ as CatalogDecorator,
|
|
155
|
-
|
|
164
|
+
x as ComponentDecorator,
|
|
156
165
|
F as ComponentStorybookLayout,
|
|
157
|
-
|
|
158
|
-
|
|
166
|
+
z as GroupedCatalog,
|
|
167
|
+
re as overrideMediaQueryMatches,
|
|
168
|
+
Ae as waitForStorybookFontsLoaded
|
|
159
169
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as r } from "./Shortcut-Bp9iDdQg.js";
|
|
2
|
-
import { n as e } from "./OverflowingTextWithTooltip-
|
|
2
|
+
import { n as e } from "./OverflowingTextWithTooltip-BtB9cGdJ.js";
|
|
3
3
|
import { jsx as i } from "react/jsx-runtime";
|
|
4
4
|
var v = ({ mode: o, children: t }) => /* @__PURE__ */ i(e.Provider, {
|
|
5
5
|
value: o,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=require("./Shortcut-N8TELGPI.cjs"),o=require("./OverflowingTextWithTooltip-
|
|
1
|
+
const t=require("./Shortcut-N8TELGPI.cjs"),o=require("./OverflowingTextWithTooltip-BQmpPObX.cjs");let i=require("react/jsx-runtime");var n=({mode:e,children:r})=>(0,i.jsx)(o.OverflowingTextTooltipModeContext.Provider,{value:e,children:r}),u=e=>t.getShortcutPresentation(e).text;Object.defineProperty(exports,"OverflowingTextTooltipModeProvider",{enumerable:!0,get:function(){return n}});Object.defineProperty(exports,"formatShortcut",{enumerable:!0,get:function(){return u}});
|
package/dist/utilities.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("./isDefined-DS2Q42p5.cjs"),e=require("./utilities-xZh8D2gd.cjs"),r=require("./useIsMobile-Byp9AIq-.cjs"),o=require("./normalizeSearchText-Do0MELpQ.cjs"),t=require("./preventDismissingClickActivation-BEBrL9aB.cjs");exports.MOBILE_MEDIA_QUERY=r.MOBILE_MEDIA_QUERY;exports.TOUCH_DEVICE_MEDIA_QUERY=e.TOUCH_DEVICE_MEDIA_QUERY;exports.getMainColorNameFromPaletteColorName=e.getMainColorNameFromPaletteColorName;exports.getOsControlSymbol=e.getOsControlSymbol;exports.getSafeUrl=e.getSafeUrl;exports.getUserDevice=r.getUserDevice;exports.isDefined=i.isDefined;exports.normalizeSearchText=o.normalizeSearchText;exports.parseThemeColor=e.parseThemeColor;exports.preventDismissingClickActivation=t.preventDismissingClickActivation;exports.stringToThemeColor=e.stringToThemeColor;exports.stringToThemeColorP3String=e.stringToThemeColorP3String;exports.themeColorSchema=e.themeColorSchema;exports.useIsMobile=r.useIsMobile;exports.useIsTouchDevice=e.useIsTouchDevice;exports.useMediaQuery=r.useMediaQuery;
|
package/dist/utilities.mjs
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { t as o } from "./isDefined-fMi6eQ4r.js";
|
|
2
|
-
import { a as
|
|
3
|
-
import { i as
|
|
4
|
-
import {
|
|
2
|
+
import { a as s, c as a, i as t, l as i, n as m, o as l, r as n, s as C, t as c } from "./utilities-BKCMZyqZ.js";
|
|
3
|
+
import { i as p, n as T, r as f, t as h } from "./useIsMobile-D1ImfQnE.js";
|
|
4
|
+
import { t as E } from "./normalizeSearchText-DLmPiBUZ.js";
|
|
5
|
+
import { t as M } from "./preventDismissingClickActivation-BQFMKRey.js";
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
+
f as MOBILE_MEDIA_QUERY,
|
|
7
8
|
n as TOUCH_DEVICE_MEDIA_QUERY,
|
|
8
9
|
i as getMainColorNameFromPaletteColorName,
|
|
9
10
|
t as getOsControlSymbol,
|
|
10
11
|
c as getSafeUrl,
|
|
11
|
-
|
|
12
|
+
p as getUserDevice,
|
|
12
13
|
o as isDefined,
|
|
13
|
-
|
|
14
|
+
E as normalizeSearchText,
|
|
14
15
|
C as parseThemeColor,
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
M as preventDismissingClickActivation,
|
|
17
|
+
s as stringToThemeColor,
|
|
17
18
|
l as stringToThemeColorP3String,
|
|
18
19
|
a as themeColorSchema,
|
|
19
|
-
|
|
20
|
+
h as useIsMobile,
|
|
20
21
|
m as useIsTouchDevice,
|
|
21
|
-
|
|
22
|
+
T as useMediaQuery
|
|
22
23
|
};
|
package/package.json
CHANGED
package/dist/Avatar-C6WxBgjS.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const I=require("./theme-1XkFz8Qu.cjs"),u=require("./isDefined-DS2Q42p5.cjs"),P=require("./doNotTranslate-CHE7WmRS.cjs"),q=require("./mergeClassNames-D4lshrT6.cjs"),h=require("./utilities-xZh8D2gd.cjs");let k=require("@sniptt/guards"),n=require("react/jsx-runtime"),A=require("@base-ui/react/avatar");var S="_root_14f7e_1",y="_avatarPulsing_14f7e_1",L="_image_14f7e_89",w="_fallback_14f7e_101",N={root:S,avatarPulsing:y,image:L,fallback:w},C=({className:a,...e})=>(0,n.jsx)(A.Avatar.Fallback,{...e,className:q.mergeClassNames(N.fallback,a)}),T=({className:a,...e})=>(0,n.jsx)(A.Avatar.Image,{...e,className:q.mergeClassNames(N.image,a)}),p=a=>a?.trim().charAt(0).toUpperCase(),x=({name:a,colorSeed:e=a,size:i="md",shape:g="square",variant:v="soft",color:m,backgroundColor:b,borderColor:_,pulsing:s=!1,ring:l=!1,className:o,style:c,...r})=>{const t=I.useTheme(),d=p(a),D=d?m??h.stringToThemeColorP3String({string:e??"",variant:12,theme:t}):m??t.font.color.tertiary,F=d?b??h.stringToThemeColorP3String({string:e??"",variant:v==="outline"?5:4,theme:t}):b??t.background.transparent.light,j=_??(d?h.stringToThemeColorP3String({string:e??"",variant:6,theme:t}):void 0);return(0,n.jsx)(A.Avatar.Root,{...r,"data-size":i,"data-shape":g,"data-pulsing":s||void 0,"data-ring":l||void 0,className:q.mergeClassNames(N.root,o),style:f=>({"--tw-avatar-color":D,"--tw-avatar-background":f.imageLoadingStatus==="loaded"?"none":F,"--tw-avatar-border":v==="outline"&&f.imageLoadingStatus!=="loaded"&&j?P.doNotTranslate(`1px solid ${j}`):"none",...(0,k.isFunction)(c)?c(f):c})})},B=({src:a,name:e,icon:i,imageProps:g,fallbackProps:v,backgroundColor:m,...b})=>{const _=p(e),s=u.isDefined(i)&&!(0,k.isBoolean)(i)&&i!=="",l=g?.alt??"",o=!s&&(0,k.isNonEmptyString)(l),{children:c=s?i:_||"-",...r}=v??{},t=u.isDefined(r.role)||u.isDefined(r["aria-label"])||u.isDefined(r["aria-labelledby"]),d=!o&&!t&&!u.isDefined(r.render);return(0,n.jsxs)(x,{...b,name:e,backgroundColor:s?"inherit":m,children:[!s&&(0,n.jsx)(T,{src:a??void 0,...g,alt:l}),(0,n.jsx)(C,{role:o?"img":void 0,"aria-label":o?l:void 0,"aria-hidden":d||void 0,...r,children:c})]})},R=Object.assign(B,{Root:x,Image:T,Fallback:C});Object.defineProperty(exports,"Avatar",{enumerable:!0,get:function(){return R}});
|