@dxos/react-ui 0.6.9 → 0.6.10-main.3cfcc89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/index.mjs +332 -300
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/components/Avatars/Avatar.d.ts +5 -0
- package/dist/types/src/components/Avatars/Avatar.d.ts.map +1 -1
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts +1 -1
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts +1 -1
- package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts.map +1 -1
- package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts +1 -1
- package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
- package/dist/types/src/components/Buttons/Button.stories.d.ts +1 -1
- package/dist/types/src/components/Buttons/Button.stories.d.ts.map +1 -1
- package/dist/types/src/components/Buttons/Toggle.stories.d.ts +1 -1
- package/dist/types/src/components/Buttons/Toggle.stories.d.ts.map +1 -1
- package/dist/types/src/components/Buttons/ToggleGroup.stories.d.ts +1 -1
- package/dist/types/src/components/Buttons/ToggleGroup.stories.d.ts.map +1 -1
- package/dist/types/src/components/Dialogs/AlertDialog.stories.d.ts +1 -1
- package/dist/types/src/components/Dialogs/AlertDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/Dialogs/Dialog.stories.d.ts +1 -1
- package/dist/types/src/components/Dialogs/Dialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/Icon/Icon.d.ts +10 -0
- package/dist/types/src/components/Icon/Icon.d.ts.map +1 -0
- package/dist/types/src/components/Icon/index.d.ts +2 -0
- package/dist/types/src/components/Icon/index.d.ts.map +1 -0
- package/dist/types/src/components/Input/Input.stories.d.ts +1 -1
- package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
- package/dist/types/src/components/Link/Link.stories.d.ts +1 -1
- package/dist/types/src/components/Link/Link.stories.d.ts.map +1 -1
- package/dist/types/src/components/Lists/List.stories.d.ts +1 -1
- package/dist/types/src/components/Lists/List.stories.d.ts.map +1 -1
- package/dist/types/src/components/Lists/Tree.stories.d.ts +1 -1
- package/dist/types/src/components/Lists/Tree.stories.d.ts.map +1 -1
- package/dist/types/src/components/Lists/Treegrid.stories.d.ts.map +1 -1
- package/dist/types/src/components/Main/Main.stories.d.ts +1 -1
- package/dist/types/src/components/Main/Main.stories.d.ts.map +1 -1
- package/dist/types/src/components/Menus/ContextMenu.stories.d.ts +1 -1
- package/dist/types/src/components/Menus/ContextMenu.stories.d.ts.map +1 -1
- package/dist/types/src/components/Menus/DropdownMenu.stories.d.ts +1 -1
- package/dist/types/src/components/Menus/DropdownMenu.stories.d.ts.map +1 -1
- package/dist/types/src/components/Message/Message.stories.d.ts +1 -1
- package/dist/types/src/components/Message/Message.stories.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.stories.d.ts +1 -1
- package/dist/types/src/components/Popover/Popover.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts +1 -1
- package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts.map +1 -1
- package/dist/types/src/components/Select/Select.stories.d.ts +1 -1
- package/dist/types/src/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/types/src/components/Status/Status.stories.d.ts +1 -1
- package/dist/types/src/components/Status/Status.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tag/Tag.stories.d.ts +1 -1
- package/dist/types/src/components/Tag/Tag.stories.d.ts.map +1 -1
- package/dist/types/src/components/Toast/Toast.stories.d.ts +1 -1
- package/dist/types/src/components/Toast/Toast.stories.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts +1 -1
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/playground/Controls.stories.d.ts +1 -1
- package/dist/types/src/playground/Controls.stories.d.ts.map +1 -1
- package/dist/types/src/playground/Surfaces.stories.d.ts +1 -1
- package/dist/types/src/playground/Surfaces.stories.d.ts.map +1 -1
- package/dist/types/src/playground/Typography.stories.d.ts +1 -1
- package/dist/types/src/playground/Typography.stories.d.ts.map +1 -1
- package/dist/types/src/playground/helpers.d.ts +1 -1
- package/dist/types/src/playground/helpers.d.ts.map +1 -1
- package/package.json +10 -9
- package/src/components/Avatars/Avatar.stories.tsx +1 -1
- package/src/components/Avatars/Avatar.tsx +20 -0
- package/src/components/Avatars/AvatarGroup.stories.tsx +1 -1
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +2 -2
- package/src/components/Buttons/Button.stories.tsx +1 -1
- package/src/components/Buttons/Toggle.stories.tsx +1 -1
- package/src/components/Buttons/ToggleGroup.stories.tsx +1 -1
- package/src/components/Dialogs/AlertDialog.stories.tsx +1 -1
- package/src/components/Dialogs/Dialog.stories.tsx +1 -1
- package/src/components/Icon/Icon.tsx +22 -0
- package/src/components/Icon/index.ts +5 -0
- package/src/components/Input/Input.stories.tsx +1 -1
- package/src/components/Link/Link.stories.tsx +1 -1
- package/src/components/Lists/List.stories.tsx +1 -1
- package/src/components/Lists/Tree.stories.tsx +1 -1
- package/src/components/Lists/Treegrid.stories.tsx +2 -5
- package/src/components/Main/Main.stories.tsx +1 -1
- package/src/components/Menus/ContextMenu.stories.tsx +1 -1
- package/src/components/Menus/DropdownMenu.stories.tsx +1 -1
- package/src/components/Message/Message.stories.tsx +1 -1
- package/src/components/Popover/Popover.stories.tsx +1 -1
- package/src/components/ScrollArea/ScrollArea.stories.tsx +1 -1
- package/src/components/Select/Select.stories.tsx +1 -1
- package/src/components/Status/Status.stories.tsx +1 -1
- package/src/components/Tag/Tag.stories.tsx +1 -1
- package/src/components/Toast/Toast.stories.tsx +1 -1
- package/src/components/Toolbar/Toolbar.stories.tsx +1 -1
- package/src/components/Tooltip/Tooltip.stories.tsx +1 -1
- package/src/components/index.ts +1 -0
- package/src/playground/Controls.stories.tsx +1 -1
- package/src/playground/Surfaces.stories.tsx +1 -1
- package/src/playground/Typography.stories.tsx +1 -1
- package/src/playground/helpers.tsx +1 -1
|
@@ -149,15 +149,32 @@ import { Root as AvatarRootPrimitive, Fallback as AvatarFallbackPrimitive } from
|
|
|
149
149
|
import { createContext as createContext2 } from "@radix-ui/react-context";
|
|
150
150
|
import { Primitive as Primitive2 } from "@radix-ui/react-primitive";
|
|
151
151
|
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
152
|
-
import
|
|
152
|
+
import React4, { forwardRef as forwardRef3 } from "react";
|
|
153
153
|
import { useId } from "@dxos/react-hooks";
|
|
154
|
+
|
|
155
|
+
// packages/ui/react-ui/src/components/Icon/Icon.tsx
|
|
156
|
+
import React3, { forwardRef as forwardRef2 } from "react";
|
|
157
|
+
var Icon = /* @__PURE__ */ forwardRef2(({ icon, classNames, size, ...props }, forwardedRef) => {
|
|
158
|
+
const { tx } = useThemeContext();
|
|
159
|
+
return /* @__PURE__ */ React3.createElement("svg", {
|
|
160
|
+
...props,
|
|
161
|
+
className: tx("icon.root", "icon", {
|
|
162
|
+
size
|
|
163
|
+
}, classNames),
|
|
164
|
+
ref: forwardedRef
|
|
165
|
+
}, /* @__PURE__ */ React3.createElement("use", {
|
|
166
|
+
href: `/icons.svg#${icon}`
|
|
167
|
+
}));
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
// packages/ui/react-ui/src/components/Avatars/Avatar.tsx
|
|
154
171
|
var AVATAR_NAME = "Avatar";
|
|
155
172
|
var [AvatarProvider, useAvatarContext] = createContext2(AVATAR_NAME);
|
|
156
173
|
var AvatarRoot = ({ size = 10, variant = "circle", status, animation, children, labelId: propsLabelId, descriptionId: propsDescriptionId, maskId: propsMaskId, inGroup, hue }) => {
|
|
157
174
|
const labelId = useId("avatar__label", propsLabelId);
|
|
158
175
|
const descriptionId = useId("avatar__description", propsDescriptionId);
|
|
159
176
|
const maskId = useId("avatar__mask", propsMaskId);
|
|
160
|
-
return /* @__PURE__ */
|
|
177
|
+
return /* @__PURE__ */ React4.createElement(AvatarProvider, {
|
|
161
178
|
labelId,
|
|
162
179
|
descriptionId,
|
|
163
180
|
maskId,
|
|
@@ -170,7 +187,7 @@ var AvatarRoot = ({ size = 10, variant = "circle", status, animation, children,
|
|
|
170
187
|
}, children);
|
|
171
188
|
};
|
|
172
189
|
var rx = "0.25rem";
|
|
173
|
-
var AvatarFrame = /* @__PURE__ */
|
|
190
|
+
var AvatarFrame = /* @__PURE__ */ forwardRef3(({ classNames, children, ...props }, forwardedRef) => {
|
|
174
191
|
const { size, variant, labelId, descriptionId, maskId, inGroup, status, animation, hue } = useAvatarContext("AvatarFrame");
|
|
175
192
|
const { tx } = useThemeContext();
|
|
176
193
|
const numericSize = size === "px" ? 1 : Number(size);
|
|
@@ -178,7 +195,7 @@ var AvatarFrame = /* @__PURE__ */ forwardRef2(({ classNames, children, ...props
|
|
|
178
195
|
const ringWidth = status ? numericSize > 4 ? 2 : numericSize > 3 ? 1 : 1 : 0;
|
|
179
196
|
const ringGap = status ? numericSize > 12 ? 3 : numericSize > 4 ? 2 : numericSize > 3 ? 1 : 0 : 0;
|
|
180
197
|
const r = sizePx / 2 - ringGap - ringWidth;
|
|
181
|
-
return /* @__PURE__ */
|
|
198
|
+
return /* @__PURE__ */ React4.createElement(AvatarRootPrimitive, {
|
|
182
199
|
role: "img",
|
|
183
200
|
...props,
|
|
184
201
|
className: tx("avatar.root", "avatar", {
|
|
@@ -191,35 +208,35 @@ var AvatarFrame = /* @__PURE__ */ forwardRef2(({ classNames, children, ...props
|
|
|
191
208
|
"aria-labelledby": labelId,
|
|
192
209
|
"aria-describedby": descriptionId
|
|
193
210
|
}
|
|
194
|
-
}, /* @__PURE__ */
|
|
211
|
+
}, /* @__PURE__ */ React4.createElement("svg", {
|
|
195
212
|
viewBox: `0 0 ${sizePx} ${sizePx}`,
|
|
196
213
|
width: sizePx,
|
|
197
214
|
height: sizePx,
|
|
198
215
|
className: tx("avatar.frame", "avatar__frame", {
|
|
199
216
|
variant
|
|
200
217
|
})
|
|
201
|
-
}, /* @__PURE__ */
|
|
218
|
+
}, /* @__PURE__ */ React4.createElement("defs", null, /* @__PURE__ */ React4.createElement("mask", {
|
|
202
219
|
id: maskId
|
|
203
|
-
}, variant === "circle" ? /* @__PURE__ */
|
|
220
|
+
}, variant === "circle" ? /* @__PURE__ */ React4.createElement("circle", {
|
|
204
221
|
fill: "white",
|
|
205
222
|
cx: "50%",
|
|
206
223
|
cy: "50%",
|
|
207
224
|
r
|
|
208
|
-
}) : /* @__PURE__ */
|
|
225
|
+
}) : /* @__PURE__ */ React4.createElement("rect", {
|
|
209
226
|
fill: "white",
|
|
210
227
|
width: 2 * r,
|
|
211
228
|
height: 2 * r,
|
|
212
229
|
x: ringGap + ringWidth,
|
|
213
230
|
y: ringGap + ringWidth,
|
|
214
231
|
rx
|
|
215
|
-
}))), variant === "circle" ? /* @__PURE__ */
|
|
232
|
+
}))), variant === "circle" ? /* @__PURE__ */ React4.createElement("circle", {
|
|
216
233
|
className: hue ? tx("hue.fill", "avatar__frame__circle", {
|
|
217
234
|
hue
|
|
218
235
|
}) : "fill-[var(--surface-bg)]",
|
|
219
236
|
cx: "50%",
|
|
220
237
|
cy: "50%",
|
|
221
238
|
r
|
|
222
|
-
}) : /* @__PURE__ */
|
|
239
|
+
}) : /* @__PURE__ */ React4.createElement("rect", {
|
|
223
240
|
className: hue ? tx("hue.fill", "avatar__frame__rect", {
|
|
224
241
|
hue
|
|
225
242
|
}) : "fill-[var(--surface-bg)]",
|
|
@@ -228,7 +245,7 @@ var AvatarFrame = /* @__PURE__ */ forwardRef2(({ classNames, children, ...props
|
|
|
228
245
|
width: 2 * r,
|
|
229
246
|
height: 2 * r,
|
|
230
247
|
rx
|
|
231
|
-
}), children), /* @__PURE__ */
|
|
248
|
+
}), children), /* @__PURE__ */ React4.createElement("span", {
|
|
232
249
|
role: "none",
|
|
233
250
|
className: tx("avatar.ring", "avatar__ring", {
|
|
234
251
|
size,
|
|
@@ -241,11 +258,11 @@ var AvatarFrame = /* @__PURE__ */ forwardRef2(({ classNames, children, ...props
|
|
|
241
258
|
}
|
|
242
259
|
}));
|
|
243
260
|
});
|
|
244
|
-
var AvatarLabel = /* @__PURE__ */
|
|
261
|
+
var AvatarLabel = /* @__PURE__ */ forwardRef3(({ asChild, srOnly, classNames, ...props }, forwardedRef) => {
|
|
245
262
|
const Root3 = asChild ? Slot2 : Primitive2.span;
|
|
246
263
|
const { tx } = useThemeContext();
|
|
247
264
|
const { labelId } = useAvatarContext("AvatarLabel");
|
|
248
|
-
return /* @__PURE__ */
|
|
265
|
+
return /* @__PURE__ */ React4.createElement(Root3, {
|
|
249
266
|
...props,
|
|
250
267
|
id: labelId,
|
|
251
268
|
ref: forwardedRef,
|
|
@@ -254,11 +271,11 @@ var AvatarLabel = /* @__PURE__ */ forwardRef2(({ asChild, srOnly, classNames, ..
|
|
|
254
271
|
}, classNames)
|
|
255
272
|
});
|
|
256
273
|
});
|
|
257
|
-
var AvatarDescription = /* @__PURE__ */
|
|
274
|
+
var AvatarDescription = /* @__PURE__ */ forwardRef3(({ asChild, srOnly, classNames, ...props }, forwardedRef) => {
|
|
258
275
|
const Root3 = asChild ? Slot2 : Primitive2.span;
|
|
259
276
|
const { tx } = useThemeContext();
|
|
260
277
|
const { descriptionId } = useAvatarContext("AvatarDescription");
|
|
261
|
-
return /* @__PURE__ */
|
|
278
|
+
return /* @__PURE__ */ React4.createElement(Root3, {
|
|
262
279
|
...props,
|
|
263
280
|
id: descriptionId,
|
|
264
281
|
ref: forwardedRef,
|
|
@@ -267,9 +284,9 @@ var AvatarDescription = /* @__PURE__ */ forwardRef2(({ asChild, srOnly, classNam
|
|
|
267
284
|
}, classNames)
|
|
268
285
|
});
|
|
269
286
|
});
|
|
270
|
-
var AvatarMaskedImage = /* @__PURE__ */
|
|
287
|
+
var AvatarMaskedImage = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
|
|
271
288
|
const { maskId } = useAvatarContext("AvatarFallback");
|
|
272
|
-
return /* @__PURE__ */
|
|
289
|
+
return /* @__PURE__ */ React4.createElement("image", {
|
|
273
290
|
width: "100%",
|
|
274
291
|
height: "100%",
|
|
275
292
|
...props,
|
|
@@ -283,7 +300,7 @@ var AvatarMaskedText = (props) => {
|
|
|
283
300
|
const { large } = props;
|
|
284
301
|
const fontScale = (large ? 4 : 3) * (1 / 1.612);
|
|
285
302
|
const { tx } = useThemeContext();
|
|
286
|
-
return /* @__PURE__ */
|
|
303
|
+
return /* @__PURE__ */ React4.createElement("text", {
|
|
287
304
|
x: "50%",
|
|
288
305
|
y: "50%",
|
|
289
306
|
className: tx("avatar.fallbackText", "avatar__fallback-text"),
|
|
@@ -293,30 +310,43 @@ var AvatarMaskedText = (props) => {
|
|
|
293
310
|
mask: `url(#${maskId})`
|
|
294
311
|
}, props.children);
|
|
295
312
|
};
|
|
296
|
-
var AvatarImage = /* @__PURE__ */
|
|
313
|
+
var AvatarImage = /* @__PURE__ */ forwardRef3(({ onLoadingStatusChange, ...props }, forwardedRef) => {
|
|
297
314
|
const { size } = useAvatarContext("AvatarImage");
|
|
298
315
|
const pxSize = size === "px" ? 1 : size * 4;
|
|
299
316
|
if (pxSize <= 20) {
|
|
300
317
|
return null;
|
|
301
318
|
}
|
|
302
|
-
return /* @__PURE__ */
|
|
319
|
+
return /* @__PURE__ */ React4.createElement(AvatarFallbackPrimitive, {
|
|
303
320
|
asChild: true
|
|
304
|
-
}, /* @__PURE__ */
|
|
321
|
+
}, /* @__PURE__ */ React4.createElement(AvatarMaskedImage, {
|
|
305
322
|
...props,
|
|
306
323
|
ref: forwardedRef
|
|
307
324
|
}));
|
|
308
325
|
});
|
|
309
|
-
var
|
|
326
|
+
var AvatarIcon = /* @__PURE__ */ forwardRef3(({ onLoadingStatusChange, ...props }, forwardedRef) => {
|
|
327
|
+
const { size } = useAvatarContext("AvatarIcon");
|
|
328
|
+
const pxSize = size === "px" ? 1 : size * 4;
|
|
329
|
+
if (pxSize <= 20) {
|
|
330
|
+
return null;
|
|
331
|
+
}
|
|
332
|
+
return /* @__PURE__ */ React4.createElement(AvatarFallbackPrimitive, {
|
|
333
|
+
asChild: true
|
|
334
|
+
}, /* @__PURE__ */ React4.createElement(Icon, {
|
|
335
|
+
...props,
|
|
336
|
+
ref: forwardedRef
|
|
337
|
+
}));
|
|
338
|
+
});
|
|
339
|
+
var AvatarFallback = /* @__PURE__ */ forwardRef3(({ delayMs, text, ...props }, forwardedRef) => {
|
|
310
340
|
const isTextOnly = Boolean(text && /[0-9a-zA-Z]+/.test(text));
|
|
311
341
|
const { size } = useAvatarContext("AvatarFallback");
|
|
312
342
|
const numericSize = size === "px" ? 1 : Number(size);
|
|
313
|
-
return /* @__PURE__ */
|
|
343
|
+
return /* @__PURE__ */ React4.createElement(AvatarFallbackPrimitive, {
|
|
314
344
|
delayMs,
|
|
315
345
|
asChild: true
|
|
316
|
-
}, /* @__PURE__ */
|
|
346
|
+
}, /* @__PURE__ */ React4.createElement(React4.Fragment, null, numericSize >= 6 && /* @__PURE__ */ React4.createElement(AvatarMaskedImage, {
|
|
317
347
|
...props,
|
|
318
348
|
ref: forwardedRef
|
|
319
|
-
}), text && /* @__PURE__ */
|
|
349
|
+
}), text && /* @__PURE__ */ React4.createElement(AvatarMaskedText, {
|
|
320
350
|
large: !isTextOnly
|
|
321
351
|
}, text.toLocaleUpperCase())));
|
|
322
352
|
});
|
|
@@ -324,25 +354,26 @@ var Avatar = {
|
|
|
324
354
|
Root: AvatarRoot,
|
|
325
355
|
Frame: AvatarFrame,
|
|
326
356
|
Image: AvatarImage,
|
|
357
|
+
Icon: AvatarIcon,
|
|
327
358
|
Fallback: AvatarFallback,
|
|
328
359
|
Label: AvatarLabel,
|
|
329
360
|
Description: AvatarDescription
|
|
330
361
|
};
|
|
331
362
|
|
|
332
363
|
// packages/ui/react-ui/src/components/Avatars/AvatarGroup.tsx
|
|
333
|
-
import
|
|
364
|
+
import React5, { forwardRef as forwardRef4 } from "react";
|
|
334
365
|
import { useId as useId2 } from "@dxos/react-hooks";
|
|
335
|
-
var AvatarGroupRoot = /* @__PURE__ */
|
|
366
|
+
var AvatarGroupRoot = /* @__PURE__ */ forwardRef4(({ labelId: propsLabelId, descriptionId: propsDescriptionId, size, variant, children, classNames }, forwardedRef) => {
|
|
336
367
|
const { tx } = useThemeContext();
|
|
337
368
|
const labelId = useId2("avatar-group__label", propsLabelId);
|
|
338
369
|
const descriptionId = useId2("avatar-group__description", propsDescriptionId);
|
|
339
|
-
return /* @__PURE__ */
|
|
370
|
+
return /* @__PURE__ */ React5.createElement(Avatar.Root, {
|
|
340
371
|
labelId,
|
|
341
372
|
descriptionId,
|
|
342
373
|
size,
|
|
343
374
|
variant,
|
|
344
375
|
inGroup: true
|
|
345
|
-
}, /* @__PURE__ */
|
|
376
|
+
}, /* @__PURE__ */ React5.createElement("div", {
|
|
346
377
|
role: "group",
|
|
347
378
|
className: tx("avatar.group", "avatar-group", {}, classNames),
|
|
348
379
|
"aria-labelledby": labelId,
|
|
@@ -352,7 +383,7 @@ var AvatarGroupRoot = /* @__PURE__ */ forwardRef3(({ labelId: propsLabelId, desc
|
|
|
352
383
|
});
|
|
353
384
|
var AvatarGroupItemRoot = ({ maskId, size, variant, status, children, ...rest }) => {
|
|
354
385
|
const { labelId, descriptionId, size: contextSize, variant: contextVariant } = useAvatarContext("AvatarGroupItemRoot");
|
|
355
|
-
return /* @__PURE__ */
|
|
386
|
+
return /* @__PURE__ */ React5.createElement(Avatar.Root, {
|
|
356
387
|
labelId,
|
|
357
388
|
descriptionId,
|
|
358
389
|
maskId,
|
|
@@ -363,10 +394,10 @@ var AvatarGroupItemRoot = ({ maskId, size, variant, status, children, ...rest })
|
|
|
363
394
|
...rest
|
|
364
395
|
}, children);
|
|
365
396
|
};
|
|
366
|
-
var AvatarGroupLabel = /* @__PURE__ */
|
|
397
|
+
var AvatarGroupLabel = /* @__PURE__ */ forwardRef4(({ srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
367
398
|
const { labelId, size } = useAvatarContext("AvatarGroupLabel");
|
|
368
399
|
const { tx } = useThemeContext();
|
|
369
|
-
return /* @__PURE__ */
|
|
400
|
+
return /* @__PURE__ */ React5.createElement("span", {
|
|
370
401
|
...props,
|
|
371
402
|
id: labelId,
|
|
372
403
|
className: tx("avatar.groupLabel", "avatar-group__label", {
|
|
@@ -375,10 +406,10 @@ var AvatarGroupLabel = /* @__PURE__ */ forwardRef3(({ srOnly, classNames, childr
|
|
|
375
406
|
}, classNames)
|
|
376
407
|
}, children);
|
|
377
408
|
});
|
|
378
|
-
var AvatarGroupDescription = /* @__PURE__ */
|
|
409
|
+
var AvatarGroupDescription = /* @__PURE__ */ forwardRef4(({ srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
379
410
|
const { descriptionId } = useAvatarContext("AvatarGroupDescription");
|
|
380
411
|
const { tx } = useThemeContext();
|
|
381
|
-
return /* @__PURE__ */
|
|
412
|
+
return /* @__PURE__ */ React5.createElement("span", {
|
|
382
413
|
...props,
|
|
383
414
|
id: descriptionId,
|
|
384
415
|
className: tx("avatar.groupDescription", "avatar-group__description", {
|
|
@@ -399,16 +430,16 @@ var AvatarGroupItem = {
|
|
|
399
430
|
import { Dot } from "@phosphor-icons/react";
|
|
400
431
|
import { Primitive as Primitive4 } from "@radix-ui/react-primitive";
|
|
401
432
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
402
|
-
import
|
|
433
|
+
import React7, { forwardRef as forwardRef6 } from "react";
|
|
403
434
|
|
|
404
435
|
// packages/ui/react-ui/src/components/Link/Link.tsx
|
|
405
436
|
import { Primitive as Primitive3 } from "@radix-ui/react-primitive";
|
|
406
437
|
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
407
|
-
import
|
|
408
|
-
var Link = /* @__PURE__ */
|
|
438
|
+
import React6, { forwardRef as forwardRef5 } from "react";
|
|
439
|
+
var Link = /* @__PURE__ */ forwardRef5(({ asChild, variant, classNames, ...props }, forwardedRef) => {
|
|
409
440
|
const { tx } = useThemeContext();
|
|
410
441
|
const Root3 = asChild ? Slot3 : Primitive3.a;
|
|
411
|
-
return /* @__PURE__ */
|
|
442
|
+
return /* @__PURE__ */ React6.createElement(Root3, {
|
|
412
443
|
...props,
|
|
413
444
|
className: tx("link.root", "link", {
|
|
414
445
|
variant
|
|
@@ -418,47 +449,47 @@ var Link = /* @__PURE__ */ forwardRef4(({ asChild, variant, classNames, ...props
|
|
|
418
449
|
});
|
|
419
450
|
|
|
420
451
|
// packages/ui/react-ui/src/components/Breadcrumb/Breadcrumb.tsx
|
|
421
|
-
var BreadcrumbRoot = /* @__PURE__ */
|
|
452
|
+
var BreadcrumbRoot = /* @__PURE__ */ forwardRef6(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
422
453
|
const { tx } = useThemeContext();
|
|
423
454
|
const Root3 = asChild ? Slot4 : Primitive4.div;
|
|
424
|
-
return /* @__PURE__ */
|
|
455
|
+
return /* @__PURE__ */ React7.createElement(Root3, {
|
|
425
456
|
role: "navigation",
|
|
426
457
|
...props,
|
|
427
458
|
className: tx("breadcrumb.root", "breadcrumb", {}, classNames),
|
|
428
459
|
ref: forwardedRef
|
|
429
460
|
});
|
|
430
461
|
});
|
|
431
|
-
var BreadcrumbList = /* @__PURE__ */
|
|
462
|
+
var BreadcrumbList = /* @__PURE__ */ forwardRef6(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
432
463
|
const { tx } = useThemeContext();
|
|
433
464
|
const Root3 = asChild ? Slot4 : Primitive4.ol;
|
|
434
|
-
return /* @__PURE__ */
|
|
465
|
+
return /* @__PURE__ */ React7.createElement(Root3, {
|
|
435
466
|
role: "list",
|
|
436
467
|
...props,
|
|
437
468
|
className: tx("breadcrumb.list", "breadcrumb__list", {}, classNames),
|
|
438
469
|
ref: forwardedRef
|
|
439
470
|
});
|
|
440
471
|
});
|
|
441
|
-
var BreadcrumbListItem = /* @__PURE__ */
|
|
472
|
+
var BreadcrumbListItem = /* @__PURE__ */ forwardRef6(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
442
473
|
const { tx } = useThemeContext();
|
|
443
474
|
const Root3 = asChild ? Slot4 : Primitive4.li;
|
|
444
|
-
return /* @__PURE__ */
|
|
475
|
+
return /* @__PURE__ */ React7.createElement(Root3, {
|
|
445
476
|
role: "listitem",
|
|
446
477
|
...props,
|
|
447
478
|
className: tx("breadcrumb.listItem", "breadcrumb__list__item", {}, classNames),
|
|
448
479
|
ref: forwardedRef
|
|
449
480
|
});
|
|
450
481
|
});
|
|
451
|
-
var BreadcrumbLink = /* @__PURE__ */
|
|
482
|
+
var BreadcrumbLink = /* @__PURE__ */ forwardRef6(({ asChild, ...props }, forwardedRef) => {
|
|
452
483
|
const Root3 = asChild ? Slot4 : Link;
|
|
453
|
-
return /* @__PURE__ */
|
|
484
|
+
return /* @__PURE__ */ React7.createElement(Root3, {
|
|
454
485
|
...props,
|
|
455
486
|
ref: forwardedRef
|
|
456
487
|
});
|
|
457
488
|
});
|
|
458
|
-
var BreadcrumbCurrent = /* @__PURE__ */
|
|
489
|
+
var BreadcrumbCurrent = /* @__PURE__ */ forwardRef6(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
459
490
|
const { tx } = useThemeContext();
|
|
460
491
|
const Root3 = asChild ? Slot4 : "h1";
|
|
461
|
-
return /* @__PURE__ */
|
|
492
|
+
return /* @__PURE__ */ React7.createElement(Root3, {
|
|
462
493
|
...props,
|
|
463
494
|
"aria-current": "page",
|
|
464
495
|
className: tx("breadcrumb.current", "breadcrumb__item__heading--current", {}, classNames),
|
|
@@ -467,12 +498,12 @@ var BreadcrumbCurrent = /* @__PURE__ */ forwardRef5(({ asChild, classNames, ...p
|
|
|
467
498
|
});
|
|
468
499
|
var BreadcrumbSeparator = ({ children, classNames, ...props }) => {
|
|
469
500
|
const { tx } = useThemeContext();
|
|
470
|
-
return /* @__PURE__ */
|
|
501
|
+
return /* @__PURE__ */ React7.createElement(Primitive4.span, {
|
|
471
502
|
role: "separator",
|
|
472
503
|
"aria-hidden": "true",
|
|
473
504
|
...props,
|
|
474
505
|
className: tx("breadcrumb.separator", "breadcrumb__separator", {}, classNames)
|
|
475
|
-
}, children ?? /* @__PURE__ */
|
|
506
|
+
}, children ?? /* @__PURE__ */ React7.createElement(Dot, {
|
|
476
507
|
weight: "bold"
|
|
477
508
|
}));
|
|
478
509
|
};
|
|
@@ -489,19 +520,19 @@ var Breadcrumb = {
|
|
|
489
520
|
import { createContext as createContext3 } from "@radix-ui/react-context";
|
|
490
521
|
import { Primitive as Primitive5 } from "@radix-ui/react-primitive";
|
|
491
522
|
import { Slot as Slot5 } from "@radix-ui/react-slot";
|
|
492
|
-
import
|
|
523
|
+
import React8, { forwardRef as forwardRef7 } from "react";
|
|
493
524
|
var BUTTON_GROUP_NAME = "ButtonGroup";
|
|
494
525
|
var BUTTON_NAME = "Button";
|
|
495
526
|
var [ButtonGroupProvider, useButtonGroupContext] = createContext3(BUTTON_GROUP_NAME, {
|
|
496
527
|
inGroup: false
|
|
497
528
|
});
|
|
498
|
-
var Button = /* @__PURE__ */
|
|
529
|
+
var Button = /* @__PURE__ */ forwardRef7(({ classNames, children, density: propsDensity, elevation: propsElevation, variant = "default", asChild, ...props }, ref) => {
|
|
499
530
|
const { inGroup } = useButtonGroupContext(BUTTON_NAME);
|
|
500
531
|
const { tx } = useThemeContext();
|
|
501
532
|
const elevation = useElevationContext(propsElevation);
|
|
502
533
|
const density = useDensityContext(propsDensity);
|
|
503
534
|
const Root3 = asChild ? Slot5 : Primitive5.button;
|
|
504
|
-
return /* @__PURE__ */
|
|
535
|
+
return /* @__PURE__ */ React8.createElement(Root3, {
|
|
505
536
|
ref,
|
|
506
537
|
...props,
|
|
507
538
|
"data-variant": variant,
|
|
@@ -520,18 +551,18 @@ var Button = /* @__PURE__ */ forwardRef6(({ classNames, children, density: props
|
|
|
520
551
|
}, children);
|
|
521
552
|
});
|
|
522
553
|
Button.displayName = BUTTON_NAME;
|
|
523
|
-
var ButtonGroup = /* @__PURE__ */
|
|
554
|
+
var ButtonGroup = /* @__PURE__ */ forwardRef7(({ children, elevation: propsElevation, classNames, asChild, ...props }, forwardedRef) => {
|
|
524
555
|
const { tx } = useThemeContext();
|
|
525
556
|
const elevation = useElevationContext(propsElevation);
|
|
526
557
|
const Root3 = asChild ? Slot5 : Primitive5.div;
|
|
527
|
-
return /* @__PURE__ */
|
|
558
|
+
return /* @__PURE__ */ React8.createElement(Root3, {
|
|
528
559
|
role: "none",
|
|
529
560
|
...props,
|
|
530
561
|
className: tx("button.group", "button-group", {
|
|
531
562
|
elevation
|
|
532
563
|
}, classNames),
|
|
533
564
|
ref: forwardedRef
|
|
534
|
-
}, /* @__PURE__ */
|
|
565
|
+
}, /* @__PURE__ */ React8.createElement(ButtonGroupProvider, {
|
|
535
566
|
inGroup: true
|
|
536
567
|
}, children));
|
|
537
568
|
});
|
|
@@ -539,14 +570,14 @@ ButtonGroup.displayName = BUTTON_GROUP_NAME;
|
|
|
539
570
|
|
|
540
571
|
// packages/ui/react-ui/src/components/Buttons/Toggle.tsx
|
|
541
572
|
import { Toggle as TogglePrimitive } from "@radix-ui/react-toggle";
|
|
542
|
-
import
|
|
543
|
-
var Toggle = /* @__PURE__ */
|
|
544
|
-
return /* @__PURE__ */
|
|
573
|
+
import React9, { forwardRef as forwardRef8 } from "react";
|
|
574
|
+
var Toggle = /* @__PURE__ */ forwardRef8(({ defaultPressed, pressed, onPressedChange, ...props }, forwardedRef) => {
|
|
575
|
+
return /* @__PURE__ */ React9.createElement(TogglePrimitive, {
|
|
545
576
|
defaultPressed,
|
|
546
577
|
pressed,
|
|
547
578
|
onPressedChange,
|
|
548
579
|
asChild: true
|
|
549
|
-
}, /* @__PURE__ */
|
|
580
|
+
}, /* @__PURE__ */ React9.createElement(Button, {
|
|
550
581
|
...props,
|
|
551
582
|
ref: forwardedRef
|
|
552
583
|
}));
|
|
@@ -554,22 +585,22 @@ var Toggle = /* @__PURE__ */ forwardRef7(({ defaultPressed, pressed, onPressedCh
|
|
|
554
585
|
|
|
555
586
|
// packages/ui/react-ui/src/components/Buttons/ToggleGroup.tsx
|
|
556
587
|
import { ToggleGroup as ToggleGroupPrimitive, ToggleGroupItem as ToggleGroupItemPrimitive } from "@radix-ui/react-toggle-group";
|
|
557
|
-
import
|
|
558
|
-
var ToggleGroup = /* @__PURE__ */
|
|
559
|
-
return /* @__PURE__ */
|
|
588
|
+
import React10, { forwardRef as forwardRef9 } from "react";
|
|
589
|
+
var ToggleGroup = /* @__PURE__ */ forwardRef9(({ classNames, children, ...props }, forwardedRef) => {
|
|
590
|
+
return /* @__PURE__ */ React10.createElement(ToggleGroupPrimitive, {
|
|
560
591
|
...props,
|
|
561
592
|
asChild: true
|
|
562
|
-
}, /* @__PURE__ */
|
|
593
|
+
}, /* @__PURE__ */ React10.createElement(ButtonGroup, {
|
|
563
594
|
classNames,
|
|
564
595
|
children,
|
|
565
596
|
ref: forwardedRef
|
|
566
597
|
}));
|
|
567
598
|
});
|
|
568
|
-
var ToggleGroupItem = /* @__PURE__ */
|
|
569
|
-
return /* @__PURE__ */
|
|
599
|
+
var ToggleGroupItem = /* @__PURE__ */ forwardRef9(({ variant, elevation, density, classNames, children, ...props }, forwardedRef) => {
|
|
600
|
+
return /* @__PURE__ */ React10.createElement(ToggleGroupItemPrimitive, {
|
|
570
601
|
...props,
|
|
571
602
|
asChild: true
|
|
572
|
-
}, /* @__PURE__ */
|
|
603
|
+
}, /* @__PURE__ */ React10.createElement(Button, {
|
|
573
604
|
variant,
|
|
574
605
|
elevation,
|
|
575
606
|
density,
|
|
@@ -582,14 +613,14 @@ var ToggleGroupItem = /* @__PURE__ */ forwardRef8(({ variant, elevation, density
|
|
|
582
613
|
// packages/ui/react-ui/src/components/Dialogs/Dialog.tsx
|
|
583
614
|
import { createContext as createContext5 } from "@radix-ui/react-context";
|
|
584
615
|
import { Root as DialogRootPrimitive, DialogTrigger as DialogTriggerPrimitive, DialogPortal as DialogPortalPrimitive, DialogOverlay as DialogOverlayPrimitive, DialogTitle as DialogTitlePrimitive, DialogDescription as DialogDescriptionPrimitive, DialogClose as DialogClosePrimitive, DialogContent as DialogContentPrimitive } from "@radix-ui/react-dialog";
|
|
585
|
-
import
|
|
616
|
+
import React12, { forwardRef as forwardRef10 } from "react";
|
|
586
617
|
|
|
587
618
|
// packages/ui/react-ui/src/components/ElevationProvider/ElevationProvider.tsx
|
|
588
|
-
import
|
|
619
|
+
import React11, { createContext as createContext4 } from "react";
|
|
589
620
|
var ElevationContext = /* @__PURE__ */ createContext4({
|
|
590
621
|
elevation: "base"
|
|
591
622
|
});
|
|
592
|
-
var ElevationProvider = ({ elevation, children }) => /* @__PURE__ */
|
|
623
|
+
var ElevationProvider = ({ elevation, children }) => /* @__PURE__ */ React11.createElement(ElevationContext.Provider, {
|
|
593
624
|
value: {
|
|
594
625
|
elevation
|
|
595
626
|
}
|
|
@@ -599,9 +630,9 @@ var ElevationProvider = ({ elevation, children }) => /* @__PURE__ */ React10.cre
|
|
|
599
630
|
var DialogRoot = DialogRootPrimitive;
|
|
600
631
|
var DialogTrigger = DialogTriggerPrimitive;
|
|
601
632
|
var DialogPortal = DialogPortalPrimitive;
|
|
602
|
-
var DialogTitle = /* @__PURE__ */
|
|
633
|
+
var DialogTitle = /* @__PURE__ */ forwardRef10(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
603
634
|
const { tx } = useThemeContext();
|
|
604
|
-
return /* @__PURE__ */
|
|
635
|
+
return /* @__PURE__ */ React12.createElement(DialogTitlePrimitive, {
|
|
605
636
|
...props,
|
|
606
637
|
className: tx("dialog.title", "dialog__title", {
|
|
607
638
|
srOnly
|
|
@@ -609,9 +640,9 @@ var DialogTitle = /* @__PURE__ */ forwardRef9(({ classNames, srOnly, ...props },
|
|
|
609
640
|
ref: forwardedRef
|
|
610
641
|
});
|
|
611
642
|
});
|
|
612
|
-
var DialogDescription = /* @__PURE__ */
|
|
643
|
+
var DialogDescription = /* @__PURE__ */ forwardRef10(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
613
644
|
const { tx } = useThemeContext();
|
|
614
|
-
return /* @__PURE__ */
|
|
645
|
+
return /* @__PURE__ */ React12.createElement(DialogDescriptionPrimitive, {
|
|
615
646
|
...props,
|
|
616
647
|
className: tx("dialog.description", "dialog__description", {
|
|
617
648
|
srOnly
|
|
@@ -625,28 +656,28 @@ var DIALOG_CONTENT_NAME = "DialogContent";
|
|
|
625
656
|
var [OverlayLayoutProvider, useOverlayLayoutContext] = createContext5(DIALOG_OVERLAY_NAME, {
|
|
626
657
|
inOverlayLayout: false
|
|
627
658
|
});
|
|
628
|
-
var DialogOverlay = /* @__PURE__ */
|
|
659
|
+
var DialogOverlay = /* @__PURE__ */ forwardRef10(({ classNames, children, blockAlign, ...props }, forwardedRef) => {
|
|
629
660
|
const { tx } = useThemeContext();
|
|
630
|
-
return /* @__PURE__ */
|
|
661
|
+
return /* @__PURE__ */ React12.createElement(DialogOverlayPrimitive, {
|
|
631
662
|
...props,
|
|
632
663
|
className: tx("dialog.overlay", "dialog__overlay", {}, classNames, "data-[block-align=start]:justify-center", "data-[block-align=start]:items-start", "data-[block-align=center]:place-content-center"),
|
|
633
664
|
ref: forwardedRef,
|
|
634
665
|
"data-block-align": blockAlign
|
|
635
|
-
}, /* @__PURE__ */
|
|
666
|
+
}, /* @__PURE__ */ React12.createElement(OverlayLayoutProvider, {
|
|
636
667
|
inOverlayLayout: true
|
|
637
668
|
}, children));
|
|
638
669
|
});
|
|
639
670
|
DialogOverlay.displayName = DIALOG_OVERLAY_NAME;
|
|
640
|
-
var DialogContent = /* @__PURE__ */
|
|
671
|
+
var DialogContent = /* @__PURE__ */ forwardRef10(({ classNames, children, ...props }, forwardedRef) => {
|
|
641
672
|
const { tx } = useThemeContext();
|
|
642
673
|
const { inOverlayLayout } = useOverlayLayoutContext(DIALOG_CONTENT_NAME);
|
|
643
|
-
return /* @__PURE__ */
|
|
674
|
+
return /* @__PURE__ */ React12.createElement(DialogContentPrimitive, {
|
|
644
675
|
...props,
|
|
645
676
|
className: tx("dialog.content", "dialog", {
|
|
646
677
|
inOverlayLayout
|
|
647
678
|
}, classNames),
|
|
648
679
|
ref: forwardedRef
|
|
649
|
-
}, /* @__PURE__ */
|
|
680
|
+
}, /* @__PURE__ */ React12.createElement(ElevationProvider, {
|
|
650
681
|
elevation: "chrome"
|
|
651
682
|
}, children));
|
|
652
683
|
});
|
|
@@ -665,15 +696,15 @@ var Dialog = {
|
|
|
665
696
|
// packages/ui/react-ui/src/components/Dialogs/AlertDialog.tsx
|
|
666
697
|
import { Root as AlertDialogRootPrimitive, AlertDialogTrigger as AlertDialogTriggerPrimitive, AlertDialogPortal as AlertDialogPortalPrimitive, AlertDialogOverlay as AlertDialogOverlayPrimitive, AlertDialogTitle as AlertDialogTitlePrimitive, AlertDialogDescription as AlertDialogDescriptionPrimitive, AlertDialogAction as AlertDialogActionPrimitive, AlertDialogCancel as AlertDialogCancelPrimitive, AlertDialogContent as AlertDialogContentPrimitive } from "@radix-ui/react-alert-dialog";
|
|
667
698
|
import { createContext as createContext6 } from "@radix-ui/react-context";
|
|
668
|
-
import
|
|
699
|
+
import React13, { forwardRef as forwardRef11 } from "react";
|
|
669
700
|
var AlertDialogRoot = AlertDialogRootPrimitive;
|
|
670
701
|
var AlertDialogTrigger = AlertDialogTriggerPrimitive;
|
|
671
702
|
var AlertDialogPortal = AlertDialogPortalPrimitive;
|
|
672
703
|
var AlertDialogCancel = AlertDialogCancelPrimitive;
|
|
673
704
|
var AlertDialogAction = AlertDialogActionPrimitive;
|
|
674
|
-
var AlertDialogTitle = /* @__PURE__ */
|
|
705
|
+
var AlertDialogTitle = /* @__PURE__ */ forwardRef11(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
675
706
|
const { tx } = useThemeContext();
|
|
676
|
-
return /* @__PURE__ */
|
|
707
|
+
return /* @__PURE__ */ React13.createElement(AlertDialogTitlePrimitive, {
|
|
677
708
|
...props,
|
|
678
709
|
className: tx("dialog.title", "dialog--alert__title", {
|
|
679
710
|
srOnly
|
|
@@ -681,9 +712,9 @@ var AlertDialogTitle = /* @__PURE__ */ forwardRef10(({ classNames, srOnly, ...pr
|
|
|
681
712
|
ref: forwardedRef
|
|
682
713
|
});
|
|
683
714
|
});
|
|
684
|
-
var AlertDialogDescription = /* @__PURE__ */
|
|
715
|
+
var AlertDialogDescription = /* @__PURE__ */ forwardRef11(({ classNames, srOnly, ...props }, forwardedRef) => {
|
|
685
716
|
const { tx } = useThemeContext();
|
|
686
|
-
return /* @__PURE__ */
|
|
717
|
+
return /* @__PURE__ */ React13.createElement(AlertDialogDescriptionPrimitive, {
|
|
687
718
|
...props,
|
|
688
719
|
className: tx("dialog.description", "dialog--alert__description", {
|
|
689
720
|
srOnly
|
|
@@ -696,27 +727,27 @@ var ALERT_DIALOG_CONTENT_NAME = "AlertDialogContent";
|
|
|
696
727
|
var [OverlayLayoutProvider2, useOverlayLayoutContext2] = createContext6(ALERT_DIALOG_OVERLAY_NAME, {
|
|
697
728
|
inOverlayLayout: false
|
|
698
729
|
});
|
|
699
|
-
var AlertDialogOverlay = /* @__PURE__ */
|
|
730
|
+
var AlertDialogOverlay = /* @__PURE__ */ forwardRef11(({ classNames, children, ...props }, forwardedRef) => {
|
|
700
731
|
const { tx } = useThemeContext();
|
|
701
|
-
return /* @__PURE__ */
|
|
732
|
+
return /* @__PURE__ */ React13.createElement(AlertDialogOverlayPrimitive, {
|
|
702
733
|
...props,
|
|
703
734
|
className: tx("dialog.overlay", "dialog--alert__overlay", {}, classNames),
|
|
704
735
|
ref: forwardedRef
|
|
705
|
-
}, /* @__PURE__ */
|
|
736
|
+
}, /* @__PURE__ */ React13.createElement(OverlayLayoutProvider2, {
|
|
706
737
|
inOverlayLayout: true
|
|
707
738
|
}, children));
|
|
708
739
|
});
|
|
709
740
|
AlertDialogOverlay.displayName = ALERT_DIALOG_OVERLAY_NAME;
|
|
710
|
-
var AlertDialogContent = /* @__PURE__ */
|
|
741
|
+
var AlertDialogContent = /* @__PURE__ */ forwardRef11(({ classNames, children, ...props }, forwardedRef) => {
|
|
711
742
|
const { tx } = useThemeContext();
|
|
712
743
|
const { inOverlayLayout } = useOverlayLayoutContext2(ALERT_DIALOG_CONTENT_NAME);
|
|
713
|
-
return /* @__PURE__ */
|
|
744
|
+
return /* @__PURE__ */ React13.createElement(AlertDialogContentPrimitive, {
|
|
714
745
|
...props,
|
|
715
746
|
className: tx("dialog.content", "dialog--alert", {
|
|
716
747
|
inOverlayLayout
|
|
717
748
|
}, classNames),
|
|
718
749
|
ref: forwardedRef
|
|
719
|
-
}, /* @__PURE__ */
|
|
750
|
+
}, /* @__PURE__ */ React13.createElement(ElevationProvider, {
|
|
720
751
|
elevation: "chrome"
|
|
721
752
|
}, children));
|
|
722
753
|
});
|
|
@@ -737,33 +768,33 @@ var AlertDialog = {
|
|
|
737
768
|
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
738
769
|
import { Primitive as Primitive6 } from "@radix-ui/react-primitive";
|
|
739
770
|
import { Slot as Slot6 } from "@radix-ui/react-slot";
|
|
740
|
-
import
|
|
771
|
+
import React14, { forwardRef as forwardRef12 } from "react";
|
|
741
772
|
var ContextMenuRoot = ContextMenuPrimitive.ContextMenu;
|
|
742
773
|
var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
743
774
|
var ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
744
|
-
var ContextMenuContent = /* @__PURE__ */
|
|
775
|
+
var ContextMenuContent = /* @__PURE__ */ forwardRef12(({ classNames, children, ...props }, forwardedRef) => {
|
|
745
776
|
const { tx } = useThemeContext();
|
|
746
|
-
return /* @__PURE__ */
|
|
777
|
+
return /* @__PURE__ */ React14.createElement(ContextMenuPrimitive.Content, {
|
|
747
778
|
collisionPadding: 8,
|
|
748
779
|
...props,
|
|
749
780
|
className: tx("menu.content", "menu", {}, classNames),
|
|
750
781
|
ref: forwardedRef
|
|
751
|
-
}, /* @__PURE__ */
|
|
782
|
+
}, /* @__PURE__ */ React14.createElement(ElevationProvider, {
|
|
752
783
|
elevation: "chrome"
|
|
753
784
|
}, children));
|
|
754
785
|
});
|
|
755
|
-
var ContextMenuViewport = /* @__PURE__ */
|
|
786
|
+
var ContextMenuViewport = /* @__PURE__ */ forwardRef12(({ classNames, asChild, children, ...props }, forwardedRef) => {
|
|
756
787
|
const { tx } = useThemeContext();
|
|
757
788
|
const Root3 = asChild ? Slot6 : Primitive6.div;
|
|
758
|
-
return /* @__PURE__ */
|
|
789
|
+
return /* @__PURE__ */ React14.createElement(Root3, {
|
|
759
790
|
...props,
|
|
760
791
|
className: tx("menu.viewport", "menu__viewport", {}, classNames),
|
|
761
792
|
ref: forwardedRef
|
|
762
793
|
}, children);
|
|
763
794
|
});
|
|
764
|
-
var ContextMenuArrow = /* @__PURE__ */
|
|
795
|
+
var ContextMenuArrow = /* @__PURE__ */ forwardRef12(({ classNames, ...props }, forwardedRef) => {
|
|
765
796
|
const { tx } = useThemeContext();
|
|
766
|
-
return /* @__PURE__ */
|
|
797
|
+
return /* @__PURE__ */ React14.createElement(ContextMenuPrimitive.Arrow, {
|
|
767
798
|
...props,
|
|
768
799
|
className: tx("menu.arrow", "menu__arrow", {}, classNames),
|
|
769
800
|
ref: forwardedRef
|
|
@@ -771,33 +802,33 @@ var ContextMenuArrow = /* @__PURE__ */ forwardRef11(({ classNames, ...props }, f
|
|
|
771
802
|
});
|
|
772
803
|
var ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
773
804
|
var ContextMenuItemIndicator = ContextMenuPrimitive.ItemIndicator;
|
|
774
|
-
var ContextMenuItem = /* @__PURE__ */
|
|
805
|
+
var ContextMenuItem = /* @__PURE__ */ forwardRef12(({ classNames, ...props }, forwardedRef) => {
|
|
775
806
|
const { tx } = useThemeContext();
|
|
776
|
-
return /* @__PURE__ */
|
|
807
|
+
return /* @__PURE__ */ React14.createElement(ContextMenuPrimitive.Item, {
|
|
777
808
|
...props,
|
|
778
809
|
className: tx("menu.item", "menu__item", {}, classNames),
|
|
779
810
|
ref: forwardedRef
|
|
780
811
|
});
|
|
781
812
|
});
|
|
782
|
-
var ContextMenuCheckboxItem = /* @__PURE__ */
|
|
813
|
+
var ContextMenuCheckboxItem = /* @__PURE__ */ forwardRef12(({ classNames, ...props }, forwardedRef) => {
|
|
783
814
|
const { tx } = useThemeContext();
|
|
784
|
-
return /* @__PURE__ */
|
|
815
|
+
return /* @__PURE__ */ React14.createElement(ContextMenuPrimitive.CheckboxItem, {
|
|
785
816
|
...props,
|
|
786
817
|
className: tx("menu.item", "menu__item--checkbox", {}, classNames),
|
|
787
818
|
ref: forwardedRef
|
|
788
819
|
});
|
|
789
820
|
});
|
|
790
|
-
var ContextMenuSeparator = /* @__PURE__ */
|
|
821
|
+
var ContextMenuSeparator = /* @__PURE__ */ forwardRef12(({ classNames, ...props }, forwardedRef) => {
|
|
791
822
|
const { tx } = useThemeContext();
|
|
792
|
-
return /* @__PURE__ */
|
|
823
|
+
return /* @__PURE__ */ React14.createElement(ContextMenuPrimitive.Separator, {
|
|
793
824
|
...props,
|
|
794
825
|
className: tx("menu.separator", "menu__item", {}, classNames),
|
|
795
826
|
ref: forwardedRef
|
|
796
827
|
});
|
|
797
828
|
});
|
|
798
|
-
var ContextMenuGroupLabel = /* @__PURE__ */
|
|
829
|
+
var ContextMenuGroupLabel = /* @__PURE__ */ forwardRef12(({ classNames, ...props }, forwardedRef) => {
|
|
799
830
|
const { tx } = useThemeContext();
|
|
800
|
-
return /* @__PURE__ */
|
|
831
|
+
return /* @__PURE__ */ React14.createElement(ContextMenuPrimitive.Label, {
|
|
801
832
|
...props,
|
|
802
833
|
className: tx("menu.groupLabel", "menu__group__label", {}, classNames),
|
|
803
834
|
ref: forwardedRef
|
|
@@ -822,36 +853,36 @@ var ContextMenu2 = {
|
|
|
822
853
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
823
854
|
import { Primitive as Primitive7 } from "@radix-ui/react-primitive";
|
|
824
855
|
import { Slot as Slot7 } from "@radix-ui/react-slot";
|
|
825
|
-
import
|
|
856
|
+
import React15, { forwardRef as forwardRef13 } from "react";
|
|
826
857
|
var DropdownMenuRoot = DropdownMenuPrimitive.DropdownMenu;
|
|
827
858
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
828
859
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
829
860
|
var useDropdownMenuContext2 = DropdownMenuPrimitive.useDropdownMenuContext;
|
|
830
861
|
var useDropdownMenuMenuScope2 = DropdownMenuPrimitive.useDropdownMenuMenuScope;
|
|
831
|
-
var DropdownMenuContent = /* @__PURE__ */
|
|
862
|
+
var DropdownMenuContent = /* @__PURE__ */ forwardRef13(({ classNames, children, ...props }, forwardedRef) => {
|
|
832
863
|
const { tx } = useThemeContext();
|
|
833
|
-
return /* @__PURE__ */
|
|
864
|
+
return /* @__PURE__ */ React15.createElement(DropdownMenuPrimitive.Content, {
|
|
834
865
|
sideOffset: 4,
|
|
835
866
|
collisionPadding: 8,
|
|
836
867
|
...props,
|
|
837
868
|
className: tx("menu.content", "menu", {}, classNames),
|
|
838
869
|
ref: forwardedRef
|
|
839
|
-
}, /* @__PURE__ */
|
|
870
|
+
}, /* @__PURE__ */ React15.createElement(ElevationProvider, {
|
|
840
871
|
elevation: "chrome"
|
|
841
872
|
}, children));
|
|
842
873
|
});
|
|
843
|
-
var DropdownMenuViewport = /* @__PURE__ */
|
|
874
|
+
var DropdownMenuViewport = /* @__PURE__ */ forwardRef13(({ classNames, asChild, children, ...props }, forwardedRef) => {
|
|
844
875
|
const { tx } = useThemeContext();
|
|
845
876
|
const Root3 = asChild ? Slot7 : Primitive7.div;
|
|
846
|
-
return /* @__PURE__ */
|
|
877
|
+
return /* @__PURE__ */ React15.createElement(Root3, {
|
|
847
878
|
...props,
|
|
848
879
|
className: tx("menu.viewport", "menu__viewport", {}, classNames),
|
|
849
880
|
ref: forwardedRef
|
|
850
881
|
}, children);
|
|
851
882
|
});
|
|
852
|
-
var DropdownMenuArrow = /* @__PURE__ */
|
|
883
|
+
var DropdownMenuArrow = /* @__PURE__ */ forwardRef13(({ classNames, ...props }, forwardedRef) => {
|
|
853
884
|
const { tx } = useThemeContext();
|
|
854
|
-
return /* @__PURE__ */
|
|
885
|
+
return /* @__PURE__ */ React15.createElement(DropdownMenuPrimitive.Arrow, {
|
|
855
886
|
...props,
|
|
856
887
|
className: tx("menu.arrow", "menu__arrow", {}, classNames),
|
|
857
888
|
ref: forwardedRef
|
|
@@ -859,33 +890,33 @@ var DropdownMenuArrow = /* @__PURE__ */ forwardRef12(({ classNames, ...props },
|
|
|
859
890
|
});
|
|
860
891
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
861
892
|
var DropdownMenuItemIndicator = DropdownMenuPrimitive.ItemIndicator;
|
|
862
|
-
var DropdownMenuItem = /* @__PURE__ */
|
|
893
|
+
var DropdownMenuItem = /* @__PURE__ */ forwardRef13(({ classNames, ...props }, forwardedRef) => {
|
|
863
894
|
const { tx } = useThemeContext();
|
|
864
|
-
return /* @__PURE__ */
|
|
895
|
+
return /* @__PURE__ */ React15.createElement(DropdownMenuPrimitive.Item, {
|
|
865
896
|
...props,
|
|
866
897
|
className: tx("menu.item", "menu__item", {}, classNames),
|
|
867
898
|
ref: forwardedRef
|
|
868
899
|
});
|
|
869
900
|
});
|
|
870
|
-
var DropdownMenuCheckboxItem = /* @__PURE__ */
|
|
901
|
+
var DropdownMenuCheckboxItem = /* @__PURE__ */ forwardRef13(({ classNames, ...props }, forwardedRef) => {
|
|
871
902
|
const { tx } = useThemeContext();
|
|
872
|
-
return /* @__PURE__ */
|
|
903
|
+
return /* @__PURE__ */ React15.createElement(DropdownMenuPrimitive.CheckboxItem, {
|
|
873
904
|
...props,
|
|
874
905
|
className: tx("menu.item", "menu__item--checkbox", {}, classNames),
|
|
875
906
|
ref: forwardedRef
|
|
876
907
|
});
|
|
877
908
|
});
|
|
878
|
-
var DropdownMenuSeparator = /* @__PURE__ */
|
|
909
|
+
var DropdownMenuSeparator = /* @__PURE__ */ forwardRef13(({ classNames, ...props }, forwardedRef) => {
|
|
879
910
|
const { tx } = useThemeContext();
|
|
880
|
-
return /* @__PURE__ */
|
|
911
|
+
return /* @__PURE__ */ React15.createElement(DropdownMenuPrimitive.Separator, {
|
|
881
912
|
...props,
|
|
882
913
|
className: tx("menu.separator", "menu__item", {}, classNames),
|
|
883
914
|
ref: forwardedRef
|
|
884
915
|
});
|
|
885
916
|
});
|
|
886
|
-
var DropdownMenuGroupLabel = /* @__PURE__ */
|
|
917
|
+
var DropdownMenuGroupLabel = /* @__PURE__ */ forwardRef13(({ classNames, ...props }, forwardedRef) => {
|
|
887
918
|
const { tx } = useThemeContext();
|
|
888
|
-
return /* @__PURE__ */
|
|
919
|
+
return /* @__PURE__ */ React15.createElement(DropdownMenuPrimitive.Label, {
|
|
889
920
|
...props,
|
|
890
921
|
className: tx("menu.groupLabel", "menu__group__label", {}, classNames),
|
|
891
922
|
ref: forwardedRef
|
|
@@ -911,11 +942,11 @@ import { Check, Minus } from "@phosphor-icons/react";
|
|
|
911
942
|
import { Root as CheckboxPrimitive, Indicator as CheckboxIndicatorPrimitive } from "@radix-ui/react-checkbox";
|
|
912
943
|
import { Root as SwitchPrimitive, Thumb as SwitchThumbPrimitive } from "@radix-ui/react-switch";
|
|
913
944
|
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
|
914
|
-
import
|
|
945
|
+
import React16, { forwardRef as forwardRef14, Fragment, useCallback } from "react";
|
|
915
946
|
import { InputRoot, PinInput as PinInputPrimitive, TextInput as TextInputPrimitive, TextArea as TextAreaPrimitive, useInputContext, INPUT_NAME, Description as DescriptionPrimitive, DescriptionAndValidation as DescriptionAndValidationPrimitive, Label as LabelPrimitive, Validation as ValidationPrimitive } from "@dxos/react-input";
|
|
916
|
-
var Label3 = /* @__PURE__ */
|
|
947
|
+
var Label3 = /* @__PURE__ */ forwardRef14(({ srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
917
948
|
const { tx } = useThemeContext();
|
|
918
|
-
return /* @__PURE__ */
|
|
949
|
+
return /* @__PURE__ */ React16.createElement(LabelPrimitive, {
|
|
919
950
|
...props,
|
|
920
951
|
className: tx("input.label", "input__label", {
|
|
921
952
|
srOnly
|
|
@@ -923,9 +954,9 @@ var Label3 = /* @__PURE__ */ forwardRef13(({ srOnly, classNames, children, ...pr
|
|
|
923
954
|
ref: forwardedRef
|
|
924
955
|
}, children);
|
|
925
956
|
});
|
|
926
|
-
var Description = /* @__PURE__ */
|
|
957
|
+
var Description = /* @__PURE__ */ forwardRef14(({ srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
927
958
|
const { tx } = useThemeContext();
|
|
928
|
-
return /* @__PURE__ */
|
|
959
|
+
return /* @__PURE__ */ React16.createElement(DescriptionPrimitive, {
|
|
929
960
|
...props,
|
|
930
961
|
className: tx("input.description", "input__description", {
|
|
931
962
|
srOnly
|
|
@@ -933,10 +964,10 @@ var Description = /* @__PURE__ */ forwardRef13(({ srOnly, classNames, children,
|
|
|
933
964
|
ref: forwardedRef
|
|
934
965
|
}, children);
|
|
935
966
|
});
|
|
936
|
-
var Validation = /* @__PURE__ */
|
|
967
|
+
var Validation = /* @__PURE__ */ forwardRef14(({ __inputScope, srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
937
968
|
const { tx } = useThemeContext();
|
|
938
969
|
const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
|
|
939
|
-
return /* @__PURE__ */
|
|
970
|
+
return /* @__PURE__ */ React16.createElement(ValidationPrimitive, {
|
|
940
971
|
...props,
|
|
941
972
|
className: tx("input.validation", `input__validation-message input__validation-message--${validationValence}`, {
|
|
942
973
|
srOnly,
|
|
@@ -945,9 +976,9 @@ var Validation = /* @__PURE__ */ forwardRef13(({ __inputScope, srOnly, className
|
|
|
945
976
|
ref: forwardedRef
|
|
946
977
|
}, children);
|
|
947
978
|
});
|
|
948
|
-
var DescriptionAndValidation = /* @__PURE__ */
|
|
979
|
+
var DescriptionAndValidation = /* @__PURE__ */ forwardRef14(({ srOnly, classNames, children, ...props }, forwardedRef) => {
|
|
949
980
|
const { tx } = useThemeContext();
|
|
950
|
-
return /* @__PURE__ */
|
|
981
|
+
return /* @__PURE__ */ React16.createElement(DescriptionAndValidationPrimitive, {
|
|
951
982
|
...props,
|
|
952
983
|
className: tx("input.descriptionAndValidation", "input__description-and-validation", {
|
|
953
984
|
srOnly
|
|
@@ -955,7 +986,7 @@ var DescriptionAndValidation = /* @__PURE__ */ forwardRef13(({ srOnly, className
|
|
|
955
986
|
ref: forwardedRef
|
|
956
987
|
}, children);
|
|
957
988
|
});
|
|
958
|
-
var PinInput = /* @__PURE__ */
|
|
989
|
+
var PinInput = /* @__PURE__ */ forwardRef14(({ density: propsDensity, elevation: propsElevation, segmentClassName: propsSegmentClassName, inputClassName, variant, ...props }, forwardedRef) => {
|
|
959
990
|
const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
|
|
960
991
|
const { tx } = useThemeContext();
|
|
961
992
|
const density = useDensityContext(propsDensity);
|
|
@@ -974,7 +1005,7 @@ var PinInput = /* @__PURE__ */ forwardRef13(({ density: propsDensity, elevation:
|
|
|
974
1005
|
propsElevation,
|
|
975
1006
|
density
|
|
976
1007
|
]);
|
|
977
|
-
return /* @__PURE__ */
|
|
1008
|
+
return /* @__PURE__ */ React16.createElement(PinInputPrimitive, {
|
|
978
1009
|
...props,
|
|
979
1010
|
segmentClassName,
|
|
980
1011
|
...props.autoFocus && !hasIosKeyboard2 && {
|
|
@@ -986,14 +1017,14 @@ var PinInput = /* @__PURE__ */ forwardRef13(({ density: propsDensity, elevation:
|
|
|
986
1017
|
ref: forwardedRef
|
|
987
1018
|
});
|
|
988
1019
|
});
|
|
989
|
-
var TextInput = /* @__PURE__ */
|
|
1020
|
+
var TextInput = /* @__PURE__ */ forwardRef14(({ __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {
|
|
990
1021
|
const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
|
|
991
1022
|
const themeContextValue = useThemeContext();
|
|
992
1023
|
const density = useDensityContext(propsDensity);
|
|
993
1024
|
const elevation = useElevationContext(propsElevation);
|
|
994
1025
|
const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
|
|
995
1026
|
const { tx } = themeContextValue;
|
|
996
|
-
return /* @__PURE__ */
|
|
1027
|
+
return /* @__PURE__ */ React16.createElement(TextInputPrimitive, {
|
|
997
1028
|
...props,
|
|
998
1029
|
className: tx("input.input", "input", {
|
|
999
1030
|
variant,
|
|
@@ -1008,13 +1039,13 @@ var TextInput = /* @__PURE__ */ forwardRef13(({ __inputScope, classNames, densit
|
|
|
1008
1039
|
ref: forwardedRef
|
|
1009
1040
|
});
|
|
1010
1041
|
});
|
|
1011
|
-
var TextArea = /* @__PURE__ */
|
|
1042
|
+
var TextArea = /* @__PURE__ */ forwardRef14(({ __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {
|
|
1012
1043
|
const { hasIosKeyboard: hasIosKeyboard2 } = useThemeContext();
|
|
1013
1044
|
const { tx } = useThemeContext();
|
|
1014
1045
|
const density = useDensityContext(propsDensity);
|
|
1015
1046
|
const elevation = useElevationContext(propsElevation);
|
|
1016
1047
|
const { validationValence } = useInputContext(INPUT_NAME, __inputScope);
|
|
1017
|
-
return /* @__PURE__ */
|
|
1048
|
+
return /* @__PURE__ */ React16.createElement(TextAreaPrimitive, {
|
|
1018
1049
|
...props,
|
|
1019
1050
|
className: tx("input.input", "input--text-area", {
|
|
1020
1051
|
variant,
|
|
@@ -1029,7 +1060,7 @@ var TextArea = /* @__PURE__ */ forwardRef13(({ __inputScope, classNames, density
|
|
|
1029
1060
|
ref: forwardedRef
|
|
1030
1061
|
});
|
|
1031
1062
|
});
|
|
1032
|
-
var Checkbox = /* @__PURE__ */
|
|
1063
|
+
var Checkbox = /* @__PURE__ */ forwardRef14(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size, weight = "bold", classNames, ...props }, forwardedRef) => {
|
|
1033
1064
|
const [checked, onCheckedChange] = useControllableState({
|
|
1034
1065
|
prop: propsChecked,
|
|
1035
1066
|
defaultProp: propsDefaultChecked,
|
|
@@ -1037,8 +1068,8 @@ var Checkbox = /* @__PURE__ */ forwardRef13(({ __inputScope, checked: propsCheck
|
|
|
1037
1068
|
});
|
|
1038
1069
|
const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
|
|
1039
1070
|
const { tx } = useThemeContext();
|
|
1040
|
-
const
|
|
1041
|
-
return /* @__PURE__ */
|
|
1071
|
+
const Icon3 = checked === "indeterminate" ? Minus : checked ? Check : Fragment;
|
|
1072
|
+
return /* @__PURE__ */ React16.createElement(CheckboxPrimitive, {
|
|
1042
1073
|
...props,
|
|
1043
1074
|
checked,
|
|
1044
1075
|
onCheckedChange,
|
|
@@ -1052,16 +1083,16 @@ var Checkbox = /* @__PURE__ */ forwardRef13(({ __inputScope, checked: propsCheck
|
|
|
1052
1083
|
size
|
|
1053
1084
|
}, "shrink-0", classNames),
|
|
1054
1085
|
ref: forwardedRef
|
|
1055
|
-
}, /* @__PURE__ */
|
|
1086
|
+
}, /* @__PURE__ */ React16.createElement(CheckboxIndicatorPrimitive, {
|
|
1056
1087
|
asChild: true
|
|
1057
|
-
}, /* @__PURE__ */
|
|
1088
|
+
}, /* @__PURE__ */ React16.createElement(Icon3, checked && {
|
|
1058
1089
|
weight,
|
|
1059
1090
|
className: tx("input.checkboxIndicator", "input--checkbox__indicator", {
|
|
1060
1091
|
size
|
|
1061
1092
|
})
|
|
1062
1093
|
})));
|
|
1063
1094
|
});
|
|
1064
|
-
var Switch = /* @__PURE__ */
|
|
1095
|
+
var Switch = /* @__PURE__ */ forwardRef14(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size = 5, classNames, ...props }, forwardedRef) => {
|
|
1065
1096
|
const { tx } = useThemeContext();
|
|
1066
1097
|
const [checked, onCheckedChange] = useControllableState({
|
|
1067
1098
|
prop: propsChecked,
|
|
@@ -1069,7 +1100,7 @@ var Switch = /* @__PURE__ */ forwardRef13(({ __inputScope, checked: propsChecked
|
|
|
1069
1100
|
onChange: propsOnCheckedChange
|
|
1070
1101
|
});
|
|
1071
1102
|
const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
|
|
1072
|
-
return /* @__PURE__ */
|
|
1103
|
+
return /* @__PURE__ */ React16.createElement(SwitchPrimitive, {
|
|
1073
1104
|
...props,
|
|
1074
1105
|
checked,
|
|
1075
1106
|
onCheckedChange,
|
|
@@ -1083,7 +1114,7 @@ var Switch = /* @__PURE__ */ forwardRef13(({ __inputScope, checked: propsChecked
|
|
|
1083
1114
|
size
|
|
1084
1115
|
}, classNames),
|
|
1085
1116
|
ref: forwardedRef
|
|
1086
|
-
}, /* @__PURE__ */
|
|
1117
|
+
}, /* @__PURE__ */ React16.createElement(SwitchThumbPrimitive, {
|
|
1087
1118
|
className: tx("input.switchThumb", "input--switch__thumb", {
|
|
1088
1119
|
size
|
|
1089
1120
|
})
|
|
@@ -1105,37 +1136,37 @@ var Input = {
|
|
|
1105
1136
|
// packages/ui/react-ui/src/components/Lists/List.tsx
|
|
1106
1137
|
import { CaretDown, CaretRight } from "@phosphor-icons/react";
|
|
1107
1138
|
import { Slot as Slot8 } from "@radix-ui/react-slot";
|
|
1108
|
-
import
|
|
1139
|
+
import React18, { forwardRef as forwardRef15 } from "react";
|
|
1109
1140
|
import { List as ListPrimitive, ListItemHeading as ListPrimitiveItemHeading, ListItemOpenTrigger as ListPrimitiveItemOpenTrigger, ListItemCollapsibleContent, ListItem as ListPrimitiveItem, LIST_NAME, LIST_ITEM_NAME, useListContext, useListItemContext } from "@dxos/react-list";
|
|
1110
1141
|
|
|
1111
1142
|
// packages/ui/react-ui/src/components/DensityProvider/DensityProvider.tsx
|
|
1112
|
-
import
|
|
1143
|
+
import React17, { createContext as createContext7 } from "react";
|
|
1113
1144
|
var DensityContext = /* @__PURE__ */ createContext7({
|
|
1114
1145
|
density: "coarse"
|
|
1115
1146
|
});
|
|
1116
|
-
var DensityProvider = ({ density, children }) => /* @__PURE__ */
|
|
1147
|
+
var DensityProvider = ({ density, children }) => /* @__PURE__ */ React17.createElement(DensityContext.Provider, {
|
|
1117
1148
|
value: {
|
|
1118
1149
|
density
|
|
1119
1150
|
}
|
|
1120
1151
|
}, children);
|
|
1121
1152
|
|
|
1122
1153
|
// packages/ui/react-ui/src/components/Lists/List.tsx
|
|
1123
|
-
var List = /* @__PURE__ */
|
|
1154
|
+
var List = /* @__PURE__ */ forwardRef15(({ classNames, children, ...props }, forwardedRef) => {
|
|
1124
1155
|
const { tx } = useThemeContext();
|
|
1125
1156
|
const density = useDensityContext(props.density);
|
|
1126
|
-
return /* @__PURE__ */
|
|
1157
|
+
return /* @__PURE__ */ React18.createElement(DensityProvider, {
|
|
1127
1158
|
density
|
|
1128
|
-
}, /* @__PURE__ */
|
|
1159
|
+
}, /* @__PURE__ */ React18.createElement(ListPrimitive, {
|
|
1129
1160
|
...props,
|
|
1130
1161
|
className: tx("list.root", "list", {}, classNames),
|
|
1131
1162
|
ref: forwardedRef
|
|
1132
1163
|
}, children));
|
|
1133
1164
|
});
|
|
1134
|
-
var ListItemEndcap = /* @__PURE__ */
|
|
1165
|
+
var ListItemEndcap = /* @__PURE__ */ forwardRef15(({ children, classNames, asChild, ...props }, forwardedRef) => {
|
|
1135
1166
|
const Root3 = asChild ? Slot8 : "div";
|
|
1136
1167
|
const density = useDensityContext();
|
|
1137
1168
|
const { tx } = useThemeContext();
|
|
1138
|
-
return /* @__PURE__ */
|
|
1169
|
+
return /* @__PURE__ */ React18.createElement(Root3, {
|
|
1139
1170
|
...!asChild && {
|
|
1140
1171
|
role: "none"
|
|
1141
1172
|
},
|
|
@@ -1149,7 +1180,7 @@ var ListItemEndcap = /* @__PURE__ */ forwardRef14(({ children, classNames, asChi
|
|
|
1149
1180
|
var MockListItemOpenTrigger = ({ classNames, ...props }) => {
|
|
1150
1181
|
const density = useDensityContext();
|
|
1151
1182
|
const { tx } = useThemeContext();
|
|
1152
|
-
return /* @__PURE__ */
|
|
1183
|
+
return /* @__PURE__ */ React18.createElement("div", {
|
|
1153
1184
|
role: "none",
|
|
1154
1185
|
...props,
|
|
1155
1186
|
className: tx("list.item.openTrigger", "list__listItem__openTrigger--mock", {
|
|
@@ -1157,10 +1188,10 @@ var MockListItemOpenTrigger = ({ classNames, ...props }) => {
|
|
|
1157
1188
|
}, classNames)
|
|
1158
1189
|
});
|
|
1159
1190
|
};
|
|
1160
|
-
var ListItemHeading = /* @__PURE__ */
|
|
1191
|
+
var ListItemHeading = /* @__PURE__ */ forwardRef15(({ children, classNames, ...props }, forwardedRef) => {
|
|
1161
1192
|
const { tx } = useThemeContext();
|
|
1162
1193
|
const density = useDensityContext();
|
|
1163
|
-
return /* @__PURE__ */
|
|
1194
|
+
return /* @__PURE__ */ React18.createElement(ListPrimitiveItemHeading, {
|
|
1164
1195
|
...props,
|
|
1165
1196
|
className: tx("list.item.heading", "list__listItem__heading", {
|
|
1166
1197
|
density
|
|
@@ -1168,26 +1199,26 @@ var ListItemHeading = /* @__PURE__ */ forwardRef14(({ children, classNames, ...p
|
|
|
1168
1199
|
ref: forwardedRef
|
|
1169
1200
|
}, children);
|
|
1170
1201
|
});
|
|
1171
|
-
var ListItemOpenTrigger = /* @__PURE__ */
|
|
1202
|
+
var ListItemOpenTrigger = /* @__PURE__ */ forwardRef15(({ __listItemScope, classNames, children, ...props }, forwardedRef) => {
|
|
1172
1203
|
const { tx } = useThemeContext();
|
|
1173
1204
|
const density = useDensityContext();
|
|
1174
1205
|
const { open } = useListItemContext(LIST_ITEM_NAME, __listItemScope);
|
|
1175
|
-
const
|
|
1176
|
-
return /* @__PURE__ */
|
|
1206
|
+
const Icon3 = open ? CaretDown : CaretRight;
|
|
1207
|
+
return /* @__PURE__ */ React18.createElement(ListPrimitiveItemOpenTrigger, {
|
|
1177
1208
|
...props,
|
|
1178
1209
|
className: tx("list.item.openTrigger", "list__listItem__openTrigger", {
|
|
1179
1210
|
density
|
|
1180
1211
|
}, classNames),
|
|
1181
1212
|
ref: forwardedRef
|
|
1182
|
-
}, children || /* @__PURE__ */
|
|
1213
|
+
}, children || /* @__PURE__ */ React18.createElement(Icon3, {
|
|
1183
1214
|
weight: "bold",
|
|
1184
1215
|
className: tx("list.item.openTriggerIcon", "list__listItem__openTrigger__icon", {})
|
|
1185
1216
|
}));
|
|
1186
1217
|
});
|
|
1187
|
-
var ListItemRoot = /* @__PURE__ */
|
|
1218
|
+
var ListItemRoot = /* @__PURE__ */ forwardRef15(({ classNames, children, ...props }, forwardedRef) => {
|
|
1188
1219
|
const { tx } = useThemeContext();
|
|
1189
1220
|
const density = useDensityContext();
|
|
1190
|
-
return /* @__PURE__ */
|
|
1221
|
+
return /* @__PURE__ */ React18.createElement(ListPrimitiveItem, {
|
|
1191
1222
|
...props,
|
|
1192
1223
|
className: tx("list.item.root", "list__listItem", {
|
|
1193
1224
|
density,
|
|
@@ -1206,23 +1237,23 @@ var ListItem = {
|
|
|
1206
1237
|
};
|
|
1207
1238
|
|
|
1208
1239
|
// packages/ui/react-ui/src/components/Lists/Tree.tsx
|
|
1209
|
-
import
|
|
1210
|
-
var TreeRoot = /* @__PURE__ */
|
|
1211
|
-
return /* @__PURE__ */
|
|
1240
|
+
import React19, { forwardRef as forwardRef16 } from "react";
|
|
1241
|
+
var TreeRoot = /* @__PURE__ */ forwardRef16((props, forwardedRef) => {
|
|
1242
|
+
return /* @__PURE__ */ React19.createElement(List, {
|
|
1212
1243
|
...props,
|
|
1213
1244
|
ref: forwardedRef
|
|
1214
1245
|
});
|
|
1215
1246
|
});
|
|
1216
|
-
var TreeBranch = /* @__PURE__ */
|
|
1247
|
+
var TreeBranch = /* @__PURE__ */ forwardRef16(({ __listScope, ...props }, forwardedRef) => {
|
|
1217
1248
|
const { headingId } = useListItemContext(LIST_ITEM_NAME, __listScope);
|
|
1218
|
-
return /* @__PURE__ */
|
|
1249
|
+
return /* @__PURE__ */ React19.createElement(List, {
|
|
1219
1250
|
...props,
|
|
1220
1251
|
"aria-labelledby": headingId,
|
|
1221
1252
|
ref: forwardedRef
|
|
1222
1253
|
});
|
|
1223
1254
|
});
|
|
1224
|
-
var TreeItemRoot = /* @__PURE__ */
|
|
1225
|
-
return /* @__PURE__ */
|
|
1255
|
+
var TreeItemRoot = /* @__PURE__ */ forwardRef16((props, forwardedRef) => {
|
|
1256
|
+
return /* @__PURE__ */ React19.createElement(ListItem.Root, {
|
|
1226
1257
|
role: "treeitem",
|
|
1227
1258
|
...props,
|
|
1228
1259
|
ref: forwardedRef
|
|
@@ -1250,13 +1281,13 @@ import { createContextScope } from "@radix-ui/react-context";
|
|
|
1250
1281
|
import { Primitive as Primitive8 } from "@radix-ui/react-primitive";
|
|
1251
1282
|
import { Slot as Slot9 } from "@radix-ui/react-slot";
|
|
1252
1283
|
import { useControllableState as useControllableState2 } from "@radix-ui/react-use-controllable-state";
|
|
1253
|
-
import
|
|
1284
|
+
import React20, { forwardRef as forwardRef17 } from "react";
|
|
1254
1285
|
var TREEGRID_ROW_NAME = "TreegridRow";
|
|
1255
1286
|
var [createTreegridRowContext, createTreegridRowScope] = createContextScope(TREEGRID_ROW_NAME, []);
|
|
1256
1287
|
var [TreegridRowProvider, useTreegridRowContext] = createTreegridRowContext(TREEGRID_ROW_NAME);
|
|
1257
1288
|
var PATH_SEPARATOR = "~";
|
|
1258
1289
|
var PARENT_OF_SEPARATOR = " ";
|
|
1259
|
-
var TreegridRoot = /* @__PURE__ */
|
|
1290
|
+
var TreegridRoot = /* @__PURE__ */ forwardRef17(({ asChild, classNames, children, style, gridTemplateColumns, ...props }, forwardedRef) => {
|
|
1260
1291
|
const { tx } = useThemeContext();
|
|
1261
1292
|
const Root3 = asChild ? Slot9 : Primitive8.div;
|
|
1262
1293
|
const arrowNavigationAttrs = useArrowNavigationGroup({
|
|
@@ -1264,7 +1295,7 @@ var TreegridRoot = /* @__PURE__ */ forwardRef16(({ asChild, classNames, children
|
|
|
1264
1295
|
tabbable: false,
|
|
1265
1296
|
circular: true
|
|
1266
1297
|
});
|
|
1267
|
-
return /* @__PURE__ */
|
|
1298
|
+
return /* @__PURE__ */ React20.createElement(Root3, {
|
|
1268
1299
|
role: "treegrid",
|
|
1269
1300
|
...arrowNavigationAttrs,
|
|
1270
1301
|
...props,
|
|
@@ -1276,7 +1307,7 @@ var TreegridRoot = /* @__PURE__ */ forwardRef16(({ asChild, classNames, children
|
|
|
1276
1307
|
ref: forwardedRef
|
|
1277
1308
|
}, children);
|
|
1278
1309
|
});
|
|
1279
|
-
var TreegridRow = /* @__PURE__ */
|
|
1310
|
+
var TreegridRow = /* @__PURE__ */ forwardRef17(({ __treegridRowScope, asChild, classNames, children, id, parentOf, open: propsOpen, defaultOpen, onOpenChange: propsOnOpenChange, ...props }, forwardedRef) => {
|
|
1280
1311
|
const { tx } = useThemeContext();
|
|
1281
1312
|
const Root3 = asChild ? Slot9 : Primitive8.div;
|
|
1282
1313
|
const pathParts = id.split(PATH_SEPARATOR);
|
|
@@ -1295,11 +1326,11 @@ var TreegridRow = /* @__PURE__ */ forwardRef16(({ __treegridRowScope, asChild, c
|
|
|
1295
1326
|
circular: false,
|
|
1296
1327
|
memorizeCurrent: false
|
|
1297
1328
|
});
|
|
1298
|
-
return /* @__PURE__ */
|
|
1329
|
+
return /* @__PURE__ */ React20.createElement(TreegridRowProvider, {
|
|
1299
1330
|
open,
|
|
1300
1331
|
onOpenChange,
|
|
1301
1332
|
scope: __treegridRowScope
|
|
1302
|
-
}, /* @__PURE__ */
|
|
1333
|
+
}, /* @__PURE__ */ React20.createElement(Root3, {
|
|
1303
1334
|
role: "row",
|
|
1304
1335
|
"aria-level": level,
|
|
1305
1336
|
className: tx("treegrid.row", "treegrid__row", {
|
|
@@ -1314,15 +1345,15 @@ var TreegridRow = /* @__PURE__ */ forwardRef16(({ __treegridRowScope, asChild, c
|
|
|
1314
1345
|
...props,
|
|
1315
1346
|
id,
|
|
1316
1347
|
ref: forwardedRef
|
|
1317
|
-
}, /* @__PURE__ */
|
|
1348
|
+
}, /* @__PURE__ */ React20.createElement("div", {
|
|
1318
1349
|
role: "none",
|
|
1319
1350
|
className: "contents",
|
|
1320
1351
|
...arrowGroupAttrs
|
|
1321
1352
|
}, children)));
|
|
1322
1353
|
});
|
|
1323
|
-
var TreegridCell = /* @__PURE__ */
|
|
1354
|
+
var TreegridCell = /* @__PURE__ */ forwardRef17(({ classNames, children, indent, ...props }, forwardedRef) => {
|
|
1324
1355
|
const { tx } = useThemeContext();
|
|
1325
|
-
return /* @__PURE__ */
|
|
1356
|
+
return /* @__PURE__ */ React20.createElement("div", {
|
|
1326
1357
|
role: "gridcell",
|
|
1327
1358
|
className: tx("treegrid.cell", "treegrid__cell", {
|
|
1328
1359
|
indent
|
|
@@ -1349,7 +1380,7 @@ import { Root as DialogRoot2, DialogContent as DialogContent2 } from "@radix-ui/
|
|
|
1349
1380
|
import { Primitive as Primitive9 } from "@radix-ui/react-primitive";
|
|
1350
1381
|
import { Slot as Slot10 } from "@radix-ui/react-slot";
|
|
1351
1382
|
import { useControllableState as useControllableState3 } from "@radix-ui/react-use-controllable-state";
|
|
1352
|
-
import
|
|
1383
|
+
import React21, { forwardRef as forwardRef18, useCallback as useCallback3, useEffect as useEffect4, useRef, useState as useState4 } from "react";
|
|
1353
1384
|
import { log } from "@dxos/log";
|
|
1354
1385
|
import { useMediaQuery, useForwardedRef } from "@dxos/react-hooks";
|
|
1355
1386
|
|
|
@@ -1569,7 +1600,7 @@ var MainRoot = ({ navigationSidebarOpen: propsNavigationSidebarOpen, defaultNavi
|
|
|
1569
1600
|
}, [
|
|
1570
1601
|
handleResize
|
|
1571
1602
|
]);
|
|
1572
|
-
return /* @__PURE__ */
|
|
1603
|
+
return /* @__PURE__ */ React21.createElement(MainProvider, {
|
|
1573
1604
|
...props,
|
|
1574
1605
|
navigationSidebarOpen,
|
|
1575
1606
|
setNavigationSidebarOpen,
|
|
@@ -1582,7 +1613,7 @@ MainRoot.displayName = MAIN_ROOT_NAME;
|
|
|
1582
1613
|
var handleOpenAutoFocus = (event) => {
|
|
1583
1614
|
!document.body.hasAttribute("data-is-keyboard") && event.preventDefault();
|
|
1584
1615
|
};
|
|
1585
|
-
var MainSidebar = /* @__PURE__ */
|
|
1616
|
+
var MainSidebar = /* @__PURE__ */ forwardRef18(({ classNames, children, swipeToDismiss, onOpenAutoFocus, open, resizing, setOpen, side, ...props }, forwardedRef) => {
|
|
1586
1617
|
const [isLg] = useMediaQuery("lg", {
|
|
1587
1618
|
ssr: false
|
|
1588
1619
|
});
|
|
@@ -1601,10 +1632,10 @@ var MainSidebar = /* @__PURE__ */ forwardRef17(({ classNames, children, swipeToD
|
|
|
1601
1632
|
props.onKeyDown
|
|
1602
1633
|
]);
|
|
1603
1634
|
const Root3 = isLg ? Primitive9.div : DialogContent2;
|
|
1604
|
-
return /* @__PURE__ */
|
|
1635
|
+
return /* @__PURE__ */ React21.createElement(DialogRoot2, {
|
|
1605
1636
|
open,
|
|
1606
1637
|
modal: false
|
|
1607
|
-
}, /* @__PURE__ */
|
|
1638
|
+
}, /* @__PURE__ */ React21.createElement(Root3, {
|
|
1608
1639
|
...!isLg && {
|
|
1609
1640
|
forceMount: true,
|
|
1610
1641
|
tabIndex: -1,
|
|
@@ -1620,14 +1651,14 @@ var MainSidebar = /* @__PURE__ */ forwardRef17(({ classNames, children, swipeToD
|
|
|
1620
1651
|
inert: "true"
|
|
1621
1652
|
},
|
|
1622
1653
|
ref
|
|
1623
|
-
}, /* @__PURE__ */
|
|
1654
|
+
}, /* @__PURE__ */ React21.createElement(ElevationProvider, {
|
|
1624
1655
|
elevation: "group"
|
|
1625
1656
|
}, children)));
|
|
1626
1657
|
});
|
|
1627
|
-
var MainNavigationSidebar = /* @__PURE__ */
|
|
1658
|
+
var MainNavigationSidebar = /* @__PURE__ */ forwardRef18((props, forwardedRef) => {
|
|
1628
1659
|
const { navigationSidebarOpen, setNavigationSidebarOpen, resizing } = useMainContext(NAVIGATION_SIDEBAR_NAME);
|
|
1629
1660
|
const mover = useLandmarkMover(props.onKeyDown, "0");
|
|
1630
|
-
return /* @__PURE__ */
|
|
1661
|
+
return /* @__PURE__ */ React21.createElement(MainSidebar, {
|
|
1631
1662
|
...mover,
|
|
1632
1663
|
...props,
|
|
1633
1664
|
open: navigationSidebarOpen,
|
|
@@ -1638,10 +1669,10 @@ var MainNavigationSidebar = /* @__PURE__ */ forwardRef17((props, forwardedRef) =
|
|
|
1638
1669
|
});
|
|
1639
1670
|
});
|
|
1640
1671
|
MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
|
|
1641
|
-
var MainComplementarySidebar = /* @__PURE__ */
|
|
1672
|
+
var MainComplementarySidebar = /* @__PURE__ */ forwardRef18((props, forwardedRef) => {
|
|
1642
1673
|
const { complementarySidebarOpen, setComplementarySidebarOpen, resizing } = useMainContext(COMPLEMENTARY_SIDEBAR_NAME);
|
|
1643
1674
|
const mover = useLandmarkMover(props.onKeyDown, "2");
|
|
1644
|
-
return /* @__PURE__ */
|
|
1675
|
+
return /* @__PURE__ */ React21.createElement(MainSidebar, {
|
|
1645
1676
|
...mover,
|
|
1646
1677
|
...props,
|
|
1647
1678
|
open: complementarySidebarOpen,
|
|
@@ -1652,12 +1683,12 @@ var MainComplementarySidebar = /* @__PURE__ */ forwardRef17((props, forwardedRef
|
|
|
1652
1683
|
});
|
|
1653
1684
|
});
|
|
1654
1685
|
MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
|
|
1655
|
-
var MainContent = /* @__PURE__ */
|
|
1686
|
+
var MainContent = /* @__PURE__ */ forwardRef18(({ asChild, classNames, bounce, handlesFocus, children, role, ...props }, forwardedRef) => {
|
|
1656
1687
|
const { navigationSidebarOpen, complementarySidebarOpen } = useMainContext(MAIN_NAME);
|
|
1657
1688
|
const { tx } = useThemeContext();
|
|
1658
1689
|
const Root3 = asChild ? Slot10 : role ? "div" : "main";
|
|
1659
1690
|
const mover = useLandmarkMover(props.onKeyDown, "1");
|
|
1660
|
-
return /* @__PURE__ */
|
|
1691
|
+
return /* @__PURE__ */ React21.createElement(Root3, {
|
|
1661
1692
|
role,
|
|
1662
1693
|
...handlesFocus && {
|
|
1663
1694
|
...mover
|
|
@@ -1673,13 +1704,13 @@ var MainContent = /* @__PURE__ */ forwardRef17(({ asChild, classNames, bounce, h
|
|
|
1673
1704
|
}, children);
|
|
1674
1705
|
});
|
|
1675
1706
|
MainContent.displayName = MAIN_NAME;
|
|
1676
|
-
var MainOverlay = /* @__PURE__ */
|
|
1707
|
+
var MainOverlay = /* @__PURE__ */ forwardRef18(({ classNames, ...props }, forwardedRef) => {
|
|
1677
1708
|
const [isLg] = useMediaQuery("lg", {
|
|
1678
1709
|
ssr: false
|
|
1679
1710
|
});
|
|
1680
1711
|
const { navigationSidebarOpen, setNavigationSidebarOpen, complementarySidebarOpen, setComplementarySidebarOpen } = useMainContext(MAIN_NAME);
|
|
1681
1712
|
const { tx } = useThemeContext();
|
|
1682
|
-
return /* @__PURE__ */
|
|
1713
|
+
return /* @__PURE__ */ React21.createElement("div", {
|
|
1683
1714
|
onClick: () => {
|
|
1684
1715
|
setNavigationSidebarOpen(false);
|
|
1685
1716
|
setComplementarySidebarOpen(false);
|
|
@@ -1695,7 +1726,7 @@ var MainOverlay = /* @__PURE__ */ forwardRef17(({ classNames, ...props }, forwar
|
|
|
1695
1726
|
ref: forwardedRef
|
|
1696
1727
|
});
|
|
1697
1728
|
});
|
|
1698
|
-
var MainNotch = /* @__PURE__ */
|
|
1729
|
+
var MainNotch = /* @__PURE__ */ forwardRef18(({ classNames, ...props }, forwardedRef) => {
|
|
1699
1730
|
const { tx } = useThemeContext();
|
|
1700
1731
|
const { navigationSidebarOpen } = useMainContext(MAIN_NAME);
|
|
1701
1732
|
const notchElement = useRef(null);
|
|
@@ -1710,7 +1741,7 @@ var MainNotch = /* @__PURE__ */ forwardRef17(({ classNames, ...props }, forwarde
|
|
|
1710
1741
|
props?.onKeyDown
|
|
1711
1742
|
]);
|
|
1712
1743
|
const mover = useLandmarkMover(handleKeyDown, "3");
|
|
1713
|
-
return /* @__PURE__ */
|
|
1744
|
+
return /* @__PURE__ */ React21.createElement("div", {
|
|
1714
1745
|
role: "toolbar",
|
|
1715
1746
|
...mover,
|
|
1716
1747
|
...props,
|
|
@@ -1732,20 +1763,20 @@ var Main = {
|
|
|
1732
1763
|
import { createContext as createContext9 } from "@radix-ui/react-context";
|
|
1733
1764
|
import { Primitive as Primitive10 } from "@radix-ui/react-primitive";
|
|
1734
1765
|
import { Slot as Slot11 } from "@radix-ui/react-slot";
|
|
1735
|
-
import
|
|
1766
|
+
import React22, { forwardRef as forwardRef19 } from "react";
|
|
1736
1767
|
import { useId as useId3 } from "@dxos/react-hooks";
|
|
1737
1768
|
var MESSAGE_NAME = "Message";
|
|
1738
1769
|
var [MessageProvider, useMessageContext] = createContext9(MESSAGE_NAME);
|
|
1739
|
-
var MessageRoot = /* @__PURE__ */
|
|
1770
|
+
var MessageRoot = /* @__PURE__ */ forwardRef19(({ asChild, valence, elevation: propsElevation, className, titleId: propsTitleId, descriptionId: propsDescriptionId, children, ...props }, forwardedRef) => {
|
|
1740
1771
|
const { tx } = useThemeContext();
|
|
1741
1772
|
const titleId = useId3("message__title", propsTitleId);
|
|
1742
1773
|
const descriptionId = useId3("message__description", propsDescriptionId);
|
|
1743
1774
|
const elevation = useElevationContext(propsElevation);
|
|
1744
1775
|
const Root3 = asChild ? Slot11 : Primitive10.div;
|
|
1745
|
-
return /* @__PURE__ */
|
|
1776
|
+
return /* @__PURE__ */ React22.createElement(MessageProvider, {
|
|
1746
1777
|
titleId,
|
|
1747
1778
|
descriptionId
|
|
1748
|
-
}, /* @__PURE__ */
|
|
1779
|
+
}, /* @__PURE__ */ React22.createElement(Root3, {
|
|
1749
1780
|
...props,
|
|
1750
1781
|
className: tx("message.root", "message", {
|
|
1751
1782
|
valence,
|
|
@@ -1758,11 +1789,11 @@ var MessageRoot = /* @__PURE__ */ forwardRef18(({ asChild, valence, elevation: p
|
|
|
1758
1789
|
});
|
|
1759
1790
|
MessageRoot.displayName = MESSAGE_NAME;
|
|
1760
1791
|
var MESSAGE_TITLE_NAME = "MessageTitle";
|
|
1761
|
-
var MessageTitle = /* @__PURE__ */
|
|
1792
|
+
var MessageTitle = /* @__PURE__ */ forwardRef19(({ asChild, className, children, ...props }, forwardedRef) => {
|
|
1762
1793
|
const { tx } = useThemeContext();
|
|
1763
1794
|
const { titleId } = useMessageContext(MESSAGE_TITLE_NAME);
|
|
1764
1795
|
const Root3 = asChild ? Slot11 : Primitive10.h2;
|
|
1765
|
-
return /* @__PURE__ */
|
|
1796
|
+
return /* @__PURE__ */ React22.createElement(Root3, {
|
|
1766
1797
|
...props,
|
|
1767
1798
|
className: tx("message.title", "message__title", {}, className),
|
|
1768
1799
|
id: titleId,
|
|
@@ -1771,11 +1802,11 @@ var MessageTitle = /* @__PURE__ */ forwardRef18(({ asChild, className, children,
|
|
|
1771
1802
|
});
|
|
1772
1803
|
MessageTitle.displayName = MESSAGE_TITLE_NAME;
|
|
1773
1804
|
var MESSAGE_BODY_NAME = "MessageBody";
|
|
1774
|
-
var MessageBody = /* @__PURE__ */
|
|
1805
|
+
var MessageBody = /* @__PURE__ */ forwardRef19(({ asChild, className, children, ...props }, forwardedRef) => {
|
|
1775
1806
|
const { tx } = useThemeContext();
|
|
1776
1807
|
const { descriptionId } = useMessageContext(MESSAGE_BODY_NAME);
|
|
1777
1808
|
const Root3 = asChild ? Slot11 : Primitive10.p;
|
|
1778
|
-
return /* @__PURE__ */
|
|
1809
|
+
return /* @__PURE__ */ React22.createElement(Root3, {
|
|
1779
1810
|
...props,
|
|
1780
1811
|
className: tx("message.body", "message__body", {}, className),
|
|
1781
1812
|
id: descriptionId,
|
|
@@ -1793,36 +1824,36 @@ var Message = {
|
|
|
1793
1824
|
import { Root as PopoverRootPrimitive, PopoverContent as PopoverContentPrimitive, PopoverTrigger as PopoverTriggerPrimitive, PopoverAnchor as PopoverAnchorPrimitive, PopoverPortal as PopoverPortalPrimitive, PopoverArrow as PopoverArrowPrimitive, PopoverClose as PopoverClosePrimitive } from "@radix-ui/react-popover";
|
|
1794
1825
|
import { Primitive as Primitive11 } from "@radix-ui/react-primitive";
|
|
1795
1826
|
import { Slot as Slot12 } from "@radix-ui/react-slot";
|
|
1796
|
-
import
|
|
1827
|
+
import React23, { forwardRef as forwardRef20 } from "react";
|
|
1797
1828
|
var PopoverRoot = PopoverRootPrimitive;
|
|
1798
1829
|
var PopoverPortal = PopoverPortalPrimitive;
|
|
1799
1830
|
var PopoverTrigger = PopoverTriggerPrimitive;
|
|
1800
1831
|
var PopoverAnchor = PopoverAnchorPrimitive;
|
|
1801
1832
|
var PopoverClose = PopoverClosePrimitive;
|
|
1802
|
-
var PopoverArrow = /* @__PURE__ */
|
|
1833
|
+
var PopoverArrow = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwardedRef) => {
|
|
1803
1834
|
const { tx } = useThemeContext();
|
|
1804
|
-
return /* @__PURE__ */
|
|
1835
|
+
return /* @__PURE__ */ React23.createElement(PopoverArrowPrimitive, {
|
|
1805
1836
|
...props,
|
|
1806
1837
|
className: tx("popover.arrow", "popover__arrow", {}, classNames),
|
|
1807
1838
|
ref: forwardedRef
|
|
1808
1839
|
});
|
|
1809
1840
|
});
|
|
1810
|
-
var PopoverContent = /* @__PURE__ */
|
|
1841
|
+
var PopoverContent = /* @__PURE__ */ forwardRef20(({ classNames, children, ...props }, forwardedRef) => {
|
|
1811
1842
|
const { tx } = useThemeContext();
|
|
1812
|
-
return /* @__PURE__ */
|
|
1843
|
+
return /* @__PURE__ */ React23.createElement(PopoverContentPrimitive, {
|
|
1813
1844
|
sideOffset: 4,
|
|
1814
1845
|
collisionPadding: 8,
|
|
1815
1846
|
...props,
|
|
1816
1847
|
className: tx("popover.content", "popover", {}, classNames),
|
|
1817
1848
|
ref: forwardedRef
|
|
1818
|
-
}, /* @__PURE__ */
|
|
1849
|
+
}, /* @__PURE__ */ React23.createElement(ElevationProvider, {
|
|
1819
1850
|
elevation: "chrome"
|
|
1820
1851
|
}, children));
|
|
1821
1852
|
});
|
|
1822
|
-
var PopoverViewport = /* @__PURE__ */
|
|
1853
|
+
var PopoverViewport = /* @__PURE__ */ forwardRef20(({ classNames, asChild, constrainInline = true, constrainBlock = true, children, ...props }, forwardedRef) => {
|
|
1823
1854
|
const { tx } = useThemeContext();
|
|
1824
1855
|
const Root3 = asChild ? Slot12 : Primitive11.div;
|
|
1825
|
-
return /* @__PURE__ */
|
|
1856
|
+
return /* @__PURE__ */ React23.createElement(Root3, {
|
|
1826
1857
|
...props,
|
|
1827
1858
|
className: tx("popover.viewport", "popover__viewport", {
|
|
1828
1859
|
constrainInline,
|
|
@@ -1843,17 +1874,17 @@ var Popover = {
|
|
|
1843
1874
|
};
|
|
1844
1875
|
|
|
1845
1876
|
// packages/ui/react-ui/src/components/Status/Status.tsx
|
|
1846
|
-
import
|
|
1847
|
-
var Status = /* @__PURE__ */
|
|
1877
|
+
import React24, { forwardRef as forwardRef21 } from "react";
|
|
1878
|
+
var Status = /* @__PURE__ */ forwardRef21(({ classNames, children, progress = 0, indeterminate, ...props }, forwardedRef) => {
|
|
1848
1879
|
const { tx } = useThemeContext();
|
|
1849
|
-
return /* @__PURE__ */
|
|
1880
|
+
return /* @__PURE__ */ React24.createElement("span", {
|
|
1850
1881
|
role: "status",
|
|
1851
1882
|
...props,
|
|
1852
1883
|
className: tx("status.root", "status", {
|
|
1853
1884
|
indeterminate
|
|
1854
1885
|
}, classNames),
|
|
1855
1886
|
ref: forwardedRef
|
|
1856
|
-
}, /* @__PURE__ */
|
|
1887
|
+
}, /* @__PURE__ */ React24.createElement("span", {
|
|
1857
1888
|
role: "none",
|
|
1858
1889
|
className: tx("status.bar", "status__bar", {
|
|
1859
1890
|
indeterminate
|
|
@@ -1868,43 +1899,43 @@ var Status = /* @__PURE__ */ forwardRef20(({ classNames, children, progress = 0,
|
|
|
1868
1899
|
|
|
1869
1900
|
// packages/ui/react-ui/src/components/ScrollArea/ScrollArea.tsx
|
|
1870
1901
|
import { Root as ScrollAreaPrimitiveRoot, Viewport as ScrollAreaPrimitiveViewport, Scrollbar as ScrollAreaPrimitiveScrollbar, Thumb as ScrollAreaPrimitiveThumb, Corner as ScrollAreaPrimitiveCorner } from "@radix-ui/react-scroll-area";
|
|
1871
|
-
import
|
|
1872
|
-
var ScrollAreaRoot = /* @__PURE__ */
|
|
1902
|
+
import React25, { forwardRef as forwardRef22 } from "react";
|
|
1903
|
+
var ScrollAreaRoot = /* @__PURE__ */ forwardRef22(({ classNames, ...props }, forwardedRef) => {
|
|
1873
1904
|
const { tx } = useThemeContext();
|
|
1874
|
-
return /* @__PURE__ */
|
|
1905
|
+
return /* @__PURE__ */ React25.createElement(ScrollAreaPrimitiveRoot, {
|
|
1875
1906
|
...props,
|
|
1876
1907
|
className: tx("scrollArea.root", "scroll-area", {}, classNames),
|
|
1877
1908
|
ref: forwardedRef
|
|
1878
1909
|
});
|
|
1879
1910
|
});
|
|
1880
|
-
var ScrollAreaViewport = /* @__PURE__ */
|
|
1911
|
+
var ScrollAreaViewport = /* @__PURE__ */ forwardRef22(({ classNames, ...props }, forwardedRef) => {
|
|
1881
1912
|
const { tx } = useThemeContext();
|
|
1882
|
-
return /* @__PURE__ */
|
|
1913
|
+
return /* @__PURE__ */ React25.createElement(ScrollAreaPrimitiveViewport, {
|
|
1883
1914
|
...props,
|
|
1884
1915
|
className: tx("scrollArea.viewport", "scroll-area", {}, classNames),
|
|
1885
1916
|
ref: forwardedRef
|
|
1886
1917
|
});
|
|
1887
1918
|
});
|
|
1888
|
-
var ScrollAreaScrollbar = /* @__PURE__ */
|
|
1919
|
+
var ScrollAreaScrollbar = /* @__PURE__ */ forwardRef22(({ classNames, variant = "fine", ...props }, forwardedRef) => {
|
|
1889
1920
|
const { tx } = useThemeContext();
|
|
1890
|
-
return /* @__PURE__ */
|
|
1921
|
+
return /* @__PURE__ */ React25.createElement(ScrollAreaPrimitiveScrollbar, {
|
|
1891
1922
|
"data-variant": variant,
|
|
1892
1923
|
...props,
|
|
1893
1924
|
className: tx("scrollArea.scrollbar", "scroll-area__scrollbar", {}, classNames),
|
|
1894
1925
|
ref: forwardedRef
|
|
1895
1926
|
});
|
|
1896
1927
|
});
|
|
1897
|
-
var ScrollAreaThumb = /* @__PURE__ */
|
|
1928
|
+
var ScrollAreaThumb = /* @__PURE__ */ forwardRef22(({ classNames, ...props }, forwardedRef) => {
|
|
1898
1929
|
const { tx } = useThemeContext();
|
|
1899
|
-
return /* @__PURE__ */
|
|
1930
|
+
return /* @__PURE__ */ React25.createElement(ScrollAreaPrimitiveThumb, {
|
|
1900
1931
|
...props,
|
|
1901
1932
|
className: tx("scrollArea.thumb", "scroll-area__thumb", {}, classNames),
|
|
1902
1933
|
ref: forwardedRef
|
|
1903
1934
|
});
|
|
1904
1935
|
});
|
|
1905
|
-
var ScrollAreaCorner = /* @__PURE__ */
|
|
1936
|
+
var ScrollAreaCorner = /* @__PURE__ */ forwardRef22(({ classNames, ...props }, forwardedRef) => {
|
|
1906
1937
|
const { tx } = useThemeContext();
|
|
1907
|
-
return /* @__PURE__ */
|
|
1938
|
+
return /* @__PURE__ */ React25.createElement(ScrollAreaPrimitiveCorner, {
|
|
1908
1939
|
...props,
|
|
1909
1940
|
className: tx("scrollArea.corner", "scroll-area__corner", {}, classNames),
|
|
1910
1941
|
ref: forwardedRef
|
|
@@ -1921,99 +1952,99 @@ var ScrollArea = {
|
|
|
1921
1952
|
// packages/ui/react-ui/src/components/Select/Select.tsx
|
|
1922
1953
|
import { CaretDown as CaretDown2, CaretUp, Check as Check2 } from "@phosphor-icons/react";
|
|
1923
1954
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
1924
|
-
import
|
|
1955
|
+
import React26, { forwardRef as forwardRef23 } from "react";
|
|
1925
1956
|
var SelectRoot = SelectPrimitive.Root;
|
|
1926
1957
|
var SelectTrigger = SelectPrimitive.Trigger;
|
|
1927
1958
|
var SelectValue = SelectPrimitive.Value;
|
|
1928
1959
|
var SelectIcon = SelectPrimitive.Icon;
|
|
1929
1960
|
var SelectPortal = SelectPrimitive.Portal;
|
|
1930
|
-
var SelectTriggerButton = /* @__PURE__ */
|
|
1961
|
+
var SelectTriggerButton = /* @__PURE__ */ forwardRef23(({ children, placeholder, ...props }, forwardedRef) => {
|
|
1931
1962
|
const { tx } = useThemeContext();
|
|
1932
|
-
return /* @__PURE__ */
|
|
1963
|
+
return /* @__PURE__ */ React26.createElement(SelectPrimitive.Trigger, {
|
|
1933
1964
|
asChild: true,
|
|
1934
1965
|
ref: forwardedRef
|
|
1935
|
-
}, /* @__PURE__ */
|
|
1966
|
+
}, /* @__PURE__ */ React26.createElement(Button, props, /* @__PURE__ */ React26.createElement(SelectPrimitive.Value, {
|
|
1936
1967
|
placeholder
|
|
1937
|
-
}, children), /* @__PURE__ */
|
|
1968
|
+
}, children), /* @__PURE__ */ React26.createElement(SelectPrimitive.Icon, {
|
|
1938
1969
|
asChild: true
|
|
1939
|
-
}, /* @__PURE__ */
|
|
1970
|
+
}, /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement("span", {
|
|
1940
1971
|
className: "w-1"
|
|
1941
|
-
}), /* @__PURE__ */
|
|
1972
|
+
}), /* @__PURE__ */ React26.createElement(CaretDown2, {
|
|
1942
1973
|
className: tx("select.triggerIcon", "select__trigger__icon", {}),
|
|
1943
1974
|
weight: "bold"
|
|
1944
1975
|
})))));
|
|
1945
1976
|
});
|
|
1946
|
-
var SelectContent = /* @__PURE__ */
|
|
1977
|
+
var SelectContent = /* @__PURE__ */ forwardRef23(({ classNames, children, ...props }, forwardedRef) => {
|
|
1947
1978
|
const { tx } = useThemeContext();
|
|
1948
|
-
return /* @__PURE__ */
|
|
1979
|
+
return /* @__PURE__ */ React26.createElement(SelectPrimitive.Content, {
|
|
1949
1980
|
...props,
|
|
1950
1981
|
className: tx("select.content", "select__content", {}, classNames),
|
|
1951
1982
|
ref: forwardedRef
|
|
1952
1983
|
}, children);
|
|
1953
1984
|
});
|
|
1954
|
-
var SelectScrollUpButton2 = /* @__PURE__ */
|
|
1985
|
+
var SelectScrollUpButton2 = /* @__PURE__ */ forwardRef23(({ classNames, children, ...props }, forwardedRef) => {
|
|
1955
1986
|
const { tx } = useThemeContext();
|
|
1956
|
-
return /* @__PURE__ */
|
|
1987
|
+
return /* @__PURE__ */ React26.createElement(SelectPrimitive.SelectScrollUpButton, {
|
|
1957
1988
|
...props,
|
|
1958
1989
|
className: tx("select.scrollButton", "select__scroll-button--up", {}, classNames),
|
|
1959
1990
|
ref: forwardedRef
|
|
1960
|
-
}, children ?? /* @__PURE__ */
|
|
1991
|
+
}, children ?? /* @__PURE__ */ React26.createElement(CaretUp, {
|
|
1961
1992
|
weight: "bold"
|
|
1962
1993
|
}));
|
|
1963
1994
|
});
|
|
1964
|
-
var SelectScrollDownButton2 = /* @__PURE__ */
|
|
1995
|
+
var SelectScrollDownButton2 = /* @__PURE__ */ forwardRef23(({ classNames, children, ...props }, forwardedRef) => {
|
|
1965
1996
|
const { tx } = useThemeContext();
|
|
1966
|
-
return /* @__PURE__ */
|
|
1997
|
+
return /* @__PURE__ */ React26.createElement(SelectPrimitive.SelectScrollDownButton, {
|
|
1967
1998
|
...props,
|
|
1968
1999
|
className: tx("select.scrollButton", "select__scroll-button--down", {}, classNames),
|
|
1969
2000
|
ref: forwardedRef
|
|
1970
|
-
}, children ?? /* @__PURE__ */
|
|
2001
|
+
}, children ?? /* @__PURE__ */ React26.createElement(CaretDown2, {
|
|
1971
2002
|
weight: "bold"
|
|
1972
2003
|
}));
|
|
1973
2004
|
});
|
|
1974
2005
|
var SelectViewport = SelectPrimitive.Viewport;
|
|
1975
|
-
var SelectItem = /* @__PURE__ */
|
|
2006
|
+
var SelectItem = /* @__PURE__ */ forwardRef23(({ classNames, ...props }, forwardedRef) => {
|
|
1976
2007
|
const { tx } = useThemeContext();
|
|
1977
|
-
return /* @__PURE__ */
|
|
2008
|
+
return /* @__PURE__ */ React26.createElement(SelectPrimitive.Item, {
|
|
1978
2009
|
...props,
|
|
1979
2010
|
className: tx("select.item", "option", {}, classNames),
|
|
1980
2011
|
ref: forwardedRef
|
|
1981
2012
|
});
|
|
1982
2013
|
});
|
|
1983
2014
|
var SelectItemText = SelectPrimitive.ItemText;
|
|
1984
|
-
var SelectItemIndicator = /* @__PURE__ */
|
|
2015
|
+
var SelectItemIndicator = /* @__PURE__ */ forwardRef23(({ classNames, children, ...props }, forwardedRef) => {
|
|
1985
2016
|
const { tx } = useThemeContext();
|
|
1986
|
-
return /* @__PURE__ */
|
|
2017
|
+
return /* @__PURE__ */ React26.createElement(SelectPrimitive.ItemIndicator, {
|
|
1987
2018
|
...props,
|
|
1988
2019
|
className: tx("select.itemIndicator", "option__indicator", {}, classNames),
|
|
1989
2020
|
ref: forwardedRef
|
|
1990
2021
|
}, children);
|
|
1991
2022
|
});
|
|
1992
|
-
var SelectOption = /* @__PURE__ */
|
|
2023
|
+
var SelectOption = /* @__PURE__ */ forwardRef23(({ children, classNames, ...props }, forwardedRef) => {
|
|
1993
2024
|
const { tx } = useThemeContext();
|
|
1994
|
-
return /* @__PURE__ */
|
|
2025
|
+
return /* @__PURE__ */ React26.createElement(SelectPrimitive.Item, {
|
|
1995
2026
|
...props,
|
|
1996
2027
|
className: tx("select.item", "option", {}, classNames),
|
|
1997
2028
|
ref: forwardedRef
|
|
1998
|
-
}, /* @__PURE__ */
|
|
2029
|
+
}, /* @__PURE__ */ React26.createElement(SelectPrimitive.ItemText, null, children), /* @__PURE__ */ React26.createElement(SelectPrimitive.ItemIndicator, {
|
|
1999
2030
|
className: tx("select.itemIndicator", "option__indicator", {})
|
|
2000
|
-
}, /* @__PURE__ */
|
|
2031
|
+
}, /* @__PURE__ */ React26.createElement(Check2, {
|
|
2001
2032
|
weight: "bold"
|
|
2002
2033
|
})));
|
|
2003
2034
|
});
|
|
2004
2035
|
var SelectGroup = SelectPrimitive.Group;
|
|
2005
2036
|
var SelectLabel = SelectPrimitive.Label;
|
|
2006
|
-
var SelectSeparator = /* @__PURE__ */
|
|
2037
|
+
var SelectSeparator = /* @__PURE__ */ forwardRef23(({ classNames, ...props }, forwardedRef) => {
|
|
2007
2038
|
const { tx } = useThemeContext();
|
|
2008
|
-
return /* @__PURE__ */
|
|
2039
|
+
return /* @__PURE__ */ React26.createElement(SelectPrimitive.Separator, {
|
|
2009
2040
|
...props,
|
|
2010
2041
|
className: tx("select.separator", "select__separator", {}, classNames),
|
|
2011
2042
|
ref: forwardedRef
|
|
2012
2043
|
});
|
|
2013
2044
|
});
|
|
2014
|
-
var SelectArrow = /* @__PURE__ */
|
|
2045
|
+
var SelectArrow = /* @__PURE__ */ forwardRef23(({ classNames, ...props }, forwardedRef) => {
|
|
2015
2046
|
const { tx } = useThemeContext();
|
|
2016
|
-
return /* @__PURE__ */
|
|
2047
|
+
return /* @__PURE__ */ React26.createElement(SelectPrimitive.Arrow, {
|
|
2017
2048
|
...props,
|
|
2018
2049
|
className: tx("select.arrow", "select__arrow", {}, classNames),
|
|
2019
2050
|
ref: forwardedRef
|
|
@@ -2042,10 +2073,10 @@ var Select = {
|
|
|
2042
2073
|
|
|
2043
2074
|
// packages/ui/react-ui/src/components/Separator/Separator.tsx
|
|
2044
2075
|
import { Separator as SeparatorPrimitive } from "@radix-ui/react-separator";
|
|
2045
|
-
import
|
|
2076
|
+
import React27 from "react";
|
|
2046
2077
|
var Separator4 = ({ classNames, orientation = "horizontal", ...props }) => {
|
|
2047
2078
|
const { tx } = useThemeContext();
|
|
2048
|
-
return /* @__PURE__ */
|
|
2079
|
+
return /* @__PURE__ */ React27.createElement(SeparatorPrimitive, {
|
|
2049
2080
|
orientation,
|
|
2050
2081
|
...props,
|
|
2051
2082
|
className: tx("separator.root", "separator", {
|
|
@@ -2057,11 +2088,11 @@ var Separator4 = ({ classNames, orientation = "horizontal", ...props }) => {
|
|
|
2057
2088
|
// packages/ui/react-ui/src/components/Tag/Tag.tsx
|
|
2058
2089
|
import { Primitive as Primitive12 } from "@radix-ui/react-primitive";
|
|
2059
2090
|
import { Slot as Slot13 } from "@radix-ui/react-slot";
|
|
2060
|
-
import
|
|
2061
|
-
var Tag = /* @__PURE__ */
|
|
2091
|
+
import React28, { forwardRef as forwardRef24 } from "react";
|
|
2092
|
+
var Tag = /* @__PURE__ */ forwardRef24(({ asChild, palette, classNames, ...props }, forwardedRef) => {
|
|
2062
2093
|
const { tx } = useThemeContext();
|
|
2063
2094
|
const Root3 = asChild ? Slot13 : Primitive12.span;
|
|
2064
|
-
return /* @__PURE__ */
|
|
2095
|
+
return /* @__PURE__ */ React28.createElement(Root3, {
|
|
2065
2096
|
...props,
|
|
2066
2097
|
className: tx("tag.root", "tag", {
|
|
2067
2098
|
palette
|
|
@@ -2074,58 +2105,58 @@ var Tag = /* @__PURE__ */ forwardRef23(({ asChild, palette, classNames, ...props
|
|
|
2074
2105
|
import { Primitive as Primitive13 } from "@radix-ui/react-primitive";
|
|
2075
2106
|
import { Slot as Slot14 } from "@radix-ui/react-slot";
|
|
2076
2107
|
import { ToastProvider as ToastProviderPrimitive, ToastViewport as ToastViewportPrimitive, Root as ToastRootPrimitive, ToastTitle as ToastTitlePrimitive, ToastDescription as ToastDescriptionPrimitive, ToastAction as ToastActionPrimitive, ToastClose as ToastClosePrimitive } from "@radix-ui/react-toast";
|
|
2077
|
-
import
|
|
2108
|
+
import React29, { forwardRef as forwardRef25 } from "react";
|
|
2078
2109
|
var ToastProvider = ToastProviderPrimitive;
|
|
2079
|
-
var ToastViewport = /* @__PURE__ */
|
|
2110
|
+
var ToastViewport = /* @__PURE__ */ forwardRef25(({ classNames, ...props }, forwardedRef) => {
|
|
2080
2111
|
const { tx } = useThemeContext();
|
|
2081
|
-
return /* @__PURE__ */
|
|
2112
|
+
return /* @__PURE__ */ React29.createElement(ToastViewportPrimitive, {
|
|
2082
2113
|
className: tx("toast.viewport", "toast-viewport", {}, classNames),
|
|
2083
2114
|
ref: forwardedRef
|
|
2084
2115
|
});
|
|
2085
2116
|
});
|
|
2086
|
-
var ToastRoot = /* @__PURE__ */
|
|
2117
|
+
var ToastRoot = /* @__PURE__ */ forwardRef25(({ classNames, children, ...props }, forwardedRef) => {
|
|
2087
2118
|
const { tx } = useThemeContext();
|
|
2088
|
-
return /* @__PURE__ */
|
|
2119
|
+
return /* @__PURE__ */ React29.createElement(ToastRootPrimitive, {
|
|
2089
2120
|
...props,
|
|
2090
2121
|
className: tx("toast.root", "toast", {}, classNames),
|
|
2091
2122
|
ref: forwardedRef
|
|
2092
|
-
}, /* @__PURE__ */
|
|
2123
|
+
}, /* @__PURE__ */ React29.createElement(ElevationProvider, {
|
|
2093
2124
|
elevation: "chrome"
|
|
2094
|
-
}, /* @__PURE__ */
|
|
2125
|
+
}, /* @__PURE__ */ React29.createElement(DensityProvider, {
|
|
2095
2126
|
density: "fine"
|
|
2096
2127
|
}, children)));
|
|
2097
2128
|
});
|
|
2098
|
-
var ToastBody = /* @__PURE__ */
|
|
2129
|
+
var ToastBody = /* @__PURE__ */ forwardRef25(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
2099
2130
|
const { tx } = useThemeContext();
|
|
2100
2131
|
const Root3 = asChild ? Slot14 : Primitive13.div;
|
|
2101
|
-
return /* @__PURE__ */
|
|
2132
|
+
return /* @__PURE__ */ React29.createElement(Root3, {
|
|
2102
2133
|
...props,
|
|
2103
2134
|
className: tx("toast.body", "toast__body", {}, classNames),
|
|
2104
2135
|
ref: forwardedRef
|
|
2105
2136
|
});
|
|
2106
2137
|
});
|
|
2107
|
-
var ToastTitle = /* @__PURE__ */
|
|
2138
|
+
var ToastTitle = /* @__PURE__ */ forwardRef25(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
2108
2139
|
const { tx } = useThemeContext();
|
|
2109
2140
|
const Root3 = asChild ? Slot14 : ToastTitlePrimitive;
|
|
2110
|
-
return /* @__PURE__ */
|
|
2141
|
+
return /* @__PURE__ */ React29.createElement(Root3, {
|
|
2111
2142
|
...props,
|
|
2112
2143
|
className: tx("toast.title", "toast__title", {}, classNames),
|
|
2113
2144
|
ref: forwardedRef
|
|
2114
2145
|
});
|
|
2115
2146
|
});
|
|
2116
|
-
var ToastDescription = /* @__PURE__ */
|
|
2147
|
+
var ToastDescription = /* @__PURE__ */ forwardRef25(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
2117
2148
|
const { tx } = useThemeContext();
|
|
2118
2149
|
const Root3 = asChild ? Slot14 : ToastDescriptionPrimitive;
|
|
2119
|
-
return /* @__PURE__ */
|
|
2150
|
+
return /* @__PURE__ */ React29.createElement(Root3, {
|
|
2120
2151
|
...props,
|
|
2121
2152
|
className: tx("toast.description", "toast__description", {}, classNames),
|
|
2122
2153
|
ref: forwardedRef
|
|
2123
2154
|
});
|
|
2124
2155
|
});
|
|
2125
|
-
var ToastActions = /* @__PURE__ */
|
|
2156
|
+
var ToastActions = /* @__PURE__ */ forwardRef25(({ asChild, classNames, ...props }, forwardedRef) => {
|
|
2126
2157
|
const { tx } = useThemeContext();
|
|
2127
2158
|
const Root3 = asChild ? Slot14 : Primitive13.div;
|
|
2128
|
-
return /* @__PURE__ */
|
|
2159
|
+
return /* @__PURE__ */ React29.createElement(Root3, {
|
|
2129
2160
|
...props,
|
|
2130
2161
|
className: tx("toast.actions", "toast__actions", {}, classNames),
|
|
2131
2162
|
ref: forwardedRef
|
|
@@ -2147,47 +2178,47 @@ var Toast = {
|
|
|
2147
2178
|
|
|
2148
2179
|
// packages/ui/react-ui/src/components/Toolbar/Toolbar.tsx
|
|
2149
2180
|
import * as ToolbarPrimitive from "@radix-ui/react-toolbar";
|
|
2150
|
-
import
|
|
2151
|
-
var ToolbarRoot = /* @__PURE__ */
|
|
2181
|
+
import React30, { forwardRef as forwardRef26 } from "react";
|
|
2182
|
+
var ToolbarRoot = /* @__PURE__ */ forwardRef26(({ classNames, children, ...props }, forwardedRef) => {
|
|
2152
2183
|
const { tx } = useThemeContext();
|
|
2153
|
-
return /* @__PURE__ */
|
|
2184
|
+
return /* @__PURE__ */ React30.createElement(ToolbarPrimitive.Root, {
|
|
2154
2185
|
...props,
|
|
2155
2186
|
className: tx("toolbar.root", "toolbar", {}, classNames),
|
|
2156
2187
|
ref: forwardedRef
|
|
2157
2188
|
}, children);
|
|
2158
2189
|
});
|
|
2159
|
-
var ToolbarButton = /* @__PURE__ */
|
|
2160
|
-
return /* @__PURE__ */
|
|
2190
|
+
var ToolbarButton = /* @__PURE__ */ forwardRef26((props, forwardedRef) => {
|
|
2191
|
+
return /* @__PURE__ */ React30.createElement(ToolbarPrimitive.Button, {
|
|
2161
2192
|
asChild: true
|
|
2162
|
-
}, /* @__PURE__ */
|
|
2193
|
+
}, /* @__PURE__ */ React30.createElement(Button, {
|
|
2163
2194
|
...props,
|
|
2164
2195
|
ref: forwardedRef
|
|
2165
2196
|
}));
|
|
2166
2197
|
});
|
|
2167
|
-
var ToolbarLink = /* @__PURE__ */
|
|
2168
|
-
return /* @__PURE__ */
|
|
2198
|
+
var ToolbarLink = /* @__PURE__ */ forwardRef26((props, forwardedRef) => {
|
|
2199
|
+
return /* @__PURE__ */ React30.createElement(ToolbarPrimitive.Link, {
|
|
2169
2200
|
asChild: true
|
|
2170
|
-
}, /* @__PURE__ */
|
|
2201
|
+
}, /* @__PURE__ */ React30.createElement(Link, {
|
|
2171
2202
|
...props,
|
|
2172
2203
|
ref: forwardedRef
|
|
2173
2204
|
}));
|
|
2174
2205
|
});
|
|
2175
|
-
var ToolbarToggleGroup2 = /* @__PURE__ */
|
|
2176
|
-
return /* @__PURE__ */
|
|
2206
|
+
var ToolbarToggleGroup2 = /* @__PURE__ */ forwardRef26(({ classNames, children, elevation, ...props }, forwardedRef) => {
|
|
2207
|
+
return /* @__PURE__ */ React30.createElement(ToolbarPrimitive.ToolbarToggleGroup, {
|
|
2177
2208
|
...props,
|
|
2178
2209
|
asChild: true
|
|
2179
|
-
}, /* @__PURE__ */
|
|
2210
|
+
}, /* @__PURE__ */ React30.createElement(ButtonGroup, {
|
|
2180
2211
|
classNames,
|
|
2181
2212
|
children,
|
|
2182
2213
|
elevation,
|
|
2183
2214
|
ref: forwardedRef
|
|
2184
2215
|
}));
|
|
2185
2216
|
});
|
|
2186
|
-
var ToolbarToggleGroupItem = /* @__PURE__ */
|
|
2187
|
-
return /* @__PURE__ */
|
|
2217
|
+
var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef26(({ variant, density, elevation, classNames, children, ...props }, forwardedRef) => {
|
|
2218
|
+
return /* @__PURE__ */ React30.createElement(ToolbarPrimitive.ToolbarToggleItem, {
|
|
2188
2219
|
...props,
|
|
2189
2220
|
asChild: true
|
|
2190
|
-
}, /* @__PURE__ */
|
|
2221
|
+
}, /* @__PURE__ */ React30.createElement(Button, {
|
|
2191
2222
|
variant,
|
|
2192
2223
|
density,
|
|
2193
2224
|
elevation,
|
|
@@ -2197,9 +2228,9 @@ var ToolbarToggleGroupItem = /* @__PURE__ */ forwardRef25(({ variant, density, e
|
|
|
2197
2228
|
}));
|
|
2198
2229
|
});
|
|
2199
2230
|
var ToolbarSeparator = (props) => {
|
|
2200
|
-
return /* @__PURE__ */
|
|
2231
|
+
return /* @__PURE__ */ React30.createElement(ToolbarPrimitive.Separator, {
|
|
2201
2232
|
asChild: true
|
|
2202
|
-
}, /* @__PURE__ */
|
|
2233
|
+
}, /* @__PURE__ */ React30.createElement(Separator4, {
|
|
2203
2234
|
orientation: "vertical",
|
|
2204
2235
|
...props
|
|
2205
2236
|
}));
|
|
@@ -2215,22 +2246,22 @@ var Toolbar = {
|
|
|
2215
2246
|
|
|
2216
2247
|
// packages/ui/react-ui/src/components/Tooltip/Tooltip.tsx
|
|
2217
2248
|
import { Provider as TooltipProviderPrimitive, Root as TooltipRootPrimitive, TooltipContent as TooltipContentPrimitive, TooltipTrigger as TooltipTriggerPrimitive, TooltipPortal as TooltipPortalPrimitive, TooltipArrow as TooltipArrowPrimitive } from "@radix-ui/react-tooltip";
|
|
2218
|
-
import
|
|
2249
|
+
import React31, { forwardRef as forwardRef27 } from "react";
|
|
2219
2250
|
var TooltipProvider = TooltipProviderPrimitive;
|
|
2220
2251
|
var TooltipRoot = TooltipRootPrimitive;
|
|
2221
2252
|
var TooltipPortal = TooltipPortalPrimitive;
|
|
2222
2253
|
var TooltipTrigger = TooltipTriggerPrimitive;
|
|
2223
|
-
var TooltipArrow = /* @__PURE__ */
|
|
2254
|
+
var TooltipArrow = /* @__PURE__ */ forwardRef27(({ classNames, ...props }, forwardedRef) => {
|
|
2224
2255
|
const { tx } = useThemeContext();
|
|
2225
|
-
return /* @__PURE__ */
|
|
2256
|
+
return /* @__PURE__ */ React31.createElement(TooltipArrowPrimitive, {
|
|
2226
2257
|
...props,
|
|
2227
2258
|
className: tx("tooltip.arrow", "tooltip__arrow", {}, classNames),
|
|
2228
2259
|
ref: forwardedRef
|
|
2229
2260
|
});
|
|
2230
2261
|
});
|
|
2231
|
-
var TooltipContent = /* @__PURE__ */
|
|
2262
|
+
var TooltipContent = /* @__PURE__ */ forwardRef27(({ classNames, ...props }, forwardedRef) => {
|
|
2232
2263
|
const { tx } = useThemeContext();
|
|
2233
|
-
return /* @__PURE__ */
|
|
2264
|
+
return /* @__PURE__ */ React31.createElement(TooltipContentPrimitive, {
|
|
2234
2265
|
sideOffset: 4,
|
|
2235
2266
|
collisionPadding: 8,
|
|
2236
2267
|
...props,
|
|
@@ -2249,7 +2280,7 @@ var Tooltip = {
|
|
|
2249
2280
|
|
|
2250
2281
|
// packages/ui/react-ui/src/components/ThemeProvider/ThemeProvider.tsx
|
|
2251
2282
|
import { createKeyborg } from "keyborg";
|
|
2252
|
-
import
|
|
2283
|
+
import React32, { createContext as createContext10, useEffect as useEffect5 } from "react";
|
|
2253
2284
|
|
|
2254
2285
|
// packages/ui/react-ui/src/util/hasIosKeyboard.ts
|
|
2255
2286
|
var hasIosKeyboard = () => {
|
|
@@ -2277,19 +2308,19 @@ var ThemeProvider = ({ children, fallback = null, resourceExtensions, appNs, tx
|
|
|
2277
2308
|
return () => kb.unsubscribe(handleInputModalityChange);
|
|
2278
2309
|
}
|
|
2279
2310
|
}, []);
|
|
2280
|
-
return /* @__PURE__ */
|
|
2311
|
+
return /* @__PURE__ */ React32.createElement(ThemeContext.Provider, {
|
|
2281
2312
|
value: {
|
|
2282
2313
|
tx,
|
|
2283
2314
|
themeMode,
|
|
2284
2315
|
hasIosKeyboard: hasIosKeyboard()
|
|
2285
2316
|
}
|
|
2286
|
-
}, /* @__PURE__ */
|
|
2317
|
+
}, /* @__PURE__ */ React32.createElement(TranslationsProvider, {
|
|
2287
2318
|
fallback,
|
|
2288
2319
|
resourceExtensions,
|
|
2289
2320
|
appNs
|
|
2290
|
-
}, /* @__PURE__ */
|
|
2321
|
+
}, /* @__PURE__ */ React32.createElement(ElevationProvider, {
|
|
2291
2322
|
elevation: rootElevation
|
|
2292
|
-
}, /* @__PURE__ */
|
|
2323
|
+
}, /* @__PURE__ */ React32.createElement(DensityProvider, {
|
|
2293
2324
|
density: rootDensity
|
|
2294
2325
|
}, children))));
|
|
2295
2326
|
};
|
|
@@ -2310,6 +2341,7 @@ export {
|
|
|
2310
2341
|
DropdownMenu2 as DropdownMenu,
|
|
2311
2342
|
ElevationContext,
|
|
2312
2343
|
ElevationProvider,
|
|
2344
|
+
Icon,
|
|
2313
2345
|
Input,
|
|
2314
2346
|
LIST_ITEM_NAME,
|
|
2315
2347
|
LIST_NAME,
|