@norges-domstoler/dds-components 0.0.0-dev-20261008060534 → 0.0.0-dev-20261009080015

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.cjs CHANGED
@@ -4781,14 +4781,19 @@ var Button_module_default = {
4781
4781
  "button--primary": "dds-Button-module__button--primary",
4782
4782
  "button--secondary": "dds-Button-module__button--secondary",
4783
4783
  "button--tertiary": "dds-Button-module__button--tertiary",
4784
- "button--danger": "dds-Button-module__button--danger",
4785
- "badge": "dds-Button-module__badge"
4784
+ "button--danger": "dds-Button-module__button--danger"
4786
4785
  };
4787
4786
  //#endregion
4788
4787
  //#region src/components/ButtonGroup/ButtonGroup.context.tsx
4789
4788
  const ButtonGroupContext = (0, react.createContext)({});
4790
4789
  const useButtonGroupContext = () => (0, react.useContext)(ButtonGroupContext);
4791
4790
  //#endregion
4791
+ //#region src/components/helpers/styling/common.module.css
4792
+ var common_module_default = {
4793
+ "badge--on-corner": "dds-common-module__badge--on-corner",
4794
+ "button": "dds-common-module__button"
4795
+ };
4796
+ //#endregion
4792
4797
  //#region src/components/Button/Button.tsx
