@norges-domstoler/dds-components 21.18.0 → 21.19.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/index.css +76 -46
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +40 -29
- package/dist/index.d.ts +40 -29
- package/dist/index.js +168 -109
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +215 -156
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1052,6 +1052,7 @@ var layout_default = {
|
|
|
1052
1052
|
"dds-o-y": "layout_dds-o-y",
|
|
1053
1053
|
"dds-display": "layout_dds-display",
|
|
1054
1054
|
"dds-text-align": "layout_dds-text-align",
|
|
1055
|
+
"dds-word-break": "layout_dds-word-break",
|
|
1055
1056
|
"dds-flex-dir": "layout_dds-flex-dir",
|
|
1056
1057
|
"dds-gap": "layout_dds-gap",
|
|
1057
1058
|
"dds-c-gap": "layout_dds-c-gap",
|
|
@@ -4980,7 +4981,6 @@ function convertBooleanishToBoolean(value) {
|
|
|
4980
4981
|
// src/components/InputMessage/InputMessage.module.css
|
|
4981
4982
|
var InputMessage_default = {
|
|
4982
4983
|
container: "InputMessage_container",
|
|
4983
|
-
"container--error": "InputMessage_container--error",
|
|
4984
4984
|
icon: "InputMessage_icon"
|
|
4985
4985
|
};
|
|
4986
4986
|
|
|
@@ -4996,41 +4996,72 @@ var InputMessage = ({
|
|
|
4996
4996
|
...rest
|
|
4997
4997
|
}) => {
|
|
4998
4998
|
const isError = messageType === "error";
|
|
4999
|
-
|
|
5000
|
-
"
|
|
4999
|
+
const commonProps = {
|
|
5000
|
+
display: "flex",
|
|
5001
|
+
width: "fit-content",
|
|
5002
|
+
maxWidth: "100%",
|
|
5003
|
+
wordBreak: "break-word",
|
|
5004
|
+
...getBaseHTMLProps(id, cn(className, InputMessage_default.container), htmlProps, rest)
|
|
5005
|
+
};
|
|
5006
|
+
const tgCommonProps = {
|
|
5007
|
+
as: "span",
|
|
5008
|
+
children: message != null ? message : children
|
|
5009
|
+
};
|
|
5010
|
+
return isError ? /* @__PURE__ */ jsxs34(
|
|
5011
|
+
Paper,
|
|
5001
5012
|
{
|
|
5002
|
-
...
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
),
|
|
5013
|
+
...commonProps,
|
|
5014
|
+
gap: "x0.25",
|
|
5015
|
+
padding: "x0.25 x0.5",
|
|
5016
|
+
background: "surface-danger-default",
|
|
5017
|
+
borderRadius: "surface",
|
|
5008
5018
|
children: [
|
|
5009
|
-
|
|
5019
|
+
/* @__PURE__ */ jsx213(
|
|
5020
|
+
Icon,
|
|
5021
|
+
{
|
|
5022
|
+
icon: ErrorIcon,
|
|
5023
|
+
iconSize: "small",
|
|
5024
|
+
className: InputMessage_default.icon,
|
|
5025
|
+
color: "icon-on-danger-default"
|
|
5026
|
+
}
|
|
5027
|
+
),
|
|
5010
5028
|
/* @__PURE__ */ jsx213(
|
|
5011
5029
|
Typography,
|
|
5012
5030
|
{
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
children: message != null ? message : children
|
|
5031
|
+
...tgCommonProps,
|
|
5032
|
+
typographyType: "bodySmall",
|
|
5033
|
+
color: "textDefault"
|
|
5017
5034
|
}
|
|
5018
5035
|
)
|
|
5019
5036
|
]
|
|
5020
5037
|
}
|
|
5021
|
-
)
|
|
5038
|
+
) : /* @__PURE__ */ jsx213(Box, { ...commonProps, children: /* @__PURE__ */ jsx213(
|
|
5039
|
+
Typography,
|
|
5040
|
+
{
|
|
5041
|
+
...tgCommonProps,
|
|
5042
|
+
typographyType: "bodyXsmall",
|
|
5043
|
+
color: "textSubtle"
|
|
5044
|
+
}
|
|
5045
|
+
) });
|
|
5022
5046
|
};
|
|
5023
5047
|
InputMessage.displayName = "InputMessage";
|
|
5024
|
-
var renderInputMessage = (
|
|
5025
|
-
|
|
5048
|
+
var renderInputMessage = ({
|
|
5049
|
+
tip,
|
|
5050
|
+
tipId,
|
|
5051
|
+
errorMessage,
|
|
5052
|
+
errorMessageId,
|
|
5053
|
+
noSpacing
|
|
5054
|
+
}) => /* @__PURE__ */ jsxs34(Fragment4, { children: [
|
|
5055
|
+
errorMessage && /* @__PURE__ */ jsx213(
|
|
5026
5056
|
InputMessage,
|
|
5027
5057
|
{
|
|
5028
5058
|
message: errorMessage,
|
|
5029
5059
|
messageType: "error",
|
|
5030
|
-
id: errorMessageId
|
|
5060
|
+
id: errorMessageId,
|
|
5061
|
+
marginBlock: !noSpacing ? "x0.125 0" : void 0
|
|
5031
5062
|
}
|
|
5032
5063
|
),
|
|
5033
|
-
tip &&
|
|
5064
|
+
tip && !errorMessage && /* @__PURE__ */ jsx213(InputMessage, { message: tip, messageType: "tip", id: tipId })
|
|
5034
5065
|
] });
|
|
5035
5066
|
|
|
5036
5067
|
// src/components/SelectionControl/Checkbox/CheckboxGroup.tsx
|
|
@@ -5082,7 +5113,7 @@ var CheckboxGroup = (props) => {
|
|
|
5082
5113
|
readOnly,
|
|
5083
5114
|
showRequiredStyling
|
|
5084
5115
|
}),
|
|
5085
|
-
renderInputMessage(tip, tipId),
|
|
5116
|
+
renderInputMessage({ tip, tipId }),
|
|
5086
5117
|
/* @__PURE__ */ jsx214(CheckboxGroupContext, { value: { ...contextProps }, children: /* @__PURE__ */ jsx214(
|
|
5087
5118
|
"div",
|
|
5088
5119
|
{
|
|
@@ -5093,7 +5124,7 @@ var CheckboxGroup = (props) => {
|
|
|
5093
5124
|
children
|
|
5094
5125
|
}
|
|
5095
5126
|
) }),
|
|
5096
|
-
renderInputMessage(
|
|
5127
|
+
renderInputMessage({ errorMessage, errorMessageId })
|
|
5097
5128
|
]
|
|
5098
5129
|
}
|
|
5099
5130
|
);
|
|
@@ -5274,7 +5305,7 @@ var RadioButtonGroup = ({
|
|
|
5274
5305
|
readOnly,
|
|
5275
5306
|
showRequiredStyling
|
|
5276
5307
|
}),
|
|
5277
|
-
renderInputMessage(tip, tipId),
|
|
5308
|
+
renderInputMessage({ tip, tipId }),
|
|
5278
5309
|
/* @__PURE__ */ jsx216(RadioButtonGroupContext, { value: { ...contextProps }, children: /* @__PURE__ */ jsx216(
|
|
5279
5310
|
"div",
|
|
5280
5311
|
{
|
|
@@ -5286,7 +5317,7 @@ var RadioButtonGroup = ({
|
|
|
5286
5317
|
children
|
|
5287
5318
|
}
|
|
5288
5319
|
) }),
|
|
5289
|
-
renderInputMessage(
|
|
5320
|
+
renderInputMessage({ errorMessage, errorMessageId })
|
|
5290
5321
|
]
|
|
5291
5322
|
}
|
|
5292
5323
|
);
|
|
@@ -5436,7 +5467,7 @@ var CardSelectableGroup = ({
|
|
|
5436
5467
|
);
|
|
5437
5468
|
return hasErrorMessage ? /* @__PURE__ */ jsxs38("div", { children: [
|
|
5438
5469
|
mainContent,
|
|
5439
|
-
renderInputMessage(
|
|
5470
|
+
renderInputMessage({ errorMessage, errorMessageId })
|
|
5440
5471
|
] }) : mainContent;
|
|
5441
5472
|
};
|
|
5442
5473
|
CardSelectableGroup.displayName = "CardSelectableGroup";
|
|
@@ -5702,9 +5733,8 @@ var DateInput_default = {
|
|
|
5702
5733
|
"segment__placeholder--invisible": "DateInput_segment__placeholder--invisible",
|
|
5703
5734
|
"clear-button": "DateInput_clear-button",
|
|
5704
5735
|
"clear-button--inactive": "DateInput_clear-button--inactive",
|
|
5705
|
-
icon: "DateInput_icon",
|
|
5706
|
-
"popover-button": "DateInput_popover-button",
|
|
5707
5736
|
"icon-wrapper--disabled": "DateInput_icon-wrapper--disabled",
|
|
5737
|
+
"popover-button": "DateInput_popover-button",
|
|
5708
5738
|
"icon-wrapper--readonly": "DateInput_icon-wrapper--readonly",
|
|
5709
5739
|
"popover-button--readonly": "DateInput_popover-button--readonly",
|
|
5710
5740
|
popover: "DateInput_popover",
|
|
@@ -6258,7 +6288,7 @@ var texts7 = createTexts({
|
|
|
6258
6288
|
import { useDatePicker } from "@react-aria/datepicker";
|
|
6259
6289
|
import { I18nProvider } from "@react-aria/i18n";
|
|
6260
6290
|
import { useDatePickerState } from "@react-stately/datepicker";
|
|
6261
|
-
import { useRef as useRef17 } from "react";
|
|
6291
|
+
import { useId as useId10, useRef as useRef17 } from "react";
|
|
6262
6292
|
|
|
6263
6293
|
// src/components/date-inputs/DatePicker/DateField/DateField.tsx
|
|
6264
6294
|
import {
|
|
@@ -6298,6 +6328,36 @@ var InlineIconButton = ({
|
|
|
6298
6328
|
);
|
|
6299
6329
|
InlineIconButton.displayName = "InlineIconButton";
|
|
6300
6330
|
|
|
6331
|
+
// src/components/helpers/Input/Input.module.css
|
|
6332
|
+
var Input_default = {
|
|
6333
|
+
container: "Input_container",
|
|
6334
|
+
"input-group": "Input_input-group",
|
|
6335
|
+
input: "Input_input",
|
|
6336
|
+
disabled: "Input_disabled",
|
|
6337
|
+
"read-only": "Input_read-only",
|
|
6338
|
+
"input--stateful": "Input_input--stateful",
|
|
6339
|
+
"input--hover": "Input_input--hover",
|
|
6340
|
+
"input--stateful-danger": "Input_input--stateful-danger",
|
|
6341
|
+
"input--large": "Input_input--large",
|
|
6342
|
+
"input--medium": "Input_input--medium",
|
|
6343
|
+
"input--small": "Input_input--small",
|
|
6344
|
+
"input--xsmall": "Input_input--xsmall",
|
|
6345
|
+
"input-with-icon--large": "Input_input-with-icon--large",
|
|
6346
|
+
"input-with-icon--medium": "Input_input-with-icon--medium",
|
|
6347
|
+
"input-with-icon--small": "Input_input-with-icon--small",
|
|
6348
|
+
"input-with-icon--xsmall": "Input_input-with-icon--xsmall",
|
|
6349
|
+
"input-with-el-right--large": "Input_input-with-el-right--large",
|
|
6350
|
+
"input-with-el-right--medium": "Input_input-with-el-right--medium",
|
|
6351
|
+
"input-with-el-right--small": "Input_input-with-el-right--small",
|
|
6352
|
+
"input-with-el-right--xsmall": "Input_input-with-el-right--xsmall",
|
|
6353
|
+
"input--with-affix": "Input_input--with-affix",
|
|
6354
|
+
"input-group__absolute-el": "Input_input-group__absolute-el",
|
|
6355
|
+
"input-group__absolute-el--large": "Input_input-group__absolute-el--large",
|
|
6356
|
+
"input-group__absolute-el--medium": "Input_input-group__absolute-el--medium",
|
|
6357
|
+
"input-group__absolute-el--small": "Input_input-group__absolute-el--small",
|
|
6358
|
+
"input-group__absolute-el--xsmall": "Input_input-group__absolute-el--xsmall"
|
|
6359
|
+
};
|
|
6360
|
+
|
|
6301
6361
|
// src/components/date-inputs/DatePicker/DateField/CalendarButton.tsx
|
|
6302
6362
|
import { jsx as jsx230 } from "react/jsx-runtime";
|
|
6303
6363
|
function CalendarButton({
|
|
@@ -6317,7 +6377,9 @@ function CalendarButton({
|
|
|
6317
6377
|
buttonProps.className,
|
|
6318
6378
|
DateInput_default["popover-button"],
|
|
6319
6379
|
isReadOnly && DateInput_default["popover-button--readonly"],
|
|
6320
|
-
!props.isDisabled && focusable
|
|
6380
|
+
!props.isDisabled && focusable,
|
|
6381
|
+
Input_default["input-group__absolute-el"],
|
|
6382
|
+
Input_default[`input-group__absolute-el--${componentSize}`]
|
|
6321
6383
|
),
|
|
6322
6384
|
icon: CalendarIcon,
|
|
6323
6385
|
size: getFormInputIconSize(componentSize)
|
|
@@ -6394,7 +6456,9 @@ var typographyTypes = {
|
|
|
6394
6456
|
function DateSegment({
|
|
6395
6457
|
segment,
|
|
6396
6458
|
state,
|
|
6397
|
-
componentSize
|
|
6459
|
+
componentSize,
|
|
6460
|
+
errorMessageId,
|
|
6461
|
+
tipId
|
|
6398
6462
|
}) {
|
|
6399
6463
|
const ref = useRef14(null);
|
|
6400
6464
|
const { segmentProps } = useDateSegment(segment, state, ref);
|
|
@@ -6402,6 +6466,10 @@ function DateSegment({
|
|
|
6402
6466
|
"div",
|
|
6403
6467
|
{
|
|
6404
6468
|
...segmentProps,
|
|
6469
|
+
"aria-describedby": spaceSeparatedIdListGenerator([
|
|
6470
|
+
errorMessageId ? errorMessageId : void 0,
|
|
6471
|
+
tipId ? tipId : void 0
|
|
6472
|
+
]),
|
|
6405
6473
|
ref,
|
|
6406
6474
|
className: cn(
|
|
6407
6475
|
segmentProps.className,
|
|
@@ -6452,23 +6520,6 @@ ClearButton.displayName = "ClearButton";
|
|
|
6452
6520
|
// src/components/date-inputs/common/DateInput.tsx
|
|
6453
6521
|
import { useContext as useContext12 } from "react";
|
|
6454
6522
|
|
|
6455
|
-
// src/components/helpers/Input/Input.module.css
|
|
6456
|
-
var Input_default = {
|
|
6457
|
-
container: "Input_container",
|
|
6458
|
-
"input-group": "Input_input-group",
|
|
6459
|
-
input: "Input_input",
|
|
6460
|
-
disabled: "Input_disabled",
|
|
6461
|
-
"read-only": "Input_read-only",
|
|
6462
|
-
"input--stateful": "Input_input--stateful",
|
|
6463
|
-
"input--hover": "Input_input--hover",
|
|
6464
|
-
"input--stateful-danger": "Input_input--stateful-danger",
|
|
6465
|
-
"input--medium": "Input_input--medium",
|
|
6466
|
-
"input--small": "Input_input--small",
|
|
6467
|
-
"input--xsmall": "Input_input--xsmall",
|
|
6468
|
-
"input--with-affix": "Input_input--with-affix",
|
|
6469
|
-
"input-group__absolute-element": "Input_input-group__absolute-element"
|
|
6470
|
-
};
|
|
6471
|
-
|
|
6472
6523
|
// src/components/helpers/Input/Input.tsx
|
|
6473
6524
|
import { jsx as jsx233 } from "react/jsx-runtime";
|
|
6474
6525
|
var Input = ({
|
|
@@ -6552,12 +6603,11 @@ function DateInput({
|
|
|
6552
6603
|
clearable,
|
|
6553
6604
|
ref,
|
|
6554
6605
|
afterLabelContent,
|
|
6606
|
+
tipId,
|
|
6607
|
+
errorMessageId,
|
|
6555
6608
|
...props
|
|
6556
6609
|
}) {
|
|
6557
|
-
var _a;
|
|
6558
6610
|
const hasErrorMessage = !!errorMessage;
|
|
6559
|
-
const hasTip = !!tip;
|
|
6560
|
-
const hasMessage = hasErrorMessage || hasTip;
|
|
6561
6611
|
const { isOpen } = useContext12(CalendarPopoverContext);
|
|
6562
6612
|
return /* @__PURE__ */ jsxs46(
|
|
6563
6613
|
"div",
|
|
@@ -6583,6 +6633,7 @@ function DateInput({
|
|
|
6583
6633
|
Input_default["input--stateful"],
|
|
6584
6634
|
Input_default["input--hover"],
|
|
6585
6635
|
Input_default[`input--${componentSize}`],
|
|
6636
|
+
Input_default[`input-with-icon--${componentSize}`],
|
|
6586
6637
|
hasErrorMessage && Input_default["input--stateful-danger"],
|
|
6587
6638
|
DateInput_default["date-input"],
|
|
6588
6639
|
clearable && DateInput_default[`date-input--${componentSize}--clearable`],
|
|
@@ -6609,13 +6660,7 @@ function DateInput({
|
|
|
6609
6660
|
]
|
|
6610
6661
|
}
|
|
6611
6662
|
),
|
|
6612
|
-
|
|
6613
|
-
InputMessage,
|
|
6614
|
-
{
|
|
6615
|
-
messageType: hasErrorMessage ? "error" : "tip",
|
|
6616
|
-
message: (_a = errorMessage != null ? errorMessage : tip) != null ? _a : ""
|
|
6617
|
-
}
|
|
6618
|
-
)
|
|
6663
|
+
renderInputMessage({ tip, errorMessage, tipId, errorMessageId })
|
|
6619
6664
|
]
|
|
6620
6665
|
}
|
|
6621
6666
|
);
|
|
@@ -6630,6 +6675,8 @@ function DateField({
|
|
|
6630
6675
|
groupProps,
|
|
6631
6676
|
ref,
|
|
6632
6677
|
clearable,
|
|
6678
|
+
errorMessageId,
|
|
6679
|
+
tipId,
|
|
6633
6680
|
...props
|
|
6634
6681
|
}) {
|
|
6635
6682
|
const { locale } = useLocale3();
|
|
@@ -6663,6 +6710,8 @@ function DateField({
|
|
|
6663
6710
|
required: props.isRequired,
|
|
6664
6711
|
clearable,
|
|
6665
6712
|
ref,
|
|
6713
|
+
tipId,
|
|
6714
|
+
errorMessageId,
|
|
6666
6715
|
internalRef,
|
|
6667
6716
|
readOnly: props.isReadOnly,
|
|
6668
6717
|
prefix: /* @__PURE__ */ jsx236(
|
|
@@ -6695,6 +6744,8 @@ function DateField({
|
|
|
6695
6744
|
{
|
|
6696
6745
|
"aria-readonly": props.isReadOnly,
|
|
6697
6746
|
componentSize,
|
|
6747
|
+
errorMessageId,
|
|
6748
|
+
tipId,
|
|
6698
6749
|
segment,
|
|
6699
6750
|
state
|
|
6700
6751
|
},
|
|
@@ -6752,6 +6803,7 @@ function DatePicker({
|
|
|
6752
6803
|
ref,
|
|
6753
6804
|
...props
|
|
6754
6805
|
}) {
|
|
6806
|
+
var _a;
|
|
6755
6807
|
const lang = useLanguage();
|
|
6756
6808
|
if (!lang) {
|
|
6757
6809
|
throw new Error("DatePicker must be used within a DdsProvider");
|
|
@@ -6765,6 +6817,11 @@ function DatePicker({
|
|
|
6765
6817
|
state,
|
|
6766
6818
|
internalRef
|
|
6767
6819
|
);
|
|
6820
|
+
const hasErrorMessage = !!errorMessage;
|
|
6821
|
+
const hasTip = !!tip;
|
|
6822
|
+
const uniqueId = (_a = props.id) != null ? _a : useId10();
|
|
6823
|
+
const errorMessageId = hasErrorMessage ? `${uniqueId}-errorMessage` : void 0;
|
|
6824
|
+
const tipId = hasTip ? `${uniqueId}-tip` : void 0;
|
|
6768
6825
|
return /* @__PURE__ */ jsx237(I18nProvider, { locale: LOCALE[lang], children: /* @__PURE__ */ jsxs47(
|
|
6769
6826
|
CalendarPopover,
|
|
6770
6827
|
{
|
|
@@ -6780,8 +6837,11 @@ function DatePicker({
|
|
|
6780
6837
|
ref: combinedRef,
|
|
6781
6838
|
componentSize,
|
|
6782
6839
|
tip,
|
|
6840
|
+
id: uniqueId,
|
|
6783
6841
|
label: props.label,
|
|
6784
6842
|
errorMessage,
|
|
6843
|
+
errorMessageId,
|
|
6844
|
+
tipId,
|
|
6785
6845
|
buttonProps,
|
|
6786
6846
|
style,
|
|
6787
6847
|
width,
|
|
@@ -6798,7 +6858,7 @@ DatePicker.displayName = "DatePicker";
|
|
|
6798
6858
|
// src/components/date-inputs/TimePicker/TimePicker.tsx
|
|
6799
6859
|
import { useTimeField } from "@react-aria/datepicker";
|
|
6800
6860
|
import { useTimeFieldState } from "@react-stately/datepicker";
|
|
6801
|
-
import { useRef as useRef18 } from "react";
|
|
6861
|
+
import { useId as useId11, useRef as useRef18 } from "react";
|
|
6802
6862
|
|
|
6803
6863
|
// src/components/date-inputs/TimePicker/TimePicker.utils.ts
|
|
6804
6864
|
function formatTimeSegments(segments) {
|
|
@@ -6836,6 +6896,7 @@ function TimePicker({
|
|
|
6836
6896
|
ref,
|
|
6837
6897
|
...props
|
|
6838
6898
|
}) {
|
|
6899
|
+
var _a;
|
|
6839
6900
|
const lang = useLanguage();
|
|
6840
6901
|
if (!lang) {
|
|
6841
6902
|
throw new Error("TimePicker must be used within a DdsProvider");
|
|
@@ -6850,6 +6911,11 @@ function TimePicker({
|
|
|
6850
6911
|
state,
|
|
6851
6912
|
internalRef
|
|
6852
6913
|
);
|
|
6914
|
+
const hasErrorMessage = !!props.errorMessage;
|
|
6915
|
+
const hasTip = !!props.tip;
|
|
6916
|
+
const uniqueId = (_a = props.id) != null ? _a : useId11();
|
|
6917
|
+
const errorMessageId = hasErrorMessage ? `${uniqueId}-errorMessage` : void 0;
|
|
6918
|
+
const tipId = hasTip ? `${uniqueId}-tip` : void 0;
|
|
6853
6919
|
const iconSize = componentSize === "xsmall" ? "small" : "medium";
|
|
6854
6920
|
const disabled = props.isDisabled || !!fieldProps["aria-disabled"];
|
|
6855
6921
|
const formattedSegments = formatTimeSegments(state.segments);
|
|
@@ -6857,6 +6923,8 @@ function TimePicker({
|
|
|
6857
6923
|
DateInput,
|
|
6858
6924
|
{
|
|
6859
6925
|
...props,
|
|
6926
|
+
errorMessageId,
|
|
6927
|
+
tipId,
|
|
6860
6928
|
width,
|
|
6861
6929
|
disabled,
|
|
6862
6930
|
required: props.isRequired,
|
|
@@ -6872,7 +6940,8 @@ function TimePicker({
|
|
|
6872
6940
|
icon: TimeIcon,
|
|
6873
6941
|
iconSize,
|
|
6874
6942
|
className: cn(
|
|
6875
|
-
|
|
6943
|
+
Input_default["input-group__absolute-el"],
|
|
6944
|
+
Input_default[`input-group__absolute-el--${componentSize}`],
|
|
6876
6945
|
disabled && DateInput_default["icon-wrapper--disabled"],
|
|
6877
6946
|
props.isReadOnly && DateInput_default["icon-wrapper--readonly"]
|
|
6878
6947
|
)
|
|
@@ -6881,6 +6950,8 @@ function TimePicker({
|
|
|
6881
6950
|
children: formattedSegments.map((segment, i) => /* @__PURE__ */ jsx238(
|
|
6882
6951
|
DateSegment,
|
|
6883
6952
|
{
|
|
6953
|
+
errorMessageId,
|
|
6954
|
+
tipId,
|
|
6884
6955
|
componentSize,
|
|
6885
6956
|
segment,
|
|
6886
6957
|
state
|
|
@@ -7284,7 +7355,7 @@ import {
|
|
|
7284
7355
|
Children as ReactChildren2,
|
|
7285
7356
|
cloneElement as cloneElement2,
|
|
7286
7357
|
isValidElement as isValidElement3,
|
|
7287
|
-
useId as
|
|
7358
|
+
useId as useId12,
|
|
7288
7359
|
useRef as useRef20,
|
|
7289
7360
|
useState as useState13
|
|
7290
7361
|
} from "react";
|
|
@@ -7303,7 +7374,7 @@ var DrawerGroup = ({
|
|
|
7303
7374
|
propIsOpen != null ? propIsOpen : internalIsOpen,
|
|
7304
7375
|
propSetIsOpen != null ? propSetIsOpen : internalSetIsOpen
|
|
7305
7376
|
];
|
|
7306
|
-
const generatedId =
|
|
7377
|
+
const generatedId = useId12();
|
|
7307
7378
|
const uniqueDrawerId = drawerId != null ? drawerId : `${generatedId}-drawer`;
|
|
7308
7379
|
const triggerRef = useRef20(null);
|
|
7309
7380
|
const open = () => setIsOpen(true);
|
|
@@ -7378,7 +7449,7 @@ function EmptyContent({
|
|
|
7378
7449
|
EmptyContent.displayName = "EmptyContent";
|
|
7379
7450
|
|
|
7380
7451
|
// src/components/FavStar/FavStar.tsx
|
|
7381
|
-
import { useId as
|
|
7452
|
+
import { useId as useId13 } from "react";
|
|
7382
7453
|
|
|
7383
7454
|
// src/components/FavStar/FavStar.module.css
|
|
7384
7455
|
var FavStar_default = {
|
|
@@ -7410,7 +7481,7 @@ var FavStar = ({
|
|
|
7410
7481
|
htmlProps,
|
|
7411
7482
|
rest
|
|
7412
7483
|
);
|
|
7413
|
-
const generatedId =
|
|
7484
|
+
const generatedId = useId13();
|
|
7414
7485
|
const [checked, setChecked] = useControllableState({
|
|
7415
7486
|
value: checkedProp,
|
|
7416
7487
|
defaultValue: defaultChecked != null ? defaultChecked : false,
|
|
@@ -7480,7 +7551,7 @@ var Feedback_default = {
|
|
|
7480
7551
|
// src/components/TextArea/TextArea.tsx
|
|
7481
7552
|
import {
|
|
7482
7553
|
useEffect as useEffect20,
|
|
7483
|
-
useId as
|
|
7554
|
+
useId as useId15,
|
|
7484
7555
|
useRef as useRef21,
|
|
7485
7556
|
useState as useState14
|
|
7486
7557
|
} from "react";
|
|
@@ -7491,7 +7562,7 @@ var TextArea_default = {
|
|
|
7491
7562
|
};
|
|
7492
7563
|
|
|
7493
7564
|
// src/components/helpers/CharCounter/CharCounter.tsx
|
|
7494
|
-
import { useId as
|
|
7565
|
+
import { useId as useId14 } from "react";
|
|
7495
7566
|
|
|
7496
7567
|
// src/components/helpers/CharCounter/CharCounter.module.css
|
|
7497
7568
|
var CharCounter_default = {
|
|
@@ -7503,7 +7574,7 @@ import { jsx as jsx251, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
|
7503
7574
|
function CharCounter(props) {
|
|
7504
7575
|
const { t } = useTranslation();
|
|
7505
7576
|
const { current, max, id } = props;
|
|
7506
|
-
const generatedId =
|
|
7577
|
+
const generatedId = useId14();
|
|
7507
7578
|
const uniqueId = id != null ? id : `${generatedId}-characterCounter`;
|
|
7508
7579
|
return /* @__PURE__ */ jsxs53(
|
|
7509
7580
|
Typography,
|
|
@@ -7560,7 +7631,7 @@ var TextArea = ({
|
|
|
7560
7631
|
ref,
|
|
7561
7632
|
...rest
|
|
7562
7633
|
}) => {
|
|
7563
|
-
const generatedId =
|
|
7634
|
+
const generatedId = useId15();
|
|
7564
7635
|
const uniqueId = id != null ? id : `${generatedId}-textArea`;
|
|
7565
7636
|
const textAreaRef = useRef21(null);
|
|
7566
7637
|
const multiRef = useCombinedRef(ref, textAreaRef);
|
|
@@ -7630,7 +7701,7 @@ var TextArea = ({
|
|
|
7630
7701
|
justifyContent: withCharacterCounter ? hasMessage ? "space-between" : "flex-end" : void 0,
|
|
7631
7702
|
width: withCharacterCounter ? inputWidth : void 0,
|
|
7632
7703
|
children: [
|
|
7633
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId),
|
|
7704
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId }),
|
|
7634
7705
|
renderCharCounter(
|
|
7635
7706
|
characterCounterId,
|
|
7636
7707
|
withCharacterCounter,
|
|
@@ -7713,7 +7784,7 @@ import {
|
|
|
7713
7784
|
Children as ReactChildren3,
|
|
7714
7785
|
cloneElement as cloneElement3,
|
|
7715
7786
|
useEffect as useEffect21,
|
|
7716
|
-
useId as
|
|
7787
|
+
useId as useId16,
|
|
7717
7788
|
useRef as useRef22,
|
|
7718
7789
|
useState as useState15
|
|
7719
7790
|
} from "react";
|
|
@@ -7744,7 +7815,7 @@ var Tooltip = ({
|
|
|
7744
7815
|
htmlProps,
|
|
7745
7816
|
...rest
|
|
7746
7817
|
}) => {
|
|
7747
|
-
const generatedId =
|
|
7818
|
+
const generatedId = useId16();
|
|
7748
7819
|
const uniqueTooltipId = tooltipId != null ? tooltipId : `${generatedId}-tooltip`;
|
|
7749
7820
|
const [open, setOpen] = useState15(false);
|
|
7750
7821
|
const [inView, setInView] = useState15(keepMounted ? false : true);
|
|
@@ -8086,7 +8157,7 @@ var FieldsetGroup = ({
|
|
|
8086
8157
|
FieldsetGroup.displayName = "FieldsetGroup";
|
|
8087
8158
|
|
|
8088
8159
|
// src/components/FileUploader/FileUploader.tsx
|
|
8089
|
-
import { useId as
|
|
8160
|
+
import { useId as useId17 } from "react";
|
|
8090
8161
|
|
|
8091
8162
|
// src/components/FileUploader/ErrorList.tsx
|
|
8092
8163
|
import { jsx as jsx259 } from "react/jsx-runtime";
|
|
@@ -8096,14 +8167,10 @@ var ErrorList = (props) => {
|
|
|
8096
8167
|
return null;
|
|
8097
8168
|
}
|
|
8098
8169
|
if (errors.length === 1) {
|
|
8099
|
-
return
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
|
|
8103
|
-
message: errors[0].message,
|
|
8104
|
-
messageType: "error"
|
|
8105
|
-
}
|
|
8106
|
-
);
|
|
8170
|
+
return renderInputMessage({
|
|
8171
|
+
errorMessage: errors[0].message,
|
|
8172
|
+
errorMessageId: errors[0].id
|
|
8173
|
+
});
|
|
8107
8174
|
}
|
|
8108
8175
|
return /* @__PURE__ */ jsx259(StylelessList, { children: errors.map(({ id, message }) => {
|
|
8109
8176
|
return /* @__PURE__ */ jsx259("li", { children: /* @__PURE__ */ jsx259(
|
|
@@ -8560,7 +8627,7 @@ var FileUploader = (props) => {
|
|
|
8560
8627
|
const { t } = useTranslation();
|
|
8561
8628
|
const tDropAreaLabel = dropAreaLabel != null ? dropAreaLabel : t(texts17.dragAndDropOr);
|
|
8562
8629
|
const tBtnLabel = btnLabel != null ? btnLabel : t(texts17.selectFile);
|
|
8563
|
-
const generatedId =
|
|
8630
|
+
const generatedId = useId17();
|
|
8564
8631
|
const uniqueId = id != null ? id : `${generatedId}-fileUploader`;
|
|
8565
8632
|
const {
|
|
8566
8633
|
state: { files: stateFiles, isDragActive, rootErrors },
|
|
@@ -8653,7 +8720,7 @@ var FileUploader = (props) => {
|
|
|
8653
8720
|
readOnly,
|
|
8654
8721
|
afterLabelContent
|
|
8655
8722
|
}),
|
|
8656
|
-
|
|
8723
|
+
renderInputMessage({ tip, tipId }),
|
|
8657
8724
|
inactive ? input : withDragAndDrop ? /* @__PURE__ */ jsxs59(
|
|
8658
8725
|
VStack,
|
|
8659
8726
|
{
|
|
@@ -9076,7 +9143,7 @@ var InlineEditContextProvider = (props) => {
|
|
|
9076
9143
|
InlineEditContextProvider.displayName = "InlineEditContextProvider";
|
|
9077
9144
|
|
|
9078
9145
|
// src/components/InlineEdit/InlineField.tsx
|
|
9079
|
-
import { useId as
|
|
9146
|
+
import { useId as useId18, useRef as useRef24 } from "react";
|
|
9080
9147
|
|
|
9081
9148
|
// src/components/InlineEdit/InlineEdit.module.css
|
|
9082
9149
|
var InlineEdit_default = {
|
|
@@ -9181,7 +9248,7 @@ function InlineField(props) {
|
|
|
9181
9248
|
} = props;
|
|
9182
9249
|
const { onBlur, onChange, onFocus, isEditing, value, emptiable } = useInlineEditContext();
|
|
9183
9250
|
const { t } = useTranslation();
|
|
9184
|
-
const generatedId =
|
|
9251
|
+
const generatedId = useId18();
|
|
9185
9252
|
const uniqueId = id != null ? id : `${generatedId}-InlineEdit`;
|
|
9186
9253
|
const hasErrorMessage = !!errorMessage;
|
|
9187
9254
|
const hasErrorState = !!error || hasErrorMessage;
|
|
@@ -9277,7 +9344,7 @@ function InlineField(props) {
|
|
|
9277
9344
|
renderElement()
|
|
9278
9345
|
] }),
|
|
9279
9346
|
inlineEditVisuallyHidden(descId, emptiable),
|
|
9280
|
-
renderInputMessage(
|
|
9347
|
+
renderInputMessage({ errorMessage, errorMessageId })
|
|
9281
9348
|
] });
|
|
9282
9349
|
}
|
|
9283
9350
|
|
|
@@ -9701,7 +9768,7 @@ LocalMessage.displayName = "LocalMessage";
|
|
|
9701
9768
|
import {
|
|
9702
9769
|
useContext as useContext17,
|
|
9703
9770
|
useEffect as useEffect24,
|
|
9704
|
-
useId as
|
|
9771
|
+
useId as useId19,
|
|
9705
9772
|
useRef as useRef28
|
|
9706
9773
|
} from "react";
|
|
9707
9774
|
import { createPortal as createPortal3 } from "react-dom";
|
|
@@ -9733,7 +9800,7 @@ var Modal = ({
|
|
|
9733
9800
|
ref,
|
|
9734
9801
|
...rest
|
|
9735
9802
|
}) => {
|
|
9736
|
-
const generatedId =
|
|
9803
|
+
const generatedId = useId19();
|
|
9737
9804
|
const modalId = id != null ? id : `${generatedId}-modal`;
|
|
9738
9805
|
const headerId = `${modalId}-header`;
|
|
9739
9806
|
const modalRef = useFocusTrap(isOpen, initialFocusRef);
|
|
@@ -9924,7 +9991,7 @@ function PaginationGenerator(pagesAmount, activePage) {
|
|
|
9924
9991
|
import {
|
|
9925
9992
|
useCallback as useCallback7,
|
|
9926
9993
|
useContext as useContext18,
|
|
9927
|
-
useId as
|
|
9994
|
+
useId as useId20
|
|
9928
9995
|
} from "react";
|
|
9929
9996
|
import {
|
|
9930
9997
|
default as ReactSelect
|
|
@@ -9991,7 +10058,7 @@ var control = {
|
|
|
9991
10058
|
...optionTypography.medium
|
|
9992
10059
|
},
|
|
9993
10060
|
hasIcon: {
|
|
9994
|
-
paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-
|
|
10061
|
+
paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-md-icon-text-gap))"
|
|
9995
10062
|
}
|
|
9996
10063
|
},
|
|
9997
10064
|
small: {
|
|
@@ -10001,7 +10068,7 @@ var control = {
|
|
|
10001
10068
|
...optionTypography.small
|
|
10002
10069
|
},
|
|
10003
10070
|
hasIcon: {
|
|
10004
|
-
paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-
|
|
10071
|
+
paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-sm-icon-text-gap))"
|
|
10005
10072
|
}
|
|
10006
10073
|
},
|
|
10007
10074
|
xsmall: {
|
|
@@ -10011,7 +10078,7 @@ var control = {
|
|
|
10011
10078
|
...optionTypography.xsmall
|
|
10012
10079
|
},
|
|
10013
10080
|
hasIcon: {
|
|
10014
|
-
paddingLeft: "calc(var(--dds-spacing-x0-5) + var(--dds-icon-size-small) + var(--dds-spacing-
|
|
10081
|
+
paddingLeft: "calc(var(--dds-spacing-x0-5) + var(--dds-icon-size-small) + var(--dds-spacing-xs-icon-text-gap))"
|
|
10015
10082
|
}
|
|
10016
10083
|
}
|
|
10017
10084
|
};
|
|
@@ -10311,7 +10378,7 @@ function DDSControl(props) {
|
|
|
10311
10378
|
icon,
|
|
10312
10379
|
iconSize: getFormInputIconSize(componentSize),
|
|
10313
10380
|
className: cn(
|
|
10314
|
-
Input_default["input-group__absolute-
|
|
10381
|
+
Input_default["input-group__absolute-el"],
|
|
10315
10382
|
Select_default[`icon--${componentSize}`]
|
|
10316
10383
|
)
|
|
10317
10384
|
}
|
|
@@ -10360,7 +10427,7 @@ function Select({
|
|
|
10360
10427
|
throw new Error("Select must be used within a ThemeProvider");
|
|
10361
10428
|
}
|
|
10362
10429
|
const portalTarget = menuPortalTarget != null ? menuPortalTarget : themeContext == null ? void 0 : themeContext.el;
|
|
10363
|
-
const generatedId =
|
|
10430
|
+
const generatedId = useId20();
|
|
10364
10431
|
const uniqueId = id != null ? id : `${generatedId}-select`;
|
|
10365
10432
|
const singleValueId = !isMulti ? `${uniqueId}-singleValue` : void 0;
|
|
10366
10433
|
const hasErrorMessage = !!errorMessage;
|
|
@@ -10441,7 +10508,7 @@ function Select({
|
|
|
10441
10508
|
placeholder: placeholder ? placeholder : "",
|
|
10442
10509
|
closeMenuOnSelect: closeMenuOnSelect ? closeMenuOnSelect : isMulti ? false : true,
|
|
10443
10510
|
isMulti,
|
|
10444
|
-
instanceId: instanceId != null ? instanceId :
|
|
10511
|
+
instanceId: instanceId != null ? instanceId : useId20(),
|
|
10445
10512
|
inputId: uniqueId,
|
|
10446
10513
|
name: uniqueId,
|
|
10447
10514
|
menuPortalTarget: portalTarget,
|
|
@@ -10492,7 +10559,7 @@ function Select({
|
|
|
10492
10559
|
afterLabelContent
|
|
10493
10560
|
}),
|
|
10494
10561
|
/* @__PURE__ */ jsx288(ReactSelect, { ...reactSelectProps, ref }),
|
|
10495
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
10562
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId })
|
|
10496
10563
|
]
|
|
10497
10564
|
}
|
|
10498
10565
|
);
|
|
@@ -10500,7 +10567,7 @@ function Select({
|
|
|
10500
10567
|
Select.displayName = "Select";
|
|
10501
10568
|
|
|
10502
10569
|
// src/components/Select/NativeSelect/NativeSelect.tsx
|
|
10503
|
-
import { useEffect as useEffect25, useId as
|
|
10570
|
+
import { useEffect as useEffect25, useId as useId21, useRef as useRef29, useState as useState21 } from "react";
|
|
10504
10571
|
|
|
10505
10572
|
// src/components/Select/NativeSelect/NativeSelect.module.css
|
|
10506
10573
|
var NativeSelect_default = {
|
|
@@ -10540,6 +10607,7 @@ var NativeSelect = ({
|
|
|
10540
10607
|
clearable,
|
|
10541
10608
|
afterLabelContent,
|
|
10542
10609
|
onChange,
|
|
10610
|
+
icon,
|
|
10543
10611
|
...rest
|
|
10544
10612
|
}) => {
|
|
10545
10613
|
const { t } = useTranslation();
|
|
@@ -10563,7 +10631,7 @@ var NativeSelect = ({
|
|
|
10563
10631
|
}
|
|
10564
10632
|
}
|
|
10565
10633
|
}, [clearable]);
|
|
10566
|
-
const generatedId =
|
|
10634
|
+
const generatedId = useId21();
|
|
10567
10635
|
const uniqueId = id != null ? id : `${generatedId}-native-select`;
|
|
10568
10636
|
const hasErrorMessage = !!errorMessage;
|
|
10569
10637
|
const hasTip = !!tip;
|
|
@@ -10585,6 +10653,7 @@ var NativeSelect = ({
|
|
|
10585
10653
|
};
|
|
10586
10654
|
const iconSize = componentSize === "medium" ? "medium" : "small";
|
|
10587
10655
|
const showClearButton = clearable && hasValue && !readOnly && !rest.disabled;
|
|
10656
|
+
const hasIcon = !!icon;
|
|
10588
10657
|
return /* @__PURE__ */ jsxs69("div", { className, style, children: [
|
|
10589
10658
|
renderLabel({
|
|
10590
10659
|
label,
|
|
@@ -10594,6 +10663,17 @@ var NativeSelect = ({
|
|
|
10594
10663
|
afterLabelContent
|
|
10595
10664
|
}),
|
|
10596
10665
|
/* @__PURE__ */ jsxs69(Box, { position: "relative", width: inputWidth, children: [
|
|
10666
|
+
hasIcon && /* @__PURE__ */ jsx289(
|
|
10667
|
+
Icon,
|
|
10668
|
+
{
|
|
10669
|
+
icon,
|
|
10670
|
+
className: cn(
|
|
10671
|
+
Input_default["input-group__absolute-el"],
|
|
10672
|
+
Input_default[`input-group__absolute-el--${componentSize}`]
|
|
10673
|
+
),
|
|
10674
|
+
iconSize: getFormInputIconSize(componentSize)
|
|
10675
|
+
}
|
|
10676
|
+
),
|
|
10597
10677
|
/* @__PURE__ */ jsx289(
|
|
10598
10678
|
"select",
|
|
10599
10679
|
{
|
|
@@ -10605,6 +10685,7 @@ var NativeSelect = ({
|
|
|
10605
10685
|
readOnly && NativeSelect_default["select--readonly"],
|
|
10606
10686
|
Input_default.input,
|
|
10607
10687
|
Input_default[`input--${componentSize}`],
|
|
10688
|
+
hasIcon && Input_default[`input-with-icon--${componentSize}`],
|
|
10608
10689
|
NativeSelect_default[`select--${componentSize}`],
|
|
10609
10690
|
scrollbar,
|
|
10610
10691
|
focusable,
|
|
@@ -10646,7 +10727,7 @@ var NativeSelect = ({
|
|
|
10646
10727
|
}
|
|
10647
10728
|
)
|
|
10648
10729
|
] }),
|
|
10649
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
10730
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId })
|
|
10650
10731
|
] });
|
|
10651
10732
|
};
|
|
10652
10733
|
var NativeSelectPlaceholder = ({
|
|
@@ -11013,7 +11094,7 @@ var texts21 = createTexts({
|
|
|
11013
11094
|
// src/components/PhoneInput/PhoneInput.tsx
|
|
11014
11095
|
import {
|
|
11015
11096
|
useEffect as useEffect26,
|
|
11016
|
-
useId as
|
|
11097
|
+
useId as useId22,
|
|
11017
11098
|
useLayoutEffect as useLayoutEffect2,
|
|
11018
11099
|
useRef as useRef30,
|
|
11019
11100
|
useState as useState23
|
|
@@ -11479,7 +11560,7 @@ var PhoneInput = ({
|
|
|
11479
11560
|
const { t } = useTranslation();
|
|
11480
11561
|
const tGroupLabel = groupLabel != null ? groupLabel : t(texts22.countryCodeAndPhoneNumber);
|
|
11481
11562
|
const tSelectLabel = selectLabel != null ? selectLabel : t(texts22.countryCode);
|
|
11482
|
-
const generatedId =
|
|
11563
|
+
const generatedId = useId22();
|
|
11483
11564
|
const uniqueId = (_a = props.id) != null ? _a : generatedId;
|
|
11484
11565
|
const phoneInputId = `${uniqueId}-phone-input`;
|
|
11485
11566
|
const phoneNumberId = `${uniqueId}-phone-number`;
|
|
@@ -11607,7 +11688,7 @@ var PhoneInput = ({
|
|
|
11607
11688
|
{
|
|
11608
11689
|
className: cn(
|
|
11609
11690
|
typographyStyles_default[`body-${componentSize}`],
|
|
11610
|
-
Input_default["input-group__absolute-
|
|
11691
|
+
Input_default["input-group__absolute-el"],
|
|
11611
11692
|
PhoneInput_default["calling-code"]
|
|
11612
11693
|
),
|
|
11613
11694
|
ref: callingCodeRef,
|
|
@@ -11644,7 +11725,7 @@ var PhoneInput = ({
|
|
|
11644
11725
|
]
|
|
11645
11726
|
}
|
|
11646
11727
|
),
|
|
11647
|
-
hasMessage && renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
11728
|
+
hasMessage && renderInputMessage({ tip, tipId, errorMessage, errorMessageId })
|
|
11648
11729
|
] });
|
|
11649
11730
|
};
|
|
11650
11731
|
PhoneInput.displayName = "PhoneInput";
|
|
@@ -11673,7 +11754,7 @@ var texts22 = createTexts({
|
|
|
11673
11754
|
import {
|
|
11674
11755
|
useContext as useContext20,
|
|
11675
11756
|
useEffect as useEffect27,
|
|
11676
|
-
useId as
|
|
11757
|
+
useId as useId23
|
|
11677
11758
|
} from "react";
|
|
11678
11759
|
import { createPortal as createPortal4 } from "react-dom";
|
|
11679
11760
|
|
|
@@ -11734,7 +11815,7 @@ var Popover = ({
|
|
|
11734
11815
|
} = context;
|
|
11735
11816
|
const { t } = useTranslation();
|
|
11736
11817
|
const hasContext = !isEmpty(context);
|
|
11737
|
-
const generatedId =
|
|
11818
|
+
const generatedId = useId23();
|
|
11738
11819
|
const uniquePopoverId = id != null ? id : `${generatedId}-popover`;
|
|
11739
11820
|
const [
|
|
11740
11821
|
popoverId,
|
|
@@ -11844,7 +11925,7 @@ import {
|
|
|
11844
11925
|
Children as ReactChildren4,
|
|
11845
11926
|
cloneElement as cloneElement4,
|
|
11846
11927
|
isValidElement as isValidElement4,
|
|
11847
|
-
useId as
|
|
11928
|
+
useId as useId24,
|
|
11848
11929
|
useRef as useRef31,
|
|
11849
11930
|
useState as useState24
|
|
11850
11931
|
} from "react";
|
|
@@ -11862,7 +11943,7 @@ var PopoverGroup = ({
|
|
|
11862
11943
|
const [internalIsOpen, internalSetIsOpen] = useState24(isInitiallyOpen);
|
|
11863
11944
|
const open = propIsOpen != null ? propIsOpen : internalIsOpen;
|
|
11864
11945
|
const setOpen = propSetIsOpen != null ? propSetIsOpen : internalSetIsOpen;
|
|
11865
|
-
const generatedId =
|
|
11946
|
+
const generatedId = useId24();
|
|
11866
11947
|
const uniquePopoverId = popoverId != null ? popoverId : `${generatedId}-popover`;
|
|
11867
11948
|
const [floatOptions, setFloatOptions] = useState24();
|
|
11868
11949
|
const { refs, styles: positionStyles } = useFloatPosition(null, floatOptions);
|
|
@@ -12210,7 +12291,7 @@ var texts24 = createTexts({
|
|
|
12210
12291
|
});
|
|
12211
12292
|
|
|
12212
12293
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
12213
|
-
import { useId as
|
|
12294
|
+
import { useId as useId25 } from "react";
|
|
12214
12295
|
|
|
12215
12296
|
// src/components/ProgressBar/ProgressBar.module.css
|
|
12216
12297
|
var ProgressBar_default = {
|
|
@@ -12239,7 +12320,7 @@ var ProgressBar = ({
|
|
|
12239
12320
|
style,
|
|
12240
12321
|
...rest
|
|
12241
12322
|
}) => {
|
|
12242
|
-
const generatedId =
|
|
12323
|
+
const generatedId = useId25();
|
|
12243
12324
|
const uniqueId = id != null ? id : `${generatedId}-searchInput`;
|
|
12244
12325
|
const hasErrorMessage = !!errorMessage;
|
|
12245
12326
|
const hasTip = !!tip;
|
|
@@ -12288,14 +12369,14 @@ var ProgressBar = ({
|
|
|
12288
12369
|
)
|
|
12289
12370
|
}
|
|
12290
12371
|
),
|
|
12291
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
12372
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId })
|
|
12292
12373
|
] });
|
|
12293
12374
|
};
|
|
12294
12375
|
ProgressBar.displayName = "ProgressBar";
|
|
12295
12376
|
|
|
12296
12377
|
// src/components/Search/Search.tsx
|
|
12297
12378
|
import {
|
|
12298
|
-
useId as
|
|
12379
|
+
useId as useId26,
|
|
12299
12380
|
useState as useState26
|
|
12300
12381
|
} from "react";
|
|
12301
12382
|
|
|
@@ -12313,7 +12394,6 @@ var useAutocompleteSearch = () => {
|
|
|
12313
12394
|
var Search_default = {
|
|
12314
12395
|
"with-button-container": "Search_with-button-container",
|
|
12315
12396
|
input: "Search_input",
|
|
12316
|
-
"search-icon": "Search_search-icon",
|
|
12317
12397
|
"clear-button": "Search_clear-button",
|
|
12318
12398
|
suggestions: "Search_suggestions"
|
|
12319
12399
|
};
|
|
@@ -12459,29 +12539,10 @@ var getIconSize2 = (size2) => {
|
|
|
12459
12539
|
case "large":
|
|
12460
12540
|
return "medium";
|
|
12461
12541
|
case "medium":
|
|
12462
|
-
return "medium";
|
|
12463
12542
|
case "small":
|
|
12464
|
-
return
|
|
12543
|
+
return getFormInputIconSize(size2);
|
|
12465
12544
|
}
|
|
12466
12545
|
};
|
|
12467
|
-
var getPadding = (size2, showIcon) => {
|
|
12468
|
-
const paddingRight = (textSize) => `calc(
|
|
12469
|
-
var(--dds-spacing-x1) + ${textSize} * 1.5 + var(--dds-spacing-x0-5)
|
|
12470
|
-
)`;
|
|
12471
|
-
const paddingLeft = (iconSize) => `calc(
|
|
12472
|
-
var(--dds-spacing-x0-75) + ${iconSize} + var(--dds-spacing-x0-5)
|
|
12473
|
-
)`;
|
|
12474
|
-
const pRSmallButton = paddingRight("0.875rem");
|
|
12475
|
-
const pRMediumButton = paddingRight("1rem");
|
|
12476
|
-
const pLSmallIcon = paddingLeft("var(--dds-icon-size-small)");
|
|
12477
|
-
const pLMediumIcon = paddingLeft("var(--dds-icon-size-medium)");
|
|
12478
|
-
const paddingMap = {
|
|
12479
|
-
large: `x1 ${pRMediumButton} x1 ${showIcon ? pLMediumIcon : "x0.75"}`,
|
|
12480
|
-
medium: `x0.75 ${pRSmallButton} x0.75 ${showIcon ? pLMediumIcon : "x0.75"}`,
|
|
12481
|
-
small: `x0.5 ${pRSmallButton} x0.5 ${showIcon ? pLSmallIcon : "x0.75"}`
|
|
12482
|
-
};
|
|
12483
|
-
return paddingMap[size2];
|
|
12484
|
-
};
|
|
12485
12546
|
var Search = ({
|
|
12486
12547
|
componentSize = "medium",
|
|
12487
12548
|
buttonProps,
|
|
@@ -12500,7 +12561,7 @@ var Search = ({
|
|
|
12500
12561
|
...rest
|
|
12501
12562
|
}) => {
|
|
12502
12563
|
var _a;
|
|
12503
|
-
const generatedId =
|
|
12564
|
+
const generatedId = useId26();
|
|
12504
12565
|
const uniqueId = id != null ? id : `${generatedId}-searchInput`;
|
|
12505
12566
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
12506
12567
|
const suggestionsId = derivativeIdGenerator(uniqueId, "suggestions");
|
|
@@ -12542,8 +12603,8 @@ var Search = ({
|
|
|
12542
12603
|
icon: SearchIcon,
|
|
12543
12604
|
iconSize: getIconSize2(componentSize),
|
|
12544
12605
|
className: cn(
|
|
12545
|
-
Input_default["input-group__absolute-
|
|
12546
|
-
|
|
12606
|
+
Input_default["input-group__absolute-el"],
|
|
12607
|
+
Input_default[`input-group__absolute-el--${componentSize}`]
|
|
12547
12608
|
)
|
|
12548
12609
|
}
|
|
12549
12610
|
),
|
|
@@ -12569,9 +12630,11 @@ var Search = ({
|
|
|
12569
12630
|
"aria-expanded": context.showSuggestions,
|
|
12570
12631
|
role: hasSuggestions ? "combobox" : void 0,
|
|
12571
12632
|
width: "100%",
|
|
12572
|
-
padding: getPadding(componentSize, showIcon),
|
|
12573
12633
|
className: cn(
|
|
12574
12634
|
Search_default.input,
|
|
12635
|
+
Input_default[`input--${componentSize}`],
|
|
12636
|
+
showIcon && Input_default[`input-with-icon--${componentSize}`],
|
|
12637
|
+
Input_default[`input-with-el-right--${componentSize}`],
|
|
12575
12638
|
typographyStyles_default[getTypographyCn(typographyTypes2[componentSize])]
|
|
12576
12639
|
)
|
|
12577
12640
|
}
|
|
@@ -12630,7 +12693,7 @@ var Search = ({
|
|
|
12630
12693
|
]
|
|
12631
12694
|
}
|
|
12632
12695
|
) : inputGroup,
|
|
12633
|
-
renderInputMessage(tip, tipId)
|
|
12696
|
+
renderInputMessage({ tip, tipId })
|
|
12634
12697
|
] })
|
|
12635
12698
|
] });
|
|
12636
12699
|
};
|
|
@@ -13392,7 +13455,7 @@ var AddTabButton = ({
|
|
|
13392
13455
|
AddTabButton.displayName = "AddTabButton";
|
|
13393
13456
|
|
|
13394
13457
|
// src/components/Tabs/Tabs.tsx
|
|
13395
|
-
import { useEffect as useEffect33, useId as
|
|
13458
|
+
import { useEffect as useEffect33, useId as useId27, useRef as useRef36, useState as useState31 } from "react";
|
|
13396
13459
|
import { jsx as jsx316 } from "react/jsx-runtime";
|
|
13397
13460
|
var TABS_SIZES = createSizes("small", "medium");
|
|
13398
13461
|
var Tabs = ({
|
|
@@ -13408,7 +13471,7 @@ var Tabs = ({
|
|
|
13408
13471
|
htmlProps,
|
|
13409
13472
|
...rest
|
|
13410
13473
|
}) => {
|
|
13411
|
-
const generatedId =
|
|
13474
|
+
const generatedId = useId27();
|
|
13412
13475
|
const uniqueId = id != null ? id : `${generatedId}-tabs`;
|
|
13413
13476
|
const [thisActiveTab, setActiveTab] = useState31(activeTab != null ? activeTab : 0);
|
|
13414
13477
|
const [hasTabFocus, setHasTabFocus] = useState31(false);
|
|
@@ -13739,17 +13802,13 @@ var Tag = ({
|
|
|
13739
13802
|
Tag.displayName = "Tag";
|
|
13740
13803
|
|
|
13741
13804
|
// src/components/TextInput/TextInput.tsx
|
|
13742
|
-
import { useId as
|
|
13805
|
+
import { useId as useId28, useLayoutEffect as useLayoutEffect4, useRef as useRef38, useState as useState33 } from "react";
|
|
13743
13806
|
|
|
13744
13807
|
// src/components/TextInput/TextInput.module.css
|
|
13745
13808
|
var TextInput_default = {
|
|
13746
13809
|
container: "TextInput_container",
|
|
13747
13810
|
"container--readonly": "TextInput_container--readonly",
|
|
13748
13811
|
"container--disabled": "TextInput_container--disabled",
|
|
13749
|
-
input: "TextInput_input",
|
|
13750
|
-
"with-icon--medium": "TextInput_with-icon--medium",
|
|
13751
|
-
"with-icon--small": "TextInput_with-icon--small",
|
|
13752
|
-
"with-icon--xsmall": "TextInput_with-icon--xsmall",
|
|
13753
13812
|
"input--extended": "TextInput_input--extended",
|
|
13754
13813
|
"icon--medium": "TextInput_icon--medium",
|
|
13755
13814
|
"icon--small": "TextInput_icon--small",
|
|
@@ -13810,7 +13869,7 @@ var TextInput = ({
|
|
|
13810
13869
|
onChange(event);
|
|
13811
13870
|
}
|
|
13812
13871
|
};
|
|
13813
|
-
const generatedId =
|
|
13872
|
+
const generatedId = useId28();
|
|
13814
13873
|
const uniqueId = id != null ? id : `${generatedId}-textInput`;
|
|
13815
13874
|
const hasErrorMessage = !!errorMessage;
|
|
13816
13875
|
const hasTip = !!tip;
|
|
@@ -13863,7 +13922,8 @@ var TextInput = ({
|
|
|
13863
13922
|
icon,
|
|
13864
13923
|
iconSize: getFormInputIconSize(componentSize),
|
|
13865
13924
|
className: cn(
|
|
13866
|
-
Input_default["input-group__absolute-
|
|
13925
|
+
Input_default["input-group__absolute-el"],
|
|
13926
|
+
Input_default[`input-group__absolute-el--${componentSize}`],
|
|
13867
13927
|
TextInput_default[`icon--${componentSize}`]
|
|
13868
13928
|
)
|
|
13869
13929
|
}
|
|
@@ -13872,8 +13932,7 @@ var TextInput = ({
|
|
|
13872
13932
|
StatefulInput,
|
|
13873
13933
|
{
|
|
13874
13934
|
className: cn(
|
|
13875
|
-
|
|
13876
|
-
TextInput_default[`with-icon--${componentSize}`],
|
|
13935
|
+
Input_default[`input-with-icon--${componentSize}`],
|
|
13877
13936
|
TextInput_default["input--extended"]
|
|
13878
13937
|
),
|
|
13879
13938
|
...generalInputProps
|
|
@@ -13958,7 +14017,7 @@ var TextInput = ({
|
|
|
13958
14017
|
gap: "x0.5",
|
|
13959
14018
|
width: withCharacterCounter ? inputWidth : void 0,
|
|
13960
14019
|
children: [
|
|
13961
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId),
|
|
14020
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId }),
|
|
13962
14021
|
renderCharCounter(
|
|
13963
14022
|
characterCounterId,
|
|
13964
14023
|
withCharacterCounter,
|
|
@@ -13975,7 +14034,7 @@ var TextInput = ({
|
|
|
13975
14034
|
TextInput.displayName = "TextInput";
|
|
13976
14035
|
|
|
13977
14036
|
// src/components/Toggle/Toggle.tsx
|
|
13978
|
-
import { useId as
|
|
14037
|
+
import { useId as useId29 } from "react";
|
|
13979
14038
|
|
|
13980
14039
|
// src/components/Toggle/Toggle.module.css
|
|
13981
14040
|
var Toggle_default = {
|
|
@@ -14010,7 +14069,7 @@ var Toggle = ({
|
|
|
14010
14069
|
...rest
|
|
14011
14070
|
}) => {
|
|
14012
14071
|
const { t } = useTranslation();
|
|
14013
|
-
const generatedId =
|
|
14072
|
+
const generatedId = useId29();
|
|
14014
14073
|
const uniqueId = id != null ? id : `${generatedId}-toggle`;
|
|
14015
14074
|
const iconSize = size2 === "large" ? "medium" : "small";
|
|
14016
14075
|
const [checked, setChecked] = useControllableState({
|
|
@@ -14080,7 +14139,7 @@ var Toggle = ({
|
|
|
14080
14139
|
Toggle.displayName = "Toggle";
|
|
14081
14140
|
|
|
14082
14141
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
14083
|
-
import { useId as
|
|
14142
|
+
import { useId as useId30, useState as useState34 } from "react";
|
|
14084
14143
|
|
|
14085
14144
|
// src/components/ToggleBar/ToggleBar.context.tsx
|
|
14086
14145
|
import { createContext as createContext20, useContext as useContext28 } from "react";
|
|
@@ -14120,7 +14179,7 @@ var ToggleBar = (props) => {
|
|
|
14120
14179
|
id,
|
|
14121
14180
|
...rest
|
|
14122
14181
|
} = props;
|
|
14123
|
-
const generatedId =
|
|
14182
|
+
const generatedId = useId30();
|
|
14124
14183
|
const uniqueId = id != null ? id : `${generatedId}-ToggleBar`;
|
|
14125
14184
|
const [groupValue, setGroupValue] = useState34(value);
|
|
14126
14185
|
const handleChange = combineHandlers(
|
|
@@ -14157,7 +14216,7 @@ var ToggleBar = (props) => {
|
|
|
14157
14216
|
ToggleBar.displayName = "ToggleBar";
|
|
14158
14217
|
|
|
14159
14218
|
// src/components/ToggleBar/ToggleRadio.tsx
|
|
14160
|
-
import { useId as
|
|
14219
|
+
import { useId as useId31 } from "react";
|
|
14161
14220
|
import { jsx as jsx325, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
14162
14221
|
var typographyTypes3 = {
|
|
14163
14222
|
large: "bodyLarge",
|
|
@@ -14189,7 +14248,7 @@ var ToggleRadio = ({
|
|
|
14189
14248
|
id,
|
|
14190
14249
|
...rest
|
|
14191
14250
|
}) => {
|
|
14192
|
-
const generatedId =
|
|
14251
|
+
const generatedId = useId31();
|
|
14193
14252
|
const uniqueId = id != null ? id : `${generatedId}-ToggleRadio`;
|
|
14194
14253
|
const group = useToggleBarContext();
|
|
14195
14254
|
const handleChange = (event) => {
|
|
@@ -14238,7 +14297,7 @@ var ToggleRadio = ({
|
|
|
14238
14297
|
ToggleRadio.displayName = "ToggleRadio";
|
|
14239
14298
|
|
|
14240
14299
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
14241
|
-
import { useId as
|
|
14300
|
+
import { useId as useId32 } from "react";
|
|
14242
14301
|
|
|
14243
14302
|
// src/components/ToggleButton/ToggleButton.module.css
|
|
14244
14303
|
var ToggleButton_default = {
|
|
@@ -14259,7 +14318,7 @@ var ToggleButton = ({
|
|
|
14259
14318
|
htmlProps,
|
|
14260
14319
|
...rest
|
|
14261
14320
|
}) => {
|
|
14262
|
-
const generatedId =
|
|
14321
|
+
const generatedId = useId32();
|
|
14263
14322
|
const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
|
|
14264
14323
|
const hasIcon = !!icon;
|
|
14265
14324
|
return /* @__PURE__ */ jsxs88(Box, { as: "label", htmlFor: uniqueId, width: "fit-content", children: [
|
|
@@ -14297,7 +14356,7 @@ var ToggleButton = ({
|
|
|
14297
14356
|
ToggleButton.displayName = "ToggleButton";
|
|
14298
14357
|
|
|
14299
14358
|
// src/components/ToggleButton/ToggleButtonGroup.tsx
|
|
14300
|
-
import { useId as
|
|
14359
|
+
import { useId as useId33 } from "react";
|
|
14301
14360
|
import { jsx as jsx327, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
14302
14361
|
var ToggleButtonGroup = (props) => {
|
|
14303
14362
|
const {
|
|
@@ -14310,7 +14369,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
14310
14369
|
htmlProps,
|
|
14311
14370
|
...rest
|
|
14312
14371
|
} = props;
|
|
14313
|
-
const generatedId =
|
|
14372
|
+
const generatedId = useId33();
|
|
14314
14373
|
const uniqueLabelId = labelId != null ? labelId : `${generatedId}-ToggleButtonGroupLabel`;
|
|
14315
14374
|
return /* @__PURE__ */ jsxs89(
|
|
14316
14375
|
"div",
|