@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.js
CHANGED
|
@@ -1444,6 +1444,7 @@ var layout_default = {
|
|
|
1444
1444
|
"dds-o-y": "layout_dds-o-y",
|
|
1445
1445
|
"dds-display": "layout_dds-display",
|
|
1446
1446
|
"dds-text-align": "layout_dds-text-align",
|
|
1447
|
+
"dds-word-break": "layout_dds-word-break",
|
|
1447
1448
|
"dds-flex-dir": "layout_dds-flex-dir",
|
|
1448
1449
|
"dds-gap": "layout_dds-gap",
|
|
1449
1450
|
"dds-c-gap": "layout_dds-c-gap",
|
|
@@ -4086,7 +4087,7 @@ var Breadcrumb = ({ children, ref, ...rest }) => {
|
|
|
4086
4087
|
Breadcrumb.displayName = "Breadcrumb";
|
|
4087
4088
|
|
|
4088
4089
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
4089
|
-
var
|
|
4090
|
+
var import_react26 = require("react");
|
|
4090
4091
|
|
|
4091
4092
|
// src/components/Breadcrumbs/Breadcrumbs.module.css
|
|
4092
4093
|
var Breadcrumbs_default = {
|
|
@@ -4670,24 +4671,29 @@ var OverflowMenuSpan = ({
|
|
|
4670
4671
|
OverflowMenuSpan.displayName = "OverflowMenuSpan";
|
|
4671
4672
|
|
|
4672
4673
|
// src/components/OverflowMenu/components/OverflowMenuListHeader.tsx
|
|
4674
|
+
var import_react24 = require("react");
|
|
4673
4675
|
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
4674
4676
|
var OverflowMenuListHeader = ({
|
|
4675
4677
|
className,
|
|
4676
4678
|
...rest
|
|
4677
|
-
}) =>
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4679
|
+
}) => {
|
|
4680
|
+
const themeContext = (0, import_react24.useContext)(ThemeContext);
|
|
4681
|
+
const headingStyle = (themeContext == null ? void 0 : themeContext.theme) === "core" ? "heading-xsmall" : "heading-xxsmall";
|
|
4682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
4683
|
+
Box,
|
|
4684
|
+
{
|
|
4685
|
+
as: "h2",
|
|
4686
|
+
paddingInline: "x0.75",
|
|
4687
|
+
paddingBlock: "x0.75 0",
|
|
4688
|
+
...rest,
|
|
4689
|
+
className: cn(className, typographyStyles_default[headingStyle])
|
|
4690
|
+
}
|
|
4691
|
+
);
|
|
4692
|
+
};
|
|
4687
4693
|
OverflowMenuListHeader.displayName = "OverflowMenuListHeader";
|
|
4688
4694
|
|
|
4689
4695
|
// src/components/OverflowMenu/OverflowMenuGroup.tsx
|
|
4690
|
-
var
|
|
4696
|
+
var import_react25 = require("react");
|
|
4691
4697
|
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
4692
4698
|
var OverflowMenuGroup = ({
|
|
4693
4699
|
children,
|
|
@@ -4698,21 +4704,21 @@ var OverflowMenuGroup = ({
|
|
|
4698
4704
|
isInitiallyOpen = false,
|
|
4699
4705
|
overflowMenuId
|
|
4700
4706
|
}) => {
|
|
4701
|
-
const [internalIsOpen, internalSetIsOpen] = (0,
|
|
4707
|
+
const [internalIsOpen, internalSetIsOpen] = (0, import_react25.useState)(isInitiallyOpen);
|
|
4702
4708
|
const [isOpen, setIsOpen] = [
|
|
4703
4709
|
propIsOpen != null ? propIsOpen : internalIsOpen,
|
|
4704
4710
|
propSetIsOpen != null ? propSetIsOpen : internalSetIsOpen
|
|
4705
4711
|
];
|
|
4706
4712
|
const toggle = () => setIsOpen(!isOpen);
|
|
4707
4713
|
const close = () => setIsOpen(false);
|
|
4708
|
-
const generatedId = (0,
|
|
4714
|
+
const generatedId = (0, import_react25.useId)();
|
|
4709
4715
|
const uniqueOverflowMenuId = overflowMenuId != null ? overflowMenuId : `${generatedId}-overflowMenu`;
|
|
4710
|
-
const [floatOptions, setFloatOptions] = (0,
|
|
4716
|
+
const [floatOptions, setFloatOptions] = (0, import_react25.useState)();
|
|
4711
4717
|
const { refs, styles: positionStyles } = useFloatPosition(null, floatOptions);
|
|
4712
|
-
const buttonRef = (0,
|
|
4718
|
+
const buttonRef = (0, import_react25.useRef)(null);
|
|
4713
4719
|
const anchorRef = refs.setReference;
|
|
4714
4720
|
const combinedAnchorRef = useCombinedRef(buttonRef, anchorRef);
|
|
4715
|
-
const menuRef = (0,
|
|
4721
|
+
const menuRef = (0, import_react25.useRef)(null);
|
|
4716
4722
|
const floatingRef = refs.setFloating;
|
|
4717
4723
|
const combinedMenuRef = useCombinedRef(menuRef, floatingRef);
|
|
4718
4724
|
const handleClose = () => {
|
|
@@ -4740,8 +4746,8 @@ var OverflowMenuGroup = ({
|
|
|
4740
4746
|
useOnKeyDown(["Tab"], () => {
|
|
4741
4747
|
handleClose();
|
|
4742
4748
|
});
|
|
4743
|
-
const Children7 =
|
|
4744
|
-
return (0,
|
|
4749
|
+
const Children7 = import_react25.Children.map(children, (child, childIndex) => {
|
|
4750
|
+
return (0, import_react25.isValidElement)(child) && (childIndex === 0 ? (0, import_react25.cloneElement)(child, {
|
|
4745
4751
|
"aria-haspopup": "menu",
|
|
4746
4752
|
"aria-controls": uniqueOverflowMenuId,
|
|
4747
4753
|
"aria-expanded": isOpen,
|
|
@@ -4783,7 +4789,7 @@ var Breadcrumbs = ({
|
|
|
4783
4789
|
}
|
|
4784
4790
|
);
|
|
4785
4791
|
const { t } = useTranslation();
|
|
4786
|
-
const childrenArray =
|
|
4792
|
+
const childrenArray = import_react26.Children.toArray(children);
|
|
4787
4793
|
const responsiveLiProps = {
|
|
4788
4794
|
as: "li",
|
|
4789
4795
|
alignItems: "center",
|
|
@@ -4805,7 +4811,7 @@ var Breadcrumbs = ({
|
|
|
4805
4811
|
);
|
|
4806
4812
|
});
|
|
4807
4813
|
const bChildrenTruncated = childrenArray.length > 2 ? childrenArray.slice(1, childrenArray.length - 1).map((item, index) => {
|
|
4808
|
-
if ((0,
|
|
4814
|
+
if ((0, import_react26.isValidElement)(item)) {
|
|
4809
4815
|
if (isAnchorTypographyProps(item.props)) {
|
|
4810
4816
|
return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(OverflowMenuLink, { href: item.props.href, children: item.props.children }, index);
|
|
4811
4817
|
} else
|
|
@@ -5141,13 +5147,13 @@ var CardExpandableBody = ({
|
|
|
5141
5147
|
CardExpandableBody.displayName = "CardExpandableBody";
|
|
5142
5148
|
|
|
5143
5149
|
// src/components/SelectionControl/Checkbox/Checkbox.tsx
|
|
5144
|
-
var
|
|
5150
|
+
var import_react28 = require("react");
|
|
5145
5151
|
|
|
5146
5152
|
// src/components/SelectionControl/Checkbox/CheckboxGroupContext.tsx
|
|
5147
|
-
var
|
|
5148
|
-
var CheckboxGroupContext = (0,
|
|
5153
|
+
var import_react27 = require("react");
|
|
5154
|
+
var CheckboxGroupContext = (0, import_react27.createContext)(null);
|
|
5149
5155
|
var useCheckboxGroup = () => {
|
|
5150
|
-
return (0,
|
|
5156
|
+
return (0, import_react27.useContext)(CheckboxGroupContext);
|
|
5151
5157
|
};
|
|
5152
5158
|
|
|
5153
5159
|
// src/components/SelectionControl/SelectionControl.module.css
|
|
@@ -5268,7 +5274,7 @@ var Checkbox = ({
|
|
|
5268
5274
|
children,
|
|
5269
5275
|
...rest
|
|
5270
5276
|
}) => {
|
|
5271
|
-
const generatedId = (0,
|
|
5277
|
+
const generatedId = (0, import_react28.useId)();
|
|
5272
5278
|
const uniqueId = id != null ? id : `${generatedId}-checkbox`;
|
|
5273
5279
|
const checkboxGroup = useCheckboxGroup();
|
|
5274
5280
|
const hasLabel = !!label;
|
|
@@ -5328,7 +5334,7 @@ var Checkbox = ({
|
|
|
5328
5334
|
Checkbox.displayName = "Checkbox";
|
|
5329
5335
|
|
|
5330
5336
|
// src/components/SelectionControl/Checkbox/CheckboxGroup.tsx
|
|
5331
|
-
var
|
|
5337
|
+
var import_react29 = require("react");
|
|
5332
5338
|
|
|
5333
5339
|
// src/types/Booleanish.ts
|
|
5334
5340
|
function convertBooleanishToBoolean(value) {
|
|
@@ -5344,7 +5350,6 @@ function convertBooleanishToBoolean(value) {
|
|
|
5344
5350
|
// src/components/InputMessage/InputMessage.module.css
|
|
5345
5351
|
var InputMessage_default = {
|
|
5346
5352
|
container: "InputMessage_container",
|
|
5347
|
-
"container--error": "InputMessage_container--error",
|
|
5348
5353
|
icon: "InputMessage_icon"
|
|
5349
5354
|
};
|
|
5350
5355
|
|
|
@@ -5360,41 +5365,72 @@ var InputMessage = ({
|
|
|
5360
5365
|
...rest
|
|
5361
5366
|
}) => {
|
|
5362
5367
|
const isError = messageType === "error";
|
|
5363
|
-
|
|
5364
|
-
"
|
|
5368
|
+
const commonProps = {
|
|
5369
|
+
display: "flex",
|
|
5370
|
+
width: "fit-content",
|
|
5371
|
+
maxWidth: "100%",
|
|
5372
|
+
wordBreak: "break-word",
|
|
5373
|
+
...getBaseHTMLProps(id, cn(className, InputMessage_default.container), htmlProps, rest)
|
|
5374
|
+
};
|
|
5375
|
+
const tgCommonProps = {
|
|
5376
|
+
as: "span",
|
|
5377
|
+
children: message != null ? message : children
|
|
5378
|
+
};
|
|
5379
|
+
return isError ? /* @__PURE__ */ (0, import_jsx_runtime213.jsxs)(
|
|
5380
|
+
Paper,
|
|
5365
5381
|
{
|
|
5366
|
-
...
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
),
|
|
5382
|
+
...commonProps,
|
|
5383
|
+
gap: "x0.25",
|
|
5384
|
+
padding: "x0.25 x0.5",
|
|
5385
|
+
background: "surface-danger-default",
|
|
5386
|
+
borderRadius: "surface",
|
|
5372
5387
|
children: [
|
|
5373
|
-
|
|
5388
|
+
/* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
|
|
5389
|
+
Icon,
|
|
5390
|
+
{
|
|
5391
|
+
icon: ErrorIcon,
|
|
5392
|
+
iconSize: "small",
|
|
5393
|
+
className: InputMessage_default.icon,
|
|
5394
|
+
color: "icon-on-danger-default"
|
|
5395
|
+
}
|
|
5396
|
+
),
|
|
5374
5397
|
/* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
|
|
5375
5398
|
Typography,
|
|
5376
5399
|
{
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
children: message != null ? message : children
|
|
5400
|
+
...tgCommonProps,
|
|
5401
|
+
typographyType: "bodySmall",
|
|
5402
|
+
color: "textDefault"
|
|
5381
5403
|
}
|
|
5382
5404
|
)
|
|
5383
5405
|
]
|
|
5384
5406
|
}
|
|
5385
|
-
)
|
|
5407
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(Box, { ...commonProps, children: /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
|
|
5408
|
+
Typography,
|
|
5409
|
+
{
|
|
5410
|
+
...tgCommonProps,
|
|
5411
|
+
typographyType: "bodyXsmall",
|
|
5412
|
+
color: "textSubtle"
|
|
5413
|
+
}
|
|
5414
|
+
) });
|
|
5386
5415
|
};
|
|
5387
5416
|
InputMessage.displayName = "InputMessage";
|
|
5388
|
-
var renderInputMessage = (
|
|
5389
|
-
|
|
5417
|
+
var renderInputMessage = ({
|
|
5418
|
+
tip,
|
|
5419
|
+
tipId,
|
|
5420
|
+
errorMessage,
|
|
5421
|
+
errorMessageId,
|
|
5422
|
+
noSpacing
|
|
5423
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime213.jsxs)(import_jsx_runtime213.Fragment, { children: [
|
|
5424
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
|
|
5390
5425
|
InputMessage,
|
|
5391
5426
|
{
|
|
5392
5427
|
message: errorMessage,
|
|
5393
5428
|
messageType: "error",
|
|
5394
|
-
id: errorMessageId
|
|
5429
|
+
id: errorMessageId,
|
|
5430
|
+
marginBlock: !noSpacing ? "x0.125 0" : void 0
|
|
5395
5431
|
}
|
|
5396
5432
|
),
|
|
5397
|
-
tip &&
|
|
5433
|
+
tip && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(InputMessage, { message: tip, messageType: "tip", id: tipId })
|
|
5398
5434
|
] });
|
|
5399
5435
|
|
|
5400
5436
|
// src/components/SelectionControl/Checkbox/CheckboxGroup.tsx
|
|
@@ -5416,7 +5452,7 @@ var CheckboxGroup = (props) => {
|
|
|
5416
5452
|
...rest
|
|
5417
5453
|
} = props;
|
|
5418
5454
|
const { "aria-required": ariaRequired } = htmlProps;
|
|
5419
|
-
const generatedId = (0,
|
|
5455
|
+
const generatedId = (0, import_react29.useId)();
|
|
5420
5456
|
const uniqueGroupId = groupId != null ? groupId : `${generatedId}-checkboxGroup`;
|
|
5421
5457
|
const hasErrorMessage = !!errorMessage;
|
|
5422
5458
|
const showRequiredStyling = required || convertBooleanishToBoolean(ariaRequired);
|
|
@@ -5446,7 +5482,7 @@ var CheckboxGroup = (props) => {
|
|
|
5446
5482
|
readOnly,
|
|
5447
5483
|
showRequiredStyling
|
|
5448
5484
|
}),
|
|
5449
|
-
renderInputMessage(tip, tipId),
|
|
5485
|
+
renderInputMessage({ tip, tipId }),
|
|
5450
5486
|
/* @__PURE__ */ (0, import_jsx_runtime214.jsx)(CheckboxGroupContext, { value: { ...contextProps }, children: /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
|
|
5451
5487
|
"div",
|
|
5452
5488
|
{
|
|
@@ -5457,7 +5493,7 @@ var CheckboxGroup = (props) => {
|
|
|
5457
5493
|
children
|
|
5458
5494
|
}
|
|
5459
5495
|
) }),
|
|
5460
|
-
renderInputMessage(
|
|
5496
|
+
renderInputMessage({ errorMessage, errorMessageId })
|
|
5461
5497
|
]
|
|
5462
5498
|
}
|
|
5463
5499
|
);
|
|
@@ -5465,13 +5501,13 @@ var CheckboxGroup = (props) => {
|
|
|
5465
5501
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
5466
5502
|
|
|
5467
5503
|
// src/components/SelectionControl/RadioButton/RadioButton.tsx
|
|
5468
|
-
var
|
|
5504
|
+
var import_react31 = require("react");
|
|
5469
5505
|
|
|
5470
5506
|
// src/components/SelectionControl/RadioButton/RadioButtonGroupContext.tsx
|
|
5471
|
-
var
|
|
5472
|
-
var RadioButtonGroupContext = (0,
|
|
5507
|
+
var import_react30 = require("react");
|
|
5508
|
+
var RadioButtonGroupContext = (0, import_react30.createContext)(null);
|
|
5473
5509
|
var useRadioButtonGroup = () => {
|
|
5474
|
-
return (0,
|
|
5510
|
+
return (0, import_react30.useContext)(RadioButtonGroupContext);
|
|
5475
5511
|
};
|
|
5476
5512
|
|
|
5477
5513
|
// src/components/SelectionControl/RadioButton/RadioButton.tsx
|
|
@@ -5508,7 +5544,7 @@ var RadioButton = ({
|
|
|
5508
5544
|
...rest
|
|
5509
5545
|
}) => {
|
|
5510
5546
|
const { className: htmlPropsClassName, style, ...restHtmlProps } = htmlProps;
|
|
5511
|
-
const generatedId = (0,
|
|
5547
|
+
const generatedId = (0, import_react31.useId)();
|
|
5512
5548
|
const uniqueId = id != null ? id : `${generatedId}-radioButton`;
|
|
5513
5549
|
const hasChildren = !!children;
|
|
5514
5550
|
const hasLabel = !!label;
|
|
@@ -5578,7 +5614,7 @@ var RadioButton = ({
|
|
|
5578
5614
|
RadioButton.displayName = "RadioButton";
|
|
5579
5615
|
|
|
5580
5616
|
// src/components/SelectionControl/RadioButton/RadioButtonGroup.tsx
|
|
5581
|
-
var
|
|
5617
|
+
var import_react32 = require("react");
|
|
5582
5618
|
var import_jsx_runtime216 = require("react/jsx-runtime");
|
|
5583
5619
|
var RadioButtonGroup = ({
|
|
5584
5620
|
name,
|
|
@@ -5600,7 +5636,7 @@ var RadioButtonGroup = ({
|
|
|
5600
5636
|
...rest
|
|
5601
5637
|
}) => {
|
|
5602
5638
|
const { "aria-required": ariaRequired = false } = htmlProps;
|
|
5603
|
-
const generatedId = (0,
|
|
5639
|
+
const generatedId = (0, import_react32.useId)();
|
|
5604
5640
|
const uniqueGroupId = groupId != null ? groupId : `${generatedId}-radioButtonGroup`;
|
|
5605
5641
|
const { groupValue, handleChange } = useControllableGroupState({
|
|
5606
5642
|
value,
|
|
@@ -5638,7 +5674,7 @@ var RadioButtonGroup = ({
|
|
|
5638
5674
|
readOnly,
|
|
5639
5675
|
showRequiredStyling
|
|
5640
5676
|
}),
|
|
5641
|
-
renderInputMessage(tip, tipId),
|
|
5677
|
+
renderInputMessage({ tip, tipId }),
|
|
5642
5678
|
/* @__PURE__ */ (0, import_jsx_runtime216.jsx)(RadioButtonGroupContext, { value: { ...contextProps }, children: /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
|
|
5643
5679
|
"div",
|
|
5644
5680
|
{
|
|
@@ -5650,7 +5686,7 @@ var RadioButtonGroup = ({
|
|
|
5650
5686
|
children
|
|
5651
5687
|
}
|
|
5652
5688
|
) }),
|
|
5653
|
-
renderInputMessage(
|
|
5689
|
+
renderInputMessage({ errorMessage, errorMessageId })
|
|
5654
5690
|
]
|
|
5655
5691
|
}
|
|
5656
5692
|
);
|
|
@@ -5658,9 +5694,9 @@ var RadioButtonGroup = ({
|
|
|
5658
5694
|
RadioButtonGroup.displayName = "RadioButtonGroup";
|
|
5659
5695
|
|
|
5660
5696
|
// src/components/Card/CardSelectionControl/CardSelectable.context.tsx
|
|
5661
|
-
var
|
|
5662
|
-
var CardSelectableContext = (0,
|
|
5663
|
-
var useCardSelectableContext = () => (0,
|
|
5697
|
+
var import_react33 = require("react");
|
|
5698
|
+
var CardSelectableContext = (0, import_react33.createContext)({});
|
|
5699
|
+
var useCardSelectableContext = () => (0, import_react33.useContext)(CardSelectableContext);
|
|
5664
5700
|
|
|
5665
5701
|
// src/components/Card/CardSelectionControl/CardSelectable.tsx
|
|
5666
5702
|
var import_jsx_runtime217 = require("react/jsx-runtime");
|
|
@@ -5738,7 +5774,7 @@ Provide \`cardType\` either via a parent <CardSelectableGroup> or directly on th
|
|
|
5738
5774
|
CardSelectable.displayName = "CardSelectable";
|
|
5739
5775
|
|
|
5740
5776
|
// src/components/Card/CardSelectionControl/CardSelectableGroup.tsx
|
|
5741
|
-
var
|
|
5777
|
+
var import_react34 = require("react");
|
|
5742
5778
|
var import_jsx_runtime218 = require("react/jsx-runtime");
|
|
5743
5779
|
var CardSelectableGroup = ({
|
|
5744
5780
|
name,
|
|
@@ -5759,7 +5795,7 @@ var CardSelectableGroup = ({
|
|
|
5759
5795
|
...rest
|
|
5760
5796
|
}) => {
|
|
5761
5797
|
const { "aria-required": ariaRequired = false } = htmlProps;
|
|
5762
|
-
const generatedId = (0,
|
|
5798
|
+
const generatedId = (0, import_react34.useId)();
|
|
5763
5799
|
const uniqueGroupId = id != null ? id : `${generatedId}-cardSelectableGroup`;
|
|
5764
5800
|
const { groupValue, handleChange } = useControllableGroupState({
|
|
5765
5801
|
value,
|
|
@@ -5800,13 +5836,13 @@ var CardSelectableGroup = ({
|
|
|
5800
5836
|
);
|
|
5801
5837
|
return hasErrorMessage ? /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)("div", { children: [
|
|
5802
5838
|
mainContent,
|
|
5803
|
-
renderInputMessage(
|
|
5839
|
+
renderInputMessage({ errorMessage, errorMessageId })
|
|
5804
5840
|
] }) : mainContent;
|
|
5805
5841
|
};
|
|
5806
5842
|
CardSelectableGroup.displayName = "CardSelectableGroup";
|
|
5807
5843
|
|
|
5808
5844
|
// src/components/Chip/Chip.tsx
|
|
5809
|
-
var
|
|
5845
|
+
var import_react35 = require("react");
|
|
5810
5846
|
|
|
5811
5847
|
// src/components/Chip/Chip.module.css
|
|
5812
5848
|
var Chip_default = {
|
|
@@ -5825,7 +5861,7 @@ var Chip = ({
|
|
|
5825
5861
|
}) => {
|
|
5826
5862
|
const { t } = useTranslation();
|
|
5827
5863
|
const { "aria-label": ariaLabel, ...restHTMLprops } = htmlProps;
|
|
5828
|
-
const [isOpen, setIsOpen] = (0,
|
|
5864
|
+
const [isOpen, setIsOpen] = (0, import_react35.useState)(true);
|
|
5829
5865
|
const onClick = () => {
|
|
5830
5866
|
setIsOpen(false);
|
|
5831
5867
|
onClose == null ? void 0 : onClose();
|
|
@@ -5867,10 +5903,10 @@ var texts4 = createTexts({
|
|
|
5867
5903
|
});
|
|
5868
5904
|
|
|
5869
5905
|
// src/components/Chip/ChipGroup.tsx
|
|
5870
|
-
var
|
|
5906
|
+
var import_react36 = require("react");
|
|
5871
5907
|
var import_jsx_runtime220 = require("react/jsx-runtime");
|
|
5872
5908
|
var ChipGroup = ({ children, ...rest }) => {
|
|
5873
|
-
const childrenArray =
|
|
5909
|
+
const childrenArray = import_react36.Children.toArray(children);
|
|
5874
5910
|
return /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(HStack, { as: StylelessList, ...rest, gap: "x0.75", children: childrenArray.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime220.jsx)("li", { children: item }, `chip-${index}`)) });
|
|
5875
5911
|
};
|
|
5876
5912
|
ChipGroup.displayName = "ChipGroup";
|
|
@@ -5898,7 +5934,7 @@ var Contrast = ({
|
|
|
5898
5934
|
};
|
|
5899
5935
|
|
|
5900
5936
|
// src/components/CookieBanner/CookieBanner.tsx
|
|
5901
|
-
var
|
|
5937
|
+
var import_react37 = require("react");
|
|
5902
5938
|
|
|
5903
5939
|
// src/components/CookieBanner/CookieBanner.module.css
|
|
5904
5940
|
var CookieBanner_default = {
|
|
@@ -5939,7 +5975,7 @@ CookieBannerCheckbox.displayName = "CookieBannerCheckbox";
|
|
|
5939
5975
|
|
|
5940
5976
|
// src/components/CookieBanner/CookieBanner.tsx
|
|
5941
5977
|
var import_jsx_runtime223 = require("react/jsx-runtime");
|
|
5942
|
-
var
|
|
5978
|
+
var import_react38 = require("react");
|
|
5943
5979
|
function CookieBanner({
|
|
5944
5980
|
headerText,
|
|
5945
5981
|
description,
|
|
@@ -5956,8 +5992,8 @@ function CookieBanner({
|
|
|
5956
5992
|
}) {
|
|
5957
5993
|
const { t } = useTranslation();
|
|
5958
5994
|
const hasBp = !!collapsedBreakpoint;
|
|
5959
|
-
const [isCollapsedOnBreakpoint, setIsCollapsedOnBreakpoint] = (0,
|
|
5960
|
-
const generatedId = (0,
|
|
5995
|
+
const [isCollapsedOnBreakpoint, setIsCollapsedOnBreakpoint] = (0, import_react37.useState)(hasBp);
|
|
5996
|
+
const generatedId = (0, import_react37.useId)();
|
|
5961
5997
|
const headingId = headerText && (id != null ? id : `cookie-banner-${generatedId}-heading`);
|
|
5962
5998
|
const heading = headerText ? /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(Heading, { level: 2, typographyType: "headingMedium", id: headingId, children: headerText }) : "";
|
|
5963
5999
|
return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(
|
|
@@ -6000,14 +6036,14 @@ function CookieBanner({
|
|
|
6000
6036
|
children: [
|
|
6001
6037
|
children,
|
|
6002
6038
|
description && /* @__PURE__ */ (0, import_jsx_runtime223.jsx)("div", { children: description }),
|
|
6003
|
-
checkboxes && /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(VStack, { gap: "x1", children: checkboxes.map((props, index) => /* @__PURE__ */ (0,
|
|
6039
|
+
checkboxes && /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(VStack, { gap: "x1", children: checkboxes.map((props, index) => /* @__PURE__ */ (0, import_react38.createElement)(CookieBannerCheckbox, { ...props, key: index })) }),
|
|
6004
6040
|
buttons && /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(
|
|
6005
6041
|
HStack,
|
|
6006
6042
|
{
|
|
6007
6043
|
gap: styleUpToBreakpoint("x1", "sm", "x1.5"),
|
|
6008
6044
|
flexWrap: "wrap",
|
|
6009
6045
|
paddingBlock: "x0.25 0",
|
|
6010
|
-
children: buttons.map((props, i) => /* @__PURE__ */ (0,
|
|
6046
|
+
children: buttons.map((props, i) => /* @__PURE__ */ (0, import_react38.createElement)(Button, { ...props, size: "medium", purpose: "secondary", key: i }))
|
|
6011
6047
|
}
|
|
6012
6048
|
)
|
|
6013
6049
|
]
|
|
@@ -6033,18 +6069,18 @@ var import_date4 = require("@internationalized/date");
|
|
|
6033
6069
|
var import_calendar3 = require("@react-aria/calendar");
|
|
6034
6070
|
var import_i18n11 = require("@react-aria/i18n");
|
|
6035
6071
|
var import_calendar4 = require("@react-stately/calendar");
|
|
6036
|
-
var
|
|
6072
|
+
var import_react42 = require("react");
|
|
6037
6073
|
|
|
6038
6074
|
// src/components/date-inputs/DatePicker/Calendar/CalendarGrid.tsx
|
|
6039
6075
|
var import_date3 = require("@internationalized/date");
|
|
6040
6076
|
var import_calendar2 = require("@react-aria/calendar");
|
|
6041
6077
|
var import_i18n9 = require("@react-aria/i18n");
|
|
6042
|
-
var
|
|
6078
|
+
var import_react41 = require("react");
|
|
6043
6079
|
|
|
6044
6080
|
// src/components/date-inputs/DatePicker/Calendar/CalendarCell.tsx
|
|
6045
6081
|
var import_date = require("@internationalized/date");
|
|
6046
6082
|
var import_calendar = require("@react-aria/calendar");
|
|
6047
|
-
var
|
|
6083
|
+
var import_react39 = require("react");
|
|
6048
6084
|
|
|
6049
6085
|
// src/components/date-inputs/common/DateInput.module.css
|
|
6050
6086
|
var DateInput_default = {
|
|
@@ -6058,9 +6094,8 @@ var DateInput_default = {
|
|
|
6058
6094
|
"segment__placeholder--invisible": "DateInput_segment__placeholder--invisible",
|
|
6059
6095
|
"clear-button": "DateInput_clear-button",
|
|
6060
6096
|
"clear-button--inactive": "DateInput_clear-button--inactive",
|
|
6061
|
-
icon: "DateInput_icon",
|
|
6062
|
-
"popover-button": "DateInput_popover-button",
|
|
6063
6097
|
"icon-wrapper--disabled": "DateInput_icon-wrapper--disabled",
|
|
6098
|
+
"popover-button": "DateInput_popover-button",
|
|
6064
6099
|
"icon-wrapper--readonly": "DateInput_icon-wrapper--readonly",
|
|
6065
6100
|
"popover-button--readonly": "DateInput_popover-button--readonly",
|
|
6066
6101
|
popover: "DateInput_popover",
|
|
@@ -6091,7 +6126,7 @@ var timezone = "Europe/Oslo";
|
|
|
6091
6126
|
// src/components/date-inputs/DatePicker/Calendar/CalendarCell.tsx
|
|
6092
6127
|
var import_jsx_runtime224 = require("react/jsx-runtime");
|
|
6093
6128
|
function CalendarCell({ date, state, onClose }) {
|
|
6094
|
-
const ref = (0,
|
|
6129
|
+
const ref = (0, import_react39.useRef)(null);
|
|
6095
6130
|
const {
|
|
6096
6131
|
buttonProps,
|
|
6097
6132
|
cellProps,
|
|
@@ -6193,10 +6228,10 @@ function isLeapYear(date) {
|
|
|
6193
6228
|
}
|
|
6194
6229
|
|
|
6195
6230
|
// src/components/date-inputs/DatePicker/CalendarPopover.tsx
|
|
6196
|
-
var
|
|
6231
|
+
var import_react40 = require("react");
|
|
6197
6232
|
var import_react_dom2 = require("react-dom");
|
|
6198
6233
|
var import_jsx_runtime226 = require("react/jsx-runtime");
|
|
6199
|
-
var CalendarPopoverContext = (0,
|
|
6234
|
+
var CalendarPopoverContext = (0, import_react40.createContext)({
|
|
6200
6235
|
anchorRef: null,
|
|
6201
6236
|
closeButtonRef: null,
|
|
6202
6237
|
isOpen: false,
|
|
@@ -6208,8 +6243,8 @@ var CalendarPopover = ({
|
|
|
6208
6243
|
onClose,
|
|
6209
6244
|
...props
|
|
6210
6245
|
}) => {
|
|
6211
|
-
const anchorRef = (0,
|
|
6212
|
-
const closeButtonRef = (0,
|
|
6246
|
+
const anchorRef = (0, import_react40.useRef)(null);
|
|
6247
|
+
const closeButtonRef = (0, import_react40.useRef)(null);
|
|
6213
6248
|
useOnKeyDown("Escape", onClose);
|
|
6214
6249
|
return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
|
|
6215
6250
|
CalendarPopoverContext,
|
|
@@ -6222,7 +6257,7 @@ var CalendarPopover = ({
|
|
|
6222
6257
|
var CalendarPopoverAnchor = ({
|
|
6223
6258
|
children
|
|
6224
6259
|
}) => {
|
|
6225
|
-
const { anchorRef } = (0,
|
|
6260
|
+
const { anchorRef } = (0, import_react40.useContext)(CalendarPopoverContext);
|
|
6226
6261
|
return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)("div", { ref: anchorRef != null ? anchorRef : void 0, children });
|
|
6227
6262
|
};
|
|
6228
6263
|
var CalendarPopoverContent = ({
|
|
@@ -6230,30 +6265,30 @@ var CalendarPopoverContent = ({
|
|
|
6230
6265
|
className,
|
|
6231
6266
|
smallScreenBreakpoint
|
|
6232
6267
|
}) => {
|
|
6233
|
-
const ref = (0,
|
|
6234
|
-
const modalRef = (0,
|
|
6268
|
+
const ref = (0, import_react40.useRef)(null);
|
|
6269
|
+
const modalRef = (0, import_react40.useRef)(null);
|
|
6235
6270
|
const { refs, styles: floatingStyles } = useFloatPosition(null, {
|
|
6236
6271
|
placement: "bottom-start"
|
|
6237
6272
|
});
|
|
6238
|
-
const themeContext = (0,
|
|
6273
|
+
const themeContext = (0, import_react40.useContext)(ThemeContext);
|
|
6239
6274
|
if (!themeContext) {
|
|
6240
6275
|
throw new Error("DatePicker must be used within a ThemeProvider");
|
|
6241
6276
|
}
|
|
6242
6277
|
const portalTarget = themeContext.el;
|
|
6243
6278
|
const { t } = useTranslation();
|
|
6244
|
-
const { isOpen, onClose, anchorRef, closeButtonRef } = (0,
|
|
6279
|
+
const { isOpen, onClose, anchorRef, closeButtonRef } = (0, import_react40.useContext)(
|
|
6245
6280
|
CalendarPopoverContext
|
|
6246
6281
|
);
|
|
6247
6282
|
const hasTransitionedIn = useMountTransition(isOpen, 500);
|
|
6248
6283
|
const isMounted = isOpen && hasTransitionedIn;
|
|
6249
6284
|
const combinedRef = useCombinedRef(refs.setFloating, ref);
|
|
6250
6285
|
useOnClickOutside([ref.current, modalRef.current], onClose);
|
|
6251
|
-
(0,
|
|
6286
|
+
(0, import_react40.useEffect)(() => {
|
|
6252
6287
|
var _a;
|
|
6253
6288
|
refs.setReference((_a = anchorRef == null ? void 0 : anchorRef.current) != null ? _a : null);
|
|
6254
6289
|
}, []);
|
|
6255
6290
|
const hasBreakpoint = !!smallScreenBreakpoint;
|
|
6256
|
-
(0,
|
|
6291
|
+
(0, import_react40.useEffect)(() => {
|
|
6257
6292
|
var _a;
|
|
6258
6293
|
if (hasBreakpoint && ((_a = modalRef.current) == null ? void 0 : _a.checkVisibility())) {
|
|
6259
6294
|
if (isOpen) {
|
|
@@ -6335,7 +6370,7 @@ function CalendarGrid({ state, ...props }) {
|
|
|
6335
6370
|
{ short: t(texts6.sa), full: t(texts6.saturday) },
|
|
6336
6371
|
{ short: t(texts6.su), full: t(texts6.sunday) }
|
|
6337
6372
|
];
|
|
6338
|
-
const { showWeekNumbers, onClose } = (0,
|
|
6373
|
+
const { showWeekNumbers, onClose } = (0, import_react41.useContext)(CalendarPopoverContext);
|
|
6339
6374
|
const typographyCn = [
|
|
6340
6375
|
typographyStyles_default["body-xsmall"],
|
|
6341
6376
|
typographyStyles_default["text-color--subtle"]
|
|
@@ -6534,7 +6569,7 @@ function Calendar(props) {
|
|
|
6534
6569
|
nextButtonProps: { onPress: onNext },
|
|
6535
6570
|
title
|
|
6536
6571
|
} = (0, import_calendar3.useCalendar)(props, state);
|
|
6537
|
-
const { onClose, closeButtonRef } = (0,
|
|
6572
|
+
const { onClose, closeButtonRef } = (0, import_react42.useContext)(CalendarPopoverContext);
|
|
6538
6573
|
const closeOnKeyboardBlurBack = (event) => {
|
|
6539
6574
|
var _a;
|
|
6540
6575
|
if (event.key === "Tab" && event.shiftKey === true) {
|
|
@@ -6605,18 +6640,18 @@ var texts7 = createTexts({
|
|
|
6605
6640
|
var import_datepicker4 = require("@react-aria/datepicker");
|
|
6606
6641
|
var import_i18n17 = require("@react-aria/i18n");
|
|
6607
6642
|
var import_datepicker5 = require("@react-stately/datepicker");
|
|
6608
|
-
var
|
|
6643
|
+
var import_react48 = require("react");
|
|
6609
6644
|
|
|
6610
6645
|
// src/components/date-inputs/DatePicker/DateField/DateField.tsx
|
|
6611
6646
|
var import_date5 = require("@internationalized/date");
|
|
6612
6647
|
var import_datepicker2 = require("@react-aria/datepicker");
|
|
6613
6648
|
var import_i18n15 = require("@react-aria/i18n");
|
|
6614
6649
|
var import_datepicker3 = require("@react-stately/datepicker");
|
|
6615
|
-
var
|
|
6650
|
+
var import_react46 = require("react");
|
|
6616
6651
|
|
|
6617
6652
|
// src/components/date-inputs/DatePicker/DateField/CalendarButton.tsx
|
|
6618
6653
|
var import_button = require("@react-aria/button");
|
|
6619
|
-
var
|
|
6654
|
+
var import_react43 = require("react");
|
|
6620
6655
|
|
|
6621
6656
|
// src/components/helpers/InlineIconButton/InlineIconButton.module.css
|
|
6622
6657
|
var InlineIconButton_default = {
|
|
@@ -6641,6 +6676,36 @@ var InlineIconButton = ({
|
|
|
6641
6676
|
);
|
|
6642
6677
|
InlineIconButton.displayName = "InlineIconButton";
|
|
6643
6678
|
|
|
6679
|
+
// src/components/helpers/Input/Input.module.css
|
|
6680
|
+
var Input_default = {
|
|
6681
|
+
container: "Input_container",
|
|
6682
|
+
"input-group": "Input_input-group",
|
|
6683
|
+
input: "Input_input",
|
|
6684
|
+
disabled: "Input_disabled",
|
|
6685
|
+
"read-only": "Input_read-only",
|
|
6686
|
+
"input--stateful": "Input_input--stateful",
|
|
6687
|
+
"input--hover": "Input_input--hover",
|
|
6688
|
+
"input--stateful-danger": "Input_input--stateful-danger",
|
|
6689
|
+
"input--large": "Input_input--large",
|
|
6690
|
+
"input--medium": "Input_input--medium",
|
|
6691
|
+
"input--small": "Input_input--small",
|
|
6692
|
+
"input--xsmall": "Input_input--xsmall",
|
|
6693
|
+
"input-with-icon--large": "Input_input-with-icon--large",
|
|
6694
|
+
"input-with-icon--medium": "Input_input-with-icon--medium",
|
|
6695
|
+
"input-with-icon--small": "Input_input-with-icon--small",
|
|
6696
|
+
"input-with-icon--xsmall": "Input_input-with-icon--xsmall",
|
|
6697
|
+
"input-with-el-right--large": "Input_input-with-el-right--large",
|
|
6698
|
+
"input-with-el-right--medium": "Input_input-with-el-right--medium",
|
|
6699
|
+
"input-with-el-right--small": "Input_input-with-el-right--small",
|
|
6700
|
+
"input-with-el-right--xsmall": "Input_input-with-el-right--xsmall",
|
|
6701
|
+
"input--with-affix": "Input_input--with-affix",
|
|
6702
|
+
"input-group__absolute-el": "Input_input-group__absolute-el",
|
|
6703
|
+
"input-group__absolute-el--large": "Input_input-group__absolute-el--large",
|
|
6704
|
+
"input-group__absolute-el--medium": "Input_input-group__absolute-el--medium",
|
|
6705
|
+
"input-group__absolute-el--small": "Input_input-group__absolute-el--small",
|
|
6706
|
+
"input-group__absolute-el--xsmall": "Input_input-group__absolute-el--xsmall"
|
|
6707
|
+
};
|
|
6708
|
+
|
|
6644
6709
|
// src/components/date-inputs/DatePicker/DateField/CalendarButton.tsx
|
|
6645
6710
|
var import_jsx_runtime230 = require("react/jsx-runtime");
|
|
6646
6711
|
function CalendarButton({
|
|
@@ -6648,7 +6713,7 @@ function CalendarButton({
|
|
|
6648
6713
|
isReadOnly,
|
|
6649
6714
|
...props
|
|
6650
6715
|
}) {
|
|
6651
|
-
const ref = (0,
|
|
6716
|
+
const ref = (0, import_react43.useRef)(null);
|
|
6652
6717
|
const { buttonProps } = (0, import_button.useButton)(props, ref);
|
|
6653
6718
|
return /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
|
|
6654
6719
|
InlineIconButton,
|
|
@@ -6660,7 +6725,9 @@ function CalendarButton({
|
|
|
6660
6725
|
buttonProps.className,
|
|
6661
6726
|
DateInput_default["popover-button"],
|
|
6662
6727
|
isReadOnly && DateInput_default["popover-button--readonly"],
|
|
6663
|
-
!props.isDisabled && focusable
|
|
6728
|
+
!props.isDisabled && focusable,
|
|
6729
|
+
Input_default["input-group__absolute-el"],
|
|
6730
|
+
Input_default[`input-group__absolute-el--${componentSize}`]
|
|
6664
6731
|
),
|
|
6665
6732
|
icon: CalendarIcon,
|
|
6666
6733
|
size: getFormInputIconSize(componentSize)
|
|
@@ -6727,7 +6794,7 @@ var texts8 = createTexts({
|
|
|
6727
6794
|
|
|
6728
6795
|
// src/components/date-inputs/DatePicker/DateField/DateSegment.tsx
|
|
6729
6796
|
var import_datepicker = require("@react-aria/datepicker");
|
|
6730
|
-
var
|
|
6797
|
+
var import_react44 = require("react");
|
|
6731
6798
|
var import_jsx_runtime231 = require("react/jsx-runtime");
|
|
6732
6799
|
var typographyTypes = {
|
|
6733
6800
|
medium: "bodyMedium",
|
|
@@ -6737,14 +6804,20 @@ var typographyTypes = {
|
|
|
6737
6804
|
function DateSegment({
|
|
6738
6805
|
segment,
|
|
6739
6806
|
state,
|
|
6740
|
-
componentSize
|
|
6807
|
+
componentSize,
|
|
6808
|
+
errorMessageId,
|
|
6809
|
+
tipId
|
|
6741
6810
|
}) {
|
|
6742
|
-
const ref = (0,
|
|
6811
|
+
const ref = (0, import_react44.useRef)(null);
|
|
6743
6812
|
const { segmentProps } = (0, import_datepicker.useDateSegment)(segment, state, ref);
|
|
6744
6813
|
return /* @__PURE__ */ (0, import_jsx_runtime231.jsxs)(
|
|
6745
6814
|
"div",
|
|
6746
6815
|
{
|
|
6747
6816
|
...segmentProps,
|
|
6817
|
+
"aria-describedby": spaceSeparatedIdListGenerator([
|
|
6818
|
+
errorMessageId ? errorMessageId : void 0,
|
|
6819
|
+
tipId ? tipId : void 0
|
|
6820
|
+
]),
|
|
6748
6821
|
ref,
|
|
6749
6822
|
className: cn(
|
|
6750
6823
|
segmentProps.className,
|
|
@@ -6793,24 +6866,7 @@ var ClearButton = ({
|
|
|
6793
6866
|
ClearButton.displayName = "ClearButton";
|
|
6794
6867
|
|
|
6795
6868
|
// src/components/date-inputs/common/DateInput.tsx
|
|
6796
|
-
var
|
|
6797
|
-
|
|
6798
|
-
// src/components/helpers/Input/Input.module.css
|
|
6799
|
-
var Input_default = {
|
|
6800
|
-
container: "Input_container",
|
|
6801
|
-
"input-group": "Input_input-group",
|
|
6802
|
-
input: "Input_input",
|
|
6803
|
-
disabled: "Input_disabled",
|
|
6804
|
-
"read-only": "Input_read-only",
|
|
6805
|
-
"input--stateful": "Input_input--stateful",
|
|
6806
|
-
"input--hover": "Input_input--hover",
|
|
6807
|
-
"input--stateful-danger": "Input_input--stateful-danger",
|
|
6808
|
-
"input--medium": "Input_input--medium",
|
|
6809
|
-
"input--small": "Input_input--small",
|
|
6810
|
-
"input--xsmall": "Input_input--xsmall",
|
|
6811
|
-
"input--with-affix": "Input_input--with-affix",
|
|
6812
|
-
"input-group__absolute-element": "Input_input-group__absolute-element"
|
|
6813
|
-
};
|
|
6869
|
+
var import_react45 = require("react");
|
|
6814
6870
|
|
|
6815
6871
|
// src/components/helpers/Input/Input.tsx
|
|
6816
6872
|
var import_jsx_runtime233 = require("react/jsx-runtime");
|
|
@@ -6895,13 +6951,12 @@ function DateInput({
|
|
|
6895
6951
|
clearable,
|
|
6896
6952
|
ref,
|
|
6897
6953
|
afterLabelContent,
|
|
6954
|
+
tipId,
|
|
6955
|
+
errorMessageId,
|
|
6898
6956
|
...props
|
|
6899
6957
|
}) {
|
|
6900
|
-
var _a;
|
|
6901
6958
|
const hasErrorMessage = !!errorMessage;
|
|
6902
|
-
const
|
|
6903
|
-
const hasMessage = hasErrorMessage || hasTip;
|
|
6904
|
-
const { isOpen } = (0, import_react44.useContext)(CalendarPopoverContext);
|
|
6959
|
+
const { isOpen } = (0, import_react45.useContext)(CalendarPopoverContext);
|
|
6905
6960
|
return /* @__PURE__ */ (0, import_jsx_runtime235.jsxs)(
|
|
6906
6961
|
"div",
|
|
6907
6962
|
{
|
|
@@ -6926,6 +6981,7 @@ function DateInput({
|
|
|
6926
6981
|
Input_default["input--stateful"],
|
|
6927
6982
|
Input_default["input--hover"],
|
|
6928
6983
|
Input_default[`input--${componentSize}`],
|
|
6984
|
+
Input_default[`input-with-icon--${componentSize}`],
|
|
6929
6985
|
hasErrorMessage && Input_default["input--stateful-danger"],
|
|
6930
6986
|
DateInput_default["date-input"],
|
|
6931
6987
|
clearable && DateInput_default[`date-input--${componentSize}--clearable`],
|
|
@@ -6952,13 +7008,7 @@ function DateInput({
|
|
|
6952
7008
|
]
|
|
6953
7009
|
}
|
|
6954
7010
|
),
|
|
6955
|
-
|
|
6956
|
-
InputMessage,
|
|
6957
|
-
{
|
|
6958
|
-
messageType: hasErrorMessage ? "error" : "tip",
|
|
6959
|
-
message: (_a = errorMessage != null ? errorMessage : tip) != null ? _a : ""
|
|
6960
|
-
}
|
|
6961
|
-
)
|
|
7011
|
+
renderInputMessage({ tip, errorMessage, tipId, errorMessageId })
|
|
6962
7012
|
]
|
|
6963
7013
|
}
|
|
6964
7014
|
);
|
|
@@ -6973,6 +7023,8 @@ function DateField({
|
|
|
6973
7023
|
groupProps,
|
|
6974
7024
|
ref,
|
|
6975
7025
|
clearable,
|
|
7026
|
+
errorMessageId,
|
|
7027
|
+
tipId,
|
|
6976
7028
|
...props
|
|
6977
7029
|
}) {
|
|
6978
7030
|
const { locale } = (0, import_i18n15.useLocale)();
|
|
@@ -6982,7 +7034,7 @@ function DateField({
|
|
|
6982
7034
|
locale,
|
|
6983
7035
|
createCalendar: import_date5.createCalendar
|
|
6984
7036
|
});
|
|
6985
|
-
const internalRef = (0,
|
|
7037
|
+
const internalRef = (0, import_react46.useRef)(null);
|
|
6986
7038
|
const { labelProps, fieldProps } = (0, import_datepicker2.useDateField)(props, state, internalRef);
|
|
6987
7039
|
const disabled = props.isDisabled || !!fieldProps["aria-disabled"];
|
|
6988
7040
|
const showClearButton = clearable && !disabled && !props.isReadOnly;
|
|
@@ -7006,6 +7058,8 @@ function DateField({
|
|
|
7006
7058
|
required: props.isRequired,
|
|
7007
7059
|
clearable,
|
|
7008
7060
|
ref,
|
|
7061
|
+
tipId,
|
|
7062
|
+
errorMessageId,
|
|
7009
7063
|
internalRef,
|
|
7010
7064
|
readOnly: props.isReadOnly,
|
|
7011
7065
|
prefix: /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
|
|
@@ -7038,6 +7092,8 @@ function DateField({
|
|
|
7038
7092
|
{
|
|
7039
7093
|
"aria-readonly": props.isReadOnly,
|
|
7040
7094
|
componentSize,
|
|
7095
|
+
errorMessageId,
|
|
7096
|
+
tipId,
|
|
7041
7097
|
segment,
|
|
7042
7098
|
state
|
|
7043
7099
|
},
|
|
@@ -7059,10 +7115,10 @@ var texts9 = createTexts({
|
|
|
7059
7115
|
|
|
7060
7116
|
// src/components/date-inputs/utils/useFocusManagerRef.ts
|
|
7061
7117
|
var import_focus18 = require("@react-aria/focus");
|
|
7062
|
-
var
|
|
7118
|
+
var import_react47 = require("react");
|
|
7063
7119
|
function useFocusManagerRef(ref) {
|
|
7064
|
-
const domRef = (0,
|
|
7065
|
-
(0,
|
|
7120
|
+
const domRef = (0, import_react47.useRef)(null);
|
|
7121
|
+
(0, import_react47.useImperativeHandle)(ref, () => ({
|
|
7066
7122
|
...createDOMRef(domRef),
|
|
7067
7123
|
focus() {
|
|
7068
7124
|
(0, import_focus18.createFocusManager)(domRef).focusFirst({ tabbable: true });
|
|
@@ -7095,19 +7151,25 @@ function DatePicker({
|
|
|
7095
7151
|
ref,
|
|
7096
7152
|
...props
|
|
7097
7153
|
}) {
|
|
7154
|
+
var _a;
|
|
7098
7155
|
const lang = useLanguage();
|
|
7099
7156
|
if (!lang) {
|
|
7100
7157
|
throw new Error("DatePicker must be used within a DdsProvider");
|
|
7101
7158
|
}
|
|
7102
7159
|
const state = (0, import_datepicker5.useDatePickerState)(props);
|
|
7103
7160
|
const domRef = useFocusManagerRef(ref && refIsFocusable(ref) ? ref : null);
|
|
7104
|
-
const internalRef = (0,
|
|
7161
|
+
const internalRef = (0, import_react48.useRef)(null);
|
|
7105
7162
|
const combinedRef = useCombinedRef(internalRef, domRef);
|
|
7106
7163
|
const { buttonProps, calendarProps, fieldProps, groupProps } = (0, import_datepicker4.useDatePicker)(
|
|
7107
7164
|
{ ...props, granularity: "day" },
|
|
7108
7165
|
state,
|
|
7109
7166
|
internalRef
|
|
7110
7167
|
);
|
|
7168
|
+
const hasErrorMessage = !!errorMessage;
|
|
7169
|
+
const hasTip = !!tip;
|
|
7170
|
+
const uniqueId = (_a = props.id) != null ? _a : (0, import_react48.useId)();
|
|
7171
|
+
const errorMessageId = hasErrorMessage ? `${uniqueId}-errorMessage` : void 0;
|
|
7172
|
+
const tipId = hasTip ? `${uniqueId}-tip` : void 0;
|
|
7111
7173
|
return /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(import_i18n17.I18nProvider, { locale: LOCALE[lang], children: /* @__PURE__ */ (0, import_jsx_runtime237.jsxs)(
|
|
7112
7174
|
CalendarPopover,
|
|
7113
7175
|
{
|
|
@@ -7123,8 +7185,11 @@ function DatePicker({
|
|
|
7123
7185
|
ref: combinedRef,
|
|
7124
7186
|
componentSize,
|
|
7125
7187
|
tip,
|
|
7188
|
+
id: uniqueId,
|
|
7126
7189
|
label: props.label,
|
|
7127
7190
|
errorMessage,
|
|
7191
|
+
errorMessageId,
|
|
7192
|
+
tipId,
|
|
7128
7193
|
buttonProps,
|
|
7129
7194
|
style,
|
|
7130
7195
|
width,
|
|
@@ -7141,7 +7206,7 @@ DatePicker.displayName = "DatePicker";
|
|
|
7141
7206
|
// src/components/date-inputs/TimePicker/TimePicker.tsx
|
|
7142
7207
|
var import_datepicker6 = require("@react-aria/datepicker");
|
|
7143
7208
|
var import_datepicker7 = require("@react-stately/datepicker");
|
|
7144
|
-
var
|
|
7209
|
+
var import_react49 = require("react");
|
|
7145
7210
|
|
|
7146
7211
|
// src/components/date-inputs/TimePicker/TimePicker.utils.ts
|
|
7147
7212
|
function formatTimeSegments(segments) {
|
|
@@ -7179,11 +7244,12 @@ function TimePicker({
|
|
|
7179
7244
|
ref,
|
|
7180
7245
|
...props
|
|
7181
7246
|
}) {
|
|
7247
|
+
var _a;
|
|
7182
7248
|
const lang = useLanguage();
|
|
7183
7249
|
if (!lang) {
|
|
7184
7250
|
throw new Error("TimePicker must be used within a DdsProvider");
|
|
7185
7251
|
}
|
|
7186
|
-
const internalRef = (0,
|
|
7252
|
+
const internalRef = (0, import_react49.useRef)(null);
|
|
7187
7253
|
const state = (0, import_datepicker7.useTimeFieldState)({
|
|
7188
7254
|
...props,
|
|
7189
7255
|
locale: LOCALE[lang]
|
|
@@ -7193,6 +7259,11 @@ function TimePicker({
|
|
|
7193
7259
|
state,
|
|
7194
7260
|
internalRef
|
|
7195
7261
|
);
|
|
7262
|
+
const hasErrorMessage = !!props.errorMessage;
|
|
7263
|
+
const hasTip = !!props.tip;
|
|
7264
|
+
const uniqueId = (_a = props.id) != null ? _a : (0, import_react49.useId)();
|
|
7265
|
+
const errorMessageId = hasErrorMessage ? `${uniqueId}-errorMessage` : void 0;
|
|
7266
|
+
const tipId = hasTip ? `${uniqueId}-tip` : void 0;
|
|
7196
7267
|
const iconSize = componentSize === "xsmall" ? "small" : "medium";
|
|
7197
7268
|
const disabled = props.isDisabled || !!fieldProps["aria-disabled"];
|
|
7198
7269
|
const formattedSegments = formatTimeSegments(state.segments);
|
|
@@ -7200,6 +7271,8 @@ function TimePicker({
|
|
|
7200
7271
|
DateInput,
|
|
7201
7272
|
{
|
|
7202
7273
|
...props,
|
|
7274
|
+
errorMessageId,
|
|
7275
|
+
tipId,
|
|
7203
7276
|
width,
|
|
7204
7277
|
disabled,
|
|
7205
7278
|
required: props.isRequired,
|
|
@@ -7215,7 +7288,8 @@ function TimePicker({
|
|
|
7215
7288
|
icon: TimeIcon,
|
|
7216
7289
|
iconSize,
|
|
7217
7290
|
className: cn(
|
|
7218
|
-
|
|
7291
|
+
Input_default["input-group__absolute-el"],
|
|
7292
|
+
Input_default[`input-group__absolute-el--${componentSize}`],
|
|
7219
7293
|
disabled && DateInput_default["icon-wrapper--disabled"],
|
|
7220
7294
|
props.isReadOnly && DateInput_default["icon-wrapper--readonly"]
|
|
7221
7295
|
)
|
|
@@ -7224,6 +7298,8 @@ function TimePicker({
|
|
|
7224
7298
|
children: formattedSegments.map((segment, i) => /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
7225
7299
|
DateSegment,
|
|
7226
7300
|
{
|
|
7301
|
+
errorMessageId,
|
|
7302
|
+
tipId,
|
|
7227
7303
|
componentSize,
|
|
7228
7304
|
segment,
|
|
7229
7305
|
state
|
|
@@ -7369,9 +7445,9 @@ var DetailList_default = {
|
|
|
7369
7445
|
};
|
|
7370
7446
|
|
|
7371
7447
|
// src/components/DetailList/DetailList.context.tsx
|
|
7372
|
-
var
|
|
7373
|
-
var DetailListContext = (0,
|
|
7374
|
-
var useDetailListContext = () => (0,
|
|
7448
|
+
var import_react50 = require("react");
|
|
7449
|
+
var DetailListContext = (0, import_react50.createContext)({});
|
|
7450
|
+
var useDetailListContext = () => (0, import_react50.useContext)(DetailListContext);
|
|
7375
7451
|
|
|
7376
7452
|
// src/components/DetailList/DetailList.tsx
|
|
7377
7453
|
var import_jsx_runtime243 = require("react/jsx-runtime");
|
|
@@ -7444,7 +7520,7 @@ var DetailListTerm = ({ className, ...rest }) => /* @__PURE__ */ (0, import_jsx_
|
|
|
7444
7520
|
DetailListTerm.displayName = "DetailListTerm";
|
|
7445
7521
|
|
|
7446
7522
|
// src/components/Drawer/Drawer.tsx
|
|
7447
|
-
var
|
|
7523
|
+
var import_react52 = require("react");
|
|
7448
7524
|
var import_react_dom3 = require("react-dom");
|
|
7449
7525
|
|
|
7450
7526
|
// src/components/Drawer/Drawer.module.css
|
|
@@ -7462,9 +7538,9 @@ var Drawer_default = {
|
|
|
7462
7538
|
};
|
|
7463
7539
|
|
|
7464
7540
|
// src/components/Drawer/Drawer.context.tsx
|
|
7465
|
-
var
|
|
7466
|
-
var DrawerContext = (0,
|
|
7467
|
-
var useDrawerContext = () => (0,
|
|
7541
|
+
var import_react51 = require("react");
|
|
7542
|
+
var DrawerContext = (0, import_react51.createContext)({});
|
|
7543
|
+
var useDrawerContext = () => (0, import_react51.useContext)(DrawerContext);
|
|
7468
7544
|
|
|
7469
7545
|
// src/components/Drawer/Drawer.tsx
|
|
7470
7546
|
var import_jsx_runtime247 = require("react/jsx-runtime");
|
|
@@ -7482,7 +7558,7 @@ var Drawer = ({
|
|
|
7482
7558
|
ref,
|
|
7483
7559
|
...rest
|
|
7484
7560
|
}) => {
|
|
7485
|
-
const themeContext = (0,
|
|
7561
|
+
const themeContext = (0, import_react52.useContext)(ThemeContext);
|
|
7486
7562
|
if (!themeContext) {
|
|
7487
7563
|
throw new Error("Drawer must be used within a ThemeProvider");
|
|
7488
7564
|
}
|
|
@@ -7494,7 +7570,7 @@ var Drawer = ({
|
|
|
7494
7570
|
const headerId = hasHeader ? `${drawerId}-header` : void 0;
|
|
7495
7571
|
const drawerRef = useFocusTrap(isOpen);
|
|
7496
7572
|
const combinedRef = useCombinedRef(ref, drawerRef);
|
|
7497
|
-
(0,
|
|
7573
|
+
(0, import_react52.useEffect)(() => {
|
|
7498
7574
|
if (withBackdrop) {
|
|
7499
7575
|
if (isOpen) {
|
|
7500
7576
|
handleElementWithBackdropMount(document.body);
|
|
@@ -7511,7 +7587,7 @@ var Drawer = ({
|
|
|
7511
7587
|
onClose == null ? void 0 : onClose();
|
|
7512
7588
|
}
|
|
7513
7589
|
});
|
|
7514
|
-
const backdropRef = (0,
|
|
7590
|
+
const backdropRef = (0, import_react52.useRef)(null);
|
|
7515
7591
|
const onBackdropClick = (event) => {
|
|
7516
7592
|
if (event.target === backdropRef.current && isOpen && withBackdrop) {
|
|
7517
7593
|
onClose == null ? void 0 : onClose();
|
|
@@ -7615,7 +7691,7 @@ var Drawer = ({
|
|
|
7615
7691
|
Drawer.displayName = "Drawer";
|
|
7616
7692
|
|
|
7617
7693
|
// src/components/Drawer/DrawerGroup.tsx
|
|
7618
|
-
var
|
|
7694
|
+
var import_react53 = require("react");
|
|
7619
7695
|
var import_jsx_runtime248 = require("react/jsx-runtime");
|
|
7620
7696
|
var DrawerGroup = ({
|
|
7621
7697
|
children,
|
|
@@ -7626,14 +7702,14 @@ var DrawerGroup = ({
|
|
|
7626
7702
|
onOpen,
|
|
7627
7703
|
onClose
|
|
7628
7704
|
}) => {
|
|
7629
|
-
const [internalIsOpen, internalSetIsOpen] = (0,
|
|
7705
|
+
const [internalIsOpen, internalSetIsOpen] = (0, import_react53.useState)(isInitiallyOpen);
|
|
7630
7706
|
const [isOpen, setIsOpen] = [
|
|
7631
7707
|
propIsOpen != null ? propIsOpen : internalIsOpen,
|
|
7632
7708
|
propSetIsOpen != null ? propSetIsOpen : internalSetIsOpen
|
|
7633
7709
|
];
|
|
7634
|
-
const generatedId = (0,
|
|
7710
|
+
const generatedId = (0, import_react53.useId)();
|
|
7635
7711
|
const uniqueDrawerId = drawerId != null ? drawerId : `${generatedId}-drawer`;
|
|
7636
|
-
const triggerRef = (0,
|
|
7712
|
+
const triggerRef = (0, import_react53.useRef)(null);
|
|
7637
7713
|
const open = () => setIsOpen(true);
|
|
7638
7714
|
const close = () => setIsOpen(false);
|
|
7639
7715
|
const handleOpen = () => {
|
|
@@ -7651,8 +7727,8 @@ var DrawerGroup = ({
|
|
|
7651
7727
|
handleClose();
|
|
7652
7728
|
}
|
|
7653
7729
|
});
|
|
7654
|
-
const Children7 =
|
|
7655
|
-
return (0,
|
|
7730
|
+
const Children7 = import_react53.Children.map(children, (child, childIndex) => {
|
|
7731
|
+
return (0, import_react53.isValidElement)(child) && (childIndex === 0 ? (0, import_react53.cloneElement)(child, {
|
|
7656
7732
|
"aria-haspopup": "dialog",
|
|
7657
7733
|
"aria-controls": uniqueDrawerId,
|
|
7658
7734
|
"aria-expanded": isOpen,
|
|
@@ -7706,7 +7782,7 @@ function EmptyContent({
|
|
|
7706
7782
|
EmptyContent.displayName = "EmptyContent";
|
|
7707
7783
|
|
|
7708
7784
|
// src/components/FavStar/FavStar.tsx
|
|
7709
|
-
var
|
|
7785
|
+
var import_react54 = require("react");
|
|
7710
7786
|
|
|
7711
7787
|
// src/components/FavStar/FavStar.module.css
|
|
7712
7788
|
var FavStar_default = {
|
|
@@ -7738,7 +7814,7 @@ var FavStar = ({
|
|
|
7738
7814
|
htmlProps,
|
|
7739
7815
|
rest
|
|
7740
7816
|
);
|
|
7741
|
-
const generatedId = (0,
|
|
7817
|
+
const generatedId = (0, import_react54.useId)();
|
|
7742
7818
|
const [checked, setChecked] = useControllableState({
|
|
7743
7819
|
value: checkedProp,
|
|
7744
7820
|
defaultValue: defaultChecked != null ? defaultChecked : false,
|
|
@@ -7792,7 +7868,7 @@ var texts10 = createTexts({
|
|
|
7792
7868
|
});
|
|
7793
7869
|
|
|
7794
7870
|
// src/components/Feedback/Feedback.tsx
|
|
7795
|
-
var
|
|
7871
|
+
var import_react58 = require("react");
|
|
7796
7872
|
|
|
7797
7873
|
// src/components/Feedback/Feedback.module.css
|
|
7798
7874
|
var Feedback_default = {
|
|
@@ -7806,7 +7882,7 @@ var Feedback_default = {
|
|
|
7806
7882
|
};
|
|
7807
7883
|
|
|
7808
7884
|
// src/components/TextArea/TextArea.tsx
|
|
7809
|
-
var
|
|
7885
|
+
var import_react56 = require("react");
|
|
7810
7886
|
|
|
7811
7887
|
// src/components/TextArea/TextArea.module.css
|
|
7812
7888
|
var TextArea_default = {
|
|
@@ -7814,7 +7890,7 @@ var TextArea_default = {
|
|
|
7814
7890
|
};
|
|
7815
7891
|
|
|
7816
7892
|
// src/components/helpers/CharCounter/CharCounter.tsx
|
|
7817
|
-
var
|
|
7893
|
+
var import_react55 = require("react");
|
|
7818
7894
|
|
|
7819
7895
|
// src/components/helpers/CharCounter/CharCounter.module.css
|
|
7820
7896
|
var CharCounter_default = {
|
|
@@ -7826,7 +7902,7 @@ var import_jsx_runtime251 = require("react/jsx-runtime");
|
|
|
7826
7902
|
function CharCounter(props) {
|
|
7827
7903
|
const { t } = useTranslation();
|
|
7828
7904
|
const { current, max, id } = props;
|
|
7829
|
-
const generatedId = (0,
|
|
7905
|
+
const generatedId = (0, import_react55.useId)();
|
|
7830
7906
|
const uniqueId = id != null ? id : `${generatedId}-characterCounter`;
|
|
7831
7907
|
return /* @__PURE__ */ (0, import_jsx_runtime251.jsxs)(
|
|
7832
7908
|
Typography,
|
|
@@ -7883,12 +7959,12 @@ var TextArea = ({
|
|
|
7883
7959
|
ref,
|
|
7884
7960
|
...rest
|
|
7885
7961
|
}) => {
|
|
7886
|
-
const generatedId = (0,
|
|
7962
|
+
const generatedId = (0, import_react56.useId)();
|
|
7887
7963
|
const uniqueId = id != null ? id : `${generatedId}-textArea`;
|
|
7888
|
-
const textAreaRef = (0,
|
|
7964
|
+
const textAreaRef = (0, import_react56.useRef)(null);
|
|
7889
7965
|
const multiRef = useCombinedRef(ref, textAreaRef);
|
|
7890
|
-
const [text, setText] = (0,
|
|
7891
|
-
(0,
|
|
7966
|
+
const [text, setText] = (0, import_react56.useState)(getDefaultText(value, defaultValue));
|
|
7967
|
+
(0, import_react56.useEffect)(() => {
|
|
7892
7968
|
if (textAreaRef == null ? void 0 : textAreaRef.current) {
|
|
7893
7969
|
const el = textAreaRef.current;
|
|
7894
7970
|
el.style.height = "auto";
|
|
@@ -7953,7 +8029,7 @@ var TextArea = ({
|
|
|
7953
8029
|
justifyContent: withCharacterCounter ? hasMessage ? "space-between" : "flex-end" : void 0,
|
|
7954
8030
|
width: withCharacterCounter ? inputWidth : void 0,
|
|
7955
8031
|
children: [
|
|
7956
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId),
|
|
8032
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId }),
|
|
7957
8033
|
renderCharCounter(
|
|
7958
8034
|
characterCounterId,
|
|
7959
8035
|
withCharacterCounter,
|
|
@@ -8032,7 +8108,7 @@ var texts12 = createTexts({
|
|
|
8032
8108
|
});
|
|
8033
8109
|
|
|
8034
8110
|
// src/components/Tooltip/Tooltip.tsx
|
|
8035
|
-
var
|
|
8111
|
+
var import_react57 = require("react");
|
|
8036
8112
|
|
|
8037
8113
|
// src/components/Tooltip/Tooltip.module.css
|
|
8038
8114
|
var Tooltip_default = {
|
|
@@ -8060,15 +8136,15 @@ var Tooltip = ({
|
|
|
8060
8136
|
htmlProps,
|
|
8061
8137
|
...rest
|
|
8062
8138
|
}) => {
|
|
8063
|
-
const generatedId = (0,
|
|
8139
|
+
const generatedId = (0, import_react57.useId)();
|
|
8064
8140
|
const uniqueTooltipId = tooltipId != null ? tooltipId : `${generatedId}-tooltip`;
|
|
8065
|
-
const [open, setOpen] = (0,
|
|
8066
|
-
const [inView, setInView] = (0,
|
|
8067
|
-
const [arrowElement, setArrowElement] = (0,
|
|
8141
|
+
const [open, setOpen] = (0, import_react57.useState)(false);
|
|
8142
|
+
const [inView, setInView] = (0, import_react57.useState)(keepMounted ? false : true);
|
|
8143
|
+
const [arrowElement, setArrowElement] = (0, import_react57.useState)(null);
|
|
8068
8144
|
const { refs, styles: positionStyles } = useFloatPosition(arrowElement, {
|
|
8069
8145
|
placement
|
|
8070
8146
|
});
|
|
8071
|
-
const tooltipRef = (0,
|
|
8147
|
+
const tooltipRef = (0, import_react57.useRef)(null);
|
|
8072
8148
|
const combinedRef = useCombinedRef(ref, refs.setFloating, tooltipRef);
|
|
8073
8149
|
const closeWhenNotInView = (entries) => {
|
|
8074
8150
|
const [entry] = entries;
|
|
@@ -8076,7 +8152,7 @@ var Tooltip = ({
|
|
|
8076
8152
|
setInView(true);
|
|
8077
8153
|
} else setInView(false);
|
|
8078
8154
|
};
|
|
8079
|
-
(0,
|
|
8155
|
+
(0, import_react57.useEffect)(() => {
|
|
8080
8156
|
if (keepMounted) {
|
|
8081
8157
|
const options = {
|
|
8082
8158
|
root: null,
|
|
@@ -8090,7 +8166,7 @@ var Tooltip = ({
|
|
|
8090
8166
|
};
|
|
8091
8167
|
}
|
|
8092
8168
|
}, [tooltipRef]);
|
|
8093
|
-
(0,
|
|
8169
|
+
(0, import_react57.useEffect)(() => {
|
|
8094
8170
|
if (tooltipRef.current) {
|
|
8095
8171
|
window.addEventListener("scroll", () => {
|
|
8096
8172
|
closeTooltip();
|
|
@@ -8103,7 +8179,7 @@ var Tooltip = ({
|
|
|
8103
8179
|
};
|
|
8104
8180
|
}, []);
|
|
8105
8181
|
let timer;
|
|
8106
|
-
(0,
|
|
8182
|
+
(0, import_react57.useEffect)(() => {
|
|
8107
8183
|
return () => {
|
|
8108
8184
|
clearTimeout(timer);
|
|
8109
8185
|
};
|
|
@@ -8124,8 +8200,8 @@ var Tooltip = ({
|
|
|
8124
8200
|
const hasTransitionedIn = useMountTransition(open, 500);
|
|
8125
8201
|
const isMounted = hasTransitionedIn && open;
|
|
8126
8202
|
const isTransientlyMounted = !keepMounted && isMounted;
|
|
8127
|
-
const anchorElement =
|
|
8128
|
-
(0,
|
|
8203
|
+
const anchorElement = import_react57.Children.only(
|
|
8204
|
+
(0, import_react57.cloneElement)(children, {
|
|
8129
8205
|
ref: refs.setReference,
|
|
8130
8206
|
onFocus: combineHandlers(openTooltip, children.props.onFocus),
|
|
8131
8207
|
onBlur: combineHandlers(closeTooltip, children.props.onBlur),
|
|
@@ -8263,9 +8339,9 @@ var Feedback = ({
|
|
|
8263
8339
|
onSubmit
|
|
8264
8340
|
}) => {
|
|
8265
8341
|
const { t } = useTranslation();
|
|
8266
|
-
const [rating, setRating] = (0,
|
|
8267
|
-
const [feedbackText, setFeedbackText] = (0,
|
|
8268
|
-
const [isFeedbackSubmitted, setIsFeedbackSubmitted] = (0,
|
|
8342
|
+
const [rating, setRating] = (0, import_react58.useState)(null);
|
|
8343
|
+
const [feedbackText, setFeedbackText] = (0, import_react58.useState)();
|
|
8344
|
+
const [isFeedbackSubmitted, setIsFeedbackSubmitted] = (0, import_react58.useState)(false);
|
|
8269
8345
|
const tRatingLabel = ratingLabel != null ? ratingLabel : t(texts14.ratingQuestion);
|
|
8270
8346
|
const tPositiveFeedbackLabel = positiveFeedbackLabel != null ? positiveFeedbackLabel : t(texts14.improvalQuestion);
|
|
8271
8347
|
const tNegativeFeedbackLabel = negativeFeedbackLabel != null ? negativeFeedbackLabel : t(texts14.improvalQuestion);
|
|
@@ -8274,13 +8350,13 @@ var Feedback = ({
|
|
|
8274
8350
|
const tTextAreaTip = textAreaTip != null ? textAreaTip : t(texts14.sensitiveInfo);
|
|
8275
8351
|
const tThumbUpTooltip = thumbUpTooltip != null ? thumbUpTooltip : t(texts14.good);
|
|
8276
8352
|
const tThumbDownTooltip = thumbDownTooltip != null ? thumbDownTooltip : t(texts14.bad);
|
|
8277
|
-
(0,
|
|
8353
|
+
(0, import_react58.useEffect)(() => {
|
|
8278
8354
|
if (ratingProp !== void 0) setRating(ratingProp);
|
|
8279
8355
|
}, [ratingProp]);
|
|
8280
|
-
(0,
|
|
8356
|
+
(0, import_react58.useEffect)(() => {
|
|
8281
8357
|
if (feedbackTextProp !== void 0) setFeedbackText(feedbackTextProp);
|
|
8282
8358
|
}, [feedbackTextProp]);
|
|
8283
|
-
(0,
|
|
8359
|
+
(0, import_react58.useEffect)(() => {
|
|
8284
8360
|
if (isSubmittedProp !== void 0) setIsFeedbackSubmitted(isSubmittedProp);
|
|
8285
8361
|
}, [isSubmittedProp]);
|
|
8286
8362
|
const handleRatingChange = (newRating) => {
|
|
@@ -8402,7 +8478,7 @@ var FieldsetGroup = ({
|
|
|
8402
8478
|
FieldsetGroup.displayName = "FieldsetGroup";
|
|
8403
8479
|
|
|
8404
8480
|
// src/components/FileUploader/FileUploader.tsx
|
|
8405
|
-
var
|
|
8481
|
+
var import_react60 = require("react");
|
|
8406
8482
|
|
|
8407
8483
|
// src/components/FileUploader/ErrorList.tsx
|
|
8408
8484
|
var import_jsx_runtime259 = require("react/jsx-runtime");
|
|
@@ -8412,14 +8488,10 @@ var ErrorList = (props) => {
|
|
|
8412
8488
|
return null;
|
|
8413
8489
|
}
|
|
8414
8490
|
if (errors.length === 1) {
|
|
8415
|
-
return
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
message: errors[0].message,
|
|
8420
|
-
messageType: "error"
|
|
8421
|
-
}
|
|
8422
|
-
);
|
|
8491
|
+
return renderInputMessage({
|
|
8492
|
+
errorMessage: errors[0].message,
|
|
8493
|
+
errorMessageId: errors[0].id
|
|
8494
|
+
});
|
|
8423
8495
|
}
|
|
8424
8496
|
return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StylelessList, { children: errors.map(({ id, message }) => {
|
|
8425
8497
|
return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
|
|
@@ -8539,7 +8611,7 @@ var texts15 = createTexts({
|
|
|
8539
8611
|
|
|
8540
8612
|
// src/components/FileUploader/useFileUploader.ts
|
|
8541
8613
|
var import_file_selector = require("file-selector");
|
|
8542
|
-
var
|
|
8614
|
+
var import_react59 = require("react");
|
|
8543
8615
|
|
|
8544
8616
|
// src/components/FileUploader/fileUploaderReducer.ts
|
|
8545
8617
|
var fileUploaderReducer = (state, action) => {
|
|
@@ -8639,18 +8711,18 @@ var useFileUploader = (props) => {
|
|
|
8639
8711
|
errorMessage
|
|
8640
8712
|
} = props;
|
|
8641
8713
|
const { t } = useTranslation();
|
|
8642
|
-
const rootRef = (0,
|
|
8643
|
-
const inputRef = (0,
|
|
8644
|
-
const buttonRef = (0,
|
|
8714
|
+
const rootRef = (0, import_react59.useRef)(null);
|
|
8715
|
+
const inputRef = (0, import_react59.useRef)(null);
|
|
8716
|
+
const buttonRef = (0, import_react59.useRef)(null);
|
|
8645
8717
|
const isControlled = !!value;
|
|
8646
|
-
const initialFileUploaderFiles = (0,
|
|
8718
|
+
const initialFileUploaderFiles = (0, import_react59.useMemo)(
|
|
8647
8719
|
() => (initialFiles != null ? initialFiles : []).map((f) => ({
|
|
8648
8720
|
file: f,
|
|
8649
8721
|
errors: []
|
|
8650
8722
|
})),
|
|
8651
8723
|
[initialFiles]
|
|
8652
8724
|
);
|
|
8653
|
-
const [state, dispatch] = (0,
|
|
8725
|
+
const [state, dispatch] = (0, import_react59.useReducer)(fileUploaderReducer, {
|
|
8654
8726
|
files: initialFileUploaderFiles,
|
|
8655
8727
|
isFocused: false,
|
|
8656
8728
|
isFileDialogActive: false,
|
|
@@ -8663,7 +8735,7 @@ var useFileUploader = (props) => {
|
|
|
8663
8735
|
)
|
|
8664
8736
|
});
|
|
8665
8737
|
const { files: stateFiles } = state;
|
|
8666
|
-
(0,
|
|
8738
|
+
(0, import_react59.useEffect)(() => {
|
|
8667
8739
|
if (isControlled) {
|
|
8668
8740
|
const files = value.map((file) => {
|
|
8669
8741
|
const accepted = isFileAccepted(file, accept);
|
|
@@ -8678,7 +8750,7 @@ var useFileUploader = (props) => {
|
|
|
8678
8750
|
});
|
|
8679
8751
|
}
|
|
8680
8752
|
}, [value, isControlled, accept, dispatch]);
|
|
8681
|
-
(0,
|
|
8753
|
+
(0, import_react59.useEffect)(() => {
|
|
8682
8754
|
dispatch({
|
|
8683
8755
|
type: "setRootErrors",
|
|
8684
8756
|
payload: calcRootErrors(
|
|
@@ -8689,12 +8761,12 @@ var useFileUploader = (props) => {
|
|
|
8689
8761
|
)
|
|
8690
8762
|
});
|
|
8691
8763
|
}, [dispatch, stateFiles, maxFiles, errorMessage]);
|
|
8692
|
-
const onRootFocus = (0,
|
|
8764
|
+
const onRootFocus = (0, import_react59.useCallback)(
|
|
8693
8765
|
() => dispatch({ type: "focus" }),
|
|
8694
8766
|
[dispatch]
|
|
8695
8767
|
);
|
|
8696
|
-
const onRootBlur = (0,
|
|
8697
|
-
const onRootDragEnter = (0,
|
|
8768
|
+
const onRootBlur = (0, import_react59.useCallback)(() => dispatch({ type: "blur" }), [dispatch]);
|
|
8769
|
+
const onRootDragEnter = (0, import_react59.useCallback)(
|
|
8698
8770
|
async (evt) => {
|
|
8699
8771
|
preventDefaults(evt);
|
|
8700
8772
|
if (isEventWithFiles(evt)) {
|
|
@@ -8706,7 +8778,7 @@ var useFileUploader = (props) => {
|
|
|
8706
8778
|
},
|
|
8707
8779
|
[dispatch, accept, maxFiles]
|
|
8708
8780
|
);
|
|
8709
|
-
const onRootDragOver = (0,
|
|
8781
|
+
const onRootDragOver = (0, import_react59.useCallback)((evt) => {
|
|
8710
8782
|
preventDefaults(evt);
|
|
8711
8783
|
const hasFiles = isEventWithFiles(evt);
|
|
8712
8784
|
if (hasFiles && evt.dataTransfer) {
|
|
@@ -8716,7 +8788,7 @@ var useFileUploader = (props) => {
|
|
|
8716
8788
|
}
|
|
8717
8789
|
}
|
|
8718
8790
|
}, []);
|
|
8719
|
-
const onRootDragLeave = (0,
|
|
8791
|
+
const onRootDragLeave = (0, import_react59.useCallback)(
|
|
8720
8792
|
(evt) => {
|
|
8721
8793
|
preventDefaults(evt);
|
|
8722
8794
|
if (evt.currentTarget.contains(evt.relatedTarget)) return;
|
|
@@ -8724,7 +8796,7 @@ var useFileUploader = (props) => {
|
|
|
8724
8796
|
},
|
|
8725
8797
|
[dispatch]
|
|
8726
8798
|
);
|
|
8727
|
-
const setFiles = (0,
|
|
8799
|
+
const setFiles = (0, import_react59.useCallback)(
|
|
8728
8800
|
async (evt) => {
|
|
8729
8801
|
evt.preventDefault();
|
|
8730
8802
|
if (isEventWithFiles(evt)) {
|
|
@@ -8758,13 +8830,13 @@ var useFileUploader = (props) => {
|
|
|
8758
8830
|
dispatch
|
|
8759
8831
|
]
|
|
8760
8832
|
);
|
|
8761
|
-
const openFileDialog = (0,
|
|
8833
|
+
const openFileDialog = (0, import_react59.useCallback)(() => {
|
|
8762
8834
|
if (inputRef.current) {
|
|
8763
8835
|
inputRef.current.value = "";
|
|
8764
8836
|
inputRef.current.click();
|
|
8765
8837
|
}
|
|
8766
8838
|
}, [inputRef]);
|
|
8767
|
-
const removeFile = (0,
|
|
8839
|
+
const removeFile = (0, import_react59.useCallback)(
|
|
8768
8840
|
(file) => {
|
|
8769
8841
|
const newFiles = [...stateFiles];
|
|
8770
8842
|
newFiles.splice(stateFiles.indexOf(file), 1);
|
|
@@ -8778,7 +8850,7 @@ var useFileUploader = (props) => {
|
|
|
8778
8850
|
},
|
|
8779
8851
|
[stateFiles, isControlled, maxFiles, errorMessage, onChange, dispatch]
|
|
8780
8852
|
);
|
|
8781
|
-
const getRootProps = (0,
|
|
8853
|
+
const getRootProps = (0, import_react59.useCallback)(
|
|
8782
8854
|
() => ({
|
|
8783
8855
|
onBlur: onRootBlur,
|
|
8784
8856
|
onFocus: onRootFocus,
|
|
@@ -8798,14 +8870,14 @@ var useFileUploader = (props) => {
|
|
|
8798
8870
|
disabled
|
|
8799
8871
|
]
|
|
8800
8872
|
);
|
|
8801
|
-
const getButtonProps = (0,
|
|
8873
|
+
const getButtonProps = (0, import_react59.useCallback)(
|
|
8802
8874
|
() => ({
|
|
8803
8875
|
onClick: openFileDialog,
|
|
8804
8876
|
ref: buttonRef
|
|
8805
8877
|
}),
|
|
8806
8878
|
[openFileDialog, buttonRef]
|
|
8807
8879
|
);
|
|
8808
|
-
const getInputProps = (0,
|
|
8880
|
+
const getInputProps = (0, import_react59.useCallback)(
|
|
8809
8881
|
() => ({
|
|
8810
8882
|
type: "file",
|
|
8811
8883
|
tabIndex: readOnly ? void 0 : -1,
|
|
@@ -8874,7 +8946,7 @@ var FileUploader = (props) => {
|
|
|
8874
8946
|
const { t } = useTranslation();
|
|
8875
8947
|
const tDropAreaLabel = dropAreaLabel != null ? dropAreaLabel : t(texts17.dragAndDropOr);
|
|
8876
8948
|
const tBtnLabel = btnLabel != null ? btnLabel : t(texts17.selectFile);
|
|
8877
|
-
const generatedId = (0,
|
|
8949
|
+
const generatedId = (0, import_react60.useId)();
|
|
8878
8950
|
const uniqueId = id != null ? id : `${generatedId}-fileUploader`;
|
|
8879
8951
|
const {
|
|
8880
8952
|
state: { files: stateFiles, isDragActive, rootErrors },
|
|
@@ -8967,7 +9039,7 @@ var FileUploader = (props) => {
|
|
|
8967
9039
|
readOnly,
|
|
8968
9040
|
afterLabelContent
|
|
8969
9041
|
}),
|
|
8970
|
-
|
|
9042
|
+
renderInputMessage({ tip, tipId }),
|
|
8971
9043
|
inactive ? input : withDragAndDrop ? /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(
|
|
8972
9044
|
VStack,
|
|
8973
9045
|
{
|
|
@@ -9214,7 +9286,7 @@ var texts18 = createTexts({
|
|
|
9214
9286
|
});
|
|
9215
9287
|
|
|
9216
9288
|
// src/components/GlobalMessage/GlobalMessage.tsx
|
|
9217
|
-
var
|
|
9289
|
+
var import_react61 = require("react");
|
|
9218
9290
|
|
|
9219
9291
|
// src/components/GlobalMessage/GlobalMessage.module.css
|
|
9220
9292
|
var GlobalMessage_default = {
|
|
@@ -9246,7 +9318,7 @@ var GlobalMessage = ({
|
|
|
9246
9318
|
...rest
|
|
9247
9319
|
}) => {
|
|
9248
9320
|
const { t } = useTranslation();
|
|
9249
|
-
const [isClosed, setClosed] = (0,
|
|
9321
|
+
const [isClosed, setClosed] = (0, import_react61.useState)(false);
|
|
9250
9322
|
return !isClosed ? /* @__PURE__ */ (0, import_jsx_runtime272.jsxs)(
|
|
9251
9323
|
"div",
|
|
9252
9324
|
{
|
|
@@ -9320,15 +9392,15 @@ var InlineButton = ({
|
|
|
9320
9392
|
);
|
|
9321
9393
|
|
|
9322
9394
|
// src/components/InlineEdit/InlineEditTextArea/InlineEditTextArea.tsx
|
|
9323
|
-
var
|
|
9395
|
+
var import_react64 = require("react");
|
|
9324
9396
|
|
|
9325
9397
|
// src/components/InlineEdit/InlineEdit.context.tsx
|
|
9326
|
-
var
|
|
9398
|
+
var import_react62 = require("react");
|
|
9327
9399
|
var import_jsx_runtime274 = require("react/jsx-runtime");
|
|
9328
|
-
var InlineEditContext = (0,
|
|
9400
|
+
var InlineEditContext = (0, import_react62.createContext)(
|
|
9329
9401
|
{}
|
|
9330
9402
|
);
|
|
9331
|
-
var useInlineEditContext = () => (0,
|
|
9403
|
+
var useInlineEditContext = () => (0, import_react62.useContext)(InlineEditContext);
|
|
9332
9404
|
var InlineEditContextProvider = (props) => {
|
|
9333
9405
|
const {
|
|
9334
9406
|
emptiable,
|
|
@@ -9340,8 +9412,8 @@ var InlineEditContextProvider = (props) => {
|
|
|
9340
9412
|
inputRef,
|
|
9341
9413
|
children
|
|
9342
9414
|
} = props;
|
|
9343
|
-
const [editingValue, setEditingValue] = (0,
|
|
9344
|
-
const [isEditing, setIsEditing] = (0,
|
|
9415
|
+
const [editingValue, setEditingValue] = (0, import_react62.useState)(value != null ? value : "");
|
|
9416
|
+
const [isEditing, setIsEditing] = (0, import_react62.useState)(false);
|
|
9345
9417
|
const onChangeHandler = (e) => {
|
|
9346
9418
|
setEditingValue(e.target.value);
|
|
9347
9419
|
onChange == null ? void 0 : onChange(e);
|
|
@@ -9386,7 +9458,7 @@ var InlineEditContextProvider = (props) => {
|
|
|
9386
9458
|
InlineEditContextProvider.displayName = "InlineEditContextProvider";
|
|
9387
9459
|
|
|
9388
9460
|
// src/components/InlineEdit/InlineField.tsx
|
|
9389
|
-
var
|
|
9461
|
+
var import_react63 = require("react");
|
|
9390
9462
|
|
|
9391
9463
|
// src/components/InlineEdit/InlineEdit.module.css
|
|
9392
9464
|
var InlineEdit_default = {
|
|
@@ -9491,14 +9563,14 @@ function InlineField(props) {
|
|
|
9491
9563
|
} = props;
|
|
9492
9564
|
const { onBlur, onChange, onFocus, isEditing, value, emptiable } = useInlineEditContext();
|
|
9493
9565
|
const { t } = useTranslation();
|
|
9494
|
-
const generatedId = (0,
|
|
9566
|
+
const generatedId = (0, import_react63.useId)();
|
|
9495
9567
|
const uniqueId = id != null ? id : `${generatedId}-InlineEdit`;
|
|
9496
9568
|
const hasErrorMessage = !!errorMessage;
|
|
9497
9569
|
const hasErrorState = !!error || hasErrorMessage;
|
|
9498
9570
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
9499
9571
|
const descId = derivativeIdGenerator(uniqueId, "desc");
|
|
9500
9572
|
const hasValue = !!value;
|
|
9501
|
-
const inputRef = (0,
|
|
9573
|
+
const inputRef = (0, import_react63.useRef)(null);
|
|
9502
9574
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
9503
9575
|
const clearInput = () => {
|
|
9504
9576
|
const clearChangeEvent = createClearChangeEvent(uniqueId);
|
|
@@ -9587,7 +9659,7 @@ function InlineField(props) {
|
|
|
9587
9659
|
renderElement()
|
|
9588
9660
|
] }),
|
|
9589
9661
|
inlineEditVisuallyHidden(descId, emptiable),
|
|
9590
|
-
renderInputMessage(
|
|
9662
|
+
renderInputMessage({ errorMessage, errorMessageId })
|
|
9591
9663
|
] });
|
|
9592
9664
|
}
|
|
9593
9665
|
|
|
@@ -9603,7 +9675,7 @@ var InlineEditTextArea = ({
|
|
|
9603
9675
|
ref,
|
|
9604
9676
|
...rest
|
|
9605
9677
|
}) => {
|
|
9606
|
-
const textareaRef = (0,
|
|
9678
|
+
const textareaRef = (0, import_react64.useRef)(null);
|
|
9607
9679
|
const combinedRef = useCombinedRef(ref, textareaRef);
|
|
9608
9680
|
return /* @__PURE__ */ (0, import_jsx_runtime277.jsx)(
|
|
9609
9681
|
InlineEditContextProvider,
|
|
@@ -9621,7 +9693,7 @@ var InlineEditTextArea = ({
|
|
|
9621
9693
|
};
|
|
9622
9694
|
|
|
9623
9695
|
// src/components/InlineEdit/InlineEditInput/InlineEditInput.tsx
|
|
9624
|
-
var
|
|
9696
|
+
var import_react65 = require("react");
|
|
9625
9697
|
var import_jsx_runtime278 = require("react/jsx-runtime");
|
|
9626
9698
|
var InlineEditInput = ({
|
|
9627
9699
|
onSetValue,
|
|
@@ -9633,7 +9705,7 @@ var InlineEditInput = ({
|
|
|
9633
9705
|
ref,
|
|
9634
9706
|
...rest
|
|
9635
9707
|
}) => {
|
|
9636
|
-
const inputRef = (0,
|
|
9708
|
+
const inputRef = (0, import_react65.useRef)(null);
|
|
9637
9709
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
9638
9710
|
return /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
|
|
9639
9711
|
InlineEditContextProvider,
|
|
@@ -9651,7 +9723,7 @@ var InlineEditInput = ({
|
|
|
9651
9723
|
};
|
|
9652
9724
|
|
|
9653
9725
|
// src/components/InlineEdit/InlineEditSelect/InlineEditSelect.tsx
|
|
9654
|
-
var
|
|
9726
|
+
var import_react66 = require("react");
|
|
9655
9727
|
var import_jsx_runtime279 = require("react/jsx-runtime");
|
|
9656
9728
|
var InlineEditSelect = ({
|
|
9657
9729
|
onSetValue,
|
|
@@ -9663,7 +9735,7 @@ var InlineEditSelect = ({
|
|
|
9663
9735
|
ref,
|
|
9664
9736
|
...rest
|
|
9665
9737
|
}) => {
|
|
9666
|
-
const inputRef = (0,
|
|
9738
|
+
const inputRef = (0, import_react66.useRef)(null);
|
|
9667
9739
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
9668
9740
|
return /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(
|
|
9669
9741
|
InlineEditContextProvider,
|
|
@@ -9681,7 +9753,7 @@ var InlineEditSelect = ({
|
|
|
9681
9753
|
};
|
|
9682
9754
|
|
|
9683
9755
|
// src/components/InternalHeader/InternalHeader.tsx
|
|
9684
|
-
var
|
|
9756
|
+
var import_react67 = require("react");
|
|
9685
9757
|
|
|
9686
9758
|
// src/components/InternalHeader/InternalHeader.module.css
|
|
9687
9759
|
var InternalHeader_default = {
|
|
@@ -9714,7 +9786,7 @@ var NavigationItem = ({ isCurrent, ...rest }) => /* @__PURE__ */ (0, import_jsx_
|
|
|
9714
9786
|
|
|
9715
9787
|
// src/components/InternalHeader/InternalHeader.tsx
|
|
9716
9788
|
var import_jsx_runtime281 = require("react/jsx-runtime");
|
|
9717
|
-
var
|
|
9789
|
+
var import_react68 = require("react");
|
|
9718
9790
|
var InternalHeader = (props) => {
|
|
9719
9791
|
const {
|
|
9720
9792
|
applicationDesc,
|
|
@@ -9732,7 +9804,7 @@ var InternalHeader = (props) => {
|
|
|
9732
9804
|
...rest
|
|
9733
9805
|
} = props;
|
|
9734
9806
|
const { t } = useTranslation();
|
|
9735
|
-
const [currentPage, setCurrentPage] = (0,
|
|
9807
|
+
const [currentPage, setCurrentPage] = (0, import_react67.useState)(
|
|
9736
9808
|
currentPageHref
|
|
9737
9809
|
);
|
|
9738
9810
|
const handleCurrentPageChange = (href) => {
|
|
@@ -9818,7 +9890,7 @@ var InternalHeader = (props) => {
|
|
|
9818
9890
|
as: "nav",
|
|
9819
9891
|
"aria-label": t(texts20.siteNavigation),
|
|
9820
9892
|
showBelow: smallScreenBreakpoint,
|
|
9821
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(OverflowMenuList, { children: navItems.map((item, i) => /* @__PURE__ */ (0,
|
|
9893
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(OverflowMenuList, { children: navItems.map((item, i) => /* @__PURE__ */ (0, import_react68.createElement)(OverflowMenuLink, { ...item, key: `nav-${i}` })) })
|
|
9822
9894
|
}
|
|
9823
9895
|
),
|
|
9824
9896
|
hasNavInContextMenu && hasContextMenuElements && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
|
|
@@ -9829,13 +9901,13 @@ var InternalHeader = (props) => {
|
|
|
9829
9901
|
}
|
|
9830
9902
|
),
|
|
9831
9903
|
hasContextMenuElements && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(OverflowMenuList, { children: contextMenuItems.map((item, i) => {
|
|
9832
|
-
return item.href ? /* @__PURE__ */ (0,
|
|
9904
|
+
return item.href ? /* @__PURE__ */ (0, import_react68.createElement)(
|
|
9833
9905
|
OverflowMenuLink,
|
|
9834
9906
|
{
|
|
9835
9907
|
...item,
|
|
9836
9908
|
key: `context-${i}`
|
|
9837
9909
|
}
|
|
9838
|
-
) : /* @__PURE__ */ (0,
|
|
9910
|
+
) : /* @__PURE__ */ (0, import_react68.createElement)(
|
|
9839
9911
|
OverflowMenuButton,
|
|
9840
9912
|
{
|
|
9841
9913
|
...item,
|
|
@@ -9911,7 +9983,7 @@ var ListItem = ({ className, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtim
|
|
|
9911
9983
|
ListItem.displayName = "ListItem";
|
|
9912
9984
|
|
|
9913
9985
|
// src/components/LocalMessage/LocalMessage.tsx
|
|
9914
|
-
var
|
|
9986
|
+
var import_react69 = require("react");
|
|
9915
9987
|
|
|
9916
9988
|
// src/components/LocalMessage/LocalMessage.module.css
|
|
9917
9989
|
var LocalMessage_default = {
|
|
@@ -9954,7 +10026,7 @@ var LocalMessage = ({
|
|
|
9954
10026
|
...rest
|
|
9955
10027
|
}) => {
|
|
9956
10028
|
const { t } = useTranslation();
|
|
9957
|
-
const [isClosed, setClosed] = (0,
|
|
10029
|
+
const [isClosed, setClosed] = (0, import_react69.useState)(false);
|
|
9958
10030
|
if (isClosed) {
|
|
9959
10031
|
return /* @__PURE__ */ (0, import_jsx_runtime284.jsx)(import_jsx_runtime284.Fragment, {});
|
|
9960
10032
|
}
|
|
@@ -10008,7 +10080,7 @@ var LocalMessage = ({
|
|
|
10008
10080
|
LocalMessage.displayName = "LocalMessage";
|
|
10009
10081
|
|
|
10010
10082
|
// src/components/Modal/Modal.tsx
|
|
10011
|
-
var
|
|
10083
|
+
var import_react70 = require("react");
|
|
10012
10084
|
var import_react_dom4 = require("react-dom");
|
|
10013
10085
|
|
|
10014
10086
|
// src/components/Modal/Modal.module.css
|
|
@@ -10038,7 +10110,7 @@ var Modal = ({
|
|
|
10038
10110
|
ref,
|
|
10039
10111
|
...rest
|
|
10040
10112
|
}) => {
|
|
10041
|
-
const generatedId = (0,
|
|
10113
|
+
const generatedId = (0, import_react70.useId)();
|
|
10042
10114
|
const modalId = id != null ? id : `${generatedId}-modal`;
|
|
10043
10115
|
const headerId = `${modalId}-header`;
|
|
10044
10116
|
const modalRef = useFocusTrap(isOpen, initialFocusRef);
|
|
@@ -10050,13 +10122,13 @@ var Modal = ({
|
|
|
10050
10122
|
onClose();
|
|
10051
10123
|
}
|
|
10052
10124
|
};
|
|
10053
|
-
const themeContext = (0,
|
|
10125
|
+
const themeContext = (0, import_react70.useContext)(ThemeContext);
|
|
10054
10126
|
if (!themeContext) {
|
|
10055
10127
|
throw new Error("Modal must be used within a ThemeProvider");
|
|
10056
10128
|
}
|
|
10057
10129
|
const { t } = useTranslation();
|
|
10058
10130
|
const portalTarget = parentElement != null ? parentElement : themeContext == null ? void 0 : themeContext.el;
|
|
10059
|
-
(0,
|
|
10131
|
+
(0, import_react70.useEffect)(() => {
|
|
10060
10132
|
if (isOpen) {
|
|
10061
10133
|
handleElementWithBackdropMount(document.body);
|
|
10062
10134
|
} else {
|
|
@@ -10064,7 +10136,7 @@ var Modal = ({
|
|
|
10064
10136
|
}
|
|
10065
10137
|
return () => handleElementWithBackdropUnmount(document.body);
|
|
10066
10138
|
}, [isOpen]);
|
|
10067
|
-
const backdropRef = (0,
|
|
10139
|
+
const backdropRef = (0, import_react70.useRef)(null);
|
|
10068
10140
|
const onBackdropClick = (event) => {
|
|
10069
10141
|
if (event.target === backdropRef.current && isOpen) {
|
|
10070
10142
|
handleClose();
|
|
@@ -10181,7 +10253,7 @@ var ModalActions = (props) => /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(Box
|
|
|
10181
10253
|
ModalActions.displayName = "ModalActions";
|
|
10182
10254
|
|
|
10183
10255
|
// src/components/Pagination/Pagination.tsx
|
|
10184
|
-
var
|
|
10256
|
+
var import_react74 = require("react");
|
|
10185
10257
|
|
|
10186
10258
|
// src/components/Pagination/Pagination.module.css
|
|
10187
10259
|
var Pagination_default = {
|
|
@@ -10226,7 +10298,7 @@ function PaginationGenerator(pagesAmount, activePage) {
|
|
|
10226
10298
|
}
|
|
10227
10299
|
|
|
10228
10300
|
// src/components/Select/Select.tsx
|
|
10229
|
-
var
|
|
10301
|
+
var import_react72 = require("react");
|
|
10230
10302
|
var import_react_select2 = __toESM(require("react-select"));
|
|
10231
10303
|
|
|
10232
10304
|
// src/components/Select/Select.module.css
|
|
@@ -10290,7 +10362,7 @@ var control = {
|
|
|
10290
10362
|
...optionTypography.medium
|
|
10291
10363
|
},
|
|
10292
10364
|
hasIcon: {
|
|
10293
|
-
paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-
|
|
10365
|
+
paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-md-icon-text-gap))"
|
|
10294
10366
|
}
|
|
10295
10367
|
},
|
|
10296
10368
|
small: {
|
|
@@ -10300,7 +10372,7 @@ var control = {
|
|
|
10300
10372
|
...optionTypography.small
|
|
10301
10373
|
},
|
|
10302
10374
|
hasIcon: {
|
|
10303
|
-
paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-
|
|
10375
|
+
paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-sm-icon-text-gap))"
|
|
10304
10376
|
}
|
|
10305
10377
|
},
|
|
10306
10378
|
xsmall: {
|
|
@@ -10310,7 +10382,7 @@ var control = {
|
|
|
10310
10382
|
...optionTypography.xsmall
|
|
10311
10383
|
},
|
|
10312
10384
|
hasIcon: {
|
|
10313
|
-
paddingLeft: "calc(var(--dds-spacing-x0-5) + var(--dds-icon-size-small) + var(--dds-spacing-
|
|
10385
|
+
paddingLeft: "calc(var(--dds-spacing-x0-5) + var(--dds-icon-size-small) + var(--dds-spacing-xs-icon-text-gap))"
|
|
10314
10386
|
}
|
|
10315
10387
|
}
|
|
10316
10388
|
};
|
|
@@ -10506,7 +10578,7 @@ var getCustomStyles = (size2, hasError, hasIcon, isReadOnly) => ({
|
|
|
10506
10578
|
});
|
|
10507
10579
|
|
|
10508
10580
|
// src/components/Select/SelectComponents.tsx
|
|
10509
|
-
var
|
|
10581
|
+
var import_react71 = __toESM(require("react"));
|
|
10510
10582
|
var import_react_select = require("react-select");
|
|
10511
10583
|
var import_jsx_runtime288 = require("react/jsx-runtime");
|
|
10512
10584
|
var {
|
|
@@ -10535,7 +10607,7 @@ var DDSOption = ({
|
|
|
10535
10607
|
props.isSelected && /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(Icon, { icon: CheckIcon, iconSize: "small" }),
|
|
10536
10608
|
props.children
|
|
10537
10609
|
] });
|
|
10538
|
-
var CustomOption = (props) => /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(Option, { ...props, children:
|
|
10610
|
+
var CustomOption = (props) => /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(Option, { ...props, children: import_react71.default.createElement(props.customElement, props) });
|
|
10539
10611
|
var CustomSingleValue = ({
|
|
10540
10612
|
id,
|
|
10541
10613
|
Element,
|
|
@@ -10608,7 +10680,7 @@ function DDSControl(props) {
|
|
|
10608
10680
|
icon,
|
|
10609
10681
|
iconSize: getFormInputIconSize(componentSize),
|
|
10610
10682
|
className: cn(
|
|
10611
|
-
Input_default["input-group__absolute-
|
|
10683
|
+
Input_default["input-group__absolute-el"],
|
|
10612
10684
|
Select_default[`icon--${componentSize}`]
|
|
10613
10685
|
)
|
|
10614
10686
|
}
|
|
@@ -10652,12 +10724,12 @@ function Select({
|
|
|
10652
10724
|
afterLabelContent,
|
|
10653
10725
|
...rest
|
|
10654
10726
|
}) {
|
|
10655
|
-
const themeContext = (0,
|
|
10727
|
+
const themeContext = (0, import_react72.useContext)(ThemeContext);
|
|
10656
10728
|
if (!themeContext) {
|
|
10657
10729
|
throw new Error("Select must be used within a ThemeProvider");
|
|
10658
10730
|
}
|
|
10659
10731
|
const portalTarget = menuPortalTarget != null ? menuPortalTarget : themeContext == null ? void 0 : themeContext.el;
|
|
10660
|
-
const generatedId = (0,
|
|
10732
|
+
const generatedId = (0, import_react72.useId)();
|
|
10661
10733
|
const uniqueId = id != null ? id : `${generatedId}-select`;
|
|
10662
10734
|
const singleValueId = !isMulti ? `${uniqueId}-singleValue` : void 0;
|
|
10663
10735
|
const hasErrorMessage = !!errorMessage;
|
|
@@ -10669,7 +10741,7 @@ function Select({
|
|
|
10669
10741
|
width,
|
|
10670
10742
|
componentSize === "xsmall" && "var(--dds-input-default-width-xsmall)"
|
|
10671
10743
|
);
|
|
10672
|
-
const customInput = (0,
|
|
10744
|
+
const customInput = (0, import_react72.useCallback)(
|
|
10673
10745
|
(props) => /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(
|
|
10674
10746
|
DDSInput,
|
|
10675
10747
|
{
|
|
@@ -10687,7 +10759,7 @@ function Select({
|
|
|
10687
10759
|
),
|
|
10688
10760
|
[]
|
|
10689
10761
|
);
|
|
10690
|
-
const customSingleValue = (0,
|
|
10762
|
+
const customSingleValue = (0, import_react72.useCallback)(
|
|
10691
10763
|
(props) => /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(
|
|
10692
10764
|
CustomSingleValue,
|
|
10693
10765
|
{
|
|
@@ -10698,15 +10770,15 @@ function Select({
|
|
|
10698
10770
|
),
|
|
10699
10771
|
[]
|
|
10700
10772
|
);
|
|
10701
|
-
const customClearIndicator = (0,
|
|
10773
|
+
const customClearIndicator = (0, import_react72.useCallback)(
|
|
10702
10774
|
(props) => /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(DDSClearIndicator, { ...props, size: componentSize }),
|
|
10703
10775
|
[componentSize]
|
|
10704
10776
|
);
|
|
10705
|
-
const customDropdownIndicator = (0,
|
|
10777
|
+
const customDropdownIndicator = (0, import_react72.useCallback)(
|
|
10706
10778
|
(props) => /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(DDSDropdownIndicator, { ...props, componentSize }),
|
|
10707
10779
|
[componentSize]
|
|
10708
10780
|
);
|
|
10709
|
-
const customControl = (0,
|
|
10781
|
+
const customControl = (0, import_react72.useCallback)(
|
|
10710
10782
|
(props) => /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(
|
|
10711
10783
|
DDSControl,
|
|
10712
10784
|
{
|
|
@@ -10719,7 +10791,7 @@ function Select({
|
|
|
10719
10791
|
),
|
|
10720
10792
|
[componentSize, readOnly, icon, dataTestId]
|
|
10721
10793
|
);
|
|
10722
|
-
const customOptionComponent = (0,
|
|
10794
|
+
const customOptionComponent = (0, import_react72.useCallback)(
|
|
10723
10795
|
(props) => {
|
|
10724
10796
|
if (customOptionElement) {
|
|
10725
10797
|
return /* @__PURE__ */ (0, import_jsx_runtime289.jsx)(CustomOption, { ...props, customElement: customOptionElement });
|
|
@@ -10738,7 +10810,7 @@ function Select({
|
|
|
10738
10810
|
placeholder: placeholder ? placeholder : "",
|
|
10739
10811
|
closeMenuOnSelect: closeMenuOnSelect ? closeMenuOnSelect : isMulti ? false : true,
|
|
10740
10812
|
isMulti,
|
|
10741
|
-
instanceId: instanceId != null ? instanceId : (0,
|
|
10813
|
+
instanceId: instanceId != null ? instanceId : (0, import_react72.useId)(),
|
|
10742
10814
|
inputId: uniqueId,
|
|
10743
10815
|
name: uniqueId,
|
|
10744
10816
|
menuPortalTarget: portalTarget,
|
|
@@ -10789,7 +10861,7 @@ function Select({
|
|
|
10789
10861
|
afterLabelContent
|
|
10790
10862
|
}),
|
|
10791
10863
|
/* @__PURE__ */ (0, import_jsx_runtime289.jsx)(import_react_select2.default, { ...reactSelectProps, ref }),
|
|
10792
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
10864
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId })
|
|
10793
10865
|
]
|
|
10794
10866
|
}
|
|
10795
10867
|
);
|
|
@@ -10797,7 +10869,7 @@ function Select({
|
|
|
10797
10869
|
Select.displayName = "Select";
|
|
10798
10870
|
|
|
10799
10871
|
// src/components/Select/NativeSelect/NativeSelect.tsx
|
|
10800
|
-
var
|
|
10872
|
+
var import_react73 = require("react");
|
|
10801
10873
|
|
|
10802
10874
|
// src/components/Select/NativeSelect/NativeSelect.module.css
|
|
10803
10875
|
var NativeSelect_default = {
|
|
@@ -10837,17 +10909,18 @@ var NativeSelect = ({
|
|
|
10837
10909
|
clearable,
|
|
10838
10910
|
afterLabelContent,
|
|
10839
10911
|
onChange,
|
|
10912
|
+
icon,
|
|
10840
10913
|
...rest
|
|
10841
10914
|
}) => {
|
|
10842
10915
|
const { t } = useTranslation();
|
|
10843
|
-
const selectRef = (0,
|
|
10844
|
-
const [hasValue, setHasValue] = (0,
|
|
10845
|
-
(0,
|
|
10916
|
+
const selectRef = (0, import_react73.useRef)(null);
|
|
10917
|
+
const [hasValue, setHasValue] = (0, import_react73.useState)(false);
|
|
10918
|
+
(0, import_react73.useEffect)(() => {
|
|
10846
10919
|
var _a, _b;
|
|
10847
10920
|
const selectedIndex = (_b = (_a = selectRef.current) == null ? void 0 : _a.selectedIndex) != null ? _b : -1;
|
|
10848
10921
|
setHasValue(selectedIndex !== 0);
|
|
10849
10922
|
}, []);
|
|
10850
|
-
(0,
|
|
10923
|
+
(0, import_react73.useEffect)(() => {
|
|
10851
10924
|
var _a;
|
|
10852
10925
|
if (clearable) {
|
|
10853
10926
|
const firstOption = (_a = selectRef.current) == null ? void 0 : _a.options[0];
|
|
@@ -10860,7 +10933,7 @@ var NativeSelect = ({
|
|
|
10860
10933
|
}
|
|
10861
10934
|
}
|
|
10862
10935
|
}, [clearable]);
|
|
10863
|
-
const generatedId = (0,
|
|
10936
|
+
const generatedId = (0, import_react73.useId)();
|
|
10864
10937
|
const uniqueId = id != null ? id : `${generatedId}-native-select`;
|
|
10865
10938
|
const hasErrorMessage = !!errorMessage;
|
|
10866
10939
|
const hasTip = !!tip;
|
|
@@ -10882,6 +10955,7 @@ var NativeSelect = ({
|
|
|
10882
10955
|
};
|
|
10883
10956
|
const iconSize = componentSize === "medium" ? "medium" : "small";
|
|
10884
10957
|
const showClearButton = clearable && hasValue && !readOnly && !rest.disabled;
|
|
10958
|
+
const hasIcon = !!icon;
|
|
10885
10959
|
return /* @__PURE__ */ (0, import_jsx_runtime290.jsxs)("div", { className, style, children: [
|
|
10886
10960
|
renderLabel({
|
|
10887
10961
|
label,
|
|
@@ -10891,6 +10965,17 @@ var NativeSelect = ({
|
|
|
10891
10965
|
afterLabelContent
|
|
10892
10966
|
}),
|
|
10893
10967
|
/* @__PURE__ */ (0, import_jsx_runtime290.jsxs)(Box, { position: "relative", width: inputWidth, children: [
|
|
10968
|
+
hasIcon && /* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
|
|
10969
|
+
Icon,
|
|
10970
|
+
{
|
|
10971
|
+
icon,
|
|
10972
|
+
className: cn(
|
|
10973
|
+
Input_default["input-group__absolute-el"],
|
|
10974
|
+
Input_default[`input-group__absolute-el--${componentSize}`]
|
|
10975
|
+
),
|
|
10976
|
+
iconSize: getFormInputIconSize(componentSize)
|
|
10977
|
+
}
|
|
10978
|
+
),
|
|
10894
10979
|
/* @__PURE__ */ (0, import_jsx_runtime290.jsx)(
|
|
10895
10980
|
"select",
|
|
10896
10981
|
{
|
|
@@ -10902,6 +10987,7 @@ var NativeSelect = ({
|
|
|
10902
10987
|
readOnly && NativeSelect_default["select--readonly"],
|
|
10903
10988
|
Input_default.input,
|
|
10904
10989
|
Input_default[`input--${componentSize}`],
|
|
10990
|
+
hasIcon && Input_default[`input-with-icon--${componentSize}`],
|
|
10905
10991
|
NativeSelect_default[`select--${componentSize}`],
|
|
10906
10992
|
scrollbar,
|
|
10907
10993
|
focusable,
|
|
@@ -10943,7 +11029,7 @@ var NativeSelect = ({
|
|
|
10943
11029
|
}
|
|
10944
11030
|
)
|
|
10945
11031
|
] }),
|
|
10946
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
11032
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId })
|
|
10947
11033
|
] });
|
|
10948
11034
|
};
|
|
10949
11035
|
var NativeSelectPlaceholder = ({
|
|
@@ -10992,7 +11078,7 @@ var Pagination = ({
|
|
|
10992
11078
|
value: activePageProp,
|
|
10993
11079
|
defaultValue: defaultActivePage
|
|
10994
11080
|
});
|
|
10995
|
-
const [itemsPerPage, setItemsPerPage] = (0,
|
|
11081
|
+
const [itemsPerPage, setItemsPerPage] = (0, import_react74.useState)(defaultItemsPerPage);
|
|
10996
11082
|
const pagesLength = Math.ceil(itemsAmount / itemsPerPage);
|
|
10997
11083
|
const items = PaginationGenerator(pagesLength, activePage);
|
|
10998
11084
|
const onPageChange = (event, page) => {
|
|
@@ -11308,7 +11394,7 @@ var texts21 = createTexts({
|
|
|
11308
11394
|
});
|
|
11309
11395
|
|
|
11310
11396
|
// src/components/PhoneInput/PhoneInput.tsx
|
|
11311
|
-
var
|
|
11397
|
+
var import_react75 = require("react");
|
|
11312
11398
|
|
|
11313
11399
|
// src/components/PhoneInput/constants.ts
|
|
11314
11400
|
var COUNTRIES = {
|
|
@@ -11770,7 +11856,7 @@ var PhoneInput = ({
|
|
|
11770
11856
|
const { t } = useTranslation();
|
|
11771
11857
|
const tGroupLabel = groupLabel != null ? groupLabel : t(texts22.countryCodeAndPhoneNumber);
|
|
11772
11858
|
const tSelectLabel = selectLabel != null ? selectLabel : t(texts22.countryCode);
|
|
11773
|
-
const generatedId = (0,
|
|
11859
|
+
const generatedId = (0, import_react75.useId)();
|
|
11774
11860
|
const uniqueId = (_a = props.id) != null ? _a : generatedId;
|
|
11775
11861
|
const phoneInputId = `${uniqueId}-phone-input`;
|
|
11776
11862
|
const phoneNumberId = `${uniqueId}-phone-number`;
|
|
@@ -11780,27 +11866,27 @@ var PhoneInput = ({
|
|
|
11780
11866
|
const hasMessage = hasErrorMessage || hasTip;
|
|
11781
11867
|
const tipId = derivativeIdGenerator(phoneInputId, "tip");
|
|
11782
11868
|
const errorMessageId = derivativeIdGenerator(phoneInputId, "errorMessage");
|
|
11783
|
-
const [callingCode, setCallingCode] = (0,
|
|
11784
|
-
const [selectedCountryCodeText, setSelectedCountryCodeText] = (0,
|
|
11785
|
-
const [internalValue, setInternalValue] = (0,
|
|
11869
|
+
const [callingCode, setCallingCode] = (0, import_react75.useState)("");
|
|
11870
|
+
const [selectedCountryCodeText, setSelectedCountryCodeText] = (0, import_react75.useState)("");
|
|
11871
|
+
const [internalValue, setInternalValue] = (0, import_react75.useState)(
|
|
11786
11872
|
defaultValue != null ? defaultValue : {
|
|
11787
11873
|
countryCode: "",
|
|
11788
11874
|
phoneNumber: ""
|
|
11789
11875
|
}
|
|
11790
11876
|
);
|
|
11791
11877
|
const isControlled = value !== void 0;
|
|
11792
|
-
const [callingCodeWidth, setCallingCodeWidth] = (0,
|
|
11793
|
-
const callingCodeRef = (0,
|
|
11794
|
-
(0,
|
|
11878
|
+
const [callingCodeWidth, setCallingCodeWidth] = (0, import_react75.useState)(0);
|
|
11879
|
+
const callingCodeRef = (0, import_react75.useRef)(null);
|
|
11880
|
+
(0, import_react75.useLayoutEffect)(() => {
|
|
11795
11881
|
if (callingCodeRef.current) {
|
|
11796
11882
|
setCallingCodeWidth(callingCodeRef.current.offsetWidth);
|
|
11797
11883
|
}
|
|
11798
11884
|
}, [callingCode]);
|
|
11799
11885
|
const callingCodeInlineStart = callingCodeWidth ? `calc(var(--dds-spacing-x1) + ${callingCodeWidth}px)` : void 0;
|
|
11800
|
-
const internalSelectRef = (0,
|
|
11886
|
+
const internalSelectRef = (0, import_react75.useRef)(null);
|
|
11801
11887
|
const combinedSelectRef = useCombinedRef(selectRef, internalSelectRef);
|
|
11802
11888
|
const displayedValue = isControlled ? value : internalValue;
|
|
11803
|
-
(0,
|
|
11889
|
+
(0, import_react75.useEffect)(() => {
|
|
11804
11890
|
const selectEl = internalSelectRef.current;
|
|
11805
11891
|
if (selectEl && selectEl.value) {
|
|
11806
11892
|
const { options, selectedIndex } = selectEl;
|
|
@@ -11898,7 +11984,7 @@ var PhoneInput = ({
|
|
|
11898
11984
|
{
|
|
11899
11985
|
className: cn(
|
|
11900
11986
|
typographyStyles_default[`body-${componentSize}`],
|
|
11901
|
-
Input_default["input-group__absolute-
|
|
11987
|
+
Input_default["input-group__absolute-el"],
|
|
11902
11988
|
PhoneInput_default["calling-code"]
|
|
11903
11989
|
),
|
|
11904
11990
|
ref: callingCodeRef,
|
|
@@ -11935,7 +12021,7 @@ var PhoneInput = ({
|
|
|
11935
12021
|
]
|
|
11936
12022
|
}
|
|
11937
12023
|
),
|
|
11938
|
-
hasMessage && renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
12024
|
+
hasMessage && renderInputMessage({ tip, tipId, errorMessage, errorMessageId })
|
|
11939
12025
|
] });
|
|
11940
12026
|
};
|
|
11941
12027
|
PhoneInput.displayName = "PhoneInput";
|
|
@@ -11961,7 +12047,7 @@ var texts22 = createTexts({
|
|
|
11961
12047
|
});
|
|
11962
12048
|
|
|
11963
12049
|
// src/components/Popover/Popover.tsx
|
|
11964
|
-
var
|
|
12050
|
+
var import_react77 = require("react");
|
|
11965
12051
|
var import_react_dom5 = require("react-dom");
|
|
11966
12052
|
|
|
11967
12053
|
// src/components/Popover/Popover.module.css
|
|
@@ -11973,9 +12059,9 @@ var Popover_default = {
|
|
|
11973
12059
|
};
|
|
11974
12060
|
|
|
11975
12061
|
// src/components/Popover/Popover.context.tsx
|
|
11976
|
-
var
|
|
11977
|
-
var PopoverContext = (0,
|
|
11978
|
-
var usePopoverContext = () => (0,
|
|
12062
|
+
var import_react76 = require("react");
|
|
12063
|
+
var PopoverContext = (0, import_react76.createContext)({});
|
|
12064
|
+
var usePopoverContext = () => (0, import_react76.useContext)(PopoverContext);
|
|
11979
12065
|
|
|
11980
12066
|
// src/components/Popover/Popover.tsx
|
|
11981
12067
|
var import_jsx_runtime293 = require("react/jsx-runtime");
|
|
@@ -12005,7 +12091,7 @@ var Popover = ({
|
|
|
12005
12091
|
});
|
|
12006
12092
|
const { maxHeight, maxWidth, minHeight, minWidth, height, width } = sizeProps;
|
|
12007
12093
|
const context = usePopoverContext();
|
|
12008
|
-
const themeContext = (0,
|
|
12094
|
+
const themeContext = (0, import_react77.useContext)(ThemeContext);
|
|
12009
12095
|
const portalTarget = parentElement != null ? parentElement : themeContext == null ? void 0 : themeContext.el;
|
|
12010
12096
|
const {
|
|
12011
12097
|
floatStyling: contextFloatStyling,
|
|
@@ -12018,7 +12104,7 @@ var Popover = ({
|
|
|
12018
12104
|
} = context;
|
|
12019
12105
|
const { t } = useTranslation();
|
|
12020
12106
|
const hasContext = !isEmpty(context);
|
|
12021
|
-
const generatedId = (0,
|
|
12107
|
+
const generatedId = (0, import_react77.useId)();
|
|
12022
12108
|
const uniquePopoverId = id != null ? id : `${generatedId}-popover`;
|
|
12023
12109
|
const [
|
|
12024
12110
|
popoverId,
|
|
@@ -12055,7 +12141,7 @@ var Popover = ({
|
|
|
12055
12141
|
anchorEl && anchorEl
|
|
12056
12142
|
);
|
|
12057
12143
|
const multiRef = useCombinedRef(ref, popoverRef, floatingRef);
|
|
12058
|
-
(0,
|
|
12144
|
+
(0, import_react77.useEffect)(() => {
|
|
12059
12145
|
setFloatOptions == null ? void 0 : setFloatOptions({ placement, offset });
|
|
12060
12146
|
}, [placement, offset]);
|
|
12061
12147
|
useOnClickOutside([popoverRef.current, anchorEl], () => {
|
|
@@ -12124,7 +12210,7 @@ var Popover = ({
|
|
|
12124
12210
|
Popover.displayName = "Popover";
|
|
12125
12211
|
|
|
12126
12212
|
// src/components/Popover/PopoverGroup.tsx
|
|
12127
|
-
var
|
|
12213
|
+
var import_react78 = require("react");
|
|
12128
12214
|
var import_jsx_runtime294 = require("react/jsx-runtime");
|
|
12129
12215
|
var PopoverGroup = ({
|
|
12130
12216
|
isOpen: propIsOpen,
|
|
@@ -12136,12 +12222,12 @@ var PopoverGroup = ({
|
|
|
12136
12222
|
popoverId
|
|
12137
12223
|
}) => {
|
|
12138
12224
|
var _a;
|
|
12139
|
-
const [internalIsOpen, internalSetIsOpen] = (0,
|
|
12225
|
+
const [internalIsOpen, internalSetIsOpen] = (0, import_react78.useState)(isInitiallyOpen);
|
|
12140
12226
|
const open = propIsOpen != null ? propIsOpen : internalIsOpen;
|
|
12141
12227
|
const setOpen = propSetIsOpen != null ? propSetIsOpen : internalSetIsOpen;
|
|
12142
|
-
const generatedId = (0,
|
|
12228
|
+
const generatedId = (0, import_react78.useId)();
|
|
12143
12229
|
const uniquePopoverId = popoverId != null ? popoverId : `${generatedId}-popover`;
|
|
12144
|
-
const [floatOptions, setFloatOptions] = (0,
|
|
12230
|
+
const [floatOptions, setFloatOptions] = (0, import_react78.useState)();
|
|
12145
12231
|
const { refs, styles: positionStyles } = useFloatPosition(null, floatOptions);
|
|
12146
12232
|
const handleClose = () => {
|
|
12147
12233
|
setOpen(false);
|
|
@@ -12158,10 +12244,10 @@ var PopoverGroup = ({
|
|
|
12158
12244
|
handleOpen();
|
|
12159
12245
|
}
|
|
12160
12246
|
};
|
|
12161
|
-
const buttonRef = (0,
|
|
12247
|
+
const buttonRef = (0, import_react78.useRef)(null);
|
|
12162
12248
|
const anchorRef = refs.setReference;
|
|
12163
12249
|
const combinedAnchorRef = useCombinedRef(buttonRef, anchorRef);
|
|
12164
|
-
const popoverRef = (0,
|
|
12250
|
+
const popoverRef = (0, import_react78.useRef)(null);
|
|
12165
12251
|
const floatingRef = refs.setFloating;
|
|
12166
12252
|
const combinedPopoverRef = useCombinedRef(popoverRef, floatingRef);
|
|
12167
12253
|
useOnKeyDown(["Esc", "Escape"], () => {
|
|
@@ -12177,8 +12263,8 @@ var PopoverGroup = ({
|
|
|
12177
12263
|
if (open) handleClose();
|
|
12178
12264
|
});
|
|
12179
12265
|
const isAnchorChild = (i) => i === 0;
|
|
12180
|
-
const Children7 =
|
|
12181
|
-
return (0,
|
|
12266
|
+
const Children7 = import_react78.Children.map(children, (child, childIndex) => {
|
|
12267
|
+
return (0, import_react78.isValidElement)(child) && (isAnchorChild(childIndex) ? (0, import_react78.cloneElement)(child, {
|
|
12182
12268
|
"aria-haspopup": "dialog",
|
|
12183
12269
|
"aria-controls": uniquePopoverId,
|
|
12184
12270
|
"aria-expanded": open,
|
|
@@ -12205,17 +12291,17 @@ var PopoverGroup = ({
|
|
|
12205
12291
|
PopoverGroup.displayName = "PopoverGroup";
|
|
12206
12292
|
|
|
12207
12293
|
// src/components/ProgressTracker/ProgressTracker.tsx
|
|
12208
|
-
var
|
|
12294
|
+
var import_react81 = require("react");
|
|
12209
12295
|
|
|
12210
12296
|
// src/components/ProgressTracker/ProgressTracker.context.tsx
|
|
12211
|
-
var
|
|
12212
|
-
var ProgressTrackerContext = (0,
|
|
12297
|
+
var import_react79 = require("react");
|
|
12298
|
+
var ProgressTrackerContext = (0, import_react79.createContext)(
|
|
12213
12299
|
{
|
|
12214
12300
|
activeStep: 0,
|
|
12215
12301
|
direction: "column"
|
|
12216
12302
|
}
|
|
12217
12303
|
);
|
|
12218
|
-
var useProgressTrackerContext = () => (0,
|
|
12304
|
+
var useProgressTrackerContext = () => (0, import_react79.useContext)(ProgressTrackerContext);
|
|
12219
12305
|
|
|
12220
12306
|
// src/components/ProgressTracker/ProgressTracker.module.css
|
|
12221
12307
|
var ProgressTracker_default = {
|
|
@@ -12236,7 +12322,7 @@ var ProgressTracker_default = {
|
|
|
12236
12322
|
};
|
|
12237
12323
|
|
|
12238
12324
|
// src/components/ProgressTracker/ProgressTrackerItem.tsx
|
|
12239
|
-
var
|
|
12325
|
+
var import_react80 = require("react");
|
|
12240
12326
|
var import_jsx_runtime295 = require("react/jsx-runtime");
|
|
12241
12327
|
var toItemState = (active, completed, disabled) => {
|
|
12242
12328
|
if (disabled) {
|
|
@@ -12279,7 +12365,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
12279
12365
|
handleStepChange == null ? void 0 : handleStepChange(index);
|
|
12280
12366
|
}
|
|
12281
12367
|
};
|
|
12282
|
-
const stepNumberContent = (0,
|
|
12368
|
+
const stepNumberContent = (0, import_react80.useMemo)(() => {
|
|
12283
12369
|
if (completed) {
|
|
12284
12370
|
return /* @__PURE__ */ (0, import_jsx_runtime295.jsx)(Icon, { icon: CheckIcon, iconSize: "small" });
|
|
12285
12371
|
}
|
|
@@ -12403,17 +12489,17 @@ var ProgressTracker = (() => {
|
|
|
12403
12489
|
...rest
|
|
12404
12490
|
}) => {
|
|
12405
12491
|
const { t } = useTranslation();
|
|
12406
|
-
const [thisActiveStep, setActiveStep] = (0,
|
|
12492
|
+
const [thisActiveStep, setActiveStep] = (0, import_react81.useState)(activeStep);
|
|
12407
12493
|
const handleChange = (step) => {
|
|
12408
12494
|
setActiveStep(step);
|
|
12409
12495
|
onStepChange == null ? void 0 : onStepChange(step);
|
|
12410
12496
|
};
|
|
12411
|
-
(0,
|
|
12497
|
+
(0, import_react81.useEffect)(() => {
|
|
12412
12498
|
if (activeStep !== void 0 && activeStep != thisActiveStep) {
|
|
12413
12499
|
setActiveStep(activeStep);
|
|
12414
12500
|
}
|
|
12415
12501
|
}, [activeStep, thisActiveStep]);
|
|
12416
|
-
const steps = (0,
|
|
12502
|
+
const steps = (0, import_react81.useMemo)(() => {
|
|
12417
12503
|
const validChildren = removeInvalidChildren(children);
|
|
12418
12504
|
const itemsWithIndex = passIndexPropToProgressTrackerItem(validChildren);
|
|
12419
12505
|
return itemsWithIndex;
|
|
@@ -12458,12 +12544,12 @@ var ProgressTracker = (() => {
|
|
|
12458
12544
|
return Res;
|
|
12459
12545
|
})();
|
|
12460
12546
|
function removeInvalidChildren(children) {
|
|
12461
|
-
return
|
|
12547
|
+
return import_react81.Children.toArray(children).filter(import_react81.isValidElement);
|
|
12462
12548
|
}
|
|
12463
12549
|
function passIndexPropToProgressTrackerItem(children) {
|
|
12464
|
-
return
|
|
12550
|
+
return import_react81.Children.map(
|
|
12465
12551
|
children,
|
|
12466
|
-
(item, index) => (0,
|
|
12552
|
+
(item, index) => (0, import_react81.cloneElement)(item, {
|
|
12467
12553
|
...item.props,
|
|
12468
12554
|
index
|
|
12469
12555
|
})
|
|
@@ -12480,7 +12566,7 @@ var texts24 = createTexts({
|
|
|
12480
12566
|
});
|
|
12481
12567
|
|
|
12482
12568
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
12483
|
-
var
|
|
12569
|
+
var import_react82 = require("react");
|
|
12484
12570
|
|
|
12485
12571
|
// src/components/ProgressBar/ProgressBar.module.css
|
|
12486
12572
|
var ProgressBar_default = {
|
|
@@ -12509,7 +12595,7 @@ var ProgressBar = ({
|
|
|
12509
12595
|
style,
|
|
12510
12596
|
...rest
|
|
12511
12597
|
}) => {
|
|
12512
|
-
const generatedId = (0,
|
|
12598
|
+
const generatedId = (0, import_react82.useId)();
|
|
12513
12599
|
const uniqueId = id != null ? id : `${generatedId}-searchInput`;
|
|
12514
12600
|
const hasErrorMessage = !!errorMessage;
|
|
12515
12601
|
const hasTip = !!tip;
|
|
@@ -12558,26 +12644,25 @@ var ProgressBar = ({
|
|
|
12558
12644
|
)
|
|
12559
12645
|
}
|
|
12560
12646
|
),
|
|
12561
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
12647
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId })
|
|
12562
12648
|
] });
|
|
12563
12649
|
};
|
|
12564
12650
|
ProgressBar.displayName = "ProgressBar";
|
|
12565
12651
|
|
|
12566
12652
|
// src/components/Search/Search.tsx
|
|
12567
|
-
var
|
|
12653
|
+
var import_react85 = require("react");
|
|
12568
12654
|
|
|
12569
12655
|
// src/components/Search/AutocompleteSearch.context.tsx
|
|
12570
|
-
var
|
|
12571
|
-
var AutocompleteSearchContext = (0,
|
|
12656
|
+
var import_react83 = require("react");
|
|
12657
|
+
var AutocompleteSearchContext = (0, import_react83.createContext)({});
|
|
12572
12658
|
var useAutocompleteSearch = () => {
|
|
12573
|
-
return (0,
|
|
12659
|
+
return (0, import_react83.useContext)(AutocompleteSearchContext);
|
|
12574
12660
|
};
|
|
12575
12661
|
|
|
12576
12662
|
// src/components/Search/Search.module.css
|
|
12577
12663
|
var Search_default = {
|
|
12578
12664
|
"with-button-container": "Search_with-button-container",
|
|
12579
12665
|
input: "Search_input",
|
|
12580
|
-
"search-icon": "Search_search-icon",
|
|
12581
12666
|
"clear-button": "Search_clear-button",
|
|
12582
12667
|
suggestions: "Search_suggestions"
|
|
12583
12668
|
};
|
|
@@ -12591,7 +12676,7 @@ var typographyTypes2 = {
|
|
|
12591
12676
|
};
|
|
12592
12677
|
|
|
12593
12678
|
// src/components/Search/SearchSuggestionItem.tsx
|
|
12594
|
-
var
|
|
12679
|
+
var import_react84 = require("react");
|
|
12595
12680
|
var import_jsx_runtime298 = require("react/jsx-runtime");
|
|
12596
12681
|
var SearchSuggestionItem = ({
|
|
12597
12682
|
focus,
|
|
@@ -12599,9 +12684,9 @@ var SearchSuggestionItem = ({
|
|
|
12599
12684
|
ref,
|
|
12600
12685
|
...rest
|
|
12601
12686
|
}) => {
|
|
12602
|
-
const itemRef = (0,
|
|
12687
|
+
const itemRef = (0, import_react84.useRef)(null);
|
|
12603
12688
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
12604
|
-
(0,
|
|
12689
|
+
(0, import_react84.useEffect)(() => {
|
|
12605
12690
|
var _a;
|
|
12606
12691
|
if (focus) {
|
|
12607
12692
|
(_a = itemRef.current) == null ? void 0 : _a.focus();
|
|
@@ -12723,29 +12808,10 @@ var getIconSize2 = (size2) => {
|
|
|
12723
12808
|
case "large":
|
|
12724
12809
|
return "medium";
|
|
12725
12810
|
case "medium":
|
|
12726
|
-
return "medium";
|
|
12727
12811
|
case "small":
|
|
12728
|
-
return
|
|
12812
|
+
return getFormInputIconSize(size2);
|
|
12729
12813
|
}
|
|
12730
12814
|
};
|
|
12731
|
-
var getPadding = (size2, showIcon) => {
|
|
12732
|
-
const paddingRight = (textSize) => `calc(
|
|
12733
|
-
var(--dds-spacing-x1) + ${textSize} * 1.5 + var(--dds-spacing-x0-5)
|
|
12734
|
-
)`;
|
|
12735
|
-
const paddingLeft = (iconSize) => `calc(
|
|
12736
|
-
var(--dds-spacing-x0-75) + ${iconSize} + var(--dds-spacing-x0-5)
|
|
12737
|
-
)`;
|
|
12738
|
-
const pRSmallButton = paddingRight("0.875rem");
|
|
12739
|
-
const pRMediumButton = paddingRight("1rem");
|
|
12740
|
-
const pLSmallIcon = paddingLeft("var(--dds-icon-size-small)");
|
|
12741
|
-
const pLMediumIcon = paddingLeft("var(--dds-icon-size-medium)");
|
|
12742
|
-
const paddingMap = {
|
|
12743
|
-
large: `x1 ${pRMediumButton} x1 ${showIcon ? pLMediumIcon : "x0.75"}`,
|
|
12744
|
-
medium: `x0.75 ${pRSmallButton} x0.75 ${showIcon ? pLMediumIcon : "x0.75"}`,
|
|
12745
|
-
small: `x0.5 ${pRSmallButton} x0.5 ${showIcon ? pLSmallIcon : "x0.75"}`
|
|
12746
|
-
};
|
|
12747
|
-
return paddingMap[size2];
|
|
12748
|
-
};
|
|
12749
12815
|
var Search = ({
|
|
12750
12816
|
componentSize = "medium",
|
|
12751
12817
|
buttonProps,
|
|
@@ -12764,7 +12830,7 @@ var Search = ({
|
|
|
12764
12830
|
...rest
|
|
12765
12831
|
}) => {
|
|
12766
12832
|
var _a;
|
|
12767
|
-
const generatedId = (0,
|
|
12833
|
+
const generatedId = (0, import_react85.useId)();
|
|
12768
12834
|
const uniqueId = id != null ? id : `${generatedId}-searchInput`;
|
|
12769
12835
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
12770
12836
|
const suggestionsId = derivativeIdGenerator(uniqueId, "suggestions");
|
|
@@ -12773,7 +12839,7 @@ var Search = ({
|
|
|
12773
12839
|
"suggestions-description"
|
|
12774
12840
|
);
|
|
12775
12841
|
const { t } = useTranslation();
|
|
12776
|
-
const [hasValue, setHasValue] = (0,
|
|
12842
|
+
const [hasValue, setHasValue] = (0, import_react85.useState)(!!value);
|
|
12777
12843
|
const context = useAutocompleteSearch();
|
|
12778
12844
|
const combinedRef = context.inputRef ? useCombinedRef(context.inputRef, ref) : ref;
|
|
12779
12845
|
const handleChange = (e) => {
|
|
@@ -12806,8 +12872,8 @@ var Search = ({
|
|
|
12806
12872
|
icon: SearchIcon,
|
|
12807
12873
|
iconSize: getIconSize2(componentSize),
|
|
12808
12874
|
className: cn(
|
|
12809
|
-
Input_default["input-group__absolute-
|
|
12810
|
-
|
|
12875
|
+
Input_default["input-group__absolute-el"],
|
|
12876
|
+
Input_default[`input-group__absolute-el--${componentSize}`]
|
|
12811
12877
|
)
|
|
12812
12878
|
}
|
|
12813
12879
|
),
|
|
@@ -12833,9 +12899,11 @@ var Search = ({
|
|
|
12833
12899
|
"aria-expanded": context.showSuggestions,
|
|
12834
12900
|
role: hasSuggestions ? "combobox" : void 0,
|
|
12835
12901
|
width: "100%",
|
|
12836
|
-
padding: getPadding(componentSize, showIcon),
|
|
12837
12902
|
className: cn(
|
|
12838
12903
|
Search_default.input,
|
|
12904
|
+
Input_default[`input--${componentSize}`],
|
|
12905
|
+
showIcon && Input_default[`input-with-icon--${componentSize}`],
|
|
12906
|
+
Input_default[`input-with-el-right--${componentSize}`],
|
|
12839
12907
|
typographyStyles_default[getTypographyCn(typographyTypes2[componentSize])]
|
|
12840
12908
|
)
|
|
12841
12909
|
}
|
|
@@ -12894,7 +12962,7 @@ var Search = ({
|
|
|
12894
12962
|
]
|
|
12895
12963
|
}
|
|
12896
12964
|
) : inputGroup,
|
|
12897
|
-
renderInputMessage(tip, tipId)
|
|
12965
|
+
renderInputMessage({ tip, tipId })
|
|
12898
12966
|
] })
|
|
12899
12967
|
] });
|
|
12900
12968
|
};
|
|
@@ -12924,7 +12992,7 @@ var texts26 = createTexts({
|
|
|
12924
12992
|
});
|
|
12925
12993
|
|
|
12926
12994
|
// src/components/Search/SearchAutocompleteWrapper.tsx
|
|
12927
|
-
var
|
|
12995
|
+
var import_react86 = require("react");
|
|
12928
12996
|
var import_jsx_runtime301 = require("react/jsx-runtime");
|
|
12929
12997
|
var SearchAutocompleteWrapper = (props) => {
|
|
12930
12998
|
const {
|
|
@@ -12936,12 +13004,12 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
12936
13004
|
onSuggestionSelection,
|
|
12937
13005
|
children
|
|
12938
13006
|
} = props;
|
|
12939
|
-
const [inputValue, setInputValue] = (0,
|
|
12940
|
-
const [suggestions, setSuggestions] = (0,
|
|
12941
|
-
const [showSuggestions, setShowSuggestions] = (0,
|
|
13007
|
+
const [inputValue, setInputValue] = (0, import_react86.useState)(value != null ? value : "");
|
|
13008
|
+
const [suggestions, setSuggestions] = (0, import_react86.useState)([]);
|
|
13009
|
+
const [showSuggestions, setShowSuggestions] = (0, import_react86.useState)(false);
|
|
12942
13010
|
const closeSuggestions = () => showSuggestions === true && setShowSuggestions(false);
|
|
12943
13011
|
const openSuggestions = () => showSuggestions === false && setShowSuggestions(true);
|
|
12944
|
-
(0,
|
|
13012
|
+
(0, import_react86.useEffect)(() => {
|
|
12945
13013
|
if (suggestions.length > 0) {
|
|
12946
13014
|
openSuggestions();
|
|
12947
13015
|
} else {
|
|
@@ -12986,8 +13054,8 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
12986
13054
|
const handleSetInputValue = (value2) => {
|
|
12987
13055
|
setInputValue(value2 != null ? value2 : "");
|
|
12988
13056
|
};
|
|
12989
|
-
const inputRef = (0,
|
|
12990
|
-
const suggestionsRef = (0,
|
|
13057
|
+
const inputRef = (0, import_react86.useRef)(null);
|
|
13058
|
+
const suggestionsRef = (0, import_react86.useRef)(null);
|
|
12991
13059
|
useOnClickOutside([inputRef.current, suggestionsRef.current], () => {
|
|
12992
13060
|
closeSuggestions();
|
|
12993
13061
|
});
|
|
@@ -13069,7 +13137,7 @@ var SkipToContent = ({
|
|
|
13069
13137
|
SkipToContent.displayName = "SkipToContent";
|
|
13070
13138
|
|
|
13071
13139
|
// src/components/SplitButton/SplitButton.tsx
|
|
13072
|
-
var
|
|
13140
|
+
var import_react87 = require("react");
|
|
13073
13141
|
|
|
13074
13142
|
// src/components/SplitButton/SplitButton.module.css
|
|
13075
13143
|
var SplitButton_default = {
|
|
@@ -13090,7 +13158,7 @@ var SplitButton = ({
|
|
|
13090
13158
|
...rest
|
|
13091
13159
|
}) => {
|
|
13092
13160
|
const { t } = useTranslation();
|
|
13093
|
-
const [isOpen, setIsOpen] = (0,
|
|
13161
|
+
const [isOpen, setIsOpen] = (0, import_react87.useState)(false);
|
|
13094
13162
|
const buttonStyleProps = {
|
|
13095
13163
|
purpose,
|
|
13096
13164
|
size: size2
|
|
@@ -13136,15 +13204,15 @@ var texts27 = createTexts({
|
|
|
13136
13204
|
});
|
|
13137
13205
|
|
|
13138
13206
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
13139
|
-
var
|
|
13207
|
+
var import_react91 = require("react");
|
|
13140
13208
|
|
|
13141
13209
|
// src/components/Table/collapsible/Table.context.tsx
|
|
13142
|
-
var
|
|
13143
|
-
var CollapsibleTableContext = (0,
|
|
13210
|
+
var import_react88 = require("react");
|
|
13211
|
+
var CollapsibleTableContext = (0, import_react88.createContext)({
|
|
13144
13212
|
headerValues: [],
|
|
13145
13213
|
definingColumnIndex: [0]
|
|
13146
13214
|
});
|
|
13147
|
-
var useCollapsibleTableContext = () => (0,
|
|
13215
|
+
var useCollapsibleTableContext = () => (0, import_react88.useContext)(CollapsibleTableContext);
|
|
13148
13216
|
|
|
13149
13217
|
// src/components/Table/normal/Body.tsx
|
|
13150
13218
|
var import_jsx_runtime305 = require("react/jsx-runtime");
|
|
@@ -13152,12 +13220,12 @@ var Body = (props) => /* @__PURE__ */ (0, import_jsx_runtime305.jsx)("tbody", {
|
|
|
13152
13220
|
Body.displayName = "Table.Body";
|
|
13153
13221
|
|
|
13154
13222
|
// src/components/Table/normal/Head.tsx
|
|
13155
|
-
var
|
|
13223
|
+
var import_react89 = require("react");
|
|
13156
13224
|
var import_jsx_runtime306 = require("react/jsx-runtime");
|
|
13157
13225
|
var Head = ({ children, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime306.jsx)("thead", { ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(HeadContext, { value: true, children }) });
|
|
13158
|
-
var HeadContext = (0,
|
|
13226
|
+
var HeadContext = (0, import_react89.createContext)(false);
|
|
13159
13227
|
function useIsInTableHead() {
|
|
13160
|
-
const isInTableHead = (0,
|
|
13228
|
+
const isInTableHead = (0, import_react89.useContext)(HeadContext);
|
|
13161
13229
|
return isInTableHead;
|
|
13162
13230
|
}
|
|
13163
13231
|
|
|
@@ -13334,26 +13402,26 @@ var Table = ({
|
|
|
13334
13402
|
Table.displayName = "Table";
|
|
13335
13403
|
|
|
13336
13404
|
// src/components/Table/normal/TableWrapper.tsx
|
|
13337
|
-
var
|
|
13405
|
+
var import_react90 = require("react");
|
|
13338
13406
|
var import_jsx_runtime312 = require("react/jsx-runtime");
|
|
13339
13407
|
var TableWrapper = ({ className, ...rest }) => {
|
|
13340
|
-
const themeContext = (0,
|
|
13408
|
+
const themeContext = (0, import_react90.useContext)(ThemeContext);
|
|
13341
13409
|
const container2 = themeContext == null ? void 0 : themeContext.el;
|
|
13342
13410
|
const containerWidth = container2 ? container2.clientWidth : 0;
|
|
13343
|
-
const [overflowX, setOverflowX] = (0,
|
|
13344
|
-
const [themeContainerWidth, setThemeContainerWidth] = (0,
|
|
13411
|
+
const [overflowX, setOverflowX] = (0, import_react90.useState)(false);
|
|
13412
|
+
const [themeContainerWidth, setThemeContainerWidth] = (0, import_react90.useState)(containerWidth);
|
|
13345
13413
|
function isOverflowingX(event) {
|
|
13346
13414
|
return event.offsetWidth < event.scrollWidth;
|
|
13347
13415
|
}
|
|
13348
|
-
const wrapperRef = (0,
|
|
13349
|
-
(0,
|
|
13416
|
+
const wrapperRef = (0, import_react90.useRef)(null);
|
|
13417
|
+
(0, import_react90.useEffect)(() => {
|
|
13350
13418
|
if ((wrapperRef == null ? void 0 : wrapperRef.current) && isOverflowingX(wrapperRef.current)) {
|
|
13351
13419
|
setOverflowX(true);
|
|
13352
13420
|
return;
|
|
13353
13421
|
}
|
|
13354
13422
|
setOverflowX(false);
|
|
13355
13423
|
}, [themeContainerWidth]);
|
|
13356
|
-
(0,
|
|
13424
|
+
(0, import_react90.useEffect)(() => {
|
|
13357
13425
|
function handleResize() {
|
|
13358
13426
|
setThemeContainerWidth(containerWidth);
|
|
13359
13427
|
}
|
|
@@ -13402,8 +13470,8 @@ var CollapsibleRow = ({
|
|
|
13402
13470
|
const isInHead = useIsInTableHead();
|
|
13403
13471
|
const type = _type != null ? _type : isInHead ? "head" : "body";
|
|
13404
13472
|
const { isCollapsed, headerValues, definingColumnIndex } = useCollapsibleTableContext();
|
|
13405
|
-
const [childrenCollapsed, setChildrenCollapsed] = (0,
|
|
13406
|
-
(0,
|
|
13473
|
+
const [childrenCollapsed, setChildrenCollapsed] = (0, import_react91.useState)(true);
|
|
13474
|
+
(0, import_react91.useEffect)(() => {
|
|
13407
13475
|
if (!isCollapsed) setChildrenCollapsed(true);
|
|
13408
13476
|
}, [isCollapsed]);
|
|
13409
13477
|
const rowProps = (isOpenCollapsibleHeader) => {
|
|
@@ -13421,7 +13489,7 @@ var CollapsibleRow = ({
|
|
|
13421
13489
|
const collapsedHeaderValues = headerValues.filter(
|
|
13422
13490
|
(column, index) => definingColumnIndex.indexOf(index) === -1
|
|
13423
13491
|
);
|
|
13424
|
-
const childrenArray =
|
|
13492
|
+
const childrenArray = import_react91.Children.toArray(children);
|
|
13425
13493
|
const collapsedChildren = childrenArray.filter(
|
|
13426
13494
|
(column, index) => definingColumnIndex.indexOf(index) === -1
|
|
13427
13495
|
);
|
|
@@ -13430,9 +13498,9 @@ var CollapsibleRow = ({
|
|
|
13430
13498
|
const collapsedRenderedChildren = isCollapsed && collapsedHeaderValues.length > 0 ? collapsedChildren.map(function(child, index) {
|
|
13431
13499
|
const id = derivativeIdGenerator(prefix2, index.toString());
|
|
13432
13500
|
collapsibleIds.push(id);
|
|
13433
|
-
return /* @__PURE__ */ (0, import_jsx_runtime313.jsxs)(
|
|
13501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime313.jsxs)(import_react91.Fragment, { children: [
|
|
13434
13502
|
/* @__PURE__ */ (0, import_jsx_runtime313.jsx)(DescriptionListTerm, { children: collapsedHeaderValues[index].content }),
|
|
13435
|
-
(0,
|
|
13503
|
+
(0, import_react91.isValidElement)(child) && (0, import_react91.cloneElement)(child, {
|
|
13436
13504
|
collapsibleProps: { isCollapsibleChild: true }
|
|
13437
13505
|
})
|
|
13438
13506
|
] }, `DL-${index}`);
|
|
@@ -13528,11 +13596,11 @@ var CollapsibleTable2 = CollapsibleTable;
|
|
|
13528
13596
|
CollapsibleTable2.Row = CollapsibleRow;
|
|
13529
13597
|
|
|
13530
13598
|
// src/components/Tabs/AddTabButton.tsx
|
|
13531
|
-
var
|
|
13599
|
+
var import_react94 = require("react");
|
|
13532
13600
|
|
|
13533
13601
|
// src/components/Tabs/Tabs.context.tsx
|
|
13534
|
-
var
|
|
13535
|
-
var TabsContext = (0,
|
|
13602
|
+
var import_react92 = require("react");
|
|
13603
|
+
var TabsContext = (0, import_react92.createContext)({
|
|
13536
13604
|
activeTab: 0,
|
|
13537
13605
|
tabsId: "",
|
|
13538
13606
|
size: "small",
|
|
@@ -13544,7 +13612,7 @@ var TabsContext = (0, import_react91.createContext)({
|
|
|
13544
13612
|
tabContentDirection: "row",
|
|
13545
13613
|
addTabButtonProps: void 0
|
|
13546
13614
|
});
|
|
13547
|
-
var useTabsContext = () => (0,
|
|
13615
|
+
var useTabsContext = () => (0, import_react92.useContext)(TabsContext);
|
|
13548
13616
|
|
|
13549
13617
|
// src/components/Tabs/Tabs.module.css
|
|
13550
13618
|
var Tabs_default = {
|
|
@@ -13562,9 +13630,9 @@ var Tabs_default = {
|
|
|
13562
13630
|
};
|
|
13563
13631
|
|
|
13564
13632
|
// src/components/Tabs/TabWidthContext.tsx
|
|
13565
|
-
var
|
|
13633
|
+
var import_react93 = require("react");
|
|
13566
13634
|
var import_jsx_runtime315 = require("react/jsx-runtime");
|
|
13567
|
-
var TabContext = (0,
|
|
13635
|
+
var TabContext = (0, import_react93.createContext)(null);
|
|
13568
13636
|
function TabWidthContextProvider({
|
|
13569
13637
|
children,
|
|
13570
13638
|
onChangeWidths
|
|
@@ -13593,8 +13661,8 @@ function TabWidthContextProvider({
|
|
|
13593
13661
|
);
|
|
13594
13662
|
}
|
|
13595
13663
|
function useSetTabWidth(index, width) {
|
|
13596
|
-
const context = (0,
|
|
13597
|
-
(0,
|
|
13664
|
+
const context = (0, import_react93.useContext)(TabContext);
|
|
13665
|
+
(0, import_react93.useLayoutEffect)(() => {
|
|
13598
13666
|
context == null ? void 0 : context.updateWidth(index, width);
|
|
13599
13667
|
return () => context == null ? void 0 : context.removeTab(index);
|
|
13600
13668
|
}, [index, width]);
|
|
@@ -13611,7 +13679,7 @@ var AddTabButton = ({
|
|
|
13611
13679
|
...rest
|
|
13612
13680
|
}) => {
|
|
13613
13681
|
useSetTabWidth(index, width);
|
|
13614
|
-
const buttonRef = (0,
|
|
13682
|
+
const buttonRef = (0, import_react94.useRef)(null);
|
|
13615
13683
|
const combinedRef = useCombinedRef(ref, buttonRef);
|
|
13616
13684
|
const { tabContentDirection, size: size2 } = useTabsContext();
|
|
13617
13685
|
return /* @__PURE__ */ (0, import_jsx_runtime316.jsxs)(
|
|
@@ -13636,7 +13704,7 @@ var AddTabButton = ({
|
|
|
13636
13704
|
AddTabButton.displayName = "AddTabButton";
|
|
13637
13705
|
|
|
13638
13706
|
// src/components/Tabs/Tabs.tsx
|
|
13639
|
-
var
|
|
13707
|
+
var import_react95 = require("react");
|
|
13640
13708
|
var import_jsx_runtime317 = require("react/jsx-runtime");
|
|
13641
13709
|
var TABS_SIZES = createSizes("small", "medium");
|
|
13642
13710
|
var Tabs = ({
|
|
@@ -13652,17 +13720,17 @@ var Tabs = ({
|
|
|
13652
13720
|
htmlProps,
|
|
13653
13721
|
...rest
|
|
13654
13722
|
}) => {
|
|
13655
|
-
const generatedId = (0,
|
|
13723
|
+
const generatedId = (0, import_react95.useId)();
|
|
13656
13724
|
const uniqueId = id != null ? id : `${generatedId}-tabs`;
|
|
13657
|
-
const [thisActiveTab, setActiveTab] = (0,
|
|
13658
|
-
const [hasTabFocus, setHasTabFocus] = (0,
|
|
13659
|
-
const tabListRef = (0,
|
|
13660
|
-
const tabPanelsRef = (0,
|
|
13725
|
+
const [thisActiveTab, setActiveTab] = (0, import_react95.useState)(activeTab != null ? activeTab : 0);
|
|
13726
|
+
const [hasTabFocus, setHasTabFocus] = (0, import_react95.useState)(false);
|
|
13727
|
+
const tabListRef = (0, import_react95.useRef)(null);
|
|
13728
|
+
const tabPanelsRef = (0, import_react95.useRef)(null);
|
|
13661
13729
|
const handleTabChange = (index) => {
|
|
13662
13730
|
setActiveTab(index);
|
|
13663
13731
|
onChange == null ? void 0 : onChange(index);
|
|
13664
13732
|
};
|
|
13665
|
-
(0,
|
|
13733
|
+
(0, import_react95.useEffect)(() => {
|
|
13666
13734
|
if (activeTab !== void 0 && activeTab !== thisActiveTab) {
|
|
13667
13735
|
setActiveTab(activeTab);
|
|
13668
13736
|
}
|
|
@@ -13696,7 +13764,7 @@ var Tabs = ({
|
|
|
13696
13764
|
Tabs.displayName = "Tabs";
|
|
13697
13765
|
|
|
13698
13766
|
// src/components/Tabs/Tab.tsx
|
|
13699
|
-
var
|
|
13767
|
+
var import_react96 = require("react");
|
|
13700
13768
|
var import_jsx_runtime318 = require("react/jsx-runtime");
|
|
13701
13769
|
var Tab = ({
|
|
13702
13770
|
active = false,
|
|
@@ -13715,18 +13783,18 @@ var Tab = ({
|
|
|
13715
13783
|
...rest
|
|
13716
13784
|
}) => {
|
|
13717
13785
|
useSetTabWidth(index, width);
|
|
13718
|
-
const itemRef = (0,
|
|
13786
|
+
const itemRef = (0, import_react96.useRef)(null);
|
|
13719
13787
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
13720
13788
|
const { tabContentDirection, size: size2 } = useTabsContext();
|
|
13721
13789
|
const { type = "button", ...restHtmlProps } = htmlProps;
|
|
13722
13790
|
const fixedHtmlProps = { type, ...restHtmlProps };
|
|
13723
|
-
(0,
|
|
13791
|
+
(0, import_react96.useEffect)(() => {
|
|
13724
13792
|
var _a;
|
|
13725
13793
|
if (focus) {
|
|
13726
13794
|
(_a = itemRef.current) == null ? void 0 : _a.focus();
|
|
13727
13795
|
}
|
|
13728
13796
|
}, [focus]);
|
|
13729
|
-
const handleSelect = (0,
|
|
13797
|
+
const handleSelect = (0, import_react96.useCallback)(() => {
|
|
13730
13798
|
if (setFocus && index) {
|
|
13731
13799
|
setFocus(index);
|
|
13732
13800
|
}
|
|
@@ -13772,7 +13840,7 @@ var Tab = ({
|
|
|
13772
13840
|
Tab.displayName = "Tab";
|
|
13773
13841
|
|
|
13774
13842
|
// src/components/Tabs/TabList.tsx
|
|
13775
|
-
var
|
|
13843
|
+
var import_react97 = require("react");
|
|
13776
13844
|
var import_jsx_runtime319 = require("react/jsx-runtime");
|
|
13777
13845
|
var TabList = ({
|
|
13778
13846
|
children,
|
|
@@ -13792,15 +13860,15 @@ var TabList = ({
|
|
|
13792
13860
|
addTabButtonProps
|
|
13793
13861
|
} = useTabsContext();
|
|
13794
13862
|
const uniqueId = id != null ? id : `${tabsId}-tablist`;
|
|
13795
|
-
const childrenArray =
|
|
13863
|
+
const childrenArray = import_react97.Children.toArray(children).length;
|
|
13796
13864
|
const [focus, setFocus] = useRoveFocus(childrenArray, hasTabFocus, "row");
|
|
13797
13865
|
const combinedRef = useCombinedRef(ref, tabListRef);
|
|
13798
13866
|
const hasButton = addTabButtonProps ? true : false;
|
|
13799
|
-
const tabListChildren =
|
|
13867
|
+
const tabListChildren = import_react97.Children ? import_react97.Children.map(children, (child, index) => {
|
|
13800
13868
|
const handleThisTabChange = () => {
|
|
13801
13869
|
handleTabChange(index);
|
|
13802
13870
|
};
|
|
13803
|
-
return (0,
|
|
13871
|
+
return (0, import_react97.isValidElement)(child) && (0, import_react97.cloneElement)(child, {
|
|
13804
13872
|
id: `${tabsId}-tab-${index}`,
|
|
13805
13873
|
htmlProps: {
|
|
13806
13874
|
...child.props.htmlProps,
|
|
@@ -13813,7 +13881,7 @@ var TabList = ({
|
|
|
13813
13881
|
onClick: combineHandlers(handleThisTabChange, child.props.onClick)
|
|
13814
13882
|
});
|
|
13815
13883
|
}) : [];
|
|
13816
|
-
const [widths, setWidths] = (0,
|
|
13884
|
+
const [widths, setWidths] = (0, import_react97.useState)([]);
|
|
13817
13885
|
const handleOnFocus = (event) => {
|
|
13818
13886
|
setHasTabFocus(true);
|
|
13819
13887
|
onFocus == null ? void 0 : onFocus(event);
|
|
@@ -13888,14 +13956,14 @@ var TabPanel = ({
|
|
|
13888
13956
|
TabPanel.displayName = "TabPanel";
|
|
13889
13957
|
|
|
13890
13958
|
// src/components/Tabs/TabPanels.tsx
|
|
13891
|
-
var
|
|
13959
|
+
var import_react98 = require("react");
|
|
13892
13960
|
var import_jsx_runtime321 = require("react/jsx-runtime");
|
|
13893
13961
|
var TabPanels = ({ children, ref, ...rest }) => {
|
|
13894
13962
|
const { activeTab, tabsId, tabPanelsRef } = useTabsContext();
|
|
13895
13963
|
const combinedRef = useCombinedRef(ref, tabPanelsRef);
|
|
13896
|
-
const panelChildren =
|
|
13964
|
+
const panelChildren = import_react98.Children.map(children, (child, index) => {
|
|
13897
13965
|
const active = index === activeTab;
|
|
13898
|
-
return (0,
|
|
13966
|
+
return (0, import_react98.isValidElement)(child) && (0, import_react98.cloneElement)(child, {
|
|
13899
13967
|
id: `${tabsId}-panel-${index}`,
|
|
13900
13968
|
active,
|
|
13901
13969
|
htmlProps: {
|
|
@@ -13970,17 +14038,13 @@ var Tag = ({
|
|
|
13970
14038
|
Tag.displayName = "Tag";
|
|
13971
14039
|
|
|
13972
14040
|
// src/components/TextInput/TextInput.tsx
|
|
13973
|
-
var
|
|
14041
|
+
var import_react99 = require("react");
|
|
13974
14042
|
|
|
13975
14043
|
// src/components/TextInput/TextInput.module.css
|
|
13976
14044
|
var TextInput_default = {
|
|
13977
14045
|
container: "TextInput_container",
|
|
13978
14046
|
"container--readonly": "TextInput_container--readonly",
|
|
13979
14047
|
"container--disabled": "TextInput_container--disabled",
|
|
13980
|
-
input: "TextInput_input",
|
|
13981
|
-
"with-icon--medium": "TextInput_with-icon--medium",
|
|
13982
|
-
"with-icon--small": "TextInput_with-icon--small",
|
|
13983
|
-
"with-icon--xsmall": "TextInput_with-icon--xsmall",
|
|
13984
14048
|
"input--extended": "TextInput_input--extended",
|
|
13985
14049
|
"icon--medium": "TextInput_icon--medium",
|
|
13986
14050
|
"icon--small": "TextInput_icon--small",
|
|
@@ -14020,12 +14084,12 @@ var TextInput = ({
|
|
|
14020
14084
|
ref,
|
|
14021
14085
|
...rest
|
|
14022
14086
|
}) => {
|
|
14023
|
-
const [text, setText] = (0,
|
|
14024
|
-
const prefixRef = (0,
|
|
14025
|
-
const suffixRef = (0,
|
|
14026
|
-
const [prefixLength, setPrefixLength] = (0,
|
|
14027
|
-
const [suffixLength, setSuffixLength] = (0,
|
|
14028
|
-
(0,
|
|
14087
|
+
const [text, setText] = (0, import_react99.useState)(getDefaultText(value, defaultValue));
|
|
14088
|
+
const prefixRef = (0, import_react99.useRef)(null);
|
|
14089
|
+
const suffixRef = (0, import_react99.useRef)(null);
|
|
14090
|
+
const [prefixLength, setPrefixLength] = (0, import_react99.useState)(0);
|
|
14091
|
+
const [suffixLength, setSuffixLength] = (0, import_react99.useState)(0);
|
|
14092
|
+
(0, import_react99.useLayoutEffect)(() => {
|
|
14029
14093
|
requestAnimationFrame(() => {
|
|
14030
14094
|
if (prefixRef.current) {
|
|
14031
14095
|
setPrefixLength(prefixRef.current.offsetWidth);
|
|
@@ -14041,7 +14105,7 @@ var TextInput = ({
|
|
|
14041
14105
|
onChange(event);
|
|
14042
14106
|
}
|
|
14043
14107
|
};
|
|
14044
|
-
const generatedId = (0,
|
|
14108
|
+
const generatedId = (0, import_react99.useId)();
|
|
14045
14109
|
const uniqueId = id != null ? id : `${generatedId}-textInput`;
|
|
14046
14110
|
const hasErrorMessage = !!errorMessage;
|
|
14047
14111
|
const hasTip = !!tip;
|
|
@@ -14094,7 +14158,8 @@ var TextInput = ({
|
|
|
14094
14158
|
icon,
|
|
14095
14159
|
iconSize: getFormInputIconSize(componentSize),
|
|
14096
14160
|
className: cn(
|
|
14097
|
-
Input_default["input-group__absolute-
|
|
14161
|
+
Input_default["input-group__absolute-el"],
|
|
14162
|
+
Input_default[`input-group__absolute-el--${componentSize}`],
|
|
14098
14163
|
TextInput_default[`icon--${componentSize}`]
|
|
14099
14164
|
)
|
|
14100
14165
|
}
|
|
@@ -14103,8 +14168,7 @@ var TextInput = ({
|
|
|
14103
14168
|
StatefulInput,
|
|
14104
14169
|
{
|
|
14105
14170
|
className: cn(
|
|
14106
|
-
|
|
14107
|
-
TextInput_default[`with-icon--${componentSize}`],
|
|
14171
|
+
Input_default[`input-with-icon--${componentSize}`],
|
|
14108
14172
|
TextInput_default["input--extended"]
|
|
14109
14173
|
),
|
|
14110
14174
|
...generalInputProps
|
|
@@ -14189,7 +14253,7 @@ var TextInput = ({
|
|
|
14189
14253
|
gap: "x0.5",
|
|
14190
14254
|
width: withCharacterCounter ? inputWidth : void 0,
|
|
14191
14255
|
children: [
|
|
14192
|
-
renderInputMessage(tip, tipId, errorMessage, errorMessageId),
|
|
14256
|
+
renderInputMessage({ tip, tipId, errorMessage, errorMessageId }),
|
|
14193
14257
|
renderCharCounter(
|
|
14194
14258
|
characterCounterId,
|
|
14195
14259
|
withCharacterCounter,
|
|
@@ -14206,7 +14270,7 @@ var TextInput = ({
|
|
|
14206
14270
|
TextInput.displayName = "TextInput";
|
|
14207
14271
|
|
|
14208
14272
|
// src/components/Toggle/Toggle.tsx
|
|
14209
|
-
var
|
|
14273
|
+
var import_react100 = require("react");
|
|
14210
14274
|
|
|
14211
14275
|
// src/components/Toggle/Toggle.module.css
|
|
14212
14276
|
var Toggle_default = {
|
|
@@ -14241,7 +14305,7 @@ var Toggle = ({
|
|
|
14241
14305
|
...rest
|
|
14242
14306
|
}) => {
|
|
14243
14307
|
const { t } = useTranslation();
|
|
14244
|
-
const generatedId = (0,
|
|
14308
|
+
const generatedId = (0, import_react100.useId)();
|
|
14245
14309
|
const uniqueId = id != null ? id : `${generatedId}-toggle`;
|
|
14246
14310
|
const iconSize = size2 === "large" ? "medium" : "small";
|
|
14247
14311
|
const [checked, setChecked] = useControllableState({
|
|
@@ -14311,14 +14375,14 @@ var Toggle = ({
|
|
|
14311
14375
|
Toggle.displayName = "Toggle";
|
|
14312
14376
|
|
|
14313
14377
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
14314
|
-
var
|
|
14378
|
+
var import_react102 = require("react");
|
|
14315
14379
|
|
|
14316
14380
|
// src/components/ToggleBar/ToggleBar.context.tsx
|
|
14317
|
-
var
|
|
14318
|
-
var ToggleBarContext = (0,
|
|
14381
|
+
var import_react101 = require("react");
|
|
14382
|
+
var ToggleBarContext = (0, import_react101.createContext)({
|
|
14319
14383
|
size: "medium"
|
|
14320
14384
|
});
|
|
14321
|
-
var useToggleBarContext = () => (0,
|
|
14385
|
+
var useToggleBarContext = () => (0, import_react101.useContext)(ToggleBarContext);
|
|
14322
14386
|
|
|
14323
14387
|
// src/components/ToggleBar/ToggleBar.module.css
|
|
14324
14388
|
var ToggleBar_default = {
|
|
@@ -14351,9 +14415,9 @@ var ToggleBar = (props) => {
|
|
|
14351
14415
|
id,
|
|
14352
14416
|
...rest
|
|
14353
14417
|
} = props;
|
|
14354
|
-
const generatedId = (0,
|
|
14418
|
+
const generatedId = (0, import_react102.useId)();
|
|
14355
14419
|
const uniqueId = id != null ? id : `${generatedId}-ToggleBar`;
|
|
14356
|
-
const [groupValue, setGroupValue] = (0,
|
|
14420
|
+
const [groupValue, setGroupValue] = (0, import_react102.useState)(value);
|
|
14357
14421
|
const handleChange = combineHandlers(
|
|
14358
14422
|
(e) => setGroupValue(e.target.value),
|
|
14359
14423
|
(e) => onChange && onChange(e, e.target.value)
|
|
@@ -14388,7 +14452,7 @@ var ToggleBar = (props) => {
|
|
|
14388
14452
|
ToggleBar.displayName = "ToggleBar";
|
|
14389
14453
|
|
|
14390
14454
|
// src/components/ToggleBar/ToggleRadio.tsx
|
|
14391
|
-
var
|
|
14455
|
+
var import_react103 = require("react");
|
|
14392
14456
|
var import_jsx_runtime326 = require("react/jsx-runtime");
|
|
14393
14457
|
var typographyTypes3 = {
|
|
14394
14458
|
large: "bodyLarge",
|
|
@@ -14420,7 +14484,7 @@ var ToggleRadio = ({
|
|
|
14420
14484
|
id,
|
|
14421
14485
|
...rest
|
|
14422
14486
|
}) => {
|
|
14423
|
-
const generatedId = (0,
|
|
14487
|
+
const generatedId = (0, import_react103.useId)();
|
|
14424
14488
|
const uniqueId = id != null ? id : `${generatedId}-ToggleRadio`;
|
|
14425
14489
|
const group = useToggleBarContext();
|
|
14426
14490
|
const handleChange = (event) => {
|
|
@@ -14469,7 +14533,7 @@ var ToggleRadio = ({
|
|
|
14469
14533
|
ToggleRadio.displayName = "ToggleRadio";
|
|
14470
14534
|
|
|
14471
14535
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
14472
|
-
var
|
|
14536
|
+
var import_react104 = require("react");
|
|
14473
14537
|
|
|
14474
14538
|
// src/components/ToggleButton/ToggleButton.module.css
|
|
14475
14539
|
var ToggleButton_default = {
|
|
@@ -14490,7 +14554,7 @@ var ToggleButton = ({
|
|
|
14490
14554
|
htmlProps,
|
|
14491
14555
|
...rest
|
|
14492
14556
|
}) => {
|
|
14493
|
-
const generatedId = (0,
|
|
14557
|
+
const generatedId = (0, import_react104.useId)();
|
|
14494
14558
|
const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
|
|
14495
14559
|
const hasIcon = !!icon;
|
|
14496
14560
|
return /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)(Box, { as: "label", htmlFor: uniqueId, width: "fit-content", children: [
|
|
@@ -14528,7 +14592,7 @@ var ToggleButton = ({
|
|
|
14528
14592
|
ToggleButton.displayName = "ToggleButton";
|
|
14529
14593
|
|
|
14530
14594
|
// src/components/ToggleButton/ToggleButtonGroup.tsx
|
|
14531
|
-
var
|
|
14595
|
+
var import_react105 = require("react");
|
|
14532
14596
|
var import_jsx_runtime328 = require("react/jsx-runtime");
|
|
14533
14597
|
var ToggleButtonGroup = (props) => {
|
|
14534
14598
|
const {
|
|
@@ -14541,7 +14605,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
14541
14605
|
htmlProps,
|
|
14542
14606
|
...rest
|
|
14543
14607
|
} = props;
|
|
14544
|
-
const generatedId = (0,
|
|
14608
|
+
const generatedId = (0, import_react105.useId)();
|
|
14545
14609
|
const uniqueLabelId = labelId != null ? labelId : `${generatedId}-ToggleButtonGroupLabel`;
|
|
14546
14610
|
return /* @__PURE__ */ (0, import_jsx_runtime328.jsxs)(
|
|
14547
14611
|
"div",
|