4793
4798
  const Button = ({ as: propAs, children, purpose = "primary", size: propSize = "medium", iconPosition = "left", loading, loadingTooltip, fullWidth = false, icon, iconState, onClick, onFocus, onBlur, badgeProps, id, ref, className, style, htmlProps, ...props }) => {
4794
4799
  const { purpose: groupPurpose, size: groupSize } = useButtonGroupContext();
@@ -4801,7 +4806,7 @@ const Button = ({ as: propAs, children, purpose = "primary", size: propSize = "m
4801
4806
  const isTextButton = hasLabel && !hasIcon;
4802
4807
  const noContent = !hasLabel && !hasIcon;
4803
4808
  const size = groupSize ?? propSize;
4804
- const buttonCn = cn(className, Button_module_default.button, Button_module_default[`button--${groupPurpose ? groupPurpose : purpose}`], Button_module_default[`button--${size}`], isTextButton && Button_module_default["just-text"], ...hasLabelAndIcon ? [Button_module_default["with-text-and-icon"], Button_module_default[`with-icon-${iconPosition}`]] : [], isIconButton && Button_module_default["just-icon"], noContent && Button_module_default["no-content"], fullWidth && Button_module_default["button--full-width"], loading && Button_module_default["button--is-loading"], typographyStyles_module_default[`body-short-${size}`], _key1);
4809
+ const buttonCn = cn(className, Button_module_default.button, Button_module_default[`button--${groupPurpose ? groupPurpose : purpose}`], Button_module_default[`button--${size}`], isTextButton && Button_module_default["just-text"], ...hasLabelAndIcon ? [Button_module_default["with-text-and-icon"], Button_module_default[`with-icon-${iconPosition}`]] : [], isIconButton && Button_module_default["just-icon"], noContent && Button_module_default["no-content"], fullWidth && Button_module_default["button--full-width"], loading && Button_module_default["button--is-loading"], typographyStyles_module_default[`body-short-${size}`], common_module_default.button, _key1);
4805
4810
  const iconElement = hasIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
4806
4811
  icon,
4807
4812
  iconSize: "component",
@@ -4845,7 +4850,7 @@ const Button = ({ as: propAs, children, purpose = "primary", size: propSize = "m
4845
4850
  children: [content, badgeProps && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Badge, {
4846
4851
  ...badgeProps,
4847
4852
  size,
4848
- className: cn(Button_module_default.badge, badgeProps.className)
4853
+ className: cn(common_module_default["badge--on-corner"], badgeProps.className)
4849
4854
  })]
4850
4855
  });
4851
4856
  };
@@ -5446,15 +5451,14 @@ const SelectionControl = ({ controlType, className, ...rest }) => /* @__PURE__ *
5446
5451
  className: cn(className, SelectionControl_module_default["selection-control"], controlType === "radio" && SelectionControl_module_default["selection-control--radio"]),
5447
5452
  ...rest
5448
5453
  });
5449
- const Label$1 = ({ disabled, hasText, controlType, className, ...rest }) => {
5454
+ const Label$1 = ({ disabled, hasText, controlType, className, size = "medium", ...rest }) => {
5450
5455
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
5451
5456
  as: "label",
5452
5457
  position: "relative",
5453
5458
  display: "flex",
5454
5459
  alignItems: "center",
5455
5460
  width: "fit-content",
5456
- paddingInline: "calc(var(--dds-size-icon-component) + var(--dds-spacing-x0-25)) 0",
5457
- className: cn(className, SelectionControl_module_default.label, SelectionControl_module_default[`label--${controlType}`], !hasText && SelectionControl_module_default["label--no-text"], typographyStyles_module_default["body-short-medium"], disabled && typographyStyles_module_default["text-color--subtle"]),
5461
+ className: cn(className, SelectionControl_module_default.label, SelectionControl_module_default[`label--${controlType}`], !hasText && SelectionControl_module_default["label--no-text"], typographyStyles_module_default[`body-short-${size}`], disabled && typographyStyles_module_default["text-color--subtle"]),
5458
5462
  ...rest
5459
5463
  });
5460
5464
  };
@@ -5479,15 +5483,8 @@ const renderGroupLabel = ({ id, showRequiredStyling, readOnly, label }) => {
5479
5483
  else return null;
5480
5484
  };
5481
5485
  //#endregion
5482
- //#region src/components/SelectionControl/SelectionControl.utils.tsx
5483
- const selectionControlTypographyProps = {
5484
- color: "inherit",
5485
- typographyType: "body-short-medium",
5486
- as: "span"
5487
- };
5488
- //#endregion
5489
5486
  //#region src/components/SelectionControl/Checkbox/Checkbox.tsx
5490
- const Checkbox = ({ id, name, label, error = false, disabled, readOnly, indeterminate, "aria-describedby": ariaDescribedby, className, htmlProps = {}, style, children, ...rest }) => {
5487
+ const Checkbox = ({ id, name, label, error = false, disabled, readOnly, indeterminate, "aria-describedby": ariaDescribedby, className, htmlProps = {}, style, children, size, ...rest }) => {
5491
5488
  const generatedId = (0, react.useId)();
5492
5489
  const uniqueId = id ?? `${generatedId}-checkbox`;
5493
5490
  const checkboxGroup = useCheckboxGroup();
@@ -5496,6 +5493,7 @@ const Checkbox = ({ id, name, label, error = false, disabled, readOnly, indeterm
5496
5493
  const isReadOnly = readOnly || checkboxGroup?.readOnly;
5497
5494
  const hasError = error || checkboxGroup?.error;
5498
5495
  const isDisabled = disabled || checkboxGroup?.disabled;
5496
+ const controlSize = size || checkboxGroup?.size || "medium";
5499
5497
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Label$1, {
5500
5498
  disabled: isDisabled,
5501
5499
  htmlFor: uniqueId,
@@ -5503,6 +5501,7 @@ const Checkbox = ({ id, name, label, error = false, disabled, readOnly, indeterm
5503
5501
  controlType: "checkbox",
5504
5502
  className,
5505
5503
  style,
5504
+ size: controlSize,
5506
5505
  children: [
5507
5506
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HiddenInput, {
5508
5507
  ...getBaseHTMLProps(uniqueId, void 0, void 0, htmlProps, rest),
@@ -5527,10 +5526,7 @@ const Checkbox = ({ id, name, label, error = false, disabled, readOnly, indeterm
5527
5526
  controlType: "checkbox",
5528
5527
  className: focus_module_default["focus-styled-sibling"]
5529
5528
  }),
5530
- hasChildren ? children : hasLabel ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Typography, {
5531
- ...selectionControlTypographyProps,
5532
- children: label
5533
- }) : null
5529
+ hasChildren ? children : hasLabel ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label }) : null
5534
5530
  ]
5535
5531
  });
5536
5532
  };
@@ -5592,7 +5588,7 @@ const renderInputMessage = ({ tip, tipId, errorMessage, errorMessageId, noSpacin
5592
5588
  //#endregion
5593
5589
  //#region src/components/SelectionControl/Checkbox/CheckboxGroup.tsx
5594
5590
  const CheckboxGroup = (props) => {
5595
- const { label, direction = "row", errorMessage, tip, required = false, disabled = false, readOnly = false, groupId, children, id, className, style, htmlProps = {}, ...rest } = props;
5591
+ const { label, direction = "row", errorMessage, tip, required = false, disabled = false, readOnly = false, groupId, children, id, className, style, htmlProps = {}, size = "medium", ...rest } = props;
5596
5592
  const { "aria-required": ariaRequired } = htmlProps;
5597
5593
  const generatedId = (0, react.useId)();
5598
5594
  const uniqueGroupId = groupId ?? `${generatedId}-checkboxGroup`;
@@ -5606,7 +5602,8 @@ const CheckboxGroup = (props) => {
5606
5602
  uniqueGroupId,
5607
5603
  tipId: tip ? tipId : void 0,
5608
5604
  disabled,
5609
- readOnly
5605
+ readOnly,
5606
+ size
5610
5607
  };
5611
5608
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5612
5609
  ...getBaseHTMLProps(id, cn(className, SelectionControl_module_default.container), style, {
@@ -5658,7 +5655,7 @@ const getIsChecked = ({ value, groupValue, checked }) => {
5658
5655
  }
5659
5656
  return !!value;
5660
5657
  };
5661
- const RadioButton = ({ id, name, label, disabled = false, readOnly = false, error = false, checked, value, children, required = false, onChange, "aria-describedby": ariaDescribedby, className, htmlProps = {}, style, ...rest }) => {
5658
+ const RadioButton = ({ id, name, label, disabled = false, readOnly = false, error = false, checked, value, children, required = false, onChange, "aria-describedby": ariaDescribedby, className, htmlProps = {}, size, style, ...rest }) => {
5662
5659
  const generatedId = (0, react.useId)();
5663
5660
  const uniqueId = id ?? `${generatedId}-radioButton`;
5664
5661
  const hasChildren = !!children;
@@ -5679,6 +5676,7 @@ const RadioButton = ({ id, name, label, disabled = false, readOnly = false, erro
5679
5676
  groupValue: radioButtonGroup?.value,
5680
5677
  checked
5681
5678
  });
5679
+ const controlSize = size || radioButtonGroup?.size || "medium";
5682
5680
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Label$1, {
5683
5681
  disabled: isDisabled,
5684
5682
  style,
@@ -5686,6 +5684,7 @@ const RadioButton = ({ id, name, label, disabled = false, readOnly = false, erro
5686
5684
  hasText: hasLabel || hasChildren,
5687
5685
  htmlFor: uniqueId,
5688
5686
  controlType: "radio",
5687
+ size: controlSize,
5689
5688
  children: [
5690
5689
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HiddenInput, {
5691
5690
  ...getBaseHTMLProps(uniqueId, void 0, void 0, htmlProps, rest),
@@ -5707,17 +5706,14 @@ const RadioButton = ({ id, name, label, disabled = false, readOnly = false, erro
5707
5706
  controlType: "radio",
5708
5707
  className: focus_module_default["focus-styled-sibling"]
5709
5708
  }),
5710
- hasChildren ? children : hasLabel ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Typography, {
5711
- ...selectionControlTypographyProps,
5712
- children: label
5713
- }) : null
5709
+ hasChildren ? children : hasLabel ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label }) : null
5714
5710
  ]
5715
5711
  });
5716
5712
  };
5717
5713
  RadioButton.displayName = "RadioButton";
5718
5714
  //#endregion
5719
5715
  //#region src/components/SelectionControl/RadioButton/RadioButtonGroup.tsx
5720
- const RadioButtonGroup = ({ name, label, groupId, errorMessage, tip, disabled = false, readOnly = false, direction = "row", value, defaultValue, children, required = false, onChange, id, className, style, htmlProps = {}, ...rest }) => {
5716
+ const RadioButtonGroup = ({ name, label, groupId, errorMessage, tip, disabled = false, readOnly = false, direction = "row", value, defaultValue, children, required = false, onChange, size = "medium", id, className, style, htmlProps = {}, ...rest }) => {
5721
5717
  const { "aria-required": ariaRequired = false } = htmlProps;
5722
5718
  const generatedId = (0, react.useId)();
5723
5719
  const uniqueGroupId = groupId ?? `${generatedId}-radioButtonGroup`;
@@ -5739,7 +5735,8 @@ const RadioButtonGroup = ({ name, label, groupId, errorMessage, tip, disabled =
5739
5735
  required,
5740
5736
  readOnly,
5741
5737
  value: groupValue,
5742
- onChange: handleChange
5738
+ onChange: handleChange,
5739
+ size
5743
5740
  };
5744
5741
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5745
5742
  ...getBaseHTMLProps(id, cn(className, SelectionControl_module_default.container), style, {
@@ -5878,8 +5875,124 @@ const CardSelectableGroup = ({ name, cardType, errorMessage, disabled, readOnly,
5878
5875
  };
5879
5876
  CardSelectableGroup.displayName = "CardSelectableGroup";
5880
5877
  //#endregion
5881
- //#region src/components/Chip/Chip.tsx
5882
- const Chip = ({ children, onClose, id, className, style, htmlProps = {}, ...rest }) => {
5878
+ //#region src/components/Chip/Chip.module.css
5879
+ var Chip_module_default = {
5880
+ "container": "dds-Chip-module__container",
5881
+ "selection-control": "dds-Chip-module__selection-control",
5882
+ "removable": "dds-Chip-module__removable",
5883
+ "selection-control-spacing": "dds-Chip-module__selection-control-spacing",
5884
+ "selection-control--no-indicator": "dds-Chip-module__selection-control--no-indicator"
5885
+ };
5886
+ //#endregion
5887
+ //#region src/components/helpers/Input/Input.module.css
5888
+ var Input_module_default = {
5889
+ "container": "dds-Input-module__container",
5890
+ "input-group": "dds-Input-module__input-group",
5891
+ "input": "dds-Input-module__input",
5892
+ "disabled": "dds-Input-module__disabled",
5893
+ "read-only": "dds-Input-module__read-only",
5894
+ "input--stateful": "dds-Input-module__input--stateful",
5895
+ "input--hover": "dds-Input-module__input--hover",
5896
+ "input--stateful-danger": "dds-Input-module__input--stateful-danger",
5897
+ "input--large": "dds-Input-module__input--large",
5898
+ "input--medium": "dds-Input-module__input--medium",
5899
+ "input--small": "dds-Input-module__input--small",
5900
+ "input--xsmall": "dds-Input-module__input--xsmall",
5901
+ "compact--medium": "dds-Input-module__compact--medium",
5902
+ "compact--small": "dds-Input-module__compact--small",
5903
+ "compact-with-icon--medium": "dds-Input-module__compact-with-icon--medium",
5904
+ "compact-with-icon--small": "dds-Input-module__compact-with-icon--small",
5905
+ "input-with-icon--large": "dds-Input-module__input-with-icon--large",
5906
+ "input-with-icon--medium": "dds-Input-module__input-with-icon--medium",
5907
+ "input-with-icon--small": "dds-Input-module__input-with-icon--small",
5908
+ "input-with-icon--xsmall": "dds-Input-module__input-with-icon--xsmall",
5909
+ "input-with-el-right--large": "dds-Input-module__input-with-el-right--large",
5910
+ "input-with-el-right--medium": "dds-Input-module__input-with-el-right--medium",
5911
+ "input-with-el-right--small": "dds-Input-module__input-with-el-right--small",
5912
+ "input-with-el-right--xsmall": "dds-Input-module__input-with-el-right--xsmall",
5913
+ "input-with-btn-right--large": "dds-Input-module__input-with-btn-right--large",
5914
+ "input-with-btn-right--medium": "dds-Input-module__input-with-btn-right--medium",
5915
+ "input-with-btn-right--small": "dds-Input-module__input-with-btn-right--small",
5916
+ "input-with-btn-right--xsmall": "dds-Input-module__input-with-btn-right--xsmall",
5917
+ "input-with-icon-and-button-right--large": "dds-Input-module__input-with-icon-and-button-right--large",
5918
+ "input-with-icon-and-button-right--medium": "dds-Input-module__input-with-icon-and-button-right--medium",
5919
+ "input-with-icon-and-button-right--small": "dds-Input-module__input-with-icon-and-button-right--small",
5920
+ "input-with-icon-and-button-right--xsmall": "dds-Input-module__input-with-icon-and-button-right--xsmall",
5921
+ "input-group__absolute-el-right--large": "dds-Input-module__input-group__absolute-el-right--large",
5922
+ "input-group__absolute-el-right--medium": "dds-Input-module__input-group__absolute-el-right--medium",
5923
+ "input-group__absolute-el-right--small": "dds-Input-module__input-group__absolute-el-right--small",
5924
+ "input-group__absolute-el-right--xsmall": "dds-Input-module__input-group__absolute-el-right--xsmall",
5925
+ "input-group__btn-right": "dds-Input-module__input-group__btn-right",
5926
+ "input-group__btn-right-with-right-icon--xsmall": "dds-Input-module__input-group__btn-right-with-right-icon--xsmall",
5927
+ "input-group__btn-right-with-right-icon--small": "dds-Input-module__input-group__btn-right-with-right-icon--small",
5928
+ "input-group__btn-right-with-right-icon--medium": "dds-Input-module__input-group__btn-right-with-right-icon--medium",
5929
+ "input-group__btn-right-with-right-icon--large": "dds-Input-module__input-group__btn-right-with-right-icon--large",
5930
+ "input--with-affix": "dds-Input-module__input--with-affix",
5931
+ "input-group__absolute-el": "dds-Input-module__input-group__absolute-el",
5932
+ "input-group__absolute-el--large": "dds-Input-module__input-group__absolute-el--large",
5933
+ "input-group__absolute-el--medium": "dds-Input-module__input-group__absolute-el--medium",
5934
+ "input-group__absolute-el--small": "dds-Input-module__input-group__absolute-el--small",
5935
+ "input-group__absolute-el--xsmall": "dds-Input-module__input-group__absolute-el--xsmall"
5936
+ };
5937
+ const ChipBase = ({ htmlProps, size = "medium", id, className, style, children, icon, ...rest }) => {
5938
+ const hasIcon = !!icon;
5939
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Paper, {
5940
+ display: "inline-flex",
5941
+ alignItems: "center",
5942
+ maxWidth: "100%",
5943
+ borderRadius: "rounded",
5944
+ border: "border-subtle",
5945
+ ...getBaseHTMLProps(id, cn(className, typographyStyles_module_default[`body-short-${size}`], Input_module_default[`compact--${size}`], hasIcon && Input_module_default[`compact-with-icon--${size}`], Chip_module_default.container, _key1), style, htmlProps, {
5946
+ ...rest,
5947
+ ...typeof rest.as === "function" ? { size } : {}
5948
+ }),
5949
+ children: [!!icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
5950
+ icon,
5951
+ iconSize: "component"
5952
+ }), children]
5953
+ });
5954
+ };
5955
+ const ChipButton = ({ htmlProps, size = "medium", id, className, style, children, badgeProps, ...rest }) => {
5956
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ChipBase, {
5957
+ as: "button",
5958
+ size,
5959
+ ...getBaseHTMLProps(id, cn(className, common_module_default.button), style, htmlProps, rest),
5960
+ children: [children, badgeProps && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Badge, {
5961
+ ...badgeProps,
5962
+ size,
5963
+ className: cn(common_module_default["badge--on-corner"], badgeProps.className)
5964
+ })]
5965
+ });
5966
+ };
5967
+ const ChipSelectionControl = ({ as, htmlProps, size = "medium", showSelectionControlIndicator = true, id, className, style, ...rest }) => {
5968
+ const sizeKey = {
5969
+ small: "sm",
5970
+ medium: "md"
5971
+ }[size];
5972
+ const showIndicator = showSelectionControlIndicator && !rest.icon;
5973
+ const styleVariables = showIndicator ? {
5974
+ ["--dds-spacing-chip-sl-left"]: `calc(var(--dds-spacing-compact-icon-left-${sizeKey}) + var(--dds-spacing-compact-icon-text-gap-${sizeKey}) + var(--dds-size-icon-component))`,
5975
+ ["--dds-spacing-chip-sl-right"]: `var(--dds-spacing-compact-inline-${sizeKey})`,
5976
+ ["--dds-spacing-chip-sl-marker-left"]: `var(--dds-spacing-compact-icon-left-${sizeKey})`
5977
+ } : {};
5978
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChipBase, {
5979
+ as,
5980
+ size,
5981
+ ...getBaseHTMLProps(id, cn(className, Chip_module_default["selection-control"], showIndicator ? Chip_module_default["selection-control-spacing"] : cn(Chip_module_default["selection-control--no-indicator"], focus_module_default["has-focusable-input"])), {
5982
+ ...style,
5983
+ ...styleVariables
5984
+ }, htmlProps, rest)
5985
+ });
5986
+ };
5987
+ const ChipCheckbox = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChipSelectionControl, {
5988
+ ...props,
5989
+ as: Checkbox
5990
+ });
5991
+ const ChipRadio = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChipSelectionControl, {
5992
+ ...props,
5993
+ as: RadioButton
5994
+ });
5995
+ const ChipRemovable = ({ htmlProps = {}, onClose, size = "medium", id, className, style, children, ...rest }) => {
5883
5996
  const { t } = useTranslation();
5884
5997
  const { "aria-label": ariaLabel, ...restHTMLprops } = htmlProps;
5885
5998
  const [isOpen, setIsOpen] = (0, react.useState)(true);
@@ -5887,29 +6000,22 @@ const Chip = ({ children, onClose, id, className, style, htmlProps = {}, ...rest
5887
6000
  setIsOpen(false);
5888
6001
  onClose?.();
5889
6002
  };
5890
- return isOpen ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Paper, {
5891
- display: "inline-flex",
5892
- alignItems: "center",
5893
- maxWidth: "100%",
5894
- gap: "x0.125",
5895
- padding: "x0.25 0 x0.25 x0.5",
5896
- borderRadius: "rounded",
5897
- border: "border-subtle",
5898
- background: "surface-subtle",
5899
- ...getBaseHTMLProps(id, cn(className, typographyStyles_module_default["body-short-medium"]), style, restHTMLprops, rest),
5900
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextOverflowEllipsisInner, { children }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Bleed, {
5901
- as: Button,
5902
- purpose: "tertiary",
5903
- size: "xsmall",
6003
+ return isOpen ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ChipBase, {
6004
+ as: "span",
6005
+ size,
6006
+ ...getBaseHTMLProps(id, cn(className, Chip_module_default.removable), style, restHTMLprops, rest),
6007
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextOverflowEllipsisInner, { children }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InlineButton, {
5904
6008
  icon: CloseIcon,
6009
+ color: "icon-default",
5905
6010
  onClick,
5906
- "aria-label": ariaLabel ?? t(texts$26.removeChip) + (children ? ` ${children}` : ""),
5907
- bleedMarginBlock: "x0.25",
5908
- reflectivePadding: true
6011
+ "aria-label": ariaLabel ?? t(texts$26.removeChip) + (children ? ` ${children}` : "")
5909
6012
  })]
5910
6013
  }) : null;
5911
6014
  };
5912
- Chip.displayName = "Chip";
6015
+ ChipRemovable.displayName = "ChipRemovable";
6016
+ ChipRadio.displayName = "ChipRadio";
6017
+ ChipCheckbox.displayName = "ChipCheckbox";
6018
+ ChipButton.displayName = "ChipButton";
5913
6019
  const texts$26 = createTexts({ removeChip: {
5914
6020
  nb: "Fjern merkelapp",
5915
6021
  no: "Fjern merkelapp",
@@ -5919,17 +6025,49 @@ const texts$26 = createTexts({ removeChip: {
5919
6025
  } });
5920
6026
  //#endregion
5921
6027
  //#region src/components/Chip/ChipGroup.tsx
5922
- const ChipGroup = ({ children, ...rest }) => {
5923
- const childrenArray = react.Children.toArray(children);
5924
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HStack, {
5925
- as: StylelessList,
5926
- ...rest,
5927
- gap: "x0.75",
5928
- children: childrenArray.map((item, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: item }, `chip-${index}`))
6028
+ const ChipGroup = (props) => {
6029
+ const { children, label, labelId, gap = "x0.75", flexWrap = "wrap", id, className, style, htmlProps, ...rest } = props;
6030
+ const generatedId = (0, react.useId)();
6031
+ const uniqueLabelId = labelId ?? `${generatedId}-ChipGroupLabel`;
6032
+ const baseProps = getBaseHTMLProps(id, className, style, htmlProps, rest);
6033
+ const layout = {
6034
+ gap,
6035
+ flexWrap
6036
+ };
6037
+ return label ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6038
+ ...baseProps,
6039
+ role: "group",
6040
+ "aria-labelledby": label ? uniqueLabelId : void 0,
6041
+ children: [renderGroupLabel({
6042
+ label,
6043
+ id: uniqueLabelId
6044
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HStack, {
6045
+ ...layout,
6046
+ children
6047
+ })]
6048
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HStack, {
6049
+ ...baseProps,
6050
+ ...layout,
6051
+ role: "group",
6052
+ children
5929
6053
  });
5930
6054
  };
5931
6055
  ChipGroup.displayName = "ChipGroup";
5932
6056
  //#endregion
6057
+ //#region src/components/Chip/index.ts
6058
+ const Chip = {
6059
+ Button: ChipButton,
6060
+ Checkbox: ChipCheckbox,
6061
+ Radio: ChipRadio,
6062
+ Removable: ChipRemovable,
6063
+ Group: ChipGroup
6064
+ };
6065
+ Chip.Button.displayName = "Chip.Button";
6066
+ Chip.Checkbox.displayName = "Chip.Checkbox";
6067
+ Chip.Radio.displayName = "Chip.Radio";
6068
+ Chip.Removable.displayName = "Chip.Removable";
6069
+ Chip.Group.displayName = "Chip.Group";
6070
+ //#endregion
5933
6071
  //#region src/components/CookieBanner/CookieBanner.module.css
5934
6072
  var CookieBanner_module_default = {
5935
6073
  "container": "dds-CookieBanner-module__container",
@@ -6532,57 +6670,6 @@ const InlineIconButton = ({ className, size, icon, color, ...rest }) => /* @__PU
6532
6670
  });
6533
6671
  InlineIconButton.displayName = "InlineIconButton";
6534
6672
  //#endregion
6535
- //#region src/components/helpers/Input/Input.module.css
6536
- var Input_module_default = {
6537
- "container": "dds-Input-module__container",
6538
- "input-group": "dds-Input-module__input-group",
6539
- "input": "dds-Input-module__input",
6540
- "disabled": "dds-Input-module__disabled",
6541
- "read-only": "dds-Input-module__read-only",
6542
- "input--stateful": "dds-Input-module__input--stateful",
6543
- "input--hover": "dds-Input-module__input--hover",
6544
- "input--stateful-danger": "dds-Input-module__input--stateful-danger",
6545
- "input--large": "dds-Input-module__input--large",
6546
- "input--medium": "dds-Input-module__input--medium",
6547
- "input--small": "dds-Input-module__input--small",
6548
- "input--xsmall": "dds-Input-module__input--xsmall",
6549
- "compact--medium": "dds-Input-module__compact--medium",
6550
- "compact--small": "dds-Input-module__compact--small",
6551
- "compact-with-icon--medium": "dds-Input-module__compact-with-icon--medium",
6552
- "compact-with-icon--small": "dds-Input-module__compact-with-icon--small",
6553
- "input-with-icon--large": "dds-Input-module__input-with-icon--large",
6554
- "input-with-icon--medium": "dds-Input-module__input-with-icon--medium",
6555
- "input-with-icon--small": "dds-Input-module__input-with-icon--small",
6556
- "input-with-icon--xsmall": "dds-Input-module__input-with-icon--xsmall",
6557
- "input-with-el-right--large": "dds-Input-module__input-with-el-right--large",
6558
- "input-with-el-right--medium": "dds-Input-module__input-with-el-right--medium",
6559
- "input-with-el-right--small": "dds-Input-module__input-with-el-right--small",
6560
- "input-with-el-right--xsmall": "dds-Input-module__input-with-el-right--xsmall",
6561
- "input-with-btn-right--large": "dds-Input-module__input-with-btn-right--large",
6562
- "input-with-btn-right--medium": "dds-Input-module__input-with-btn-right--medium",
6563
- "input-with-btn-right--small": "dds-Input-module__input-with-btn-right--small",
6564
- "input-with-btn-right--xsmall": "dds-Input-module__input-with-btn-right--xsmall",
6565
- "input-with-icon-and-button-right--large": "dds-Input-module__input-with-icon-and-button-right--large",
6566
- "input-with-icon-and-button-right--medium": "dds-Input-module__input-with-icon-and-button-right--medium",
6567
- "input-with-icon-and-button-right--small": "dds-Input-module__input-with-icon-and-button-right--small",
6568
- "input-with-icon-and-button-right--xsmall": "dds-Input-module__input-with-icon-and-button-right--xsmall",
6569
- "input-group__absolute-el-right--large": "dds-Input-module__input-group__absolute-el-right--large",
6570
- "input-group__absolute-el-right--medium": "dds-Input-module__input-group__absolute-el-right--medium",
6571
- "input-group__absolute-el-right--small": "dds-Input-module__input-group__absolute-el-right--small",
6572
- "input-group__absolute-el-right--xsmall": "dds-Input-module__input-group__absolute-el-right--xsmall",
6573
- "input-group__btn-right": "dds-Input-module__input-group__btn-right",
6574
- "input-group__btn-right-with-right-icon--xsmall": "dds-Input-module__input-group__btn-right-with-right-icon--xsmall",
6575
- "input-group__btn-right-with-right-icon--small": "dds-Input-module__input-group__btn-right-with-right-icon--small",
6576
- "input-group__btn-right-with-right-icon--medium": "dds-Input-module__input-group__btn-right-with-right-icon--medium",
6577
- "input-group__btn-right-with-right-icon--large": "dds-Input-module__input-group__btn-right-with-right-icon--large",
6578
- "input--with-affix": "dds-Input-module__input--with-affix",
6579
- "input-group__absolute-el": "dds-Input-module__input-group__absolute-el",
6580
- "input-group__absolute-el--large": "dds-Input-module__input-group__absolute-el--large",
6581
- "input-group__absolute-el--medium": "dds-Input-module__input-group__absolute-el--medium",
6582
- "input-group__absolute-el--small": "dds-Input-module__input-group__absolute-el--small",
6583
- "input-group__absolute-el--xsmall": "dds-Input-module__input-group__absolute-el--xsmall"
6584
- };
6585
- //#endregion
6586
6673
  //#region src/components/date-inputs/DatePicker/DateField/CalendarButton.tsx
6587
6674
  function CalendarButton({ componentSize = "medium", isReadOnly, ...props }) {
6588
6675
  const ref = (0, react.useRef)(null);
@@ -8708,7 +8795,7 @@ const InlineButton = ({ className, color, icon, children, ...rest }) => /* @__PU
8708
8795
  ...rest,
8709
8796
  children: icon ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
8710
8797
  icon,
8711
- iconSize: "inherit"
8798
+ iconSize: "component"
8712
8799
  }) : children
8713
8800
  });
8714
8801
  //#endregion
@@ -13401,62 +13488,6 @@ const ToggleRadio = ({ value, name, onChange, checked, "aria-label": ariaLabel,
13401
13488
  };
13402
13489
  ToggleRadio.displayName = "ToggleRadio";
13403
13490
  //#endregion
13404
- //#region src/components/ToggleButton/ToggleButton.module.css
13405
- var ToggleButton_module_default = { "content": "dds-ToggleButton-module__content" };
13406
- //#endregion
13407
- //#region src/components/ToggleButton/ToggleButton.tsx
13408
- const ToggleButton = ({ id, label, icon, size = "small", className, style, htmlProps, ...rest }) => {
13409
- const generatedId = (0, react.useId)();
13410
- const uniqueId = id ?? `${generatedId}-toggleButton`;
13411
- const hasIcon = !!icon;
13412
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Box, {
13413
- as: "label",
13414
- htmlFor: uniqueId,
13415
- width: "fit-content",
13416
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(HiddenInput, {
13417
- ...getBaseHTMLProps(uniqueId, cn(className, focus_module_default["focusable-sibling"]), style, htmlProps, rest),
13418
- type: "checkbox"
13419
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Paper, {
13420
- as: "span",
13421
- border: "border-default",
13422
- background: "surface-default",
13423
- borderRadius: "rounded",
13424
- width: "fit-content",
13425
- display: "inline-flex",
13426
- alignItems: "center",
13427
- className: cn(ToggleButton_module_default.content, typographyStyles_module_default[`body-short-${size}`], focus_module_default["focus-styled-sibling"], Button_module_default[`button--${size}`], Button_module_default["just-text"], ...hasIcon ? [Button_module_default["with-text-and-icon"], Button_module_default["with-icon-left"]] : []),
13428
- children: [hasIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
13429
- icon,
13430
- iconSize: "component"
13431
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label })]
13432
- })]
13433
- });
13434
- };
13435
- ToggleButton.displayName = "ToggleButton";
13436
- //#endregion
13437
- //#region src/components/ToggleButton/ToggleButtonGroup.tsx
13438
- const ToggleButtonGroup = (props) => {
13439
- const { children, direction = "row", label, labelId, id, className, style, htmlProps, ...rest } = props;
13440
- const generatedId = (0, react.useId)();
13441
- const uniqueLabelId = labelId ?? `${generatedId}-ToggleButtonGroupLabel`;
13442
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
13443
- ...getBaseHTMLProps(id, className, style, htmlProps, rest),
13444
- role: "group",
13445
- "aria-labelledby": label ? uniqueLabelId : void 0,
13446
- children: [renderGroupLabel({
13447
- label,
13448
- id: uniqueLabelId
13449
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Box, {
13450
- display: "flex",
13451
- flexWrap: "wrap",
13452
- gap: "x0.75",
13453
- flexDirection: direction,
13454
- children
13455
- })]
13456
- });
13457
- };
13458
- ToggleButtonGroup.displayName = "ToggleButtonGroup";
13459
- //#endregion
13460
13491
  exports.Accordion = Accordion;
13461
13492
  exports.AccordionBody = AccordionBody;
13462
13493
  exports.AccordionContextProvider = AccordionContextProvider;
@@ -13519,7 +13550,11 @@ exports.ChevronLeftIcon = ChevronLeftIcon;
13519
13550
  exports.ChevronRightIcon = ChevronRightIcon;
13520
13551
  exports.ChevronUpIcon = ChevronUpIcon;
13521
13552
  exports.Chip = Chip;
13553
+ exports.ChipButton = ChipButton;
13554
+ exports.ChipCheckbox = ChipCheckbox;
13522
13555
  exports.ChipGroup = ChipGroup;
13556
+ exports.ChipRadio = ChipRadio;
13557
+ exports.ChipRemovable = ChipRemovable;
13523
13558
  exports.CircleFilledIcon = CircleFilledIcon;
13524
13559
  exports.CircleIcon = CircleIcon;
13525
13560
  exports.CloseCircledIcon = CloseCircledIcon;
@@ -13779,8 +13814,6 @@ exports.TingrettIcon = TingrettIcon;
13779
13814
  exports.TipIcon = TipIcon;
13780
13815
  exports.Toggle = Toggle;
13781
13816
  exports.ToggleBar = ToggleBar;
13782
- exports.ToggleButton = ToggleButton;
13783
- exports.ToggleButtonGroup = ToggleButtonGroup;
13784
13817
  exports.ToggleRadio = ToggleRadio;
13785
13818
  exports.Tooltip = Tooltip;
13786
13819
  exports.TrashIcon = TrashIcon;