@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.
Files changed (140) hide show
  1. package/README.md +1 -1
  2. package/dist/LazyRefractor-CQ22IeXB.js +19 -0
  3. package/dist/LazyRefractor-CQ22IeXB.js.map +1 -0
  4. package/dist/cli/install.js +2 -1
  5. package/dist/index.d.ts +826 -855
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +2439 -1796
  8. package/dist/index.js.map +1 -1
  9. package/dist/polyfills.d.ts +1 -0
  10. package/dist/polyfills.js +5 -0
  11. package/dist/polyfills.js.map +1 -0
  12. package/dist/styles.css +1 -1
  13. package/package.json +16 -9
  14. package/src/cli/install.ts +2 -1
  15. package/src/components/avatar/Avatar.tsx +50 -0
  16. package/src/components/avatar/avatar.css +51 -0
  17. package/src/components/avatar/avatar.props.ts +57 -0
  18. package/src/components/avatar-counter/AvatarCounter.tsx +38 -0
  19. package/src/components/avatar-counter/avatar-counter.css +8 -0
  20. package/src/components/avatar-counter/avatarCounter.props.ts +44 -0
  21. package/src/components/avatar-stack/AvatarStack.tsx +60 -0
  22. package/src/components/avatar-stack/avatar-stack.css +16 -0
  23. package/src/components/avatar-stack/avatarStack.props.ts +20 -0
  24. package/src/components/badge/Badge.tsx +53 -0
  25. package/src/components/badge/badge.css +6 -0
  26. package/src/components/badge/badge.props.ts +31 -0
  27. package/src/components/box/box.css +5 -0
  28. package/src/components/box/box.props.ts +7 -2
  29. package/src/components/button/Button.tsx +7 -1
  30. package/src/components/button/button.css +51 -23
  31. package/src/components/button/button.props.ts +27 -9
  32. package/src/components/card/Card.tsx +1 -1
  33. package/src/components/card/card.props.ts +10 -5
  34. package/src/components/checkbox/Checkbox.tsx +15 -29
  35. package/src/components/checkbox/checkbox.css +19 -20
  36. package/src/components/checkbox/checkbox.props.ts +11 -12
  37. package/src/components/code/Code.tsx +18 -19
  38. package/src/components/code/code.props.ts +23 -14
  39. package/src/components/container/Container.tsx +5 -1
  40. package/src/components/container/container.css +4 -0
  41. package/src/components/container/container.props.ts +6 -2
  42. package/src/components/dialog/Dialog.tsx +139 -0
  43. package/src/components/dialog/dialog.css +49 -0
  44. package/src/components/dialog/dialog.props.ts +45 -0
  45. package/src/components/eyebrow/eyebrow.props.ts +6 -2
  46. package/src/components/flex/flex.css +5 -0
  47. package/src/components/flex/flex.props.ts +6 -2
  48. package/src/components/grid/grid.css +5 -0
  49. package/src/components/grid/grid.props.ts +14 -3
  50. package/src/components/h-stack/HStack.tsx +8 -14
  51. package/src/components/h-stack/hStack.props.ts +5 -13
  52. package/src/components/heading/Heading.tsx +8 -3
  53. package/src/components/heading/heading.css +0 -5
  54. package/src/components/heading/heading.props.ts +16 -5
  55. package/src/components/hotkeys/Hotkeys.tsx +29 -0
  56. package/src/components/hotkeys/hotkeys.css +3 -0
  57. package/src/components/hotkeys/hotkeys.props.ts +15 -0
  58. package/src/components/icon/Icon.tsx +22 -11
  59. package/src/components/icon/icon.props.ts +7 -3
  60. package/src/components/icon-button/iconButton.props.ts +7 -2
  61. package/src/components/index.css +12 -1
  62. package/src/components/indicator/indicator.css +1 -1
  63. package/src/components/indicator/indicator.props.ts +6 -2
  64. package/src/components/indicator-stack/indicatorStack.props.ts +3 -1
  65. package/src/components/inline/inline.props.ts +6 -2
  66. package/src/components/kbd/KBD.tsx +33 -0
  67. package/src/components/kbd/kbd.css +6 -0
  68. package/src/components/kbd/kbd.props.ts +20 -0
  69. package/src/components/link/link.props.ts +4 -4
  70. package/src/components/list/list.props.ts +27 -9
  71. package/src/components/popover/Popover.tsx +85 -0
  72. package/src/components/popover/popover.css +21 -0
  73. package/src/components/popover/popover.props.ts +38 -0
  74. package/src/components/press-area/pressArea.props.ts +3 -1
  75. package/src/components/radio/Radio.tsx +10 -28
  76. package/src/components/radio/radio.css +17 -32
  77. package/src/components/radio/radio.props.ts +1 -19
  78. package/src/components/select/Select.tsx +41 -0
  79. package/src/components/select/select.css +67 -0
  80. package/src/components/select/select.props.ts +18 -0
  81. package/src/components/skip-to-content/skipToContent.props.ts +9 -3
  82. package/src/components/spinner/Spinner.tsx +2 -1
  83. package/src/components/spinner/spinner.props.ts +3 -0
  84. package/src/components/switch/Switch.tsx +9 -21
  85. package/src/components/switch/switch.css +22 -23
  86. package/src/components/switch/switch.props.ts +7 -11
  87. package/src/components/tabs/Tabs.tsx +186 -0
  88. package/src/components/tabs/tabs.css +34 -0
  89. package/src/components/tabs/tabs.props.ts +66 -0
  90. package/src/components/text/text.props.ts +6 -2
  91. package/src/components/text-area/TextArea.tsx +32 -0
  92. package/src/components/text-area/text-area.css +56 -0
  93. package/src/components/text-area/textArea.props.ts +35 -0
  94. package/src/components/text-input/TextInput.tsx +32 -0
  95. package/src/components/text-input/text-input.css +55 -0
  96. package/src/components/text-input/textInput.props.ts +42 -0
  97. package/src/components/tooltip/Tooltip.tsx +59 -55
  98. package/src/components/tooltip/tooltip.css +21 -40
  99. package/src/components/tooltip/tooltip.props.ts +24 -8
  100. package/src/components/tooltip-group/TooltipGroup.tsx +2 -5
  101. package/src/components/tooltip-group/tooltipGroup.props.ts +3 -1
  102. package/src/components/v-stack/VStack.tsx +8 -14
  103. package/src/components/v-stack/vStack.props.ts +5 -13
  104. package/src/components/visually-hidden/visuallyHidden.props.ts +6 -2
  105. package/src/css/classes/dynamic/height.css +2 -0
  106. package/src/css/classes/generic/display.css +8 -8
  107. package/src/css/classes/generic/placement.css +105 -86
  108. package/src/css/classes/local/animation.css +4 -0
  109. package/src/css/classes/local/field-sizing.css +3 -0
  110. package/src/css/classes/local/index.css +3 -1
  111. package/src/css/classes/local/text-trim.css +11 -4
  112. package/src/css/classes/local/top-anchor.css +4 -0
  113. package/src/css/classes/system/shadow.css +6 -6
  114. package/src/css/classes/system/typography.css +0 -4
  115. package/src/css/global/reset.css +16 -1
  116. package/src/css/tokens/semantic.css +7 -6
  117. package/src/css/tokens/surface.css +80 -12
  118. package/src/hooks/useIsClient.ts +10 -0
  119. package/src/index.ts +17 -2
  120. package/src/polyfills.ts +17 -0
  121. package/src/props/formElement.ts +34 -0
  122. package/src/props/layout.ts +3 -3
  123. package/src/props/tone.ts +13 -2
  124. package/src/types/Avatar.ts +14 -0
  125. package/src/types/Code.ts +0 -3
  126. package/src/types/Eyebrow.ts +1 -1
  127. package/src/types/FormElement.ts +2 -0
  128. package/src/types/Heading.ts +1 -1
  129. package/src/types/TextAlign.ts +1 -1
  130. package/src/types/Tone.ts +2 -0
  131. package/src/utils/getProps.ts +1 -1
  132. package/src/utils/mergeTriggerProps.ts +66 -0
  133. package/src/utils/renderPortal.tsx +14 -0
  134. package/src/version.ts +2 -2
  135. package/dist/_chunks-es/LazyRefractor.js +0 -20
  136. package/dist/_chunks-es/LazyRefractor.js.map +0 -1
  137. package/src/components/label/Label.tsx +0 -34
  138. package/src/components/label/label.css +0 -3
  139. package/src/components/label/label.props.ts +0 -19
  140. 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 { isValidElement, useRef, useEffect, lazy, Suspense, Children, useId, useState, cloneElement } from "react";
