@norges-domstoler/dds-components 22.7.0 → 22.7.2

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
@@ -7619,10 +7619,8 @@ var useDetailListContext = () => useContext13(DetailListContext);
7619
7619
  // src/components/DetailList/DetailList.module.css
7620
7620
  var DetailList_default = {
7621
7621
  list: "DetailList_list",
7622
- "list--with-dividers": "DetailList_list--with-dividers",
7623
- row: "DetailList_row",
7624
- "list--striped": "DetailList_list--striped",
7625
7622
  "list--striped-with-bp": "DetailList_list--striped-with-bp",
7623
+ row: "DetailList_row",
7626
7624
  "list--small": "DetailList_list--small",
7627
7625
  "list--medium": "DetailList_list--medium",
7628
7626
  "list--large": "DetailList_list--large",
@@ -7631,6 +7629,32 @@ var DetailList_default = {
7631
7629
  term: "DetailList_term"
7632
7630
  };
7633
7631
 
7632
+ // src/components/Table/normal/Table.module.css
7633
+ var Table_default = {
7634
+ wrapper: "Table_wrapper",
7635
+ "wrapper--scrollable": "Table_wrapper--scrollable",
7636
+ table: "Table_table",
7637
+ "table--with-dividers": "Table_table--with-dividers",
7638
+ "row--body": "Table_row--body",
7639
+ "row--colapsible-header--open": "Table_row--colapsible-header--open",
7640
+ "table--sticky-header": "Table_table--sticky-header",
7641
+ "table--with-stripes": "Table_table--with-stripes",
7642
+ "table--small": "Table_table--small",
7643
+ "table--medium": "Table_table--medium",
7644
+ "table--large": "Table_table--large",
7645
+ row: "Table_row",
7646
+ "row--sum": "Table_row--sum",
7647
+ "row--selected": "Table_row--selected",
7648
+ "row--hoverable": "Table_row--hoverable",
7649
+ "cell--head": "Table_cell--head",
7650
+ "cell--left": "Table_cell--left",
7651
+ "cell--right": "Table_cell--right",
7652
+ "cell--center": "Table_cell--center",
7653
+ cell__inner: "Table_cell__inner",
7654
+ "sort-button": "Table_sort-button",
7655
+ "collapse-button": "Table_collapse-button"
7656
+ };
7657
+
7634
7658
  // src/components/DetailList/DetailList.tsx
7635
7659
  import { jsx as jsx258 } from "react/jsx-runtime";
7636
7660
  var DETAIL_LIST_SIZES = createSizes("small", "medium", "large");
@@ -7652,10 +7676,11 @@ var DetailList = ({
7652
7676
  cn(
7653
7677
  className,
7654
7678
  typographyStyles_default[`body-short-${size2}`],
7679
+ Table_default.table,
7655
7680
  DetailList_default.list,
7656
7681
  DetailList_default[`list--${size2}`],
7657
- withDividers && DetailList_default["list--with-dividers"],
7658
- striped && !smallScreenBreakpoint && DetailList_default["list--striped"],
7682
+ withDividers && Table_default["table--with-dividers"],
7683
+ striped && !smallScreenBreakpoint && Table_default["table--with-stripes"],
7659
7684
  striped && smallScreenBreakpoint && DetailList_default["list--striped-with-bp"]
7660
7685
  ),
7661
7686
  style,
@@ -7682,7 +7707,7 @@ var DetailListRow = ({ className, ...rest }) => {
7682
7707
  {
7683
7708
  display: "table-row",
7684
7709
  hideBelow: hasBp ? bp : void 0,
7685
- className: cn(className, DetailList_default.row),
7710
+ className: cn(className, DetailList_default.row, Table_default["row--body"]),
7686
7711
  ...rest
7687
7712
  }
7688
7713
  ),
@@ -7692,7 +7717,12 @@ var DetailListRow = ({ className, ...rest }) => {
7692
7717
  display: "flex",
7693
7718
  flexDirection: "column",
7694
7719
  showBelow: bp,
7695
- className: cn(className, DetailList_default.row, DetailList_default.column),
7720
+ className: cn(
7721
+ className,
7722
+ DetailList_default.row,
7723
+ DetailList_default.column,
7724
+ Table_default["row--body"]
7725
+ ),
7696
7726
  ...rest
7697
7727
  }
7698
7728
  )
@@ -8061,7 +8091,7 @@ var ErrorSummary = ({
8061
8091
  props
8062
8092
  ),
8063
8093
  background: "surface-danger-default",
8064
- padding: "x1 x0.75 x1.5 x1",
8094
+ padding: "x1 x0.75 x0.25 x1",
8065
8095
  children: [
8066
8096
  heading,
8067
8097
  /* @__PURE__ */ jsx267(List, { children })
@@ -10759,6 +10789,7 @@ var optionTypography = {
10759
10789
  letterSpacing: "var(--dds-font-body-short-xsmall-letter-spacing)"
10760
10790
  }
10761
10791
  };
10792
+ var controlTypography = optionTypography;
10762
10793
  var multiValueLabelTypography = {
10763
10794
  medium: {
10764
10795
  font: "var(--dds-font-body-short-small)",
@@ -10779,22 +10810,12 @@ var groupHeadingTypography = {
10779
10810
  };
10780
10811
  var typography = {
10781
10812
  option: optionTypography,
10813
+ control: controlTypography,
10782
10814
  multiValueLabel: multiValueLabelTypography,
10783
10815
  groupHeading: groupHeadingTypography
10784
10816
  };
10785
10817
  var prefix = "dds-select";
10786
- var control = {
10787
- medium: {
10788
- ...optionTypography.medium
10789
- },
10790
- small: {
10791
- ...optionTypography.small
10792
- },
10793
- xsmall: {
10794
- ...optionTypography.xsmall
10795
- }
10796
- };
10797
- var getCustomStyles = (size2, hasError, hasIcon, isReadOnly) => ({
10818
+ var getCustomStyles = (size2, hasError, isReadOnly) => ({
10798
10819
  control: (provided, state) => ({
10799
10820
  position: "relative",
10800
10821
  display: "flex",
@@ -10806,7 +10827,7 @@ var getCustomStyles = (size2, hasError, hasIcon, isReadOnly) => ({
10806
10827
  borderColor: "var(--dds-color-border-default)",
10807
10828
  backgroundColor: "var(--dds-color-surface-default)",
10808
10829
  transition: `box-shadow var(--dds-motion-micro-state), border-color var(--dds-motion-micro-state), ${focusVisibleTransitionValue}`,
10809
- ...control[size2],
10830
+ ...typography.control[size2],
10810
10831
  "&:hover": {
10811
10832
  ...!isReadOnly && {
10812
10833
  borderColor: "var(--dds-color-border-action-hover)",
@@ -10952,7 +10973,7 @@ var getCustomStyles = (size2, hasError, hasIcon, isReadOnly) => ({
10952
10973
  gap: "var(--dds-spacing-x0-25)",
10953
10974
  padding: "var(--dds-spacing-x0-75)",
10954
10975
  backgroundColor: "var(--dds-color-surface-default)",
10955
- ...typography.option.medium,
10976
+ ...typography.option[size2],
10956
10977
  color: "var(--dds-color-text-default)",
10957
10978
  "@media (prefers-reduced-motion: no-preference)": {
10958
10979
  transition: "color var(--dds-motion-micro-state), background-color var(--dds-motion-micro-state)"
@@ -11150,7 +11171,6 @@ function Select({
11150
11171
  const uniqueId = id != null ? id : `${generatedId}-select`;
11151
11172
  const singleValueId = !isMulti ? `${uniqueId}-singleValue` : void 0;
11152
11173
  const hasErrorMessage = !!errorMessage;
11153
- const hasIcon = !!icon;
11154
11174
  const showRequiredStyling = !!(rest.required || ariaRequired);
11155
11175
  const tipId = derivativeIdGenerator(uniqueId, "tip");
11156
11176
  const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
@@ -11233,12 +11253,7 @@ function Select({
11233
11253
  name: uniqueId,
11234
11254
  menuPortalTarget: portalTarget,
11235
11255
  classNamePrefix: prefix,
11236
- styles: getCustomStyles(
11237
- componentSize,
11238
- hasErrorMessage,
11239
- hasIcon,
11240
- readOnly
11241
- ),
11256
+ styles: getCustomStyles(componentSize, hasErrorMessage, readOnly),
11242
11257
  filterOption: (option, inputValue) => {
11243
11258
  const { label: label2 } = option;
11244
11259
  return searchFilter(label2, inputValue) || inputValue === "";
@@ -12424,7 +12439,7 @@ var PhoneInput = ({
12424
12439
  children: countryOptions.map((item, index) => /* @__PURE__ */ jsx308("option", { value: item.countryCode, children: item.label }, index))
12425
12440
  }
12426
12441
  ),
12427
- /* @__PURE__ */ jsxs119(Box, { width: "100%", className: Input_default["input-group"], children: [
12442
+ /* @__PURE__ */ jsxs119(Box, { width: "100%", display: "flex", className: Input_default["input-group"], children: [
12428
12443
  /* @__PURE__ */ jsx308(
12429
12444
  "span",
12430
12445
  {
@@ -13699,32 +13714,6 @@ function useIsInTableHead() {
13699
13714
  return isInTableHead;
13700
13715
  }
13701
13716
 
13702
- // src/components/Table/normal/Table.module.css
13703
- var Table_default = {
13704
- wrapper: "Table_wrapper",
13705
- "wrapper--scrollable": "Table_wrapper--scrollable",
13706
- table: "Table_table",
13707
- "table--with-dividers": "Table_table--with-dividers",
13708
- "row--body": "Table_row--body",
13709
- "row--colapsible-header--open": "Table_row--colapsible-header--open",
13710
- "table--sticky-header": "Table_table--sticky-header",
13711
- "table--with-stripes": "Table_table--with-stripes",
13712
- "table--small": "Table_table--small",
13713
- "table--medium": "Table_table--medium",
13714
- "table--large": "Table_table--large",
13715
- row: "Table_row",
13716
- "row--sum": "Table_row--sum",
13717
- "row--selected": "Table_row--selected",
13718
- "row--hoverable": "Table_row--hoverable",
13719
- "cell--head": "Table_cell--head",
13720
- "cell--left": "Table_cell--left",
13721
- "cell--right": "Table_cell--right",
13722
- "cell--center": "Table_cell--center",
13723
- cell__inner: "Table_cell__inner",
13724
- "sort-button": "Table_sort-button",
13725
- "collapse-button": "Table_collapse-button"
13726
- };
13727
-
13728
13717
  // src/components/Table/normal/Cell.tsx
13729
13718
  import { jsx as jsx323 } from "react/jsx-runtime";
13730
13719
  var Cell = ({