@norges-domstoler/dds-components 21.3.0 → 21.3.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.mjs CHANGED
@@ -4276,9 +4276,6 @@ var Card_default = {
4276
4276
  "container--border": "Card_container--border",
4277
4277
  "container--navigation": "Card_container--navigation",
4278
4278
  "container--selection-control": "Card_container--selection-control",
4279
- "container--selection-control--disabled": "Card_container--selection-control--disabled",
4280
- "container--selection-control--readonly": "Card_container--selection-control--readonly",
4281
- "container--selection-control--error": "Card_container--selection-control--error",
4282
4279
  "container--expandable": "Card_container--expandable"
4283
4280
  };
4284
4281
 
@@ -4514,11 +4511,8 @@ var SelectionControl_default = {
4514
4511
  "group--column": "SelectionControl_group--column",
4515
4512
  label: "SelectionControl_label",
4516
4513
  "selection-control": "SelectionControl_selection-control",
4517
- "label--readonly": "SelectionControl_label--readonly",
4518
4514
  "label--checkbox": "SelectionControl_label--checkbox",
4519
4515
  "label--radio": "SelectionControl_label--radio",
4520
- "label--disabled": "SelectionControl_label--disabled",
4521
- "label--error": "SelectionControl_label--error",
4522
4516
  "label--no-text": "SelectionControl_label--no-text",
4523
4517
  "selection-control--radio": "SelectionControl_selection-control--radio"
4524
4518
  };
@@ -4542,8 +4536,6 @@ var SelectionControl = ({
4542
4536
  );
4543
4537
  var Label2 = ({
4544
4538
  disabled,
4545
- readOnly,
4546
- hasError,
4547
4539
  hasText,
4548
4540
  controlType,
4549
4541
  className,
@@ -4564,10 +4556,7 @@ var Label2 = ({
4564
4556
  SelectionControl_default[`label--${controlType}`],
4565
4557
  !hasText && SelectionControl_default["label--no-text"],
4566
4558
  typographyStyles_default["text-color--default"],
4567
- disabled && SelectionControl_default["label--disabled"],
4568
- disabled && typographyStyles_default["text-color--subtle"],
4569
- readOnly && SelectionControl_default["label--readonly"],
4570
- hasError && SelectionControl_default["label--error"]
4559
+ disabled && typographyStyles_default["text-color--subtle"]
4571
4560
  ),
4572
4561
  ...rest
4573
4562
  }
@@ -4640,9 +4629,7 @@ var Checkbox = ({
4640
4629
  return /* @__PURE__ */ jsxs34(
4641
4630
  Label2,
4642
4631
  {
4643
- hasError,
4644
4632
  disabled: isDisabled,
4645
- readOnly: isReadOnly,
4646
4633
  htmlFor: uniqueId,
4647
4634
  hasText: hasLabel || hasChildren,
4648
4635
  controlType: "checkbox",
@@ -4900,9 +4887,7 @@ var RadioButton = ({
4900
4887
  return /* @__PURE__ */ jsxs37(
4901
4888
  Label2,
4902
4889
  {
4903
- hasError,
4904
4890
  disabled: isDisabled,
4905
- readOnly: isReadOnly,
4906
4891
  style,
4907
4892
  className: cn(className, htmlPropsClassName),
4908
4893
  hasText: hasLabel || hasChildren,
@@ -5116,6 +5101,10 @@ var CardSelectable = (props) => {
5116
5101
  const { cardType: cardTypeContext, tipId } = useCardSelectableContext();
5117
5102
  const cardType = cardTypeProp != null ? cardTypeProp : cardTypeContext;
5118
5103
  const group = cardTypeContext === "radio" ? radioGroup : checkboxGroup;
5104
+ if (!cardType)
5105
+ throw new Error(`
5106
+ Error: <CardSelectable> requires a \`cardType\` prop.
5107
+ Provide \`cardType\` either via a parent <CardSelectableGroup> or directly on the component.`);
5119
5108
  const {
5120
5109
  disabled = group == null ? void 0 : group.disabled,
5121
5110
  readOnly = group == null ? void 0 : group.readOnly,
@@ -5130,9 +5119,6 @@ var CardSelectable = (props) => {
5130
5119
  Card_default.container,
5131
5120
  Card_default[`container--${appearance}`],
5132
5121
  Card_default[`container--selection-control`],
5133
- readOnly && Card_default[`container--selection-control--readonly`],
5134
- disabled && Card_default[`container--selection-control--disabled`],
5135
- error && Card_default[`container--selection-control--error`],
5136
5122
  focus_default["has-focusable-input"]
5137
5123
  );
5138
5124
  const radioContextProps = {