6
- import { SpinnerIcon, RemoveIcon, CheckmarkIcon } from "@sanity/icons";
7
- const PREFIX = "sui", BREAKPOINTS_LENGTH = 6;
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
- const {
10
- allComponentProps,
11
- allPropDefs
12
- } = flattenCompositeProps(componentProps, propDefs), restProps = {};
13
- let className = componentProps?.className || "", style = componentProps?.style || {};
14
- for (const key in allComponentProps) {
15
- const 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))
21
- for (let i = 0, len = Math.min(propValue.length, BREAKPOINTS_LENGTH); i < len; i++) {
22
- const resolvedPropDef = getResolvedPropDef(propValue[i], propDef);
23
- resolvedPropDef && (className = clsx(className, getClassName(propValue[i], resolvedPropDef, i)), style = {
24
- ...style,
25
- ...getStyle(propValue[i], resolvedPropDef, i)
26
- });
27
- }
28
- else {
29
- const resolvedPropDef = getResolvedPropDef(propValue, propDef);
30
- if (!resolvedPropDef) {
31
- restProps[key] = propValue;
32
- continue;
33
- }
34
- className = clsx(className, getClassName(propValue, resolvedPropDef)), style = {
35
- ...style,
36
- ...getStyle(propValue, resolvedPropDef)
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
- if (propDef?.type !== "conditional")
48
- return propDef;
49
- const resolvedPropDef = propDef.resolve(propValue);
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
- if (propDef.type === "union" && propDef.values?.includes(propValue))
54
- return `${PREFIX}-${propDef.className}${typeof propValue == "string" ? `-${propValue}` : propValue}${bp ? `-bp-${bp}` : ""}`;
55
- if (propDef.type === "string" || propDef.type === "number")
56
- return `${PREFIX}-${propDef.className}${bp ? `-bp-${bp}` : ""}`;
57
- if (propDef.type === "boolean") {
58
- if (propValue)
59
- return `${PREFIX}-${propDef.className}${bp ? `-bp-${bp}` : ""}`;
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
- return (propDef.type === "string" || propDef.type === "number") && propDef.variable ? {
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
- const props = {
72
- allComponentProps: {},
73
- allPropDefs: {}
74
- };
75
- for (const key in componentProps)
76
- if (propDefs?.[key] && propDefs?.[key].type === "composite")
77
- for (const compositeKey in propDefs?.[key].composition) {
78
- const compositeValue = getCompositeValue(componentProps[key], propDefs[key], compositeKey);
79
- props.allComponentProps[compositeKey] = compositeValue, props.allPropDefs[compositeKey] = propDefs[key].composition[compositeKey]?.propDef;
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
- if (!("composition" in propDef))
87
- return;
88
- const mapping = propDef.composition[key]?.mapping;
89
- let compositeValue;
90
- if (Array.isArray(propValue)) {
91
- compositeValue = [];
92
- for (let i = 0, len = propValue.length; i < len; i++)
93
- compositeValue[i] = mapping?.[propValue[i]];
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
- return `${className}-${HASH}`;
101
- }
102
- const RADIUS = [0, 1, 2, 3, 4, 5, 6, "full"], borderProps = {
103
- border: {
104
- type: "boolean",
105
- className: "border",
106
- inverseClassName: "border-none"
107
- },
108
- borderTop: {
109
- type: "boolean",
110
- className: "border-top",
111
- inverseClassName: "border-top-none"
112
- },
113
- borderRight: {
114
- type: "boolean",
115
- className: "border-right",
116
- inverseClassName: "border-right-none"
117
- },
118
- borderBottom: {
119
- type: "boolean",
120
- className: "border-bottom",
121
- inverseClassName: "border-bottom-none"
122
- },
123
- borderLeft: {
124
- type: "boolean",
125
- className: "border-left",
126
- inverseClassName: "border-left-none"
127
- },
128
- radius: {
129
- type: "union",
130
- className: "radius",
131
- values: RADIUS
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
- flexBasis: {
135
- type: "string",
136
- className: "flex-basis",
137
- variable: "--flex-basis"
138
- },
139
- flexGrow: {
140
- type: "number",
141
- className: "flex-grow",
142
- variable: "--flex-grow"
143
- },
144
- flexShrink: {
145
- type: "number",
146
- className: "flex-shrink",
147
- variable: "--flex-shrink"
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
- gridColumn: {
151
- type: "string",
152
- className: "grid-column",
153
- variable: "--grid-column"
154
- },
155
- gridColumnStart: {
156
- type: "string",
157
- className: "grid-column-start",
158
- variable: "--grid-column-start"
159
- },
160
- gridColumnEnd: {
161
- type: "string",
162
- className: "grid-column-end",
163
- variable: "--grid-column-end"
164
- },
165
- gridRow: {
166
- type: "string",
167
- className: "grid-row",
168
- variable: "--grid-row"
169
- },
170
- gridRowStart: {
171
- type: "string",
172
- className: "grid-row-start",
173
- variable: "--grid-row-start"
174
- },
175
- gridRowEnd: {
176
- type: "string",
177
- className: "grid-row-end",
178
- variable: "--grid-row-end"
179
- }
180
- }, heightProps = {
181
- height: {
182
- type: "string",
183
- className: "height",
184
- variable: "--height"
185
- },
186
- minHeight: {
187
- type: "string",
188
- className: "min-height",
189
- variable: "--min-height"
190
- },
191
- maxHeight: {
192
- type: "string",
193
- className: "max-height",
194
- variable: "--max-height"
195
- }
196
- }, SPACE = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], SPACE_AUTO = [...SPACE, "auto"], SPACE_INHERIT = [...SPACE, "inherit"], SPACE_AUTO_NEGATIVE = [-9, -8, -7, -6, -5, -4, -3, -2, -1, ...SPACE, "auto"], marginProps = {
197
- margin: {
198
- type: "union",
199
- className: "m",
200
- values: SPACE_AUTO_NEGATIVE
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
- padding: {
250
- type: "union",
251
- className: "p",
252
- values: SPACE
253
- },
254
- paddingX: {
255
- type: "union",
256
- className: "px",
257
- values: SPACE
258
- },
259
- paddingY: {
260
- type: "union",
261
- className: "py",
262
- values: SPACE
263
- },
264
- paddingTop: {
265
- type: "union",
266
- className: "pt",
267
- values: SPACE
268
- },
269
- paddingRight: {
270
- type: "union",
271
- className: "pr",
272
- values: SPACE
273
- },
274
- paddingBottom: {
275
- type: "union",
276
- className: "pb",
277
- values: SPACE
278
- },
279
- paddingLeft: {
280
- type: "union",
281
- className: "pl",
282
- values: SPACE
283
- }
284
- }, POSITION = ["absolute", "fixed", "relative", "static", "sticky"], positionProps = {
285
- position: {
286
- type: "union",
287
- className: "position",
288
- values: POSITION
289
- },
290
- inset: {
291
- type: "union",
292
- className: "inset",
293
- values: SPACE_AUTO
294
- },
295
- top: {
296
- type: "union",
297
- className: "top",
298
- values: SPACE_AUTO
299
- },
300
- right: {
301
- type: "union",
302
- className: "right",
303
- values: SPACE_AUTO
304
- },
305
- bottom: {
306
- type: "union",
307
- className: "bottom",
308
- values: SPACE_AUTO
309
- },
310
- left: {
311
- type: "union",
312
- className: "left",
313
- values: SPACE_AUTO
314
- }
315
- }, SHADOW = [0, 1, 2, 3, 4, 5], shadowProps = {
316
- shadow: {
317
- type: "union",
318
- className: "shadow",
319
- values: SHADOW
320
- }
321
- }, TONE = ["neutral", "positive", "suggest", "caution", "critical"], toneProps = {
322
- tone: {
323
- type: "union",
324
- className: "tone",
325
- values: TONE
326
- }
327
- }, widthProps = {
328
- width: {
329
- type: "string",
330
- className: "width",
331
- variable: "--width"
332
- },
333
- minWidth: {
334
- type: "string",
335
- className: "min-width",
336
- variable: "--min-width"
337
- },
338
- maxWidth: {
339
- type: "string",
340
- className: "max-width",
341
- variable: "--max-width"
342
- }
343
- }, zIndexProps = {
344
- zIndex: {
345
- type: "number",
346
- className: "z-index",
347
- variable: "--z-index"
348
- }
349
- }, layoutProps = {
350
- ...toneProps,
351
- ...widthProps,
352
- ...heightProps,
353
- ...marginProps,
354
- ...borderProps,
355
- ...paddingProps,
356
- ...positionProps,
357
- ...overflowProps,
358
- ...flexChildProps,
359
- ...gridChildProps,
360
- ...shadowProps,
361
- ...zIndexProps
362
- }, DISPLAY_BLOCK = ["block", "inline-block", "none"], DISPLAY_FLEX = ["flex", "inline-flex", "none"], DISPLAY_GRID = ["grid", "inline-grid", "none"], boxProps = {
363
- as: {
364
- type: "string"
365
- },
366
- display: {
367
- type: "union",
368
- className: "display",
369
- values: DISPLAY_BLOCK
370
- },
371
- ...layoutProps
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
- const $ = c(12);
375
- let T0, children, rest, style, t1;
376
- if ($[0] !== t0) {
377
- const {
378
- display: t22,
379
- ...props
380
- } = t0, display = t22 === void 0 ? "block" : t22, {
381
- as,
382
- children: t3,
383
- className,
384
- style: t4,
385
- ...t5
386
- } = getProps({
387
- display,
388
- ...props
389
- }, boxProps);
390
- 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;
391
- } else
392
- T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5];
393
- let t2;
394
- return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Box", ...rest, children }), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
395
- }
396
- const ALIGN_ITEMS = ["baseline", "center", "flex-end", "flex-start", "stretch"], JUSTIFY_CONTENT = ["flex-start", "flex-end", "center", "space-between", "space-around", "space-evenly"], FLEX_DIRECTION = ["row", "row-reverse", "column", "column-reverse"], FLEX_WRAP = ["wrap", "wrap-reverse", "nowrap"], flexParentProps = {
397
- alignItems: {
398
- type: "union",
399
- className: "align-items",
400
- values: ALIGN_ITEMS
401
- },
402
- justifyContent: {
403
- type: "union",
404
- className: "justify-content",
405
- values: JUSTIFY_CONTENT
406
- },
407
- flexDirection: {
408
- type: "union",
409
- className: "flex-direction",
410
- values: FLEX_DIRECTION
411
- },
412
- flexWrap: {
413
- type: "union",
414
- className: "flex",
415
- values: FLEX_WRAP
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
- gap: {
419
- type: "union",
420
- className: "gap",
421
- values: SPACE_INHERIT
422
- },
423
- rowGap: {
424
- type: "union",
425
- className: "row-gap",
426
- values: SPACE_INHERIT
427
- },
428
- columnGap: {
429
- type: "union",
430
- className: "column-gap",
431
- values: SPACE_INHERIT
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
- as: {
435
- type: "string"
436
- },
437
- display: {
438
- type: "union",
439
- className: "display",
440
- values: DISPLAY_FLEX
441
- },
442
- ...flexParentProps,
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
- const $ = c(12);
448
- let T0, children, rest, style, t1;
449
- if ($[0] !== t0) {
450
- const {
451
- display: t22,
452
- ...props
453
- } = t0, display = t22 === void 0 ? "flex" : t22, {
454
- as,
455
- children: t3,
456
- className,
457
- style: t4,
458
- ...t5
459
- } = getProps({
460
- display,
461
- ...props
462
- }, flexProps);
463
- 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;
464
- } else
465
- T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5];
466
- let t2;
467
- return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Flex", ...rest, children }), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
468
- }
469
- const FONT_WEIGHT = ["regular", "medium", "semibold", "bold"], TEXT_ALIGN = ["left", "center", "right", "justify"], typographyProps = {
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
- const $ = c(12);
550
- let T0, rest, style, t1, t2;
551
- if ($[0] !== t0) {
552
- const {
553
- size: t32,
554
- ...props
555
- } = t0, size = t32 === void 0 ? 2 : t32, {
556
- className,
557
- style: t4,
558
- ...t5
559
- } = getProps({
560
- size,
561
- ...props
562
- }, spinnerProps);
563
- style = t4, rest = t5, T0 = Icon, t1 = SpinnerIcon, t2 = clsx(spinnerClassName, className), $[0] = t0, $[1] = T0, $[2] = rest, $[3] = style, $[4] = t1, $[5] = t2;
564
- } else
565
- T0 = $[1], rest = $[2], style = $[3], t1 = $[4], t2 = $[5];
566
- let t3;
567
- return $[6] !== T0 || $[7] !== rest || $[8] !== style || $[9] !== t1 || $[10] !== t2 ? (t3 = /* @__PURE__ */ jsx(T0, { icon: t1, className: t2, style, "data-ui": "Spinner", role: "status", "aria-label": "Loading...", ...rest }), $[6] = T0, $[7] = rest, $[8] = style, $[9] = t1, $[10] = t2, $[11] = t3) : t3 = $[11], t3;
568
- }
569
- const TEXT_SIZE = [0, 1, 2, 3, 4], textProps = {
570
- as: {
571
- type: "string"
572
- },
573
- size: {
574
- type: "union",
575
- className: "text-body",
576
- values: TEXT_SIZE
577
- },
578
- ...typographyProps
579
- }, textClassName = suffixClassName("sui-Text");
580
- function Text(t0) {
581
- const $ = c(15);
582
- let T0, children, rest, style, t1, t2;
583
- if ($[0] !== t0) {
584
- t2 = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
585
- bb0: {
586
- const {
587
- size: t32,
588
- ...props
589
- } = t0, size = t32 === void 0 ? 2 : t32, {
590
- as,
591
- children: t4,
592
- className,
593
- style: t5,
594
- ...t6
595
- } = getProps({
596
- size,
597
- ...props
598
- }, textProps);
599
- children = t4, style = t5, rest = t6;
600
- const Component = as || "span";
601
- if (props.truncate && props.trim) {
602
- const t7 = clsx(textClassName, className?.replace("sui-line-clamp", "").replace("sui-text-overflow", "")), t8 = props.truncate === 1 ? "sui-text-overflow" : "sui-line-clamp";
603
- let t9;
604
- $[7] !== t8 ? (t9 = clsx("sui-overflow-hidden", t8), $[7] = t8, $[8] = t9) : t9 = $[8], t2 = /* @__PURE__ */ jsx(Component, { className: t7, style, "data-ui": "Text", ...rest, children: /* @__PURE__ */ jsx("span", { className: t9, children }) });
605
- break bb0;
606
- }
607
- T0 = Component, t1 = clsx(textClassName, props.truncate && "sui-overflow-hidden", className);
608
- }
609
- $[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1, $[6] = t2;
610
- } else
611
- T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5], t2 = $[6];
612
- if (t2 !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
613
- return t2;
614
- let t3;
615
- return $[9] !== T0 || $[10] !== children || $[11] !== rest || $[12] !== style || $[13] !== t1 ? (t3 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Text", ...rest, children }), $[9] = T0, $[10] = children, $[11] = rest, $[12] = style, $[13] = t1, $[14] = t3) : t3 = $[14], t3;
616
- }
617
- const BUTTON_DENSITY = ["regular", "loose"], BUTTON_LEVEL = ["primary", "secondary", "tertiary"], BUTTON_TONE = ["neutral", "critical"], buttonProps = {
618
- as: {
619
- type: "string"
620
- },
621
- density: {
622
- type: "composite",
623
- values: BUTTON_DENSITY,
624
- composition: {
625
- gap: {
626
- propDef: gapProps.gap,
627
- mapping: {
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
- const $ = c(26);
685
- let T0, t1, t10, t11, t2, t3, t4, t5, t6, t7, t8, t9;
686
- if ($[0] !== t0) {
687
- const {
688
- density: t122,
689
- level: t13,
690
- tone: t14,
691
- ...props
692
- } = t0, density = t122 === void 0 ? "regular" : t122, level = t13 === void 0 ? "primary" : t13, tone = t14 === void 0 ? "neutral" : t14, {
693
- as,
694
- children,
695
- className,
696
- disabled,
697
- style,
698
- iconStart: IconStart,
699
- iconEnd: IconEnd,
700
- loading,
701
- text,
702
- ...rest
703
- } = getProps({
704
- density,
705
- level,
706
- tone,
707
- ...props
708
- }, buttonProps);
709
- 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, { position: "absolute", inset: 0, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx(Spinner, {}) }), t8 = IconStart && (isValidElement(IconStart) ? IconStart : /* @__PURE__ */ jsx(Icon, { icon: IconStart, marginX: -1, marginY: -2, size: 1 })), t9 = text && /* @__PURE__ */ jsx(Text, { size: 1, weight: "medium", trim: !0, children: text }), t10 = children, t11 = IconEnd && (isValidElement(IconEnd) ? IconEnd : /* @__PURE__ */ jsx(Icon, { icon: IconEnd, marginX: -1, marginY: -2, size: 1 })), $[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;
710
- } else
711
- T0 = $[1], t1 = $[2], t10 = $[3], t11 = $[4], t2 = $[5], t3 = $[6], t4 = $[7], t5 = $[8], t6 = $[9], t7 = $[10], t8 = $[11], t9 = $[12];
712
- let t12;
713
- 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, { className: t1, style: t2, "data-ui": t3, disabled: t4, "aria-busy": t5, ...t6, children: [
714
- t7,
715
- t8,
716
- t9,
717
- t10,
718
- t11
719
- ] }), $[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;
720
- }
721
- const DENSITY = ["compact", "regular", "loose"], cardProps = {
722
- as: {
723
- type: "string"
724
- },
725
- density: {
726
- type: "composite",
727
- values: DENSITY,
728
- composition: {
729
- gap: {
730
- propDef: gapProps.gap,
731
- mapping: {
732
- compact: 2,
733
- regular: 3,
734
- loose: 4
735
- }
736
- },
737
- padding: {
738
- propDef: paddingProps.padding,
739
- mapping: {
740
- compact: 3,
741
- regular: 4,
742
- loose: 5
743
- }
744
- },
745
- radius: {
746
- propDef: borderProps.radius,
747
- mapping: {
748
- compact: 2,
749
- regular: 3,
750
- loose: 4
751
- }
752
- }
753
- }
754
- },
755
- ...toneProps,
756
- ...marginProps
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
- const $ = c(12);
760
- let T0, children, rest, style, t1;
761
- if ($[0] !== t0) {
762
- const {
763
- density: t22,
764
- tone: t3,
765
- ...props
766
- } = t0, density = t22 === void 0 ? "regular" : t22, tone = t3 === void 0 ? "neutral" : t3, {
767
- as,
768
- children: t4,
769
- className,
770
- style: t5,
771
- ...t6
772
- } = getProps({
773
- density,
774
- tone,
775
- ...props
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
- error: {
838
- type: "boolean"
839
- },
840
- indeterminate: {
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
- const $ = c(6), inputRef = useRef(null), {
850
- className,
851
- style,
852
- disabled,
853
- error,
854
- indeterminate,
855
- label,
856
- ...rest
857
- } = getProps(props, checkboxProps);
858
- useEffect(() => {
859
- inputRef.current && (inputRef.current.indeterminate = indeterminate);
860
- }, [indeterminate]);
861
- const t0 = clsx(checkboxClassName, className), T0 = Box, t1 = "span", t2 = clsx(checkboxMarkClassName, error && "sui-error");
862
- let t3;
863
- $[0] !== indeterminate ? (t3 = indeterminate ? /* @__PURE__ */ jsx(RemoveIcon, {}) : /* @__PURE__ */ jsx(CheckmarkIcon, {}), $[0] = indeterminate, $[1] = t3) : t3 = $[1];
864
- let t4;
865
- return $[2] !== T0 || $[3] !== t2 || $[4] !== t3 ? (t4 = /* @__PURE__ */ jsx(T0, { as: t1, className: t2, position: "relative", radius: 2, width: "17px", height: "17px", children: t3 }), $[2] = T0, $[3] = t2, $[4] = t3, $[5] = t4) : t4 = $[5], /* @__PURE__ */ jsxs(Label, { className: t0, style, "data-ui": "Checkbox", disabled, error, children: [
866
- /* @__PURE__ */ jsx(VisuallyHidden, { as: "input", type: "checkbox", className: checkboxInputClassName, ref: inputRef, disabled, ...rest }),
867
- t4,
868
- label
869
- ] });
870
- }
871
- const CODE_TAG = ["pre", "span"], CODE_SIZE = [0, 1, 2, 3, 4], codeProps = {
872
- as: {
873
- type: "union",
874
- values: CODE_TAG
875
- },
876
- language: {
877
- type: "string"
878
- },
879
- size: {
880
- type: "union",
881
- className: "text-code",
882
- values: CODE_SIZE
883
- },
884
- muted: typographyProps.muted,
885
- trim: typographyProps.trim,
886
- weight: typographyProps.weight,
887
- ...marginProps
888
- }, LazyRefractor = lazy(() => import("./_chunks-es/LazyRefractor.js")), codeClassName = suffixClassName("sui-Code");
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
- const $ = c(22);
891
- let T0, children, language, rest, style, t1, t2;
892
- if ($[0] !== t0) {
893
- t2 = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
894
- bb0: {
895
- const {
896
- size: t32,
897
- ...props
898
- } = t0, size = t32 === void 0 ? 2 : t32, {
899
- as,
900
- children: t42,
901
- className,
902
- language: t52,
903
- style: t62,
904
- ...t7
905
- } = getProps({
906
- size,
907
- ...props
908
- }, codeProps);
909
- children = t42, language = t52, style = t62, rest = t7;
910
- const Component = as || "pre";
911
- if (!language) {
912
- t2 = /* @__PURE__ */ jsx(Component, { className: clsx(codeClassName, className), style, "data-ui": "Code", ...rest, children: /* @__PURE__ */ jsx("code", { children }) });
913
- break bb0;
914
- }
915
- T0 = Component, t1 = clsx(codeClassName, className);
916
- }
917
- $[0] = t0, $[1] = T0, $[2] = children, $[3] = language, $[4] = rest, $[5] = style, $[6] = t1, $[7] = t2;
918
- } else
919
- T0 = $[1], children = $[2], language = $[3], rest = $[4], style = $[5], t1 = $[6], t2 = $[7];
920
- if (t2 !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
921
- return t2;
922
- let t3;
923
- $[8] !== children ? (t3 = /* @__PURE__ */ jsx("code", { children }), $[8] = children, $[9] = t3) : t3 = $[9];
924
- let t4;
925
- $[10] !== children || $[11] !== language ? (t4 = /* @__PURE__ */ jsx(LazyRefractor, { language, value: children }), $[10] = children, $[11] = language, $[12] = t4) : t4 = $[12];
926
- let t5;
927
- $[13] !== t3 || $[14] !== t4 ? (t5 = /* @__PURE__ */ jsx(Suspense, { fallback: t3, children: t4 }), $[13] = t3, $[14] = t4, $[15] = t5) : t5 = $[15];
928
- let t6;
929
- return $[16] !== T0 || $[17] !== rest || $[18] !== style || $[19] !== t1 || $[20] !== t5 ? (t6 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Code", ...rest, children: t5 }), $[16] = T0, $[17] = rest, $[18] = style, $[19] = t1, $[20] = t5, $[21] = t6) : t6 = $[21], t6;
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
- const $ = c(12);
944
- let T0, children, rest, style, t1;
945
- if ($[0] !== t0) {
946
- const {
947
- marginX: t22,
948
- ...props
949
- } = t0, marginX = t22 === void 0 ? "auto" : t22, {
950
- as,
951
- children: t3,
952
- className,
953
- style: t4,
954
- ...t5
955
- } = getProps({
956
- marginX,
957
- ...props
958
- }, containerProps);
959
- children = t3, style = t4, rest = t5, T0 = as || "div", t1 = clsx(containerClassName, className), $[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1;
960
- } else
961
- T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5];
962
- let t2;
963
- return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Container", ...rest, children }), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
964
- }
965
- const dividerProps = {
966
- ...marginProps
967
- }, dividerClassName = suffixClassName("sui-Divider");
968
- function Divider(props) {
969
- const $ = c(8);
970
- let rest, style, t0;
971
- if ($[0] !== props) {
972
- const {
973
- className,
974
- style: t12,
975
- ...t2
976
- } = getProps(props, dividerProps);
977
- style = t12, rest = t2, t0 = clsx(dividerClassName, "sui-border-none sui-border-top", className), $[0] = props, $[1] = rest, $[2] = style, $[3] = t0;
978
- } else
979
- rest = $[1], style = $[2], t0 = $[3];
980
- let t1;
981
- return $[4] !== rest || $[5] !== style || $[6] !== t0 ? (t1 = /* @__PURE__ */ jsx("hr", { className: t0, style, "data-ui": "Divider", ...rest }), $[4] = rest, $[5] = style, $[6] = t0, $[7] = t1) : t1 = $[7], t1;
982
- }
983
- const EYEBROW_SIZE = [0, 1, 2, 3, 4], eyebrowProps = {
984
- as: {
985
- type: "string"
986
- },
987
- size: {
988
- type: "union",
989
- className: "text-eyebrow",
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
- const $ = c(15);
1134
- let T0, children, rest, style, t1, t2;
1135
- if ($[0] !== t0) {
1136
- t2 = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
1137
- bb0: {
1138
- const {
1139
- size: t32,
1140
- weight: t4,
1141
- ...props
1142
- } = t0, size = t32 === void 0 ? 2 : t32, weight = t4 === void 0 ? "bold" : t4, {
1143
- as,
1144
- children: t5,
1145
- className,
1146
- style: t6,
1147
- ...t7
1148
- } = getProps({
1149
- size,
1150
- weight,
1151
- ...props
1152
- }, headingProps);
1153
- children = t5, style = t6, rest = t7;
1154
- const Component = as || "h2";
1155
- if (props.truncate && props.trim) {
1156
- const t8 = clsx(headingClassName, className?.replace("sui-line-clamp", "").replace("sui-text-overflow", "")), t9 = props.truncate === 1 ? "sui-text-overflow" : "sui-line-clamp";
1157
- let t10;
1158
- $[7] !== t9 ? (t10 = clsx("sui-overflow-hidden", t9), $[7] = t9, $[8] = t10) : t10 = $[8], t2 = /* @__PURE__ */ jsx(Component, { className: t8, style, "data-ui": "Heading", ...rest, children: /* @__PURE__ */ jsx("span", { className: t10, children }) });
1159
- break bb0;
1160
- }
1161
- T0 = Component, t1 = clsx(headingClassName, props.truncate && "sui-overflow-hidden", className);
1162
- }
1163
- $[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1, $[6] = t2;
1164
- } else
1165
- T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5], t2 = $[6];
1166
- if (t2 !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
1167
- return t2;
1168
- let t3;
1169
- return $[9] !== T0 || $[10] !== children || $[11] !== rest || $[12] !== style || $[13] !== t1 ? (t3 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Heading", ...rest, children }), $[9] = T0, $[10] = children, $[11] = rest, $[12] = style, $[13] = t1, $[14] = t3) : t3 = $[14], t3;
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
- "aria-label": {
1173
- type: "string"
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
- const $ = c(16);
1182
- let IconProp, T0, rest, style, t0, t1;
1183
- if ($[0] !== props) {
1184
- const {
1185
- as,
1186
- className,
1187
- style: t22,
1188
- icon: t32,
1189
- ...t4
1190
- } = getProps(props, iconButtonProps);
1191
- style = t22, IconProp = t32, rest = t4;
1192
- const Component = as || "button";
1193
- T0 = Button, t0 = Component, t1 = clsx(iconButtonClassName, className), $[0] = props, $[1] = IconProp, $[2] = T0, $[3] = rest, $[4] = style, $[5] = t0, $[6] = t1;
1194
- } else
1195
- IconProp = $[1], T0 = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6];
1196
- let t2;
1197
- $[7] !== IconProp ? (t2 = /* @__PURE__ */ jsx(Icon, { icon: IconProp, margin: -2, size: 1 }), $[7] = IconProp, $[8] = t2) : t2 = $[8];
1198
- let t3;
1199
- return $[9] !== T0 || $[10] !== rest || $[11] !== style || $[12] !== t0 || $[13] !== t1 || $[14] !== t2 ? (t3 = /* @__PURE__ */ jsx(T0, { as: t0, className: t1, style, "data-ui": "IconButton", ...rest, children: t2 }), $[9] = T0, $[10] = rest, $[11] = style, $[12] = t0, $[13] = t1, $[14] = t2, $[15] = t3) : t3 = $[15], t3;
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
- as: {
1203
- type: "string"
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
- const $ = c(18);
1212
- let T0, ariaLabel, children, rest, style, t1, t2;
1213
- if ($[0] !== t0) {
1214
- const {
1215
- tone: t32,
1216
- ...props
1217
- } = t0, tone = t32 === void 0 ? "neutral" : t32, {
1218
- as,
1219
- children: t42,
1220
- className,
1221
- style: t52,
1222
- label,
1223
- ...t6
1224
- } = getProps({
1225
- tone,
1226
- ...props
1227
- }, indicatorProps);
1228
- children = t42, style = t52, rest = t6;
1229
- const Component = as || "span";
1230
- 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;
1231
- } else
1232
- T0 = $[1], ariaLabel = $[2], children = $[3], rest = $[4], style = $[5], t1 = $[6], t2 = $[7];
1233
- const t3 = ariaLabel ? void 0 : !0, t4 = ariaLabel ? "img" : void 0;
1234
- let t5;
1235
- return $[8] !== T0 || $[9] !== ariaLabel || $[10] !== children || $[11] !== rest || $[12] !== style || $[13] !== t1 || $[14] !== t2 || $[15] !== t3 || $[16] !== t4 ? (t5 = /* @__PURE__ */ jsx(T0, { as: t1, className: t2, style, "data-ui": "Indicator", width: "5px", height: "5px", radius: "full", "aria-label": ariaLabel, "aria-hidden": t3, role: t4, ...rest, children }), $[8] = T0, $[9] = ariaLabel, $[10] = children, $[11] = rest, $[12] = style, $[13] = t1, $[14] = t2, $[15] = t3, $[16] = t4, $[17] = t5) : t5 = $[17], t5;
1236
- }
1237
- const indicatorStackProps = {
1238
- as: {
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
- const $ = c(14);
1244
- let T0, children, rest, style, t0, t1;
1245
- if ($[0] !== props) {
1246
- const {
1247
- as,
1248
- children: t22,
1249
- className,
1250
- style: t3,
1251
- ...t4
1252
- } = getProps(props, indicatorStackProps);
1253
- children = t22, style = t3, rest = t4;
1254
- const Component = as || "div";
1255
- T0 = HStack, t0 = Component, t1 = clsx(indicatorStackClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t0, $[6] = t1;
1256
- } else
1257
- T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6];
1258
- let t2;
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
- as: {
1263
- type: "string"
1264
- },
1265
- gap: {
1266
- type: "composite",
1267
- values: SPACE,
1268
- composition: {
1269
- marginTop: {
1270
- propDef: marginProps.marginTop,
1271
- mapping: {
1272
- 0: 0,
1273
- 1: -1,
1274
- 2: -2,
1275
- 3: -3,
1276
- 4: -4,
1277
- 5: -5,
1278
- 6: -6,
1279
- 7: -7,
1280
- 8: -8,
1281
- 9: -9
1282
- }
1283
- },
1284
- marginLeft: {
1285
- propDef: marginProps.marginLeft,
1286
- mapping: {
1287
- 0: 0,
1288
- 1: -1,
1289
- 2: -2,
1290
- 3: -3,
1291
- 4: -4,
1292
- 5: -5,
1293
- 6: -6,
1294
- 7: -7,
1295
- 8: -8,
1296
- 9: -9
1297
- }
1298
- }
1299
- }
1300
- },
1301
- ...paddingProps
1302
- }, inlineChildrenProps = {
1303
- gap: {
1304
- type: "composite",
1305
- values: SPACE,
1306
- composition: {
1307
- paddingTop: {
1308
- propDef: paddingProps.paddingTop,
1309
- mapping: {
1310
- 0: 0,
1311
- 1: 1,
1312
- 2: 2,
1313
- 3: 3,
1314
- 4: 4,
1315
- 5: 5,
1316
- 6: 6,
1317
- 7: 7,
1318
- 8: 8,
1319
- 9: 9
1320
- }
1321
- },
1322
- paddingLeft: {
1323
- propDef: paddingProps.paddingLeft,
1324
- mapping: {
1325
- 0: 0,
1326
- 1: 1,
1327
- 2: 2,
1328
- 3: 3,
1329
- 4: 4,
1330
- 5: 5,
1331
- 6: 6,
1332
- 7: 7,
1333
- 8: 8,
1334
- 9: 9
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
- const $ = c(14);
1342
- let T0, children, rest, style, t0;
1343
- if ($[0] !== props) {
1344
- const {
1345
- as,
1346
- children: childrenProp,
1347
- className,
1348
- style: t12,
1349
- ...t2
1350
- } = getProps(props, inlineProps);
1351
- style = t12, rest = t2;
1352
- const {
1353
- className: childrenClassName
1354
- } = getProps(props, inlineChildrenProps), Component = as || "div";
1355
- let t3;
1356
- $[6] !== childrenClassName ? (t3 = (child) => child && /* @__PURE__ */ jsx("div", { className: childrenClassName, children: child }), $[6] = childrenClassName, $[7] = t3) : t3 = $[7], children = Children.map(childrenProp, t3), T0 = Component, t0 = clsx(inlineClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t0;
1357
- } else
1358
- T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5];
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
- openInNewTab: {
1364
- type: "boolean"
1365
- },
1366
- underlined: {
1367
- type: "boolean",
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
- const $ = c(14);
1373
- let children, openInNewTab, rest, style, t1;
1374
- if ($[0] !== t0) {
1375
- const {
1376
- underlined: t22,
1377
- ...props
1378
- } = t0, underlined = t22 === void 0 ? !0 : t22, {
1379
- children: t32,
1380
- className,
1381
- style: t4,
1382
- openInNewTab: t5,
1383
- ...t6
1384
- } = getProps({
1385
- underlined,
1386
- ...props
1387
- }, linkProps);
1388
- children = t32, style = t4, openInNewTab = t5, rest = t6, t1 = clsx(linkClassName, className), $[0] = t0, $[1] = children, $[2] = openInNewTab, $[3] = rest, $[4] = style, $[5] = t1;
1389
- } else
1390
- children = $[1], openInNewTab = $[2], rest = $[3], style = $[4], t1 = $[5];
1391
- let t2;
1392
- $[6] !== openInNewTab ? (t2 = openInNewTab ? {
1393
- target: "_blank",
1394
- rel: "noopener noreferrer"
1395
- } : {}, $[6] = openInNewTab, $[7] = t2) : t2 = $[7];
1396
- let t3;
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
- const $ = c(12);
1406
- let T0, children, rest, style, t0;
1407
- if ($[0] !== props) {
1408
- const {
1409
- as,
1410
- children: t12,
1411
- className,
1412
- style: t2,
1413
- ...t3
1414
- } = getProps(props, pressAreaProps);
1415
- children = t12, 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;
1416
- } else
1417
- T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5];
1418
- let t1;
1419
- return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t0 ? (t1 = /* @__PURE__ */ jsx(T0, { className: t0, style, "data-ui": "PressArea", ...rest, children }), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t0, $[11] = t1) : t1 = $[11], t1;
1420
- }
1421
- const vStackProps = {
1422
- as: {
1423
- type: "string"
1424
- },
1425
- gap: gapProps.gap
1426
- }, vStackClassName = suffixClassName("sui-VStack");
1427
- function VStack(props) {
1428
- const $ = c(14);
1429
- let T0, children, rest, style, t0, t1;
1430
- if ($[0] !== props) {
1431
- const {
1432
- as,
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
- as: {
1448
- type: "string"
1449
- },
1450
- gap: gapProps.gap
1812
+ as: { type: "string" },
1813
+ gap: gapProps.gap
1451
1814
  }, listItemProps = {
1452
- density: {
1453
- type: "composite",
1454
- values: DENSITY,
1455
- composition: {
1456
- gap: {
1457
- propDef: gapProps.gap,
1458
- mapping: {
1459
- compact: 2,
1460
- regular: 2,
1461
- loose: 3
1462
- }
1463
- },
1464
- minHeight: {
1465
- propDef: heightProps.minHeight,
1466
- mapping: {
1467
- compact: "33px",
1468
- regular: "37px",
1469
- loose: "45px"
1470
- }
1471
- },
1472
- paddingX: {
1473
- propDef: paddingProps.padding,
1474
- mapping: {
1475
- compact: 1,
1476
- regular: 2,
1477
- loose: 3
1478
- }
1479
- }
1480
- }
1481
- },
1482
- end: {
1483
- type: "string"
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
- as: {
1490
- type: "string"
1491
- },
1492
- selected: {
1493
- type: "boolean"
1494
- },
1495
- ...listItemProps
1848
+ as: { type: "string" },
1849
+ selected: { type: "boolean" },
1850
+ ...listItemProps
1496
1851
  }, listItemTextProps = {
1497
- as: {
1498
- type: "string"
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
- const $ = c(14);
1509
- let T0, children, rest, style, t0, t1;
1510
- if ($[0] !== props) {
1511
- const {
1512
- as,
1513
- children: t22,
1514
- className,
1515
- style: t3,
1516
- ...t4
1517
- } = getProps(props, listProps);
1518
- children = t22, style = t3, rest = t4;
1519
- const Component = as || "ul";
1520
- T0 = VStack, t0 = Component, t1 = clsx(listClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t0, $[6] = t1;
1521
- } else
1522
- T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6];
1523
- let t2;
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
- const $ = c(16);
1528
- let children, end, rest, start, style, t1;
1529
- if ($[0] !== t0) {
1530
- const {
1531
- density: t22,
1532
- ...props
1533
- } = t0, density = t22 === void 0 ? "regular" : t22, {
1534
- children: t32,
1535
- className,
1536
- style: t4,
1537
- end: t5,
1538
- start: t6,
1539
- ...t7
1540
- } = getProps({
1541
- density,
1542
- ...props
1543
- }, listItemProps);
1544
- children = t32, 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;
1545
- } else
1546
- children = $[1], end = $[2], rest = $[3], start = $[4], style = $[5], t1 = $[6];
1547
- let t2;
1548
- $[7] !== children ? (t2 = /* @__PURE__ */ jsx(Flex, { flexGrow: 1, gap: "inherit", children }), $[7] = children, $[8] = t2) : t2 = $[8];
1549
- let t3;
1550
- return $[9] !== end || $[10] !== rest || $[11] !== start || $[12] !== style || $[13] !== t1 || $[14] !== t2 ? (t3 = /* @__PURE__ */ jsxs("li", { className: t1, style, "data-ui": "ListItem", ...rest, children: [
1551
- start,
1552
- t2,
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
- const $ = c(22);
1558
- let T0, children, end, rest, selected, start, style, t1, t2;
1559
- if ($[0] !== t0) {
1560
- const {
1561
- density: t32,
1562
- ...props
1563
- } = t0, density = t32 === void 0 ? "regular" : t32, {
1564
- as,
1565
- children: t42,
1566
- className,
1567
- style: t5,
1568
- end: t6,
1569
- start: t7,
1570
- selected: t8,
1571
- ...t9
1572
- } = getProps({
1573
- density,
1574
- ...props
1575
- }, listButtonItemProps);
1576
- children = t42, style = t5, end = t6, start = t7, selected = t8, rest = t9;
1577
- const Component = as || "button";
1578
- 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;
1579
- } else
1580
- T0 = $[1], children = $[2], end = $[3], rest = $[4], selected = $[5], start = $[6], style = $[7], t1 = $[8], t2 = $[9];
1581
- let t3;
1582
- $[10] !== children ? (t3 = /* @__PURE__ */ jsx(Flex, { flexGrow: 1, gap: "inherit", children }), $[10] = children, $[11] = t3) : t3 = $[11];
1583
- let t4;
1584
- 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, { as: t1, className: t2, style, "data-ui": "ListButtonItem", "data-selected": selected, ...rest, children: [
1585
- start,
1586
- t3,
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
- const $ = c(20);
1592
- let T0, rest, style, subtitle, t0, t1, title;
1593
- if ($[0] !== props) {
1594
- const {
1595
- as,
1596
- className,
1597
- style: t22,
1598
- title: t32,
1599
- subtitle: t42,
1600
- ...t5
1601
- } = getProps(props, listItemTextProps);
1602
- style = t22, title = t32, subtitle = t42, rest = t5;
1603
- const Component = as || "div";
1604
- T0 = Flex, t0 = Component, t1 = clsx(listItemTextClassName, className), $[0] = props, $[1] = T0, $[2] = rest, $[3] = style, $[4] = subtitle, $[5] = t0, $[6] = t1, $[7] = title;
1605
- } else
1606
- T0 = $[1], rest = $[2], style = $[3], subtitle = $[4], t0 = $[5], t1 = $[6], title = $[7];
1607
- let t2;
1608
- $[8] !== title ? (t2 = title && /* @__PURE__ */ jsx(Text, { size: 1, weight: "medium", trim: !0, truncate: 1, children: title }), $[8] = title, $[9] = t2) : t2 = $[9];
1609
- let t3;
1610
- $[10] !== subtitle ? (t3 = subtitle && /* @__PURE__ */ jsx(Text, { size: 1, muted: !0, trim: !0, truncate: 1, children: subtitle }), $[10] = subtitle, $[11] = t3) : t3 = $[11];
1611
- let t4;
1612
- return $[12] !== T0 || $[13] !== rest || $[14] !== style || $[15] !== t0 || $[16] !== t1 || $[17] !== t2 || $[18] !== t3 ? (t4 = /* @__PURE__ */ jsxs(T0, { as: t0, className: t1, style, "data-ui": "ListItemText", flexDirection: "column", justifyContent: "center", gap: 2, flexGrow: 1, ...rest, children: [
1613
- t2,
1614
- t3
1615
- ] }), $[12] = T0, $[13] = rest, $[14] = style, $[15] = t0, $[16] = t1, $[17] = t2, $[18] = t3, $[19] = t4) : t4 = $[19], t4;
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
- const $ = c(8);
1619
- let rest, style, t0;
1620
- if ($[0] !== props) {
1621
- const {
1622
- className,
1623
- style: t12,
1624
- ...t2
1625
- } = getProps(props, {});
1626
- style = t12, rest = t2, t0 = clsx(listItemImageClassName, "sui-radius2", className), $[0] = props, $[1] = rest, $[2] = style, $[3] = t0;
1627
- } else
1628
- rest = $[1], style = $[2], t0 = $[3];
1629
- let t1;
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
- ListRoot.ButtonItem = ListButtonItem;
1636
- ListRoot.ItemText = ListItemText;
1637
- ListRoot.ItemImage = ListItemImage;
1638
- const radioProps = {
1639
- error: {
1640
- type: "boolean"
1641
- },
1642
- label: {
1643
- type: "string"
1644
- },
1645
- ...marginProps
1646
- }, radioClassName = suffixClassName("sui-Radio"), radioInputClassName = suffixClassName("sui-RadioInput"), radioMarkClassName = suffixClassName("sui-RadioMark");
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
- const $ = c(26);
1649
- let T0, T1, label, t0, t1, t2, t3, t4, t5, t6, t7;
1650
- if ($[0] !== props) {
1651
- const {
1652
- className,
1653
- style,
1654
- label: t82,
1655
- disabled,
1656
- error,
1657
- ...rest
1658
- } = getProps(props, radioProps);
1659
- label = t82, T1 = Label, t2 = clsx(radioClassName, className), t3 = style, t4 = "Radio", t5 = disabled, t6 = error, t7 = /* @__PURE__ */ jsx(VisuallyHidden, { as: "input", type: "radio", className: radioInputClassName, disabled, ...rest }), T0 = Box, t0 = "span", t1 = clsx(radioMarkClassName, error && "sui-error"), $[0] = props, $[1] = T0, $[2] = T1, $[3] = label, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = t3, $[8] = t4, $[9] = t5, $[10] = t6, $[11] = t7;
1660
- } else
1661
- T0 = $[1], T1 = $[2], label = $[3], t0 = $[4], t1 = $[5], t2 = $[6], t3 = $[7], t4 = $[8], t5 = $[9], t6 = $[10], t7 = $[11];
1662
- let t8;
1663
- $[12] !== T0 || $[13] !== t0 || $[14] !== t1 ? (t8 = /* @__PURE__ */ jsx(T0, { as: t0, className: t1, position: "relative", radius: "full", width: "17px", height: "17px" }), $[12] = T0, $[13] = t0, $[14] = t1, $[15] = t8) : t8 = $[15];
1664
- let t9;
1665
- return $[16] !== T1 || $[17] !== label || $[18] !== t2 || $[19] !== t3 || $[20] !== t4 || $[21] !== t5 || $[22] !== t6 || $[23] !== t7 || $[24] !== t8 ? (t9 = /* @__PURE__ */ jsxs(T1, { className: t2, style: t3, "data-ui": t4, disabled: t5, error: t6, children: [
1666
- t7,
1667
- t8,
1668
- label
1669
- ] }), $[16] = T1, $[17] = label, $[18] = t2, $[19] = t3, $[20] = t4, $[21] = t5, $[22] = t6, $[23] = t7, $[24] = t8, $[25] = t9) : t9 = $[25], t9;
1670
- }
1671
- const skipToContentProps = {
1672
- label: {
1673
- type: "string"
1674
- }
1675
- }, skipToContentClassName = suffixClassName("sui-SkipToContent");
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
- const $ = c(18);
1678
- let T0, label, rest, style, t0, t1, t2;
1679
- if ($[0] !== props) {
1680
- const {
1681
- className,
1682
- label: t32,
1683
- style: t42,
1684
- ...t5
1685
- } = getProps(props, skipToContentProps);
1686
- label = t32, style = t42, 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;
1687
- } else
1688
- T0 = $[1], label = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6], t2 = $[7];
1689
- let t3;
1690
- $[8] !== label ? (t3 = /* @__PURE__ */ jsx(Text, { size: 1, children: label }), $[8] = label, $[9] = t3) : t3 = $[9];
1691
- let t4;
1692
- return $[10] !== T0 || $[11] !== rest || $[12] !== style || $[13] !== t0 || $[14] !== t1 || $[15] !== t2 || $[16] !== t3 ? (t4 = /* @__PURE__ */ jsx(T0, { as: t0, underlined: t1, className: t2, style, "data-ui": "SkipToContent", visibleOnFocus: !0, ...rest, children: t3 }), $[10] = T0, $[11] = rest, $[12] = style, $[13] = t0, $[14] = t1, $[15] = t2, $[16] = t3, $[17] = t4) : t4 = $[17], t4;
1693
- }
1694
- const switchProps = {
1695
- error: {
1696
- type: "boolean"
1697
- },
1698
- label: {
1699
- type: "string"
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
- const $ = c(26);
1705
- let T0, T1, label, t0, t1, t2, t3, t4, t5, t6, t7;
1706
- if ($[0] !== props) {
1707
- const {
1708
- className,
1709
- style,
1710
- disabled,
1711
- error,
1712
- label: t82,
1713
- ...rest
1714
- } = getProps(props, switchProps);
1715
- label = t82, T1 = Label, t2 = clsx(switchClassName, className), t3 = style, t4 = "Switch", t5 = props.disabled, t6 = error, t7 = /* @__PURE__ */ jsx(VisuallyHidden, { as: "input", type: "checkbox", role: "switch", className: switchInputClassName, disabled, ...rest }), T0 = Flex, t0 = "span", t1 = clsx(switchMarkClassName, error && "sui-error"), $[0] = props, $[1] = T0, $[2] = T1, $[3] = label, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = t3, $[8] = t4, $[9] = t5, $[10] = t6, $[11] = t7;
1716
- } else
1717
- T0 = $[1], T1 = $[2], label = $[3], t0 = $[4], t1 = $[5], t2 = $[6], t3 = $[7], t4 = $[8], t5 = $[9], t6 = $[10], t7 = $[11];
1718
- let t8;
1719
- $[12] !== T0 || $[13] !== t0 || $[14] !== t1 ? (t8 = /* @__PURE__ */ jsx(T0, { as: t0, className: t1, alignItems: "center", radius: 6, "aria-hidden": "true" }), $[12] = T0, $[13] = t0, $[14] = t1, $[15] = t8) : t8 = $[15];
1720
- let t9;
1721
- return $[16] !== T1 || $[17] !== label || $[18] !== t2 || $[19] !== t3 || $[20] !== t4 || $[21] !== t5 || $[22] !== t6 || $[23] !== t7 || $[24] !== t8 ? (t9 = /* @__PURE__ */ jsxs(T1, { className: t2, style: t3, "data-ui": t4, disabled: t5, error: t6, children: [
1722
- t7,
1723
- t8,
1724
- label
1725
- ] }), $[16] = T1, $[17] = label, $[18] = t2, $[19] = t3, $[20] = t4, $[21] = t5, $[22] = t6, $[23] = t7, $[24] = t8, $[25] = t9) : t9 = $[25], t9;
1726
- }
1727
- const PLACEMENT = ["top", "top-start", "top-end", "right", "right-start", "right-end", "bottom", "bottom-start", "bottom-end", "left", "left-start", "left-end"], placementProps = {
1728
- placement: {
1729
- type: "union",
1730
- className: "placement",
1731
- values: PLACEMENT
1732
- }
1733
- }, tooltipProps = {
1734
- text: {
1735
- type: "string"
1736
- },
1737
- disabled: {
1738
- type: "boolean"
1739
- },
1740
- ...placementProps
1741
- }, tooltipClassName = suffixClassName("sui-Tooltip"), tooltipDismissedClassName = suffixClassName("sui-Tooltip-Dismissed");
1742
- function Tooltip(t0) {
1743
- const $ = c(16), {
1744
- placement: t1,
1745
- ...props
1746
- } = t0, placement = t1 === void 0 ? "bottom" : t1, {
1747
- children,
1748
- className,
1749
- style,
1750
- disabled,
1751
- id: idProp,
1752
- text,
1753
- ...rest
1754
- } = getProps({
1755
- placement,
1756
- ...props
1757
- }, tooltipProps), reactId = useId(), id = idProp || reactId, [dismissed, setDismissed] = useState(!1);
1758
- let t2, t3;
1759
- $[0] !== dismissed ? (t2 = () => {
1760
- if (dismissed)
1761
- return;
1762
- const handleKeyDown = (e) => {
1763
- e.key === "Escape" && setDismissed(!0);
1764
- };
1765
- return window.addEventListener("keydown", handleKeyDown), () => window.removeEventListener("keydown", handleKeyDown);
1766
- }, t3 = [dismissed], $[0] = dismissed, $[1] = t2, $[2] = t3) : (t2 = $[1], t3 = $[2]), useEffect(t2, t3);
1767
- const trigger = cloneElement(children, {
1768
- "aria-describedby": id,
1769
- onMouseEnter: (e_0) => {
1770
- setDismissed(!1), children.props.onMouseEnter?.(e_0);
1771
- },
1772
- onFocus: (e_1) => {
1773
- setDismissed(!1), children.props.onFocus?.(e_1);
1774
- },
1775
- onClick: (e_2) => {
1776
- setDismissed(!0), children.props.onClick?.(e_2);
1777
- },
1778
- style: {
1779
- ...children.props.style,
1780
- anchorName: `--tooltip-anchor-${id}`
1781
- }
1782
- });
1783
- if (disabled)
1784
- return children;
1785
- const T0 = Box, t4 = clsx(tooltipClassName, dismissed ? tooltipDismissedClassName : "", className), t5 = `--tooltip-anchor-${id}`;
1786
- let t6;
1787
- $[3] !== style || $[4] !== t5 ? (t6 = {
1788
- ...style,
1789
- positionAnchor: t5
1790
- }, $[3] = style, $[4] = t5, $[5] = t6) : t6 = $[5];
1791
- let t7;
1792
- $[6] !== T0 || $[7] !== id || $[8] !== rest || $[9] !== t4 || $[10] !== t6 || $[11] !== text ? (t7 = /* @__PURE__ */ jsx(T0, { className: t4, role: "tooltip", style: t6, "data-ui": "Tooltip", id, paddingX: 2, paddingY: 1, radius: 2, position: "fixed", zIndex: 9999, shadow: 2, ...rest, children: text }), $[6] = T0, $[7] = id, $[8] = rest, $[9] = t4, $[10] = t6, $[11] = text, $[12] = t7) : t7 = $[12];
1793
- let t8;
1794
- return $[13] !== t7 || $[14] !== trigger ? (t8 = /* @__PURE__ */ jsxs(Fragment, { children: [
1795
- trigger,
1796
- t7
1797
- ] }), $[13] = t7, $[14] = trigger, $[15] = t8) : t8 = $[15], t8;
1798
- }
1799
- const tooltipGroupProps = {
1800
- as: {
1801
- type: "string"
1802
- }
1803
- }, tooltipGroupClassName = suffixClassName("sui-TooltipGroup");
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
- const $ = c(17), {
1806
- as,
1807
- children,
1808
- className,
1809
- style,
1810
- ...rest
1811
- } = getProps(props, tooltipGroupProps), Component = as || "div", ref = useRef(null), [isActive, setIsActive] = useState(!1);
1812
- let t0;
1813
- $[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = (e) => {
1814
- const tooltip = e.target.closest('[data-ui="Tooltip"]');
1815
- tooltip && e.propertyName === "visibility" && window.getComputedStyle(tooltip).visibility !== "hidden" && setIsActive(!0);
1816
- }, $[0] = t0) : t0 = $[0];
1817
- const handleTransitionEnd = t0;
1818
- let t1;
1819
- $[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = () => {
1820
- setIsActive(!1);
1821
- }, $[1] = t1) : t1 = $[1];
1822
- const handleMouseLeave = t1;
1823
- let t2;
1824
- $[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t2 = (e_0) => {
1825
- ref.current && ref.current.contains(e_0.relatedTarget) || setIsActive(!1);
1826
- }, $[2] = t2) : t2 = $[2];
1827
- const handleBlur = t2, t3 = clsx(tooltipGroupClassName, className);
1828
- let t4;
1829
- $[3] !== isActive ? (t4 = isActive && {
1830
- "--tooltip-delay-group": 0
1831
- }, $[3] = isActive, $[4] = t4) : t4 = $[4];
1832
- let t5;
1833
- $[5] !== style || $[6] !== t4 ? (t5 = {
1834
- ...style,
1835
- ...t4
1836
- }, $[5] = style, $[6] = t4, $[7] = t5) : t5 = $[7];
1837
- let t6;
1838
- return $[8] !== Component || $[9] !== children || $[10] !== handleBlur || $[11] !== handleMouseLeave || $[12] !== handleTransitionEnd || $[13] !== rest || $[14] !== t3 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsx(Component, { className: t3, style: t5, "data-ui": "TooltipGroup", ref, onTransitionEnd: handleTransitionEnd, onMouseLeave: handleMouseLeave, onBlur: handleBlur, ...rest, children }), $[8] = Component, $[9] = children, $[10] = handleBlur, $[11] = handleMouseLeave, $[12] = handleTransitionEnd, $[13] = rest, $[14] = t3, $[15] = t5, $[16] = t6) : t6 = $[16], t6;
1839
- }
1840
- export {
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