@staffbase/design 18.5.0 → 18.6.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 +39 -51
- package/dist/main.cjs.map +1 -1
- package/dist/main.js +39 -51
- 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({
|
|
@@ -9111,7 +9108,6 @@ function getDividerStyles(props) {
|
|
|
9111
9108
|
function Divider(props) {
|
|
9112
9109
|
const { dividerPosition = "horizontal", className = "", fullWidth = false, ...otherProps } = props;
|
|
9113
9110
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hr", {
|
|
9114
|
-
"data-c13y-component": "divider",
|
|
9115
9111
|
className: (0, clsx.default)("ds-divider", `ds-divider--${dividerPosition}`, className),
|
|
9116
9112
|
style: getDividerStyles({
|
|
9117
9113
|
dividerPosition,
|
|
@@ -9865,6 +9861,30 @@ var HelpButton = (0, react.forwardRef)(function HelpButton(props, ref) {
|
|
|
9865
9861
|
});
|
|
9866
9862
|
HelpButton.displayName = "HelpButton";
|
|
9867
9863
|
//#endregion
|
|
9864
|
+
//#region src/utils/splitC13yProps.ts
|
|
9865
|
+
/**
|
|
9866
|
+
* Splits a props object into its `data-c13y-*` customizability attributes and
|
|
9867
|
+
* everything else.
|
|
9868
|
+
*
|
|
9869
|
+
* Portalled overlays render a positioner wrapper around the visible popup. The
|
|
9870
|
+
* public prop type extends the positioner's props, so a consumer-supplied
|
|
9871
|
+
* `data-c13y-region` / `data-c13y-purpose` / `data-c13y-id` would otherwise land
|
|
9872
|
+
* on the invisible positioner instead of the visible popup that carries
|
|
9873
|
+
* `data-c13y-component`. Use this to forward the customizability attributes onto
|
|
9874
|
+
* the popup while keeping positioner props (`align`, `sideOffset`, …) on the
|
|
9875
|
+
* positioner.
|
|
9876
|
+
*/
|
|
9877
|
+
function splitC13yProps(props) {
|
|
9878
|
+
const c13y = {};
|
|
9879
|
+
const rest = {};
|
|
9880
|
+
for (const key of Object.keys(props)) if (key.startsWith("data-c13y-")) c13y[key] = props[key];
|
|
9881
|
+
else rest[key] = props[key];
|
|
9882
|
+
return {
|
|
9883
|
+
c13y,
|
|
9884
|
+
rest
|
|
9885
|
+
};
|
|
9886
|
+
}
|
|
9887
|
+
//#endregion
|
|
9868
9888
|
//#region src/components/menu/Menu.tsx
|
|
9869
9889
|
var Root$6 = (props) => {
|
|
9870
9890
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_menu.Menu.Root, {
|
|
@@ -9882,14 +9902,16 @@ var Trigger$4 = (props) => {
|
|
|
9882
9902
|
};
|
|
9883
9903
|
var Popup$3 = (0, react.forwardRef)((props, ref) => {
|
|
9884
9904
|
const { className, children, container, ...rest } = props;
|
|
9905
|
+
const { c13y, rest: positionerProps } = splitC13yProps(rest);
|
|
9885
9906
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_menu.Menu.Portal, {
|
|
9886
9907
|
container,
|
|
9887
9908
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_menu.Menu.Positioner, {
|
|
9888
9909
|
align: "end",
|
|
9889
9910
|
sideOffset: 4,
|
|
9890
9911
|
ref,
|
|
9891
|
-
...
|
|
9912
|
+
...positionerProps,
|
|
9892
9913
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_menu.Menu.Popup, {
|
|
9914
|
+
...c13y,
|
|
9893
9915
|
"data-c13y-component": "menu-popover",
|
|
9894
9916
|
className: (0, clsx.default)("ds-menu__popup", className),
|
|
9895
9917
|
children,
|
|
@@ -10042,21 +10064,18 @@ var ModalHeader = (0, react.forwardRef)(function ModalHeader(props, ref) {
|
|
|
10042
10064
|
const { title, titleAddon, showCancelButton = false, cancelButtonText, onCancel, showHeaderButton = false, headerButtonIsGhost = true, onHeaderButtonClick, headerButtonText } = props;
|
|
10043
10065
|
let headerButton;
|
|
10044
10066
|
if (showHeaderButton && onHeaderButtonClick && headerButtonText) if (headerButtonIsGhost) headerButton = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GhostButton, {
|
|
10045
|
-
"data-c13y-purpose": "accept",
|
|
10046
10067
|
className: (0, clsx.default)("ds-modal__ghost-button--accept"),
|
|
10047
10068
|
variant: "primary",
|
|
10048
10069
|
onClick: () => onHeaderButtonClick(),
|
|
10049
10070
|
children: headerButtonText
|
|
10050
10071
|
});
|
|
10051
10072
|
else headerButton = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
10052
|
-
"data-c13y-purpose": "accept",
|
|
10053
10073
|
className: (0, clsx.default)("ds-modal__button--accept"),
|
|
10054
10074
|
variant: "primary",
|
|
10055
10075
|
onClick: () => onHeaderButtonClick(),
|
|
10056
10076
|
children: headerButtonText
|
|
10057
10077
|
});
|
|
10058
10078
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10059
|
-
"data-c13y-component": "modal-header",
|
|
10060
10079
|
className: (0, clsx.default)("ds-modal__header"),
|
|
10061
10080
|
ref,
|
|
10062
10081
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -10070,7 +10089,6 @@ var ModalHeader = (0, react.forwardRef)(function ModalHeader(props, ref) {
|
|
|
10070
10089
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10071
10090
|
className: "ds-modal__header-buttons",
|
|
10072
10091
|
children: [!!headerButton && headerButton, showCancelButton && cancelButtonText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconGhostButton, {
|
|
10073
|
-
"data-c13y-purpose": "cancel",
|
|
10074
10092
|
className: (0, clsx.default)("ds-modal__ghost-button--cancel"),
|
|
10075
10093
|
variant: "secondary",
|
|
10076
10094
|
style: { padding: "10px" },
|
|
@@ -10084,7 +10102,6 @@ var ModalHeader = (0, react.forwardRef)(function ModalHeader(props, ref) {
|
|
|
10084
10102
|
fullWidth: true
|
|
10085
10103
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
10086
10104
|
className: "ds-modal__header-content",
|
|
10087
|
-
"data-c13y-component": "modal-header-content",
|
|
10088
10105
|
"data-testid": "header-content-wrapper",
|
|
10089
10106
|
children: props.children
|
|
10090
10107
|
})] })]
|
|
@@ -10150,7 +10167,6 @@ function ModalContent(props) {
|
|
|
10150
10167
|
setScrollShadows(scroll, scrollContent.current);
|
|
10151
10168
|
}, [scroll]);
|
|
10152
10169
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
10153
|
-
"data-c13y-component": "modal-content",
|
|
10154
10170
|
className: (0, clsx.default)("ds-modal__inner-content", scroll && "ds-modal__inner-content--scroll"),
|
|
10155
10171
|
"data-testid": "main-content-wrapper",
|
|
10156
10172
|
ref: scrollContent,
|
|
@@ -10161,20 +10177,17 @@ function ModalContent(props) {
|
|
|
10161
10177
|
var ModalFooter = (0, react.forwardRef)(function ModalFooter(props, ref) {
|
|
10162
10178
|
const { cancelButtonText, onCancel, footerButtonText, footerButtonVariant, onFooterButtonClick, disableFooterButton } = props;
|
|
10163
10179
|
return footerButtonText && onFooterButtonClick ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10164
|
-
"data-c13y-component": "modal-footer",
|
|
10165
10180
|
className: (0, clsx.default)("ds-modal__footer"),
|
|
10166
10181
|
"data-testid": "footer",
|
|
10167
10182
|
ref,
|
|
10168
10183
|
children: [props.children, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10169
10184
|
className: "ds-modal__footer-buttons",
|
|
10170
10185
|
children: [cancelButtonText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
10171
|
-
"data-c13y-purpose": "cancel",
|
|
10172
10186
|
className: (0, clsx.default)("ds-modal__button--cancel"),
|
|
10173
10187
|
variant: "secondary",
|
|
10174
10188
|
onClick: () => onCancel(),
|
|
10175
10189
|
children: cancelButtonText
|
|
10176
10190
|
}), footerButtonText && onFooterButtonClick && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
10177
|
-
"data-c13y-purpose": "accept",
|
|
10178
10191
|
className: (0, clsx.default)("ds-modal__button--accept"),
|
|
10179
10192
|
variant: footerButtonVariant,
|
|
10180
10193
|
disabled: disableFooterButton,
|
|
@@ -10261,7 +10274,6 @@ function ModalDialog(props) {
|
|
|
10261
10274
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_floating_ui_react.FloatingFocusManager, {
|
|
10262
10275
|
context,
|
|
10263
10276
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10264
|
-
"data-c13y-component": "modal-dialog",
|
|
10265
10277
|
...getFloatingProps({
|
|
10266
10278
|
ref: refs.setFloating,
|
|
10267
10279
|
className: (0, clsx.default)("ds-modal-dialog", className)
|
|
@@ -10283,12 +10295,10 @@ function ModalDialog(props) {
|
|
|
10283
10295
|
className: "ds-modal-dialog__content",
|
|
10284
10296
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
10285
10297
|
variant: confirmButtonVariant,
|
|
10286
|
-
"data-c13y-purpose": "accept",
|
|
10287
10298
|
onClick: onConfirm,
|
|
10288
10299
|
children: confirmButtonText
|
|
10289
10300
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
10290
10301
|
variant: "secondary",
|
|
10291
|
-
"data-c13y-purpose": "cancel",
|
|
10292
10302
|
onClick: onCancel,
|
|
10293
10303
|
children: cancelButtonText
|
|
10294
10304
|
})]
|
|
@@ -10535,6 +10545,7 @@ var Input$1 = (0, react.forwardRef)((props, ref) => {
|
|
|
10535
10545
|
});
|
|
10536
10546
|
var Popup$2 = (0, react.forwardRef)((props, ref) => {
|
|
10537
10547
|
const { className, children, container, ...rest } = props;
|
|
10548
|
+
const { c13y, rest: positionerProps } = splitC13yProps(rest);
|
|
10538
10549
|
const { containerRef } = useSearchableMultiSelectContext();
|
|
10539
10550
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Portal, {
|
|
10540
10551
|
container,
|
|
@@ -10542,8 +10553,9 @@ var Popup$2 = (0, react.forwardRef)((props, ref) => {
|
|
|
10542
10553
|
ref,
|
|
10543
10554
|
sideOffset: 4,
|
|
10544
10555
|
anchor: containerRef,
|
|
10545
|
-
...
|
|
10556
|
+
...positionerProps,
|
|
10546
10557
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Popup, {
|
|
10558
|
+
...c13y,
|
|
10547
10559
|
"data-c13y-component": "searchable-multi-select-popover",
|
|
10548
10560
|
className: (0, clsx.default)("ds-searchable-multi-select__popup", className),
|
|
10549
10561
|
children,
|
|
@@ -10725,13 +10737,15 @@ var Input = (0, react.forwardRef)((props, ref) => {
|
|
|
10725
10737
|
});
|
|
10726
10738
|
var Popup$1 = (0, react.forwardRef)((props, ref) => {
|
|
10727
10739
|
const { className, children, container, ...rest } = props;
|
|
10740
|
+
const { c13y, rest: positionerProps } = splitC13yProps(rest);
|
|
10728
10741
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Portal, {
|
|
10729
10742
|
container,
|
|
10730
10743
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Positioner, {
|
|
10731
10744
|
sideOffset: 5,
|
|
10732
10745
|
ref,
|
|
10733
|
-
...
|
|
10746
|
+
...positionerProps,
|
|
10734
10747
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Popup, {
|
|
10748
|
+
...c13y,
|
|
10735
10749
|
"data-c13y-component": "searchable-single-select-popover",
|
|
10736
10750
|
className: (0, clsx.default)("ds-searchable-single-select__popup", className),
|
|
10737
10751
|
children,
|
|
@@ -10851,13 +10865,15 @@ var Trigger$2 = (0, react.forwardRef)((props, ref) => {
|
|
|
10851
10865
|
});
|
|
10852
10866
|
var Popup = (0, react.forwardRef)((props, ref) => {
|
|
10853
10867
|
const { className, children, container, ...rest } = props;
|
|
10868
|
+
const { c13y, rest: positionerProps } = splitC13yProps(rest);
|
|
10854
10869
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_select.Select.Portal, {
|
|
10855
10870
|
container,
|
|
10856
10871
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_select.Select.Positioner, {
|
|
10857
10872
|
alignItemWithTrigger: false,
|
|
10858
10873
|
ref,
|
|
10859
|
-
...
|
|
10874
|
+
...positionerProps,
|
|
10860
10875
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_select.Select.Popup, {
|
|
10876
|
+
...c13y,
|
|
10861
10877
|
"data-c13y-component": "select-popover",
|
|
10862
10878
|
className: (0, clsx.default)("ds-select__popup", className),
|
|
10863
10879
|
children,
|
|
@@ -11017,12 +11033,10 @@ function SingleSelect(props) {
|
|
|
11017
11033
|
const errorOrDescription = (0, react.useMemo)(() => {
|
|
11018
11034
|
if (error !== void 0 && error !== "") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11019
11035
|
className: "ds-single-select__error",
|
|
11020
|
-
"data-c13y-component": "single-select-error",
|
|
11021
11036
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(AlertIcon_default, {}), error]
|
|
11022
11037
|
});
|
|
11023
11038
|
if (description !== void 0 && description !== "") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
11024
11039
|
className: "ds-single-select__description",
|
|
11025
|
-
"data-c13y-component": "single-select-description",
|
|
11026
11040
|
children: description
|
|
11027
11041
|
});
|
|
11028
11042
|
return null;
|
|
@@ -11033,7 +11047,6 @@ function SingleSelect(props) {
|
|
|
11033
11047
|
const dropdownContent = (0, react.useMemo)(() => {
|
|
11034
11048
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
11035
11049
|
className: "ds-single-select__loader",
|
|
11036
|
-
"data-c13y-component": "single-select-loader",
|
|
11037
11050
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LoadingSpinner, {
|
|
11038
11051
|
size: 24,
|
|
11039
11052
|
"aria-label": "Loading select options..."
|
|
@@ -11041,19 +11054,15 @@ function SingleSelect(props) {
|
|
|
11041
11054
|
});
|
|
11042
11055
|
if (options.length === 0 && emptyResultText !== void 0 && emptyResultText !== "") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
11043
11056
|
className: "ds-single-select__no-results",
|
|
11044
|
-
"data-c13y-component": "single-select-empty",
|
|
11045
11057
|
children: emptyResultText
|
|
11046
11058
|
});
|
|
11047
11059
|
const getLabel = (option) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
11048
11060
|
className: "ds-single-select__option-text",
|
|
11049
|
-
"data-c13y-component": "single-select-option-text",
|
|
11050
11061
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
11051
|
-
"data-c13y-component": "single-select-label",
|
|
11052
11062
|
className: (0, clsx.default)("ds-single-select__option-label", value?.id === option.id && "ds-single-select__option-label--selected"),
|
|
11053
11063
|
...getItemProps({ id: `${listId}-option-${option.id}-label` }),
|
|
11054
11064
|
children: optionLabel(option)
|
|
11055
11065
|
}), typeof optionDescription === "function" && optionDescription(option) !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
11056
|
-
"data-c13y-component": "single-select-option-description",
|
|
11057
11066
|
className: (0, clsx.default)("ds-single-select__option-description", value?.id === option.id && "ds-single-select__option-description--selected"),
|
|
11058
11067
|
...getItemProps({ id: `${listId}-option-${option.id}-description` }),
|
|
11059
11068
|
"aria-hidden": true,
|
|
@@ -11061,7 +11070,6 @@ function SingleSelect(props) {
|
|
|
11061
11070
|
})]
|
|
11062
11071
|
});
|
|
11063
11072
|
return options.map((option, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
11064
|
-
"data-c13y-component": "single-select-option",
|
|
11065
11073
|
...getItemProps({
|
|
11066
11074
|
onClick: () => {
|
|
11067
11075
|
onChange(option);
|
|
@@ -11110,7 +11118,6 @@ function SingleSelect(props) {
|
|
|
11110
11118
|
})]
|
|
11111
11119
|
}),
|
|
11112
11120
|
variantProps.searchable ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11113
|
-
"data-c13y-component": "single-select",
|
|
11114
11121
|
className: (0, clsx.default)("ds-single-select__input-wrapper", disabled && "ds-single-select__input-wrapper--disabled", error && "ds-single-select__input-wrapper--error"),
|
|
11115
11122
|
ref: refs.setReference,
|
|
11116
11123
|
onClick: handleWrapperClick,
|
|
@@ -11147,7 +11154,6 @@ function SingleSelect(props) {
|
|
|
11147
11154
|
})
|
|
11148
11155
|
]
|
|
11149
11156
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
11150
|
-
"data-c13y-component": "single-select",
|
|
11151
11157
|
className: (0, clsx.default)("ds-single-select__trigger", error !== void 0 && error !== "" && "ds-single-select__trigger--error", disabled && "ds-single-select__trigger--disabled"),
|
|
11152
11158
|
...getReferenceProps({
|
|
11153
11159
|
disabled,
|
|
@@ -11196,7 +11202,6 @@ function SingleSelect(props) {
|
|
|
11196
11202
|
"aria-labelledby": ariaLabelledBy || labelId
|
|
11197
11203
|
}),
|
|
11198
11204
|
ref: floatingRef,
|
|
11199
|
-
"data-c13y-component": "single-select-dropdown",
|
|
11200
11205
|
className: (0, clsx.default)("ds-single-select__dropdown"),
|
|
11201
11206
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: dropdownContent })
|
|
11202
11207
|
}) }) : null] });
|
|
@@ -11345,13 +11350,11 @@ function TextAreaDeprecated(props) {
|
|
|
11345
11350
|
if (handleValueChange) handleValueChange(event);
|
|
11346
11351
|
}, [handleValueChange]);
|
|
11347
11352
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11348
|
-
"data-c13y-component": "text-area-deprecated",
|
|
11349
11353
|
className: (0, clsx.default)("ds-text-area__container", className),
|
|
11350
11354
|
children: [
|
|
11351
11355
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
11352
11356
|
className: "ds-text-area__label",
|
|
11353
11357
|
htmlFor: id,
|
|
11354
|
-
"data-c13y-component": "text-area-deprecated-label",
|
|
11355
11358
|
children: [label, requiredLabel && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
11356
11359
|
className: "ds-text-area__label-required",
|
|
11357
11360
|
"aria-hidden": true,
|
|
@@ -11360,7 +11363,6 @@ function TextAreaDeprecated(props) {
|
|
|
11360
11363
|
}),
|
|
11361
11364
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
11362
11365
|
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
11366
|
dir: "auto",
|
|
11365
11367
|
id,
|
|
11366
11368
|
name: inputId ?? label,
|
|
@@ -11375,24 +11377,20 @@ function TextAreaDeprecated(props) {
|
|
|
11375
11377
|
}),
|
|
11376
11378
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11377
11379
|
className: "ds-text-area__footer",
|
|
11378
|
-
"data-c13y-component": "text-area-deprecated-footer",
|
|
11379
11380
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
11380
11381
|
id: errorId,
|
|
11381
11382
|
"aria-live": errorAriaLive,
|
|
11382
11383
|
"aria-atomic": "true",
|
|
11383
11384
|
children: errorMessage && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
11384
11385
|
className: "ds-text-area__error",
|
|
11385
|
-
"data-c13y-component": "text-area-deprecated-error",
|
|
11386
11386
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(AlertIcon_default, {}), errorMessage]
|
|
11387
11387
|
})
|
|
11388
11388
|
}), description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
11389
11389
|
className: "ds-text-area__description",
|
|
11390
11390
|
id: descriptionId,
|
|
11391
|
-
"data-c13y-component": "text-area-deprecated-description",
|
|
11392
11391
|
children: description
|
|
11393
11392
|
})] }), limit && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
11394
11393
|
className: "ds-text-area__counter",
|
|
11395
|
-
"data-c13y-component": "text-area-deprecated-counter",
|
|
11396
11394
|
children: [
|
|
11397
11395
|
count,
|
|
11398
11396
|
"/",
|
|
@@ -11441,13 +11439,11 @@ var TextInput = (0, react.forwardRef)(function TextInput(props, ref) {
|
|
|
11441
11439
|
const inputRef = (0, react.useRef)(null);
|
|
11442
11440
|
if (!ref) ref = inputRef;
|
|
11443
11441
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11444
|
-
"data-c13y-component": "text-input",
|
|
11445
11442
|
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
11443
|
children: [
|
|
11447
11444
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
11448
11445
|
className: "ds-text-input__label",
|
|
11449
11446
|
htmlFor: inputId,
|
|
11450
|
-
"data-c13y-component": "text-input-label",
|
|
11451
11447
|
children: [label, requiredLabel && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
11452
11448
|
className: "ds-text-input__label-required",
|
|
11453
11449
|
"aria-hidden": true,
|
|
@@ -11456,7 +11452,6 @@ var TextInput = (0, react.forwardRef)(function TextInput(props, ref) {
|
|
|
11456
11452
|
}),
|
|
11457
11453
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11458
11454
|
className: "ds-text-input__base-wrapper",
|
|
11459
|
-
"data-c13y-component": "text-input-container",
|
|
11460
11455
|
style: { width },
|
|
11461
11456
|
onClick: () => ref && "current" in ref && ref.current?.focus(),
|
|
11462
11457
|
role: "none",
|
|
@@ -11466,7 +11461,6 @@ var TextInput = (0, react.forwardRef)(function TextInput(props, ref) {
|
|
|
11466
11461
|
children: icon
|
|
11467
11462
|
}),
|
|
11468
11463
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
11469
|
-
"data-c13y-component": "text-input-input",
|
|
11470
11464
|
className: "ds-text-input__base-input",
|
|
11471
11465
|
"aria-invalid": !!errorMessage,
|
|
11472
11466
|
id: inputId,
|
|
@@ -11486,7 +11480,6 @@ var TextInput = (0, react.forwardRef)(function TextInput(props, ref) {
|
|
|
11486
11480
|
errorMessage && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11487
11481
|
className: "ds-text-input__error",
|
|
11488
11482
|
id: inputErrorId,
|
|
11489
|
-
"data-c13y-component": "text-input-error",
|
|
11490
11483
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
11491
11484
|
className: "ds-text-input__error-icon",
|
|
11492
11485
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AlertIcon_default, {})
|
|
@@ -11495,7 +11488,6 @@ var TextInput = (0, react.forwardRef)(function TextInput(props, ref) {
|
|
|
11495
11488
|
description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
11496
11489
|
className: (0, clsx.default)("ds-text-input__description"),
|
|
11497
11490
|
id: inputDescriptionId,
|
|
11498
|
-
"data-c13y-component": "text-input-description",
|
|
11499
11491
|
children: description
|
|
11500
11492
|
})
|
|
11501
11493
|
]
|
|
@@ -11511,7 +11503,6 @@ function Toggle(props) {
|
|
|
11511
11503
|
const descriptionId = `toggle-${id}-descr`;
|
|
11512
11504
|
const inputId = `toggle-${id}-label`;
|
|
11513
11505
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11514
|
-
"data-c13y-component": "toggle",
|
|
11515
11506
|
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
11507
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11517
11508
|
className: (0, clsx.default)("ds-toggle__wrapper"),
|
|
@@ -11520,13 +11511,11 @@ function Toggle(props) {
|
|
|
11520
11511
|
className: (0, clsx.default)("ds-toggle__label-container"),
|
|
11521
11512
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
11522
11513
|
className: (0, clsx.default)("ds-toggle__label"),
|
|
11523
|
-
"data-c13y-component": "toggle-label",
|
|
11524
11514
|
htmlFor: inputId,
|
|
11525
11515
|
children: label
|
|
11526
11516
|
})
|
|
11527
11517
|
}),
|
|
11528
11518
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
11529
|
-
"data-c13y-component": "toggle-input",
|
|
11530
11519
|
className: "ds-toggle",
|
|
11531
11520
|
name,
|
|
11532
11521
|
type: "checkbox",
|
|
@@ -11539,7 +11528,6 @@ function Toggle(props) {
|
|
|
11539
11528
|
}),
|
|
11540
11529
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
11541
11530
|
className: (0, clsx.default)("ds-toggle__switch-wrapper"),
|
|
11542
|
-
"data-c13y-component": "toggle-switch",
|
|
11543
11531
|
children: [
|
|
11544
11532
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckIcon_default, {
|
|
11545
11533
|
"aria-hidden": "true",
|
|
@@ -11555,7 +11543,6 @@ function Toggle(props) {
|
|
|
11555
11543
|
]
|
|
11556
11544
|
}), description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
11557
11545
|
className: (0, clsx.default)("ds-toggle__description"),
|
|
11558
|
-
"data-c13y-component": "toggle-description",
|
|
11559
11546
|
id: descriptionId,
|
|
11560
11547
|
children: description
|
|
11561
11548
|
})]
|
|
@@ -11594,6 +11581,7 @@ var Tooltip = {
|
|
|
11594
11581
|
Content: (0, react.forwardRef)((props, ref) => {
|
|
11595
11582
|
const context = (0, react.useContext)(TooltipContext);
|
|
11596
11583
|
const { className, children, variant = "default", is = "description", container, ...rest } = props;
|
|
11584
|
+
const { c13y, rest: positionerProps } = splitC13yProps(rest);
|
|
11597
11585
|
(0, react.useEffect)(() => {
|
|
11598
11586
|
if (context) context.setIs(is);
|
|
11599
11587
|
}, [is, context]);
|
|
@@ -11601,8 +11589,9 @@ var Tooltip = {
|
|
|
11601
11589
|
container,
|
|
11602
11590
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_tooltip.Tooltip.Positioner, {
|
|
11603
11591
|
sideOffset: 4,
|
|
11604
|
-
...
|
|
11592
|
+
...positionerProps,
|
|
11605
11593
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_tooltip.Tooltip.Popup, {
|
|
11594
|
+
...c13y,
|
|
11606
11595
|
"data-c13y-component": "tooltip-popover",
|
|
11607
11596
|
className: (0, clsx.default)(`ds-tooltip--${variant}`, "ds-tooltip", className),
|
|
11608
11597
|
id: context?.id,
|
|
@@ -11673,7 +11662,6 @@ function TooltipDeprecated(props) {
|
|
|
11673
11662
|
...styles
|
|
11674
11663
|
}
|
|
11675
11664
|
}),
|
|
11676
|
-
"data-c13y-component": "tooltip-deprecated",
|
|
11677
11665
|
className: (0, clsx.clsx)("ds-tooltip-deprecated", className),
|
|
11678
11666
|
children: content
|
|
11679
11667
|
}) : null] });
|