@staffbase/design 20.4.0 → 21.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/codemods/v21-migrate-toggle/README.md +52 -0
- package/codemods/v21-migrate-toggle/transform.js +99 -0
- package/dist/components.css +1 -1
- package/dist/main.cjs +128 -146
- package/dist/main.cjs.map +1 -1
- package/dist/main.d.ts +64 -106
- package/dist/main.js +128 -144
- package/dist/main.js.map +1 -1
- package/dist/theme.css +1 -1
- package/dist/tokens/primitive.css +1 -13
- package/package.json +5 -7
package/dist/main.cjs
CHANGED
|
@@ -27,8 +27,6 @@ let es_toolkit = require("es-toolkit");
|
|
|
27
27
|
let motion_react = require("motion/react");
|
|
28
28
|
let _base_ui_react_menu = require("@base-ui/react/menu");
|
|
29
29
|
let _base_ui_react_number_field = require("@base-ui/react/number-field");
|
|
30
|
-
let _radix_ui_react_popover = require("@radix-ui/react-popover");
|
|
31
|
-
_radix_ui_react_popover = require_chunk.__toESM(_radix_ui_react_popover, 1);
|
|
32
30
|
let _base_ui_react_combobox = require("@base-ui/react/combobox");
|
|
33
31
|
let _base_ui_react_radio = require("@base-ui/react/radio");
|
|
34
32
|
let _base_ui_react_radio_group = require("@base-ui/react/radio-group");
|
|
@@ -37,6 +35,8 @@ let _base_ui_react_switch = require("@base-ui/react/switch");
|
|
|
37
35
|
let _radix_ui_react_tabs = require("@radix-ui/react-tabs");
|
|
38
36
|
_radix_ui_react_tabs = require_chunk.__toESM(_radix_ui_react_tabs, 1);
|
|
39
37
|
let _base_ui_react_input = require("@base-ui/react/input");
|
|
38
|
+
let _base_ui_react_toggle = require("@base-ui/react/toggle");
|
|
39
|
+
let _base_ui_react_toggle_group = require("@base-ui/react/toggle-group");
|
|
40
40
|
let _base_ui_react_tooltip = require("@base-ui/react/tooltip");
|
|
41
41
|
//#region src/components/actionMenu/ActionMenuContext.tsx
|
|
42
42
|
function useActionMenu({ listRef, placement = "bottom-start", open: controlledOpen, onOpenChange: setControlledOpen }) {
|
|
@@ -359,7 +359,7 @@ var AlertDialog = {
|
|
|
359
359
|
};
|
|
360
360
|
//#endregion
|
|
361
361
|
//#region src/components/avatar/Avatar.tsx
|
|
362
|
-
var Root$
|
|
362
|
+
var Root$9 = (0, react.forwardRef)((props, ref) => {
|
|
363
363
|
const { size = 40, className, ...rest } = props;
|
|
364
364
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_avatar.Avatar.Root, {
|
|
365
365
|
ref,
|
|
@@ -387,7 +387,7 @@ function deriveColor(name) {
|
|
|
387
387
|
return AVATAR_COLORS[name.split("").reduce((acc, char) => acc + (char.codePointAt(0) ?? 0), 0) % AVATAR_COLORS.length] ?? "purple";
|
|
388
388
|
}
|
|
389
389
|
var Avatar = {
|
|
390
|
-
Root: Root$
|
|
390
|
+
Root: Root$9,
|
|
391
391
|
Fallback: (0, react.forwardRef)((props, ref) => {
|
|
392
392
|
const { className, name, ...rest } = props;
|
|
393
393
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_avatar.Avatar.Fallback, {
|
|
@@ -2077,17 +2077,17 @@ var EmailBouncesIcon = react.default.forwardRef((props, ref) => {
|
|
|
2077
2077
|
children: [
|
|
2078
2078
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
2079
2079
|
d: "M14.5833 7.91713C15.4869 7.91768 16.3807 8.10404 17.2092 8.46463C17.2736 8.49196 17.3475 8.48524 17.4059 8.44671C17.4644 8.40819 17.4997 8.34297 17.5 8.27296V1.45879C17.5 1.40472 17.467 1.35614 17.4167 1.33629C17.3673 1.31602 17.3105 1.32717 17.2725 1.36463L10.1667 8.47046C9.38372 9.25156 8.11628 9.25156 7.33333 8.47046L0.225834 1.36463C0.187845 1.32693 0.130905 1.31578 0.0815066 1.33638C0.0321083 1.35698 -4.74736e-05 1.40527 2.38713e-07 1.45879V10.2088C-0.000221003 10.5956 0.153353 10.9667 0.426892 11.2402C0.70043 11.5138 1.07149 11.6673 1.45833 11.6671H8.46917C8.54738 11.6669 8.619 11.6232 8.655 11.5538C9.79214 9.32518 12.0814 7.92087 14.5833 7.91713Z",
|
|
2080
|
-
fill: "
|
|
2080
|
+
fill: "currentColor"
|
|
2081
2081
|
}),
|
|
2082
2082
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
2083
2083
|
d: "M8.10531 7.69667C8.46132 8.05261 9.03846 8.05261 9.39447 7.69667L16.457 0.634167C16.5546 0.536741 16.5888 0.392543 16.5453 0.261667C16.4653 0.0225 16.242 0 16.0411 0H1.45781C1.25781 0 1.03281 0.0225 0.953641 0.261667C0.910981 0.392577 0.945075 0.536351 1.04197 0.634167L8.10531 7.69667Z",
|
|
2084
|
-
fill: "
|
|
2084
|
+
fill: "currentColor"
|
|
2085
2085
|
}),
|
|
2086
2086
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
2087
2087
|
fillRule: "evenodd",
|
|
2088
2088
|
clipRule: "evenodd",
|
|
2089
2089
|
d: "M9.16699 14.5827C9.16699 11.5911 11.5921 9.16602 14.5837 9.16602C17.5737 9.16969 19.9967 11.5927 20.0003 14.5827C20.0003 17.5742 17.5752 19.9993 14.5837 19.9993C11.5921 19.9993 9.16699 17.5742 9.16699 14.5827ZM12.3898 12.3888C12.1518 12.6268 12.145 13.0106 12.3745 13.2568L13.5528 14.4352C13.6335 14.517 13.6335 14.6484 13.5528 14.7302L12.3745 15.9085C12.2073 16.0643 12.1385 16.299 12.195 16.5204C12.2516 16.7419 12.4245 16.9148 12.6459 16.9713C12.8674 17.0279 13.102 16.9591 13.2578 16.7918L14.4362 15.6135C14.5179 15.5328 14.6494 15.5328 14.7312 15.6135L15.9095 16.7918C16.0653 16.9591 16.3 17.0279 16.5214 16.9713C16.7428 16.9148 16.9158 16.7419 16.9723 16.5204C17.0289 16.299 16.96 16.0643 16.7928 15.9085L15.6145 14.7302C15.5338 14.6484 15.5338 14.517 15.6145 14.4352L16.7928 13.2568C16.96 13.101 17.0289 12.8664 16.9723 12.6449C16.9158 12.4235 16.7428 12.2506 16.5214 12.194C16.3 12.1375 16.0653 12.2063 15.9095 12.3735L14.7312 13.5518C14.6494 13.6325 14.5179 13.6325 14.4362 13.5518L13.2578 12.3735C13.0116 12.144 12.6278 12.1508 12.3898 12.3888Z",
|
|
2090
|
-
fill: "
|
|
2090
|
+
fill: "currentColor"
|
|
2091
2091
|
})
|
|
2092
2092
|
]
|
|
2093
2093
|
});
|
|
@@ -8949,7 +8949,7 @@ var ICONS = {
|
|
|
8949
8949
|
warning: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WarningIcon_default, {}),
|
|
8950
8950
|
critical: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AlertIcon_default, {})
|
|
8951
8951
|
};
|
|
8952
|
-
var Root$
|
|
8952
|
+
var Root$8 = (0, react.forwardRef)((props, ref) => {
|
|
8953
8953
|
const { children, className, variant = "info", size = "sm", layout = "standalone", ...restProps } = props;
|
|
8954
8954
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8955
8955
|
"data-c13y-component": "banner",
|
|
@@ -8965,7 +8965,7 @@ var Root$9 = (0, react.forwardRef)((props, ref) => {
|
|
|
8965
8965
|
})]
|
|
8966
8966
|
});
|
|
8967
8967
|
});
|
|
8968
|
-
Root$
|
|
8968
|
+
Root$8.displayName = "Banner.Root";
|
|
8969
8969
|
var Close$3 = (0, react.forwardRef)((props, ref) => {
|
|
8970
8970
|
const { className, ...restProps } = props;
|
|
8971
8971
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
@@ -8978,7 +8978,7 @@ var Close$3 = (0, react.forwardRef)((props, ref) => {
|
|
|
8978
8978
|
});
|
|
8979
8979
|
});
|
|
8980
8980
|
Close$3.displayName = "Banner.Close";
|
|
8981
|
-
var Banner = Object.assign(Root$
|
|
8981
|
+
var Banner = Object.assign(Root$8, { Close: Close$3 });
|
|
8982
8982
|
//#endregion
|
|
8983
8983
|
//#region src/components/bottomSheet/BottomSheet.tsx
|
|
8984
8984
|
var Trigger$6 = (props) => {
|
|
@@ -9097,18 +9097,7 @@ var ButtonDeprecated = (0, react.forwardRef)(function Button(props, ref) {
|
|
|
9097
9097
|
]
|
|
9098
9098
|
});
|
|
9099
9099
|
});
|
|
9100
|
-
/** @deprecated Use Button component with iconOnly instead */
|
|
9101
|
-
var IconButton = (0, react.forwardRef)(function IconButton(props, ref) {
|
|
9102
|
-
const { icon, className = "", variant = "primary", ...rest } = props;
|
|
9103
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
9104
|
-
className: (0, clsx.default)("ds-button-deprecated", "ds-icon-button", `ds-button-deprecated--${variant}`, `${className}`),
|
|
9105
|
-
...rest,
|
|
9106
|
-
ref,
|
|
9107
|
-
children: icon
|
|
9108
|
-
});
|
|
9109
|
-
});
|
|
9110
9100
|
ButtonDeprecated.displayName = "Button";
|
|
9111
|
-
IconButton.displayName = "IconButton";
|
|
9112
9101
|
//#endregion
|
|
9113
9102
|
//#region src/components/card/Card.tsx
|
|
9114
9103
|
var Card = (0, react.forwardRef)((props, ref) => {
|
|
@@ -9351,7 +9340,7 @@ function Divider(props) {
|
|
|
9351
9340
|
Divider.displayName = "Divider";
|
|
9352
9341
|
//#endregion
|
|
9353
9342
|
//#region src/components/empty/Empty.tsx
|
|
9354
|
-
var Root$
|
|
9343
|
+
var Root$7 = (0, react.forwardRef)((props, ref) => {
|
|
9355
9344
|
const { className, ...rest } = props;
|
|
9356
9345
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9357
9346
|
"data-c13y-component": "empty",
|
|
@@ -9360,7 +9349,7 @@ var Root$8 = (0, react.forwardRef)((props, ref) => {
|
|
|
9360
9349
|
ref
|
|
9361
9350
|
});
|
|
9362
9351
|
});
|
|
9363
|
-
Root$
|
|
9352
|
+
Root$7.displayName = "Empty.Root";
|
|
9364
9353
|
var Media = (0, react.forwardRef)((props, ref) => {
|
|
9365
9354
|
const { className, size = "md", ...rest } = props;
|
|
9366
9355
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -9394,7 +9383,7 @@ var Description$1 = (0, react.forwardRef)((props, ref) => {
|
|
|
9394
9383
|
});
|
|
9395
9384
|
Description$1.displayName = "Empty.Description";
|
|
9396
9385
|
var Empty = {
|
|
9397
|
-
Root: Root$
|
|
9386
|
+
Root: Root$7,
|
|
9398
9387
|
Media,
|
|
9399
9388
|
Title,
|
|
9400
9389
|
Description: Description$1
|
|
@@ -9431,7 +9420,7 @@ function EmptyState(props) {
|
|
|
9431
9420
|
EmptyState.displayName = "EmptyState";
|
|
9432
9421
|
//#endregion
|
|
9433
9422
|
//#region src/components/field/Field.tsx
|
|
9434
|
-
var Root$
|
|
9423
|
+
var Root$6 = (0, react.forwardRef)((props, ref) => {
|
|
9435
9424
|
const { className, ...rest } = props;
|
|
9436
9425
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_field.Field.Root, {
|
|
9437
9426
|
"data-c13y-component": "field",
|
|
@@ -9477,12 +9466,12 @@ var ErrorMessage = (0, react.forwardRef)((props, ref) => {
|
|
|
9477
9466
|
});
|
|
9478
9467
|
});
|
|
9479
9468
|
var Field = {
|
|
9480
|
-
Root: Root$
|
|
9469
|
+
Root: Root$6,
|
|
9481
9470
|
Label,
|
|
9482
9471
|
Description,
|
|
9483
9472
|
Error: ErrorMessage
|
|
9484
9473
|
};
|
|
9485
|
-
Root$
|
|
9474
|
+
Root$6.displayName = "Field.Root";
|
|
9486
9475
|
Label.displayName = "Field.Label";
|
|
9487
9476
|
Description.displayName = "Field.Description";
|
|
9488
9477
|
ErrorMessage.displayName = "Field.Error";
|
|
@@ -10048,38 +10037,6 @@ var FilterTrigger = (0, react.memo)((0, react.forwardRef)(function FilterTrigger
|
|
|
10048
10037
|
}));
|
|
10049
10038
|
Filter.displayName = "Filter";
|
|
10050
10039
|
//#endregion
|
|
10051
|
-
//#region src/components/ghostButton/GhostButton.tsx
|
|
10052
|
-
/** @deprecated Use Button with variant="ghost" instead */
|
|
10053
|
-
var GhostButton = (0, react.forwardRef)(function GhostButton(props, ref) {
|
|
10054
|
-
const { children, className = "", variant = "primary", icon = null, disabled, iconPosition = "leading", ...rest } = props;
|
|
10055
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
10056
|
-
className: `ds-ghost-button ds-ghost-button--${variant} ${className}`,
|
|
10057
|
-
disabled,
|
|
10058
|
-
...rest,
|
|
10059
|
-
ref,
|
|
10060
|
-
children: [
|
|
10061
|
-
iconPosition === "leading" ? icon : null,
|
|
10062
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
10063
|
-
className: (0, clsx.default)("ds-ghost-button__content"),
|
|
10064
|
-
children
|
|
10065
|
-
}),
|
|
10066
|
-
iconPosition === "trailing" ? icon : null
|
|
10067
|
-
]
|
|
10068
|
-
});
|
|
10069
|
-
});
|
|
10070
|
-
/** @deprecated Use Button with variant="ghost" and iconOnly instead */
|
|
10071
|
-
var IconGhostButton = (0, react.forwardRef)(function IconGhostButton(props, ref) {
|
|
10072
|
-
const { icon, className = "", variant = "primary", ...rest } = props;
|
|
10073
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
10074
|
-
className: (0, clsx.default)("ds-ghost-button", "ds-ghost-icon-button", `ds-ghost-button--${variant}`, `${className}`),
|
|
10075
|
-
...rest,
|
|
10076
|
-
ref,
|
|
10077
|
-
children: icon
|
|
10078
|
-
});
|
|
10079
|
-
});
|
|
10080
|
-
GhostButton.displayName = "GhostButton";
|
|
10081
|
-
IconGhostButton.displayName = "IconGhostButton";
|
|
10082
|
-
//#endregion
|
|
10083
10040
|
//#region src/components/growl/Growl.tsx
|
|
10084
10041
|
/** @deprecated Not an accessible UI pattern — no replacement */
|
|
10085
10042
|
var PlainGrowl = (0, react.forwardRef)(function PlainGrowl(props, ref) {
|
|
@@ -10166,7 +10123,7 @@ function splitC13yProps(props) {
|
|
|
10166
10123
|
}
|
|
10167
10124
|
//#endregion
|
|
10168
10125
|
//#region src/components/menu/Menu.tsx
|
|
10169
|
-
var Root$
|
|
10126
|
+
var Root$5 = (props) => {
|
|
10170
10127
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_menu.Menu.Root, {
|
|
10171
10128
|
modal: false,
|
|
10172
10129
|
...props
|
|
@@ -10268,7 +10225,7 @@ var SubMenuTrigger = (0, react.forwardRef)((props, ref) => {
|
|
|
10268
10225
|
});
|
|
10269
10226
|
});
|
|
10270
10227
|
var Menu = {
|
|
10271
|
-
Root: Root$
|
|
10228
|
+
Root: Root$5,
|
|
10272
10229
|
Trigger: Trigger$4,
|
|
10273
10230
|
Popup: Popup$3,
|
|
10274
10231
|
Item: Item$4,
|
|
@@ -10343,9 +10300,9 @@ var useModalContext = () => {
|
|
|
10343
10300
|
var ModalHeader = (0, react.forwardRef)(function ModalHeader(props, ref) {
|
|
10344
10301
|
const { title, titleAddon, showCancelButton = false, cancelButtonText, onCancel, showHeaderButton = false, headerButtonIsGhost = true, onHeaderButtonClick, headerButtonText } = props;
|
|
10345
10302
|
let headerButton;
|
|
10346
|
-
if (showHeaderButton && onHeaderButtonClick && headerButtonText) if (headerButtonIsGhost) headerButton = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
10303
|
+
if (showHeaderButton && onHeaderButtonClick && headerButtonText) if (headerButtonIsGhost) headerButton = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
10347
10304
|
className: (0, clsx.default)("ds-modal__ghost-button--accept"),
|
|
10348
|
-
variant: "
|
|
10305
|
+
variant: "ghost",
|
|
10349
10306
|
onClick: () => onHeaderButtonClick(),
|
|
10350
10307
|
children: headerButtonText
|
|
10351
10308
|
});
|
|
@@ -10368,13 +10325,16 @@ var ModalHeader = (0, react.forwardRef)(function ModalHeader(props, ref) {
|
|
|
10368
10325
|
}), titleAddon]
|
|
10369
10326
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10370
10327
|
className: "ds-modal__header-buttons",
|
|
10371
|
-
children: [!!headerButton && headerButton, showCancelButton && cancelButtonText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
10328
|
+
children: [!!headerButton && headerButton, showCancelButton && cancelButtonText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
10372
10329
|
className: (0, clsx.default)("ds-modal__ghost-button--cancel"),
|
|
10373
|
-
variant: "
|
|
10330
|
+
variant: "ghost",
|
|
10331
|
+
color: "neutral",
|
|
10332
|
+
iconOnly: true,
|
|
10374
10333
|
style: { padding: "10px" },
|
|
10375
|
-
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CloseIcon_default, { className: "text-icon-neutral-medium" }),
|
|
10376
10334
|
title: cancelButtonText,
|
|
10377
|
-
|
|
10335
|
+
"aria-label": cancelButtonText,
|
|
10336
|
+
onClick: () => onCancel(),
|
|
10337
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CloseIcon_default, { className: "text-icon-neutral-medium" })
|
|
10378
10338
|
})]
|
|
10379
10339
|
})]
|
|
10380
10340
|
}), !!props.children && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Divider, {
|
|
@@ -10591,7 +10551,7 @@ function ModalDialog(props) {
|
|
|
10591
10551
|
ModalDialog.displayName = "ModalDialog";
|
|
10592
10552
|
//#endregion
|
|
10593
10553
|
//#region src/components/numberStepper/NumberStepper.tsx
|
|
10594
|
-
var Root$
|
|
10554
|
+
var Root$4 = (0, react.forwardRef)((props, ref) => {
|
|
10595
10555
|
const { className, children, ...rest } = props;
|
|
10596
10556
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_number_field.NumberField.Root, {
|
|
10597
10557
|
ref,
|
|
@@ -10635,12 +10595,12 @@ var Increment = (0, react.forwardRef)((props, ref) => {
|
|
|
10635
10595
|
});
|
|
10636
10596
|
});
|
|
10637
10597
|
var NumberStepper = {
|
|
10638
|
-
Root: Root$
|
|
10598
|
+
Root: Root$4,
|
|
10639
10599
|
Increment,
|
|
10640
10600
|
Input: Input$2,
|
|
10641
10601
|
Decrement
|
|
10642
10602
|
};
|
|
10643
|
-
Root$
|
|
10603
|
+
Root$4.displayName = "NumberStepper.Root";
|
|
10644
10604
|
Input$2.displayName = "NumberStepper.Input";
|
|
10645
10605
|
Decrement.displayName = "NumberStepper.Decrement";
|
|
10646
10606
|
Increment.displayName = "NumberStepper.Increment";
|
|
@@ -10659,18 +10619,17 @@ var Pill = (0, react.forwardRef)((props, ref) => {
|
|
|
10659
10619
|
Pill.displayName = "Pill";
|
|
10660
10620
|
//#endregion
|
|
10661
10621
|
//#region src/components/popover/Popover.tsx
|
|
10662
|
-
var
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
}
|
|
10670
|
-
Trigger$3.displayName = "Popover.Trigger";
|
|
10622
|
+
var Trigger$3 = (props) => {
|
|
10623
|
+
const { children, ref, ...rest } = props;
|
|
10624
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Trigger, {
|
|
10625
|
+
render: children,
|
|
10626
|
+
ref,
|
|
10627
|
+
...rest
|
|
10628
|
+
});
|
|
10629
|
+
};
|
|
10671
10630
|
var Close = (0, react.forwardRef)((props, ref) => {
|
|
10672
10631
|
const { className, ...rest } = props;
|
|
10673
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
10632
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Close, {
|
|
10674
10633
|
"data-c13y-component": "button",
|
|
10675
10634
|
"data-c13y-purpose": "close",
|
|
10676
10635
|
ref,
|
|
@@ -10679,27 +10638,27 @@ var Close = (0, react.forwardRef)((props, ref) => {
|
|
|
10679
10638
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CloseIcon_default, {})
|
|
10680
10639
|
});
|
|
10681
10640
|
});
|
|
10682
|
-
Close.displayName = "Popover.Close";
|
|
10683
10641
|
var Content$2 = (0, react.forwardRef)((props, ref) => {
|
|
10684
|
-
const { className, container, ...rest } = props;
|
|
10685
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
10642
|
+
const { className, children, container, ...rest } = props;
|
|
10643
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Portal, {
|
|
10686
10644
|
container,
|
|
10687
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
10688
|
-
"data-c13y-component": "popover",
|
|
10645
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Positioner, {
|
|
10689
10646
|
sideOffset: 4,
|
|
10690
|
-
|
|
10691
|
-
|
|
10692
|
-
|
|
10647
|
+
...rest,
|
|
10648
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Popup, {
|
|
10649
|
+
"data-c13y-component": "popover",
|
|
10650
|
+
className: (0, clsx.default)("ds-popover__content", className),
|
|
10651
|
+
children,
|
|
10652
|
+
ref
|
|
10653
|
+
})
|
|
10693
10654
|
})
|
|
10694
10655
|
});
|
|
10695
10656
|
});
|
|
10696
|
-
Content$2.displayName = "Popover.Content";
|
|
10697
10657
|
var Popover = {
|
|
10698
|
-
Root: Root
|
|
10658
|
+
Root: _base_ui_react.Popover.Root,
|
|
10699
10659
|
Content: Content$2,
|
|
10700
10660
|
Trigger: Trigger$3,
|
|
10701
|
-
Close
|
|
10702
|
-
Anchor
|
|
10661
|
+
Close
|
|
10703
10662
|
};
|
|
10704
10663
|
//#endregion
|
|
10705
10664
|
//#region src/components/radio/Radio.tsx
|
|
@@ -11551,6 +11510,61 @@ var Switch = (0, react.forwardRef)((props, ref) => {
|
|
|
11551
11510
|
});
|
|
11552
11511
|
});
|
|
11553
11512
|
//#endregion
|
|
11513
|
+
//#region src/components/switchDeprecated/SwitchDeprecated.tsx
|
|
11514
|
+
/** @deprecated Use Switch component instead */
|
|
11515
|
+
function SwitchDeprecated(props) {
|
|
11516
|
+
const { checked, disabled, name, label, description, onChange, spaceBetween, className = "", ref } = props;
|
|
11517
|
+
const id = (0, react.useId)();
|
|
11518
|
+
const descriptionId = `toggle-${id}-descr`;
|
|
11519
|
+
const inputId = `toggle-${id}-label`;
|
|
11520
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11521
|
+
className: (0, clsx.default)("ds-switch-deprecated__container", disabled && "ds-switch-deprecated__container--disabled", spaceBetween ? "ds-switch-deprecated__container--full-width" : "ds-switch-deprecated__container--content-width", className),
|
|
11522
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11523
|
+
className: (0, clsx.default)("ds-switch-deprecated__wrapper"),
|
|
11524
|
+
children: [
|
|
11525
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
11526
|
+
className: (0, clsx.default)("ds-switch-deprecated__label-container"),
|
|
11527
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
11528
|
+
className: (0, clsx.default)("ds-switch-deprecated__label"),
|
|
11529
|
+
htmlFor: inputId,
|
|
11530
|
+
children: label
|
|
11531
|
+
})
|
|
11532
|
+
}),
|
|
11533
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
11534
|
+
className: "ds-switch-deprecated",
|
|
11535
|
+
name,
|
|
11536
|
+
type: "checkbox",
|
|
11537
|
+
onChange,
|
|
11538
|
+
id: inputId,
|
|
11539
|
+
disabled,
|
|
11540
|
+
"aria-describedby": description ? descriptionId : void 0,
|
|
11541
|
+
checked,
|
|
11542
|
+
ref
|
|
11543
|
+
}),
|
|
11544
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11545
|
+
className: (0, clsx.default)("ds-switch-deprecated__switch-wrapper"),
|
|
11546
|
+
children: [
|
|
11547
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckIcon_default, {
|
|
11548
|
+
"aria-hidden": "true",
|
|
11549
|
+
className: (0, clsx.default)("ds-switch-deprecated__inner", "ds-switch-deprecated__inner--on")
|
|
11550
|
+
}),
|
|
11551
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(CloseIcon_default, {
|
|
11552
|
+
"aria-hidden": "true",
|
|
11553
|
+
className: (0, clsx.default)("ds-switch-deprecated__inner", "ds-switch-deprecated__inner--off")
|
|
11554
|
+
}),
|
|
11555
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: (0, clsx.default)("ds-switch-deprecated__switch") })
|
|
11556
|
+
]
|
|
11557
|
+
})
|
|
11558
|
+
]
|
|
11559
|
+
}), description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
11560
|
+
className: (0, clsx.default)("ds-switch-deprecated__description"),
|
|
11561
|
+
id: descriptionId,
|
|
11562
|
+
children: description
|
|
11563
|
+
})]
|
|
11564
|
+
});
|
|
11565
|
+
}
|
|
11566
|
+
SwitchDeprecated.displayName = "SwitchDeprecated";
|
|
11567
|
+
//#endregion
|
|
11554
11568
|
//#region src/components/tabs/Tabs.tsx
|
|
11555
11569
|
var Root$1 = (0, react.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_tabs.Root, {
|
|
11556
11570
|
"data-c13y-component": "tabs",
|
|
@@ -11763,60 +11777,29 @@ var TextInput = (0, react.forwardRef)(function TextInput(props, ref) {
|
|
|
11763
11777
|
TextInput.displayName = "TextInput";
|
|
11764
11778
|
//#endregion
|
|
11765
11779
|
//#region src/components/toggle/Toggle.tsx
|
|
11766
|
-
|
|
11767
|
-
|
|
11768
|
-
|
|
11769
|
-
|
|
11770
|
-
|
|
11771
|
-
|
|
11772
|
-
|
|
11773
|
-
className: (0, clsx.default)("ds-toggle__container", disabled && "ds-toggle__container--disabled", spaceBetween ? "ds-toggle__container--full-width" : "ds-toggle__container--content-width", className),
|
|
11774
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11775
|
-
className: (0, clsx.default)("ds-toggle__wrapper"),
|
|
11776
|
-
children: [
|
|
11777
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
11778
|
-
className: (0, clsx.default)("ds-toggle__label-container"),
|
|
11779
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
11780
|
-
className: (0, clsx.default)("ds-toggle__label"),
|
|
11781
|
-
htmlFor: inputId,
|
|
11782
|
-
children: label
|
|
11783
|
-
})
|
|
11784
|
-
}),
|
|
11785
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
11786
|
-
className: "ds-toggle",
|
|
11787
|
-
name,
|
|
11788
|
-
type: "checkbox",
|
|
11789
|
-
onChange,
|
|
11790
|
-
id: inputId,
|
|
11791
|
-
disabled,
|
|
11792
|
-
"aria-describedby": description ? descriptionId : void 0,
|
|
11793
|
-
checked,
|
|
11794
|
-
ref
|
|
11795
|
-
}),
|
|
11796
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11797
|
-
className: (0, clsx.default)("ds-toggle__switch-wrapper"),
|
|
11798
|
-
children: [
|
|
11799
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckIcon_default, {
|
|
11800
|
-
"aria-hidden": "true",
|
|
11801
|
-
className: (0, clsx.default)("ds-toggle__inner", "ds-toggle__inner--on")
|
|
11802
|
-
}),
|
|
11803
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(CloseIcon_default, {
|
|
11804
|
-
"aria-hidden": "true",
|
|
11805
|
-
className: (0, clsx.default)("ds-toggle__inner", "ds-toggle__inner--off")
|
|
11806
|
-
}),
|
|
11807
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: (0, clsx.default)("ds-toggle__switch") })
|
|
11808
|
-
]
|
|
11809
|
-
})
|
|
11810
|
-
]
|
|
11811
|
-
}), description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
11812
|
-
className: (0, clsx.default)("ds-toggle__description"),
|
|
11813
|
-
id: descriptionId,
|
|
11814
|
-
children: description
|
|
11815
|
-
})]
|
|
11780
|
+
var Toggle = (0, react.forwardRef)((props, ref) => {
|
|
11781
|
+
const { className, ...rest } = props;
|
|
11782
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_toggle.Toggle, {
|
|
11783
|
+
"data-c13y-component": "toggle",
|
|
11784
|
+
className: (0, clsx.default)("ds-toggle", className),
|
|
11785
|
+
ref,
|
|
11786
|
+
...rest
|
|
11816
11787
|
});
|
|
11817
|
-
}
|
|
11788
|
+
});
|
|
11818
11789
|
Toggle.displayName = "Toggle";
|
|
11819
11790
|
//#endregion
|
|
11791
|
+
//#region src/components/toggleGroup/ToggleGroup.tsx
|
|
11792
|
+
var ToggleGroup = (0, react.forwardRef)((props, ref) => {
|
|
11793
|
+
const { className, ...rest } = props;
|
|
11794
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_toggle_group.ToggleGroup, {
|
|
11795
|
+
"data-c13y-component": "toggle-group",
|
|
11796
|
+
className: (0, clsx.default)("ds-toggle-group", className),
|
|
11797
|
+
ref,
|
|
11798
|
+
...rest
|
|
11799
|
+
});
|
|
11800
|
+
});
|
|
11801
|
+
ToggleGroup.displayName = "ToggleGroup";
|
|
11802
|
+
//#endregion
|
|
11820
11803
|
//#region src/components/tooltip/Tooltip.tsx
|
|
11821
11804
|
var TooltipContext = (0, react.createContext)(null);
|
|
11822
11805
|
var Root = (props) => {
|
|
@@ -12056,7 +12039,6 @@ exports.FolderShareIcon = FolderShareIcon_default;
|
|
|
12056
12039
|
exports.FontsIcon = FontsIcon_default;
|
|
12057
12040
|
exports.FootballIcon = FootballIcon_default;
|
|
12058
12041
|
exports.GalleryIcon = GalleryIcon_default;
|
|
12059
|
-
exports.GhostButton = GhostButton;
|
|
12060
12042
|
exports.GlobeIcon = GlobeIcon_default;
|
|
12061
12043
|
exports.GridIcon = GridIcon_default;
|
|
12062
12044
|
exports.GroupConversationAddIcon = GroupConversationAddIcon_default;
|
|
@@ -12073,8 +12055,6 @@ exports.HierarchyChartIcon = HierarchyChartIcon_default;
|
|
|
12073
12055
|
exports.HomeIcon = HomeIcon_default;
|
|
12074
12056
|
exports.HouseIcon = HouseIcon_default;
|
|
12075
12057
|
exports.Icon = Icon;
|
|
12076
|
-
exports.IconButton = IconButton;
|
|
12077
|
-
exports.IconGhostButton = IconGhostButton;
|
|
12078
12058
|
exports.ImageIcon = ImageIcon_default;
|
|
12079
12059
|
exports.ImageUploadIcon = ImageUploadIcon_default;
|
|
12080
12060
|
exports.InfoIcon = InfoIcon_default;
|
|
@@ -12214,6 +12194,7 @@ exports.StarAltIcon = StarAltIcon_default;
|
|
|
12214
12194
|
exports.StarIcon = StarIcon_default;
|
|
12215
12195
|
exports.StyleChip = StyleChip;
|
|
12216
12196
|
exports.Switch = Switch;
|
|
12197
|
+
exports.SwitchDeprecated = SwitchDeprecated;
|
|
12217
12198
|
exports.TabletIcon = TabletIcon_default;
|
|
12218
12199
|
exports.Tabs = Tabs;
|
|
12219
12200
|
exports.TagIcon = TagIcon_default;
|
|
@@ -12237,6 +12218,7 @@ exports.ThumbDownIcon = ThumbDownIcon_default;
|
|
|
12237
12218
|
exports.ThumbUpAltIcon = ThumbUpAltIcon_default;
|
|
12238
12219
|
exports.ThumbUpIcon = ThumbUpIcon_default;
|
|
12239
12220
|
exports.Toggle = Toggle;
|
|
12221
|
+
exports.ToggleGroup = ToggleGroup;
|
|
12240
12222
|
exports.Tooltip = Tooltip;
|
|
12241
12223
|
exports.TooltipDeprecated = TooltipDeprecated;
|
|
12242
12224
|
exports.TranslationOnIcon = TranslationOnIcon_default;
|