@norges-domstoler/dds-components 22.7.0 → 22.7.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 +0 -2
- package/dist/index.css.map +1 -1
- package/dist/index.js +7 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8061,7 +8061,7 @@ var ErrorSummary = ({
|
|
|
8061
8061
|
props
|
|
8062
8062
|
),
|
|
8063
8063
|
background: "surface-danger-default",
|
|
8064
|
-
padding: "x1 x0.75
|
|
8064
|
+
padding: "x1 x0.75 x0.25 x1",
|
|
8065
8065
|
children: [
|
|
8066
8066
|
heading,
|
|
8067
8067
|
/* @__PURE__ */ jsx267(List, { children })
|
|
@@ -10759,6 +10759,7 @@ var optionTypography = {
|
|
|
10759
10759
|
letterSpacing: "var(--dds-font-body-short-xsmall-letter-spacing)"
|
|
10760
10760
|
}
|
|
10761
10761
|
};
|
|
10762
|
+
var controlTypography = optionTypography;
|
|
10762
10763
|
var multiValueLabelTypography = {
|
|
10763
10764
|
medium: {
|
|
10764
10765
|
font: "var(--dds-font-body-short-small)",
|
|
@@ -10779,22 +10780,12 @@ var groupHeadingTypography = {
|
|
|
10779
10780
|
};
|
|
10780
10781
|
var typography = {
|
|
10781
10782
|
option: optionTypography,
|
|
10783
|
+
control: controlTypography,
|
|
10782
10784
|
multiValueLabel: multiValueLabelTypography,
|
|
10783
10785
|
groupHeading: groupHeadingTypography
|
|
10784
10786
|
};
|
|
10785
10787
|
var prefix = "dds-select";
|
|
10786
|
-
var
|
|
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) => ({
|
|
10788
|
+
var getCustomStyles = (size2, hasError, isReadOnly) => ({
|
|
10798
10789
|
control: (provided, state) => ({
|
|
10799
10790
|
position: "relative",
|
|
10800
10791
|
display: "flex",
|
|
@@ -10806,7 +10797,7 @@ var getCustomStyles = (size2, hasError, hasIcon, isReadOnly) => ({
|
|
|
10806
10797
|
borderColor: "var(--dds-color-border-default)",
|
|
10807
10798
|
backgroundColor: "var(--dds-color-surface-default)",
|
|
10808
10799
|
transition: `box-shadow var(--dds-motion-micro-state), border-color var(--dds-motion-micro-state), ${focusVisibleTransitionValue}`,
|
|
10809
|
-
...control[size2],
|
|
10800
|
+
...typography.control[size2],
|
|
10810
10801
|
"&:hover": {
|
|
10811
10802
|
...!isReadOnly && {
|
|
10812
10803
|
borderColor: "var(--dds-color-border-action-hover)",
|
|
@@ -10952,7 +10943,7 @@ var getCustomStyles = (size2, hasError, hasIcon, isReadOnly) => ({
|
|
|
10952
10943
|
gap: "var(--dds-spacing-x0-25)",
|
|
10953
10944
|
padding: "var(--dds-spacing-x0-75)",
|
|
10954
10945
|
backgroundColor: "var(--dds-color-surface-default)",
|
|
10955
|
-
...typography.option
|
|
10946
|
+
...typography.option[size2],
|
|
10956
10947
|
color: "var(--dds-color-text-default)",
|
|
10957
10948
|
"@media (prefers-reduced-motion: no-preference)": {
|
|
10958
10949
|
transition: "color var(--dds-motion-micro-state), background-color var(--dds-motion-micro-state)"
|
|
@@ -11150,7 +11141,6 @@ function Select({
|
|
|
11150
11141
|
const uniqueId = id != null ? id : `${generatedId}-select`;
|
|
11151
11142
|
const singleValueId = !isMulti ? `${uniqueId}-singleValue` : void 0;
|
|
11152
11143
|
const hasErrorMessage = !!errorMessage;
|
|
11153
|
-
const hasIcon = !!icon;
|
|
11154
11144
|
const showRequiredStyling = !!(rest.required || ariaRequired);
|
|
11155
11145
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
11156
11146
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
@@ -11233,12 +11223,7 @@ function Select({
|
|
|
11233
11223
|
name: uniqueId,
|
|
11234
11224
|
menuPortalTarget: portalTarget,
|
|
11235
11225
|
classNamePrefix: prefix,
|
|
11236
|
-
styles: getCustomStyles(
|
|
11237
|
-
componentSize,
|
|
11238
|
-
hasErrorMessage,
|
|
11239
|
-
hasIcon,
|
|
11240
|
-
readOnly
|
|
11241
|
-
),
|
|
11226
|
+
styles: getCustomStyles(componentSize, hasErrorMessage, readOnly),
|
|
11242
11227
|
filterOption: (option, inputValue) => {
|
|
11243
11228
|
const { label: label2 } = option;
|
|
11244
11229
|
return searchFilter(label2, inputValue) || inputValue === "";
|