@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.js
CHANGED
|
@@ -134,7 +134,6 @@ var ActionMenuContent = React.forwardRef(function ActionMenuContent(props, propR
|
|
|
134
134
|
modal: false,
|
|
135
135
|
initialFocus: -1,
|
|
136
136
|
children: /* @__PURE__ */ jsx("div", {
|
|
137
|
-
"data-c13y-component": "action-menu-content",
|
|
138
137
|
className: clsx$1("ds-action-menu", className),
|
|
139
138
|
ref: forkedRef,
|
|
140
139
|
style: {
|
|
@@ -169,7 +168,6 @@ var ActionMenuItem = React.forwardRef(function ActionMenuItem(props, ref) {
|
|
|
169
168
|
const itemRef = useMergeRefs([ref, listItemRef]);
|
|
170
169
|
return /* @__PURE__ */ jsxs("button", {
|
|
171
170
|
role: "menuitem",
|
|
172
|
-
"data-c13y-component": "action-menu-item",
|
|
173
171
|
className: clsx$1("ds-action-menu__item", `ds-action-menu__item--${variant}`, "ds-action-menu__basic-item", `ds-action-menu__basic-item--${variant}`, className),
|
|
174
172
|
...rest,
|
|
175
173
|
...context.getItemProps({
|
|
@@ -204,7 +202,6 @@ var ActionMenuLinkItem = React.forwardRef(function ActionMenuLinkItem(props, ref
|
|
|
204
202
|
const itemRef = useMergeRefs([ref, listItemRef]);
|
|
205
203
|
return /* @__PURE__ */ jsxs("a", {
|
|
206
204
|
role: "menuitem",
|
|
207
|
-
"data-c13y-component": "action-menu-link-item",
|
|
208
205
|
className: clsx$1("ds-action-menu__item", `ds-action-menu__item--${variant}`, "ds-action-menu__link-item", className),
|
|
209
206
|
...rest,
|
|
210
207
|
...context.getItemProps({
|
|
@@ -9084,7 +9081,6 @@ function getDividerStyles(props) {
|
|
|
9084
9081
|
function Divider(props) {
|
|
9085
9082
|
const { dividerPosition = "horizontal", className = "", fullWidth = false, ...otherProps } = props;
|
|
9086
9083
|
return /* @__PURE__ */ jsx("hr", {
|
|
9087
|
-
"data-c13y-component": "divider",
|
|
9088
9084
|
className: clsx$1("ds-divider", `ds-divider--${dividerPosition}`, className),
|
|
9089
9085
|
style: getDividerStyles({
|
|
9090
9086
|
dividerPosition,
|
|
@@ -9838,6 +9834,30 @@ var HelpButton = forwardRef(function HelpButton(props, ref) {
|
|
|
9838
9834
|
});
|
|
9839
9835
|
HelpButton.displayName = "HelpButton";
|
|
9840
9836
|
//#endregion
|
|
9837
|
+
//#region src/utils/splitC13yProps.ts
|
|
9838
|
+
/**
|
|
9839
|
+
* Splits a props object into its `data-c13y-*` customizability attributes and
|
|
9840
|
+
* everything else.
|
|
9841
|
+
*
|
|
9842
|
+
* Portalled overlays render a positioner wrapper around the visible popup. The
|
|
9843
|
+
* public prop type extends the positioner's props, so a consumer-supplied
|
|
9844
|
+
* `data-c13y-region` / `data-c13y-purpose` / `data-c13y-id` would otherwise land
|
|
9845
|
+
* on the invisible positioner instead of the visible popup that carries
|
|
9846
|
+
* `data-c13y-component`. Use this to forward the customizability attributes onto
|
|
9847
|
+
* the popup while keeping positioner props (`align`, `sideOffset`, …) on the
|
|
9848
|
+
* positioner.
|
|
9849
|
+
*/
|
|
9850
|
+
function splitC13yProps(props) {
|
|
9851
|
+
const c13y = {};
|
|
9852
|
+
const rest = {};
|
|
9853
|
+
for (const key of Object.keys(props)) if (key.startsWith("data-c13y-")) c13y[key] = props[key];
|
|
9854
|
+
else rest[key] = props[key];
|
|
9855
|
+
return {
|
|
9856
|
+
c13y,
|
|
9857
|
+
rest
|
|
9858
|
+
};
|
|
9859
|
+
}
|
|
9860
|
+
//#endregion
|
|
9841
9861
|
//#region src/components/menu/Menu.tsx
|
|
9842
9862
|
var Root$6 = (props) => {
|
|
9843
9863
|
return /* @__PURE__ */ jsx(Menu$1.Root, {
|
|
@@ -9855,14 +9875,16 @@ var Trigger$4 = (props) => {
|
|
|
9855
9875
|
};
|
|
9856
9876
|
var Popup$3 = forwardRef((props, ref) => {
|
|
9857
9877
|
const { className, children, container, ...rest } = props;
|
|
9878
|
+
const { c13y, rest: positionerProps } = splitC13yProps(rest);
|
|
9858
9879
|
return /* @__PURE__ */ jsx(Menu$1.Portal, {
|
|
9859
9880
|
container,
|
|
9860
9881
|
children: /* @__PURE__ */ jsx(Menu$1.Positioner, {
|
|
9861
9882
|
align: "end",
|
|
9862
9883
|
sideOffset: 4,
|
|
9863
9884
|
ref,
|
|
9864
|
-
...
|
|
9885
|
+
...positionerProps,
|
|
9865
9886
|
children: /* @__PURE__ */ jsx(Menu$1.Popup, {
|
|
9887
|
+
...c13y,
|
|
9866
9888
|
"data-c13y-component": "menu-popover",
|
|
9867
9889
|
className: clsx$1("ds-menu__popup", className),
|
|
9868
9890
|
children,
|
|
@@ -10015,21 +10037,18 @@ var ModalHeader = forwardRef(function ModalHeader(props, ref) {
|
|
|
10015
10037
|
const { title, titleAddon, showCancelButton = false, cancelButtonText, onCancel, showHeaderButton = false, headerButtonIsGhost = true, onHeaderButtonClick, headerButtonText } = props;
|
|
10016
10038
|
let headerButton;
|
|
10017
10039
|
if (showHeaderButton && onHeaderButtonClick && headerButtonText) if (headerButtonIsGhost) headerButton = /* @__PURE__ */ jsx(GhostButton, {
|
|
10018
|
-
"data-c13y-purpose": "accept",
|
|
10019
10040
|
className: clsx$1("ds-modal__ghost-button--accept"),
|
|
10020
10041
|
variant: "primary",
|
|
10021
10042
|
onClick: () => onHeaderButtonClick(),
|
|
10022
10043
|
children: headerButtonText
|
|
10023
10044
|
});
|
|
10024
10045
|
else headerButton = /* @__PURE__ */ jsx(Button, {
|
|
10025
|
-
"data-c13y-purpose": "accept",
|
|
10026
10046
|
className: clsx$1("ds-modal__button--accept"),
|
|
10027
10047
|
variant: "primary",
|
|
10028
10048
|
onClick: () => onHeaderButtonClick(),
|
|
10029
10049
|
children: headerButtonText
|
|
10030
10050
|
});
|
|
10031
10051
|
return /* @__PURE__ */ jsxs("div", {
|
|
10032
|
-
"data-c13y-component": "modal-header",
|
|
10033
10052
|
className: clsx$1("ds-modal__header"),
|
|
10034
10053
|
ref,
|
|
10035
10054
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -10043,7 +10062,6 @@ var ModalHeader = forwardRef(function ModalHeader(props, ref) {
|
|
|
10043
10062
|
}), /* @__PURE__ */ jsxs("div", {
|
|
10044
10063
|
className: "ds-modal__header-buttons",
|
|
10045
10064
|
children: [!!headerButton && headerButton, showCancelButton && cancelButtonText && /* @__PURE__ */ jsx(IconGhostButton, {
|
|
10046
|
-
"data-c13y-purpose": "cancel",
|
|
10047
10065
|
className: clsx$1("ds-modal__ghost-button--cancel"),
|
|
10048
10066
|
variant: "secondary",
|
|
10049
10067
|
style: { padding: "10px" },
|
|
@@ -10057,7 +10075,6 @@ var ModalHeader = forwardRef(function ModalHeader(props, ref) {
|
|
|
10057
10075
|
fullWidth: true
|
|
10058
10076
|
}), /* @__PURE__ */ jsx("div", {
|
|
10059
10077
|
className: "ds-modal__header-content",
|
|
10060
|
-
"data-c13y-component": "modal-header-content",
|
|
10061
10078
|
"data-testid": "header-content-wrapper",
|
|
10062
10079
|
children: props.children
|
|
10063
10080
|
})] })]
|
|
@@ -10123,7 +10140,6 @@ function ModalContent(props) {
|
|
|
10123
10140
|
setScrollShadows(scroll, scrollContent.current);
|
|
10124
10141
|
}, [scroll]);
|
|
10125
10142
|
return /* @__PURE__ */ jsx("div", {
|
|
10126
|
-
"data-c13y-component": "modal-content",
|
|
10127
10143
|
className: clsx$1("ds-modal__inner-content", scroll && "ds-modal__inner-content--scroll"),
|
|
10128
10144
|
"data-testid": "main-content-wrapper",
|
|
10129
10145
|
ref: scrollContent,
|
|
@@ -10134,20 +10150,17 @@ function ModalContent(props) {
|
|
|
10134
10150
|
var ModalFooter = forwardRef(function ModalFooter(props, ref) {
|
|
10135
10151
|
const { cancelButtonText, onCancel, footerButtonText, footerButtonVariant, onFooterButtonClick, disableFooterButton } = props;
|
|
10136
10152
|
return footerButtonText && onFooterButtonClick ? /* @__PURE__ */ jsxs("div", {
|
|
10137
|
-
"data-c13y-component": "modal-footer",
|
|
10138
10153
|
className: clsx$1("ds-modal__footer"),
|
|
10139
10154
|
"data-testid": "footer",
|
|
10140
10155
|
ref,
|
|
10141
10156
|
children: [props.children, /* @__PURE__ */ jsxs("div", {
|
|
10142
10157
|
className: "ds-modal__footer-buttons",
|
|
10143
10158
|
children: [cancelButtonText && /* @__PURE__ */ jsx(Button, {
|
|
10144
|
-
"data-c13y-purpose": "cancel",
|
|
10145
10159
|
className: clsx$1("ds-modal__button--cancel"),
|
|
10146
10160
|
variant: "secondary",
|
|
10147
10161
|
onClick: () => onCancel(),
|
|
10148
10162
|
children: cancelButtonText
|
|
10149
10163
|
}), footerButtonText && onFooterButtonClick && /* @__PURE__ */ jsx(Button, {
|
|
10150
|
-
"data-c13y-purpose": "accept",
|
|
10151
10164
|
className: clsx$1("ds-modal__button--accept"),
|
|
10152
10165
|
variant: footerButtonVariant,
|
|
10153
10166
|
disabled: disableFooterButton,
|
|
@@ -10234,7 +10247,6 @@ function ModalDialog(props) {
|
|
|
10234
10247
|
children: /* @__PURE__ */ jsx(FloatingFocusManager, {
|
|
10235
10248
|
context,
|
|
10236
10249
|
children: /* @__PURE__ */ jsxs("div", {
|
|
10237
|
-
"data-c13y-component": "modal-dialog",
|
|
10238
10250
|
...getFloatingProps({
|
|
10239
10251
|
ref: refs.setFloating,
|
|
10240
10252
|
className: clsx$1("ds-modal-dialog", className)
|
|
@@ -10256,12 +10268,10 @@ function ModalDialog(props) {
|
|
|
10256
10268
|
className: "ds-modal-dialog__content",
|
|
10257
10269
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
10258
10270
|
variant: confirmButtonVariant,
|
|
10259
|
-
"data-c13y-purpose": "accept",
|
|
10260
10271
|
onClick: onConfirm,
|
|
10261
10272
|
children: confirmButtonText
|
|
10262
10273
|
}), /* @__PURE__ */ jsx(Button, {
|
|
10263
10274
|
variant: "secondary",
|
|
10264
|
-
"data-c13y-purpose": "cancel",
|
|
10265
10275
|
onClick: onCancel,
|
|
10266
10276
|
children: cancelButtonText
|
|
10267
10277
|
})]
|
|
@@ -10508,6 +10518,7 @@ var Input$2 = forwardRef((props, ref) => {
|
|
|
10508
10518
|
});
|
|
10509
10519
|
var Popup$2 = forwardRef((props, ref) => {
|
|
10510
10520
|
const { className, children, container, ...rest } = props;
|
|
10521
|
+
const { c13y, rest: positionerProps } = splitC13yProps(rest);
|
|
10511
10522
|
const { containerRef } = useSearchableMultiSelectContext();
|
|
10512
10523
|
return /* @__PURE__ */ jsx(Combobox.Portal, {
|
|
10513
10524
|
container,
|
|
@@ -10515,8 +10526,9 @@ var Popup$2 = forwardRef((props, ref) => {
|
|
|
10515
10526
|
ref,
|
|
10516
10527
|
sideOffset: 4,
|
|
10517
10528
|
anchor: containerRef,
|
|
10518
|
-
...
|
|
10529
|
+
...positionerProps,
|
|
10519
10530
|
children: /* @__PURE__ */ jsx(Combobox.Popup, {
|
|
10531
|
+
...c13y,
|
|
10520
10532
|
"data-c13y-component": "searchable-multi-select-popover",
|
|
10521
10533
|
className: clsx$1("ds-searchable-multi-select__popup", className),
|
|
10522
10534
|
children,
|
|
@@ -10698,13 +10710,15 @@ var Input$1 = forwardRef((props, ref) => {
|
|
|
10698
10710
|
});
|
|
10699
10711
|
var Popup$1 = forwardRef((props, ref) => {
|
|
10700
10712
|
const { className, children, container, ...rest } = props;
|
|
10713
|
+
const { c13y, rest: positionerProps } = splitC13yProps(rest);
|
|
10701
10714
|
return /* @__PURE__ */ jsx(Combobox.Portal, {
|
|
10702
10715
|
container,
|
|
10703
10716
|
children: /* @__PURE__ */ jsx(Combobox.Positioner, {
|
|
10704
10717
|
sideOffset: 5,
|
|
10705
10718
|
ref,
|
|
10706
|
-
...
|
|
10719
|
+
...positionerProps,
|
|
10707
10720
|
children: /* @__PURE__ */ jsx(Combobox.Popup, {
|
|
10721
|
+
...c13y,
|
|
10708
10722
|
"data-c13y-component": "searchable-single-select-popover",
|
|
10709
10723
|
className: clsx$1("ds-searchable-single-select__popup", className),
|
|
10710
10724
|
children,
|
|
@@ -10824,13 +10838,15 @@ var Trigger$2 = forwardRef((props, ref) => {
|
|
|
10824
10838
|
});
|
|
10825
10839
|
var Popup = forwardRef((props, ref) => {
|
|
10826
10840
|
const { className, children, container, ...rest } = props;
|
|
10841
|
+
const { c13y, rest: positionerProps } = splitC13yProps(rest);
|
|
10827
10842
|
return /* @__PURE__ */ jsx(Select$1.Portal, {
|
|
10828
10843
|
container,
|
|
10829
10844
|
children: /* @__PURE__ */ jsx(Select$1.Positioner, {
|
|
10830
10845
|
alignItemWithTrigger: false,
|
|
10831
10846
|
ref,
|
|
10832
|
-
...
|
|
10847
|
+
...positionerProps,
|
|
10833
10848
|
children: /* @__PURE__ */ jsx(Select$1.Popup, {
|
|
10849
|
+
...c13y,
|
|
10834
10850
|
"data-c13y-component": "select-popover",
|
|
10835
10851
|
className: clsx$1("ds-select__popup", className),
|
|
10836
10852
|
children,
|
|
@@ -10990,12 +11006,10 @@ function SingleSelect(props) {
|
|
|
10990
11006
|
const errorOrDescription = useMemo(() => {
|
|
10991
11007
|
if (error !== void 0 && error !== "") return /* @__PURE__ */ jsxs("div", {
|
|
10992
11008
|
className: "ds-single-select__error",
|
|
10993
|
-
"data-c13y-component": "single-select-error",
|
|
10994
11009
|
children: [/* @__PURE__ */ jsx(AlertIcon_default, {}), error]
|
|
10995
11010
|
});
|
|
10996
11011
|
if (description !== void 0 && description !== "") return /* @__PURE__ */ jsx("span", {
|
|
10997
11012
|
className: "ds-single-select__description",
|
|
10998
|
-
"data-c13y-component": "single-select-description",
|
|
10999
11013
|
children: description
|
|
11000
11014
|
});
|
|
11001
11015
|
return null;
|
|
@@ -11006,7 +11020,6 @@ function SingleSelect(props) {
|
|
|
11006
11020
|
const dropdownContent = useMemo(() => {
|
|
11007
11021
|
if (loading) return /* @__PURE__ */ jsx("div", {
|
|
11008
11022
|
className: "ds-single-select__loader",
|
|
11009
|
-
"data-c13y-component": "single-select-loader",
|
|
11010
11023
|
children: /* @__PURE__ */ jsx(LoadingSpinner, {
|
|
11011
11024
|
size: 24,
|
|
11012
11025
|
"aria-label": "Loading select options..."
|
|
@@ -11014,19 +11027,15 @@ function SingleSelect(props) {
|
|
|
11014
11027
|
});
|
|
11015
11028
|
if (options.length === 0 && emptyResultText !== void 0 && emptyResultText !== "") return /* @__PURE__ */ jsx("span", {
|
|
11016
11029
|
className: "ds-single-select__no-results",
|
|
11017
|
-
"data-c13y-component": "single-select-empty",
|
|
11018
11030
|
children: emptyResultText
|
|
11019
11031
|
});
|
|
11020
11032
|
const getLabel = (option) => /* @__PURE__ */ jsxs("span", {
|
|
11021
11033
|
className: "ds-single-select__option-text",
|
|
11022
|
-
"data-c13y-component": "single-select-option-text",
|
|
11023
11034
|
children: [/* @__PURE__ */ jsx("span", {
|
|
11024
|
-
"data-c13y-component": "single-select-label",
|
|
11025
11035
|
className: clsx$1("ds-single-select__option-label", value?.id === option.id && "ds-single-select__option-label--selected"),
|
|
11026
11036
|
...getItemProps({ id: `${listId}-option-${option.id}-label` }),
|
|
11027
11037
|
children: optionLabel(option)
|
|
11028
11038
|
}), typeof optionDescription === "function" && optionDescription(option) !== void 0 && /* @__PURE__ */ jsx("div", {
|
|
11029
|
-
"data-c13y-component": "single-select-option-description",
|
|
11030
11039
|
className: clsx$1("ds-single-select__option-description", value?.id === option.id && "ds-single-select__option-description--selected"),
|
|
11031
11040
|
...getItemProps({ id: `${listId}-option-${option.id}-description` }),
|
|
11032
11041
|
"aria-hidden": true,
|
|
@@ -11034,7 +11043,6 @@ function SingleSelect(props) {
|
|
|
11034
11043
|
})]
|
|
11035
11044
|
});
|
|
11036
11045
|
return options.map((option, index) => /* @__PURE__ */ jsx("div", {
|
|
11037
|
-
"data-c13y-component": "single-select-option",
|
|
11038
11046
|
...getItemProps({
|
|
11039
11047
|
onClick: () => {
|
|
11040
11048
|
onChange(option);
|
|
@@ -11083,7 +11091,6 @@ function SingleSelect(props) {
|
|
|
11083
11091
|
})]
|
|
11084
11092
|
}),
|
|
11085
11093
|
variantProps.searchable ? /* @__PURE__ */ jsxs("div", {
|
|
11086
|
-
"data-c13y-component": "single-select",
|
|
11087
11094
|
className: clsx$1("ds-single-select__input-wrapper", disabled && "ds-single-select__input-wrapper--disabled", error && "ds-single-select__input-wrapper--error"),
|
|
11088
11095
|
ref: refs.setReference,
|
|
11089
11096
|
onClick: handleWrapperClick,
|
|
@@ -11120,7 +11127,6 @@ function SingleSelect(props) {
|
|
|
11120
11127
|
})
|
|
11121
11128
|
]
|
|
11122
11129
|
}) : /* @__PURE__ */ jsxs("button", {
|
|
11123
|
-
"data-c13y-component": "single-select",
|
|
11124
11130
|
className: clsx$1("ds-single-select__trigger", error !== void 0 && error !== "" && "ds-single-select__trigger--error", disabled && "ds-single-select__trigger--disabled"),
|
|
11125
11131
|
...getReferenceProps({
|
|
11126
11132
|
disabled,
|
|
@@ -11169,7 +11175,6 @@ function SingleSelect(props) {
|
|
|
11169
11175
|
"aria-labelledby": ariaLabelledBy || labelId
|
|
11170
11176
|
}),
|
|
11171
11177
|
ref: floatingRef,
|
|
11172
|
-
"data-c13y-component": "single-select-dropdown",
|
|
11173
11178
|
className: clsx$1("ds-single-select__dropdown"),
|
|
11174
11179
|
children: /* @__PURE__ */ jsx("div", { children: dropdownContent })
|
|
11175
11180
|
}) }) : null] });
|
|
@@ -11318,13 +11323,11 @@ function TextAreaDeprecated(props) {
|
|
|
11318
11323
|
if (handleValueChange) handleValueChange(event);
|
|
11319
11324
|
}, [handleValueChange]);
|
|
11320
11325
|
return /* @__PURE__ */ jsxs("div", {
|
|
11321
|
-
"data-c13y-component": "text-area-deprecated",
|
|
11322
11326
|
className: clsx$1("ds-text-area__container", className),
|
|
11323
11327
|
children: [
|
|
11324
11328
|
/* @__PURE__ */ jsxs("label", {
|
|
11325
11329
|
className: "ds-text-area__label",
|
|
11326
11330
|
htmlFor: id,
|
|
11327
|
-
"data-c13y-component": "text-area-deprecated-label",
|
|
11328
11331
|
children: [label, requiredLabel && /* @__PURE__ */ jsx("span", {
|
|
11329
11332
|
className: "ds-text-area__label-required",
|
|
11330
11333
|
"aria-hidden": true,
|
|
@@ -11333,7 +11336,6 @@ function TextAreaDeprecated(props) {
|
|
|
11333
11336
|
}),
|
|
11334
11337
|
/* @__PURE__ */ jsx("textarea", {
|
|
11335
11338
|
className: clsx$1("ds-text-area__input", resizable && "resizable", errorMessage && "ds-text-area__input--error"),
|
|
11336
|
-
"data-c13y-component": "text-area-deprecated-input",
|
|
11337
11339
|
dir: "auto",
|
|
11338
11340
|
id,
|
|
11339
11341
|
name: inputId ?? label,
|
|
@@ -11348,24 +11350,20 @@ function TextAreaDeprecated(props) {
|
|
|
11348
11350
|
}),
|
|
11349
11351
|
/* @__PURE__ */ jsxs("div", {
|
|
11350
11352
|
className: "ds-text-area__footer",
|
|
11351
|
-
"data-c13y-component": "text-area-deprecated-footer",
|
|
11352
11353
|
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
|
|
11353
11354
|
id: errorId,
|
|
11354
11355
|
"aria-live": errorAriaLive,
|
|
11355
11356
|
"aria-atomic": "true",
|
|
11356
11357
|
children: errorMessage && /* @__PURE__ */ jsxs("span", {
|
|
11357
11358
|
className: "ds-text-area__error",
|
|
11358
|
-
"data-c13y-component": "text-area-deprecated-error",
|
|
11359
11359
|
children: [/* @__PURE__ */ jsx(AlertIcon_default, {}), errorMessage]
|
|
11360
11360
|
})
|
|
11361
11361
|
}), description && /* @__PURE__ */ jsx("p", {
|
|
11362
11362
|
className: "ds-text-area__description",
|
|
11363
11363
|
id: descriptionId,
|
|
11364
|
-
"data-c13y-component": "text-area-deprecated-description",
|
|
11365
11364
|
children: description
|
|
11366
11365
|
})] }), limit && /* @__PURE__ */ jsxs("span", {
|
|
11367
11366
|
className: "ds-text-area__counter",
|
|
11368
|
-
"data-c13y-component": "text-area-deprecated-counter",
|
|
11369
11367
|
children: [
|
|
11370
11368
|
count,
|
|
11371
11369
|
"/",
|
|
@@ -11414,13 +11412,11 @@ var TextInput = forwardRef(function TextInput(props, ref) {
|
|
|
11414
11412
|
const inputRef = useRef(null);
|
|
11415
11413
|
if (!ref) ref = inputRef;
|
|
11416
11414
|
return /* @__PURE__ */ jsxs("div", {
|
|
11417
|
-
"data-c13y-component": "text-input",
|
|
11418
11415
|
className: clsx$1("ds-text-input__container", errorMessage ? "ds-text-input__container--error" : `ds-text-input__container--${variant}`, restProps.disabled && "ds-text-input__container--disabled", className),
|
|
11419
11416
|
children: [
|
|
11420
11417
|
/* @__PURE__ */ jsxs("label", {
|
|
11421
11418
|
className: "ds-text-input__label",
|
|
11422
11419
|
htmlFor: inputId,
|
|
11423
|
-
"data-c13y-component": "text-input-label",
|
|
11424
11420
|
children: [label, requiredLabel && /* @__PURE__ */ jsx("span", {
|
|
11425
11421
|
className: "ds-text-input__label-required",
|
|
11426
11422
|
"aria-hidden": true,
|
|
@@ -11429,7 +11425,6 @@ var TextInput = forwardRef(function TextInput(props, ref) {
|
|
|
11429
11425
|
}),
|
|
11430
11426
|
/* @__PURE__ */ jsxs("div", {
|
|
11431
11427
|
className: "ds-text-input__base-wrapper",
|
|
11432
|
-
"data-c13y-component": "text-input-container",
|
|
11433
11428
|
style: { width },
|
|
11434
11429
|
onClick: () => ref && "current" in ref && ref.current?.focus(),
|
|
11435
11430
|
role: "none",
|
|
@@ -11439,7 +11434,6 @@ var TextInput = forwardRef(function TextInput(props, ref) {
|
|
|
11439
11434
|
children: icon
|
|
11440
11435
|
}),
|
|
11441
11436
|
/* @__PURE__ */ jsx("input", {
|
|
11442
|
-
"data-c13y-component": "text-input-input",
|
|
11443
11437
|
className: "ds-text-input__base-input",
|
|
11444
11438
|
"aria-invalid": !!errorMessage,
|
|
11445
11439
|
id: inputId,
|
|
@@ -11459,7 +11453,6 @@ var TextInput = forwardRef(function TextInput(props, ref) {
|
|
|
11459
11453
|
errorMessage && /* @__PURE__ */ jsxs("div", {
|
|
11460
11454
|
className: "ds-text-input__error",
|
|
11461
11455
|
id: inputErrorId,
|
|
11462
|
-
"data-c13y-component": "text-input-error",
|
|
11463
11456
|
children: [/* @__PURE__ */ jsx("span", {
|
|
11464
11457
|
className: "ds-text-input__error-icon",
|
|
11465
11458
|
children: /* @__PURE__ */ jsx(AlertIcon_default, {})
|
|
@@ -11468,7 +11461,6 @@ var TextInput = forwardRef(function TextInput(props, ref) {
|
|
|
11468
11461
|
description && /* @__PURE__ */ jsx("div", {
|
|
11469
11462
|
className: clsx$1("ds-text-input__description"),
|
|
11470
11463
|
id: inputDescriptionId,
|
|
11471
|
-
"data-c13y-component": "text-input-description",
|
|
11472
11464
|
children: description
|
|
11473
11465
|
})
|
|
11474
11466
|
]
|
|
@@ -11484,7 +11476,6 @@ function Toggle(props) {
|
|
|
11484
11476
|
const descriptionId = `toggle-${id}-descr`;
|
|
11485
11477
|
const inputId = `toggle-${id}-label`;
|
|
11486
11478
|
return /* @__PURE__ */ jsxs("div", {
|
|
11487
|
-
"data-c13y-component": "toggle",
|
|
11488
11479
|
className: clsx$1("ds-toggle__container", disabled && "ds-toggle__container--disabled", spaceBetween ? "ds-toggle__container--full-width" : "ds-toggle__container--content-width", className),
|
|
11489
11480
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
11490
11481
|
className: clsx$1("ds-toggle__wrapper"),
|
|
@@ -11493,13 +11484,11 @@ function Toggle(props) {
|
|
|
11493
11484
|
className: clsx$1("ds-toggle__label-container"),
|
|
11494
11485
|
children: /* @__PURE__ */ jsx("label", {
|
|
11495
11486
|
className: clsx$1("ds-toggle__label"),
|
|
11496
|
-
"data-c13y-component": "toggle-label",
|
|
11497
11487
|
htmlFor: inputId,
|
|
11498
11488
|
children: label
|
|
11499
11489
|
})
|
|
11500
11490
|
}),
|
|
11501
11491
|
/* @__PURE__ */ jsx("input", {
|
|
11502
|
-
"data-c13y-component": "toggle-input",
|
|
11503
11492
|
className: "ds-toggle",
|
|
11504
11493
|
name,
|
|
11505
11494
|
type: "checkbox",
|
|
@@ -11512,7 +11501,6 @@ function Toggle(props) {
|
|
|
11512
11501
|
}),
|
|
11513
11502
|
/* @__PURE__ */ jsxs("div", {
|
|
11514
11503
|
className: clsx$1("ds-toggle__switch-wrapper"),
|
|
11515
|
-
"data-c13y-component": "toggle-switch",
|
|
11516
11504
|
children: [
|
|
11517
11505
|
/* @__PURE__ */ jsx(CheckIcon_default, {
|
|
11518
11506
|
"aria-hidden": "true",
|
|
@@ -11528,7 +11516,6 @@ function Toggle(props) {
|
|
|
11528
11516
|
]
|
|
11529
11517
|
}), description && /* @__PURE__ */ jsx("p", {
|
|
11530
11518
|
className: clsx$1("ds-toggle__description"),
|
|
11531
|
-
"data-c13y-component": "toggle-description",
|
|
11532
11519
|
id: descriptionId,
|
|
11533
11520
|
children: description
|
|
11534
11521
|
})]
|
|
@@ -11567,6 +11554,7 @@ var Tooltip = {
|
|
|
11567
11554
|
Content: forwardRef((props, ref) => {
|
|
11568
11555
|
const context = useContext(TooltipContext);
|
|
11569
11556
|
const { className, children, variant = "default", is = "description", container, ...rest } = props;
|
|
11557
|
+
const { c13y, rest: positionerProps } = splitC13yProps(rest);
|
|
11570
11558
|
useEffect(() => {
|
|
11571
11559
|
if (context) context.setIs(is);
|
|
11572
11560
|
}, [is, context]);
|
|
@@ -11574,8 +11562,9 @@ var Tooltip = {
|
|
|
11574
11562
|
container,
|
|
11575
11563
|
children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
|
|
11576
11564
|
sideOffset: 4,
|
|
11577
|
-
...
|
|
11565
|
+
...positionerProps,
|
|
11578
11566
|
children: /* @__PURE__ */ jsx(Tooltip$1.Popup, {
|
|
11567
|
+
...c13y,
|
|
11579
11568
|
"data-c13y-component": "tooltip-popover",
|
|
11580
11569
|
className: clsx$1(`ds-tooltip--${variant}`, "ds-tooltip", className),
|
|
11581
11570
|
id: context?.id,
|
|
@@ -11646,7 +11635,6 @@ function TooltipDeprecated(props) {
|
|
|
11646
11635
|
...styles
|
|
11647
11636
|
}
|
|
11648
11637
|
}),
|
|
11649
|
-
"data-c13y-component": "tooltip-deprecated",
|
|
11650
11638
|
className: clsx("ds-tooltip-deprecated", className),
|
|
11651
11639
|
children: content
|
|
11652
11640
|
}) : null] });
|