@staffbase/design 18.5.0 → 18.7.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/dist/main.cjs +93 -51
- package/dist/main.cjs.map +1 -1
- package/dist/main.d.ts +6 -0
- package/dist/main.js +92 -52
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -161,7 +161,6 @@ var ActionMenuContent = react.default.forwardRef(function ActionMenuContent(prop
|
|
|
161
161
|
modal: false,
|
|
162
162
|
initialFocus: -1,
|
|
163
163
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
164
|
-
"data-c13y-component": "action-menu-content",
|
|
165
164
|
className: (0, clsx.default)("ds-action-menu", className),
|
|
166
165
|
ref: forkedRef,
|
|
167
166
|
style: {
|
|
@@ -196,7 +195,6 @@ var ActionMenuItem = react.default.forwardRef(function ActionMenuItem(props, ref
|
|
|
196
195
|
const itemRef = (0, _floating_ui_react.useMergeRefs)([ref, listItemRef]);
|
|
197
196
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
198
197
|
role: "menuitem",
|
|
199
|
-
"data-c13y-component": "action-menu-item",
|
|
200
198
|
className: (0, clsx.default)("ds-action-menu__item", `ds-action-menu__item--${variant}`, "ds-action-menu__basic-item", `ds-action-menu__basic-item--${variant}`, className),
|
|
201
199
|
...rest,
|
|
202
200
|
...context.getItemProps({
|
|
@@ -231,7 +229,6 @@ var ActionMenuLinkItem = react.default.forwardRef(function ActionMenuLinkItem(pr
|
|
|
231
229
|
const itemRef = (0, _floating_ui_react.useMergeRefs)([ref, listItemRef]);
|
|
232
230
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", {
|
|
233
231
|
role: "menuitem",
|
|
234
|
-
"data-c13y-component": "action-menu-link-item",
|
|
235
232
|
className: (0, clsx.default)("ds-action-menu__item", `ds-action-menu__item--${variant}`, "ds-action-menu__link-item", className),
|
|
236
233
|
...rest,
|
|
237
234
|
...context.getItemProps({
|
|
@@ -4114,6 +4111,56 @@ var MergeRightIcon = react.default.forwardRef((props, ref) => {
|
|
|
4114
4111
|
MergeRightIcon.displayName = "MergeRightIcon";
|
|
4115
4112
|
var MergeRightIcon_default = react.default.memo(MergeRightIcon);
|
|
4116
4113
|
//#endregion
|
|
4114
|
+
//#region src/icons/MicrophoneAltIcon.tsx
|
|
4115
|
+
/**
|
|
4116
|
+
* THIS IS A GENERATED FILE. PLEASE SEE `scripts/iconGenerator`.
|
|
4117
|
+
*/
|
|
4118
|
+
var MicrophoneAltIcon = react.default.forwardRef((props, ref) => {
|
|
4119
|
+
const { className, ...rest } = props;
|
|
4120
|
+
const finalClassName = ["ds-icon ds-icon-microphone-alt", className].filter(Boolean).join(" ");
|
|
4121
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
4122
|
+
"aria-hidden": "true",
|
|
4123
|
+
viewBox: "0 0 24 24",
|
|
4124
|
+
width: "1em",
|
|
4125
|
+
height: "1em",
|
|
4126
|
+
fill: "currentColor",
|
|
4127
|
+
...rest,
|
|
4128
|
+
className: finalClassName,
|
|
4129
|
+
ref,
|
|
4130
|
+
"data-c13y-component": "icon",
|
|
4131
|
+
children: [
|
|
4132
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M12 20a7.508 7.508 0 0 1-7.5-7.5V10a1 1 0 0 0-2 0v2.5a9.514 9.514 0 0 0 8.282 9.422.249.249 0 0 1 .218.248V23a1 1 0 0 0 2 0v-.83a.249.249 0 0 1 .218-.248 9.433 9.433 0 0 0 3.859-1.4.25.25 0 0 0 .043-.388l-1.091-1.091a.25.25 0 0 0-.3-.04A7.448 7.448 0 0 1 12 20z" }),
|
|
4133
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M6.427 9.447A.25.25 0 0 0 6 9.623V12.5a6 6 0 0 0 8.471 5.467.25.25 0 0 0 .074-.4z" }),
|
|
4134
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M23.707 22.3l-3.952-3.952a.248.248 0 0 1-.026-.322A9.453 9.453 0 0 0 21.5 12.5V10a1 1 0 0 0-2 0v2.5a7.459 7.459 0 0 1-1.157 4 .249.249 0 0 1-.184.114.246.246 0 0 1-.2-.071l-.728-.727a.251.251 0 0 1-.039-.3A5.963 5.963 0 0 0 18 12.5V6A6 6 0 0 0 6.244 4.309a.251.251 0 0 1-.417.106L1.707.3A1.013 1.013 0 0 0 .293.3a1 1 0 0 0 0 1.414l22 22 .007.007a1 1 0 0 0 1.4-1.425z" })
|
|
4135
|
+
]
|
|
4136
|
+
});
|
|
4137
|
+
});
|
|
4138
|
+
MicrophoneAltIcon.displayName = "MicrophoneAltIcon";
|
|
4139
|
+
var MicrophoneAltIcon_default = react.default.memo(MicrophoneAltIcon);
|
|
4140
|
+
//#endregion
|
|
4141
|
+
//#region src/icons/MicrophoneIcon.tsx
|
|
4142
|
+
/**
|
|
4143
|
+
* THIS IS A GENERATED FILE. PLEASE SEE `scripts/iconGenerator`.
|
|
4144
|
+
*/
|
|
4145
|
+
var MicrophoneIcon = react.default.forwardRef((props, ref) => {
|
|
4146
|
+
const { className, ...rest } = props;
|
|
4147
|
+
const finalClassName = ["ds-icon ds-icon-microphone", className].filter(Boolean).join(" ");
|
|
4148
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
4149
|
+
"aria-hidden": "true",
|
|
4150
|
+
viewBox: "0 0 19 24",
|
|
4151
|
+
width: "1em",
|
|
4152
|
+
height: "1em",
|
|
4153
|
+
fill: "currentColor",
|
|
4154
|
+
...rest,
|
|
4155
|
+
className: finalClassName,
|
|
4156
|
+
ref,
|
|
4157
|
+
"data-c13y-component": "icon",
|
|
4158
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M3.49983 6.00007C3.49983 2.68632 6.18615 0 9.4999 0C12.8137 0 15.5 2.68632 15.5 6.00007V12.5002C15.5 15.8139 12.8137 18.5002 9.4999 18.5002C6.18615 18.5002 3.49983 15.8139 3.49983 12.5002V6.00007Z" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M18.0002 8.99982C18.2654 8.99982 18.5197 9.10525 18.7073 9.29279C18.8948 9.48033 19.0002 9.73461 19.0002 9.99983V12.4999C18.9973 14.8077 18.1557 17.0361 16.632 18.7695C15.1084 20.5028 13.0063 21.623 10.7179 21.9218C10.6576 21.9295 10.6018 21.9592 10.5617 22.0049C10.5217 22.0505 10.4999 22.1092 10.5001 22.1699V23C10.5001 23.2652 10.3947 23.5195 10.2072 23.707C10.0196 23.8946 9.76534 24 9.50012 24C9.2349 24 8.98061 23.8946 8.79308 23.707C8.60554 23.5195 8.5001 23.2652 8.5001 23V22.1699C8.50031 22.1092 8.47853 22.0505 8.43858 22.0049C8.39846 21.9592 8.34261 21.9295 8.28233 21.9218C5.99395 21.623 3.89185 20.5028 2.36819 18.7695C0.844525 17.0361 0.00288563 14.8077 0 12.4999V9.99983C0 9.73461 0.105434 9.48033 0.292972 9.29279C0.480511 9.10525 0.734793 8.99982 1.00001 8.99982C1.26523 8.99982 1.51951 9.10525 1.70705 9.29279C1.89459 9.48033 2.00002 9.73461 2.00002 9.99983V12.4999C2.00214 14.4884 2.79319 16.3946 4.19927 17.8007C5.60535 19.2068 7.51162 19.9978 9.50012 20C11.4886 19.9978 13.3949 19.2068 14.801 17.8007C16.207 16.3946 16.9981 14.4884 17.0002 12.4999V9.99983C17.0002 9.73461 17.1056 9.48033 17.2932 9.29279C17.4807 9.10525 17.735 8.99982 18.0002 8.99982Z" })]
|
|
4159
|
+
});
|
|
4160
|
+
});
|
|
4161
|
+
MicrophoneIcon.displayName = "MicrophoneIcon";
|
|
4162
|
+
var MicrophoneIcon_default = react.default.memo(MicrophoneIcon);
|
|
4163
|
+
//#endregion
|
|
4117
4164
|
//#region src/icons/MinusCircleIcon.tsx
|
|
4118
4165
|
/**
|
|
4119
4166
|
* THIS IS A GENERATED FILE. PLEASE SEE `scripts/iconGenerator`.
|
|
@@ -8556,6 +8603,8 @@ var iconList = {
|
|
|
8556
8603
|
"map-pin": MapPinIcon_default,
|
|
8557
8604
|
"merge-left": MergeLeftIcon_default,
|
|
8558
8605
|
"merge-right": MergeRightIcon_default,
|
|
8606
|
+
microphone: MicrophoneIcon_default,
|
|
8607
|
+
"microphone-alt": MicrophoneAltIcon_default,
|
|
8559
8608
|
"minus-circle": MinusCircleIcon_default,
|
|
8560
8609
|
mobile: MobileIcon_default,
|
|
8561
8610
|
move: MoveIcon_default,
|
|
@@ -9111,7 +9160,6 @@ function getDividerStyles(props) {
|
|
|
9111
9160
|
function Divider(props) {
|
|
9112
9161
|
const { dividerPosition = "horizontal", className = "", fullWidth = false, ...otherProps } = props;
|
|
9113
9162
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hr", {
|
|
9114
|
-
"data-c13y-component": "divider",
|
|
9115
9163
|
className: (0, clsx.default)("ds-divider", `ds-divider--${dividerPosition}`, className),
|
|
9116
9164
|
style: getDividerStyles({
|
|
9117
9165
|
dividerPosition,
|
|
@@ -9865,6 +9913,30 @@ var HelpButton = (0, react.forwardRef)(function HelpButton(props, ref) {
|
|
|
9865
9913
|
});
|
|
9866
9914
|
HelpButton.displayName = "HelpButton";
|
|
9867
9915
|
//#endregion
|
|
9916
|
+
//#region src/utils/splitC13yProps.ts
|
|
9917
|
+
/**
|
|
9918
|
+
* Splits a props object into its `data-c13y-*` customizability attributes and
|
|
9919
|
+
* everything else.
|
|
9920
|
+
*
|
|
9921
|
+
* Portalled overlays render a positioner wrapper around the visible popup. The
|
|
9922
|
+
* public prop type extends the positioner's props, so a consumer-supplied
|
|
9923
|
+
* `data-c13y-region` / `data-c13y-purpose` / `data-c13y-id` would otherwise land
|
|
9924
|
+
* on the invisible positioner instead of the visible popup that carries
|
|
9925
|
+
* `data-c13y-component`. Use this to forward the customizability attributes onto
|
|
9926
|
+
* the popup while keeping positioner props (`align`, `sideOffset`, …) on the
|
|
9927
|
+
* positioner.
|
|
9928
|
+
*/
|
|
9929
|
+
function splitC13yProps(props) {
|
|
9930
|
+
const c13y = {};
|
|
9931
|
+
const rest = {};
|
|
9932
|
+
for (const key of Object.keys(props)) if (key.startsWith("data-c13y-")) c13y[key] = props[key];
|
|
9933
|
+
else rest[key] = props[key];
|
|
9934
|
+
return {
|
|
9935
|
+
c13y,
|
|
9936
|
+
rest
|
|
9937
|
+
};
|
|
9938
|
+
}
|
|
9939
|
+
//#endregion
|
|
9868
9940
|
//#region src/components/menu/Menu.tsx
|
|
9869
9941
|
var Root$6 = (props) => {
|
|
9870
9942
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_menu.Menu.Root, {
|
|
@@ -9882,14 +9954,16 @@ var Trigger$4 = (props) => {
|
|
|
9882
9954
|
};
|
|
9883
9955
|
var Popup$3 = (0, react.forwardRef)((props, ref) => {
|
|
9884
9956
|
const { className, children, container, ...rest } = props;
|
|
9957
|
+
const { c13y, rest: positionerProps } = splitC13yProps(rest);
|
|
9885
9958
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_menu.Menu.Portal, {
|
|
9886
9959
|
container,
|
|
9887
9960
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_menu.Menu.Positioner, {
|
|
9888
9961
|
align: "end",
|
|
9889
9962
|
sideOffset: 4,
|
|
9890
9963
|
ref,
|
|
9891
|
-
...
|
|
9964
|
+
...positionerProps,
|
|
9892
9965
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_menu.Menu.Popup, {
|
|
9966
|
+
...c13y,
|
|
9893
9967
|
"data-c13y-component": "menu-popover",
|
|
9894
9968
|
className: (0, clsx.default)("ds-menu__popup", className),
|
|
9895
9969
|
children,
|
|
@@ -10042,21 +10116,18 @@ var ModalHeader = (0, react.forwardRef)(function ModalHeader(props, ref) {
|
|
|
10042
10116
|
const { title, titleAddon, showCancelButton = false, cancelButtonText, onCancel, showHeaderButton = false, headerButtonIsGhost = true, onHeaderButtonClick, headerButtonText } = props;
|
|
10043
10117
|
let headerButton;
|
|
10044
10118
|
if (showHeaderButton && onHeaderButtonClick && headerButtonText) if (headerButtonIsGhost) headerButton = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GhostButton, {
|
|
10045
|
-
"data-c13y-purpose": "accept",
|
|
10046
10119
|
className: (0, clsx.default)("ds-modal__ghost-button--accept"),
|
|
10047
10120
|
variant: "primary",
|
|
10048
10121
|
onClick: () => onHeaderButtonClick(),
|
|
10049
10122
|
children: headerButtonText
|
|
10050
10123
|
});
|
|
10051
10124
|
else headerButton = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
10052
|
-
"data-c13y-purpose": "accept",
|
|
10053
10125
|
className: (0, clsx.default)("ds-modal__button--accept"),
|
|
10054
10126
|
variant: "primary",
|
|
10055
10127
|
onClick: () => onHeaderButtonClick(),
|
|
10056
10128
|
children: headerButtonText
|
|
10057
10129
|
});
|
|
10058
10130
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10059
|
-
"data-c13y-component": "modal-header",
|
|
10060
10131
|
className: (0, clsx.default)("ds-modal__header"),
|
|
10061
10132
|
ref,
|
|
10062
10133
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -10070,7 +10141,6 @@ var ModalHeader = (0, react.forwardRef)(function ModalHeader(props, ref) {
|
|
|
10070
10141
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10071
10142
|
className: "ds-modal__header-buttons",
|
|
10072
10143
|
children: [!!headerButton && headerButton, showCancelButton && cancelButtonText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconGhostButton, {
|
|
10073
|
-
"data-c13y-purpose": "cancel",
|
|
10074
10144
|
className: (0, clsx.default)("ds-modal__ghost-button--cancel"),
|
|
10075
10145
|
variant: "secondary",
|
|
10076
10146
|
style: { padding: "10px" },
|
|
@@ -10084,7 +10154,6 @@ var ModalHeader = (0, react.forwardRef)(function ModalHeader(props, ref) {
|
|
|
10084
10154
|
fullWidth: true
|
|
10085
10155
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
10086
10156
|
className: "ds-modal__header-content",
|
|
10087
|
-
"data-c13y-component": "modal-header-content",
|
|
10088
10157
|
"data-testid": "header-content-wrapper",
|
|
10089
10158
|
children: props.children
|
|
10090
10159
|
})] })]
|
|
@@ -10150,7 +10219,6 @@ function ModalContent(props) {
|
|
|
10150
10219
|
setScrollShadows(scroll, scrollContent.current);
|
|
10151
10220
|
}, [scroll]);
|
|
10152
10221
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
10153
|
-
"data-c13y-component": "modal-content",
|
|
10154
10222
|
className: (0, clsx.default)("ds-modal__inner-content", scroll && "ds-modal__inner-content--scroll"),
|
|
10155
10223
|
"data-testid": "main-content-wrapper",
|
|
10156
10224
|
ref: scrollContent,
|
|
@@ -10161,20 +10229,17 @@ function ModalContent(props) {
|
|
|
10161
10229
|
var ModalFooter = (0, react.forwardRef)(function ModalFooter(props, ref) {
|
|
10162
10230
|
const { cancelButtonText, onCancel, footerButtonText, footerButtonVariant, onFooterButtonClick, disableFooterButton } = props;
|
|
10163
10231
|
return footerButtonText && onFooterButtonClick ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10164
|
-
"data-c13y-component": "modal-footer",
|
|
10165
10232
|
className: (0, clsx.default)("ds-modal__footer"),
|
|
10166
10233
|
"data-testid": "footer",
|
|
10167
10234
|
ref,
|
|
10168
10235
|
children: [props.children, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10169
10236
|
className: "ds-modal__footer-buttons",
|
|
10170
10237
|
children: [cancelButtonText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
10171
|
-
"data-c13y-purpose": "cancel",
|
|
10172
10238
|
className: (0, clsx.default)("ds-modal__button--cancel"),
|
|
10173
10239
|
variant: "secondary",
|
|
10174
10240
|
onClick: () => onCancel(),
|
|
10175
10241
|
children: cancelButtonText
|
|
10176
10242
|
}), footerButtonText && onFooterButtonClick && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
10177
|
-
"data-c13y-purpose": "accept",
|
|
10178
10243
|
className: (0, clsx.default)("ds-modal__button--accept"),
|
|
10179
10244
|
variant: footerButtonVariant,
|
|
10180
10245
|
disabled: disableFooterButton,
|
|
@@ -10261,7 +10326,6 @@ function ModalDialog(props) {
|
|
|
10261
10326
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_floating_ui_react.FloatingFocusManager, {
|
|
10262
10327
|
context,
|
|
10263
10328
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10264
|
-
"data-c13y-component": "modal-dialog",
|
|
10265
10329
|
...getFloatingProps({
|
|
10266
10330
|
ref: refs.setFloating,
|
|
10267
10331
|
className: (0, clsx.default)("ds-modal-dialog", className)
|
|
@@ -10283,12 +10347,10 @@ function ModalDialog(props) {
|
|
|
10283
10347
|
className: "ds-modal-dialog__content",
|
|
10284
10348
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
10285
10349
|
variant: confirmButtonVariant,
|
|
10286
|
-
"data-c13y-purpose": "accept",
|
|
10287
10350
|
onClick: onConfirm,
|
|
10288
10351
|
children: confirmButtonText
|
|
10289
10352
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
10290
10353
|
variant: "secondary",
|
|
10291
|
-
"data-c13y-purpose": "cancel",
|
|
10292
10354
|
onClick: onCancel,
|
|
10293
10355
|
children: cancelButtonText
|
|
10294
10356
|
})]
|
|
@@ -10535,6 +10597,7 @@ var Input$1 = (0, react.forwardRef)((props, ref) => {
|
|
|
10535
10597
|
});
|
|
10536
10598
|
var Popup$2 = (0, react.forwardRef)((props, ref) => {
|
|
10537
10599
|
const { className, children, container, ...rest } = props;
|
|
10600
|
+
const { c13y, rest: positionerProps } = splitC13yProps(rest);
|
|
10538
10601
|
const { containerRef } = useSearchableMultiSelectContext();
|
|
10539
10602
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Portal, {
|
|
10540
10603
|
container,
|
|
@@ -10542,8 +10605,9 @@ var Popup$2 = (0, react.forwardRef)((props, ref) => {
|
|
|
10542
10605
|
ref,
|
|
10543
10606
|
sideOffset: 4,
|
|
10544
10607
|
anchor: containerRef,
|
|
10545
|
-
...
|
|
10608
|
+
...positionerProps,
|
|
10546
10609
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Popup, {
|
|
10610
|
+
...c13y,
|
|
10547
10611
|
"data-c13y-component": "searchable-multi-select-popover",
|
|
10548
10612
|
className: (0, clsx.default)("ds-searchable-multi-select__popup", className),
|
|
10549
10613
|
children,
|
|
@@ -10725,13 +10789,15 @@ var Input = (0, react.forwardRef)((props, ref) => {
|
|
|
10725
10789
|
});
|
|
10726
10790
|
var Popup$1 = (0, react.forwardRef)((props, ref) => {
|
|
10727
10791
|
const { className, children, container, ...rest } = props;
|
|
10792
|
+
const { c13y, rest: positionerProps } = splitC13yProps(rest);
|
|
10728
10793
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Portal, {
|
|
10729
10794
|
container,
|
|
10730
10795
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Positioner, {
|
|
10731
10796
|
sideOffset: 5,
|
|
10732
10797
|
ref,
|
|
10733
|
-
...
|
|
10798
|
+
...positionerProps,
|
|
10734
10799
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Popup, {
|
|
10800
|
+
...c13y,
|
|
10735
10801
|
"data-c13y-component": "searchable-single-select-popover",
|
|
10736
10802
|
className: (0, clsx.default)("ds-searchable-single-select__popup", className),
|
|
10737
10803
|
children,
|
|
@@ -10851,13 +10917,15 @@ var Trigger$2 = (0, react.forwardRef)((props, ref) => {
|
|
|
10851
10917
|
});
|
|
10852
10918
|
var Popup = (0, react.forwardRef)((props, ref) => {
|
|
10853
10919
|
const { className, children, container, ...rest } = props;
|
|
10920
|
+
const { c13y, rest: positionerProps } = splitC13yProps(rest);
|
|
10854
10921
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_select.Select.Portal, {
|
|
10855
10922
|
container,
|
|
10856
10923
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_select.Select.Positioner, {
|
|
10857
10924
|
alignItemWithTrigger: false,
|
|
10858
10925
|
ref,
|
|
10859
|
-
...
|
|
10926
|
+
...positionerProps,
|
|
10860
10927
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_select.Select.Popup, {
|
|
10928
|
+
...c13y,
|
|
10861
10929
|
"data-c13y-component": "select-popover",
|
|
10862
10930
|
className: (0, clsx.default)("ds-select__popup", className),
|
|
10863
10931
|
children,
|
|
@@ -11017,12 +11085,10 @@ function SingleSelect(props) {
|
|
|
11017
11085
|
const errorOrDescription = (0, react.useMemo)(() => {
|
|
11018
11086
|
if (error !== void 0 && error !== "") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11019
11087
|
className: "ds-single-select__error",
|
|
11020
|
-
"data-c13y-component": "single-select-error",
|
|
11021
11088
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(AlertIcon_default, {}), error]
|
|
11022
11089
|
});
|
|
11023
11090
|
if (description !== void 0 && description !== "") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
11024
11091
|
className: "ds-single-select__description",
|
|
11025
|
-
"data-c13y-component": "single-select-description",
|
|
11026
11092
|
children: description
|
|
11027
11093
|
});
|
|
11028
11094
|
return null;
|
|
@@ -11033,7 +11099,6 @@ function SingleSelect(props) {
|
|
|
11033
11099
|
const dropdownContent = (0, react.useMemo)(() => {
|
|
11034
11100
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
11035
11101
|
className: "ds-single-select__loader",
|
|
11036
|
-
"data-c13y-component": "single-select-loader",
|
|
11037
11102
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LoadingSpinner, {
|
|
11038
11103
|
size: 24,
|
|
11039
11104
|
"aria-label": "Loading select options..."
|
|
@@ -11041,19 +11106,15 @@ function SingleSelect(props) {
|
|
|
11041
11106
|
});
|
|
11042
11107
|
if (options.length === 0 && emptyResultText !== void 0 && emptyResultText !== "") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
11043
11108
|
className: "ds-single-select__no-results",
|
|
11044
|
-
"data-c13y-component": "single-select-empty",
|
|
11045
11109
|
children: emptyResultText
|
|
11046
11110
|
});
|
|
11047
11111
|
const getLabel = (option) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
11048
11112
|
className: "ds-single-select__option-text",
|
|
11049
|
-
"data-c13y-component": "single-select-option-text",
|
|
11050
11113
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
11051
|
-
"data-c13y-component": "single-select-label",
|
|
11052
11114
|
className: (0, clsx.default)("ds-single-select__option-label", value?.id === option.id && "ds-single-select__option-label--selected"),
|
|
11053
11115
|
...getItemProps({ id: `${listId}-option-${option.id}-label` }),
|
|
11054
11116
|
children: optionLabel(option)
|
|
11055
11117
|
}), typeof optionDescription === "function" && optionDescription(option) !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
11056
|
-
"data-c13y-component": "single-select-option-description",
|
|
11057
11118
|
className: (0, clsx.default)("ds-single-select__option-description", value?.id === option.id && "ds-single-select__option-description--selected"),
|
|
11058
11119
|
...getItemProps({ id: `${listId}-option-${option.id}-description` }),
|
|
11059
11120
|
"aria-hidden": true,
|
|
@@ -11061,7 +11122,6 @@ function SingleSelect(props) {
|
|
|
11061
11122
|
})]
|
|
11062
11123
|
});
|
|
11063
11124
|
return options.map((option, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
11064
|
-
"data-c13y-component": "single-select-option",
|
|
11065
11125
|
...getItemProps({
|
|
11066
11126
|
onClick: () => {
|
|
11067
11127
|
onChange(option);
|
|
@@ -11110,7 +11170,6 @@ function SingleSelect(props) {
|
|
|
11110
11170
|
})]
|
|
11111
11171
|
}),
|
|
11112
11172
|
variantProps.searchable ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11113
|
-
"data-c13y-component": "single-select",
|
|
11114
11173
|
className: (0, clsx.default)("ds-single-select__input-wrapper", disabled && "ds-single-select__input-wrapper--disabled", error && "ds-single-select__input-wrapper--error"),
|
|
11115
11174
|
ref: refs.setReference,
|
|
11116
11175
|
onClick: handleWrapperClick,
|
|
@@ -11147,7 +11206,6 @@ function SingleSelect(props) {
|
|
|
11147
11206
|
})
|
|
11148
11207
|
]
|
|
11149
11208
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
11150
|
-
"data-c13y-component": "single-select",
|
|
11151
11209
|
className: (0, clsx.default)("ds-single-select__trigger", error !== void 0 && error !== "" && "ds-single-select__trigger--error", disabled && "ds-single-select__trigger--disabled"),
|
|
11152
11210
|
...getReferenceProps({
|
|
11153
11211
|
disabled,
|
|
@@ -11196,7 +11254,6 @@ function SingleSelect(props) {
|
|
|
11196
11254
|
"aria-labelledby": ariaLabelledBy || labelId
|
|
11197
11255
|
}),
|
|
11198
11256
|
ref: floatingRef,
|
|
11199
|
-
"data-c13y-component": "single-select-dropdown",
|
|
11200
11257
|
className: (0, clsx.default)("ds-single-select__dropdown"),
|
|
11201
11258
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: dropdownContent })
|
|
11202
11259
|
}) }) : null] });
|
|
@@ -11345,13 +11402,11 @@ function TextAreaDeprecated(props) {
|
|
|
11345
11402
|
if (handleValueChange) handleValueChange(event);
|
|
11346
11403
|
}, [handleValueChange]);
|
|
11347
11404
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11348
|
-
"data-c13y-component": "text-area-deprecated",
|
|
11349
11405
|
className: (0, clsx.default)("ds-text-area__container", className),
|
|
11350
11406
|
children: [
|
|
11351
11407
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
11352
11408
|
className: "ds-text-area__label",
|
|
11353
11409
|
htmlFor: id,
|
|
11354
|
-
"data-c13y-component": "text-area-deprecated-label",
|
|
11355
11410
|
children: [label, requiredLabel && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
11356
11411
|
className: "ds-text-area__label-required",
|
|
11357
11412
|
"aria-hidden": true,
|
|
@@ -11360,7 +11415,6 @@ function TextAreaDeprecated(props) {
|
|
|
11360
11415
|
}),
|
|
11361
11416
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
11362
11417
|
className: (0, clsx.default)("ds-text-area__input", resizable && "resizable", errorMessage && "ds-text-area__input--error"),
|
|
11363
|
-
"data-c13y-component": "text-area-deprecated-input",
|
|
11364
11418
|
dir: "auto",
|
|
11365
11419
|
id,
|
|
11366
11420
|
name: inputId ?? label,
|
|
@@ -11375,24 +11429,20 @@ function TextAreaDeprecated(props) {
|
|
|
11375
11429
|
}),
|
|
11376
11430
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11377
11431
|
className: "ds-text-area__footer",
|
|
11378
|
-
"data-c13y-component": "text-area-deprecated-footer",
|
|
11379
11432
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
11380
11433
|
id: errorId,
|
|
11381
11434
|
"aria-live": errorAriaLive,
|
|
11382
11435
|
"aria-atomic": "true",
|
|
11383
11436
|
children: errorMessage && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
11384
11437
|
className: "ds-text-area__error",
|
|
11385
|
-
"data-c13y-component": "text-area-deprecated-error",
|
|
11386
11438
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(AlertIcon_default, {}), errorMessage]
|
|
11387
11439
|
})
|
|
11388
11440
|
}), description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
11389
11441
|
className: "ds-text-area__description",
|
|
11390
11442
|
id: descriptionId,
|
|
11391
|
-
"data-c13y-component": "text-area-deprecated-description",
|
|
11392
11443
|
children: description
|
|
11393
11444
|
})] }), limit && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
11394
11445
|
className: "ds-text-area__counter",
|
|
11395
|
-
"data-c13y-component": "text-area-deprecated-counter",
|
|
11396
11446
|
children: [
|
|
11397
11447
|
count,
|
|
11398
11448
|
"/",
|
|
@@ -11441,13 +11491,11 @@ var TextInput = (0, react.forwardRef)(function TextInput(props, ref) {
|
|
|
11441
11491
|
const inputRef = (0, react.useRef)(null);
|
|
11442
11492
|
if (!ref) ref = inputRef;
|
|
11443
11493
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11444
|
-
"data-c13y-component": "text-input",
|
|
11445
11494
|
className: (0, clsx.default)("ds-text-input__container", errorMessage ? "ds-text-input__container--error" : `ds-text-input__container--${variant}`, restProps.disabled && "ds-text-input__container--disabled", className),
|
|
11446
11495
|
children: [
|
|
11447
11496
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
11448
11497
|
className: "ds-text-input__label",
|
|
11449
11498
|
htmlFor: inputId,
|
|
11450
|
-
"data-c13y-component": "text-input-label",
|
|
11451
11499
|
children: [label, requiredLabel && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
11452
11500
|
className: "ds-text-input__label-required",
|
|
11453
11501
|
"aria-hidden": true,
|
|
@@ -11456,7 +11504,6 @@ var TextInput = (0, react.forwardRef)(function TextInput(props, ref) {
|
|
|
11456
11504
|
}),
|
|
11457
11505
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11458
11506
|
className: "ds-text-input__base-wrapper",
|
|
11459
|
-
"data-c13y-component": "text-input-container",
|
|
11460
11507
|
style: { width },
|
|
11461
11508
|
onClick: () => ref && "current" in ref && ref.current?.focus(),
|
|
11462
11509
|
role: "none",
|
|
@@ -11466,7 +11513,6 @@ var TextInput = (0, react.forwardRef)(function TextInput(props, ref) {
|
|
|
11466
11513
|
children: icon
|
|
11467
11514
|
}),
|
|
11468
11515
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
11469
|
-
"data-c13y-component": "text-input-input",
|
|
11470
11516
|
className: "ds-text-input__base-input",
|
|
11471
11517
|
"aria-invalid": !!errorMessage,
|
|
11472
11518
|
id: inputId,
|
|
@@ -11486,7 +11532,6 @@ var TextInput = (0, react.forwardRef)(function TextInput(props, ref) {
|
|
|
11486
11532
|
errorMessage && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11487
11533
|
className: "ds-text-input__error",
|
|
11488
11534
|
id: inputErrorId,
|
|
11489
|
-
"data-c13y-component": "text-input-error",
|
|
11490
11535
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
11491
11536
|
className: "ds-text-input__error-icon",
|
|
11492
11537
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AlertIcon_default, {})
|
|
@@ -11495,7 +11540,6 @@ var TextInput = (0, react.forwardRef)(function TextInput(props, ref) {
|
|
|
11495
11540
|
description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
11496
11541
|
className: (0, clsx.default)("ds-text-input__description"),
|
|
11497
11542
|
id: inputDescriptionId,
|
|
11498
|
-
"data-c13y-component": "text-input-description",
|
|
11499
11543
|
children: description
|
|
11500
11544
|
})
|
|
11501
11545
|
]
|
|
@@ -11511,7 +11555,6 @@ function Toggle(props) {
|
|
|
11511
11555
|
const descriptionId = `toggle-${id}-descr`;
|
|
11512
11556
|
const inputId = `toggle-${id}-label`;
|
|
11513
11557
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11514
|
-
"data-c13y-component": "toggle",
|
|
11515
11558
|
className: (0, clsx.default)("ds-toggle__container", disabled && "ds-toggle__container--disabled", spaceBetween ? "ds-toggle__container--full-width" : "ds-toggle__container--content-width", className),
|
|
11516
11559
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11517
11560
|
className: (0, clsx.default)("ds-toggle__wrapper"),
|
|
@@ -11520,13 +11563,11 @@ function Toggle(props) {
|
|
|
11520
11563
|
className: (0, clsx.default)("ds-toggle__label-container"),
|
|
11521
11564
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
11522
11565
|
className: (0, clsx.default)("ds-toggle__label"),
|
|
11523
|
-
"data-c13y-component": "toggle-label",
|
|
11524
11566
|
htmlFor: inputId,
|
|
11525
11567
|
children: label
|
|
11526
11568
|
})
|
|
11527
11569
|
}),
|
|
11528
11570
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
11529
|
-
"data-c13y-component": "toggle-input",
|
|
11530
11571
|
className: "ds-toggle",
|
|
11531
11572
|
name,
|
|
11532
11573
|
type: "checkbox",
|
|
@@ -11539,7 +11580,6 @@ function Toggle(props) {
|
|
|
11539
11580
|
}),
|
|
11540
11581
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11541
11582
|
className: (0, clsx.default)("ds-toggle__switch-wrapper"),
|
|
11542
|
-
"data-c13y-component": "toggle-switch",
|
|
11543
11583
|
children: [
|
|
11544
11584
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckIcon_default, {
|
|
11545
11585
|
"aria-hidden": "true",
|
|
@@ -11555,7 +11595,6 @@ function Toggle(props) {
|
|
|
11555
11595
|
]
|
|
11556
11596
|
}), description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
11557
11597
|
className: (0, clsx.default)("ds-toggle__description"),
|
|
11558
|
-
"data-c13y-component": "toggle-description",
|
|
11559
11598
|
id: descriptionId,
|
|
11560
11599
|
children: description
|
|
11561
11600
|
})]
|
|
@@ -11594,6 +11633,7 @@ var Tooltip = {
|
|
|
11594
11633
|
Content: (0, react.forwardRef)((props, ref) => {
|
|
11595
11634
|
const context = (0, react.useContext)(TooltipContext);
|
|
11596
11635
|
const { className, children, variant = "default", is = "description", container, ...rest } = props;
|
|
11636
|
+
const { c13y, rest: positionerProps } = splitC13yProps(rest);
|
|
11597
11637
|
(0, react.useEffect)(() => {
|
|
11598
11638
|
if (context) context.setIs(is);
|
|
11599
11639
|
}, [is, context]);
|
|
@@ -11601,8 +11641,9 @@ var Tooltip = {
|
|
|
11601
11641
|
container,
|
|
11602
11642
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_tooltip.Tooltip.Positioner, {
|
|
11603
11643
|
sideOffset: 4,
|
|
11604
|
-
...
|
|
11644
|
+
...positionerProps,
|
|
11605
11645
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_tooltip.Tooltip.Popup, {
|
|
11646
|
+
...c13y,
|
|
11606
11647
|
"data-c13y-component": "tooltip-popover",
|
|
11607
11648
|
className: (0, clsx.default)(`ds-tooltip--${variant}`, "ds-tooltip", className),
|
|
11608
11649
|
id: context?.id,
|
|
@@ -11673,7 +11714,6 @@ function TooltipDeprecated(props) {
|
|
|
11673
11714
|
...styles
|
|
11674
11715
|
}
|
|
11675
11716
|
}),
|
|
11676
|
-
"data-c13y-component": "tooltip-deprecated",
|
|
11677
11717
|
className: (0, clsx.clsx)("ds-tooltip-deprecated", className),
|
|
11678
11718
|
children: content
|
|
11679
11719
|
}) : null] });
|
|
@@ -11840,6 +11880,8 @@ exports.MapPinIcon = MapPinIcon_default;
|
|
|
11840
11880
|
exports.Menu = Menu;
|
|
11841
11881
|
exports.MergeLeftIcon = MergeLeftIcon_default;
|
|
11842
11882
|
exports.MergeRightIcon = MergeRightIcon_default;
|
|
11883
|
+
exports.MicrophoneAltIcon = MicrophoneAltIcon_default;
|
|
11884
|
+
exports.MicrophoneIcon = MicrophoneIcon_default;
|
|
11843
11885
|
exports.MinusCircleIcon = MinusCircleIcon_default;
|
|
11844
11886
|
exports.MobileIcon = MobileIcon_default;
|
|
11845
11887
|
exports.Modal = Modal;
|