@sanity/ui 5.0.0-alpha.2 → 5.0.0-alpha.21
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/README.md +1 -1
- package/dist/LazyRefractor-CQ22IeXB.js +19 -0
- package/dist/LazyRefractor-CQ22IeXB.js.map +1 -0
- package/dist/cli/install.js +2 -1
- package/dist/index.d.ts +826 -855
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2439 -1796
- package/dist/index.js.map +1 -1
- package/dist/polyfills.d.ts +1 -0
- package/dist/polyfills.js +5 -0
- package/dist/polyfills.js.map +1 -0
- package/dist/styles.css +1 -1
- package/package.json +16 -9
- package/src/cli/install.ts +2 -1
- package/src/components/avatar/Avatar.tsx +50 -0
- package/src/components/avatar/avatar.css +51 -0
- package/src/components/avatar/avatar.props.ts +57 -0
- package/src/components/avatar-counter/AvatarCounter.tsx +38 -0
- package/src/components/avatar-counter/avatar-counter.css +8 -0
- package/src/components/avatar-counter/avatarCounter.props.ts +44 -0
- package/src/components/avatar-stack/AvatarStack.tsx +60 -0
- package/src/components/avatar-stack/avatar-stack.css +16 -0
- package/src/components/avatar-stack/avatarStack.props.ts +20 -0
- package/src/components/badge/Badge.tsx +53 -0
- package/src/components/badge/badge.css +6 -0
- package/src/components/badge/badge.props.ts +31 -0
- package/src/components/box/box.css +5 -0
- package/src/components/box/box.props.ts +7 -2
- package/src/components/button/Button.tsx +7 -1
- package/src/components/button/button.css +51 -23
- package/src/components/button/button.props.ts +27 -9
- package/src/components/card/Card.tsx +1 -1
- package/src/components/card/card.props.ts +10 -5
- package/src/components/checkbox/Checkbox.tsx +15 -29
- package/src/components/checkbox/checkbox.css +19 -20
- package/src/components/checkbox/checkbox.props.ts +11 -12
- package/src/components/code/Code.tsx +18 -19
- package/src/components/code/code.props.ts +23 -14
- package/src/components/container/Container.tsx +5 -1
- package/src/components/container/container.css +4 -0
- package/src/components/container/container.props.ts +6 -2
- package/src/components/dialog/Dialog.tsx +139 -0
- package/src/components/dialog/dialog.css +49 -0
- package/src/components/dialog/dialog.props.ts +45 -0
- package/src/components/eyebrow/eyebrow.props.ts +6 -2
- package/src/components/flex/flex.css +5 -0
- package/src/components/flex/flex.props.ts +6 -2
- package/src/components/grid/grid.css +5 -0
- package/src/components/grid/grid.props.ts +14 -3
- package/src/components/h-stack/HStack.tsx +8 -14
- package/src/components/h-stack/hStack.props.ts +5 -13
- package/src/components/heading/Heading.tsx +8 -3
- package/src/components/heading/heading.css +0 -5
- package/src/components/heading/heading.props.ts +16 -5
- package/src/components/hotkeys/Hotkeys.tsx +29 -0
- package/src/components/hotkeys/hotkeys.css +3 -0
- package/src/components/hotkeys/hotkeys.props.ts +15 -0
- package/src/components/icon/Icon.tsx +22 -11
- package/src/components/icon/icon.props.ts +7 -3
- package/src/components/icon-button/iconButton.props.ts +7 -2
- package/src/components/index.css +12 -1
- package/src/components/indicator/indicator.css +1 -1
- package/src/components/indicator/indicator.props.ts +6 -2
- package/src/components/indicator-stack/indicatorStack.props.ts +3 -1
- package/src/components/inline/inline.props.ts +6 -2
- package/src/components/kbd/KBD.tsx +33 -0
- package/src/components/kbd/kbd.css +6 -0
- package/src/components/kbd/kbd.props.ts +20 -0
- package/src/components/link/link.props.ts +4 -4
- package/src/components/list/list.props.ts +27 -9
- package/src/components/popover/Popover.tsx +85 -0
- package/src/components/popover/popover.css +21 -0
- package/src/components/popover/popover.props.ts +38 -0
- package/src/components/press-area/pressArea.props.ts +3 -1
- package/src/components/radio/Radio.tsx +10 -28
- package/src/components/radio/radio.css +17 -32
- package/src/components/radio/radio.props.ts +1 -19
- package/src/components/select/Select.tsx +41 -0
- package/src/components/select/select.css +67 -0
- package/src/components/select/select.props.ts +18 -0
- package/src/components/skip-to-content/skipToContent.props.ts +9 -3
- package/src/components/spinner/Spinner.tsx +2 -1
- package/src/components/spinner/spinner.props.ts +3 -0
- package/src/components/switch/Switch.tsx +9 -21
- package/src/components/switch/switch.css +22 -23
- package/src/components/switch/switch.props.ts +7 -11
- package/src/components/tabs/Tabs.tsx +186 -0
- package/src/components/tabs/tabs.css +34 -0
- package/src/components/tabs/tabs.props.ts +66 -0
- package/src/components/text/text.props.ts +6 -2
- package/src/components/text-area/TextArea.tsx +32 -0
- package/src/components/text-area/text-area.css +56 -0
- package/src/components/text-area/textArea.props.ts +35 -0
- package/src/components/text-input/TextInput.tsx +32 -0
- package/src/components/text-input/text-input.css +55 -0
- package/src/components/text-input/textInput.props.ts +42 -0
- package/src/components/tooltip/Tooltip.tsx +59 -55
- package/src/components/tooltip/tooltip.css +21 -40
- package/src/components/tooltip/tooltip.props.ts +24 -8
- package/src/components/tooltip-group/TooltipGroup.tsx +2 -5
- package/src/components/tooltip-group/tooltipGroup.props.ts +3 -1
- package/src/components/v-stack/VStack.tsx +8 -14
- package/src/components/v-stack/vStack.props.ts +5 -13
- package/src/components/visually-hidden/visuallyHidden.props.ts +6 -2
- package/src/css/classes/dynamic/height.css +2 -0
- package/src/css/classes/generic/display.css +8 -8
- package/src/css/classes/generic/placement.css +105 -86
- package/src/css/classes/local/animation.css +4 -0
- package/src/css/classes/local/field-sizing.css +3 -0
- package/src/css/classes/local/index.css +3 -1
- package/src/css/classes/local/text-trim.css +11 -4
- package/src/css/classes/local/top-anchor.css +4 -0
- package/src/css/classes/system/shadow.css +6 -6
- package/src/css/classes/system/typography.css +0 -4
- package/src/css/global/reset.css +16 -1
- package/src/css/tokens/semantic.css +7 -6
- package/src/css/tokens/surface.css +80 -12
- package/src/hooks/useIsClient.ts +10 -0
- package/src/index.ts +17 -2
- package/src/polyfills.ts +17 -0
- package/src/props/formElement.ts +34 -0
- package/src/props/layout.ts +3 -3
- package/src/props/tone.ts +13 -2
- package/src/types/Avatar.ts +14 -0
- package/src/types/Code.ts +0 -3
- package/src/types/Eyebrow.ts +1 -1
- package/src/types/FormElement.ts +2 -0
- package/src/types/Heading.ts +1 -1
- package/src/types/TextAlign.ts +1 -1
- package/src/types/Tone.ts +2 -0
- package/src/utils/getProps.ts +1 -1
- package/src/utils/mergeTriggerProps.ts +66 -0
- package/src/utils/renderPortal.tsx +14 -0
- package/src/version.ts +2 -2
- package/dist/_chunks-es/LazyRefractor.js +0 -20
- package/dist/_chunks-es/LazyRefractor.js.map +0 -1
- package/src/components/label/Label.tsx +0 -34
- package/src/components/label/label.css +0 -3
- package/src/components/label/label.props.ts +0 -19
- package/src/css/classes/local/tone.css +0 -75
package/dist/index.js
CHANGED
|
@@ -1,1872 +1,2515 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
2
|
import { c } from "react/compiler-runtime";
|
|
4
3
|
import clsx from "clsx";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
4
|
+
import { Activity, Children, Suspense, cloneElement, createContext, createElement, isValidElement, lazy, useContext, useEffect, useId, useRef, useState, useSyncExternalStore } from "react";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { SpinnerIcon } from "@sanity/icons/Spinner";
|
|
7
|
+
import { CheckmarkIcon } from "@sanity/icons/Checkmark";
|
|
8
|
+
import { RemoveIcon } from "@sanity/icons/Remove";
|
|
9
|
+
import { CloseIcon } from "@sanity/icons/Close";
|
|
10
|
+
import { createPortal } from "react-dom";
|
|
11
|
+
import SelectIcon from "@sanity/icons/Select";
|
|
8
12
|
function getProps(componentProps, propDefs) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return {
|
|
41
|
-
...restProps,
|
|
42
|
-
className,
|
|
43
|
-
style
|
|
44
|
-
};
|
|
13
|
+
let { allComponentProps, allPropDefs } = flattenCompositeProps(componentProps, propDefs), restProps = {}, className = componentProps?.className || "", style = componentProps?.style || {};
|
|
14
|
+
for (let key in allComponentProps) {
|
|
15
|
+
let propDef = allPropDefs?.[key], propValue = allComponentProps[key];
|
|
16
|
+
if (!(propDef && "className" in propDef && propDef.className || propDef?.type === "conditional")) {
|
|
17
|
+
restProps[key] = propValue;
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
if (Array.isArray(propValue)) for (let i = 0, len = Math.min(propValue.length, 6); i < len; i++) {
|
|
21
|
+
let resolvedPropDef = getResolvedPropDef(propValue[i], propDef);
|
|
22
|
+
resolvedPropDef && (className = clsx(className, getClassName(propValue[i], resolvedPropDef, i)), style = {
|
|
23
|
+
...style,
|
|
24
|
+
...getStyle(propValue[i], resolvedPropDef, i)
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
let resolvedPropDef = getResolvedPropDef(propValue, propDef);
|
|
29
|
+
if (!resolvedPropDef) {
|
|
30
|
+
restProps[key] = propValue;
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
className = clsx(className, getClassName(propValue, resolvedPropDef)), style = {
|
|
34
|
+
...style,
|
|
35
|
+
...getStyle(propValue, resolvedPropDef)
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
...restProps,
|
|
41
|
+
className,
|
|
42
|
+
style
|
|
43
|
+
};
|
|
45
44
|
}
|
|
46
45
|
function getResolvedPropDef(propValue, propDef) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return resolvedPropDef && "className" in resolvedPropDef && resolvedPropDef.className ? resolvedPropDef : null;
|
|
46
|
+
if (propDef?.type !== "conditional") return propDef;
|
|
47
|
+
let resolvedPropDef = propDef.resolve(propValue);
|
|
48
|
+
return resolvedPropDef && "className" in resolvedPropDef && resolvedPropDef.className ? resolvedPropDef : null;
|
|
51
49
|
}
|
|
52
50
|
function getClassName(propValue, propDef, bp) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
if (!propValue && propDef.inverseClassName)
|
|
61
|
-
return `${PREFIX}-${propDef.inverseClassName}${bp ? `-bp-${bp}` : ""}`;
|
|
62
|
-
}
|
|
63
|
-
return "";
|
|
51
|
+
if (propDef.type === "union" && propDef.values?.includes(propValue)) return `sui-${propDef.className}${typeof propValue == "string" ? `-${propValue}` : propValue}${bp ? `-bp-${bp}` : ""}`;
|
|
52
|
+
if (propDef.type === "string" || propDef.type === "number") return `sui-${propDef.className}${bp ? `-bp-${bp}` : ""}`;
|
|
53
|
+
if (propDef.type === "boolean") {
|
|
54
|
+
if (propValue) return `sui-${propDef.className}${bp ? `-bp-${bp}` : ""}`;
|
|
55
|
+
if (!propValue && propDef.inverseClassName) return `sui-${propDef.inverseClassName}${bp ? `-bp-${bp}` : ""}`;
|
|
56
|
+
}
|
|
57
|
+
return "";
|
|
64
58
|
}
|
|
65
59
|
function getStyle(propValue, propDef, bp) {
|
|
66
|
-
|
|
67
|
-
[`${propDef.variable}${bp ? `-bp-${bp}` : ""}`]: propValue
|
|
68
|
-
} : {};
|
|
60
|
+
return (propDef.type === "string" || propDef.type === "number") && propDef.variable ? { [`${propDef.variable}${bp ? `-bp-${bp}` : ""}`]: propValue } : {};
|
|
69
61
|
}
|
|
70
62
|
function flattenCompositeProps(componentProps, propDefs) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
else
|
|
82
|
-
props.allComponentProps[key] = componentProps[key], props.allPropDefs[key] = propDefs?.[key];
|
|
83
|
-
return props;
|
|
63
|
+
let props = {
|
|
64
|
+
allComponentProps: {},
|
|
65
|
+
allPropDefs: {}
|
|
66
|
+
};
|
|
67
|
+
for (let key in componentProps) if (propDefs?.[key] && propDefs?.[key].type === "composite") for (let compositeKey in propDefs?.[key].composition) {
|
|
68
|
+
let compositeValue = getCompositeValue(componentProps[key], propDefs[key], compositeKey);
|
|
69
|
+
props.allComponentProps[compositeKey] = compositeValue, props.allPropDefs[compositeKey] = propDefs[key].composition[compositeKey]?.propDef;
|
|
70
|
+
}
|
|
71
|
+
else props.allComponentProps[key] = componentProps[key], props.allPropDefs[key] = propDefs?.[key];
|
|
72
|
+
return props;
|
|
84
73
|
}
|
|
85
74
|
function getCompositeValue(propValue, propDef, key) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
} else
|
|
95
|
-
compositeValue = mapping?.[propValue];
|
|
96
|
-
return compositeValue;
|
|
97
|
-
}
|
|
98
|
-
const HASH = "eaf84d";
|
|
75
|
+
if (!("composition" in propDef)) return;
|
|
76
|
+
let mapping = propDef.composition[key]?.mapping, compositeValue;
|
|
77
|
+
if (Array.isArray(propValue)) {
|
|
78
|
+
compositeValue = [];
|
|
79
|
+
for (let i = 0, len = propValue.length; i < len; i++) compositeValue[i] = mapping?.[propValue[i]];
|
|
80
|
+
} else compositeValue = mapping?.[propValue];
|
|
81
|
+
return compositeValue;
|
|
82
|
+
}
|
|
99
83
|
function suffixClassName(className) {
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
84
|
+
return `${className}-d891eb`;
|
|
85
|
+
}
|
|
86
|
+
const FONT_WEIGHT = [
|
|
87
|
+
"regular",
|
|
88
|
+
"medium",
|
|
89
|
+
"semibold",
|
|
90
|
+
"bold"
|
|
91
|
+
], TEXT_ALIGN = [
|
|
92
|
+
"left",
|
|
93
|
+
"center",
|
|
94
|
+
"right"
|
|
95
|
+
], SPACE = [
|
|
96
|
+
0,
|
|
97
|
+
1,
|
|
98
|
+
2,
|
|
99
|
+
3,
|
|
100
|
+
4,
|
|
101
|
+
5,
|
|
102
|
+
6,
|
|
103
|
+
7,
|
|
104
|
+
8,
|
|
105
|
+
9
|
|
106
|
+
], SPACE_AUTO = [...SPACE, "auto"], SPACE_INHERIT = [...SPACE, "inherit"], SPACE_AUTO_NEGATIVE = [
|
|
107
|
+
-9,
|
|
108
|
+
-8,
|
|
109
|
+
-7,
|
|
110
|
+
-6,
|
|
111
|
+
-5,
|
|
112
|
+
-4,
|
|
113
|
+
-3,
|
|
114
|
+
-2,
|
|
115
|
+
-1,
|
|
116
|
+
...SPACE,
|
|
117
|
+
"auto"
|
|
118
|
+
], marginProps = {
|
|
119
|
+
margin: {
|
|
120
|
+
type: "union",
|
|
121
|
+
className: "m",
|
|
122
|
+
values: SPACE_AUTO_NEGATIVE
|
|
123
|
+
},
|
|
124
|
+
marginX: {
|
|
125
|
+
type: "union",
|
|
126
|
+
className: "mx",
|
|
127
|
+
values: SPACE_AUTO_NEGATIVE
|
|
128
|
+
},
|
|
129
|
+
marginY: {
|
|
130
|
+
type: "union",
|
|
131
|
+
className: "my",
|
|
132
|
+
values: SPACE_AUTO_NEGATIVE
|
|
133
|
+
},
|
|
134
|
+
marginTop: {
|
|
135
|
+
type: "union",
|
|
136
|
+
className: "mt",
|
|
137
|
+
values: SPACE_AUTO_NEGATIVE
|
|
138
|
+
},
|
|
139
|
+
marginRight: {
|
|
140
|
+
type: "union",
|
|
141
|
+
className: "mr",
|
|
142
|
+
values: SPACE_AUTO_NEGATIVE
|
|
143
|
+
},
|
|
144
|
+
marginBottom: {
|
|
145
|
+
type: "union",
|
|
146
|
+
className: "mb",
|
|
147
|
+
values: SPACE_AUTO_NEGATIVE
|
|
148
|
+
},
|
|
149
|
+
marginLeft: {
|
|
150
|
+
type: "union",
|
|
151
|
+
className: "ml",
|
|
152
|
+
values: SPACE_AUTO_NEGATIVE
|
|
153
|
+
}
|
|
154
|
+
}, TONE = [
|
|
155
|
+
"neutral",
|
|
156
|
+
"positive",
|
|
157
|
+
"suggest",
|
|
158
|
+
"caution",
|
|
159
|
+
"critical"
|
|
160
|
+
], TONE_WITH_DEFAULT = ["default", ...TONE], toneProps = { tone: {
|
|
161
|
+
type: "union",
|
|
162
|
+
className: "tone",
|
|
163
|
+
values: TONE
|
|
164
|
+
} }, toneWithDefaultProps = { tone: {
|
|
165
|
+
type: "union",
|
|
166
|
+
className: "tone",
|
|
167
|
+
values: TONE_WITH_DEFAULT
|
|
168
|
+
} }, typographyProps = {
|
|
169
|
+
align: {
|
|
170
|
+
type: "union",
|
|
171
|
+
className: "text",
|
|
172
|
+
values: TEXT_ALIGN
|
|
173
|
+
},
|
|
174
|
+
muted: {
|
|
175
|
+
type: "boolean",
|
|
176
|
+
className: "text-muted",
|
|
177
|
+
inverseClassName: "text-default"
|
|
178
|
+
},
|
|
179
|
+
trim: {
|
|
180
|
+
type: "boolean",
|
|
181
|
+
className: "text-trim",
|
|
182
|
+
inverseClassName: "text-trim-none"
|
|
183
|
+
},
|
|
184
|
+
truncate: {
|
|
185
|
+
type: "conditional",
|
|
186
|
+
resolve: (value) => value === 1 ? {
|
|
187
|
+
type: "number",
|
|
188
|
+
className: "text-overflow"
|
|
189
|
+
} : {
|
|
190
|
+
type: "number",
|
|
191
|
+
className: "line-clamp",
|
|
192
|
+
variable: "--line-clamp"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
weight: {
|
|
196
|
+
type: "union",
|
|
197
|
+
className: "weight",
|
|
198
|
+
values: FONT_WEIGHT
|
|
199
|
+
},
|
|
200
|
+
...marginProps,
|
|
201
|
+
...toneProps
|
|
202
|
+
}, TEXT_SIZE = [
|
|
203
|
+
0,
|
|
204
|
+
1,
|
|
205
|
+
2,
|
|
206
|
+
3,
|
|
207
|
+
4
|
|
208
|
+
], textProps = {
|
|
209
|
+
as: { type: "string" },
|
|
210
|
+
size: {
|
|
211
|
+
type: "union",
|
|
212
|
+
className: "text-body",
|
|
213
|
+
values: TEXT_SIZE
|
|
214
|
+
},
|
|
215
|
+
...typographyProps
|
|
216
|
+
}, textClassName = suffixClassName("sui-Text");
|
|
217
|
+
/** @public */
|
|
218
|
+
function Text(t0) {
|
|
219
|
+
let $ = c(15), T0, children, rest, style, t1, t2;
|
|
220
|
+
if ($[0] !== t0) {
|
|
221
|
+
t2 = Symbol.for("react.early_return_sentinel");
|
|
222
|
+
bb0: {
|
|
223
|
+
let { size: t3, ...props } = t0, { as, children: t4, className, style: t5, ...t6 } = getProps({
|
|
224
|
+
size: t3 === void 0 ? 2 : t3,
|
|
225
|
+
...props
|
|
226
|
+
}, textProps);
|
|
227
|
+
children = t4, style = t5, rest = t6;
|
|
228
|
+
let Component = as || "span";
|
|
229
|
+
if (props.truncate && props.trim) {
|
|
230
|
+
let t7 = clsx(textClassName, className?.replace("sui-line-clamp", "").replace("sui-text-overflow", "")), t8 = props.truncate === 1 ? "sui-text-overflow" : "sui-line-clamp", t9;
|
|
231
|
+
$[7] === t8 ? t9 = $[8] : (t9 = clsx("sui-overflow-hidden", t8), $[7] = t8, $[8] = t9), t2 = /* @__PURE__ */ jsx(Component, {
|
|
232
|
+
className: t7,
|
|
233
|
+
style,
|
|
234
|
+
"data-ui": "Text",
|
|
235
|
+
...rest,
|
|
236
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
237
|
+
className: t9,
|
|
238
|
+
children
|
|
239
|
+
})
|
|
240
|
+
});
|
|
241
|
+
break bb0;
|
|
242
|
+
}
|
|
243
|
+
T0 = Component, t1 = clsx(textClassName, props.truncate && "sui-overflow-hidden", className);
|
|
244
|
+
}
|
|
245
|
+
$[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1, $[6] = t2;
|
|
246
|
+
} else T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5], t2 = $[6];
|
|
247
|
+
if (t2 !== Symbol.for("react.early_return_sentinel")) return t2;
|
|
248
|
+
let t3;
|
|
249
|
+
return $[9] !== T0 || $[10] !== children || $[11] !== rest || $[12] !== style || $[13] !== t1 ? (t3 = /* @__PURE__ */ jsx(T0, {
|
|
250
|
+
className: t1,
|
|
251
|
+
style,
|
|
252
|
+
"data-ui": "Text",
|
|
253
|
+
...rest,
|
|
254
|
+
children
|
|
255
|
+
}), $[9] = T0, $[10] = children, $[11] = rest, $[12] = style, $[13] = t1, $[14] = t3) : t3 = $[14], t3;
|
|
256
|
+
}
|
|
257
|
+
const heightProps = {
|
|
258
|
+
height: {
|
|
259
|
+
type: "string",
|
|
260
|
+
className: "height",
|
|
261
|
+
variable: "--height"
|
|
262
|
+
},
|
|
263
|
+
minHeight: {
|
|
264
|
+
type: "string",
|
|
265
|
+
className: "min-height",
|
|
266
|
+
variable: "--min-height"
|
|
267
|
+
},
|
|
268
|
+
maxHeight: {
|
|
269
|
+
type: "string",
|
|
270
|
+
className: "max-height",
|
|
271
|
+
variable: "--max-height"
|
|
272
|
+
}
|
|
273
|
+
}, AVATAR_SIZE = [
|
|
274
|
+
0,
|
|
275
|
+
1,
|
|
276
|
+
2
|
|
277
|
+
], avatarProps = {
|
|
278
|
+
color: {
|
|
279
|
+
type: "union",
|
|
280
|
+
className: "avatar",
|
|
281
|
+
values: [
|
|
282
|
+
"gray",
|
|
283
|
+
"purple",
|
|
284
|
+
"magenta",
|
|
285
|
+
"red",
|
|
286
|
+
"orange",
|
|
287
|
+
"yellow",
|
|
288
|
+
"green",
|
|
289
|
+
"cyan"
|
|
290
|
+
]
|
|
291
|
+
},
|
|
292
|
+
name: { type: "string" },
|
|
293
|
+
size: {
|
|
294
|
+
type: "composite",
|
|
295
|
+
values: AVATAR_SIZE,
|
|
296
|
+
composition: {
|
|
297
|
+
size: {
|
|
298
|
+
propDef: {
|
|
299
|
+
type: "union",
|
|
300
|
+
className: "text-body",
|
|
301
|
+
values: TEXT_SIZE
|
|
302
|
+
},
|
|
303
|
+
mapping: {
|
|
304
|
+
0: 0,
|
|
305
|
+
1: 1,
|
|
306
|
+
2: 2
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
height: {
|
|
310
|
+
propDef: heightProps.height,
|
|
311
|
+
mapping: {
|
|
312
|
+
0: "19px",
|
|
313
|
+
1: "25px",
|
|
314
|
+
2: "33px"
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
src: { type: "string" }
|
|
320
|
+
}, avatarClassName = suffixClassName("sui-Avatar");
|
|
321
|
+
/** @public */
|
|
322
|
+
function Avatar(t0) {
|
|
323
|
+
let $ = c(5), { color: t1, size: t2, ...props } = t0, { className, style, "aria-label": ariaLabel, name, src, ...rest } = getProps({
|
|
324
|
+
color: t1 === void 0 ? "gray" : t1,
|
|
325
|
+
size: t2 === void 0 ? 1 : t2,
|
|
326
|
+
...props
|
|
327
|
+
}, avatarProps), [error, setError] = useState(!1), t3 = clsx(avatarClassName, "sui-display-inline-flex sui-align-items-center sui-justify-content-center sui-radius-full sui-position-relative", className), t5 = src && !error ? /* @__PURE__ */ jsx("img", {
|
|
328
|
+
className: "sui-radius-full sui-width-full sui-height-full",
|
|
329
|
+
src,
|
|
330
|
+
alt: ariaLabel || name,
|
|
331
|
+
onError: () => setError(!0)
|
|
332
|
+
}) : /* @__PURE__ */ jsx(Text, {
|
|
333
|
+
role: "img",
|
|
334
|
+
weight: "semibold",
|
|
335
|
+
"aria-label": ariaLabel || name,
|
|
336
|
+
children: name.slice(0, 1)
|
|
337
|
+
}), t6;
|
|
338
|
+
return $[0] !== rest || $[1] !== style || $[2] !== t3 || $[3] !== t5 ? (t6 = /* @__PURE__ */ jsx("figure", {
|
|
339
|
+
className: t3,
|
|
340
|
+
style,
|
|
341
|
+
"data-ui": "Avatar",
|
|
342
|
+
...rest,
|
|
343
|
+
children: t5
|
|
344
|
+
}), $[0] = rest, $[1] = style, $[2] = t3, $[3] = t5, $[4] = t6) : t6 = $[4], t6;
|
|
345
|
+
}
|
|
346
|
+
const avatarCounterProps = {
|
|
347
|
+
count: { type: "number" },
|
|
348
|
+
size: {
|
|
349
|
+
type: "composite",
|
|
350
|
+
values: AVATAR_SIZE,
|
|
351
|
+
composition: {
|
|
352
|
+
size: {
|
|
353
|
+
propDef: {
|
|
354
|
+
type: "union",
|
|
355
|
+
className: "text-body",
|
|
356
|
+
values: TEXT_SIZE
|
|
357
|
+
},
|
|
358
|
+
mapping: {
|
|
359
|
+
0: 0,
|
|
360
|
+
1: 1,
|
|
361
|
+
2: 2
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
height: {
|
|
365
|
+
propDef: heightProps.height,
|
|
366
|
+
mapping: {
|
|
367
|
+
0: "19px",
|
|
368
|
+
1: "25px",
|
|
369
|
+
2: "33px"
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}, avatarCounterClassName = suffixClassName("sui-AvatarCounter");
|
|
375
|
+
/** @public */
|
|
376
|
+
function AvatarCounter(t0) {
|
|
377
|
+
let $ = c(14), ariaLabel, count, rest, style, t1;
|
|
378
|
+
if ($[0] !== t0) {
|
|
379
|
+
let { size: t2, ...props } = t0, { className, style: t3, "aria-label": t4, count: t5, ...t6 } = getProps({
|
|
380
|
+
size: t2 === void 0 ? 1 : t2,
|
|
381
|
+
...props
|
|
382
|
+
}, avatarCounterProps);
|
|
383
|
+
style = t3, ariaLabel = t4, count = t5, rest = t6, t1 = clsx(avatarCounterClassName, "sui-display-inline-flex sui-align-items-center sui-justify-content-center sui-radius-full sui-border", className), $[0] = t0, $[1] = ariaLabel, $[2] = count, $[3] = rest, $[4] = style, $[5] = t1;
|
|
384
|
+
} else ariaLabel = $[1], count = $[2], rest = $[3], style = $[4], t1 = $[5];
|
|
385
|
+
let t2 = ariaLabel || `+ ${count} more`, t3;
|
|
386
|
+
$[6] !== count || $[7] !== t2 ? (t3 = /* @__PURE__ */ jsx(Text, {
|
|
387
|
+
role: "img",
|
|
388
|
+
weight: "semibold",
|
|
389
|
+
"aria-label": t2,
|
|
390
|
+
children: count
|
|
391
|
+
}), $[6] = count, $[7] = t2, $[8] = t3) : t3 = $[8];
|
|
392
|
+
let t4;
|
|
393
|
+
return $[9] !== rest || $[10] !== style || $[11] !== t1 || $[12] !== t3 ? (t4 = /* @__PURE__ */ jsx("figure", {
|
|
394
|
+
className: t1,
|
|
395
|
+
style,
|
|
396
|
+
"data-ui": "AvatarCounter",
|
|
397
|
+
...rest,
|
|
398
|
+
children: t3
|
|
399
|
+
}), $[9] = rest, $[10] = style, $[11] = t1, $[12] = t3, $[13] = t4) : t4 = $[13], t4;
|
|
400
|
+
}
|
|
401
|
+
const avatarStackProps = {
|
|
402
|
+
maxLength: { type: "number" },
|
|
403
|
+
size: {
|
|
404
|
+
type: "union",
|
|
405
|
+
values: AVATAR_SIZE
|
|
406
|
+
}
|
|
407
|
+
}, avatarStackClassName = suffixClassName("sui-AvatarStack");
|
|
408
|
+
/** @public */
|
|
409
|
+
function AvatarStack(t0) {
|
|
410
|
+
let $ = c(14), t1, t2, t3, t4, t5, t6;
|
|
411
|
+
if ($[0] !== t0) {
|
|
412
|
+
let { size: t7, ...props } = t0, { children, className, style, maxLength: maxLengthProp, size: sizeProp, ...rest } = getProps({
|
|
413
|
+
size: t7 === void 0 ? 1 : t7,
|
|
414
|
+
...props
|
|
415
|
+
}, avatarStackProps), childArray = Children.toArray(children).filter(isValidElement), length = childArray.length, maxLength = maxLengthProp ?? length, visibleAvatars = length > maxLength ? childArray.slice(length - maxLength, length) : childArray;
|
|
416
|
+
t1 = clsx(avatarStackClassName, "sui-display-flex", className), t2 = style, t3 = "AvatarStack", t4 = rest, t5 = (!length || length > maxLength) && /* @__PURE__ */ jsx("li", {
|
|
417
|
+
className: "sui-display-flex",
|
|
418
|
+
children: /* @__PURE__ */ jsx(AvatarCounter, {
|
|
419
|
+
count: length ? length - maxLength : 0,
|
|
420
|
+
size: sizeProp,
|
|
421
|
+
"aria-label": length ? `+ ${length - maxLength} more user${length - maxLength > 1 ? "s" : ""}` : "No users"
|
|
422
|
+
})
|
|
423
|
+
}), t6 = visibleAvatars.map((child) => /* @__PURE__ */ jsx("li", {
|
|
424
|
+
className: "sui-display-flex",
|
|
425
|
+
children: cloneElement(child, { size: sizeProp })
|
|
426
|
+
}, child.key)), $[0] = t0, $[1] = t1, $[2] = t2, $[3] = t3, $[4] = t4, $[5] = t5, $[6] = t6;
|
|
427
|
+
} else t1 = $[1], t2 = $[2], t3 = $[3], t4 = $[4], t5 = $[5], t6 = $[6];
|
|
428
|
+
let t7;
|
|
429
|
+
return $[7] !== t1 || $[8] !== t2 || $[9] !== t3 || $[10] !== t4 || $[11] !== t5 || $[12] !== t6 ? (t7 = /* @__PURE__ */ jsxs("ul", {
|
|
430
|
+
className: t1,
|
|
431
|
+
style: t2,
|
|
432
|
+
"data-ui": t3,
|
|
433
|
+
...t4,
|
|
434
|
+
children: [t5, t6]
|
|
435
|
+
}), $[7] = t1, $[8] = t2, $[9] = t3, $[10] = t4, $[11] = t5, $[12] = t6, $[13] = t7) : t7 = $[13], t7;
|
|
436
|
+
}
|
|
437
|
+
const ICON_SIZE = [
|
|
438
|
+
0,
|
|
439
|
+
1,
|
|
440
|
+
2,
|
|
441
|
+
3,
|
|
442
|
+
4
|
|
443
|
+
], iconProps = {
|
|
444
|
+
icon: { type: "string" },
|
|
445
|
+
size: {
|
|
446
|
+
type: "union",
|
|
447
|
+
className: "icon-body",
|
|
448
|
+
values: ICON_SIZE
|
|
449
|
+
},
|
|
450
|
+
muted: typographyProps.muted,
|
|
451
|
+
...toneProps,
|
|
452
|
+
...marginProps
|
|
453
|
+
}, iconClassName = suffixClassName("sui-Icon");
|
|
454
|
+
/** @public */
|
|
455
|
+
function Icon({ icon, size = 2, ...props }) {
|
|
456
|
+
let { className, style, ...rest } = getProps({
|
|
457
|
+
size,
|
|
458
|
+
...props
|
|
459
|
+
}, iconProps), iconElement = isValidElement(icon) ? icon : null, ariaLabel = props["aria-label"] || (iconElement ? iconElement.props["aria-label"] : void 0), svgProps = {
|
|
460
|
+
className: clsx(iconClassName, "sui-display-block", className, iconElement ? iconElement.props.className : void 0),
|
|
461
|
+
style: iconElement ? {
|
|
462
|
+
...iconElement.props.style,
|
|
463
|
+
...style
|
|
464
|
+
} : style,
|
|
465
|
+
"data-ui": "Icon",
|
|
466
|
+
"aria-hidden": !ariaLabel || void 0,
|
|
467
|
+
...rest
|
|
468
|
+
};
|
|
469
|
+
return iconElement ? cloneElement(iconElement, svgProps) : createElement(icon, svgProps);
|
|
470
|
+
}
|
|
471
|
+
const badgeProps = {
|
|
472
|
+
as: { type: "string" },
|
|
473
|
+
iconStart: { type: "string" },
|
|
474
|
+
text: { type: "string" },
|
|
475
|
+
...toneProps
|
|
476
|
+
}, badgeClassName = suffixClassName("sui-Badge");
|
|
477
|
+
/** @public */
|
|
478
|
+
function Badge(t0) {
|
|
479
|
+
let $ = c(20), T0, children, t1, t2, t3, t4, t5, text;
|
|
480
|
+
if ($[0] !== t0) {
|
|
481
|
+
let { tone: t6, ...props } = t0, { as, children: t7, className, style, iconStart: IconStart, text: t8, ...rest } = getProps({
|
|
482
|
+
tone: t6 === void 0 ? "neutral" : t6,
|
|
483
|
+
...props
|
|
484
|
+
}, badgeProps);
|
|
485
|
+
children = t7, text = t8;
|
|
486
|
+
let Component = as || "span", badgeClasses = clsx(badgeClassName, `${IconStart ? "sui-p1" : "sui-px2 sui-py1"} sui-radius-full sui-display-inline-flex sui-align-items-center sui-gap1`);
|
|
487
|
+
T0 = Component, t1 = clsx(badgeClasses, className), t2 = style, t3 = "Badge", t4 = rest, t5 = IconStart && (isValidElement(IconStart) ? IconStart : /* @__PURE__ */ jsx(Icon, {
|
|
488
|
+
icon: IconStart,
|
|
489
|
+
marginX: -1,
|
|
490
|
+
marginY: -2,
|
|
491
|
+
size: 0
|
|
492
|
+
})), $[0] = t0, $[1] = T0, $[2] = children, $[3] = t1, $[4] = t2, $[5] = t3, $[6] = t4, $[7] = t5, $[8] = text;
|
|
493
|
+
} else T0 = $[1], children = $[2], t1 = $[3], t2 = $[4], t3 = $[5], t4 = $[6], t5 = $[7], text = $[8];
|
|
494
|
+
let t6;
|
|
495
|
+
$[9] === text ? t6 = $[10] : (t6 = text && /* @__PURE__ */ jsx(Text, {
|
|
496
|
+
size: 1,
|
|
497
|
+
trim: !0,
|
|
498
|
+
children: text
|
|
499
|
+
}), $[9] = text, $[10] = t6);
|
|
500
|
+
let t7;
|
|
501
|
+
return $[11] !== T0 || $[12] !== children || $[13] !== t1 || $[14] !== t2 || $[15] !== t3 || $[16] !== t4 || $[17] !== t5 || $[18] !== t6 ? (t7 = /* @__PURE__ */ jsxs(T0, {
|
|
502
|
+
className: t1,
|
|
503
|
+
style: t2,
|
|
504
|
+
"data-ui": t3,
|
|
505
|
+
...t4,
|
|
506
|
+
children: [
|
|
507
|
+
t5,
|
|
508
|
+
t6,
|
|
509
|
+
children
|
|
510
|
+
]
|
|
511
|
+
}), $[11] = T0, $[12] = children, $[13] = t1, $[14] = t2, $[15] = t3, $[16] = t4, $[17] = t5, $[18] = t6, $[19] = t7) : t7 = $[19], t7;
|
|
512
|
+
}
|
|
513
|
+
const borderProps = {
|
|
514
|
+
border: {
|
|
515
|
+
type: "boolean",
|
|
516
|
+
className: "border",
|
|
517
|
+
inverseClassName: "border-none"
|
|
518
|
+
},
|
|
519
|
+
borderTop: {
|
|
520
|
+
type: "boolean",
|
|
521
|
+
className: "border-top",
|
|
522
|
+
inverseClassName: "border-top-none"
|
|
523
|
+
},
|
|
524
|
+
borderRight: {
|
|
525
|
+
type: "boolean",
|
|
526
|
+
className: "border-right",
|
|
527
|
+
inverseClassName: "border-right-none"
|
|
528
|
+
},
|
|
529
|
+
borderBottom: {
|
|
530
|
+
type: "boolean",
|
|
531
|
+
className: "border-bottom",
|
|
532
|
+
inverseClassName: "border-bottom-none"
|
|
533
|
+
},
|
|
534
|
+
borderLeft: {
|
|
535
|
+
type: "boolean",
|
|
536
|
+
className: "border-left",
|
|
537
|
+
inverseClassName: "border-left-none"
|
|
538
|
+
},
|
|
539
|
+
radius: {
|
|
540
|
+
type: "union",
|
|
541
|
+
className: "radius",
|
|
542
|
+
values: [
|
|
543
|
+
0,
|
|
544
|
+
1,
|
|
545
|
+
2,
|
|
546
|
+
3,
|
|
547
|
+
4,
|
|
548
|
+
5,
|
|
549
|
+
6,
|
|
550
|
+
"full"
|
|
551
|
+
]
|
|
552
|
+
}
|
|
133
553
|
}, flexChildProps = {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
554
|
+
flexBasis: {
|
|
555
|
+
type: "string",
|
|
556
|
+
className: "flex-basis",
|
|
557
|
+
variable: "--flex-basis"
|
|
558
|
+
},
|
|
559
|
+
flexGrow: {
|
|
560
|
+
type: "number",
|
|
561
|
+
className: "flex-grow",
|
|
562
|
+
variable: "--flex-grow"
|
|
563
|
+
},
|
|
564
|
+
flexShrink: {
|
|
565
|
+
type: "number",
|
|
566
|
+
className: "flex-shrink",
|
|
567
|
+
variable: "--flex-shrink"
|
|
568
|
+
}
|
|
149
569
|
}, gridChildProps = {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
},
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
},
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
marginX: {
|
|
203
|
-
type: "union",
|
|
204
|
-
className: "mx",
|
|
205
|
-
values: SPACE_AUTO_NEGATIVE
|
|
206
|
-
},
|
|
207
|
-
marginY: {
|
|
208
|
-
type: "union",
|
|
209
|
-
className: "my",
|
|
210
|
-
values: SPACE_AUTO_NEGATIVE
|
|
211
|
-
},
|
|
212
|
-
marginTop: {
|
|
213
|
-
type: "union",
|
|
214
|
-
className: "mt",
|
|
215
|
-
values: SPACE_AUTO_NEGATIVE
|
|
216
|
-
},
|
|
217
|
-
marginRight: {
|
|
218
|
-
type: "union",
|
|
219
|
-
className: "mr",
|
|
220
|
-
values: SPACE_AUTO_NEGATIVE
|
|
221
|
-
},
|
|
222
|
-
marginBottom: {
|
|
223
|
-
type: "union",
|
|
224
|
-
className: "mb",
|
|
225
|
-
values: SPACE_AUTO_NEGATIVE
|
|
226
|
-
},
|
|
227
|
-
marginLeft: {
|
|
228
|
-
type: "union",
|
|
229
|
-
className: "ml",
|
|
230
|
-
values: SPACE_AUTO_NEGATIVE
|
|
231
|
-
}
|
|
232
|
-
}, OVERFLOW = ["visible", "hidden", "auto", "scroll", "clip"], overflowProps = {
|
|
233
|
-
overflow: {
|
|
234
|
-
type: "union",
|
|
235
|
-
className: "overflow",
|
|
236
|
-
values: OVERFLOW
|
|
237
|
-
},
|
|
238
|
-
overflowX: {
|
|
239
|
-
type: "union",
|
|
240
|
-
className: "overflow-x",
|
|
241
|
-
values: OVERFLOW
|
|
242
|
-
},
|
|
243
|
-
overflowY: {
|
|
244
|
-
type: "union",
|
|
245
|
-
className: "overflow-y",
|
|
246
|
-
values: OVERFLOW
|
|
247
|
-
}
|
|
570
|
+
gridColumn: {
|
|
571
|
+
type: "string",
|
|
572
|
+
className: "grid-column",
|
|
573
|
+
variable: "--grid-column"
|
|
574
|
+
},
|
|
575
|
+
gridColumnStart: {
|
|
576
|
+
type: "string",
|
|
577
|
+
className: "grid-column-start",
|
|
578
|
+
variable: "--grid-column-start"
|
|
579
|
+
},
|
|
580
|
+
gridColumnEnd: {
|
|
581
|
+
type: "string",
|
|
582
|
+
className: "grid-column-end",
|
|
583
|
+
variable: "--grid-column-end"
|
|
584
|
+
},
|
|
585
|
+
gridRow: {
|
|
586
|
+
type: "string",
|
|
587
|
+
className: "grid-row",
|
|
588
|
+
variable: "--grid-row"
|
|
589
|
+
},
|
|
590
|
+
gridRowStart: {
|
|
591
|
+
type: "string",
|
|
592
|
+
className: "grid-row-start",
|
|
593
|
+
variable: "--grid-row-start"
|
|
594
|
+
},
|
|
595
|
+
gridRowEnd: {
|
|
596
|
+
type: "string",
|
|
597
|
+
className: "grid-row-end",
|
|
598
|
+
variable: "--grid-row-end"
|
|
599
|
+
}
|
|
600
|
+
}, OVERFLOW = [
|
|
601
|
+
"visible",
|
|
602
|
+
"hidden",
|
|
603
|
+
"auto",
|
|
604
|
+
"scroll",
|
|
605
|
+
"clip"
|
|
606
|
+
], overflowProps = {
|
|
607
|
+
overflow: {
|
|
608
|
+
type: "union",
|
|
609
|
+
className: "overflow",
|
|
610
|
+
values: OVERFLOW
|
|
611
|
+
},
|
|
612
|
+
overflowX: {
|
|
613
|
+
type: "union",
|
|
614
|
+
className: "overflow-x",
|
|
615
|
+
values: OVERFLOW
|
|
616
|
+
},
|
|
617
|
+
overflowY: {
|
|
618
|
+
type: "union",
|
|
619
|
+
className: "overflow-y",
|
|
620
|
+
values: OVERFLOW
|
|
621
|
+
}
|
|
248
622
|
}, paddingProps = {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
},
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
},
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
},
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
623
|
+
padding: {
|
|
624
|
+
type: "union",
|
|
625
|
+
className: "p",
|
|
626
|
+
values: SPACE
|
|
627
|
+
},
|
|
628
|
+
paddingX: {
|
|
629
|
+
type: "union",
|
|
630
|
+
className: "px",
|
|
631
|
+
values: SPACE
|
|
632
|
+
},
|
|
633
|
+
paddingY: {
|
|
634
|
+
type: "union",
|
|
635
|
+
className: "py",
|
|
636
|
+
values: SPACE
|
|
637
|
+
},
|
|
638
|
+
paddingTop: {
|
|
639
|
+
type: "union",
|
|
640
|
+
className: "pt",
|
|
641
|
+
values: SPACE
|
|
642
|
+
},
|
|
643
|
+
paddingRight: {
|
|
644
|
+
type: "union",
|
|
645
|
+
className: "pr",
|
|
646
|
+
values: SPACE
|
|
647
|
+
},
|
|
648
|
+
paddingBottom: {
|
|
649
|
+
type: "union",
|
|
650
|
+
className: "pb",
|
|
651
|
+
values: SPACE
|
|
652
|
+
},
|
|
653
|
+
paddingLeft: {
|
|
654
|
+
type: "union",
|
|
655
|
+
className: "pl",
|
|
656
|
+
values: SPACE
|
|
657
|
+
}
|
|
658
|
+
}, positionProps = {
|
|
659
|
+
position: {
|
|
660
|
+
type: "union",
|
|
661
|
+
className: "position",
|
|
662
|
+
values: [
|
|
663
|
+
"absolute",
|
|
664
|
+
"fixed",
|
|
665
|
+
"relative",
|
|
666
|
+
"static",
|
|
667
|
+
"sticky"
|
|
668
|
+
]
|
|
669
|
+
},
|
|
670
|
+
inset: {
|
|
671
|
+
type: "union",
|
|
672
|
+
className: "inset",
|
|
673
|
+
values: SPACE_AUTO
|
|
674
|
+
},
|
|
675
|
+
top: {
|
|
676
|
+
type: "union",
|
|
677
|
+
className: "top",
|
|
678
|
+
values: SPACE_AUTO
|
|
679
|
+
},
|
|
680
|
+
right: {
|
|
681
|
+
type: "union",
|
|
682
|
+
className: "right",
|
|
683
|
+
values: SPACE_AUTO
|
|
684
|
+
},
|
|
685
|
+
bottom: {
|
|
686
|
+
type: "union",
|
|
687
|
+
className: "bottom",
|
|
688
|
+
values: SPACE_AUTO
|
|
689
|
+
},
|
|
690
|
+
left: {
|
|
691
|
+
type: "union",
|
|
692
|
+
className: "left",
|
|
693
|
+
values: SPACE_AUTO
|
|
694
|
+
}
|
|
695
|
+
}, shadowProps = { shadow: {
|
|
696
|
+
type: "union",
|
|
697
|
+
className: "shadow",
|
|
698
|
+
values: [
|
|
699
|
+
0,
|
|
700
|
+
1,
|
|
701
|
+
2,
|
|
702
|
+
3,
|
|
703
|
+
4,
|
|
704
|
+
5
|
|
705
|
+
]
|
|
706
|
+
} }, widthProps = {
|
|
707
|
+
width: {
|
|
708
|
+
type: "string",
|
|
709
|
+
className: "width",
|
|
710
|
+
variable: "--width"
|
|
711
|
+
},
|
|
712
|
+
minWidth: {
|
|
713
|
+
type: "string",
|
|
714
|
+
className: "min-width",
|
|
715
|
+
variable: "--min-width"
|
|
716
|
+
},
|
|
717
|
+
maxWidth: {
|
|
718
|
+
type: "string",
|
|
719
|
+
className: "max-width",
|
|
720
|
+
variable: "--max-width"
|
|
721
|
+
}
|
|
722
|
+
}, zIndexProps = { zIndex: {
|
|
723
|
+
type: "number",
|
|
724
|
+
className: "z-index",
|
|
725
|
+
variable: "--z-index"
|
|
726
|
+
} }, layoutProps = {
|
|
727
|
+
...toneWithDefaultProps,
|
|
728
|
+
...widthProps,
|
|
729
|
+
...heightProps,
|
|
730
|
+
...marginProps,
|
|
731
|
+
...borderProps,
|
|
732
|
+
...paddingProps,
|
|
733
|
+
...positionProps,
|
|
734
|
+
...overflowProps,
|
|
735
|
+
...flexChildProps,
|
|
736
|
+
...gridChildProps,
|
|
737
|
+
...shadowProps,
|
|
738
|
+
...zIndexProps
|
|
739
|
+
}, DISPLAY_BLOCK = [
|
|
740
|
+
"block",
|
|
741
|
+
"inline-block",
|
|
742
|
+
"none"
|
|
743
|
+
], DISPLAY_FLEX = [
|
|
744
|
+
"flex",
|
|
745
|
+
"inline-flex",
|
|
746
|
+
"none"
|
|
747
|
+
], DISPLAY_GRID = [
|
|
748
|
+
"grid",
|
|
749
|
+
"inline-grid",
|
|
750
|
+
"none"
|
|
751
|
+
], boxProps = {
|
|
752
|
+
as: { type: "string" },
|
|
753
|
+
display: {
|
|
754
|
+
type: "union",
|
|
755
|
+
className: "display",
|
|
756
|
+
values: DISPLAY_BLOCK
|
|
757
|
+
},
|
|
758
|
+
...layoutProps
|
|
372
759
|
}, boxClassName = suffixClassName("sui-Box");
|
|
760
|
+
/** @public */
|
|
373
761
|
function Box(t0) {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
762
|
+
let $ = c(12), T0, children, rest, style, t1;
|
|
763
|
+
if ($[0] !== t0) {
|
|
764
|
+
let { display: t2, ...props } = t0, { as, children: t3, className, style: t4, ...t5 } = getProps({
|
|
765
|
+
display: t2 === void 0 ? "block" : t2,
|
|
766
|
+
...props
|
|
767
|
+
}, boxProps);
|
|
768
|
+
children = t3, style = t4, rest = t5, T0 = as || "div", t1 = clsx(boxClassName, className), $[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1;
|
|
769
|
+
} else T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5];
|
|
770
|
+
let t2;
|
|
771
|
+
return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, {
|
|
772
|
+
className: t1,
|
|
773
|
+
style,
|
|
774
|
+
"data-ui": "Box",
|
|
775
|
+
...rest,
|
|
776
|
+
children
|
|
777
|
+
}), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
|
|
778
|
+
}
|
|
779
|
+
const flexParentProps = {
|
|
780
|
+
alignItems: {
|
|
781
|
+
type: "union",
|
|
782
|
+
className: "align-items",
|
|
783
|
+
values: [
|
|
784
|
+
"baseline",
|
|
785
|
+
"center",
|
|
786
|
+
"flex-end",
|
|
787
|
+
"flex-start",
|
|
788
|
+
"stretch"
|
|
789
|
+
]
|
|
790
|
+
},
|
|
791
|
+
justifyContent: {
|
|
792
|
+
type: "union",
|
|
793
|
+
className: "justify-content",
|
|
794
|
+
values: [
|
|
795
|
+
"flex-start",
|
|
796
|
+
"flex-end",
|
|
797
|
+
"center",
|
|
798
|
+
"space-between",
|
|
799
|
+
"space-around",
|
|
800
|
+
"space-evenly"
|
|
801
|
+
]
|
|
802
|
+
},
|
|
803
|
+
flexDirection: {
|
|
804
|
+
type: "union",
|
|
805
|
+
className: "flex-direction",
|
|
806
|
+
values: [
|
|
807
|
+
"row",
|
|
808
|
+
"row-reverse",
|
|
809
|
+
"column",
|
|
810
|
+
"column-reverse"
|
|
811
|
+
]
|
|
812
|
+
},
|
|
813
|
+
flexWrap: {
|
|
814
|
+
type: "union",
|
|
815
|
+
className: "flex",
|
|
816
|
+
values: [
|
|
817
|
+
"wrap",
|
|
818
|
+
"wrap-reverse",
|
|
819
|
+
"nowrap"
|
|
820
|
+
]
|
|
821
|
+
}
|
|
417
822
|
}, gapProps = {
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
823
|
+
gap: {
|
|
824
|
+
type: "union",
|
|
825
|
+
className: "gap",
|
|
826
|
+
values: SPACE_INHERIT
|
|
827
|
+
},
|
|
828
|
+
rowGap: {
|
|
829
|
+
type: "union",
|
|
830
|
+
className: "row-gap",
|
|
831
|
+
values: SPACE_INHERIT
|
|
832
|
+
},
|
|
833
|
+
columnGap: {
|
|
834
|
+
type: "union",
|
|
835
|
+
className: "column-gap",
|
|
836
|
+
values: SPACE_INHERIT
|
|
837
|
+
}
|
|
433
838
|
}, flexProps = {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
...gapProps,
|
|
444
|
-
...layoutProps
|
|
839
|
+
as: { type: "string" },
|
|
840
|
+
display: {
|
|
841
|
+
type: "union",
|
|
842
|
+
className: "display",
|
|
843
|
+
values: DISPLAY_FLEX
|
|
844
|
+
},
|
|
845
|
+
...flexParentProps,
|
|
846
|
+
...gapProps,
|
|
847
|
+
...layoutProps
|
|
445
848
|
}, flexClassName = suffixClassName("sui-Flex");
|
|
849
|
+
/** @public */
|
|
446
850
|
function Flex(t0) {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
align: {
|
|
471
|
-
type: "union",
|
|
472
|
-
className: "text",
|
|
473
|
-
values: TEXT_ALIGN
|
|
474
|
-
},
|
|
475
|
-
muted: {
|
|
476
|
-
type: "boolean",
|
|
477
|
-
className: "text-muted",
|
|
478
|
-
inverseClassName: "text-default"
|
|
479
|
-
},
|
|
480
|
-
trim: {
|
|
481
|
-
type: "boolean",
|
|
482
|
-
className: "text-trim",
|
|
483
|
-
inverseClassName: "text-trim-none"
|
|
484
|
-
},
|
|
485
|
-
truncate: {
|
|
486
|
-
type: "conditional",
|
|
487
|
-
resolve: (value) => value === 1 ? {
|
|
488
|
-
type: "number",
|
|
489
|
-
className: "text-overflow"
|
|
490
|
-
} : {
|
|
491
|
-
type: "number",
|
|
492
|
-
className: "line-clamp",
|
|
493
|
-
variable: "--line-clamp"
|
|
494
|
-
}
|
|
495
|
-
},
|
|
496
|
-
weight: {
|
|
497
|
-
type: "union",
|
|
498
|
-
className: "weight",
|
|
499
|
-
values: FONT_WEIGHT
|
|
500
|
-
},
|
|
501
|
-
...marginProps,
|
|
502
|
-
...toneProps
|
|
503
|
-
}, ICON_SIZE = [0, 1, 2, 3, 4], iconProps = {
|
|
504
|
-
icon: {
|
|
505
|
-
type: "string"
|
|
506
|
-
},
|
|
507
|
-
size: {
|
|
508
|
-
type: "union",
|
|
509
|
-
className: "icon-body",
|
|
510
|
-
values: ICON_SIZE
|
|
511
|
-
},
|
|
512
|
-
muted: typographyProps.muted,
|
|
513
|
-
...toneProps,
|
|
514
|
-
...marginProps
|
|
515
|
-
}, iconClassName = suffixClassName("sui-Icon");
|
|
516
|
-
function Icon(t0) {
|
|
517
|
-
const $ = c(12);
|
|
518
|
-
let T0, props, rest, style, t1;
|
|
519
|
-
if ($[0] !== t0) {
|
|
520
|
-
const {
|
|
521
|
-
size: t22,
|
|
522
|
-
...t32
|
|
523
|
-
} = t0;
|
|
524
|
-
props = t32;
|
|
525
|
-
const size = t22 === void 0 ? 2 : t22, {
|
|
526
|
-
className,
|
|
527
|
-
style: t4,
|
|
528
|
-
icon: Component,
|
|
529
|
-
...t5
|
|
530
|
-
} = getProps({
|
|
531
|
-
size,
|
|
532
|
-
...props
|
|
533
|
-
}, iconProps);
|
|
534
|
-
style = t4, rest = t5, T0 = Component, t1 = clsx(iconClassName, className), $[0] = t0, $[1] = T0, $[2] = props, $[3] = rest, $[4] = style, $[5] = t1;
|
|
535
|
-
} else
|
|
536
|
-
T0 = $[1], props = $[2], rest = $[3], style = $[4], t1 = $[5];
|
|
537
|
-
const t2 = props["aria-label"] ? void 0 : !0;
|
|
538
|
-
let t3;
|
|
539
|
-
return $[6] !== T0 || $[7] !== rest || $[8] !== style || $[9] !== t1 || $[10] !== t2 ? (t3 = /* @__PURE__ */ jsx(T0, { className: t1, "data-ui": "Icon", style, "aria-hidden": t2, ...rest }), $[6] = T0, $[7] = rest, $[8] = style, $[9] = t1, $[10] = t2, $[11] = t3) : t3 = $[11], t3;
|
|
540
|
-
}
|
|
541
|
-
const spinnerProps = {
|
|
542
|
-
size: {
|
|
543
|
-
type: "union",
|
|
544
|
-
className: "icon-body",
|
|
545
|
-
values: ICON_SIZE
|
|
546
|
-
}
|
|
547
|
-
}, spinnerClassName = suffixClassName("sui-Spinner");
|
|
851
|
+
let $ = c(12), T0, children, rest, style, t1;
|
|
852
|
+
if ($[0] !== t0) {
|
|
853
|
+
let { display: t2, ...props } = t0, { as, children: t3, className, style: t4, ...t5 } = getProps({
|
|
854
|
+
display: t2 === void 0 ? "flex" : t2,
|
|
855
|
+
...props
|
|
856
|
+
}, flexProps);
|
|
857
|
+
children = t3, style = t4, rest = t5, T0 = as || "div", t1 = clsx(flexClassName, className), $[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1;
|
|
858
|
+
} else T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5];
|
|
859
|
+
let t2;
|
|
860
|
+
return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, {
|
|
861
|
+
className: t1,
|
|
862
|
+
style,
|
|
863
|
+
"data-ui": "Flex",
|
|
864
|
+
...rest,
|
|
865
|
+
children
|
|
866
|
+
}), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
|
|
867
|
+
}
|
|
868
|
+
const spinnerProps = { size: {
|
|
869
|
+
type: "union",
|
|
870
|
+
className: "icon-body",
|
|
871
|
+
values: ICON_SIZE
|
|
872
|
+
} }, spinnerClassName = suffixClassName("sui-Spinner");
|
|
873
|
+
/** @public */
|
|
548
874
|
function Spinner(t0) {
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
}
|
|
569
|
-
const
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
regular: 2,
|
|
629
|
-
loose: 3
|
|
630
|
-
}
|
|
631
|
-
},
|
|
632
|
-
padding: {
|
|
633
|
-
propDef: paddingProps.padding,
|
|
634
|
-
mapping: {
|
|
635
|
-
regular: 2,
|
|
636
|
-
loose: 3
|
|
637
|
-
}
|
|
638
|
-
},
|
|
639
|
-
minHeight: {
|
|
640
|
-
propDef: heightProps.minHeight,
|
|
641
|
-
mapping: {
|
|
642
|
-
regular: "25px",
|
|
643
|
-
loose: "33px"
|
|
644
|
-
}
|
|
645
|
-
},
|
|
646
|
-
minWidth: {
|
|
647
|
-
propDef: widthProps.minWidth,
|
|
648
|
-
mapping: {
|
|
649
|
-
regular: "25px",
|
|
650
|
-
loose: "33px"
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
},
|
|
655
|
-
fullWidth: {
|
|
656
|
-
type: "boolean",
|
|
657
|
-
className: "width-full",
|
|
658
|
-
inverseClassName: "width-auto"
|
|
659
|
-
},
|
|
660
|
-
iconStart: {
|
|
661
|
-
type: "string"
|
|
662
|
-
},
|
|
663
|
-
iconEnd: {
|
|
664
|
-
type: "string"
|
|
665
|
-
},
|
|
666
|
-
level: {
|
|
667
|
-
type: "union",
|
|
668
|
-
className: "button-level",
|
|
669
|
-
values: BUTTON_LEVEL
|
|
670
|
-
},
|
|
671
|
-
loading: {
|
|
672
|
-
type: "boolean"
|
|
673
|
-
},
|
|
674
|
-
text: {
|
|
675
|
-
type: "string"
|
|
676
|
-
},
|
|
677
|
-
tone: {
|
|
678
|
-
type: "union",
|
|
679
|
-
className: "tone",
|
|
680
|
-
values: BUTTON_TONE
|
|
681
|
-
}
|
|
875
|
+
let $ = c(14), T0, rest, style, t1, t2, t3;
|
|
876
|
+
if ($[0] !== t0) {
|
|
877
|
+
let { size: t4, ...props } = t0, size = t4 === void 0 ? 2 : t4, { className, style: t5, ...t6 } = getProps({
|
|
878
|
+
size,
|
|
879
|
+
...props
|
|
880
|
+
}, spinnerProps);
|
|
881
|
+
style = t5, rest = t6, T0 = Icon, t1 = SpinnerIcon, t2 = size, t3 = clsx(spinnerClassName, className), $[0] = t0, $[1] = T0, $[2] = rest, $[3] = style, $[4] = t1, $[5] = t2, $[6] = t3;
|
|
882
|
+
} else T0 = $[1], rest = $[2], style = $[3], t1 = $[4], t2 = $[5], t3 = $[6];
|
|
883
|
+
let t4;
|
|
884
|
+
return $[7] !== T0 || $[8] !== rest || $[9] !== style || $[10] !== t1 || $[11] !== t2 || $[12] !== t3 ? (t4 = /* @__PURE__ */ jsx(T0, {
|
|
885
|
+
icon: t1,
|
|
886
|
+
size: t2,
|
|
887
|
+
className: t3,
|
|
888
|
+
style,
|
|
889
|
+
"data-ui": "Spinner",
|
|
890
|
+
role: "status",
|
|
891
|
+
"aria-label": "Loading...",
|
|
892
|
+
...rest
|
|
893
|
+
}), $[7] = T0, $[8] = rest, $[9] = style, $[10] = t1, $[11] = t2, $[12] = t3, $[13] = t4) : t4 = $[13], t4;
|
|
894
|
+
}
|
|
895
|
+
const buttonProps = {
|
|
896
|
+
as: { type: "string" },
|
|
897
|
+
density: {
|
|
898
|
+
type: "composite",
|
|
899
|
+
values: ["regular", "loose"],
|
|
900
|
+
composition: {
|
|
901
|
+
gap: {
|
|
902
|
+
propDef: gapProps.gap,
|
|
903
|
+
mapping: {
|
|
904
|
+
regular: 2,
|
|
905
|
+
loose: 3
|
|
906
|
+
}
|
|
907
|
+
},
|
|
908
|
+
padding: {
|
|
909
|
+
propDef: paddingProps.padding,
|
|
910
|
+
mapping: {
|
|
911
|
+
regular: 2,
|
|
912
|
+
loose: 3
|
|
913
|
+
}
|
|
914
|
+
},
|
|
915
|
+
minHeight: {
|
|
916
|
+
propDef: heightProps.minHeight,
|
|
917
|
+
mapping: {
|
|
918
|
+
regular: "25px",
|
|
919
|
+
loose: "33px"
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
minWidth: {
|
|
923
|
+
propDef: widthProps.minWidth,
|
|
924
|
+
mapping: {
|
|
925
|
+
regular: "25px",
|
|
926
|
+
loose: "33px"
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
},
|
|
931
|
+
fullWidth: {
|
|
932
|
+
type: "boolean",
|
|
933
|
+
className: "width-full",
|
|
934
|
+
inverseClassName: "width-auto"
|
|
935
|
+
},
|
|
936
|
+
iconStart: { type: "string" },
|
|
937
|
+
iconEnd: { type: "string" },
|
|
938
|
+
level: {
|
|
939
|
+
type: "union",
|
|
940
|
+
className: "button-level",
|
|
941
|
+
values: [
|
|
942
|
+
"primary",
|
|
943
|
+
"secondary",
|
|
944
|
+
"tertiary"
|
|
945
|
+
]
|
|
946
|
+
},
|
|
947
|
+
loading: { type: "boolean" },
|
|
948
|
+
text: { type: "string" },
|
|
949
|
+
tone: {
|
|
950
|
+
type: "union",
|
|
951
|
+
className: "tone",
|
|
952
|
+
values: ["neutral", "critical"]
|
|
953
|
+
}
|
|
682
954
|
}, buttonClassName = suffixClassName("sui-Button");
|
|
955
|
+
/** @public */
|
|
683
956
|
function Button(t0) {
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
957
|
+
let $ = c(26), T0, t1, t10, t11, t2, t3, t4, t5, t6, t7, t8, t9;
|
|
958
|
+
if ($[0] !== t0) {
|
|
959
|
+
let { density: t12, level: t13, tone: t14, ...props } = t0, { as, children, className, disabled, style, iconStart: IconStart, iconEnd: IconEnd, loading, text, ...rest } = getProps({
|
|
960
|
+
density: t12 === void 0 ? "regular" : t12,
|
|
961
|
+
level: t13 === void 0 ? "primary" : t13,
|
|
962
|
+
tone: t14 === void 0 ? "neutral" : t14,
|
|
963
|
+
...props
|
|
964
|
+
}, buttonProps);
|
|
965
|
+
T0 = as || "button", t1 = clsx(buttonClassName, "sui-display-inline-flex sui-align-items-center sui-justify-content-center sui-radius2 sui-position-relative sui-overflow-hidden", className), t2 = style, t3 = "Button", t4 = disabled || loading, t5 = loading ? !0 : void 0, t6 = rest, t7 = loading && /* @__PURE__ */ jsx(Flex, {
|
|
966
|
+
position: "absolute",
|
|
967
|
+
inset: 0,
|
|
968
|
+
alignItems: "center",
|
|
969
|
+
justifyContent: "center",
|
|
970
|
+
"data-ui": "Button-Spinner",
|
|
971
|
+
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
972
|
+
}), t8 = IconStart && (isValidElement(IconStart) ? IconStart : /* @__PURE__ */ jsx(Icon, {
|
|
973
|
+
icon: IconStart,
|
|
974
|
+
marginX: -1,
|
|
975
|
+
marginY: -2,
|
|
976
|
+
size: 1
|
|
977
|
+
})), t9 = text && /* @__PURE__ */ jsx(Text, {
|
|
978
|
+
size: 1,
|
|
979
|
+
weight: "medium",
|
|
980
|
+
trim: !0,
|
|
981
|
+
children: text
|
|
982
|
+
}), t10 = children, t11 = IconEnd && (isValidElement(IconEnd) ? IconEnd : /* @__PURE__ */ jsx(Icon, {
|
|
983
|
+
icon: IconEnd,
|
|
984
|
+
marginX: -1,
|
|
985
|
+
marginY: -2,
|
|
986
|
+
size: 1
|
|
987
|
+
})), $[0] = t0, $[1] = T0, $[2] = t1, $[3] = t10, $[4] = t11, $[5] = t2, $[6] = t3, $[7] = t4, $[8] = t5, $[9] = t6, $[10] = t7, $[11] = t8, $[12] = t9;
|
|
988
|
+
} else T0 = $[1], t1 = $[2], t10 = $[3], t11 = $[4], t2 = $[5], t3 = $[6], t4 = $[7], t5 = $[8], t6 = $[9], t7 = $[10], t8 = $[11], t9 = $[12];
|
|
989
|
+
let t12;
|
|
990
|
+
return $[13] !== T0 || $[14] !== t1 || $[15] !== t10 || $[16] !== t11 || $[17] !== t2 || $[18] !== t3 || $[19] !== t4 || $[20] !== t5 || $[21] !== t6 || $[22] !== t7 || $[23] !== t8 || $[24] !== t9 ? (t12 = /* @__PURE__ */ jsxs(T0, {
|
|
991
|
+
className: t1,
|
|
992
|
+
style: t2,
|
|
993
|
+
"data-ui": t3,
|
|
994
|
+
disabled: t4,
|
|
995
|
+
"aria-busy": t5,
|
|
996
|
+
...t6,
|
|
997
|
+
children: [
|
|
998
|
+
t7,
|
|
999
|
+
t8,
|
|
1000
|
+
t9,
|
|
1001
|
+
t10,
|
|
1002
|
+
t11
|
|
1003
|
+
]
|
|
1004
|
+
}), $[13] = T0, $[14] = t1, $[15] = t10, $[16] = t11, $[17] = t2, $[18] = t3, $[19] = t4, $[20] = t5, $[21] = t6, $[22] = t7, $[23] = t8, $[24] = t9, $[25] = t12) : t12 = $[25], t12;
|
|
1005
|
+
}
|
|
1006
|
+
const DENSITY = [
|
|
1007
|
+
"compact",
|
|
1008
|
+
"regular",
|
|
1009
|
+
"loose"
|
|
1010
|
+
], cardProps = {
|
|
1011
|
+
as: { type: "string" },
|
|
1012
|
+
density: {
|
|
1013
|
+
type: "composite",
|
|
1014
|
+
values: DENSITY,
|
|
1015
|
+
composition: {
|
|
1016
|
+
gap: {
|
|
1017
|
+
propDef: gapProps.gap,
|
|
1018
|
+
mapping: {
|
|
1019
|
+
compact: 2,
|
|
1020
|
+
regular: 3,
|
|
1021
|
+
loose: 4
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
1024
|
+
padding: {
|
|
1025
|
+
propDef: paddingProps.padding,
|
|
1026
|
+
mapping: {
|
|
1027
|
+
compact: 3,
|
|
1028
|
+
regular: 4,
|
|
1029
|
+
loose: 5
|
|
1030
|
+
}
|
|
1031
|
+
},
|
|
1032
|
+
radius: {
|
|
1033
|
+
propDef: borderProps.radius,
|
|
1034
|
+
mapping: {
|
|
1035
|
+
compact: 2,
|
|
1036
|
+
regular: 3,
|
|
1037
|
+
loose: 4
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
},
|
|
1042
|
+
...toneWithDefaultProps,
|
|
1043
|
+
...marginProps
|
|
757
1044
|
}, cardClassName = suffixClassName("sui-Card");
|
|
1045
|
+
/** @public */
|
|
758
1046
|
function Card(t0) {
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
}, cardProps);
|
|
777
|
-
children = t4, style = t5, rest = t6, T0 = as || "div", t1 = clsx(cardClassName, "sui-border", className), $[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1;
|
|
778
|
-
} else
|
|
779
|
-
T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5];
|
|
780
|
-
let t2;
|
|
781
|
-
return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Card", ...rest, children }), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
|
|
782
|
-
}
|
|
783
|
-
const labelProps = {
|
|
784
|
-
disabled: {
|
|
785
|
-
type: "boolean"
|
|
786
|
-
},
|
|
787
|
-
error: {
|
|
788
|
-
type: "boolean"
|
|
789
|
-
},
|
|
790
|
-
...marginProps
|
|
791
|
-
}, labelClassName = suffixClassName("sui-Label");
|
|
792
|
-
function Label(props) {
|
|
793
|
-
const $ = c(18);
|
|
794
|
-
let T0, children, rest, style, t0, t1, t2, t3;
|
|
795
|
-
if ($[0] !== props) {
|
|
796
|
-
const {
|
|
797
|
-
children: t42,
|
|
798
|
-
className,
|
|
799
|
-
style: t5,
|
|
800
|
-
disabled,
|
|
801
|
-
error,
|
|
802
|
-
...t6
|
|
803
|
-
} = getProps(props, labelProps);
|
|
804
|
-
children = t42, style = t5, rest = t6, T0 = Text, t0 = "label", t1 = 1, t2 = disabled, t3 = clsx(labelClassName, "sui-display-flex sui-align-items-center sui-gap2", error && "sui-error", className), $[0] = props, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t0, $[6] = t1, $[7] = t2, $[8] = t3;
|
|
805
|
-
} else
|
|
806
|
-
T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6], t2 = $[7], t3 = $[8];
|
|
807
|
-
let t4;
|
|
808
|
-
return $[9] !== T0 || $[10] !== children || $[11] !== rest || $[12] !== style || $[13] !== t0 || $[14] !== t1 || $[15] !== t2 || $[16] !== t3 ? (t4 = /* @__PURE__ */ jsx(T0, { as: t0, size: t1, muted: t2, className: t3, style, "data-ui": "Label", ...rest, children }), $[9] = T0, $[10] = children, $[11] = rest, $[12] = style, $[13] = t0, $[14] = t1, $[15] = t2, $[16] = t3, $[17] = t4) : t4 = $[17], t4;
|
|
809
|
-
}
|
|
810
|
-
const visuallyHiddenProps = {
|
|
811
|
-
as: {
|
|
812
|
-
type: "string"
|
|
813
|
-
},
|
|
814
|
-
visibleOnFocus: {
|
|
815
|
-
type: "boolean",
|
|
816
|
-
className: "sui-visually-hidden-visible"
|
|
817
|
-
}
|
|
818
|
-
}, visuallyHiddenClassName = suffixClassName("sui-VisuallyHidden");
|
|
819
|
-
function VisuallyHidden(props) {
|
|
820
|
-
const $ = c(12);
|
|
821
|
-
let T0, children, rest, style, t0;
|
|
822
|
-
if ($[0] !== props) {
|
|
823
|
-
const {
|
|
824
|
-
as,
|
|
825
|
-
children: t12,
|
|
826
|
-
className,
|
|
827
|
-
style: t2,
|
|
828
|
-
...t3
|
|
829
|
-
} = getProps(props, visuallyHiddenProps);
|
|
830
|
-
children = t12, style = t2, rest = t3, T0 = as || "span", t0 = clsx(visuallyHiddenClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t0;
|
|
831
|
-
} else
|
|
832
|
-
T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5];
|
|
833
|
-
let t1;
|
|
834
|
-
return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t0 ? (t1 = /* @__PURE__ */ jsx(T0, { className: t0, style, "data-ui": "VisuallyHidden", ...rest, children }), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t0, $[11] = t1) : t1 = $[11], t1;
|
|
1047
|
+
let $ = c(12), T0, children, rest, style, t1;
|
|
1048
|
+
if ($[0] !== t0) {
|
|
1049
|
+
let { density: t2, tone: t3, ...props } = t0, { as, children: t4, className, style: t5, ...t6 } = getProps({
|
|
1050
|
+
density: t2 === void 0 ? "regular" : t2,
|
|
1051
|
+
tone: t3 === void 0 ? "default" : t3,
|
|
1052
|
+
...props
|
|
1053
|
+
}, cardProps);
|
|
1054
|
+
children = t4, style = t5, rest = t6, T0 = as || "div", t1 = clsx(cardClassName, "sui-border", className), $[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1;
|
|
1055
|
+
} else T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5];
|
|
1056
|
+
let t2;
|
|
1057
|
+
return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, {
|
|
1058
|
+
className: t1,
|
|
1059
|
+
style,
|
|
1060
|
+
"data-ui": "Card",
|
|
1061
|
+
...rest,
|
|
1062
|
+
children
|
|
1063
|
+
}), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
|
|
835
1064
|
}
|
|
836
1065
|
const checkboxProps = {
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
type: "boolean"
|
|
842
|
-
},
|
|
843
|
-
label: {
|
|
844
|
-
type: "string"
|
|
845
|
-
},
|
|
846
|
-
...marginProps
|
|
847
|
-
}, checkboxClassName = suffixClassName("sui-Checkbox"), checkboxInputClassName = suffixClassName("sui-CheckboxInput"), checkboxMarkClassName = suffixClassName("sui-CheckboxMark");
|
|
1066
|
+
hasError: { type: "boolean" },
|
|
1067
|
+
indeterminate: { type: "boolean" }
|
|
1068
|
+
}, checkboxClassName = suffixClassName("sui-Checkbox"), checkboxInputClassName = suffixClassName("sui-CheckboxInput");
|
|
1069
|
+
/** @beta */
|
|
848
1070
|
function Checkbox(props) {
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
1071
|
+
let $ = c(12), inputRef = useRef(null), { className, style, hasError, indeterminate, ...rest } = getProps(props, checkboxProps);
|
|
1072
|
+
useEffect(() => {
|
|
1073
|
+
inputRef.current && (inputRef.current.indeterminate = indeterminate);
|
|
1074
|
+
}, [indeterminate, inputRef]);
|
|
1075
|
+
let T0 = Box, t1 = clsx(checkboxClassName, className), t2;
|
|
1076
|
+
$[0] === indeterminate ? t2 = $[1] : (t2 = jsx(indeterminate ? RemoveIcon : CheckmarkIcon, { "aria-hidden": "true" }), $[0] = indeterminate, $[1] = t2);
|
|
1077
|
+
let t3 = hasError || void 0, t4;
|
|
1078
|
+
$[2] !== inputRef || $[3] !== rest || $[4] !== t3 ? (t4 = /* @__PURE__ */ jsx("input", {
|
|
1079
|
+
type: "checkbox",
|
|
1080
|
+
className: checkboxInputClassName,
|
|
1081
|
+
ref: inputRef,
|
|
1082
|
+
"aria-invalid": t3,
|
|
1083
|
+
...rest
|
|
1084
|
+
}), $[2] = inputRef, $[3] = rest, $[4] = t3, $[5] = t4) : t4 = $[5];
|
|
1085
|
+
let t5;
|
|
1086
|
+
return $[6] !== T0 || $[7] !== style || $[8] !== t1 || $[9] !== t2 || $[10] !== t4 ? (t5 = /* @__PURE__ */ jsxs(T0, {
|
|
1087
|
+
as: "span",
|
|
1088
|
+
className: t1,
|
|
1089
|
+
style,
|
|
1090
|
+
"data-ui": "Checkbox",
|
|
1091
|
+
position: "relative",
|
|
1092
|
+
radius: 2,
|
|
1093
|
+
width: "17px",
|
|
1094
|
+
height: "17px",
|
|
1095
|
+
children: [t2, t4]
|
|
1096
|
+
}), $[6] = T0, $[7] = style, $[8] = t1, $[9] = t2, $[10] = t4, $[11] = t5) : t5 = $[11], t5;
|
|
1097
|
+
}
|
|
1098
|
+
const codeProps = {
|
|
1099
|
+
inline: { type: "boolean" },
|
|
1100
|
+
language: { type: "string" },
|
|
1101
|
+
size: {
|
|
1102
|
+
type: "union",
|
|
1103
|
+
className: "text-code",
|
|
1104
|
+
values: [
|
|
1105
|
+
0,
|
|
1106
|
+
1,
|
|
1107
|
+
2,
|
|
1108
|
+
3,
|
|
1109
|
+
4
|
|
1110
|
+
]
|
|
1111
|
+
},
|
|
1112
|
+
muted: typographyProps.muted,
|
|
1113
|
+
trim: typographyProps.trim,
|
|
1114
|
+
...marginProps
|
|
1115
|
+
}, LazyRefractor = lazy(() => import("./LazyRefractor-CQ22IeXB.js")), codeClassName = suffixClassName("sui-Code");
|
|
1116
|
+
/** @public */
|
|
889
1117
|
function Code(t0) {
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
}
|
|
931
|
-
const CONTAINER_SIZE = [0, 1, 2, 3, 4, 5], containerProps = {
|
|
932
|
-
as: {
|
|
933
|
-
type: "string"
|
|
934
|
-
},
|
|
935
|
-
size: {
|
|
936
|
-
type: "union",
|
|
937
|
-
className: "container",
|
|
938
|
-
values: CONTAINER_SIZE
|
|
939
|
-
},
|
|
940
|
-
...layoutProps
|
|
1118
|
+
let $ = c(16), T0, children, language, rest, style, t1;
|
|
1119
|
+
if ($[0] !== t0) {
|
|
1120
|
+
let { size: t2, ...props } = t0, { children: t3, className, inline, language: t4, style: t5, ...t6 } = getProps({
|
|
1121
|
+
size: t2 === void 0 ? 2 : t2,
|
|
1122
|
+
...props
|
|
1123
|
+
}, codeProps);
|
|
1124
|
+
children = t3, language = t4, style = t5, rest = t6, T0 = inline ? "span" : "pre", t1 = clsx(codeClassName, className), $[0] = t0, $[1] = T0, $[2] = children, $[3] = language, $[4] = rest, $[5] = style, $[6] = t1;
|
|
1125
|
+
} else T0 = $[1], children = $[2], language = $[3], rest = $[4], style = $[5], t1 = $[6];
|
|
1126
|
+
let t2;
|
|
1127
|
+
$[7] !== children || $[8] !== language ? (t2 = language ? /* @__PURE__ */ jsx(Suspense, {
|
|
1128
|
+
fallback: /* @__PURE__ */ jsx("code", { children }),
|
|
1129
|
+
children: /* @__PURE__ */ jsx(LazyRefractor, {
|
|
1130
|
+
language,
|
|
1131
|
+
value: children
|
|
1132
|
+
})
|
|
1133
|
+
}) : /* @__PURE__ */ jsx("code", { children }), $[7] = children, $[8] = language, $[9] = t2) : t2 = $[9];
|
|
1134
|
+
let t3;
|
|
1135
|
+
return $[10] !== T0 || $[11] !== rest || $[12] !== style || $[13] !== t1 || $[14] !== t2 ? (t3 = /* @__PURE__ */ jsx(T0, {
|
|
1136
|
+
className: t1,
|
|
1137
|
+
style,
|
|
1138
|
+
"data-ui": "Code",
|
|
1139
|
+
...rest,
|
|
1140
|
+
children: t2
|
|
1141
|
+
}), $[10] = T0, $[11] = rest, $[12] = style, $[13] = t1, $[14] = t2, $[15] = t3) : t3 = $[15], t3;
|
|
1142
|
+
}
|
|
1143
|
+
const CONTAINER_SIZE = [
|
|
1144
|
+
0,
|
|
1145
|
+
1,
|
|
1146
|
+
2,
|
|
1147
|
+
3,
|
|
1148
|
+
4,
|
|
1149
|
+
5
|
|
1150
|
+
], containerProps = {
|
|
1151
|
+
as: { type: "string" },
|
|
1152
|
+
size: {
|
|
1153
|
+
type: "union",
|
|
1154
|
+
className: "container",
|
|
1155
|
+
values: CONTAINER_SIZE
|
|
1156
|
+
},
|
|
1157
|
+
...layoutProps
|
|
941
1158
|
}, containerClassName = suffixClassName("sui-Container");
|
|
1159
|
+
/** @public */
|
|
942
1160
|
function Container(t0) {
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
values: EYEBROW_SIZE
|
|
991
|
-
},
|
|
992
|
-
...typographyProps
|
|
993
|
-
}, eyebrowClassName = suffixClassName("sui-Eyebrow");
|
|
994
|
-
function Eyebrow(t0) {
|
|
995
|
-
const $ = c(15);
|
|
996
|
-
let T0, children, rest, style, t1, t2;
|
|
997
|
-
if ($[0] !== t0) {
|
|
998
|
-
t2 = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
999
|
-
bb0: {
|
|
1000
|
-
const {
|
|
1001
|
-
size: t32,
|
|
1002
|
-
weight: t4,
|
|
1003
|
-
...props
|
|
1004
|
-
} = t0, size = t32 === void 0 ? 2 : t32, weight = t4 === void 0 ? "semibold" : t4, {
|
|
1005
|
-
as,
|
|
1006
|
-
children: t5,
|
|
1007
|
-
className,
|
|
1008
|
-
style: t6,
|
|
1009
|
-
...t7
|
|
1010
|
-
} = getProps({
|
|
1011
|
-
size,
|
|
1012
|
-
weight,
|
|
1013
|
-
...props
|
|
1014
|
-
}, eyebrowProps);
|
|
1015
|
-
children = t5, style = t6, rest = t7;
|
|
1016
|
-
const Component = as || "span";
|
|
1017
|
-
if (props.truncate && props.trim) {
|
|
1018
|
-
const t8 = clsx(eyebrowClassName, className?.replace("sui-line-clamp", "").replace("sui-text-overflow", "")), t9 = props.truncate === 1 ? "sui-text-overflow" : "sui-line-clamp";
|
|
1019
|
-
let t10;
|
|
1020
|
-
$[7] !== t9 ? (t10 = clsx("sui-overflow-hidden", t9), $[7] = t9, $[8] = t10) : t10 = $[8], t2 = /* @__PURE__ */ jsx(Component, { className: t8, style, "data-ui": "Eyebrow", ...rest, children: /* @__PURE__ */ jsx("span", { className: t10, children }) });
|
|
1021
|
-
break bb0;
|
|
1022
|
-
}
|
|
1023
|
-
T0 = Component, t1 = clsx(eyebrowClassName, props.truncate && "sui-overflow-hidden", className);
|
|
1024
|
-
}
|
|
1025
|
-
$[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1, $[6] = t2;
|
|
1026
|
-
} else
|
|
1027
|
-
T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5], t2 = $[6];
|
|
1028
|
-
if (t2 !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
|
|
1029
|
-
return t2;
|
|
1030
|
-
let t3;
|
|
1031
|
-
return $[9] !== T0 || $[10] !== children || $[11] !== rest || $[12] !== style || $[13] !== t1 ? (t3 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Eyebrow", ...rest, children }), $[9] = T0, $[10] = children, $[11] = rest, $[12] = style, $[13] = t1, $[14] = t3) : t3 = $[14], t3;
|
|
1032
|
-
}
|
|
1033
|
-
const GRID_AUTO_FLOW = ["row", "column", "row dense", "column dense", "dense"], gridParentProps = {
|
|
1034
|
-
gridAutoFlow: {
|
|
1035
|
-
type: "union",
|
|
1036
|
-
className: "grid-auto-flow",
|
|
1037
|
-
values: GRID_AUTO_FLOW
|
|
1038
|
-
},
|
|
1039
|
-
gridAutoColumns: {
|
|
1040
|
-
type: "string",
|
|
1041
|
-
className: "grid-auto-columns",
|
|
1042
|
-
variable: "--grid-auto-columns"
|
|
1043
|
-
},
|
|
1044
|
-
gridAutoRows: {
|
|
1045
|
-
type: "string",
|
|
1046
|
-
className: "grid-auto-rows",
|
|
1047
|
-
variable: "--grid-auto-rows"
|
|
1048
|
-
},
|
|
1049
|
-
gridTemplateColumns: {
|
|
1050
|
-
type: "string",
|
|
1051
|
-
className: "grid-template-columns",
|
|
1052
|
-
variable: "--grid-template-columns"
|
|
1053
|
-
},
|
|
1054
|
-
gridTemplateRows: {
|
|
1055
|
-
type: "string",
|
|
1056
|
-
className: "grid-template-rows",
|
|
1057
|
-
variable: "--grid-template-rows"
|
|
1058
|
-
}
|
|
1059
|
-
}, gridProps = {
|
|
1060
|
-
as: {
|
|
1061
|
-
type: "string"
|
|
1062
|
-
},
|
|
1063
|
-
display: {
|
|
1064
|
-
type: "union",
|
|
1065
|
-
className: "display",
|
|
1066
|
-
values: DISPLAY_GRID
|
|
1067
|
-
},
|
|
1068
|
-
...gridParentProps,
|
|
1069
|
-
...gapProps,
|
|
1070
|
-
...layoutProps
|
|
1071
|
-
}, gridClassName = suffixClassName("sui-Grid");
|
|
1072
|
-
function Grid(t0) {
|
|
1073
|
-
const $ = c(12);
|
|
1074
|
-
let T0, children, rest, style, t1;
|
|
1075
|
-
if ($[0] !== t0) {
|
|
1076
|
-
const {
|
|
1077
|
-
display: t22,
|
|
1078
|
-
...props
|
|
1079
|
-
} = t0, display = t22 === void 0 ? "grid" : t22, {
|
|
1080
|
-
as,
|
|
1081
|
-
children: t3,
|
|
1082
|
-
className,
|
|
1083
|
-
style: t4,
|
|
1084
|
-
...t5
|
|
1085
|
-
} = getProps({
|
|
1086
|
-
display,
|
|
1087
|
-
...props
|
|
1088
|
-
}, gridProps);
|
|
1089
|
-
children = t3, style = t4, rest = t5, T0 = as || "div", t1 = clsx(gridClassName, className), $[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1;
|
|
1090
|
-
} else
|
|
1091
|
-
T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5];
|
|
1092
|
-
let t2;
|
|
1093
|
-
return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Grid", ...rest, children }), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
|
|
1094
|
-
}
|
|
1095
|
-
const hStackProps = {
|
|
1096
|
-
as: {
|
|
1097
|
-
type: "string"
|
|
1098
|
-
},
|
|
1099
|
-
gap: gapProps.gap
|
|
1100
|
-
}, hStackClassName = suffixClassName("sui-HStack");
|
|
1101
|
-
function HStack(props) {
|
|
1102
|
-
const $ = c(14);
|
|
1103
|
-
let T0, children, rest, style, t0, t1;
|
|
1104
|
-
if ($[0] !== props) {
|
|
1105
|
-
const {
|
|
1106
|
-
as,
|
|
1107
|
-
children: t22,
|
|
1108
|
-
className,
|
|
1109
|
-
style: t3,
|
|
1110
|
-
...t4
|
|
1111
|
-
} = getProps(props, hStackProps);
|
|
1112
|
-
children = t22, style = t3, rest = t4;
|
|
1113
|
-
const Component = as || "div";
|
|
1114
|
-
T0 = Flex, t0 = Component, t1 = clsx(hStackClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t0, $[6] = t1;
|
|
1115
|
-
} else
|
|
1116
|
-
T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6];
|
|
1117
|
-
let t2;
|
|
1118
|
-
return $[7] !== T0 || $[8] !== children || $[9] !== rest || $[10] !== style || $[11] !== t0 || $[12] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { as: t0, className: t1, style, "data-ui": "HStack", display: "inline-flex", alignItems: "center", flexWrap: "wrap", ...rest, children }), $[7] = T0, $[8] = children, $[9] = rest, $[10] = style, $[11] = t0, $[12] = t1, $[13] = t2) : t2 = $[13], t2;
|
|
1119
|
-
}
|
|
1120
|
-
const HEADING_TAG = ["h1", "h2", "h3", "h4", "h5", "h6"], HEADING_SIZE = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], headingProps = {
|
|
1121
|
-
as: {
|
|
1122
|
-
type: "union",
|
|
1123
|
-
values: HEADING_TAG
|
|
1124
|
-
},
|
|
1125
|
-
size: {
|
|
1126
|
-
type: "union",
|
|
1127
|
-
className: "text-heading",
|
|
1128
|
-
values: HEADING_SIZE
|
|
1129
|
-
},
|
|
1130
|
-
...typographyProps
|
|
1161
|
+
let $ = c(12), T0, children, rest, style, t1;
|
|
1162
|
+
if ($[0] !== t0) {
|
|
1163
|
+
let { marginX: t2, size: t3, ...props } = t0, { as, children: t4, className, style: t5, ...t6 } = getProps({
|
|
1164
|
+
marginX: t2 === void 0 ? "auto" : t2,
|
|
1165
|
+
size: t3 === void 0 ? 2 : t3,
|
|
1166
|
+
...props
|
|
1167
|
+
}, containerProps);
|
|
1168
|
+
children = t4, style = t5, rest = t6, T0 = as || "div", t1 = clsx(containerClassName, className), $[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1;
|
|
1169
|
+
} else T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5];
|
|
1170
|
+
let t2;
|
|
1171
|
+
return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, {
|
|
1172
|
+
className: t1,
|
|
1173
|
+
style,
|
|
1174
|
+
"data-ui": "Container",
|
|
1175
|
+
...rest,
|
|
1176
|
+
children
|
|
1177
|
+
}), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
|
|
1178
|
+
}
|
|
1179
|
+
const headingProps = {
|
|
1180
|
+
as: {
|
|
1181
|
+
type: "union",
|
|
1182
|
+
values: [
|
|
1183
|
+
"h1",
|
|
1184
|
+
"h2",
|
|
1185
|
+
"h3",
|
|
1186
|
+
"h4",
|
|
1187
|
+
"h5",
|
|
1188
|
+
"h6"
|
|
1189
|
+
]
|
|
1190
|
+
},
|
|
1191
|
+
size: {
|
|
1192
|
+
type: "union",
|
|
1193
|
+
className: "text-heading",
|
|
1194
|
+
values: [
|
|
1195
|
+
0,
|
|
1196
|
+
1,
|
|
1197
|
+
2,
|
|
1198
|
+
3,
|
|
1199
|
+
4,
|
|
1200
|
+
5
|
|
1201
|
+
]
|
|
1202
|
+
},
|
|
1203
|
+
align: typographyProps.align,
|
|
1204
|
+
trim: typographyProps.trim,
|
|
1205
|
+
truncate: typographyProps.truncate,
|
|
1206
|
+
...marginProps,
|
|
1207
|
+
...toneProps
|
|
1131
1208
|
}, headingClassName = suffixClassName("sui-Heading");
|
|
1209
|
+
/** @public */
|
|
1132
1210
|
function Heading(t0) {
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1211
|
+
let $ = c(15), T0, children, rest, style, t1, t2;
|
|
1212
|
+
if ($[0] !== t0) {
|
|
1213
|
+
t2 = Symbol.for("react.early_return_sentinel");
|
|
1214
|
+
bb0: {
|
|
1215
|
+
let { size: t3, ...props } = t0, { as, children: t4, className, style: t5, ...t6 } = getProps({
|
|
1216
|
+
size: t3 === void 0 ? 2 : t3,
|
|
1217
|
+
...props
|
|
1218
|
+
}, headingProps);
|
|
1219
|
+
children = t4, style = t5, rest = t6;
|
|
1220
|
+
let Component = as || "h2";
|
|
1221
|
+
if (props.truncate && props.trim) {
|
|
1222
|
+
let t7 = clsx(headingClassName, className?.replace("sui-line-clamp", "").replace("sui-text-overflow", "")), t8 = props.truncate === 1 ? "sui-text-overflow" : "sui-line-clamp", t9;
|
|
1223
|
+
$[7] === t8 ? t9 = $[8] : (t9 = clsx("sui-overflow-hidden", "sui-weight-bold", t8), $[7] = t8, $[8] = t9), t2 = /* @__PURE__ */ jsx(Component, {
|
|
1224
|
+
className: t7,
|
|
1225
|
+
style,
|
|
1226
|
+
"data-ui": "Heading",
|
|
1227
|
+
...rest,
|
|
1228
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1229
|
+
className: t9,
|
|
1230
|
+
children
|
|
1231
|
+
})
|
|
1232
|
+
});
|
|
1233
|
+
break bb0;
|
|
1234
|
+
}
|
|
1235
|
+
T0 = Component, t1 = clsx(headingClassName, props.truncate && "sui-overflow-hidden", "sui-weight-bold", className);
|
|
1236
|
+
}
|
|
1237
|
+
$[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1, $[6] = t2;
|
|
1238
|
+
} else T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5], t2 = $[6];
|
|
1239
|
+
if (t2 !== Symbol.for("react.early_return_sentinel")) return t2;
|
|
1240
|
+
let t3;
|
|
1241
|
+
return $[9] !== T0 || $[10] !== children || $[11] !== rest || $[12] !== style || $[13] !== t1 ? (t3 = /* @__PURE__ */ jsx(T0, {
|
|
1242
|
+
className: t1,
|
|
1243
|
+
style,
|
|
1244
|
+
"data-ui": "Heading",
|
|
1245
|
+
...rest,
|
|
1246
|
+
children
|
|
1247
|
+
}), $[9] = T0, $[10] = children, $[11] = rest, $[12] = style, $[13] = t1, $[14] = t3) : t3 = $[14], t3;
|
|
1170
1248
|
}
|
|
1171
1249
|
const iconButtonProps = {
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
as: buttonProps.as,
|
|
1176
|
-
icon: {
|
|
1177
|
-
type: "string"
|
|
1178
|
-
}
|
|
1250
|
+
"aria-label": { type: "string" },
|
|
1251
|
+
as: buttonProps.as,
|
|
1252
|
+
icon: { type: "string" }
|
|
1179
1253
|
}, iconButtonClassName = suffixClassName("sui-IconButton");
|
|
1254
|
+
/** @public */
|
|
1180
1255
|
function IconButton(props) {
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1256
|
+
let $ = c(16), IconProp, T0, rest, style, t0, t1;
|
|
1257
|
+
if ($[0] !== props) {
|
|
1258
|
+
let { as, className, style: t2, icon: t3, ...t4 } = getProps(props, iconButtonProps);
|
|
1259
|
+
style = t2, IconProp = t3, rest = t4;
|
|
1260
|
+
let Component = as || "button";
|
|
1261
|
+
T0 = Button, t0 = Component, t1 = clsx(iconButtonClassName, className), $[0] = props, $[1] = IconProp, $[2] = T0, $[3] = rest, $[4] = style, $[5] = t0, $[6] = t1;
|
|
1262
|
+
} else IconProp = $[1], T0 = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6];
|
|
1263
|
+
let t2;
|
|
1264
|
+
$[7] === IconProp ? t2 = $[8] : (t2 = /* @__PURE__ */ jsx(Icon, {
|
|
1265
|
+
icon: IconProp,
|
|
1266
|
+
margin: -2,
|
|
1267
|
+
size: 1
|
|
1268
|
+
}), $[7] = IconProp, $[8] = t2);
|
|
1269
|
+
let t3;
|
|
1270
|
+
return $[9] !== T0 || $[10] !== rest || $[11] !== style || $[12] !== t0 || $[13] !== t1 || $[14] !== t2 ? (t3 = /* @__PURE__ */ jsx(T0, {
|
|
1271
|
+
as: t0,
|
|
1272
|
+
className: t1,
|
|
1273
|
+
style,
|
|
1274
|
+
"data-ui": "IconButton",
|
|
1275
|
+
...rest,
|
|
1276
|
+
children: t2
|
|
1277
|
+
}), $[9] = T0, $[10] = rest, $[11] = style, $[12] = t0, $[13] = t1, $[14] = t2, $[15] = t3) : t3 = $[15], t3;
|
|
1278
|
+
}
|
|
1279
|
+
const dialogProps = {
|
|
1280
|
+
header: { type: "string" },
|
|
1281
|
+
open: { type: "boolean" },
|
|
1282
|
+
size: {
|
|
1283
|
+
type: "union",
|
|
1284
|
+
className: "container",
|
|
1285
|
+
values: CONTAINER_SIZE
|
|
1286
|
+
},
|
|
1287
|
+
topAnchor: {
|
|
1288
|
+
type: "string",
|
|
1289
|
+
className: "top-anchor",
|
|
1290
|
+
variable: "--top-anchor"
|
|
1291
|
+
}
|
|
1292
|
+
}, dialogClassName = suffixClassName("sui-Dialog"), dialogContentClassName = suffixClassName("sui-DialogContent"), dialogFooterClassName = suffixClassName("sui-DialogFooter");
|
|
1293
|
+
function DialogRoot(t0) {
|
|
1294
|
+
let $ = c(17), { open: t1, size: t2, ...props } = t0, open = t1 !== void 0 && t1, { children, className, style, header, onClose, ...rest } = getProps({
|
|
1295
|
+
size: t2 === void 0 ? 0 : t2,
|
|
1296
|
+
...props
|
|
1297
|
+
}, dialogProps), dialogRef = useRef(null), headerId = useId(), dialogClasses = clsx(dialogClassName, `${props.topAnchor ? "sui-mx-auto" : "sui-m-auto"} sui-radius5 sui-shadow3 sui-p4 sui-flex-direction-column sui-gap4 sui-overflow-y-auto`), t3, t4;
|
|
1298
|
+
$[0] === open ? (t3 = $[1], t4 = $[2]) : (t3 = () => {
|
|
1299
|
+
let dialogElement = dialogRef.current;
|
|
1300
|
+
if (dialogElement) return open ? dialogElement.open || dialogElement.showModal() : dialogElement.open && dialogElement.close(), () => {
|
|
1301
|
+
dialogElement.close();
|
|
1302
|
+
};
|
|
1303
|
+
}, t4 = [open], $[0] = open, $[1] = t3, $[2] = t4), useEffect(t3, t4);
|
|
1304
|
+
let t6 = header ? headerId : void 0, t7 = clsx(dialogClasses, className), t8;
|
|
1305
|
+
$[3] !== header || $[4] !== headerId ? (t8 = header ? /* @__PURE__ */ jsx(Heading, {
|
|
1306
|
+
as: "h2",
|
|
1307
|
+
trim: !0,
|
|
1308
|
+
size: 1,
|
|
1309
|
+
id: headerId,
|
|
1310
|
+
children: header
|
|
1311
|
+
}) : /* @__PURE__ */ jsx("div", {}), $[3] = header, $[4] = headerId, $[5] = t8) : t8 = $[5];
|
|
1312
|
+
let t9;
|
|
1313
|
+
$[6] === Symbol.for("react.memo_cache_sentinel") ? (t9 = /* @__PURE__ */ jsx(IconButton, {
|
|
1314
|
+
"aria-label": "Close",
|
|
1315
|
+
level: "tertiary",
|
|
1316
|
+
icon: CloseIcon,
|
|
1317
|
+
onClick: () => dialogRef.current?.close()
|
|
1318
|
+
}), $[6] = t9) : t9 = $[6];
|
|
1319
|
+
let t10;
|
|
1320
|
+
$[7] === t8 ? t10 = $[8] : (t10 = /* @__PURE__ */ jsxs(Flex, {
|
|
1321
|
+
flexShrink: 0,
|
|
1322
|
+
justifyContent: "space-between",
|
|
1323
|
+
alignItems: "center",
|
|
1324
|
+
children: [t8, t9]
|
|
1325
|
+
}), $[7] = t8, $[8] = t10);
|
|
1326
|
+
let t11;
|
|
1327
|
+
return $[9] !== children || $[10] !== onClose || $[11] !== rest || $[12] !== style || $[13] !== t10 || $[14] !== t6 || $[15] !== t7 ? (t11 = /* @__PURE__ */ jsxs("dialog", {
|
|
1328
|
+
...rest,
|
|
1329
|
+
ref: dialogRef,
|
|
1330
|
+
closedby: "any",
|
|
1331
|
+
"aria-labelledby": t6,
|
|
1332
|
+
onClose,
|
|
1333
|
+
className: t7,
|
|
1334
|
+
style,
|
|
1335
|
+
"data-ui": "Dialog",
|
|
1336
|
+
children: [t10, children]
|
|
1337
|
+
}), $[9] = children, $[10] = onClose, $[11] = rest, $[12] = style, $[13] = t10, $[14] = t6, $[15] = t7, $[16] = t11) : t11 = $[16], t11;
|
|
1338
|
+
}
|
|
1339
|
+
function DialogContent(props) {
|
|
1340
|
+
let $ = c(12), T0, children, style, t0, t1;
|
|
1341
|
+
if ($[0] !== props) {
|
|
1342
|
+
let { children: t2, className, style: t3, ...rest } = getProps(props, {});
|
|
1343
|
+
children = t2, style = t3, T0 = Box, t0 = rest, t1 = clsx(dialogContentClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = style, $[4] = t0, $[5] = t1;
|
|
1344
|
+
} else T0 = $[1], children = $[2], style = $[3], t0 = $[4], t1 = $[5];
|
|
1345
|
+
let t2;
|
|
1346
|
+
return $[6] !== T0 || $[7] !== children || $[8] !== style || $[9] !== t0 || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, {
|
|
1347
|
+
...t0,
|
|
1348
|
+
className: t1,
|
|
1349
|
+
style,
|
|
1350
|
+
"data-ui": "DialogContent",
|
|
1351
|
+
flexGrow: 1,
|
|
1352
|
+
overflowY: "auto",
|
|
1353
|
+
children
|
|
1354
|
+
}), $[6] = T0, $[7] = children, $[8] = style, $[9] = t0, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
|
|
1355
|
+
}
|
|
1356
|
+
function DialogFooter(props) {
|
|
1357
|
+
let $ = c(12), T0, children, style, t0, t1;
|
|
1358
|
+
if ($[0] !== props) {
|
|
1359
|
+
let { children: t2, className, style: t3, ...rest } = getProps(props, {});
|
|
1360
|
+
children = t2, style = t3, T0 = Box, t0 = rest, t1 = clsx(dialogFooterClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = style, $[4] = t0, $[5] = t1;
|
|
1361
|
+
} else T0 = $[1], children = $[2], style = $[3], t0 = $[4], t1 = $[5];
|
|
1362
|
+
let t2;
|
|
1363
|
+
return $[6] !== T0 || $[7] !== children || $[8] !== style || $[9] !== t0 || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, {
|
|
1364
|
+
...t0,
|
|
1365
|
+
className: t1,
|
|
1366
|
+
style,
|
|
1367
|
+
"data-ui": "DialogFooter",
|
|
1368
|
+
flexShrink: 0,
|
|
1369
|
+
children
|
|
1370
|
+
}), $[6] = T0, $[7] = children, $[8] = style, $[9] = t0, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
|
|
1371
|
+
}
|
|
1372
|
+
DialogRoot.displayName = "Dialog";
|
|
1373
|
+
/**
|
|
1374
|
+
* @beta
|
|
1375
|
+
*
|
|
1376
|
+
* Renders a modal dialog element — should not be used for nonmodal dialogs.
|
|
1377
|
+
* Modal dialogs make their containing documents inert, and render on the topmost
|
|
1378
|
+
* layer within that containing document; they must be dimissed before the containing
|
|
1379
|
+
* document and its contents become unblocked. They also trap focus within the bounds
|
|
1380
|
+
* of the dialog element and its descendants.
|
|
1381
|
+
*
|
|
1382
|
+
* For more on dialogs and modality, refer to the HTML specification for the dialog element:
|
|
1383
|
+
* https://html.spec.whatwg.org/dev/interactive-elements.html#the-dialog-element
|
|
1384
|
+
*/
|
|
1385
|
+
const Dialog = DialogRoot;
|
|
1386
|
+
DialogRoot.Content = DialogContent, DialogRoot.Footer = DialogFooter;
|
|
1387
|
+
const dividerProps = { ...marginProps }, dividerClassName = suffixClassName("sui-Divider");
|
|
1388
|
+
/** @public */
|
|
1389
|
+
function Divider(props) {
|
|
1390
|
+
let $ = c(8), rest, style, t0;
|
|
1391
|
+
if ($[0] !== props) {
|
|
1392
|
+
let { className, style: t1, ...t2 } = getProps(props, dividerProps);
|
|
1393
|
+
style = t1, rest = t2, t0 = clsx(dividerClassName, "sui-border-none sui-border-top", className), $[0] = props, $[1] = rest, $[2] = style, $[3] = t0;
|
|
1394
|
+
} else rest = $[1], style = $[2], t0 = $[3];
|
|
1395
|
+
let t1;
|
|
1396
|
+
return $[4] !== rest || $[5] !== style || $[6] !== t0 ? (t1 = /* @__PURE__ */ jsx("hr", {
|
|
1397
|
+
className: t0,
|
|
1398
|
+
style,
|
|
1399
|
+
"data-ui": "Divider",
|
|
1400
|
+
...rest
|
|
1401
|
+
}), $[4] = rest, $[5] = style, $[6] = t0, $[7] = t1) : t1 = $[7], t1;
|
|
1402
|
+
}
|
|
1403
|
+
const eyebrowProps = {
|
|
1404
|
+
as: { type: "string" },
|
|
1405
|
+
size: {
|
|
1406
|
+
type: "union",
|
|
1407
|
+
className: "text-eyebrow",
|
|
1408
|
+
values: [
|
|
1409
|
+
0,
|
|
1410
|
+
1,
|
|
1411
|
+
2,
|
|
1412
|
+
3,
|
|
1413
|
+
4,
|
|
1414
|
+
5
|
|
1415
|
+
]
|
|
1416
|
+
},
|
|
1417
|
+
...typographyProps
|
|
1418
|
+
}, eyebrowClassName = suffixClassName("sui-Eyebrow");
|
|
1419
|
+
/** @public */
|
|
1420
|
+
function Eyebrow(t0) {
|
|
1421
|
+
let $ = c(15), T0, children, rest, style, t1, t2;
|
|
1422
|
+
if ($[0] !== t0) {
|
|
1423
|
+
t2 = Symbol.for("react.early_return_sentinel");
|
|
1424
|
+
bb0: {
|
|
1425
|
+
let { size: t3, weight: t4, ...props } = t0, { as, children: t5, className, style: t6, ...t7 } = getProps({
|
|
1426
|
+
size: t3 === void 0 ? 2 : t3,
|
|
1427
|
+
weight: t4 === void 0 ? "semibold" : t4,
|
|
1428
|
+
...props
|
|
1429
|
+
}, eyebrowProps);
|
|
1430
|
+
children = t5, style = t6, rest = t7;
|
|
1431
|
+
let Component = as || "span";
|
|
1432
|
+
if (props.truncate && props.trim) {
|
|
1433
|
+
let t8 = clsx(eyebrowClassName, className?.replace("sui-line-clamp", "").replace("sui-text-overflow", "")), t9 = props.truncate === 1 ? "sui-text-overflow" : "sui-line-clamp", t10;
|
|
1434
|
+
$[7] === t9 ? t10 = $[8] : (t10 = clsx("sui-overflow-hidden", t9), $[7] = t9, $[8] = t10), t2 = /* @__PURE__ */ jsx(Component, {
|
|
1435
|
+
className: t8,
|
|
1436
|
+
style,
|
|
1437
|
+
"data-ui": "Eyebrow",
|
|
1438
|
+
...rest,
|
|
1439
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1440
|
+
className: t10,
|
|
1441
|
+
children
|
|
1442
|
+
})
|
|
1443
|
+
});
|
|
1444
|
+
break bb0;
|
|
1445
|
+
}
|
|
1446
|
+
T0 = Component, t1 = clsx(eyebrowClassName, props.truncate && "sui-overflow-hidden", className);
|
|
1447
|
+
}
|
|
1448
|
+
$[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1, $[6] = t2;
|
|
1449
|
+
} else T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5], t2 = $[6];
|
|
1450
|
+
if (t2 !== Symbol.for("react.early_return_sentinel")) return t2;
|
|
1451
|
+
let t3;
|
|
1452
|
+
return $[9] !== T0 || $[10] !== children || $[11] !== rest || $[12] !== style || $[13] !== t1 ? (t3 = /* @__PURE__ */ jsx(T0, {
|
|
1453
|
+
className: t1,
|
|
1454
|
+
style,
|
|
1455
|
+
"data-ui": "Eyebrow",
|
|
1456
|
+
...rest,
|
|
1457
|
+
children
|
|
1458
|
+
}), $[9] = T0, $[10] = children, $[11] = rest, $[12] = style, $[13] = t1, $[14] = t3) : t3 = $[14], t3;
|
|
1459
|
+
}
|
|
1460
|
+
const gridProps = {
|
|
1461
|
+
as: { type: "string" },
|
|
1462
|
+
display: {
|
|
1463
|
+
type: "union",
|
|
1464
|
+
className: "display",
|
|
1465
|
+
values: DISPLAY_GRID
|
|
1466
|
+
},
|
|
1467
|
+
alignItems: flexParentProps.alignItems,
|
|
1468
|
+
justifyContent: flexParentProps.justifyContent,
|
|
1469
|
+
gridAutoFlow: {
|
|
1470
|
+
type: "union",
|
|
1471
|
+
className: "grid-auto-flow",
|
|
1472
|
+
values: [
|
|
1473
|
+
"row",
|
|
1474
|
+
"column",
|
|
1475
|
+
"row dense",
|
|
1476
|
+
"column dense",
|
|
1477
|
+
"dense"
|
|
1478
|
+
]
|
|
1479
|
+
},
|
|
1480
|
+
gridAutoColumns: {
|
|
1481
|
+
type: "string",
|
|
1482
|
+
className: "grid-auto-columns",
|
|
1483
|
+
variable: "--grid-auto-columns"
|
|
1484
|
+
},
|
|
1485
|
+
gridAutoRows: {
|
|
1486
|
+
type: "string",
|
|
1487
|
+
className: "grid-auto-rows",
|
|
1488
|
+
variable: "--grid-auto-rows"
|
|
1489
|
+
},
|
|
1490
|
+
gridTemplateColumns: {
|
|
1491
|
+
type: "string",
|
|
1492
|
+
className: "grid-template-columns",
|
|
1493
|
+
variable: "--grid-template-columns"
|
|
1494
|
+
},
|
|
1495
|
+
gridTemplateRows: {
|
|
1496
|
+
type: "string",
|
|
1497
|
+
className: "grid-template-rows",
|
|
1498
|
+
variable: "--grid-template-rows"
|
|
1499
|
+
},
|
|
1500
|
+
...gapProps,
|
|
1501
|
+
...layoutProps
|
|
1502
|
+
}, gridClassName = suffixClassName("sui-Grid");
|
|
1503
|
+
/** @public */
|
|
1504
|
+
function Grid(t0) {
|
|
1505
|
+
let $ = c(12), T0, children, rest, style, t1;
|
|
1506
|
+
if ($[0] !== t0) {
|
|
1507
|
+
let { display: t2, ...props } = t0, { as, children: t3, className, style: t4, ...t5 } = getProps({
|
|
1508
|
+
display: t2 === void 0 ? "grid" : t2,
|
|
1509
|
+
...props
|
|
1510
|
+
}, gridProps);
|
|
1511
|
+
children = t3, style = t4, rest = t5, T0 = as || "div", t1 = clsx(gridClassName, className), $[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1;
|
|
1512
|
+
} else T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5];
|
|
1513
|
+
let t2;
|
|
1514
|
+
return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, {
|
|
1515
|
+
className: t1,
|
|
1516
|
+
style,
|
|
1517
|
+
"data-ui": "Grid",
|
|
1518
|
+
...rest,
|
|
1519
|
+
children
|
|
1520
|
+
}), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
|
|
1521
|
+
}
|
|
1522
|
+
const hStackClassName = suffixClassName("sui-HStack");
|
|
1523
|
+
/** @public */
|
|
1524
|
+
function HStack(t0) {
|
|
1525
|
+
let $ = c(8), className, props;
|
|
1526
|
+
$[0] === t0 ? (className = $[1], props = $[2]) : ({className, ...props} = t0, $[0] = t0, $[1] = className, $[2] = props);
|
|
1527
|
+
let t1;
|
|
1528
|
+
$[3] === className ? t1 = $[4] : (t1 = clsx(hStackClassName, className), $[3] = className, $[4] = t1);
|
|
1529
|
+
let t2 = props, t3;
|
|
1530
|
+
return $[5] !== t1 || $[6] !== t2 ? (t3 = /* @__PURE__ */ jsx(Flex, {
|
|
1531
|
+
className: t1,
|
|
1532
|
+
"data-ui": "HStack",
|
|
1533
|
+
display: "inline-flex",
|
|
1534
|
+
alignItems: "center",
|
|
1535
|
+
flexWrap: "wrap",
|
|
1536
|
+
...t2
|
|
1537
|
+
}), $[5] = t1, $[6] = t2, $[7] = t3) : t3 = $[7], t3;
|
|
1538
|
+
}
|
|
1539
|
+
const kbdProps = { text: { type: "string" } }, kbdClassName = suffixClassName("sui-KBD");
|
|
1540
|
+
/** @alpha */
|
|
1541
|
+
function KBD(props) {
|
|
1542
|
+
let $ = c(14), T0, rest, style, t0, t1, text;
|
|
1543
|
+
if ($[0] !== props) {
|
|
1544
|
+
let { className, style: t2, text: t3, ...t4 } = getProps(props, kbdProps);
|
|
1545
|
+
style = t2, text = t3, rest = t4;
|
|
1546
|
+
let kbdClasses = clsx(kbdClassName, "sui-p1 sui-radius2 sui-display-inline-block");
|
|
1547
|
+
T0 = Text, t0 = "kbd", t1 = clsx(kbdClasses, className), $[0] = props, $[1] = T0, $[2] = rest, $[3] = style, $[4] = t0, $[5] = t1, $[6] = text;
|
|
1548
|
+
} else T0 = $[1], rest = $[2], style = $[3], t0 = $[4], t1 = $[5], text = $[6];
|
|
1549
|
+
let t2;
|
|
1550
|
+
return $[7] !== T0 || $[8] !== rest || $[9] !== style || $[10] !== t0 || $[11] !== t1 || $[12] !== text ? (t2 = /* @__PURE__ */ jsx(T0, {
|
|
1551
|
+
as: t0,
|
|
1552
|
+
className: t1,
|
|
1553
|
+
style,
|
|
1554
|
+
"data-ui": "KBD",
|
|
1555
|
+
size: 0,
|
|
1556
|
+
weight: "semibold",
|
|
1557
|
+
muted: !0,
|
|
1558
|
+
trim: !0,
|
|
1559
|
+
...rest,
|
|
1560
|
+
children: text
|
|
1561
|
+
}), $[7] = T0, $[8] = rest, $[9] = style, $[10] = t0, $[11] = t1, $[12] = text, $[13] = t2) : t2 = $[13], t2;
|
|
1562
|
+
}
|
|
1563
|
+
const hotkeysProps = { keys: { type: "string" } }, hotkeysClassName = suffixClassName("sui-Hotkeys");
|
|
1564
|
+
/** @alpha */
|
|
1565
|
+
function Hotkeys(t0) {
|
|
1566
|
+
let $ = c(13), keys, rest, style, t1, t2;
|
|
1567
|
+
if ($[0] !== t0) {
|
|
1568
|
+
t2 = Symbol.for("react.early_return_sentinel");
|
|
1569
|
+
bb0: {
|
|
1570
|
+
let { keys: t3, ...props } = t0;
|
|
1571
|
+
keys = t3;
|
|
1572
|
+
let { className, style: t4, ...t5 } = getProps(props, hotkeysProps);
|
|
1573
|
+
if (style = t4, rest = t5, !keys || keys.length === 0) {
|
|
1574
|
+
t2 = null;
|
|
1575
|
+
break bb0;
|
|
1576
|
+
}
|
|
1577
|
+
let hotkeysClasses = clsx(hotkeysClassName, "sui-display-inline-flex");
|
|
1578
|
+
t1 = clsx(hotkeysClasses, className);
|
|
1579
|
+
}
|
|
1580
|
+
$[0] = t0, $[1] = keys, $[2] = rest, $[3] = style, $[4] = t1, $[5] = t2;
|
|
1581
|
+
} else keys = $[1], rest = $[2], style = $[3], t1 = $[4], t2 = $[5];
|
|
1582
|
+
if (t2 !== Symbol.for("react.early_return_sentinel")) return t2;
|
|
1583
|
+
let t3;
|
|
1584
|
+
$[6] === keys ? t3 = $[7] : (t3 = keys.map(_temp$1), $[6] = keys, $[7] = t3);
|
|
1585
|
+
let t4;
|
|
1586
|
+
return $[8] !== rest || $[9] !== style || $[10] !== t1 || $[11] !== t3 ? (t4 = /* @__PURE__ */ jsx("kbd", {
|
|
1587
|
+
className: t1,
|
|
1588
|
+
style,
|
|
1589
|
+
"data-ui": "Hotkeys",
|
|
1590
|
+
...rest,
|
|
1591
|
+
children: t3
|
|
1592
|
+
}), $[8] = rest, $[9] = style, $[10] = t1, $[11] = t3, $[12] = t4) : t4 = $[12], t4;
|
|
1593
|
+
}
|
|
1594
|
+
function _temp$1(key) {
|
|
1595
|
+
return /* @__PURE__ */ jsx(KBD, { text: key }, key);
|
|
1200
1596
|
}
|
|
1201
1597
|
const indicatorProps = {
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
label: {
|
|
1206
|
-
type: "string"
|
|
1207
|
-
},
|
|
1208
|
-
...toneProps
|
|
1598
|
+
as: { type: "string" },
|
|
1599
|
+
label: { type: "string" },
|
|
1600
|
+
...toneProps
|
|
1209
1601
|
}, indicatorClassName = suffixClassName("sui-Indicator");
|
|
1602
|
+
/** @beta */
|
|
1210
1603
|
function Indicator(t0) {
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
}
|
|
1237
|
-
const indicatorStackProps = {
|
|
1238
|
-
|
|
1239
|
-
type: "string"
|
|
1240
|
-
}
|
|
1241
|
-
}, indicatorStackClassName = suffixClassName("sui-IndicatorStack");
|
|
1604
|
+
let $ = c(18), T0, ariaLabel, children, rest, style, t1, t2;
|
|
1605
|
+
if ($[0] !== t0) {
|
|
1606
|
+
let { tone: t3, ...props } = t0, { as, children: t4, className, style: t5, label, ...t6 } = getProps({
|
|
1607
|
+
tone: t3 === void 0 ? "neutral" : t3,
|
|
1608
|
+
...props
|
|
1609
|
+
}, indicatorProps);
|
|
1610
|
+
children = t4, style = t5, rest = t6;
|
|
1611
|
+
let Component = as || "span";
|
|
1612
|
+
ariaLabel = label || rest["aria-label"], T0 = Box, t1 = Component, t2 = clsx(indicatorClassName, className), $[0] = t0, $[1] = T0, $[2] = ariaLabel, $[3] = children, $[4] = rest, $[5] = style, $[6] = t1, $[7] = t2;
|
|
1613
|
+
} else T0 = $[1], ariaLabel = $[2], children = $[3], rest = $[4], style = $[5], t1 = $[6], t2 = $[7];
|
|
1614
|
+
let t3 = !ariaLabel || void 0, t4 = ariaLabel ? "img" : void 0, t5;
|
|
1615
|
+
return $[8] !== T0 || $[9] !== ariaLabel || $[10] !== children || $[11] !== rest || $[12] !== style || $[13] !== t1 || $[14] !== t2 || $[15] !== t3 || $[16] !== t4 ? (t5 = /* @__PURE__ */ jsx(T0, {
|
|
1616
|
+
as: t1,
|
|
1617
|
+
className: t2,
|
|
1618
|
+
style,
|
|
1619
|
+
"data-ui": "Indicator",
|
|
1620
|
+
width: "5px",
|
|
1621
|
+
height: "5px",
|
|
1622
|
+
radius: "full",
|
|
1623
|
+
"aria-label": ariaLabel,
|
|
1624
|
+
"aria-hidden": t3,
|
|
1625
|
+
role: t4,
|
|
1626
|
+
...rest,
|
|
1627
|
+
children
|
|
1628
|
+
}), $[8] = T0, $[9] = ariaLabel, $[10] = children, $[11] = rest, $[12] = style, $[13] = t1, $[14] = t2, $[15] = t3, $[16] = t4, $[17] = t5) : t5 = $[17], t5;
|
|
1629
|
+
}
|
|
1630
|
+
const indicatorStackProps = { as: { type: "string" } }, indicatorStackClassName = suffixClassName("sui-IndicatorStack");
|
|
1631
|
+
/** @public */
|
|
1242
1632
|
function IndicatorStack(props) {
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
return $[7] !== T0 || $[8] !== children || $[9] !== rest || $[10] !== style || $[11] !== t0 || $[12] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { as: t0, className: t1, style, "data-ui": "IndicatorStack", ...rest, children }), $[7] = T0, $[8] = children, $[9] = rest, $[10] = style, $[11] = t0, $[12] = t1, $[13] = t2) : t2 = $[13], t2;
|
|
1633
|
+
let $ = c(14), T0, children, rest, style, t0, t1;
|
|
1634
|
+
if ($[0] !== props) {
|
|
1635
|
+
let { as, children: t2, className, style: t3, ...t4 } = getProps(props, indicatorStackProps);
|
|
1636
|
+
children = t2, style = t3, rest = t4;
|
|
1637
|
+
let Component = as || "div";
|
|
1638
|
+
T0 = HStack, t0 = Component, t1 = clsx(indicatorStackClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t0, $[6] = t1;
|
|
1639
|
+
} else T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6];
|
|
1640
|
+
let t2;
|
|
1641
|
+
return $[7] !== T0 || $[8] !== children || $[9] !== rest || $[10] !== style || $[11] !== t0 || $[12] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, {
|
|
1642
|
+
as: t0,
|
|
1643
|
+
className: t1,
|
|
1644
|
+
style,
|
|
1645
|
+
"data-ui": "IndicatorStack",
|
|
1646
|
+
...rest,
|
|
1647
|
+
children
|
|
1648
|
+
}), $[7] = T0, $[8] = children, $[9] = rest, $[10] = style, $[11] = t0, $[12] = t1, $[13] = t2) : t2 = $[13], t2;
|
|
1260
1649
|
}
|
|
1261
1650
|
const inlineProps = {
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
}
|
|
1339
|
-
}, inlineClassName = suffixClassName("sui-Inline");
|
|
1651
|
+
as: { type: "string" },
|
|
1652
|
+
gap: {
|
|
1653
|
+
type: "composite",
|
|
1654
|
+
values: SPACE,
|
|
1655
|
+
composition: {
|
|
1656
|
+
marginTop: {
|
|
1657
|
+
propDef: marginProps.marginTop,
|
|
1658
|
+
mapping: {
|
|
1659
|
+
0: 0,
|
|
1660
|
+
1: -1,
|
|
1661
|
+
2: -2,
|
|
1662
|
+
3: -3,
|
|
1663
|
+
4: -4,
|
|
1664
|
+
5: -5,
|
|
1665
|
+
6: -6,
|
|
1666
|
+
7: -7,
|
|
1667
|
+
8: -8,
|
|
1668
|
+
9: -9
|
|
1669
|
+
}
|
|
1670
|
+
},
|
|
1671
|
+
marginLeft: {
|
|
1672
|
+
propDef: marginProps.marginLeft,
|
|
1673
|
+
mapping: {
|
|
1674
|
+
0: 0,
|
|
1675
|
+
1: -1,
|
|
1676
|
+
2: -2,
|
|
1677
|
+
3: -3,
|
|
1678
|
+
4: -4,
|
|
1679
|
+
5: -5,
|
|
1680
|
+
6: -6,
|
|
1681
|
+
7: -7,
|
|
1682
|
+
8: -8,
|
|
1683
|
+
9: -9
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
},
|
|
1688
|
+
...paddingProps
|
|
1689
|
+
}, inlineChildrenProps = { gap: {
|
|
1690
|
+
type: "composite",
|
|
1691
|
+
values: SPACE,
|
|
1692
|
+
composition: {
|
|
1693
|
+
paddingTop: {
|
|
1694
|
+
propDef: paddingProps.paddingTop,
|
|
1695
|
+
mapping: {
|
|
1696
|
+
0: 0,
|
|
1697
|
+
1: 1,
|
|
1698
|
+
2: 2,
|
|
1699
|
+
3: 3,
|
|
1700
|
+
4: 4,
|
|
1701
|
+
5: 5,
|
|
1702
|
+
6: 6,
|
|
1703
|
+
7: 7,
|
|
1704
|
+
8: 8,
|
|
1705
|
+
9: 9
|
|
1706
|
+
}
|
|
1707
|
+
},
|
|
1708
|
+
paddingLeft: {
|
|
1709
|
+
propDef: paddingProps.paddingLeft,
|
|
1710
|
+
mapping: {
|
|
1711
|
+
0: 0,
|
|
1712
|
+
1: 1,
|
|
1713
|
+
2: 2,
|
|
1714
|
+
3: 3,
|
|
1715
|
+
4: 4,
|
|
1716
|
+
5: 5,
|
|
1717
|
+
6: 6,
|
|
1718
|
+
7: 7,
|
|
1719
|
+
8: 8,
|
|
1720
|
+
9: 9
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
} }, inlineClassName = suffixClassName("sui-Inline");
|
|
1725
|
+
/** @deprecated Use HStack component instead */
|
|
1726
|
+
/** @public */
|
|
1340
1727
|
function Inline(props) {
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
let t1;
|
|
1360
|
-
return $[8] !== T0 || $[9] !== children || $[10] !== rest || $[11] !== style || $[12] !== t0 ? (t1 = /* @__PURE__ */ jsx(T0, { className: t0, style, "data-ui": "Inline", ...rest, children }), $[8] = T0, $[9] = children, $[10] = rest, $[11] = style, $[12] = t0, $[13] = t1) : t1 = $[13], t1;
|
|
1728
|
+
let $ = c(14), T0, children, rest, style, t0;
|
|
1729
|
+
if ($[0] !== props) {
|
|
1730
|
+
let { as, children: childrenProp, className, style: t1, ...t2 } = getProps(props, inlineProps);
|
|
1731
|
+
style = t1, rest = t2;
|
|
1732
|
+
let { className: childrenClassName } = getProps(props, inlineChildrenProps), Component = as || "div", t3;
|
|
1733
|
+
$[6] === childrenClassName ? t3 = $[7] : (t3 = (child) => child && /* @__PURE__ */ jsx("div", {
|
|
1734
|
+
className: childrenClassName,
|
|
1735
|
+
children: child
|
|
1736
|
+
}), $[6] = childrenClassName, $[7] = t3), children = Children.map(childrenProp, t3), T0 = Component, t0 = clsx(inlineClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t0;
|
|
1737
|
+
} else T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5];
|
|
1738
|
+
let t1;
|
|
1739
|
+
return $[8] !== T0 || $[9] !== children || $[10] !== rest || $[11] !== style || $[12] !== t0 ? (t1 = /* @__PURE__ */ jsx(T0, {
|
|
1740
|
+
className: t0,
|
|
1741
|
+
style,
|
|
1742
|
+
"data-ui": "Inline",
|
|
1743
|
+
...rest,
|
|
1744
|
+
children
|
|
1745
|
+
}), $[8] = T0, $[9] = children, $[10] = rest, $[11] = style, $[12] = t0, $[13] = t1) : t1 = $[13], t1;
|
|
1361
1746
|
}
|
|
1362
1747
|
const linkProps = {
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
className: "underlined"
|
|
1369
|
-
}
|
|
1748
|
+
openInNewTab: { type: "boolean" },
|
|
1749
|
+
underlined: {
|
|
1750
|
+
type: "boolean",
|
|
1751
|
+
className: "underlined"
|
|
1752
|
+
}
|
|
1370
1753
|
}, linkClassName = suffixClassName("sui-Link");
|
|
1754
|
+
/** @beta */
|
|
1371
1755
|
function Link(t0) {
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
return $[8] !== children || $[9] !== rest || $[10] !== style || $[11] !== t1 || $[12] !== t2 ? (t3 = /* @__PURE__ */ jsx("a", { className: t1, style, "data-ui": "Link", ...t2, ...rest, children }), $[8] = children, $[9] = rest, $[10] = style, $[11] = t1, $[12] = t2, $[13] = t3) : t3 = $[13], t3;
|
|
1398
|
-
}
|
|
1399
|
-
const pressAreaProps = {
|
|
1400
|
-
as: {
|
|
1401
|
-
type: "string"
|
|
1402
|
-
}
|
|
1403
|
-
}, pressAreaClassName = suffixClassName("sui-PressArea");
|
|
1756
|
+
let $ = c(14), children, openInNewTab, rest, style, t1;
|
|
1757
|
+
if ($[0] !== t0) {
|
|
1758
|
+
let { underlined: t2, ...props } = t0, { children: t3, className, style: t4, openInNewTab: t5, ...t6 } = getProps({
|
|
1759
|
+
underlined: t2 === void 0 || t2,
|
|
1760
|
+
...props
|
|
1761
|
+
}, linkProps);
|
|
1762
|
+
children = t3, style = t4, openInNewTab = t5, rest = t6, t1 = clsx(linkClassName, className), $[0] = t0, $[1] = children, $[2] = openInNewTab, $[3] = rest, $[4] = style, $[5] = t1;
|
|
1763
|
+
} else children = $[1], openInNewTab = $[2], rest = $[3], style = $[4], t1 = $[5];
|
|
1764
|
+
let t2;
|
|
1765
|
+
$[6] === openInNewTab ? t2 = $[7] : (t2 = openInNewTab ? {
|
|
1766
|
+
target: "_blank",
|
|
1767
|
+
rel: "noopener noreferrer"
|
|
1768
|
+
} : {}, $[6] = openInNewTab, $[7] = t2);
|
|
1769
|
+
let t3;
|
|
1770
|
+
return $[8] !== children || $[9] !== rest || $[10] !== style || $[11] !== t1 || $[12] !== t2 ? (t3 = /* @__PURE__ */ jsx("a", {
|
|
1771
|
+
className: t1,
|
|
1772
|
+
style,
|
|
1773
|
+
"data-ui": "Link",
|
|
1774
|
+
...t2,
|
|
1775
|
+
...rest,
|
|
1776
|
+
children
|
|
1777
|
+
}), $[8] = children, $[9] = rest, $[10] = style, $[11] = t1, $[12] = t2, $[13] = t3) : t3 = $[13], t3;
|
|
1778
|
+
}
|
|
1779
|
+
const pressAreaProps = { as: { type: "string" } }, pressAreaClassName = suffixClassName("sui-PressArea");
|
|
1780
|
+
/** @public */
|
|
1404
1781
|
function PressArea(props) {
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
children: t22,
|
|
1434
|
-
className,
|
|
1435
|
-
style: t3,
|
|
1436
|
-
...t4
|
|
1437
|
-
} = getProps(props, vStackProps);
|
|
1438
|
-
children = t22, style = t3, rest = t4;
|
|
1439
|
-
const Component = as || "div";
|
|
1440
|
-
T0 = Flex, t0 = Component, t1 = clsx(vStackClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t0, $[6] = t1;
|
|
1441
|
-
} else
|
|
1442
|
-
T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6];
|
|
1443
|
-
let t2;
|
|
1444
|
-
return $[7] !== T0 || $[8] !== children || $[9] !== rest || $[10] !== style || $[11] !== t0 || $[12] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { as: t0, className: t1, style, "data-ui": "VStack", flexDirection: "column", ...rest, children }), $[7] = T0, $[8] = children, $[9] = rest, $[10] = style, $[11] = t0, $[12] = t1, $[13] = t2) : t2 = $[13], t2;
|
|
1782
|
+
let $ = c(12), T0, children, rest, style, t0;
|
|
1783
|
+
if ($[0] !== props) {
|
|
1784
|
+
let { as, children: t1, className, style: t2, ...t3 } = getProps(props, pressAreaProps);
|
|
1785
|
+
children = t1, style = t2, rest = t3, T0 = as || "button", t0 = clsx(pressAreaClassName, "sui-width-full", className), $[0] = props, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t0;
|
|
1786
|
+
} else T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5];
|
|
1787
|
+
let t1;
|
|
1788
|
+
return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t0 ? (t1 = /* @__PURE__ */ jsx(T0, {
|
|
1789
|
+
className: t0,
|
|
1790
|
+
style,
|
|
1791
|
+
"data-ui": "PressArea",
|
|
1792
|
+
...rest,
|
|
1793
|
+
children
|
|
1794
|
+
}), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t0, $[11] = t1) : t1 = $[11], t1;
|
|
1795
|
+
}
|
|
1796
|
+
const vStackClassName = suffixClassName("sui-VStack");
|
|
1797
|
+
/** @public */
|
|
1798
|
+
function VStack(t0) {
|
|
1799
|
+
let $ = c(8), className, props;
|
|
1800
|
+
$[0] === t0 ? (className = $[1], props = $[2]) : ({className, ...props} = t0, $[0] = t0, $[1] = className, $[2] = props);
|
|
1801
|
+
let t1;
|
|
1802
|
+
$[3] === className ? t1 = $[4] : (t1 = clsx(vStackClassName, className), $[3] = className, $[4] = t1);
|
|
1803
|
+
let t2 = props, t3;
|
|
1804
|
+
return $[5] !== t1 || $[6] !== t2 ? (t3 = /* @__PURE__ */ jsx(Flex, {
|
|
1805
|
+
className: t1,
|
|
1806
|
+
"data-ui": "VStack",
|
|
1807
|
+
flexDirection: "column",
|
|
1808
|
+
...t2
|
|
1809
|
+
}), $[5] = t1, $[6] = t2, $[7] = t3) : t3 = $[7], t3;
|
|
1445
1810
|
}
|
|
1446
1811
|
const listProps = {
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
},
|
|
1450
|
-
gap: gapProps.gap
|
|
1812
|
+
as: { type: "string" },
|
|
1813
|
+
gap: gapProps.gap
|
|
1451
1814
|
}, listItemProps = {
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
},
|
|
1485
|
-
start: {
|
|
1486
|
-
type: "string"
|
|
1487
|
-
}
|
|
1815
|
+
density: {
|
|
1816
|
+
type: "composite",
|
|
1817
|
+
values: DENSITY,
|
|
1818
|
+
composition: {
|
|
1819
|
+
gap: {
|
|
1820
|
+
propDef: gapProps.gap,
|
|
1821
|
+
mapping: {
|
|
1822
|
+
compact: 2,
|
|
1823
|
+
regular: 2,
|
|
1824
|
+
loose: 3
|
|
1825
|
+
}
|
|
1826
|
+
},
|
|
1827
|
+
minHeight: {
|
|
1828
|
+
propDef: heightProps.minHeight,
|
|
1829
|
+
mapping: {
|
|
1830
|
+
compact: "33px",
|
|
1831
|
+
regular: "37px",
|
|
1832
|
+
loose: "45px"
|
|
1833
|
+
}
|
|
1834
|
+
},
|
|
1835
|
+
paddingX: {
|
|
1836
|
+
propDef: paddingProps.padding,
|
|
1837
|
+
mapping: {
|
|
1838
|
+
compact: 1,
|
|
1839
|
+
regular: 2,
|
|
1840
|
+
loose: 3
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
},
|
|
1845
|
+
end: { type: "string" },
|
|
1846
|
+
start: { type: "string" }
|
|
1488
1847
|
}, listButtonItemProps = {
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
selected: {
|
|
1493
|
-
type: "boolean"
|
|
1494
|
-
},
|
|
1495
|
-
...listItemProps
|
|
1848
|
+
as: { type: "string" },
|
|
1849
|
+
selected: { type: "boolean" },
|
|
1850
|
+
...listItemProps
|
|
1496
1851
|
}, listItemTextProps = {
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
title: {
|
|
1501
|
-
type: "string"
|
|
1502
|
-
},
|
|
1503
|
-
subtitle: {
|
|
1504
|
-
type: "string"
|
|
1505
|
-
}
|
|
1852
|
+
as: { type: "string" },
|
|
1853
|
+
title: { type: "string" },
|
|
1854
|
+
subtitle: { type: "string" }
|
|
1506
1855
|
}, listClassName = suffixClassName("sui-List"), listItemClassName = suffixClassName("sui-ListItem"), listButtonItemClassName = suffixClassName("sui-ListButtonItem"), listItemTextClassName = suffixClassName("sui-ListItemText"), listItemImageClassName = suffixClassName("sui-ListItemImage");
|
|
1507
1856
|
function ListRoot(props) {
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
return $[7] !== T0 || $[8] !== children || $[9] !== rest || $[10] !== style || $[11] !== t0 || $[12] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { as: t0, className: t1, style, "data-ui": "List", ...rest, children }), $[7] = T0, $[8] = children, $[9] = rest, $[10] = style, $[11] = t0, $[12] = t1, $[13] = t2) : t2 = $[13], t2;
|
|
1857
|
+
let $ = c(14), T0, children, rest, style, t0, t1;
|
|
1858
|
+
if ($[0] !== props) {
|
|
1859
|
+
let { as, children: t2, className, style: t3, ...t4 } = getProps(props, listProps);
|
|
1860
|
+
children = t2, style = t3, rest = t4;
|
|
1861
|
+
let Component = as || "ul";
|
|
1862
|
+
T0 = VStack, t0 = Component, t1 = clsx(listClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t0, $[6] = t1;
|
|
1863
|
+
} else T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6];
|
|
1864
|
+
let t2;
|
|
1865
|
+
return $[7] !== T0 || $[8] !== children || $[9] !== rest || $[10] !== style || $[11] !== t0 || $[12] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, {
|
|
1866
|
+
as: t0,
|
|
1867
|
+
className: t1,
|
|
1868
|
+
style,
|
|
1869
|
+
"data-ui": "List",
|
|
1870
|
+
...rest,
|
|
1871
|
+
children
|
|
1872
|
+
}), $[7] = T0, $[8] = children, $[9] = rest, $[10] = style, $[11] = t0, $[12] = t1, $[13] = t2) : t2 = $[13], t2;
|
|
1525
1873
|
}
|
|
1526
1874
|
function ListItem(t0) {
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
end
|
|
1554
|
-
] }), $[9] = end, $[10] = rest, $[11] = start, $[12] = style, $[13] = t1, $[14] = t2, $[15] = t3) : t3 = $[15], t3;
|
|
1875
|
+
let $ = c(16), children, end, rest, start, style, t1;
|
|
1876
|
+
if ($[0] !== t0) {
|
|
1877
|
+
let { density: t2, ...props } = t0, { children: t3, className, style: t4, end: t5, start: t6, ...t7 } = getProps({
|
|
1878
|
+
density: t2 === void 0 ? "regular" : t2,
|
|
1879
|
+
...props
|
|
1880
|
+
}, listItemProps);
|
|
1881
|
+
children = t3, style = t4, end = t5, start = t6, rest = t7, t1 = clsx(listItemClassName, "sui-width-full sui-display-flex sui-align-items-center", className), $[0] = t0, $[1] = children, $[2] = end, $[3] = rest, $[4] = start, $[5] = style, $[6] = t1;
|
|
1882
|
+
} else children = $[1], end = $[2], rest = $[3], start = $[4], style = $[5], t1 = $[6];
|
|
1883
|
+
let t2;
|
|
1884
|
+
$[7] === children ? t2 = $[8] : (t2 = /* @__PURE__ */ jsx(Flex, {
|
|
1885
|
+
flexGrow: 1,
|
|
1886
|
+
gap: "inherit",
|
|
1887
|
+
children
|
|
1888
|
+
}), $[7] = children, $[8] = t2);
|
|
1889
|
+
let t3;
|
|
1890
|
+
return $[9] !== end || $[10] !== rest || $[11] !== start || $[12] !== style || $[13] !== t1 || $[14] !== t2 ? (t3 = /* @__PURE__ */ jsxs("li", {
|
|
1891
|
+
className: t1,
|
|
1892
|
+
style,
|
|
1893
|
+
"data-ui": "ListItem",
|
|
1894
|
+
...rest,
|
|
1895
|
+
children: [
|
|
1896
|
+
start,
|
|
1897
|
+
t2,
|
|
1898
|
+
end
|
|
1899
|
+
]
|
|
1900
|
+
}), $[9] = end, $[10] = rest, $[11] = start, $[12] = style, $[13] = t1, $[14] = t2, $[15] = t3) : t3 = $[15], t3;
|
|
1555
1901
|
}
|
|
1556
1902
|
function ListButtonItem(t0) {
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
end
|
|
1588
|
-
] }) }), $[12] = T0, $[13] = end, $[14] = rest, $[15] = selected, $[16] = start, $[17] = style, $[18] = t1, $[19] = t2, $[20] = t3, $[21] = t4) : t4 = $[21], t4;
|
|
1903
|
+
let $ = c(22), T0, children, end, rest, selected, start, style, t1, t2;
|
|
1904
|
+
if ($[0] !== t0) {
|
|
1905
|
+
let { density: t3, ...props } = t0, { as, children: t4, className, style: t5, end: t6, start: t7, selected: t8, ...t9 } = getProps({
|
|
1906
|
+
density: t3 === void 0 ? "regular" : t3,
|
|
1907
|
+
...props
|
|
1908
|
+
}, listButtonItemProps);
|
|
1909
|
+
children = t4, style = t5, end = t6, start = t7, selected = t8, rest = t9;
|
|
1910
|
+
let Component = as || "button";
|
|
1911
|
+
T0 = PressArea, t1 = Component, t2 = clsx(listButtonItemClassName, "sui-width-full sui-display-flex sui-align-items-center sui-radius2", className), $[0] = t0, $[1] = T0, $[2] = children, $[3] = end, $[4] = rest, $[5] = selected, $[6] = start, $[7] = style, $[8] = t1, $[9] = t2;
|
|
1912
|
+
} else T0 = $[1], children = $[2], end = $[3], rest = $[4], selected = $[5], start = $[6], style = $[7], t1 = $[8], t2 = $[9];
|
|
1913
|
+
let t3;
|
|
1914
|
+
$[10] === children ? t3 = $[11] : (t3 = /* @__PURE__ */ jsx(Flex, {
|
|
1915
|
+
flexGrow: 1,
|
|
1916
|
+
gap: "inherit",
|
|
1917
|
+
children
|
|
1918
|
+
}), $[10] = children, $[11] = t3);
|
|
1919
|
+
let t4;
|
|
1920
|
+
return $[12] !== T0 || $[13] !== end || $[14] !== rest || $[15] !== selected || $[16] !== start || $[17] !== style || $[18] !== t1 || $[19] !== t2 || $[20] !== t3 ? (t4 = /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(T0, {
|
|
1921
|
+
as: t1,
|
|
1922
|
+
className: t2,
|
|
1923
|
+
style,
|
|
1924
|
+
"data-ui": "ListButtonItem",
|
|
1925
|
+
"data-selected": selected,
|
|
1926
|
+
...rest,
|
|
1927
|
+
children: [
|
|
1928
|
+
start,
|
|
1929
|
+
t3,
|
|
1930
|
+
end
|
|
1931
|
+
]
|
|
1932
|
+
}) }), $[12] = T0, $[13] = end, $[14] = rest, $[15] = selected, $[16] = start, $[17] = style, $[18] = t1, $[19] = t2, $[20] = t3, $[21] = t4) : t4 = $[21], t4;
|
|
1589
1933
|
}
|
|
1590
1934
|
function ListItemText(props) {
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1935
|
+
let $ = c(20), T0, rest, style, subtitle, t0, t1, title;
|
|
1936
|
+
if ($[0] !== props) {
|
|
1937
|
+
let { as, className, style: t2, title: t3, subtitle: t4, ...t5 } = getProps(props, listItemTextProps);
|
|
1938
|
+
style = t2, title = t3, subtitle = t4, rest = t5;
|
|
1939
|
+
let Component = as || "div";
|
|
1940
|
+
T0 = Flex, t0 = Component, t1 = clsx(listItemTextClassName, className), $[0] = props, $[1] = T0, $[2] = rest, $[3] = style, $[4] = subtitle, $[5] = t0, $[6] = t1, $[7] = title;
|
|
1941
|
+
} else T0 = $[1], rest = $[2], style = $[3], subtitle = $[4], t0 = $[5], t1 = $[6], title = $[7];
|
|
1942
|
+
let t2;
|
|
1943
|
+
$[8] === title ? t2 = $[9] : (t2 = title && /* @__PURE__ */ jsx(Text, {
|
|
1944
|
+
size: 1,
|
|
1945
|
+
weight: "medium",
|
|
1946
|
+
trim: !0,
|
|
1947
|
+
truncate: 1,
|
|
1948
|
+
children: title
|
|
1949
|
+
}), $[8] = title, $[9] = t2);
|
|
1950
|
+
let t3;
|
|
1951
|
+
$[10] === subtitle ? t3 = $[11] : (t3 = subtitle && /* @__PURE__ */ jsx(Text, {
|
|
1952
|
+
size: 1,
|
|
1953
|
+
muted: !0,
|
|
1954
|
+
trim: !0,
|
|
1955
|
+
truncate: 1,
|
|
1956
|
+
children: subtitle
|
|
1957
|
+
}), $[10] = subtitle, $[11] = t3);
|
|
1958
|
+
let t4;
|
|
1959
|
+
return $[12] !== T0 || $[13] !== rest || $[14] !== style || $[15] !== t0 || $[16] !== t1 || $[17] !== t2 || $[18] !== t3 ? (t4 = /* @__PURE__ */ jsxs(T0, {
|
|
1960
|
+
as: t0,
|
|
1961
|
+
className: t1,
|
|
1962
|
+
style,
|
|
1963
|
+
"data-ui": "ListItemText",
|
|
1964
|
+
flexDirection: "column",
|
|
1965
|
+
justifyContent: "center",
|
|
1966
|
+
gap: 2,
|
|
1967
|
+
flexGrow: 1,
|
|
1968
|
+
...rest,
|
|
1969
|
+
children: [t2, t3]
|
|
1970
|
+
}), $[12] = T0, $[13] = rest, $[14] = style, $[15] = t0, $[16] = t1, $[17] = t2, $[18] = t3, $[19] = t4) : t4 = $[19], t4;
|
|
1616
1971
|
}
|
|
1617
1972
|
function ListItemImage(props) {
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
return $[4] !== rest || $[5] !== style || $[6] !== t0 ? (t1 = /* @__PURE__ */ jsx("img", { className: t0, style, "data-ui": "ListItemImage", ...rest }), $[4] = rest, $[5] = style, $[6] = t0, $[7] = t1) : t1 = $[7], t1;
|
|
1973
|
+
let $ = c(8), rest, style, t0;
|
|
1974
|
+
if ($[0] !== props) {
|
|
1975
|
+
let { className, style: t1, ...t2 } = getProps(props, {});
|
|
1976
|
+
style = t1, rest = t2, t0 = clsx(listItemImageClassName, "sui-radius2", className), $[0] = props, $[1] = rest, $[2] = style, $[3] = t0;
|
|
1977
|
+
} else rest = $[1], style = $[2], t0 = $[3];
|
|
1978
|
+
let t1;
|
|
1979
|
+
return $[4] !== rest || $[5] !== style || $[6] !== t0 ? (t1 = /* @__PURE__ */ jsx("img", {
|
|
1980
|
+
className: t0,
|
|
1981
|
+
style,
|
|
1982
|
+
"data-ui": "ListItemImage",
|
|
1983
|
+
...rest
|
|
1984
|
+
}), $[4] = rest, $[5] = style, $[6] = t0, $[7] = t1) : t1 = $[7], t1;
|
|
1631
1985
|
}
|
|
1632
1986
|
ListRoot.displayName = "List";
|
|
1987
|
+
/** @beta */
|
|
1633
1988
|
const List = ListRoot;
|
|
1634
|
-
ListRoot.Item = ListItem;
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1989
|
+
ListRoot.Item = ListItem, ListRoot.ButtonItem = ListButtonItem, ListRoot.ItemText = ListItemText, ListRoot.ItemImage = ListItemImage;
|
|
1990
|
+
/** @public */
|
|
1991
|
+
function useIsClient() {
|
|
1992
|
+
return useSyncExternalStore(_temp2, _temp3, _temp4);
|
|
1993
|
+
}
|
|
1994
|
+
function _temp4() {
|
|
1995
|
+
return !1;
|
|
1996
|
+
}
|
|
1997
|
+
function _temp3() {
|
|
1998
|
+
return !0;
|
|
1999
|
+
}
|
|
2000
|
+
function _temp2() {
|
|
2001
|
+
return _temp;
|
|
2002
|
+
}
|
|
2003
|
+
function _temp() {}
|
|
2004
|
+
function isReactEventHandler(key, value) {
|
|
2005
|
+
return /^on[A-Z]/.test(key) && typeof value == "function";
|
|
2006
|
+
}
|
|
2007
|
+
function chainEventHandlers(...handlers) {
|
|
2008
|
+
let defined = handlers.filter(Boolean);
|
|
2009
|
+
if (defined.length !== 0) return defined.length === 1 ? defined[0] : (e) => {
|
|
2010
|
+
for (let handler of defined) handler(e);
|
|
2011
|
+
};
|
|
2012
|
+
}
|
|
2013
|
+
function mergeTriggerProps(childProps, forwardedProps, ownProps) {
|
|
2014
|
+
let result = {};
|
|
2015
|
+
for (let source of [forwardedProps, ownProps]) if (source) {
|
|
2016
|
+
for (let [key, value] of Object.entries(source)) if (key !== "style") {
|
|
2017
|
+
if (isReactEventHandler(key, value)) {
|
|
2018
|
+
result[key] = chainEventHandlers(result[key], value);
|
|
2019
|
+
continue;
|
|
2020
|
+
}
|
|
2021
|
+
value !== void 0 && (result[key] = value);
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
result.style = {
|
|
2025
|
+
...childProps.style,
|
|
2026
|
+
...forwardedProps?.style,
|
|
2027
|
+
...ownProps?.style
|
|
2028
|
+
};
|
|
2029
|
+
for (let [key, value] of Object.entries(childProps)) isReactEventHandler(key, value) && (result[key] = chainEventHandlers(result[key], value));
|
|
2030
|
+
return result;
|
|
2031
|
+
}
|
|
2032
|
+
function renderPortal(node, mounted, portal) {
|
|
2033
|
+
return portal ? mounted ? createPortal(node, document.body) : null : node;
|
|
2034
|
+
}
|
|
2035
|
+
const placementProps = { placement: {
|
|
2036
|
+
type: "union",
|
|
2037
|
+
className: "placement",
|
|
2038
|
+
values: [
|
|
2039
|
+
"top",
|
|
2040
|
+
"top-start",
|
|
2041
|
+
"top-end",
|
|
2042
|
+
"right",
|
|
2043
|
+
"right-start",
|
|
2044
|
+
"right-end",
|
|
2045
|
+
"bottom",
|
|
2046
|
+
"bottom-start",
|
|
2047
|
+
"bottom-end",
|
|
2048
|
+
"left",
|
|
2049
|
+
"left-start",
|
|
2050
|
+
"left-end"
|
|
2051
|
+
]
|
|
2052
|
+
} }, popoverProps = {
|
|
2053
|
+
anchorName: { type: "string" },
|
|
2054
|
+
content: { type: "string" },
|
|
2055
|
+
portal: { type: "boolean" },
|
|
2056
|
+
...placementProps
|
|
2057
|
+
}, popoverClassName = suffixClassName("sui-PopoverContent");
|
|
2058
|
+
function PopoverRoot(t0) {
|
|
2059
|
+
let $ = c(4), { placement: t1, ...props } = t0, { children, className, style, id: idProp, anchorName, content, portal, triggerProps: forwardedTriggerProps, ...rest } = getProps({
|
|
2060
|
+
placement: t1 === void 0 ? "bottom" : t1,
|
|
2061
|
+
...props
|
|
2062
|
+
}, popoverProps), reactId = useId(), id = idProp || reactId, [open, setOpen] = useState(!1), isClient = useIsClient(), t2;
|
|
2063
|
+
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t2 = (e) => {
|
|
2064
|
+
setOpen(e.newState === "open");
|
|
2065
|
+
}, $[0] = t2) : t2 = $[0];
|
|
2066
|
+
let handleToggle = t2, triggerProps = {
|
|
2067
|
+
popoverTarget: id,
|
|
2068
|
+
style: { anchorName: `--anchor-${anchorName || id}` }
|
|
2069
|
+
}, trigger = children.type.forwardsTriggerProps ? cloneElement(children, { triggerProps }) : cloneElement(children, mergeTriggerProps(children.props, forwardedTriggerProps, triggerProps)), t3 = renderPortal(/* @__PURE__ */ jsx(Activity, {
|
|
2070
|
+
mode: open ? "visible" : "hidden",
|
|
2071
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
2072
|
+
className: clsx(popoverClassName, "sui-px2 sui-py1 sui-radius2 sui-position-fixed sui-shadow2", className),
|
|
2073
|
+
style: {
|
|
2074
|
+
...style,
|
|
2075
|
+
positionAnchor: `--anchor-${anchorName || id}`
|
|
2076
|
+
},
|
|
2077
|
+
"data-ui": "Popover",
|
|
2078
|
+
popover: "auto",
|
|
2079
|
+
id,
|
|
2080
|
+
onToggle: handleToggle,
|
|
2081
|
+
...rest,
|
|
2082
|
+
children: content
|
|
2083
|
+
})
|
|
2084
|
+
}), isClient, portal), t4;
|
|
2085
|
+
return $[1] !== t3 || $[2] !== trigger ? (t4 = /* @__PURE__ */ jsxs(Fragment, { children: [trigger, t3] }), $[1] = t3, $[2] = trigger, $[3] = t4) : t4 = $[3], t4;
|
|
2086
|
+
}
|
|
2087
|
+
/** @beta */
|
|
2088
|
+
const Popover = Object.assign(PopoverRoot, { forwardsTriggerProps: !0 }), radioClassName = suffixClassName("sui-Radio"), radioInputClassName = suffixClassName("sui-RadioInput");
|
|
2089
|
+
/** @beta */
|
|
1647
2090
|
function Radio(props) {
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
}
|
|
1671
|
-
const
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
2091
|
+
let $ = c(12), className, rest, style;
|
|
2092
|
+
$[0] === props ? (className = $[1], rest = $[2], style = $[3]) : ({className, style, ...rest} = props, $[0] = props, $[1] = className, $[2] = rest, $[3] = style);
|
|
2093
|
+
let t0;
|
|
2094
|
+
$[4] === className ? t0 = $[5] : (t0 = clsx(radioClassName, className), $[4] = className, $[5] = t0);
|
|
2095
|
+
let t1;
|
|
2096
|
+
$[6] === rest ? t1 = $[7] : (t1 = /* @__PURE__ */ jsx("input", {
|
|
2097
|
+
type: "radio",
|
|
2098
|
+
className: radioInputClassName,
|
|
2099
|
+
...rest
|
|
2100
|
+
}), $[6] = rest, $[7] = t1);
|
|
2101
|
+
let t2;
|
|
2102
|
+
return $[8] !== style || $[9] !== t0 || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(Box, {
|
|
2103
|
+
as: "span",
|
|
2104
|
+
className: t0,
|
|
2105
|
+
style,
|
|
2106
|
+
"data-ui": "Radio",
|
|
2107
|
+
position: "relative",
|
|
2108
|
+
radius: "full",
|
|
2109
|
+
width: "17px",
|
|
2110
|
+
height: "17px",
|
|
2111
|
+
children: t1
|
|
2112
|
+
}), $[8] = style, $[9] = t0, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
|
|
2113
|
+
}
|
|
2114
|
+
const formElementDensityProps = { density: {
|
|
2115
|
+
type: "composite",
|
|
2116
|
+
values: ["regular", "loose"],
|
|
2117
|
+
composition: {
|
|
2118
|
+
paddingX: {
|
|
2119
|
+
propDef: paddingProps.paddingX,
|
|
2120
|
+
mapping: {
|
|
2121
|
+
regular: 2,
|
|
2122
|
+
loose: 3
|
|
2123
|
+
}
|
|
2124
|
+
},
|
|
2125
|
+
paddingY: {
|
|
2126
|
+
propDef: paddingProps.paddingY,
|
|
2127
|
+
mapping: {
|
|
2128
|
+
regular: 1,
|
|
2129
|
+
loose: 2
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
2133
|
+
} }, selectProps = {
|
|
2134
|
+
hasError: { type: "boolean" },
|
|
2135
|
+
...formElementDensityProps
|
|
2136
|
+
}, selectClassName = suffixClassName("sui-Select");
|
|
2137
|
+
/** @public */
|
|
2138
|
+
function Select(t0) {
|
|
2139
|
+
let $ = c(17), { density: t1, hasError: t2, ...props } = t0, density = t1 === void 0 ? "regular" : t1, hasError = t2 !== void 0 && t2, { children, className, style, ...rest } = getProps({
|
|
2140
|
+
density,
|
|
2141
|
+
...props
|
|
2142
|
+
}, selectProps), anchorName = `--anchor-${useId()}`, selectClasses = clsx(selectClassName, "sui-radius2", "sui-width-full", className), t3;
|
|
2143
|
+
$[0] !== anchorName || $[1] !== style ? (t3 = {
|
|
2144
|
+
...style,
|
|
2145
|
+
anchorName
|
|
2146
|
+
}, $[0] = anchorName, $[1] = style, $[2] = t3) : t3 = $[2];
|
|
2147
|
+
let t4 = hasError || void 0, t5;
|
|
2148
|
+
$[3] !== children || $[4] !== rest || $[5] !== selectClasses || $[6] !== t3 || $[7] !== t4 ? (t5 = /* @__PURE__ */ jsx("select", {
|
|
2149
|
+
"data-ui": "Select",
|
|
2150
|
+
className: selectClasses,
|
|
2151
|
+
style: t3,
|
|
2152
|
+
...rest,
|
|
2153
|
+
"aria-invalid": t4,
|
|
2154
|
+
children
|
|
2155
|
+
}), $[3] = children, $[4] = rest, $[5] = selectClasses, $[6] = t3, $[7] = t4, $[8] = t5) : t5 = $[8];
|
|
2156
|
+
let t6;
|
|
2157
|
+
$[9] === anchorName ? t6 = $[10] : (t6 = { positionAnchor: anchorName }, $[9] = anchorName, $[10] = t6);
|
|
2158
|
+
let t7;
|
|
2159
|
+
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t7 = /* @__PURE__ */ jsx(Icon, {
|
|
2160
|
+
icon: SelectIcon,
|
|
2161
|
+
size: 1
|
|
2162
|
+
}), $[11] = t7) : t7 = $[11];
|
|
2163
|
+
let t8;
|
|
2164
|
+
$[12] === t6 ? t8 = $[13] : (t8 = /* @__PURE__ */ jsx("div", {
|
|
2165
|
+
className: "sui-position-absolute sui-display-flex sui-align-items-center sui-px1",
|
|
2166
|
+
"data-ui": "Select-icon",
|
|
2167
|
+
style: t6,
|
|
2168
|
+
children: t7
|
|
2169
|
+
}), $[12] = t6, $[13] = t8);
|
|
2170
|
+
let t9;
|
|
2171
|
+
return $[14] !== t5 || $[15] !== t8 ? (t9 = /* @__PURE__ */ jsxs(Fragment, { children: [t5, t8] }), $[14] = t5, $[15] = t8, $[16] = t9) : t9 = $[16], t9;
|
|
2172
|
+
}
|
|
2173
|
+
const visuallyHiddenProps = {
|
|
2174
|
+
as: { type: "string" },
|
|
2175
|
+
visibleOnFocus: {
|
|
2176
|
+
type: "boolean",
|
|
2177
|
+
className: "sui-visually-hidden-visible"
|
|
2178
|
+
}
|
|
2179
|
+
}, visuallyHiddenClassName = suffixClassName("sui-VisuallyHidden");
|
|
2180
|
+
/** @public */
|
|
2181
|
+
function VisuallyHidden(props) {
|
|
2182
|
+
let $ = c(12), T0, children, rest, style, t0;
|
|
2183
|
+
if ($[0] !== props) {
|
|
2184
|
+
let { as, children: t1, className, style: t2, ...t3 } = getProps(props, visuallyHiddenProps);
|
|
2185
|
+
children = t1, style = t2, rest = t3, T0 = as || "span", t0 = clsx(visuallyHiddenClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t0;
|
|
2186
|
+
} else T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5];
|
|
2187
|
+
let t1;
|
|
2188
|
+
return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t0 ? (t1 = /* @__PURE__ */ jsx(T0, {
|
|
2189
|
+
className: t0,
|
|
2190
|
+
style,
|
|
2191
|
+
"data-ui": "VisuallyHidden",
|
|
2192
|
+
...rest,
|
|
2193
|
+
children
|
|
2194
|
+
}), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t0, $[11] = t1) : t1 = $[11], t1;
|
|
2195
|
+
}
|
|
2196
|
+
const skipToContentProps = { label: { type: "string" } }, skipToContentClassName = suffixClassName("sui-SkipToContent");
|
|
2197
|
+
/** @beta */
|
|
1676
2198
|
function SkipToContent(props) {
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
...marginProps
|
|
1702
|
-
}, switchClassName = suffixClassName("sui-Switch"), switchInputClassName = suffixClassName("sui-SwitchInput"), switchMarkClassName = suffixClassName("sui-SwitchMark");
|
|
2199
|
+
let $ = c(18), T0, label, rest, style, t0, t1, t2;
|
|
2200
|
+
if ($[0] !== props) {
|
|
2201
|
+
let { className, label: t3, style: t4, ...t5 } = getProps(props, skipToContentProps);
|
|
2202
|
+
label = t3, style = t4, rest = t5, T0 = VisuallyHidden, t0 = Link, t1 = !1, t2 = clsx(skipToContentClassName, "sui-position-absolute sui-top2 sui-left2 sui-display-inline-block sui-z-index sui-py2 sui-px3 sui-radius2 sui-text-body1", className), $[0] = props, $[1] = T0, $[2] = label, $[3] = rest, $[4] = style, $[5] = t0, $[6] = t1, $[7] = t2;
|
|
2203
|
+
} else T0 = $[1], label = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6], t2 = $[7];
|
|
2204
|
+
let t3;
|
|
2205
|
+
$[8] === label ? t3 = $[9] : (t3 = /* @__PURE__ */ jsx(Text, {
|
|
2206
|
+
size: 1,
|
|
2207
|
+
children: label
|
|
2208
|
+
}), $[8] = label, $[9] = t3);
|
|
2209
|
+
let t4;
|
|
2210
|
+
return $[10] !== T0 || $[11] !== rest || $[12] !== style || $[13] !== t0 || $[14] !== t1 || $[15] !== t2 || $[16] !== t3 ? (t4 = /* @__PURE__ */ jsx(T0, {
|
|
2211
|
+
as: t0,
|
|
2212
|
+
underlined: t1,
|
|
2213
|
+
className: t2,
|
|
2214
|
+
style,
|
|
2215
|
+
"data-ui": "SkipToContent",
|
|
2216
|
+
visibleOnFocus: !0,
|
|
2217
|
+
...rest,
|
|
2218
|
+
children: t3
|
|
2219
|
+
}), $[10] = T0, $[11] = rest, $[12] = style, $[13] = t0, $[14] = t1, $[15] = t2, $[16] = t3, $[17] = t4) : t4 = $[17], t4;
|
|
2220
|
+
}
|
|
2221
|
+
const switchProps = { hasError: { type: "boolean" } }, switchClassName = suffixClassName("sui-Switch"), switchInputClassName = suffixClassName("sui-SwitchInput");
|
|
2222
|
+
/** @beta */
|
|
1703
2223
|
function Switch(props) {
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
},
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
2224
|
+
let $ = c(16), T0, hasError, rest, style, t0, t1;
|
|
2225
|
+
if ($[0] !== props) {
|
|
2226
|
+
let { className, style: t2, hasError: t3, ...t4 } = getProps(props, switchProps);
|
|
2227
|
+
style = t2, hasError = t3, rest = t4, T0 = Flex, t0 = "span", t1 = clsx(switchClassName, className), $[0] = props, $[1] = T0, $[2] = hasError, $[3] = rest, $[4] = style, $[5] = t0, $[6] = t1;
|
|
2228
|
+
} else T0 = $[1], hasError = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6];
|
|
2229
|
+
let t2 = hasError || void 0, t3;
|
|
2230
|
+
$[7] !== rest || $[8] !== t2 ? (t3 = /* @__PURE__ */ jsx("input", {
|
|
2231
|
+
type: "checkbox",
|
|
2232
|
+
role: "switch",
|
|
2233
|
+
className: switchInputClassName,
|
|
2234
|
+
"aria-invalid": t2,
|
|
2235
|
+
...rest
|
|
2236
|
+
}), $[7] = rest, $[8] = t2, $[9] = t3) : t3 = $[9];
|
|
2237
|
+
let t4;
|
|
2238
|
+
return $[10] !== T0 || $[11] !== style || $[12] !== t0 || $[13] !== t1 || $[14] !== t3 ? (t4 = /* @__PURE__ */ jsx(T0, {
|
|
2239
|
+
as: t0,
|
|
2240
|
+
className: t1,
|
|
2241
|
+
style,
|
|
2242
|
+
"data-ui": "Switch",
|
|
2243
|
+
position: "relative",
|
|
2244
|
+
alignItems: "center",
|
|
2245
|
+
radius: 6,
|
|
2246
|
+
children: t3
|
|
2247
|
+
}), $[10] = T0, $[11] = style, $[12] = t0, $[13] = t1, $[14] = t3, $[15] = t4) : t4 = $[15], t4;
|
|
2248
|
+
}
|
|
2249
|
+
const tabsProps = { value: { type: "string" } }, tabsListProps = {}, tabProps = {
|
|
2250
|
+
icon: { type: "string" },
|
|
2251
|
+
label: { type: "string" },
|
|
2252
|
+
value: { type: "string" },
|
|
2253
|
+
...toneProps
|
|
2254
|
+
}, tabsPanelProps = { value: { type: "string" } }, tabsClassName = suffixClassName("sui-Tabs"), TabsContext = createContext(null);
|
|
2255
|
+
function useTabsContext() {
|
|
2256
|
+
let context = useContext(TabsContext);
|
|
2257
|
+
if (!context) throw Error("Tabs.[subcomponents] must be rendered inside the Tabs component");
|
|
2258
|
+
return context;
|
|
2259
|
+
}
|
|
2260
|
+
function getTabId(tabsRootId, value) {
|
|
2261
|
+
return `${tabsRootId}-${value.replace(/\s/g, "-")}-tab`;
|
|
2262
|
+
}
|
|
2263
|
+
function getPanelId(tabsRootId, value) {
|
|
2264
|
+
return `${tabsRootId}-${value.replace(/\s/g, "-")}-panel`;
|
|
2265
|
+
}
|
|
2266
|
+
function TabsRoot(t0) {
|
|
2267
|
+
let $ = c(13), { value, onValueChange, ...props } = t0, { children, className, style, ...rest } = getProps(props, tabsProps), tabsRootId = useId(), t1 = TabsContext, t2;
|
|
2268
|
+
$[0] !== onValueChange || $[1] !== tabsRootId || $[2] !== value ? (t2 = {
|
|
2269
|
+
value,
|
|
2270
|
+
onValueChange,
|
|
2271
|
+
tabsRootId
|
|
2272
|
+
}, $[0] = onValueChange, $[1] = tabsRootId, $[2] = value, $[3] = t2) : t2 = $[3];
|
|
2273
|
+
let t3 = clsx(tabsClassName, className), t4;
|
|
2274
|
+
$[4] !== children || $[5] !== rest || $[6] !== style || $[7] !== t3 ? (t4 = /* @__PURE__ */ jsx("div", {
|
|
2275
|
+
className: t3,
|
|
2276
|
+
style,
|
|
2277
|
+
"data-ui": "Tabs",
|
|
2278
|
+
...rest,
|
|
2279
|
+
children
|
|
2280
|
+
}), $[4] = children, $[5] = rest, $[6] = style, $[7] = t3, $[8] = t4) : t4 = $[8];
|
|
2281
|
+
let t5;
|
|
2282
|
+
return $[9] !== t1.Provider || $[10] !== t2 || $[11] !== t4 ? (t5 = /* @__PURE__ */ jsx(t1.Provider, {
|
|
2283
|
+
value: t2,
|
|
2284
|
+
children: t4
|
|
2285
|
+
}), $[9] = t1.Provider, $[10] = t2, $[11] = t4, $[12] = t5) : t5 = $[12], t5;
|
|
2286
|
+
}
|
|
2287
|
+
function handleKeyDown(event) {
|
|
2288
|
+
if (event.altKey || event.ctrlKey || event.metaKey) return;
|
|
2289
|
+
let tabsList = event.currentTarget, focusedTab = event.target, tabs = Array.from(tabsList.querySelectorAll("[role=\"tab\"]")), focusedTabIndex = tabs.indexOf(focusedTab);
|
|
2290
|
+
event.key === "ArrowLeft" && (event.preventDefault(), tabs[(focusedTabIndex - 1 + tabs.length) % tabs.length]?.focus()), event.key === "ArrowRight" && (event.preventDefault(), tabs[(focusedTabIndex + 1) % tabs.length]?.focus()), event.key === "Home" && (event.preventDefault(), tabs[0]?.focus()), event.key === "End" && (event.preventDefault(), tabs[tabs.length - 1]?.focus());
|
|
2291
|
+
}
|
|
2292
|
+
function TabsList(props) {
|
|
2293
|
+
let $ = c(12), t0;
|
|
2294
|
+
$[0] === props ? t0 = $[1] : (t0 = getProps(props, tabsListProps), $[0] = props, $[1] = t0);
|
|
2295
|
+
let children, className, rest, style;
|
|
2296
|
+
$[2] === t0 ? (children = $[3], className = $[4], rest = $[5], style = $[6]) : ({children, className, style, ...rest} = t0, $[2] = t0, $[3] = children, $[4] = className, $[5] = rest, $[6] = style);
|
|
2297
|
+
let t1;
|
|
2298
|
+
return $[7] !== children || $[8] !== className || $[9] !== rest || $[10] !== style ? (t1 = /* @__PURE__ */ jsx(HStack, {
|
|
2299
|
+
...rest,
|
|
2300
|
+
role: "tablist",
|
|
2301
|
+
className,
|
|
2302
|
+
style,
|
|
2303
|
+
"data-ui": "Tabs.List",
|
|
2304
|
+
gap: 1,
|
|
2305
|
+
onKeyDown: handleKeyDown,
|
|
2306
|
+
children
|
|
2307
|
+
}), $[7] = children, $[8] = className, $[9] = rest, $[10] = style, $[11] = t1) : t1 = $[11], t1;
|
|
2308
|
+
}
|
|
2309
|
+
const tabClasses = clsx("sui-display-inline-flex", "sui-align-items-center", "sui-gap1", "sui-px2", "sui-py1", "sui-radius2", "sui-text-body1", "sui-weight-medium");
|
|
2310
|
+
function Tab(t0) {
|
|
2311
|
+
let $ = c(17), { value, tone: t1, ...props } = t0, { icon: IconProp, label, className, style, ...rest } = getProps({
|
|
2312
|
+
tone: t1 === void 0 ? "neutral" : t1,
|
|
2313
|
+
...props
|
|
2314
|
+
}, tabProps), { tabsRootId, value: contextValue, onValueChange } = useTabsContext(), selected = contextValue === value, t2 = clsx(tabClasses, className), t6;
|
|
2315
|
+
$[0] !== tabsRootId || $[1] !== value ? (t6 = getTabId(tabsRootId, value), $[0] = tabsRootId, $[1] = value, $[2] = t6) : t6 = $[2];
|
|
2316
|
+
let t7;
|
|
2317
|
+
$[3] !== tabsRootId || $[4] !== value ? (t7 = getPanelId(tabsRootId, value), $[3] = tabsRootId, $[4] = value, $[5] = t7) : t7 = $[5];
|
|
2318
|
+
let t8 = selected ? 0 : -1, t9 = (e) => {
|
|
2319
|
+
props.onClick?.(e), onValueChange(value);
|
|
2320
|
+
}, t10 = IconProp && (isValidElement(IconProp) ? IconProp : /* @__PURE__ */ jsx(Icon, {
|
|
2321
|
+
icon: IconProp,
|
|
2322
|
+
marginX: -1,
|
|
2323
|
+
marginY: -2,
|
|
2324
|
+
size: 1
|
|
2325
|
+
})), t11;
|
|
2326
|
+
return $[6] !== label || $[7] !== rest || $[8] !== selected || $[9] !== style || $[10] !== t10 || $[11] !== t2 || $[12] !== t6 || $[13] !== t7 || $[14] !== t8 || $[15] !== t9 ? (t11 = /* @__PURE__ */ jsxs("button", {
|
|
2327
|
+
className: t2,
|
|
2328
|
+
style,
|
|
2329
|
+
...rest,
|
|
2330
|
+
"data-ui": "Tabs.Tab",
|
|
2331
|
+
type: "button",
|
|
2332
|
+
role: "tab",
|
|
2333
|
+
id: t6,
|
|
2334
|
+
"aria-controls": t7,
|
|
2335
|
+
"aria-selected": selected,
|
|
2336
|
+
tabIndex: t8,
|
|
2337
|
+
onClick: t9,
|
|
2338
|
+
children: [t10, label]
|
|
2339
|
+
}), $[6] = label, $[7] = rest, $[8] = selected, $[9] = style, $[10] = t10, $[11] = t2, $[12] = t6, $[13] = t7, $[14] = t8, $[15] = t9, $[16] = t11) : t11 = $[16], t11;
|
|
2340
|
+
}
|
|
2341
|
+
function TabPanel(t0) {
|
|
2342
|
+
let $ = c(22), t1, value;
|
|
2343
|
+
if ($[0] !== t0) {
|
|
2344
|
+
let { value: t2, ...props } = t0;
|
|
2345
|
+
value = t2, t1 = getProps(props, tabsPanelProps), $[0] = t0, $[1] = t1, $[2] = value;
|
|
2346
|
+
} else t1 = $[1], value = $[2];
|
|
2347
|
+
let children, className, rest, style;
|
|
2348
|
+
$[3] === t1 ? (children = $[4], className = $[5], rest = $[6], style = $[7]) : ({children, className, style, ...rest} = t1, $[3] = t1, $[4] = children, $[5] = className, $[6] = rest, $[7] = style);
|
|
2349
|
+
let { tabsRootId, value: contextValue } = useTabsContext(), t2 = contextValue === value ? "block" : "none", t3;
|
|
2350
|
+
$[8] !== tabsRootId || $[9] !== value ? (t3 = getPanelId(tabsRootId, value), $[8] = tabsRootId, $[9] = value, $[10] = t3) : t3 = $[10];
|
|
2351
|
+
let t4;
|
|
2352
|
+
$[11] !== tabsRootId || $[12] !== value ? (t4 = getTabId(tabsRootId, value), $[11] = tabsRootId, $[12] = value, $[13] = t4) : t4 = $[13];
|
|
2353
|
+
let t5;
|
|
2354
|
+
return $[14] !== children || $[15] !== className || $[16] !== rest || $[17] !== style || $[18] !== t2 || $[19] !== t3 || $[20] !== t4 ? (t5 = /* @__PURE__ */ jsx(Box, {
|
|
2355
|
+
className,
|
|
2356
|
+
style,
|
|
2357
|
+
tabIndex: 0,
|
|
2358
|
+
...rest,
|
|
2359
|
+
"data-ui": "Tabs.Panel",
|
|
2360
|
+
display: t2,
|
|
2361
|
+
role: "tabpanel",
|
|
2362
|
+
id: t3,
|
|
2363
|
+
"aria-labelledby": t4,
|
|
2364
|
+
children
|
|
2365
|
+
}), $[14] = children, $[15] = className, $[16] = rest, $[17] = style, $[18] = t2, $[19] = t3, $[20] = t4, $[21] = t5) : t5 = $[21], t5;
|
|
2366
|
+
}
|
|
2367
|
+
TabsRoot.displayName = "Tabs";
|
|
2368
|
+
/** @public */
|
|
2369
|
+
const Tabs = TabsRoot;
|
|
2370
|
+
TabsRoot.List = TabsList, TabsRoot.Tab = Tab, TabsRoot.Panel = TabPanel;
|
|
2371
|
+
const textAreaProps = {
|
|
2372
|
+
autoResize: {
|
|
2373
|
+
type: "boolean",
|
|
2374
|
+
className: "field-sizing-content"
|
|
2375
|
+
},
|
|
2376
|
+
hasError: { type: "boolean" },
|
|
2377
|
+
maxHeight: heightProps.maxHeight,
|
|
2378
|
+
...formElementDensityProps
|
|
2379
|
+
}, textAreaClassName = suffixClassName("sui-TextArea");
|
|
2380
|
+
/** @public */
|
|
2381
|
+
function TextArea(t0) {
|
|
2382
|
+
let $ = c(10), hasError, rest, style, t1;
|
|
2383
|
+
if ($[0] !== t0) {
|
|
2384
|
+
let { autoResize, density: t2, hasError: t3, rows: t4, ...props } = t0;
|
|
2385
|
+
hasError = t3;
|
|
2386
|
+
let { className, style: t5, ...t6 } = getProps({
|
|
2387
|
+
autoResize,
|
|
2388
|
+
density: t2 === void 0 ? "regular" : t2,
|
|
2389
|
+
rows: t4 === void 0 ? 5 : t4,
|
|
2390
|
+
...props
|
|
2391
|
+
}, textAreaProps);
|
|
2392
|
+
style = t5, rest = t6, t1 = clsx(textAreaClassName, "sui-radius2", "sui-width-full", className), $[0] = t0, $[1] = hasError, $[2] = rest, $[3] = style, $[4] = t1;
|
|
2393
|
+
} else hasError = $[1], rest = $[2], style = $[3], t1 = $[4];
|
|
2394
|
+
let textAreaClasses = t1, t2 = hasError || void 0, t3;
|
|
2395
|
+
return $[5] !== rest || $[6] !== style || $[7] !== t2 || $[8] !== textAreaClasses ? (t3 = /* @__PURE__ */ jsx("textarea", {
|
|
2396
|
+
className: textAreaClasses,
|
|
2397
|
+
style,
|
|
2398
|
+
"data-ui": "TextArea",
|
|
2399
|
+
...rest,
|
|
2400
|
+
"aria-invalid": t2
|
|
2401
|
+
}), $[5] = rest, $[6] = style, $[7] = t2, $[8] = textAreaClasses, $[9] = t3) : t3 = $[9], t3;
|
|
2402
|
+
}
|
|
2403
|
+
const textInputProps = {
|
|
2404
|
+
hasError: { type: "boolean" },
|
|
2405
|
+
...formElementDensityProps
|
|
2406
|
+
}, textInputClassName = suffixClassName("sui-TextInput");
|
|
2407
|
+
/** @public */
|
|
2408
|
+
function TextInput(t0) {
|
|
2409
|
+
let $ = c(12), hasError, rest, style, t1, type;
|
|
2410
|
+
if ($[0] !== t0) {
|
|
2411
|
+
let { density: t2, hasError: t3, type: t4, ...props } = t0;
|
|
2412
|
+
hasError = t3;
|
|
2413
|
+
let density = t2 === void 0 ? "regular" : t2;
|
|
2414
|
+
type = t4 === void 0 ? "text" : t4;
|
|
2415
|
+
let { className, style: t5, ...t6 } = getProps({
|
|
2416
|
+
density,
|
|
2417
|
+
...props
|
|
2418
|
+
}, textInputProps);
|
|
2419
|
+
style = t5, rest = t6, t1 = clsx(textInputClassName, "sui-radius2", "sui-width-full", className), $[0] = t0, $[1] = hasError, $[2] = rest, $[3] = style, $[4] = t1, $[5] = type;
|
|
2420
|
+
} else hasError = $[1], rest = $[2], style = $[3], t1 = $[4], type = $[5];
|
|
2421
|
+
let textInputClasses = t1, t2 = hasError || void 0, t3;
|
|
2422
|
+
return $[6] !== rest || $[7] !== style || $[8] !== t2 || $[9] !== textInputClasses || $[10] !== type ? (t3 = /* @__PURE__ */ jsx("input", {
|
|
2423
|
+
type,
|
|
2424
|
+
className: textInputClasses,
|
|
2425
|
+
style,
|
|
2426
|
+
"data-ui": "TextInput",
|
|
2427
|
+
...rest,
|
|
2428
|
+
"aria-invalid": t2
|
|
2429
|
+
}), $[6] = rest, $[7] = style, $[8] = t2, $[9] = textInputClasses, $[10] = type, $[11] = t3) : t3 = $[11], t3;
|
|
2430
|
+
}
|
|
2431
|
+
const tooltipProps = {
|
|
2432
|
+
anchorName: { type: "string" },
|
|
2433
|
+
content: { type: "string" },
|
|
2434
|
+
portal: { type: "boolean" },
|
|
2435
|
+
...placementProps
|
|
2436
|
+
}, tooltipClassName = suffixClassName("sui-Tooltip");
|
|
2437
|
+
function TooltipRoot(t0) {
|
|
2438
|
+
let $ = c(7), { placement: t1, ...props } = t0, { children, className, style, id: idProp, anchorName, content, portal, triggerProps: forwardedTriggerProps, ...rest } = getProps({
|
|
2439
|
+
placement: t1 === void 0 ? "bottom" : t1,
|
|
2440
|
+
...props
|
|
2441
|
+
}, tooltipProps), reactId = useId(), id = idProp || reactId, [dismissed, setDismissed] = useState(!1), isClient = useIsClient(), t2, t3;
|
|
2442
|
+
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => {
|
|
2443
|
+
setDismissed(!1);
|
|
2444
|
+
}, t3 = () => {
|
|
2445
|
+
setDismissed(!1);
|
|
2446
|
+
}, $[0] = t2, $[1] = t3) : (t2 = $[0], t3 = $[1]);
|
|
2447
|
+
let triggerProps = {
|
|
2448
|
+
"aria-describedby": id,
|
|
2449
|
+
interestfor: id,
|
|
2450
|
+
style: { anchorName: `--anchor-${anchorName || id}` },
|
|
2451
|
+
onMouseLeave: t2,
|
|
2452
|
+
onBlur: t3,
|
|
2453
|
+
onClick: () => {
|
|
2454
|
+
setDismissed(!0), document.getElementById(id)?.hidePopover();
|
|
2455
|
+
}
|
|
2456
|
+
}, trigger = children.type.forwardsTriggerProps ? cloneElement(children, { triggerProps }) : cloneElement(children, mergeTriggerProps(children.props, forwardedTriggerProps, triggerProps)), t4;
|
|
2457
|
+
$[2] === dismissed ? t4 = $[3] : (t4 = (e) => {
|
|
2458
|
+
e.newState === "open" && dismissed && e.preventDefault();
|
|
2459
|
+
}, $[2] = dismissed, $[3] = t4);
|
|
2460
|
+
let handleBeforeToggle = t4, t5 = renderPortal(/* @__PURE__ */ jsx("div", {
|
|
2461
|
+
className: clsx(tooltipClassName, "sui-p2 sui-radius2 sui-position-fixed sui-shadow2 sui-text-body1 sui-text-trim-edge", className),
|
|
2462
|
+
style: {
|
|
2463
|
+
...style,
|
|
2464
|
+
positionAnchor: `--anchor-${anchorName || id}`
|
|
2465
|
+
},
|
|
2466
|
+
"data-ui": "Tooltip",
|
|
2467
|
+
role: "tooltip",
|
|
2468
|
+
popover: "hint",
|
|
2469
|
+
id,
|
|
2470
|
+
onBeforeToggle: handleBeforeToggle,
|
|
2471
|
+
...rest,
|
|
2472
|
+
children: content
|
|
2473
|
+
}), isClient, portal), t6;
|
|
2474
|
+
return $[4] !== t5 || $[5] !== trigger ? (t6 = /* @__PURE__ */ jsxs(Fragment, { children: [trigger, t5] }), $[4] = t5, $[5] = trigger, $[6] = t6) : t6 = $[6], t6;
|
|
2475
|
+
}
|
|
2476
|
+
/** @beta */
|
|
2477
|
+
const Tooltip = Object.assign(TooltipRoot, { forwardsTriggerProps: !0 }), tooltipGroupProps = { as: { type: "string" } }, tooltipGroupClassName = suffixClassName("sui-TooltipGroup");
|
|
2478
|
+
/** @public */
|
|
1804
2479
|
function TooltipGroup(props) {
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
Box,
|
|
1842
|
-
Button,
|
|
1843
|
-
Card,
|
|
1844
|
-
Checkbox,
|
|
1845
|
-
Code,
|
|
1846
|
-
Container,
|
|
1847
|
-
Divider,
|
|
1848
|
-
Eyebrow,
|
|
1849
|
-
Flex,
|
|
1850
|
-
Grid,
|
|
1851
|
-
HStack,
|
|
1852
|
-
Heading,
|
|
1853
|
-
Icon,
|
|
1854
|
-
IconButton,
|
|
1855
|
-
Indicator,
|
|
1856
|
-
IndicatorStack,
|
|
1857
|
-
Inline,
|
|
1858
|
-
Label,
|
|
1859
|
-
Link,
|
|
1860
|
-
List,
|
|
1861
|
-
PressArea,
|
|
1862
|
-
Radio,
|
|
1863
|
-
SkipToContent,
|
|
1864
|
-
Spinner,
|
|
1865
|
-
Switch,
|
|
1866
|
-
Text,
|
|
1867
|
-
Tooltip,
|
|
1868
|
-
TooltipGroup,
|
|
1869
|
-
VStack,
|
|
1870
|
-
VisuallyHidden
|
|
1871
|
-
};
|
|
1872
|
-
//# sourceMappingURL=index.js.map
|
|
2480
|
+
let $ = c(17), { as, children, className, style, ...rest } = getProps(props, tooltipGroupProps), Component = as || "div", ref = useRef(null), [isActive, setIsActive] = useState(!1), t0;
|
|
2481
|
+
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = (e) => {
|
|
2482
|
+
let tooltip = e.target.closest("[data-ui=\"Tooltip\"]");
|
|
2483
|
+
tooltip && e.propertyName === "opacity" && window.getComputedStyle(tooltip).opacity !== "0" && setIsActive(!0);
|
|
2484
|
+
}, $[0] = t0) : t0 = $[0];
|
|
2485
|
+
let handleTransitionEnd = t0, t1;
|
|
2486
|
+
$[1] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => {
|
|
2487
|
+
setIsActive(!1);
|
|
2488
|
+
}, $[1] = t1) : t1 = $[1];
|
|
2489
|
+
let handleMouseLeave = t1, t2;
|
|
2490
|
+
$[2] === Symbol.for("react.memo_cache_sentinel") ? (t2 = (e_0) => {
|
|
2491
|
+
ref.current && ref.current.contains(e_0.relatedTarget) || setIsActive(!1);
|
|
2492
|
+
}, $[2] = t2) : t2 = $[2];
|
|
2493
|
+
let handleBlur = t2, t3 = clsx(tooltipGroupClassName, className), t4;
|
|
2494
|
+
$[3] === isActive ? t4 = $[4] : (t4 = isActive && { "--tooltip-delay-group": "0ms" }, $[3] = isActive, $[4] = t4);
|
|
2495
|
+
let t5;
|
|
2496
|
+
$[5] !== style || $[6] !== t4 ? (t5 = {
|
|
2497
|
+
...style,
|
|
2498
|
+
...t4
|
|
2499
|
+
}, $[5] = style, $[6] = t4, $[7] = t5) : t5 = $[7];
|
|
2500
|
+
let t6;
|
|
2501
|
+
return $[8] !== Component || $[9] !== children || $[10] !== handleBlur || $[11] !== handleMouseLeave || $[12] !== handleTransitionEnd || $[13] !== rest || $[14] !== t3 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsx(Component, {
|
|
2502
|
+
className: t3,
|
|
2503
|
+
style: t5,
|
|
2504
|
+
"data-ui": "TooltipGroup",
|
|
2505
|
+
ref,
|
|
2506
|
+
onTransitionEnd: handleTransitionEnd,
|
|
2507
|
+
onMouseLeave: handleMouseLeave,
|
|
2508
|
+
onBlur: handleBlur,
|
|
2509
|
+
...rest,
|
|
2510
|
+
children
|
|
2511
|
+
}), $[8] = Component, $[9] = children, $[10] = handleBlur, $[11] = handleMouseLeave, $[12] = handleTransitionEnd, $[13] = rest, $[14] = t3, $[15] = t5, $[16] = t6) : t6 = $[16], t6;
|
|
2512
|
+
}
|
|
2513
|
+
export { Avatar, AvatarCounter, AvatarStack, Badge, Box, Button, Card, Checkbox, Code, Container, Dialog, Divider, Eyebrow, Flex, Grid, HStack, Heading, Hotkeys, Icon, IconButton, Indicator, IndicatorStack, Inline, KBD, Link, List, Popover, PressArea, Radio, Select, SkipToContent, Spinner, Switch, Tabs, Text, TextArea, TextInput, Tooltip, TooltipGroup, VStack, VisuallyHidden, useIsClient };
|
|
2514
|
+
|
|
2515
|
+
//# sourceMappingURL=index.js.map
|