@norges-domstoler/dds-components 21.18.0 → 21.19.1
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 +494 -430
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +278 -214
- 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",
|
|
@@ -4299,20 +4300,25 @@ var OverflowMenuSpan = ({
|
|
|
4299
4300
|
OverflowMenuSpan.displayName = "OverflowMenuSpan";
|
|
4300
4301
|
|
|
4301
4302
|
// src/components/OverflowMenu/components/OverflowMenuListHeader.tsx
|
|
4303
|
+
import { useContext as useContext6 } from "react";
|
|
4302
4304
|
import { jsx as jsx203 } from "react/jsx-runtime";
|
|
4303
4305
|
var OverflowMenuListHeader = ({
|
|
4304
4306
|
className,
|
|
4305
4307
|
...rest
|
|
4306
|
-
}) =>
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4308
|
+
}) => {
|
|
4309
|
+
const themeContext = useContext6(ThemeContext);
|
|
4310
|
+
const headingStyle = (themeContext == null ? void 0 : themeContext.theme) === "core" ? "heading-xsmall" : "heading-xxsmall";
|
|
4311
|
+
return /* @__PURE__ */ jsx203(
|
|
4312
|
+
Box,
|
|
4313
|
+
{
|
|
4314
|
+
as: "h2",
|
|
4315
|
+
paddingInline: "x0.75",
|
|
4316
|
+
paddingBlock: "x0.75 0",
|
|
4317
|
+
...rest,
|
|
4318
|
+
className: cn(className, typographyStyles_default[headingStyle])
|
|
4319
|
+
}
|
|
4320
|
+
);
|
|
4321
|
+
};
|
|
4316
4322
|
OverflowMenuListHeader.displayName = "OverflowMenuListHeader";
|
|
4317
4323
|
|
|
4318
4324
|
// src/components/OverflowMenu/OverflowMenuGroup.tsx
|
|
@@ -4780,10 +4786,10 @@ CardExpandableBody.displayName = "CardExpandableBody";
|
|
|
4780
4786
|
import { useId as useId4 } from "react";
|
|
4781
4787
|
|
|
4782
4788
|
// src/components/SelectionControl/Checkbox/CheckboxGroupContext.tsx
|
|
4783
|
-
import { createContext as createContext6, useContext as
|
|
4789
|
+
import { createContext as createContext6, useContext as useContext7 } from "react";
|
|
4784
4790
|
var CheckboxGroupContext = createContext6(null);
|
|
4785
4791
|
var useCheckboxGroup = () => {
|
|
4786
|
-
return
|
|
4792
|
+
return useContext7(CheckboxGroupContext);
|
|
4787
4793
|
};
|
|
4788
4794
|
|
|
4789
4795
|
// src/components/SelectionControl/SelectionControl.module.css
|
|
@@ -4980,7 +4986,6 @@ function convertBooleanishToBoolean(value) {
|
|
|
4980
4986
|
// src/components/InputMessage/InputMessage.module.css
|
|
4981
4987
|
var InputMessage_default = {
|
|
4982
4988
|
container: "InputMessage_container",
|
|
4983
|
-
"container--error": "InputMessage_container--error",
|
|
4984
4989
|
icon: "InputMessage_icon"
|
|
4985
4990
|
};
|
|
4986
4991
|
|
|
@@ -4996,41 +5001,72 @@ var InputMessage = ({
|
|
|
4996
5001
|
...rest
|
|
4997
5002
|
}) => {
|
|
4998
5003
|
const isError = messageType === "error";
|
|
4999
|
-
|
|
5000
|
-
"
|
|
5004
|
+
const commonProps = {
|
|
5005
|
+
display: "flex",
|
|
5006
|
+
width: "fit-content",
|
|
5007
|
+
maxWidth: "100%",
|
|
5008
|
+
wordBreak: "break-word",
|
|
5009
|
+
...getBaseHTMLProps(id, cn(className, InputMessage_default.container), htmlProps, rest)
|
|
5010
|
+
};
|
|
5011
|
+
const tgCommonProps = {
|
|
5012
|
+
as: "span",
|
|
5013
|
+
children: message != null ? message : children
|
|
5014
|
+
};
|
|
5015
|
+
return isError ? /* @__PURE__ */ jsxs34(
|
|
5016
|
+
Paper,
|
|
5001
5017
|
{
|
|
5002
|
-
...
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
),
|
|
5018
|
+
...commonProps,
|
|
5019
|
+
gap: "x0.25",
|
|
5020
|
+
padding: "x0.25 x0.5",
|
|
5021
|
+
background: "surface-danger-default",
|
|
5022
|
+
borderRadius: "surface",
|
|
5008
5023
|
children: [
|
|
5009
|
-
|
|
5024
|
+
/* @__PURE__ */ jsx213(
|
|
5025
|
+
Icon,
|
|
5026
|
+
{
|
|
5027
|
+
icon: ErrorIcon,
|
|
5028
|
+
iconSize: "small",
|
|
5029
|
+
className: InputMessage_default.icon,
|
|
5030
|
+
color: "icon-on-danger-default"
|
|
5031
|
+
}
|
|
5032
|
+
),
|
|
5010
5033
|
/* @__PURE__ */ jsx213(
|
|
5011
5034
|
Typography,
|
|
5012
5035
|
{
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
children: message != null ? message : children
|
|
5036
|
+
...tgCommonProps,
|
|
5037
|
+
typographyType: "bodySmall",
|
|
5038
|
+
color: "textDefault"
|
|
5017
5039
|
}
|
|
5018
5040
|
)
|
|
5019
5041
|
]
|
|
5020
5042
|
}
|
|
5021
|
-
)
|
|
5043
|
+
) : /* @__PURE__ */ jsx213(Box, { ...commonProps, children: /* @__PURE__ */ jsx213(
|
|
5044
|
+
Typography,
|
|
5045
|
+
{
|
|
5046
|
+
...tgCommonProps,
|
|
5047
|
+
typographyType: "bodyXsmall",
|
|
5048
|
+
color: "textSubtle"
|
|
5049
|
+
}
|
|
5050
|
+
) });
|
|
5022
5051
|
};
|
|
5023
5052
|
InputMessage.displayName = "InputMessage";
|
|
5024
|
-
var renderInputMessage = (
|
|
5025
|
-
|
|
5053
|
+
var renderInputMessage = ({
|
|
5054
|
+
tip,
|
|
5055
|
+
tipId,
|
|
5056
|
+
errorMessage,
|
|
5057
|
+
errorMessageId,
|
|
5058
|
+
noSpacing
|
|
5059
|
+
}) => /* @__PURE__ */ jsxs34(Fragment4, { children: [
|
|
5060
|
+
errorMessage && /* @__PURE__ */ jsx213(
|
|
5026
5061
|
InputMessage,
|
|
5027
5062
|
{
|
|
5028
5063
|
message: errorMessage,
|
|
5029
5064
|
messageType: "error",
|
|
5030
|
-
id: errorMessageId
|
|
5065
|
+
id: errorMessageId,
|
|
5066
|
+
marginBlock: !noSpacing ? "x0.125 0" : void 0
|
|
5031
5067
|
}
|
|
5032
5068
|
),
|
|
5033
|
-
tip &&
|
|
5069
|
+
tip && !errorMessage && /* @__PURE__ */ jsx213(InputMessage, { message: tip, messageType: "tip", id: tipId })
|
|
5034
5070
|
] });
|
|
5035
5071
|
|
|
5036
5072
|
// src/components/SelectionControl/Checkbox/CheckboxGroup.tsx
|
|
@@ -5082,7 +5118,7 @@ var CheckboxGroup = (props) => {
|
|
|
5082
5118
|
readOnly,
|
|
5083
5119
|
showRequiredStyling
|
|
5084
5120
|
}),
|
|
5085
|
-
renderInputMessage(tip, tipId),
|
|
5121
|
+
renderInputMessage({ tip, tipId }),
|
|
5086
5122
|
/* @__PURE__ */ jsx214(CheckboxGroupContext, { value: { ...contextProps }, children: /* @__PURE__ */ jsx214(
|
|
5087
5123
|
"div",
|
|
5088
5124
|
{
|
|
@@ -5093,7 +5129,7 @@ var CheckboxGroup = (props) => {
|
|
|
5093
5129
|
children
|
|
5094
5130
|
}
|
|
5095
5131
|
) }),
|
|
5096
|
-
renderInputMessage(
|
|
5132
|
+
renderInputMessage({ errorMessage, errorMessageId })
|
|
5097
5133
|
]
|
|
5098
5134
|
}
|
|
5099
5135
|
);
|
|
@@ -5104,10 +5140,10 @@ CheckboxGroup.displayName = "CheckboxGroup";
|
|
|
5104
5140
|
import { useId as useId6 } from "react";
|
|
5105
5141
|
|
|
5106
5142
|
// src/components/SelectionControl/RadioButton/RadioButtonGroupContext.tsx
|
|
5107
|
-
import { createContext as createContext7, useContext as
|
|
5143
|
+
import { createContext as createContext7, useContext as useContext8 } from "react";
|
|
5108
5144
|
var RadioButtonGroupContext = createContext7(null);
|
|
5109
5145
|
var useRadioButtonGroup = () => {
|
|
5110
|
-
return
|
|
5146
|
+
return useContext8(RadioButtonGroupContext);
|
|
5111
5147
|
};
|
|
5112
5148
|
|
|
5113
5149
|
// src/components/SelectionControl/RadioButton/RadioButton.tsx
|
|
@@ -5274,7 +5310,7 @@ var RadioButtonGroup = ({
|
|
|
5274
5310
|
readOnly,
|
|
5275
5311
|
showRequiredStyling
|
|
5276
5312
|
}),
|
|
5277
|
-
renderInputMessage(tip, tipId),
|
|
5313
|
+
renderInputMessage({ tip, tipId }),
|
|
5278
5314
|
/* @__PURE__ */ jsx216(RadioButtonGroupContext, { value: { ...contextProps }, children: /* @__PURE__ */ jsx216(
|
|
5279
5315
|
"div",
|
|
5280
5316
|
{
|
|
@@ -5286,7 +5322,7 @@ var RadioButtonGroup = ({
|
|
|
5286
5322
|
children
|
|
5287
5323
|
}
|
|
5288
5324
|
) }),
|
|
5289
|
-
renderInputMessage(
|
|
5325
|
+
renderInputMessage({ errorMessage, errorMessageId })
|
|
5290
5326
|
]
|
|
5291
5327
|
}
|
|
5292
5328
|
);
|
|
@@ -5294,9 +5330,9 @@ var RadioButtonGroup = ({
|
|
|
5294
5330
|
RadioButtonGroup.displayName = "RadioButtonGroup";
|
|
5295
5331
|
|
|
5296
5332
|
// src/components/Card/CardSelectionControl/CardSelectable.context.tsx
|
|
5297
|
-
import { createContext as createContext8, useContext as
|
|
5333
|
+
import { createContext as createContext8, useContext as useContext9 } from "react";
|
|
5298
5334
|
var CardSelectableContext = createContext8({});
|
|
5299
|
-
var useCardSelectableContext = () =>
|
|
5335
|
+
var useCardSelectableContext = () => useContext9(CardSelectableContext);
|
|
5300
5336
|
|
|
5301
5337
|
// src/components/Card/CardSelectionControl/CardSelectable.tsx
|
|
5302
5338
|
import { jsx as jsx217 } from "react/jsx-runtime";
|
|
@@ -5436,7 +5472,7 @@ var CardSelectableGroup = ({
|
|
|
5436
5472
|
);
|
|
5437
5473
|
return hasErrorMessage ? /* @__PURE__ */ jsxs38("div", { children: [
|
|
5438
5474
|
mainContent,
|
|
5439
|
-
renderInputMessage(
|
|
5475
|
+
renderInputMessage({ errorMessage, errorMessageId })
|
|
5440
5476
|
] }) : mainContent;
|
|
5441
5477
|
};
|
|
5442
5478
|
CardSelectableGroup.displayName = "CardSelectableGroup";
|
|
@@ -5672,7 +5708,7 @@ import {
|
|
|
5672
5708
|
import { useLocale as useLocale2 } from "@react-aria/i18n";
|
|
5673
5709
|
import { useCalendarState } from "@react-stately/calendar";
|
|
5674
5710
|
import {
|
|
5675
|
-
useContext as
|
|
5711
|
+
useContext as useContext12
|
|
5676
5712
|
} from "react";
|
|
5677
5713
|
|
|
5678
5714
|
// src/components/date-inputs/DatePicker/Calendar/CalendarGrid.tsx
|
|
@@ -5681,7 +5717,7 @@ import {
|
|
|
5681
5717
|
useCalendarGrid
|
|
5682
5718
|
} from "@react-aria/calendar";
|
|
5683
5719
|
import { useLocale } from "@react-aria/i18n";
|
|
5684
|
-
import { useContext as
|
|
5720
|
+
import { useContext as useContext11 } from "react";
|
|
5685
5721
|
|
|
5686
5722
|
// src/components/date-inputs/DatePicker/Calendar/CalendarCell.tsx
|
|
5687
5723
|
import { isToday } from "@internationalized/date";
|
|
@@ -5702,9 +5738,8 @@ var DateInput_default = {
|
|
|
5702
5738
|
"segment__placeholder--invisible": "DateInput_segment__placeholder--invisible",
|
|
5703
5739
|
"clear-button": "DateInput_clear-button",
|
|
5704
5740
|
"clear-button--inactive": "DateInput_clear-button--inactive",
|
|
5705
|
-
icon: "DateInput_icon",
|
|
5706
|
-
"popover-button": "DateInput_popover-button",
|
|
5707
5741
|
"icon-wrapper--disabled": "DateInput_icon-wrapper--disabled",
|
|
5742
|
+
"popover-button": "DateInput_popover-button",
|
|
5708
5743
|
"icon-wrapper--readonly": "DateInput_icon-wrapper--readonly",
|
|
5709
5744
|
"popover-button--readonly": "DateInput_popover-button--readonly",
|
|
5710
5745
|
popover: "DateInput_popover",
|
|
@@ -5843,7 +5878,7 @@ function isLeapYear(date) {
|
|
|
5843
5878
|
// src/components/date-inputs/DatePicker/CalendarPopover.tsx
|
|
5844
5879
|
import {
|
|
5845
5880
|
createContext as createContext9,
|
|
5846
|
-
useContext as
|
|
5881
|
+
useContext as useContext10,
|
|
5847
5882
|
useEffect as useEffect18,
|
|
5848
5883
|
useRef as useRef12
|
|
5849
5884
|
} from "react";
|
|
@@ -5875,7 +5910,7 @@ var CalendarPopover = ({
|
|
|
5875
5910
|
var CalendarPopoverAnchor = ({
|
|
5876
5911
|
children
|
|
5877
5912
|
}) => {
|
|
5878
|
-
const { anchorRef } =
|
|
5913
|
+
const { anchorRef } = useContext10(CalendarPopoverContext);
|
|
5879
5914
|
return /* @__PURE__ */ jsx226("div", { ref: anchorRef != null ? anchorRef : void 0, children });
|
|
5880
5915
|
};
|
|
5881
5916
|
var CalendarPopoverContent = ({
|
|
@@ -5888,13 +5923,13 @@ var CalendarPopoverContent = ({
|
|
|
5888
5923
|
const { refs, styles: floatingStyles } = useFloatPosition(null, {
|
|
5889
5924
|
placement: "bottom-start"
|
|
5890
5925
|
});
|
|
5891
|
-
const themeContext =
|
|
5926
|
+
const themeContext = useContext10(ThemeContext);
|
|
5892
5927
|
if (!themeContext) {
|
|
5893
5928
|
throw new Error("DatePicker must be used within a ThemeProvider");
|
|
5894
5929
|
}
|
|
5895
5930
|
const portalTarget = themeContext.el;
|
|
5896
5931
|
const { t } = useTranslation();
|
|
5897
|
-
const { isOpen, onClose, anchorRef, closeButtonRef } =
|
|
5932
|
+
const { isOpen, onClose, anchorRef, closeButtonRef } = useContext10(
|
|
5898
5933
|
CalendarPopoverContext
|
|
5899
5934
|
);
|
|
5900
5935
|
const hasTransitionedIn = useMountTransition(isOpen, 500);
|
|
@@ -5988,7 +6023,7 @@ function CalendarGrid({ state, ...props }) {
|
|
|
5988
6023
|
{ short: t(texts6.sa), full: t(texts6.saturday) },
|
|
5989
6024
|
{ short: t(texts6.su), full: t(texts6.sunday) }
|
|
5990
6025
|
];
|
|
5991
|
-
const { showWeekNumbers, onClose } =
|
|
6026
|
+
const { showWeekNumbers, onClose } = useContext11(CalendarPopoverContext);
|
|
5992
6027
|
const typographyCn = [
|
|
5993
6028
|
typographyStyles_default["body-xsmall"],
|
|
5994
6029
|
typographyStyles_default["text-color--subtle"]
|
|
@@ -6187,7 +6222,7 @@ function Calendar(props) {
|
|
|
6187
6222
|
nextButtonProps: { onPress: onNext },
|
|
6188
6223
|
title
|
|
6189
6224
|
} = useCalendar(props, state);
|
|
6190
|
-
const { onClose, closeButtonRef } =
|
|
6225
|
+
const { onClose, closeButtonRef } = useContext12(CalendarPopoverContext);
|
|
6191
6226
|
const closeOnKeyboardBlurBack = (event) => {
|
|
6192
6227
|
var _a;
|
|
6193
6228
|
if (event.key === "Tab" && event.shiftKey === true) {
|
|
@@ -6258,7 +6293,7 @@ var texts7 = createTexts({
|
|
|
6258
6293
|
import { useDatePicker } from "@react-aria/datepicker";
|
|
6259
6294
|
import { I18nProvider } from "@react-aria/i18n";
|
|
6260
6295
|
import { useDatePickerState } from "@react-stately/datepicker";
|
|
6261
|
-
import { useRef as useRef17 } from "react";
|
|
6296
|
+
import { useId as useId10, useRef as useRef17 } from "react";
|
|
6262
6297
|
|
|
6263
6298
|
// src/components/date-inputs/DatePicker/DateField/DateField.tsx
|
|
6264
6299
|
import {
|
|
@@ -6298,6 +6333,36 @@ var InlineIconButton = ({
|
|
|
6298
6333
|
);
|
|
6299
6334
|
InlineIconButton.displayName = "InlineIconButton";
|
|
6300
6335
|
|
|
6336
|
+
// src/components/helpers/Input/Input.module.css
|
|
6337
|
+
var Input_default = {
|
|
6338
|
+
container: "Input_container",
|
|
6339
|
+
"input-group": "Input_input-group",
|
|
6340
|
+
input: "Input_input",
|
|
6341
|
+
disabled: "Input_disabled",
|
|
6342
|
+
"read-only": "Input_read-only",
|
|
6343
|
+
"input--stateful": "Input_input--stateful",
|
|
6344
|
+
"input--hover": "Input_input--hover",
|
|
6345
|
+
"input--stateful-danger": "Input_input--stateful-danger",
|
|
6346
|
+
"input--large": "Input_input--large",
|
|
6347
|
+
"input--medium": "Input_input--medium",
|
|
6348
|
+
"input--small": "Input_input--small",
|
|
6349
|
+
"input--xsmall": "Input_input--xsmall",
|
|
6350
|
+
"input-with-icon--large": "Input_input-with-icon--large",
|
|
6351
|
+
"input-with-icon--medium": "Input_input-with-icon--medium",
|
|
6352
|
+
"input-with-icon--small": "Input_input-with-icon--small",
|
|
6353
|
+
"input-with-icon--xsmall": "Input_input-with-icon--xsmall",
|
|
6354
|
+
"input-with-el-right--large": "Input_input-with-el-right--large",
|
|
6355
|
+
"input-with-el-right--medium": "Input_input-with-el-right--medium",
|
|
6356
|
+
"input-with-el-right--small": "Input_input-with-el-right--small",
|
|
6357
|
+
"input-with-el-right--xsmall": "Input_input-with-el-right--xsmall",
|
|
6358
|
+
"input--with-affix": "Input_input--with-affix",
|
|
6359
|
+
"input-group__absolute-el": "Input_input-group__absolute-el",
|
|
6360
|
+
"input-group__absolute-el--large": "Input_input-group__absolute-el--large",
|
|
6361
|
+
"input-group__absolute-el--medium": "Input_input-group__absolute-el--medium",
|
|
6362
|
+
"input-group__absolute-el--small": "Input_input-group__absolute-el--small",
|
|
6363
|
+
"input-group__absolute-el--xsmall": "Input_input-group__absolute-el--xsmall"
|
|
6364
|
+
};
|
|
6365
|
+
|
|
6301
6366
|
// src/components/date-inputs/DatePicker/DateField/CalendarButton.tsx
|
|
6302
6367
|
import { jsx as jsx230 } from "react/jsx-runtime";
|
|
6303
6368
|
function CalendarButton({
|
|
@@ -6317,7 +6382,9 @@ function CalendarButton({
|
|
|
6317
6382
|
buttonProps.className,
|
|
6318
6383
|
DateInput_default["popover-button"],
|
|
6319
6384
|
isReadOnly && DateInput_default["popover-button--readonly"],
|
|
6320
|
-
!props.isDisabled && focusable
|
|
6385
|
+
!props.isDisabled && focusable,
|
|
6386
|
+
Input_default["input-group__absolute-el"],
|
|
6387
|
+
Input_default[`input-group__absolute-el--${componentSize}`]
|
|
6321
6388
|
),
|
|
6322
6389
|
icon: CalendarIcon,
|
|
6323
6390
|
size: getFormInputIconSize(componentSize)
|
|
@@ -6394,7 +6461,9 @@ var typographyTypes = {
|
|
|
6394
6461
|
function DateSegment({
|
|
6395
6462
|
segment,
|
|
6396
6463
|
state,
|
|
6397
|
-
componentSize
|
|
6464
|
+
componentSize,
|
|
6465
|
+
errorMessageId,
|
|
6466
|
+
tipId
|
|
6398
6467
|
}) {
|
|
6399
6468
|
const ref = useRef14(null);
|
|
6400
6469
|
const { segmentProps } = useDateSegment(segment, state, ref);
|
|
@@ -6402,6 +6471,10 @@ function DateSegment({
|
|
|
6402
6471
|
"div",
|
|
6403
6472
|
{
|
|
6404
6473
|
...segmentProps,
|
|
6474
|
+
"aria-describedby": spaceSeparatedIdListGenerator([
|
|
6475
|
+
errorMessageId ? errorMessageId : void 0,
|
|
6476
|
+
tipId ? tipId : void 0
|
|
6477
|
+
]),
|
|
6405
6478
|
ref,
|
|
6406
6479
|
className: cn(
|
|
6407
6480
|
segmentProps.className,
|
|
@@ -6450,24 +6523,7 @@ var ClearButton = ({
|
|
|
6450
6523
|
ClearButton.displayName = "ClearButton";
|
|
6451
6524
|
|
|
6452
6525
|
// src/components/date-inputs/common/DateInput.tsx
|
|
6453
|
-
import { useContext as
|
|
6454
|
-
|
|
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
|
-
};
|
|
6526
|
+
import { useContext as useContext13 } from "react";
|
|
6471
6527
|
|
|
6472
6528
|
// src/components/helpers/Input/Input.tsx
|
|
6473
6529
|
import { jsx as jsx233 } from "react/jsx-runtime";
|
|
@@ -6552,13 +6608,12 @@ function DateInput({
|
|
|
6552
6608
|
clearable,
|
|
6553
6609
|
ref,
|
|
6554
6610
|
afterLabelContent,
|
|
6611
|
+
tipId,
|
|
6612
|
+
errorMessageId,
|
|
6555
6613
|
...props
|
|
6556
6614
|
}) {
|
|
6557
|
-
var _a;
|
|
6558
6615
|
const hasErrorMessage = !!errorMessage;
|
|
6559
|
-
const
|
|
6560
|
-
const hasMessage = hasErrorMessage || hasTip;
|
|
6561
|
-
const { isOpen } = useContext12(CalendarPopoverContext);
|
|
6616
|
+
const { isOpen } = useContext13(CalendarPopoverContext);
|
|
6562
6617
|
return /* @__PURE__ */ jsxs46(
|
|
6563
6618
|
"div",
|
|
6564
6619
|
{
|
|
@@ -6583,6 +6638,7 @@ function DateInput({
|
|
|
6583
6638
|
Input_default["input--stateful"],
|
|
6584
6639
|
Input_default["input--hover"],
|
|
6585
6640
|
Input_default[`input--${componentSize}`],
|
|
6641
|
+
Input_default[`input-with-icon--${componentSize}`],
|
|
6586
6642
|
hasErrorMessage && Input_default["input--stateful-danger"],
|
|
6587
6643
|
DateInput_default["date-input"],
|
|
6588
6644
|
clearable && DateInput_default[`date-input--${componentSize}--clearable`],
|
|
@@ -6609,13 +6665,7 @@ function DateInput({
|
|
|
6609
6665
|
]
|
|
6610
6666
|
}
|
|
6611
6667
|
),
|
|
6612
|
-
|
|
6613
|
-
InputMessage,
|
|
6614
|
-
{
|
|
6615
|
-
messageType: hasErrorMessage ? "error" : "tip",
|
|
6616
|
-
message: (_a = errorMessage != null ? errorMessage : tip) != null ? _a : ""
|
|
6617
|
-
}
|
|
6618
|
-
)
|
|
6668
|
+
renderInputMessage({ tip, errorMessage, tipId, errorMessageId })
|
|
6619
6669
|
]
|
|
6620
6670
|
}
|
|
6621
6671
|
);
|
|
@@ -6630,6 +6680,8 @@ function DateField({
|
|
|
6630
6680
|
groupProps,
|
|
6631
6681
|
ref,
|
|
6632
6682
|
clearable,
|
|
6683
|
+
errorMessageId,
|
|
6684
|
+
tipId,
|
|
6633
6685
|
...props
|
|
6634
6686
|
}) {
|
|
6635
6687
|
const { locale } = useLocale3();
|
|
@@ -6663,6 +6715,8 @@ function DateField({
|
|
|
6663
6715
|
required: props.isRequired,
|
|
6664
6716
|
clearable,
|
|
6665
6717
|
ref,
|
|
6718
|
+
tipId,
|
|
6719
|
+
errorMessageId,
|
|
6666
6720
|
internalRef,
|
|
6667
6721
|
readOnly: props.isReadOnly,
|
|
6668
6722
|
prefix: /* @__PURE__ */ jsx236(
|
|
@@ -6695,6 +6749,8 @@ function DateField({
|
|
|
6695
6749
|
{
|
|
6696
6750
|
"aria-readonly": props.isReadOnly,
|
|
6697
6751
|
componentSize,
|
|
6752
|
+
errorMessageId,
|
|
6753
|
+
tipId,
|
|
6698
6754
|
segment,
|
|
6699
6755
|
state
|
|
6700
6756
|
},
|
|
@@ -6752,6 +6808,7 @@ function DatePicker({
|
|
|
6752
6808
|
ref,
|
|
6753
6809
|
...props
|
|
6754
6810
|
}) {
|
|
6811
|
+
var _a;
|
|
6755
6812
|
const lang = useLanguage();
|
|
6756
6813
|
if (!lang) {
|
|
6757
6814
|
throw new Error("DatePicker must be used within a DdsProvider");
|
|
@@ -6765,6 +6822,11 @@ function DatePicker({
|
|
|
6765
6822
|
state,
|
|
6766
6823
|
internalRef
|
|
6767
6824
|
);
|
|
6825
|
+
const hasErrorMessage = !!errorMessage;
|
|
6826
|
+
const hasTip = !!tip;
|
|
6827
|
+
const uniqueId = (_a = props.id) != null ? _a : useId10();
|
|
6828
|
+
const errorMessageId = hasErrorMessage ? `${uniqueId}-errorMessage` : void 0;
|
|
6829
|
+
const tipId = hasTip ? `${uniqueId}-tip` : void 0;
|
|
6768
6830
|
return /* @__PURE__ */ jsx237(I18nProvider, { locale: LOCALE[lang], children: /* @__PURE__ */ jsxs47(
|
|
6769
6831
|
CalendarPopover,
|
|
6770
6832
|
{
|
|
@@ -6780,8 +6842,11 @@ function DatePicker({
|
|
|
6780
6842
|
ref: combinedRef,
|
|
6781
6843
|
componentSize,
|
|
6782
6844
|
tip,
|
|
6845
|
+
id: uniqueId,
|
|
6783
6846
|
label: props.label,
|
|
6784
6847
|
errorMessage,
|
|
6848
|
+
errorMessageId,
|
|
6849
|
+
tipId,
|
|
6785
6850
|
buttonProps,
|
|
6786
6851
|
style,
|
|
6787
6852
|
width,
|
|
@@ -6798,7 +6863,7 @@ DatePicker.displayName = "DatePicker";
|
|
|
6798
6863
|
// src/components/date-inputs/TimePicker/TimePicker.tsx
|
|
6799
6864
|
import { useTimeField } from "@react-aria/datepicker";
|
|
6800
6865
|
import { useTimeFieldState } from "@react-stately/datepicker";
|
|
6801
|
-
import { useRef as useRef18 } from "react";
|
|
6866
|
+
import { useId as useId11, useRef as useRef18 } from "react";
|
|
6802
6867
|
|
|
6803
6868
|
// src/components/date-inputs/TimePicker/TimePicker.utils.ts
|
|
6804
6869
|
function formatTimeSegments(segments) {
|
|
@@ -6836,6 +6901,7 @@ function TimePicker({
|
|
|
6836
6901
|
ref,
|
|
6837
6902
|
...props
|
|
6838
6903
|
}) {
|
|
6904
|
+
var _a;
|
|
6839
6905
|
const lang = useLanguage();
|
|
6840
6906
|
if (!lang) {
|
|
6841
6907
|
throw new Error("TimePicker must be used within a DdsProvider");
|
|
@@ -6850,6 +6916,11 @@ function TimePicker({
|
|
|
6850
6916
|
state,
|
|
6851
6917
|
internalRef
|
|
6852
6918
|
);
|
|
6919
|
+
const hasErrorMessage = !!props.errorMessage;
|
|
6920
|
+
const hasTip = !!props.tip;
|
|
6921
|
+
const uniqueId = (_a = props.id) != null ? _a : useId11();
|
|
6922
|
+
const errorMessageId = hasErrorMessage ? `${uniqueId}-errorMessage` : void 0;
|
|
6923
|
+
const tipId = hasTip ? `${uniqueId}-tip` : void 0;
|
|
6853
6924
|
const iconSize = componentSize === "xsmall" ? "small" : "medium";
|
|
6854
6925
|
const disabled = props.isDisabled || !!fieldProps["aria-disabled"];
|
|
6855
6926
|
const formattedSegments = formatTimeSegments(state.segments);
|
|
@@ -6857,6 +6928,8 @@ function TimePicker({
|
|
|
6857
6928
|
DateInput,
|
|
6858
6929
|
{
|
|
6859
6930
|
...props,
|
|
6931
|
+
errorMessageId,
|
|
6932
|
+
tipId,
|
|
6860
6933
|
width,
|
|
6861
6934
|
disabled,
|
|
6862
6935
|
required: props.isRequired,
|
|
@@ -6872,7 +6945,8 @@ function TimePicker({
|
|
|
6872
6945
|
icon: TimeIcon,
|
|
6873
6946
|
iconSize,
|
|
6874
6947
|
className: cn(
|
|
6875
|
-
|
|
6948
|
+
Input_default["input-group__absolute-el"],
|
|
6949
|
+
Input_default[`input-group__absolute-el--${componentSize}`],
|
|
6876
6950
|
disabled && DateInput_default["icon-wrapper--disabled"],
|
|
6877
6951
|
props.isReadOnly && DateInput_default["icon-wrapper--readonly"]
|
|
6878
6952
|
)
|
|
@@ -6881,6 +6955,8 @@ function TimePicker({
|
|
|
6881
6955
|
children: formattedSegments.map((segment, i) => /* @__PURE__ */ jsx238(
|
|
6882
6956
|
DateSegment,
|
|
6883
6957
|
{
|
|
6958
|
+
errorMessageId,
|
|
6959
|
+
tipId,
|
|
6884
6960
|
componentSize,
|
|
6885
6961
|
segment,
|
|
6886
6962
|
state
|
|
@@ -7030,9 +7106,9 @@ var DetailList_default = {
|
|
|
7030
7106
|
};
|
|
7031
7107
|
|
|
7032
7108
|
// src/components/DetailList/DetailList.context.tsx
|
|
7033
|
-
import { createContext as createContext10, useContext as
|
|
7109
|
+
import { createContext as createContext10, useContext as useContext14 } from "react";
|
|
7034
7110
|
var DetailListContext = createContext10({});
|
|
7035
|
-
var useDetailListContext = () =>
|
|
7111
|
+
var useDetailListContext = () => useContext14(DetailListContext);
|
|
7036
7112
|
|
|
7037
7113
|
// src/components/DetailList/DetailList.tsx
|
|
7038
7114
|
import { jsx as jsx243 } from "react/jsx-runtime";
|
|
@@ -7106,7 +7182,7 @@ DetailListTerm.displayName = "DetailListTerm";
|
|
|
7106
7182
|
|
|
7107
7183
|
// src/components/Drawer/Drawer.tsx
|
|
7108
7184
|
import {
|
|
7109
|
-
useContext as
|
|
7185
|
+
useContext as useContext16,
|
|
7110
7186
|
useEffect as useEffect19,
|
|
7111
7187
|
useRef as useRef19
|
|
7112
7188
|
} from "react";
|
|
@@ -7127,9 +7203,9 @@ var Drawer_default = {
|
|
|
7127
7203
|
};
|
|
7128
7204
|
|
|
7129
7205
|
// src/components/Drawer/Drawer.context.tsx
|
|
7130
|
-
import { createContext as createContext11, useContext as
|
|
7206
|
+
import { createContext as createContext11, useContext as useContext15 } from "react";
|
|
7131
7207
|
var DrawerContext = createContext11({});
|
|
7132
|
-
var useDrawerContext = () =>
|
|
7208
|
+
var useDrawerContext = () => useContext15(DrawerContext);
|
|
7133
7209
|
|
|
7134
7210
|
// src/components/Drawer/Drawer.tsx
|
|
7135
7211
|
import { jsx as jsx247, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
@@ -7147,7 +7223,7 @@ var Drawer = ({
|
|
|
7147
7223
|
ref,
|
|
7148
7224
|
...rest
|
|
7149
7225
|
}) => {
|
|
7150
|
-
const themeContext =
|
|
7226
|
+
const themeContext = useContext16(ThemeContext);
|
|
7151
7227
|
if (!themeContext) {
|
|
7152
7228
|
throw new Error("Drawer must be used within a ThemeProvider");
|
|
7153
7229
|
}
|
|
@@ -7284,7 +7360,7 @@ import {
|
|
|
7284
7360
|
Children as ReactChildren2,
|
|
7285
7361
|
cloneElement as cloneElement2,
|
|
7286
7362
|
isValidElement as isValidElement3,
|
|
7287
|
-
useId as
|
|
7363
|
+
useId as useId12,
|
|
7288
7364
|
useRef as useRef20,
|
|
7289
7365
|
useState as useState13
|
|
7290
7366
|
} from "react";
|
|
@@ -7303,7 +7379,7 @@ var DrawerGroup = ({
|
|
|
7303
7379
|
propIsOpen != null ? propIsOpen : internalIsOpen,
|
|
7304
7380
|
propSetIsOpen != null ? propSetIsOpen : internalSetIsOpen
|
|
7305
7381
|
];
|
|
7306
|
-
const generatedId =
|
|
7382
|
+
const generatedId = useId12();
|
|
7307
7383
|
const uniqueDrawerId = drawerId != null ? drawerId : `${generatedId}-drawer`;
|
|
7308
7384
|
const triggerRef = useRef20(null);
|
|
7309
7385
|
const open = () => setIsOpen(true);
|
|
@@ -7378,7 +7454,7 @@ function EmptyContent({
|
|
|
7378
7454
|
EmptyContent.displayName = "EmptyContent";
|
|
7379
7455
|
|
|
7380
7456
|
// src/components/FavStar/FavStar.tsx
|
|
7381
|
-
import { useId as
|
|
7457
|
+
import { useId as useId13 } from "react";
|
|
7382
7458
|
|
|
7383
7459
|
// src/components/FavStar/FavStar.module.css
|
|
7384
7460
|
var FavStar_default = {
|
|
@@ -7410,7 +7486,7 @@ var FavStar = ({
|
|
|
7410
7486
|
htmlProps,
|
|
7411
7487
|
rest
|
|
7412
7488
|
);
|
|
7413
|
-
const generatedId =
|
|
7489
|
+
const generatedId = useId13();
|
|
7414
7490
|
const [checked, setChecked] = useControllableState({
|
|
7415
7491
|
value: checkedProp,
|
|
7416
7492
|
defaultValue: defaultChecked != null ? defaultChecked : false,
|
|
@@ -7480,7 +7556,7 @@ var Feedback_default = {
|
|
|
7480
7556
|
// src/components/TextArea/TextArea.tsx
|
|
7481
7557
|
import {
|
|
7482
7558
|
useEffect as useEffect20,
|
|
7483
|
-
useId as
|
|
7559
|
+
useId as useId15,
|
|
7484
7560
|
useRef as useRef21,
|
|
7485
7561
|
useState as useState14
|
|
7486
7562
|
} from "react";
|
|
@@ -7491,7 +7567,7 @@ var TextArea_default = {
|
|
|
7491
7567
|
};
|
|
7492
7568
|
|
|
7493
7569
|
// src/components/helpers/CharCounter/CharCounter.tsx
|
|
7494
|
-
import { useId as
|
|
7570
|
+
import { useId as useId14 } from "react";
|
|
7495
7571
|
|
|
7496
7572
|
// src/components/helpers/CharCounter/CharCounter.module.css
|
|
7497
7573
|
var CharCounter_default = {
|
|
@@ -7503,7 +7579,7 @@ import { jsx as jsx251, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
|
7503
7579
|
function CharCounter(props) {
|
|
7504
7580
|
const { t } = useTranslation();
|
|
7505
7581
|
const { current, max, id } = props;
|
|
7506
|
-
const generatedId =
|
|
7582
|
+
const generatedId = useId14();
|
|
7507
7583
|
const uniqueId = id != null ? id : `${generatedId}-characterCounter`;
|
|
7508
7584
|
return /* @__PURE__ */ jsxs53(
|
|
7509
7585
|
Typography,
|
|
@@ -7560,7 +7636,7 @@ var TextArea = ({
|
|
|
7560
7636
|
ref,
|
|
7561
7637
|
...rest
|
|
7562
7638
|
}) => {
|
|
7563
|
-
const generatedId =
|
|
7639
|
+
const generatedId = useId15();
|
|
7564
7640
|
const uniqueId = id != null ? id : `${generatedId}-textArea`;
|
|
7565
7641
|
const textAreaRef = useRef21(null);
|
|
7566
7642
|
const multiRef = useCombinedRef(ref, textAreaRef);
|
|
@@ -7630,7 +7706,7 @@ var TextArea = ({
|
|
|
7630
7706
|
justifyContent: withCharacterCounter ? hasMessage ? "space-between" : "flex-end" : void 0,
|
|
7631
7707
|
width: withCharacterCounter ? inputWidth : void 0,
|
|
7632
7708
|
children: [
|
|
7633
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId),
|
|
7709
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId }),
|
|
7634
7710
|
renderCharCounter(
|
|
7635
7711
|
characterCounterId,
|
|
7636
7712
|
withCharacterCounter,
|
|
@@ -7713,7 +7789,7 @@ import {
|
|
|
7713
7789
|
Children as ReactChildren3,
|
|
7714
7790
|
cloneElement as cloneElement3,
|
|
7715
7791
|
useEffect as useEffect21,
|
|
7716
|
-
useId as
|
|
7792
|
+
useId as useId16,
|
|
7717
7793
|
useRef as useRef22,
|
|
7718
7794
|
useState as useState15
|
|
7719
7795
|
} from "react";
|
|
@@ -7744,7 +7820,7 @@ var Tooltip = ({
|
|
|
7744
7820
|
htmlProps,
|
|
7745
7821
|
...rest
|
|
7746
7822
|
}) => {
|
|
7747
|
-
const generatedId =
|
|
7823
|
+
const generatedId = useId16();
|
|
7748
7824
|
const uniqueTooltipId = tooltipId != null ? tooltipId : `${generatedId}-tooltip`;
|
|
7749
7825
|
const [open, setOpen] = useState15(false);
|
|
7750
7826
|
const [inView, setInView] = useState15(keepMounted ? false : true);
|
|
@@ -8086,7 +8162,7 @@ var FieldsetGroup = ({
|
|
|
8086
8162
|
FieldsetGroup.displayName = "FieldsetGroup";
|
|
8087
8163
|
|
|
8088
8164
|
// src/components/FileUploader/FileUploader.tsx
|
|
8089
|
-
import { useId as
|
|
8165
|
+
import { useId as useId17 } from "react";
|
|
8090
8166
|
|
|
8091
8167
|
// src/components/FileUploader/ErrorList.tsx
|
|
8092
8168
|
import { jsx as jsx259 } from "react/jsx-runtime";
|
|
@@ -8096,14 +8172,10 @@ var ErrorList = (props) => {
|
|
|
8096
8172
|
return null;
|
|
8097
8173
|
}
|
|
8098
8174
|
if (errors.length === 1) {
|
|
8099
|
-
return
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
|
|
8103
|
-
message: errors[0].message,
|
|
8104
|
-
messageType: "error"
|
|
8105
|
-
}
|
|
8106
|
-
);
|
|
8175
|
+
return renderInputMessage({
|
|
8176
|
+
errorMessage: errors[0].message,
|
|
8177
|
+
errorMessageId: errors[0].id
|
|
8178
|
+
});
|
|
8107
8179
|
}
|
|
8108
8180
|
return /* @__PURE__ */ jsx259(StylelessList, { children: errors.map(({ id, message }) => {
|
|
8109
8181
|
return /* @__PURE__ */ jsx259("li", { children: /* @__PURE__ */ jsx259(
|
|
@@ -8560,7 +8632,7 @@ var FileUploader = (props) => {
|
|
|
8560
8632
|
const { t } = useTranslation();
|
|
8561
8633
|
const tDropAreaLabel = dropAreaLabel != null ? dropAreaLabel : t(texts17.dragAndDropOr);
|
|
8562
8634
|
const tBtnLabel = btnLabel != null ? btnLabel : t(texts17.selectFile);
|
|
8563
|
-
const generatedId =
|
|
8635
|
+
const generatedId = useId17();
|
|
8564
8636
|
const uniqueId = id != null ? id : `${generatedId}-fileUploader`;
|
|
8565
8637
|
const {
|
|
8566
8638
|
state: { files: stateFiles, isDragActive, rootErrors },
|
|
@@ -8653,7 +8725,7 @@ var FileUploader = (props) => {
|
|
|
8653
8725
|
readOnly,
|
|
8654
8726
|
afterLabelContent
|
|
8655
8727
|
}),
|
|
8656
|
-
|
|
8728
|
+
renderInputMessage({ tip, tipId }),
|
|
8657
8729
|
inactive ? input : withDragAndDrop ? /* @__PURE__ */ jsxs59(
|
|
8658
8730
|
VStack,
|
|
8659
8731
|
{
|
|
@@ -9011,14 +9083,14 @@ import { useRef as useRef25 } from "react";
|
|
|
9011
9083
|
// src/components/InlineEdit/InlineEdit.context.tsx
|
|
9012
9084
|
import {
|
|
9013
9085
|
createContext as createContext12,
|
|
9014
|
-
useContext as
|
|
9086
|
+
useContext as useContext17,
|
|
9015
9087
|
useState as useState18
|
|
9016
9088
|
} from "react";
|
|
9017
9089
|
import { jsx as jsx274 } from "react/jsx-runtime";
|
|
9018
9090
|
var InlineEditContext = createContext12(
|
|
9019
9091
|
{}
|
|
9020
9092
|
);
|
|
9021
|
-
var useInlineEditContext = () =>
|
|
9093
|
+
var useInlineEditContext = () => useContext17(InlineEditContext);
|
|
9022
9094
|
var InlineEditContextProvider = (props) => {
|
|
9023
9095
|
const {
|
|
9024
9096
|
emptiable,
|
|
@@ -9076,7 +9148,7 @@ var InlineEditContextProvider = (props) => {
|
|
|
9076
9148
|
InlineEditContextProvider.displayName = "InlineEditContextProvider";
|
|
9077
9149
|
|
|
9078
9150
|
// src/components/InlineEdit/InlineField.tsx
|
|
9079
|
-
import { useId as
|
|
9151
|
+
import { useId as useId18, useRef as useRef24 } from "react";
|
|
9080
9152
|
|
|
9081
9153
|
// src/components/InlineEdit/InlineEdit.module.css
|
|
9082
9154
|
var InlineEdit_default = {
|
|
@@ -9181,7 +9253,7 @@ function InlineField(props) {
|
|
|
9181
9253
|
} = props;
|
|
9182
9254
|
const { onBlur, onChange, onFocus, isEditing, value, emptiable } = useInlineEditContext();
|
|
9183
9255
|
const { t } = useTranslation();
|
|
9184
|
-
const generatedId =
|
|
9256
|
+
const generatedId = useId18();
|
|
9185
9257
|
const uniqueId = id != null ? id : `${generatedId}-InlineEdit`;
|
|
9186
9258
|
const hasErrorMessage = !!errorMessage;
|
|
9187
9259
|
const hasErrorState = !!error || hasErrorMessage;
|
|
@@ -9277,7 +9349,7 @@ function InlineField(props) {
|
|
|
9277
9349
|
renderElement()
|
|
9278
9350
|
] }),
|
|
9279
9351
|
inlineEditVisuallyHidden(descId, emptiable),
|
|
9280
|
-
renderInputMessage(
|
|
9352
|
+
renderInputMessage({ errorMessage, errorMessageId })
|
|
9281
9353
|
] });
|
|
9282
9354
|
}
|
|
9283
9355
|
|
|
@@ -9699,9 +9771,9 @@ LocalMessage.displayName = "LocalMessage";
|
|
|
9699
9771
|
|
|
9700
9772
|
// src/components/Modal/Modal.tsx
|
|
9701
9773
|
import {
|
|
9702
|
-
useContext as
|
|
9774
|
+
useContext as useContext18,
|
|
9703
9775
|
useEffect as useEffect24,
|
|
9704
|
-
useId as
|
|
9776
|
+
useId as useId19,
|
|
9705
9777
|
useRef as useRef28
|
|
9706
9778
|
} from "react";
|
|
9707
9779
|
import { createPortal as createPortal3 } from "react-dom";
|
|
@@ -9733,7 +9805,7 @@ var Modal = ({
|
|
|
9733
9805
|
ref,
|
|
9734
9806
|
...rest
|
|
9735
9807
|
}) => {
|
|
9736
|
-
const generatedId =
|
|
9808
|
+
const generatedId = useId19();
|
|
9737
9809
|
const modalId = id != null ? id : `${generatedId}-modal`;
|
|
9738
9810
|
const headerId = `${modalId}-header`;
|
|
9739
9811
|
const modalRef = useFocusTrap(isOpen, initialFocusRef);
|
|
@@ -9745,7 +9817,7 @@ var Modal = ({
|
|
|
9745
9817
|
onClose();
|
|
9746
9818
|
}
|
|
9747
9819
|
};
|
|
9748
|
-
const themeContext =
|
|
9820
|
+
const themeContext = useContext18(ThemeContext);
|
|
9749
9821
|
if (!themeContext) {
|
|
9750
9822
|
throw new Error("Modal must be used within a ThemeProvider");
|
|
9751
9823
|
}
|
|
@@ -9923,8 +9995,8 @@ function PaginationGenerator(pagesAmount, activePage) {
|
|
|
9923
9995
|
// src/components/Select/Select.tsx
|
|
9924
9996
|
import {
|
|
9925
9997
|
useCallback as useCallback7,
|
|
9926
|
-
useContext as
|
|
9927
|
-
useId as
|
|
9998
|
+
useContext as useContext19,
|
|
9999
|
+
useId as useId20
|
|
9928
10000
|
} from "react";
|
|
9929
10001
|
import {
|
|
9930
10002
|
default as ReactSelect
|
|
@@ -9991,7 +10063,7 @@ var control = {
|
|
|
9991
10063
|
...optionTypography.medium
|
|
9992
10064
|
},
|
|
9993
10065
|
hasIcon: {
|
|
9994
|
-
paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-
|
|
10066
|
+
paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-md-icon-text-gap))"
|
|
9995
10067
|
}
|
|
9996
10068
|
},
|
|
9997
10069
|
small: {
|
|
@@ -10001,7 +10073,7 @@ var control = {
|
|
|
10001
10073
|
...optionTypography.small
|
|
10002
10074
|
},
|
|
10003
10075
|
hasIcon: {
|
|
10004
|
-
paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-
|
|
10076
|
+
paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-sm-icon-text-gap))"
|
|
10005
10077
|
}
|
|
10006
10078
|
},
|
|
10007
10079
|
xsmall: {
|
|
@@ -10011,7 +10083,7 @@ var control = {
|
|
|
10011
10083
|
...optionTypography.xsmall
|
|
10012
10084
|
},
|
|
10013
10085
|
hasIcon: {
|
|
10014
|
-
paddingLeft: "calc(var(--dds-spacing-x0-5) + var(--dds-icon-size-small) + var(--dds-spacing-
|
|
10086
|
+
paddingLeft: "calc(var(--dds-spacing-x0-5) + var(--dds-icon-size-small) + var(--dds-spacing-xs-icon-text-gap))"
|
|
10015
10087
|
}
|
|
10016
10088
|
}
|
|
10017
10089
|
};
|
|
@@ -10311,7 +10383,7 @@ function DDSControl(props) {
|
|
|
10311
10383
|
icon,
|
|
10312
10384
|
iconSize: getFormInputIconSize(componentSize),
|
|
10313
10385
|
className: cn(
|
|
10314
|
-
Input_default["input-group__absolute-
|
|
10386
|
+
Input_default["input-group__absolute-el"],
|
|
10315
10387
|
Select_default[`icon--${componentSize}`]
|
|
10316
10388
|
)
|
|
10317
10389
|
}
|
|
@@ -10355,12 +10427,12 @@ function Select({
|
|
|
10355
10427
|
afterLabelContent,
|
|
10356
10428
|
...rest
|
|
10357
10429
|
}) {
|
|
10358
|
-
const themeContext =
|
|
10430
|
+
const themeContext = useContext19(ThemeContext);
|
|
10359
10431
|
if (!themeContext) {
|
|
10360
10432
|
throw new Error("Select must be used within a ThemeProvider");
|
|
10361
10433
|
}
|
|
10362
10434
|
const portalTarget = menuPortalTarget != null ? menuPortalTarget : themeContext == null ? void 0 : themeContext.el;
|
|
10363
|
-
const generatedId =
|
|
10435
|
+
const generatedId = useId20();
|
|
10364
10436
|
const uniqueId = id != null ? id : `${generatedId}-select`;
|
|
10365
10437
|
const singleValueId = !isMulti ? `${uniqueId}-singleValue` : void 0;
|
|
10366
10438
|
const hasErrorMessage = !!errorMessage;
|
|
@@ -10441,7 +10513,7 @@ function Select({
|
|
|
10441
10513
|
placeholder: placeholder ? placeholder : "",
|
|
10442
10514
|
closeMenuOnSelect: closeMenuOnSelect ? closeMenuOnSelect : isMulti ? false : true,
|
|
10443
10515
|
isMulti,
|
|
10444
|
-
instanceId: instanceId != null ? instanceId :
|
|
10516
|
+
instanceId: instanceId != null ? instanceId : useId20(),
|
|
10445
10517
|
inputId: uniqueId,
|
|
10446
10518
|
name: uniqueId,
|
|
10447
10519
|
menuPortalTarget: portalTarget,
|
|
@@ -10492,7 +10564,7 @@ function Select({
|
|
|
10492
10564
|
afterLabelContent
|
|
10493
10565
|
}),
|
|
10494
10566
|
/* @__PURE__ */ jsx288(ReactSelect, { ...reactSelectProps, ref }),
|
|
10495
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
10567
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId })
|
|
10496
10568
|
]
|
|
10497
10569
|
}
|
|
10498
10570
|
);
|
|
@@ -10500,7 +10572,7 @@ function Select({
|
|
|
10500
10572
|
Select.displayName = "Select";
|
|
10501
10573
|
|
|
10502
10574
|
// src/components/Select/NativeSelect/NativeSelect.tsx
|
|
10503
|
-
import { useEffect as useEffect25, useId as
|
|
10575
|
+
import { useEffect as useEffect25, useId as useId21, useRef as useRef29, useState as useState21 } from "react";
|
|
10504
10576
|
|
|
10505
10577
|
// src/components/Select/NativeSelect/NativeSelect.module.css
|
|
10506
10578
|
var NativeSelect_default = {
|
|
@@ -10540,6 +10612,7 @@ var NativeSelect = ({
|
|
|
10540
10612
|
clearable,
|
|
10541
10613
|
afterLabelContent,
|
|
10542
10614
|
onChange,
|
|
10615
|
+
icon,
|
|
10543
10616
|
...rest
|
|
10544
10617
|
}) => {
|
|
10545
10618
|
const { t } = useTranslation();
|
|
@@ -10563,7 +10636,7 @@ var NativeSelect = ({
|
|
|
10563
10636
|
}
|
|
10564
10637
|
}
|
|
10565
10638
|
}, [clearable]);
|
|
10566
|
-
const generatedId =
|
|
10639
|
+
const generatedId = useId21();
|
|
10567
10640
|
const uniqueId = id != null ? id : `${generatedId}-native-select`;
|
|
10568
10641
|
const hasErrorMessage = !!errorMessage;
|
|
10569
10642
|
const hasTip = !!tip;
|
|
@@ -10585,6 +10658,7 @@ var NativeSelect = ({
|
|
|
10585
10658
|
};
|
|
10586
10659
|
const iconSize = componentSize === "medium" ? "medium" : "small";
|
|
10587
10660
|
const showClearButton = clearable && hasValue && !readOnly && !rest.disabled;
|
|
10661
|
+
const hasIcon = !!icon;
|
|
10588
10662
|
return /* @__PURE__ */ jsxs69("div", { className, style, children: [
|
|
10589
10663
|
renderLabel({
|
|
10590
10664
|
label,
|
|
@@ -10594,6 +10668,17 @@ var NativeSelect = ({
|
|
|
10594
10668
|
afterLabelContent
|
|
10595
10669
|
}),
|
|
10596
10670
|
/* @__PURE__ */ jsxs69(Box, { position: "relative", width: inputWidth, children: [
|
|
10671
|
+
hasIcon && /* @__PURE__ */ jsx289(
|
|
10672
|
+
Icon,
|
|
10673
|
+
{
|
|
10674
|
+
icon,
|
|
10675
|
+
className: cn(
|
|
10676
|
+
Input_default["input-group__absolute-el"],
|
|
10677
|
+
Input_default[`input-group__absolute-el--${componentSize}`]
|
|
10678
|
+
),
|
|
10679
|
+
iconSize: getFormInputIconSize(componentSize)
|
|
10680
|
+
}
|
|
10681
|
+
),
|
|
10597
10682
|
/* @__PURE__ */ jsx289(
|
|
10598
10683
|
"select",
|
|
10599
10684
|
{
|
|
@@ -10605,6 +10690,7 @@ var NativeSelect = ({
|
|
|
10605
10690
|
readOnly && NativeSelect_default["select--readonly"],
|
|
10606
10691
|
Input_default.input,
|
|
10607
10692
|
Input_default[`input--${componentSize}`],
|
|
10693
|
+
hasIcon && Input_default[`input-with-icon--${componentSize}`],
|
|
10608
10694
|
NativeSelect_default[`select--${componentSize}`],
|
|
10609
10695
|
scrollbar,
|
|
10610
10696
|
focusable,
|
|
@@ -10646,7 +10732,7 @@ var NativeSelect = ({
|
|
|
10646
10732
|
}
|
|
10647
10733
|
)
|
|
10648
10734
|
] }),
|
|
10649
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
10735
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId })
|
|
10650
10736
|
] });
|
|
10651
10737
|
};
|
|
10652
10738
|
var NativeSelectPlaceholder = ({
|
|
@@ -11013,7 +11099,7 @@ var texts21 = createTexts({
|
|
|
11013
11099
|
// src/components/PhoneInput/PhoneInput.tsx
|
|
11014
11100
|
import {
|
|
11015
11101
|
useEffect as useEffect26,
|
|
11016
|
-
useId as
|
|
11102
|
+
useId as useId22,
|
|
11017
11103
|
useLayoutEffect as useLayoutEffect2,
|
|
11018
11104
|
useRef as useRef30,
|
|
11019
11105
|
useState as useState23
|
|
@@ -11479,7 +11565,7 @@ var PhoneInput = ({
|
|
|
11479
11565
|
const { t } = useTranslation();
|
|
11480
11566
|
const tGroupLabel = groupLabel != null ? groupLabel : t(texts22.countryCodeAndPhoneNumber);
|
|
11481
11567
|
const tSelectLabel = selectLabel != null ? selectLabel : t(texts22.countryCode);
|
|
11482
|
-
const generatedId =
|
|
11568
|
+
const generatedId = useId22();
|
|
11483
11569
|
const uniqueId = (_a = props.id) != null ? _a : generatedId;
|
|
11484
11570
|
const phoneInputId = `${uniqueId}-phone-input`;
|
|
11485
11571
|
const phoneNumberId = `${uniqueId}-phone-number`;
|
|
@@ -11607,7 +11693,7 @@ var PhoneInput = ({
|
|
|
11607
11693
|
{
|
|
11608
11694
|
className: cn(
|
|
11609
11695
|
typographyStyles_default[`body-${componentSize}`],
|
|
11610
|
-
Input_default["input-group__absolute-
|
|
11696
|
+
Input_default["input-group__absolute-el"],
|
|
11611
11697
|
PhoneInput_default["calling-code"]
|
|
11612
11698
|
),
|
|
11613
11699
|
ref: callingCodeRef,
|
|
@@ -11644,7 +11730,7 @@ var PhoneInput = ({
|
|
|
11644
11730
|
]
|
|
11645
11731
|
}
|
|
11646
11732
|
),
|
|
11647
|
-
hasMessage && renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
11733
|
+
hasMessage && renderInputMessage({ tip, tipId, errorMessage, errorMessageId })
|
|
11648
11734
|
] });
|
|
11649
11735
|
};
|
|
11650
11736
|
PhoneInput.displayName = "PhoneInput";
|
|
@@ -11671,9 +11757,9 @@ var texts22 = createTexts({
|
|
|
11671
11757
|
|
|
11672
11758
|
// src/components/Popover/Popover.tsx
|
|
11673
11759
|
import {
|
|
11674
|
-
useContext as
|
|
11760
|
+
useContext as useContext21,
|
|
11675
11761
|
useEffect as useEffect27,
|
|
11676
|
-
useId as
|
|
11762
|
+
useId as useId23
|
|
11677
11763
|
} from "react";
|
|
11678
11764
|
import { createPortal as createPortal4 } from "react-dom";
|
|
11679
11765
|
|
|
@@ -11688,10 +11774,10 @@ var Popover_default = {
|
|
|
11688
11774
|
// src/components/Popover/Popover.context.tsx
|
|
11689
11775
|
import {
|
|
11690
11776
|
createContext as createContext13,
|
|
11691
|
-
useContext as
|
|
11777
|
+
useContext as useContext20
|
|
11692
11778
|
} from "react";
|
|
11693
11779
|
var PopoverContext = createContext13({});
|
|
11694
|
-
var usePopoverContext = () =>
|
|
11780
|
+
var usePopoverContext = () => useContext20(PopoverContext);
|
|
11695
11781
|
|
|
11696
11782
|
// src/components/Popover/Popover.tsx
|
|
11697
11783
|
import { jsx as jsx292, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
@@ -11721,7 +11807,7 @@ var Popover = ({
|
|
|
11721
11807
|
});
|
|
11722
11808
|
const { maxHeight, maxWidth, minHeight, minWidth, height, width } = sizeProps;
|
|
11723
11809
|
const context = usePopoverContext();
|
|
11724
|
-
const themeContext =
|
|
11810
|
+
const themeContext = useContext21(ThemeContext);
|
|
11725
11811
|
const portalTarget = parentElement != null ? parentElement : themeContext == null ? void 0 : themeContext.el;
|
|
11726
11812
|
const {
|
|
11727
11813
|
floatStyling: contextFloatStyling,
|
|
@@ -11734,7 +11820,7 @@ var Popover = ({
|
|
|
11734
11820
|
} = context;
|
|
11735
11821
|
const { t } = useTranslation();
|
|
11736
11822
|
const hasContext = !isEmpty(context);
|
|
11737
|
-
const generatedId =
|
|
11823
|
+
const generatedId = useId23();
|
|
11738
11824
|
const uniquePopoverId = id != null ? id : `${generatedId}-popover`;
|
|
11739
11825
|
const [
|
|
11740
11826
|
popoverId,
|
|
@@ -11844,7 +11930,7 @@ import {
|
|
|
11844
11930
|
Children as ReactChildren4,
|
|
11845
11931
|
cloneElement as cloneElement4,
|
|
11846
11932
|
isValidElement as isValidElement4,
|
|
11847
|
-
useId as
|
|
11933
|
+
useId as useId24,
|
|
11848
11934
|
useRef as useRef31,
|
|
11849
11935
|
useState as useState24
|
|
11850
11936
|
} from "react";
|
|
@@ -11862,7 +11948,7 @@ var PopoverGroup = ({
|
|
|
11862
11948
|
const [internalIsOpen, internalSetIsOpen] = useState24(isInitiallyOpen);
|
|
11863
11949
|
const open = propIsOpen != null ? propIsOpen : internalIsOpen;
|
|
11864
11950
|
const setOpen = propSetIsOpen != null ? propSetIsOpen : internalSetIsOpen;
|
|
11865
|
-
const generatedId =
|
|
11951
|
+
const generatedId = useId24();
|
|
11866
11952
|
const uniquePopoverId = popoverId != null ? popoverId : `${generatedId}-popover`;
|
|
11867
11953
|
const [floatOptions, setFloatOptions] = useState24();
|
|
11868
11954
|
const { refs, styles: positionStyles } = useFloatPosition(null, floatOptions);
|
|
@@ -11938,14 +12024,14 @@ import {
|
|
|
11938
12024
|
} from "react";
|
|
11939
12025
|
|
|
11940
12026
|
// src/components/ProgressTracker/ProgressTracker.context.tsx
|
|
11941
|
-
import { createContext as createContext14, useContext as
|
|
12027
|
+
import { createContext as createContext14, useContext as useContext22 } from "react";
|
|
11942
12028
|
var ProgressTrackerContext = createContext14(
|
|
11943
12029
|
{
|
|
11944
12030
|
activeStep: 0,
|
|
11945
12031
|
direction: "column"
|
|
11946
12032
|
}
|
|
11947
12033
|
);
|
|
11948
|
-
var useProgressTrackerContext = () =>
|
|
12034
|
+
var useProgressTrackerContext = () => useContext22(ProgressTrackerContext);
|
|
11949
12035
|
|
|
11950
12036
|
// src/components/ProgressTracker/ProgressTracker.module.css
|
|
11951
12037
|
var ProgressTracker_default = {
|
|
@@ -12210,7 +12296,7 @@ var texts24 = createTexts({
|
|
|
12210
12296
|
});
|
|
12211
12297
|
|
|
12212
12298
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
12213
|
-
import { useId as
|
|
12299
|
+
import { useId as useId25 } from "react";
|
|
12214
12300
|
|
|
12215
12301
|
// src/components/ProgressBar/ProgressBar.module.css
|
|
12216
12302
|
var ProgressBar_default = {
|
|
@@ -12239,7 +12325,7 @@ var ProgressBar = ({
|
|
|
12239
12325
|
style,
|
|
12240
12326
|
...rest
|
|
12241
12327
|
}) => {
|
|
12242
|
-
const generatedId =
|
|
12328
|
+
const generatedId = useId25();
|
|
12243
12329
|
const uniqueId = id != null ? id : `${generatedId}-searchInput`;
|
|
12244
12330
|
const hasErrorMessage = !!errorMessage;
|
|
12245
12331
|
const hasTip = !!tip;
|
|
@@ -12288,32 +12374,31 @@ var ProgressBar = ({
|
|
|
12288
12374
|
)
|
|
12289
12375
|
}
|
|
12290
12376
|
),
|
|
12291
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
12377
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId })
|
|
12292
12378
|
] });
|
|
12293
12379
|
};
|
|
12294
12380
|
ProgressBar.displayName = "ProgressBar";
|
|
12295
12381
|
|
|
12296
12382
|
// src/components/Search/Search.tsx
|
|
12297
12383
|
import {
|
|
12298
|
-
useId as
|
|
12384
|
+
useId as useId26,
|
|
12299
12385
|
useState as useState26
|
|
12300
12386
|
} from "react";
|
|
12301
12387
|
|
|
12302
12388
|
// src/components/Search/AutocompleteSearch.context.tsx
|
|
12303
12389
|
import {
|
|
12304
12390
|
createContext as createContext15,
|
|
12305
|
-
useContext as
|
|
12391
|
+
useContext as useContext23
|
|
12306
12392
|
} from "react";
|
|
12307
12393
|
var AutocompleteSearchContext = createContext15({});
|
|
12308
12394
|
var useAutocompleteSearch = () => {
|
|
12309
|
-
return
|
|
12395
|
+
return useContext23(AutocompleteSearchContext);
|
|
12310
12396
|
};
|
|
12311
12397
|
|
|
12312
12398
|
// src/components/Search/Search.module.css
|
|
12313
12399
|
var Search_default = {
|
|
12314
12400
|
"with-button-container": "Search_with-button-container",
|
|
12315
12401
|
input: "Search_input",
|
|
12316
|
-
"search-icon": "Search_search-icon",
|
|
12317
12402
|
"clear-button": "Search_clear-button",
|
|
12318
12403
|
suggestions: "Search_suggestions"
|
|
12319
12404
|
};
|
|
@@ -12459,29 +12544,10 @@ var getIconSize2 = (size2) => {
|
|
|
12459
12544
|
case "large":
|
|
12460
12545
|
return "medium";
|
|
12461
12546
|
case "medium":
|
|
12462
|
-
return "medium";
|
|
12463
12547
|
case "small":
|
|
12464
|
-
return
|
|
12548
|
+
return getFormInputIconSize(size2);
|
|
12465
12549
|
}
|
|
12466
12550
|
};
|
|
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
12551
|
var Search = ({
|
|
12486
12552
|
componentSize = "medium",
|
|
12487
12553
|
buttonProps,
|
|
@@ -12500,7 +12566,7 @@ var Search = ({
|
|
|
12500
12566
|
...rest
|
|
12501
12567
|
}) => {
|
|
12502
12568
|
var _a;
|
|
12503
|
-
const generatedId =
|
|
12569
|
+
const generatedId = useId26();
|
|
12504
12570
|
const uniqueId = id != null ? id : `${generatedId}-searchInput`;
|
|
12505
12571
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
12506
12572
|
const suggestionsId = derivativeIdGenerator(uniqueId, "suggestions");
|
|
@@ -12542,8 +12608,8 @@ var Search = ({
|
|
|
12542
12608
|
icon: SearchIcon,
|
|
12543
12609
|
iconSize: getIconSize2(componentSize),
|
|
12544
12610
|
className: cn(
|
|
12545
|
-
Input_default["input-group__absolute-
|
|
12546
|
-
|
|
12611
|
+
Input_default["input-group__absolute-el"],
|
|
12612
|
+
Input_default[`input-group__absolute-el--${componentSize}`]
|
|
12547
12613
|
)
|
|
12548
12614
|
}
|
|
12549
12615
|
),
|
|
@@ -12569,9 +12635,11 @@ var Search = ({
|
|
|
12569
12635
|
"aria-expanded": context.showSuggestions,
|
|
12570
12636
|
role: hasSuggestions ? "combobox" : void 0,
|
|
12571
12637
|
width: "100%",
|
|
12572
|
-
padding: getPadding(componentSize, showIcon),
|
|
12573
12638
|
className: cn(
|
|
12574
12639
|
Search_default.input,
|
|
12640
|
+
Input_default[`input--${componentSize}`],
|
|
12641
|
+
showIcon && Input_default[`input-with-icon--${componentSize}`],
|
|
12642
|
+
Input_default[`input-with-el-right--${componentSize}`],
|
|
12575
12643
|
typographyStyles_default[getTypographyCn(typographyTypes2[componentSize])]
|
|
12576
12644
|
)
|
|
12577
12645
|
}
|
|
@@ -12630,7 +12698,7 @@ var Search = ({
|
|
|
12630
12698
|
]
|
|
12631
12699
|
}
|
|
12632
12700
|
) : inputGroup,
|
|
12633
|
-
renderInputMessage(tip, tipId)
|
|
12701
|
+
renderInputMessage({ tip, tipId })
|
|
12634
12702
|
] })
|
|
12635
12703
|
] });
|
|
12636
12704
|
};
|
|
@@ -12886,12 +12954,12 @@ import {
|
|
|
12886
12954
|
} from "react";
|
|
12887
12955
|
|
|
12888
12956
|
// src/components/Table/collapsible/Table.context.tsx
|
|
12889
|
-
import { createContext as createContext16, useContext as
|
|
12957
|
+
import { createContext as createContext16, useContext as useContext24 } from "react";
|
|
12890
12958
|
var CollapsibleTableContext = createContext16({
|
|
12891
12959
|
headerValues: [],
|
|
12892
12960
|
definingColumnIndex: [0]
|
|
12893
12961
|
});
|
|
12894
|
-
var useCollapsibleTableContext = () =>
|
|
12962
|
+
var useCollapsibleTableContext = () => useContext24(CollapsibleTableContext);
|
|
12895
12963
|
|
|
12896
12964
|
// src/components/Table/normal/Body.tsx
|
|
12897
12965
|
import { jsx as jsx304 } from "react/jsx-runtime";
|
|
@@ -12899,12 +12967,12 @@ var Body = (props) => /* @__PURE__ */ jsx304("tbody", { ...props });
|
|
|
12899
12967
|
Body.displayName = "Table.Body";
|
|
12900
12968
|
|
|
12901
12969
|
// src/components/Table/normal/Head.tsx
|
|
12902
|
-
import { createContext as createContext17, useContext as
|
|
12970
|
+
import { createContext as createContext17, useContext as useContext25 } from "react";
|
|
12903
12971
|
import { jsx as jsx305 } from "react/jsx-runtime";
|
|
12904
12972
|
var Head = ({ children, ...rest }) => /* @__PURE__ */ jsx305("thead", { ...rest, children: /* @__PURE__ */ jsx305(HeadContext, { value: true, children }) });
|
|
12905
12973
|
var HeadContext = createContext17(false);
|
|
12906
12974
|
function useIsInTableHead() {
|
|
12907
|
-
const isInTableHead =
|
|
12975
|
+
const isInTableHead = useContext25(HeadContext);
|
|
12908
12976
|
return isInTableHead;
|
|
12909
12977
|
}
|
|
12910
12978
|
|
|
@@ -13082,14 +13150,14 @@ Table.displayName = "Table";
|
|
|
13082
13150
|
|
|
13083
13151
|
// src/components/Table/normal/TableWrapper.tsx
|
|
13084
13152
|
import {
|
|
13085
|
-
useContext as
|
|
13153
|
+
useContext as useContext26,
|
|
13086
13154
|
useEffect as useEffect31,
|
|
13087
13155
|
useRef as useRef34,
|
|
13088
13156
|
useState as useState29
|
|
13089
13157
|
} from "react";
|
|
13090
13158
|
import { jsx as jsx311 } from "react/jsx-runtime";
|
|
13091
13159
|
var TableWrapper = ({ className, ...rest }) => {
|
|
13092
|
-
const themeContext =
|
|
13160
|
+
const themeContext = useContext26(ThemeContext);
|
|
13093
13161
|
const container2 = themeContext == null ? void 0 : themeContext.el;
|
|
13094
13162
|
const containerWidth = container2 ? container2.clientWidth : 0;
|
|
13095
13163
|
const [overflowX, setOverflowX] = useState29(false);
|
|
@@ -13283,7 +13351,7 @@ CollapsibleTable2.Row = CollapsibleRow;
|
|
|
13283
13351
|
import { useRef as useRef35 } from "react";
|
|
13284
13352
|
|
|
13285
13353
|
// src/components/Tabs/Tabs.context.tsx
|
|
13286
|
-
import { createContext as createContext18, useContext as
|
|
13354
|
+
import { createContext as createContext18, useContext as useContext27 } from "react";
|
|
13287
13355
|
var TabsContext = createContext18({
|
|
13288
13356
|
activeTab: 0,
|
|
13289
13357
|
tabsId: "",
|
|
@@ -13296,7 +13364,7 @@ var TabsContext = createContext18({
|
|
|
13296
13364
|
tabContentDirection: "row",
|
|
13297
13365
|
addTabButtonProps: void 0
|
|
13298
13366
|
});
|
|
13299
|
-
var useTabsContext = () =>
|
|
13367
|
+
var useTabsContext = () => useContext27(TabsContext);
|
|
13300
13368
|
|
|
13301
13369
|
// src/components/Tabs/Tabs.module.css
|
|
13302
13370
|
var Tabs_default = {
|
|
@@ -13316,7 +13384,7 @@ var Tabs_default = {
|
|
|
13316
13384
|
// src/components/Tabs/TabWidthContext.tsx
|
|
13317
13385
|
import {
|
|
13318
13386
|
createContext as createContext19,
|
|
13319
|
-
useContext as
|
|
13387
|
+
useContext as useContext28,
|
|
13320
13388
|
useLayoutEffect as useLayoutEffect3
|
|
13321
13389
|
} from "react";
|
|
13322
13390
|
import { jsx as jsx314 } from "react/jsx-runtime";
|
|
@@ -13349,7 +13417,7 @@ function TabWidthContextProvider({
|
|
|
13349
13417
|
);
|
|
13350
13418
|
}
|
|
13351
13419
|
function useSetTabWidth(index, width) {
|
|
13352
|
-
const context =
|
|
13420
|
+
const context = useContext28(TabContext);
|
|
13353
13421
|
useLayoutEffect3(() => {
|
|
13354
13422
|
context == null ? void 0 : context.updateWidth(index, width);
|
|
13355
13423
|
return () => context == null ? void 0 : context.removeTab(index);
|
|
@@ -13392,7 +13460,7 @@ var AddTabButton = ({
|
|
|
13392
13460
|
AddTabButton.displayName = "AddTabButton";
|
|
13393
13461
|
|
|
13394
13462
|
// src/components/Tabs/Tabs.tsx
|
|
13395
|
-
import { useEffect as useEffect33, useId as
|
|
13463
|
+
import { useEffect as useEffect33, useId as useId27, useRef as useRef36, useState as useState31 } from "react";
|
|
13396
13464
|
import { jsx as jsx316 } from "react/jsx-runtime";
|
|
13397
13465
|
var TABS_SIZES = createSizes("small", "medium");
|
|
13398
13466
|
var Tabs = ({
|
|
@@ -13408,7 +13476,7 @@ var Tabs = ({
|
|
|
13408
13476
|
htmlProps,
|
|
13409
13477
|
...rest
|
|
13410
13478
|
}) => {
|
|
13411
|
-
const generatedId =
|
|
13479
|
+
const generatedId = useId27();
|
|
13412
13480
|
const uniqueId = id != null ? id : `${generatedId}-tabs`;
|
|
13413
13481
|
const [thisActiveTab, setActiveTab] = useState31(activeTab != null ? activeTab : 0);
|
|
13414
13482
|
const [hasTabFocus, setHasTabFocus] = useState31(false);
|
|
@@ -13739,17 +13807,13 @@ var Tag = ({
|
|
|
13739
13807
|
Tag.displayName = "Tag";
|
|
13740
13808
|
|
|
13741
13809
|
// src/components/TextInput/TextInput.tsx
|
|
13742
|
-
import { useId as
|
|
13810
|
+
import { useId as useId28, useLayoutEffect as useLayoutEffect4, useRef as useRef38, useState as useState33 } from "react";
|
|
13743
13811
|
|
|
13744
13812
|
// src/components/TextInput/TextInput.module.css
|
|
13745
13813
|
var TextInput_default = {
|
|
13746
13814
|
container: "TextInput_container",
|
|
13747
13815
|
"container--readonly": "TextInput_container--readonly",
|
|
13748
13816
|
"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
13817
|
"input--extended": "TextInput_input--extended",
|
|
13754
13818
|
"icon--medium": "TextInput_icon--medium",
|
|
13755
13819
|
"icon--small": "TextInput_icon--small",
|
|
@@ -13810,7 +13874,7 @@ var TextInput = ({
|
|
|
13810
13874
|
onChange(event);
|
|
13811
13875
|
}
|
|
13812
13876
|
};
|
|
13813
|
-
const generatedId =
|
|
13877
|
+
const generatedId = useId28();
|
|
13814
13878
|
const uniqueId = id != null ? id : `${generatedId}-textInput`;
|
|
13815
13879
|
const hasErrorMessage = !!errorMessage;
|
|
13816
13880
|
const hasTip = !!tip;
|
|
@@ -13863,7 +13927,8 @@ var TextInput = ({
|
|
|
13863
13927
|
icon,
|
|
13864
13928
|
iconSize: getFormInputIconSize(componentSize),
|
|
13865
13929
|
className: cn(
|
|
13866
|
-
Input_default["input-group__absolute-
|
|
13930
|
+
Input_default["input-group__absolute-el"],
|
|
13931
|
+
Input_default[`input-group__absolute-el--${componentSize}`],
|
|
13867
13932
|
TextInput_default[`icon--${componentSize}`]
|
|
13868
13933
|
)
|
|
13869
13934
|
}
|
|
@@ -13872,8 +13937,7 @@ var TextInput = ({
|
|
|
13872
13937
|
StatefulInput,
|
|
13873
13938
|
{
|
|
13874
13939
|
className: cn(
|
|
13875
|
-
|
|
13876
|
-
TextInput_default[`with-icon--${componentSize}`],
|
|
13940
|
+
Input_default[`input-with-icon--${componentSize}`],
|
|
13877
13941
|
TextInput_default["input--extended"]
|
|
13878
13942
|
),
|
|
13879
13943
|
...generalInputProps
|
|
@@ -13958,7 +14022,7 @@ var TextInput = ({
|
|
|
13958
14022
|
gap: "x0.5",
|
|
13959
14023
|
width: withCharacterCounter ? inputWidth : void 0,
|
|
13960
14024
|
children: [
|
|
13961
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId),
|
|
14025
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId }),
|
|
13962
14026
|
renderCharCounter(
|
|
13963
14027
|
characterCounterId,
|
|
13964
14028
|
withCharacterCounter,
|
|
@@ -13975,7 +14039,7 @@ var TextInput = ({
|
|
|
13975
14039
|
TextInput.displayName = "TextInput";
|
|
13976
14040
|
|
|
13977
14041
|
// src/components/Toggle/Toggle.tsx
|
|
13978
|
-
import { useId as
|
|
14042
|
+
import { useId as useId29 } from "react";
|
|
13979
14043
|
|
|
13980
14044
|
// src/components/Toggle/Toggle.module.css
|
|
13981
14045
|
var Toggle_default = {
|
|
@@ -14010,7 +14074,7 @@ var Toggle = ({
|
|
|
14010
14074
|
...rest
|
|
14011
14075
|
}) => {
|
|
14012
14076
|
const { t } = useTranslation();
|
|
14013
|
-
const generatedId =
|
|
14077
|
+
const generatedId = useId29();
|
|
14014
14078
|
const uniqueId = id != null ? id : `${generatedId}-toggle`;
|
|
14015
14079
|
const iconSize = size2 === "large" ? "medium" : "small";
|
|
14016
14080
|
const [checked, setChecked] = useControllableState({
|
|
@@ -14080,14 +14144,14 @@ var Toggle = ({
|
|
|
14080
14144
|
Toggle.displayName = "Toggle";
|
|
14081
14145
|
|
|
14082
14146
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
14083
|
-
import { useId as
|
|
14147
|
+
import { useId as useId30, useState as useState34 } from "react";
|
|
14084
14148
|
|
|
14085
14149
|
// src/components/ToggleBar/ToggleBar.context.tsx
|
|
14086
|
-
import { createContext as createContext20, useContext as
|
|
14150
|
+
import { createContext as createContext20, useContext as useContext29 } from "react";
|
|
14087
14151
|
var ToggleBarContext = createContext20({
|
|
14088
14152
|
size: "medium"
|
|
14089
14153
|
});
|
|
14090
|
-
var useToggleBarContext = () =>
|
|
14154
|
+
var useToggleBarContext = () => useContext29(ToggleBarContext);
|
|
14091
14155
|
|
|
14092
14156
|
// src/components/ToggleBar/ToggleBar.module.css
|
|
14093
14157
|
var ToggleBar_default = {
|
|
@@ -14120,7 +14184,7 @@ var ToggleBar = (props) => {
|
|
|
14120
14184
|
id,
|
|
14121
14185
|
...rest
|
|
14122
14186
|
} = props;
|
|
14123
|
-
const generatedId =
|
|
14187
|
+
const generatedId = useId30();
|
|
14124
14188
|
const uniqueId = id != null ? id : `${generatedId}-ToggleBar`;
|
|
14125
14189
|
const [groupValue, setGroupValue] = useState34(value);
|
|
14126
14190
|
const handleChange = combineHandlers(
|
|
@@ -14157,7 +14221,7 @@ var ToggleBar = (props) => {
|
|
|
14157
14221
|
ToggleBar.displayName = "ToggleBar";
|
|
14158
14222
|
|
|
14159
14223
|
// src/components/ToggleBar/ToggleRadio.tsx
|
|
14160
|
-
import { useId as
|
|
14224
|
+
import { useId as useId31 } from "react";
|
|
14161
14225
|
import { jsx as jsx325, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
14162
14226
|
var typographyTypes3 = {
|
|
14163
14227
|
large: "bodyLarge",
|
|
@@ -14189,7 +14253,7 @@ var ToggleRadio = ({
|
|
|
14189
14253
|
id,
|
|
14190
14254
|
...rest
|
|
14191
14255
|
}) => {
|
|
14192
|
-
const generatedId =
|
|
14256
|
+
const generatedId = useId31();
|
|
14193
14257
|
const uniqueId = id != null ? id : `${generatedId}-ToggleRadio`;
|
|
14194
14258
|
const group = useToggleBarContext();
|
|
14195
14259
|
const handleChange = (event) => {
|
|
@@ -14238,7 +14302,7 @@ var ToggleRadio = ({
|
|
|
14238
14302
|
ToggleRadio.displayName = "ToggleRadio";
|
|
14239
14303
|
|
|
14240
14304
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
14241
|
-
import { useId as
|
|
14305
|
+
import { useId as useId32 } from "react";
|
|
14242
14306
|
|
|
14243
14307
|
// src/components/ToggleButton/ToggleButton.module.css
|
|
14244
14308
|
var ToggleButton_default = {
|
|
@@ -14259,7 +14323,7 @@ var ToggleButton = ({
|
|
|
14259
14323
|
htmlProps,
|
|
14260
14324
|
...rest
|
|
14261
14325
|
}) => {
|
|
14262
|
-
const generatedId =
|
|
14326
|
+
const generatedId = useId32();
|
|
14263
14327
|
const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
|
|
14264
14328
|
const hasIcon = !!icon;
|
|
14265
14329
|
return /* @__PURE__ */ jsxs88(Box, { as: "label", htmlFor: uniqueId, width: "fit-content", children: [
|
|
@@ -14297,7 +14361,7 @@ var ToggleButton = ({
|
|
|
14297
14361
|
ToggleButton.displayName = "ToggleButton";
|
|
14298
14362
|
|
|
14299
14363
|
// src/components/ToggleButton/ToggleButtonGroup.tsx
|
|
14300
|
-
import { useId as
|
|
14364
|
+
import { useId as useId33 } from "react";
|
|
14301
14365
|
import { jsx as jsx327, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
14302
14366
|
var ToggleButtonGroup = (props) => {
|
|
14303
14367
|
const {
|
|
@@ -14310,7 +14374,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
14310
14374
|
htmlProps,
|
|
14311
14375
|
...rest
|
|
14312
14376
|
} = props;
|
|
14313
|
-
const generatedId =
|
|
14377
|
+
const generatedId = useId33();
|
|
14314
14378
|
const uniqueLabelId = labelId != null ? labelId : `${generatedId}-ToggleButtonGroupLabel`;
|
|
14315
14379
|
return /* @__PURE__ */ jsxs89(
|
|
14316
14380
|
"div",
|