@norges-domstoler/dds-components 17.0.0 → 17.1.0
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 +40 -18
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +17 -6
- package/dist/index.d.ts +17 -6
- package/dist/index.js +287 -217
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +211 -142
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -16
package/dist/index.mjs
CHANGED
|
@@ -475,7 +475,8 @@ var Input_default = {
|
|
|
475
475
|
"input--tiny": "Input_input--tiny",
|
|
476
476
|
"input--with-affix": "Input_input--with-affix",
|
|
477
477
|
label: "Input_label",
|
|
478
|
-
"char-counter": "Input_char-counter"
|
|
478
|
+
"char-counter": "Input_char-counter",
|
|
479
|
+
icon: "Input_icon"
|
|
479
480
|
};
|
|
480
481
|
|
|
481
482
|
// src/components/Typography/Caption/Caption.tsx
|
|
@@ -2924,7 +2925,7 @@ var isPropValid = /* @__PURE__ */ memoize(
|
|
|
2924
2925
|
/* Z+1 */
|
|
2925
2926
|
);
|
|
2926
2927
|
|
|
2927
|
-
// ../../node_modules/.pnpm/styled-components@6.1.
|
|
2928
|
+
// ../../node_modules/.pnpm/styled-components@6.1.13_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/styled-components/dist/styled-components.esm.js
|
|
2928
2929
|
var import_shallowequal = __toESM(require_shallowequal());
|
|
2929
2930
|
import r, { useRef as o, useState as s, useMemo as i, useEffect as a, useContext as c, useDebugValue as l, createElement as u } from "react";
|
|
2930
2931
|
|
|
@@ -3520,11 +3521,11 @@ var unitlessKeys = {
|
|
|
3520
3521
|
strokeWidth: 1
|
|
3521
3522
|
};
|
|
3522
3523
|
|
|
3523
|
-
// ../../node_modules/.pnpm/styled-components@6.1.
|
|
3524
|
+
// ../../node_modules/.pnpm/styled-components@6.1.13_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/styled-components/dist/styled-components.esm.js
|
|
3524
3525
|
var f = "undefined" != typeof process && void 0 !== process.env && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled";
|
|
3525
3526
|
var m = "active";
|
|
3526
3527
|
var y = "data-styled-version";
|
|
3527
|
-
var v = "6.1.
|
|
3528
|
+
var v = "6.1.13";
|
|
3528
3529
|
var g = "/*!sc*/\n";
|
|
3529
3530
|
var S = "undefined" != typeof window && "HTMLElement" in window;
|
|
3530
3531
|
var w = Boolean("boolean" == typeof SC_DISABLE_SPEEDY ? SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== process.env && void 0 !== process.env.REACT_APP_SC_DISABLE_SPEEDY && "" !== process.env.REACT_APP_SC_DISABLE_SPEEDY ? "false" !== process.env.REACT_APP_SC_DISABLE_SPEEDY && process.env.REACT_APP_SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== process.env && void 0 !== process.env.SC_DISABLE_SPEEDY && "" !== process.env.SC_DISABLE_SPEEDY ? "false" !== process.env.SC_DISABLE_SPEEDY && process.env.SC_DISABLE_SPEEDY : "production" !== process.env.NODE_ENV);
|
|
@@ -8990,7 +8991,9 @@ var Select_default = {
|
|
|
8990
8991
|
"container--disabled": "Select_container--disabled",
|
|
8991
8992
|
"container--readonly": "Select_container--readonly",
|
|
8992
8993
|
"inner-single-value": "Select_inner-single-value",
|
|
8993
|
-
icon: "Select_icon",
|
|
8994
|
+
"icon--medium": "Select_icon--medium",
|
|
8995
|
+
"icon--small": "Select_icon--small",
|
|
8996
|
+
"icon--tiny": "Select_icon--tiny",
|
|
8994
8997
|
control: "Select_control",
|
|
8995
8998
|
"control--readonly": "Select_control--readonly",
|
|
8996
8999
|
"dropdown-indicator": "Select_dropdown-indicator",
|
|
@@ -9057,22 +9060,37 @@ var typography = {
|
|
|
9057
9060
|
var prefix2 = "dds-select";
|
|
9058
9061
|
var control = {
|
|
9059
9062
|
medium: {
|
|
9060
|
-
|
|
9061
|
-
|
|
9062
|
-
|
|
9063
|
+
base: {
|
|
9064
|
+
paddingBlock: "var(--dds-spacing-x0-75)",
|
|
9065
|
+
paddingLeft: "var(--dds-spacing-x0-75)",
|
|
9066
|
+
...optionTypography.medium
|
|
9067
|
+
},
|
|
9068
|
+
hasIcon: {
|
|
9069
|
+
paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-x0-5))"
|
|
9070
|
+
}
|
|
9063
9071
|
},
|
|
9064
9072
|
small: {
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
|
|
9073
|
+
base: {
|
|
9074
|
+
paddingBlock: "var(--dds-spacing-x0-5)",
|
|
9075
|
+
paddingLeft: "var(--dds-spacing-x0-75)",
|
|
9076
|
+
...optionTypography.small
|
|
9077
|
+
},
|
|
9078
|
+
hasIcon: {
|
|
9079
|
+
paddingLeft: "calc(var(--dds-spacing-x0-75) + var(--dds-icon-size-medium) + var(--dds-spacing-x0-5))"
|
|
9080
|
+
}
|
|
9068
9081
|
},
|
|
9069
9082
|
tiny: {
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
|
|
9083
|
+
base: {
|
|
9084
|
+
paddingBlock: "var(--dds-spacing-x0-25)",
|
|
9085
|
+
paddingLeft: "var(--dds-spacing-x0-5)",
|
|
9086
|
+
...optionTypography.tiny
|
|
9087
|
+
},
|
|
9088
|
+
hasIcon: {
|
|
9089
|
+
paddingLeft: "calc(var(--dds-spacing-x0-5) + var(--dds-icon-size-small) + var(--dds-spacing-x0-5))"
|
|
9090
|
+
}
|
|
9073
9091
|
}
|
|
9074
9092
|
};
|
|
9075
|
-
var getCustomStyles = (size2, hasError, isReadOnly) => ({
|
|
9093
|
+
var getCustomStyles = (size2, hasError, hasIcon, isReadOnly) => ({
|
|
9076
9094
|
control: (provided, state) => ({
|
|
9077
9095
|
position: "relative",
|
|
9078
9096
|
display: "flex",
|
|
@@ -9084,7 +9102,9 @@ var getCustomStyles = (size2, hasError, isReadOnly) => ({
|
|
|
9084
9102
|
borderColor: "var(--dds-color-border-default)",
|
|
9085
9103
|
backgroundColor: "var(--dds-color-surface-default)",
|
|
9086
9104
|
transition: "box-shadow 0.2s, border-color 0.2s",
|
|
9087
|
-
|
|
9105
|
+
paddingRight: "var(--dds-spacing-x0-5)",
|
|
9106
|
+
...control[size2].base,
|
|
9107
|
+
...hasIcon && control[size2].hasIcon,
|
|
9088
9108
|
"&:hover": {
|
|
9089
9109
|
...!isReadOnly && hoverInputfield
|
|
9090
9110
|
},
|
|
@@ -9270,6 +9290,16 @@ var {
|
|
|
9270
9290
|
MultiValueRemove,
|
|
9271
9291
|
Control
|
|
9272
9292
|
} = components;
|
|
9293
|
+
var getIndicatorIconSize = (componentSize) => {
|
|
9294
|
+
switch (componentSize) {
|
|
9295
|
+
case "medium":
|
|
9296
|
+
return "medium";
|
|
9297
|
+
case "small":
|
|
9298
|
+
return "small";
|
|
9299
|
+
case "tiny":
|
|
9300
|
+
return "small";
|
|
9301
|
+
}
|
|
9302
|
+
};
|
|
9273
9303
|
var DDSOption = (props, componentSize) => /* @__PURE__ */ jsxs57(Option, { ...props, children: [
|
|
9274
9304
|
props.isSelected && /* @__PURE__ */ jsx254(Icon, { icon: CheckIcon, iconSize: getFormInputIconSize(componentSize) }),
|
|
9275
9305
|
props.children
|
|
@@ -9277,7 +9307,7 @@ var DDSOption = (props, componentSize) => /* @__PURE__ */ jsxs57(Option, { ...pr
|
|
|
9277
9307
|
var CustomOption = (props, Element) => /* @__PURE__ */ jsx254(Option, { ...props, children: /* @__PURE__ */ jsx254(Element, { ...props }) });
|
|
9278
9308
|
var CustomSingleValue = (props, id, Element) => /* @__PURE__ */ jsx254(SingleValue, { ...props, children: /* @__PURE__ */ jsx254("div", { id, className: Select_default["inner-single-value"], children: Element ? /* @__PURE__ */ jsx254(Element, { ...props }) : props.children }) });
|
|
9279
9309
|
var DDSNoOptionsMessage = (props) => /* @__PURE__ */ jsx254(NoOptionsMessage, { ...props, children: "Ingen treff" });
|
|
9280
|
-
var DDSClearIndicator = (props, size2) => /* @__PURE__ */ jsx254(ClearIndicator, { ...props, children: /* @__PURE__ */ jsx254(Icon, { icon: CloseSmallIcon, iconSize:
|
|
9310
|
+
var DDSClearIndicator = (props, size2) => /* @__PURE__ */ jsx254(ClearIndicator, { ...props, children: /* @__PURE__ */ jsx254(Icon, { icon: CloseSmallIcon, iconSize: getIndicatorIconSize(size2) }) });
|
|
9281
9311
|
var DDSMultiValueRemove = (props) => /* @__PURE__ */ jsx254(MultiValueRemove, { ...props, children: /* @__PURE__ */ jsx254(Icon, { icon: CloseSmallIcon, iconSize: "small" }) });
|
|
9282
9312
|
var DDSDropdownIndicator = (props, size2) => {
|
|
9283
9313
|
const { className, ...rest } = props;
|
|
@@ -9286,7 +9316,7 @@ var DDSDropdownIndicator = (props, size2) => {
|
|
|
9286
9316
|
{
|
|
9287
9317
|
...rest,
|
|
9288
9318
|
className: cn(className, Select_default["dropdown-indicator"]),
|
|
9289
|
-
children: /* @__PURE__ */ jsx254(Icon, { icon: ChevronDownIcon, iconSize:
|
|
9319
|
+
children: /* @__PURE__ */ jsx254(Icon, { icon: ChevronDownIcon, iconSize: getIndicatorIconSize(size2) })
|
|
9290
9320
|
}
|
|
9291
9321
|
);
|
|
9292
9322
|
};
|
|
@@ -9320,7 +9350,7 @@ var DDSControl = (props, componentSize, readOnly, icon, dataTestId) => {
|
|
|
9320
9350
|
{
|
|
9321
9351
|
icon,
|
|
9322
9352
|
iconSize: getFormInputIconSize(componentSize),
|
|
9323
|
-
className:
|
|
9353
|
+
className: cn(Input_default.icon, Select_default[`icon--${componentSize}`])
|
|
9324
9354
|
}
|
|
9325
9355
|
),
|
|
9326
9356
|
props.children
|
|
@@ -9366,6 +9396,7 @@ function SelectInner(props, ref) {
|
|
|
9366
9396
|
const singleValueId = !isMulti ? `${uniqueId}-singleValue` : void 0;
|
|
9367
9397
|
const hasLabel = !!label;
|
|
9368
9398
|
const hasErrorMessage = !!errorMessage;
|
|
9399
|
+
const hasIcon = !!icon;
|
|
9369
9400
|
const showRequiredStyling = !!(required || ariaRequired);
|
|
9370
9401
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
9371
9402
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
@@ -9381,7 +9412,12 @@ function SelectInner(props, ref) {
|
|
|
9381
9412
|
inputId: uniqueId,
|
|
9382
9413
|
name: uniqueId,
|
|
9383
9414
|
classNamePrefix: prefix2,
|
|
9384
|
-
styles: getCustomStyles(
|
|
9415
|
+
styles: getCustomStyles(
|
|
9416
|
+
componentSize,
|
|
9417
|
+
hasErrorMessage,
|
|
9418
|
+
hasIcon,
|
|
9419
|
+
readOnly
|
|
9420
|
+
),
|
|
9385
9421
|
filterOption: (option, inputValue) => {
|
|
9386
9422
|
const { label: label2 } = option;
|
|
9387
9423
|
return searchFilter(label2, inputValue) || inputValue === "";
|
|
@@ -10427,7 +10463,7 @@ var Search = forwardRef74(
|
|
|
10427
10463
|
{
|
|
10428
10464
|
icon: SearchIcon,
|
|
10429
10465
|
iconSize: getIconSize(componentSize),
|
|
10430
|
-
className: cn(Search_default["search-icon"])
|
|
10466
|
+
className: cn(Input_default.icon, Search_default["search-icon"])
|
|
10431
10467
|
}
|
|
10432
10468
|
),
|
|
10433
10469
|
/* @__PURE__ */ jsx264(
|
|
@@ -10451,7 +10487,6 @@ var Search = forwardRef74(
|
|
|
10451
10487
|
"aria-expanded": context.showSuggestions,
|
|
10452
10488
|
role: hasSuggestions ? "combobox" : void 0,
|
|
10453
10489
|
className: cn(
|
|
10454
|
-
Input_default.input,
|
|
10455
10490
|
Search_default.input,
|
|
10456
10491
|
Search_default[`input--${componentSize}`],
|
|
10457
10492
|
typographyStyles_default[getTypographyCn(typographyTypes3[componentSize])]
|
|
@@ -11055,9 +11090,43 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
11055
11090
|
var RadioButtonGroup = forwardRef78(RadioButtonGroupInner);
|
|
11056
11091
|
RadioButtonGroup.displayName = "RadioButtonGroup";
|
|
11057
11092
|
|
|
11058
|
-
// src/components/
|
|
11093
|
+
// src/components/Skeleton/Skeleton.tsx
|
|
11059
11094
|
import { forwardRef as forwardRef79 } from "react";
|
|
11060
11095
|
|
|
11096
|
+
// src/components/Skeleton/Skeleton.module.css
|
|
11097
|
+
var Skeleton_default = {
|
|
11098
|
+
ddsSkeletonAnimation: "Skeleton_ddsSkeletonAnimation",
|
|
11099
|
+
container: "Skeleton_container"
|
|
11100
|
+
};
|
|
11101
|
+
|
|
11102
|
+
// src/components/Skeleton/Skeleton.tsx
|
|
11103
|
+
import { jsx as jsx271 } from "react/jsx-runtime";
|
|
11104
|
+
var Skeleton = forwardRef79(
|
|
11105
|
+
(props, ref) => {
|
|
11106
|
+
const {
|
|
11107
|
+
width,
|
|
11108
|
+
height,
|
|
11109
|
+
borderRadius = "var(--dds-border-radius-surface)",
|
|
11110
|
+
className,
|
|
11111
|
+
style,
|
|
11112
|
+
...rest
|
|
11113
|
+
} = props;
|
|
11114
|
+
return /* @__PURE__ */ jsx271(
|
|
11115
|
+
"div",
|
|
11116
|
+
{
|
|
11117
|
+
ref,
|
|
11118
|
+
className: cn(className, Skeleton_default.container),
|
|
11119
|
+
style: { ...style, width, height, borderRadius },
|
|
11120
|
+
...rest
|
|
11121
|
+
}
|
|
11122
|
+
);
|
|
11123
|
+
}
|
|
11124
|
+
);
|
|
11125
|
+
Skeleton.displayName = "Skeleton";
|
|
11126
|
+
|
|
11127
|
+
// src/components/SkipToContent/SkipToContent.tsx
|
|
11128
|
+
import { forwardRef as forwardRef80 } from "react";
|
|
11129
|
+
|
|
11061
11130
|
// src/components/SkipToContent/SkipToContent.module.css
|
|
11062
11131
|
var SkipToContent_default = {
|
|
11063
11132
|
wrapper: "SkipToContent_wrapper",
|
|
@@ -11065,8 +11134,8 @@ var SkipToContent_default = {
|
|
|
11065
11134
|
};
|
|
11066
11135
|
|
|
11067
11136
|
// src/components/SkipToContent/SkipToContent.tsx
|
|
11068
|
-
import { jsx as
|
|
11069
|
-
var SkipToContent =
|
|
11137
|
+
import { jsx as jsx272 } from "react/jsx-runtime";
|
|
11138
|
+
var SkipToContent = forwardRef80(
|
|
11070
11139
|
(props, ref) => {
|
|
11071
11140
|
const {
|
|
11072
11141
|
text = "Til hovedinnhold",
|
|
@@ -11081,12 +11150,12 @@ var SkipToContent = forwardRef79(
|
|
|
11081
11150
|
style,
|
|
11082
11151
|
...restHtmlProps
|
|
11083
11152
|
} = htmlProps;
|
|
11084
|
-
return /* @__PURE__ */
|
|
11153
|
+
return /* @__PURE__ */ jsx272(
|
|
11085
11154
|
"div",
|
|
11086
11155
|
{
|
|
11087
11156
|
className: cn(className, htmlPropsClassName, SkipToContent_default.wrapper),
|
|
11088
11157
|
style: { ...style, top },
|
|
11089
|
-
children: /* @__PURE__ */
|
|
11158
|
+
children: /* @__PURE__ */ jsx272(
|
|
11090
11159
|
Link,
|
|
11091
11160
|
{
|
|
11092
11161
|
...getBaseHTMLProps(id, restHtmlProps, rest),
|
|
@@ -11103,7 +11172,7 @@ var SkipToContent = forwardRef79(
|
|
|
11103
11172
|
SkipToContent.displayName = "SkipToContent";
|
|
11104
11173
|
|
|
11105
11174
|
// src/components/SplitButton/SplitButton.tsx
|
|
11106
|
-
import { forwardRef as
|
|
11175
|
+
import { forwardRef as forwardRef81, useState as useState25 } from "react";
|
|
11107
11176
|
|
|
11108
11177
|
// src/components/SplitButton/SplitButton.module.css
|
|
11109
11178
|
var SplitButton_default = {
|
|
@@ -11114,8 +11183,8 @@ var SplitButton_default = {
|
|
|
11114
11183
|
};
|
|
11115
11184
|
|
|
11116
11185
|
// src/components/SplitButton/SplitButton.tsx
|
|
11117
|
-
import { jsx as
|
|
11118
|
-
var SplitButton =
|
|
11186
|
+
import { jsx as jsx273, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
11187
|
+
var SplitButton = forwardRef81(
|
|
11119
11188
|
(props, ref) => {
|
|
11120
11189
|
const {
|
|
11121
11190
|
size: size2,
|
|
@@ -11131,7 +11200,7 @@ var SplitButton = forwardRef80(
|
|
|
11131
11200
|
size: size2
|
|
11132
11201
|
};
|
|
11133
11202
|
return /* @__PURE__ */ jsxs70("div", { ref, className: cn(className, SplitButton_default.container), ...rest, children: [
|
|
11134
|
-
/* @__PURE__ */
|
|
11203
|
+
/* @__PURE__ */ jsx273(
|
|
11135
11204
|
Button,
|
|
11136
11205
|
{
|
|
11137
11206
|
...buttonStyleProps,
|
|
@@ -11141,7 +11210,7 @@ var SplitButton = forwardRef80(
|
|
|
11141
11210
|
}
|
|
11142
11211
|
),
|
|
11143
11212
|
/* @__PURE__ */ jsxs70(OverflowMenuGroup, { onToggle: () => setIsOpen(!isOpen), children: [
|
|
11144
|
-
/* @__PURE__ */
|
|
11213
|
+
/* @__PURE__ */ jsx273(
|
|
11145
11214
|
Button,
|
|
11146
11215
|
{
|
|
11147
11216
|
...buttonStyleProps,
|
|
@@ -11154,7 +11223,7 @@ var SplitButton = forwardRef80(
|
|
|
11154
11223
|
)
|
|
11155
11224
|
}
|
|
11156
11225
|
),
|
|
11157
|
-
/* @__PURE__ */
|
|
11226
|
+
/* @__PURE__ */ jsx273(OverflowMenu, { placement: "bottom-end", children: /* @__PURE__ */ jsx273(OverflowMenuList, { children: secondaryActions.map((item) => /* @__PURE__ */ jsx273(OverflowMenuButton, { ...item, children: item.children })) }) })
|
|
11158
11227
|
] })
|
|
11159
11228
|
] });
|
|
11160
11229
|
}
|
|
@@ -11166,7 +11235,7 @@ import {
|
|
|
11166
11235
|
Children as Children5,
|
|
11167
11236
|
Fragment as Fragment13,
|
|
11168
11237
|
cloneElement as cloneElement8,
|
|
11169
|
-
forwardRef as
|
|
11238
|
+
forwardRef as forwardRef89,
|
|
11170
11239
|
isValidElement as isValidElement9,
|
|
11171
11240
|
useEffect as useEffect27,
|
|
11172
11241
|
useState as useState27
|
|
@@ -11181,30 +11250,30 @@ var CollapsibleTableContext = createContext8({
|
|
|
11181
11250
|
var useCollapsibleTableContext = () => useContext11(CollapsibleTableContext);
|
|
11182
11251
|
|
|
11183
11252
|
// src/components/Table/normal/Body.tsx
|
|
11184
|
-
import { forwardRef as
|
|
11185
|
-
import { jsx as
|
|
11186
|
-
var Body =
|
|
11253
|
+
import { forwardRef as forwardRef82 } from "react";
|
|
11254
|
+
import { jsx as jsx274 } from "react/jsx-runtime";
|
|
11255
|
+
var Body = forwardRef82(
|
|
11187
11256
|
(props, ref) => {
|
|
11188
|
-
return /* @__PURE__ */
|
|
11257
|
+
return /* @__PURE__ */ jsx274("tbody", { ref, ...props });
|
|
11189
11258
|
}
|
|
11190
11259
|
);
|
|
11191
11260
|
Body.displayName = "Table.Body";
|
|
11192
11261
|
|
|
11193
11262
|
// src/components/Table/normal/Cell.tsx
|
|
11194
11263
|
import {
|
|
11195
|
-
forwardRef as
|
|
11264
|
+
forwardRef as forwardRef84
|
|
11196
11265
|
} from "react";
|
|
11197
11266
|
|
|
11198
11267
|
// src/components/Table/normal/Head.tsx
|
|
11199
11268
|
import {
|
|
11200
11269
|
createContext as createContext9,
|
|
11201
|
-
forwardRef as
|
|
11270
|
+
forwardRef as forwardRef83,
|
|
11202
11271
|
useContext as useContext12
|
|
11203
11272
|
} from "react";
|
|
11204
|
-
import { jsx as
|
|
11205
|
-
var Head =
|
|
11273
|
+
import { jsx as jsx275 } from "react/jsx-runtime";
|
|
11274
|
+
var Head = forwardRef83(
|
|
11206
11275
|
({ children, ...rest }, ref) => {
|
|
11207
|
-
return /* @__PURE__ */
|
|
11276
|
+
return /* @__PURE__ */ jsx275("thead", { ref, ...rest, children: /* @__PURE__ */ jsx275(HeadContext.Provider, { value: true, children }) });
|
|
11208
11277
|
}
|
|
11209
11278
|
);
|
|
11210
11279
|
Head.displayName = "Table.Head";
|
|
@@ -11240,8 +11309,8 @@ var Table_default = {
|
|
|
11240
11309
|
};
|
|
11241
11310
|
|
|
11242
11311
|
// src/components/Table/normal/Cell.tsx
|
|
11243
|
-
import { jsx as
|
|
11244
|
-
var Cell =
|
|
11312
|
+
import { jsx as jsx276 } from "react/jsx-runtime";
|
|
11313
|
+
var Cell = forwardRef84(
|
|
11245
11314
|
({
|
|
11246
11315
|
children,
|
|
11247
11316
|
type: _type,
|
|
@@ -11254,7 +11323,7 @@ var Cell = forwardRef83(
|
|
|
11254
11323
|
const type = _type != null ? _type : isInHead ? "head" : "data";
|
|
11255
11324
|
const { isCollapsibleChild } = collapsibleProps != null ? collapsibleProps : {};
|
|
11256
11325
|
const isComplexLayout = layout === "text and icon";
|
|
11257
|
-
return isCollapsibleChild ? /* @__PURE__ */
|
|
11326
|
+
return isCollapsibleChild ? /* @__PURE__ */ jsx276(DescriptionListDesc, { children }) : type === "head" ? /* @__PURE__ */ jsx276(
|
|
11258
11327
|
"th",
|
|
11259
11328
|
{
|
|
11260
11329
|
ref,
|
|
@@ -11264,15 +11333,15 @@ var Cell = forwardRef83(
|
|
|
11264
11333
|
!isComplexLayout && Table_default[`cell--${layout}`],
|
|
11265
11334
|
Table_default["cell--head"]
|
|
11266
11335
|
),
|
|
11267
|
-
children: isComplexLayout ? /* @__PURE__ */
|
|
11336
|
+
children: isComplexLayout ? /* @__PURE__ */ jsx276("div", { className: Table_default.cell__inner, children }) : children
|
|
11268
11337
|
}
|
|
11269
|
-
) : /* @__PURE__ */
|
|
11338
|
+
) : /* @__PURE__ */ jsx276(
|
|
11270
11339
|
"td",
|
|
11271
11340
|
{
|
|
11272
11341
|
ref,
|
|
11273
11342
|
...rest,
|
|
11274
11343
|
className: cn(className, !isComplexLayout && Table_default[`cell--${layout}`]),
|
|
11275
|
-
children: isComplexLayout ? /* @__PURE__ */
|
|
11344
|
+
children: isComplexLayout ? /* @__PURE__ */ jsx276("div", { className: Table_default.cell__inner, children }) : children
|
|
11276
11345
|
}
|
|
11277
11346
|
);
|
|
11278
11347
|
}
|
|
@@ -11280,23 +11349,23 @@ var Cell = forwardRef83(
|
|
|
11280
11349
|
Cell.displayName = "Table.Cell";
|
|
11281
11350
|
|
|
11282
11351
|
// src/components/Table/normal/Foot.tsx
|
|
11283
|
-
import { forwardRef as
|
|
11284
|
-
import { jsx as
|
|
11285
|
-
var Foot =
|
|
11352
|
+
import { forwardRef as forwardRef85 } from "react";
|
|
11353
|
+
import { jsx as jsx277 } from "react/jsx-runtime";
|
|
11354
|
+
var Foot = forwardRef85(
|
|
11286
11355
|
(props, ref) => {
|
|
11287
|
-
return /* @__PURE__ */
|
|
11356
|
+
return /* @__PURE__ */ jsx277("tfoot", { ref, ...props });
|
|
11288
11357
|
}
|
|
11289
11358
|
);
|
|
11290
11359
|
Foot.displayName = "Table.Foot";
|
|
11291
11360
|
|
|
11292
11361
|
// src/components/Table/normal/Row.tsx
|
|
11293
|
-
import { forwardRef as
|
|
11294
|
-
import { jsx as
|
|
11295
|
-
var Row =
|
|
11362
|
+
import { forwardRef as forwardRef86 } from "react";
|
|
11363
|
+
import { jsx as jsx278 } from "react/jsx-runtime";
|
|
11364
|
+
var Row = forwardRef86(
|
|
11296
11365
|
({ type: _type, mode = "normal", hoverable, selected, className, ...rest }, ref) => {
|
|
11297
11366
|
const isInHeader = useIsInTableHead();
|
|
11298
11367
|
const type = _type != null ? _type : isInHeader ? "head" : "body";
|
|
11299
|
-
return /* @__PURE__ */
|
|
11368
|
+
return /* @__PURE__ */ jsx278(
|
|
11300
11369
|
"tr",
|
|
11301
11370
|
{
|
|
11302
11371
|
ref,
|
|
@@ -11319,16 +11388,16 @@ var Row = forwardRef85(
|
|
|
11319
11388
|
Row.displayName = "Table.Row";
|
|
11320
11389
|
|
|
11321
11390
|
// src/components/Table/normal/SortCell.tsx
|
|
11322
|
-
import { forwardRef as
|
|
11323
|
-
import { jsx as
|
|
11391
|
+
import { forwardRef as forwardRef87 } from "react";
|
|
11392
|
+
import { jsx as jsx279, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
11324
11393
|
var makeSortIcon = (isSorted, sortOrder) => {
|
|
11325
11394
|
if (!isSorted || !sortOrder) {
|
|
11326
|
-
return /* @__PURE__ */
|
|
11395
|
+
return /* @__PURE__ */ jsx279(Icon, { icon: UnfoldMoreIcon, iconSize: "inherit" });
|
|
11327
11396
|
}
|
|
11328
|
-
return sortOrder === "ascending" ? /* @__PURE__ */
|
|
11397
|
+
return sortOrder === "ascending" ? /* @__PURE__ */ jsx279(Icon, { icon: ChevronDownIcon, iconSize: "inherit" }) : /* @__PURE__ */ jsx279(Icon, { icon: ChevronUpIcon, iconSize: "inherit" });
|
|
11329
11398
|
};
|
|
11330
|
-
var SortCell =
|
|
11331
|
-
({ isSorted, sortOrder, onClick, children, ...rest }, ref) => /* @__PURE__ */
|
|
11399
|
+
var SortCell = forwardRef87(
|
|
11400
|
+
({ isSorted, sortOrder, onClick, children, ...rest }, ref) => /* @__PURE__ */ jsx279(
|
|
11332
11401
|
Cell,
|
|
11333
11402
|
{
|
|
11334
11403
|
ref,
|
|
@@ -11359,8 +11428,8 @@ var SortCell = forwardRef86(
|
|
|
11359
11428
|
SortCell.displayName = "Table.SortCell";
|
|
11360
11429
|
|
|
11361
11430
|
// src/components/Table/normal/Table.tsx
|
|
11362
|
-
import { forwardRef as
|
|
11363
|
-
import { jsx as
|
|
11431
|
+
import { forwardRef as forwardRef88 } from "react";
|
|
11432
|
+
import { jsx as jsx280 } from "react/jsx-runtime";
|
|
11364
11433
|
function getDensityCn(value) {
|
|
11365
11434
|
switch (value) {
|
|
11366
11435
|
case "normal":
|
|
@@ -11370,7 +11439,7 @@ function getDensityCn(value) {
|
|
|
11370
11439
|
return "extra-compact";
|
|
11371
11440
|
}
|
|
11372
11441
|
}
|
|
11373
|
-
var Table =
|
|
11442
|
+
var Table = forwardRef88(
|
|
11374
11443
|
({
|
|
11375
11444
|
density = "normal",
|
|
11376
11445
|
stickyHeader,
|
|
@@ -11379,7 +11448,7 @@ var Table = forwardRef87(
|
|
|
11379
11448
|
children,
|
|
11380
11449
|
...rest
|
|
11381
11450
|
}, ref) => {
|
|
11382
|
-
return /* @__PURE__ */
|
|
11451
|
+
return /* @__PURE__ */ jsx280(
|
|
11383
11452
|
"table",
|
|
11384
11453
|
{
|
|
11385
11454
|
ref,
|
|
@@ -11401,7 +11470,7 @@ Table.displayName = "Table";
|
|
|
11401
11470
|
|
|
11402
11471
|
// src/components/Table/normal/TableWrapper.tsx
|
|
11403
11472
|
import { useEffect as useEffect26, useRef as useRef30, useState as useState26 } from "react";
|
|
11404
|
-
import { jsx as
|
|
11473
|
+
import { jsx as jsx281 } from "react/jsx-runtime";
|
|
11405
11474
|
var TableWrapper = ({ className, ...rest }) => {
|
|
11406
11475
|
const [overflowX, setOverflowX] = useState26(false);
|
|
11407
11476
|
const [windowWidth, setWindowWidth] = useState26(window.innerWidth);
|
|
@@ -11423,7 +11492,7 @@ var TableWrapper = ({ className, ...rest }) => {
|
|
|
11423
11492
|
window.addEventListener("resize", handleResize);
|
|
11424
11493
|
return () => window.removeEventListener("resize", handleResize);
|
|
11425
11494
|
});
|
|
11426
|
-
return /* @__PURE__ */
|
|
11495
|
+
return /* @__PURE__ */ jsx281(
|
|
11427
11496
|
"div",
|
|
11428
11497
|
{
|
|
11429
11498
|
ref: wrapperRef,
|
|
@@ -11450,8 +11519,8 @@ Table2.Row = Row;
|
|
|
11450
11519
|
Table2.Foot = Foot;
|
|
11451
11520
|
|
|
11452
11521
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
11453
|
-
import { Fragment as Fragment14, jsx as
|
|
11454
|
-
var CollapsibleRow =
|
|
11522
|
+
import { Fragment as Fragment14, jsx as jsx282, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
11523
|
+
var CollapsibleRow = forwardRef89(
|
|
11455
11524
|
({
|
|
11456
11525
|
type: _type,
|
|
11457
11526
|
className,
|
|
@@ -11493,23 +11562,23 @@ var CollapsibleRow = forwardRef88(
|
|
|
11493
11562
|
const id = derivativeIdGenerator(prefix3, index.toString());
|
|
11494
11563
|
collapsibleIds.push(id);
|
|
11495
11564
|
return /* @__PURE__ */ jsxs72(Fragment13, { children: [
|
|
11496
|
-
/* @__PURE__ */
|
|
11565
|
+
/* @__PURE__ */ jsx282(DescriptionListTerm, { children: collapsedHeaderValues[index].content }),
|
|
11497
11566
|
isValidElement9(child) && cloneElement8(child, {
|
|
11498
11567
|
collapsibleProps: { isCollapsibleChild: true }
|
|
11499
11568
|
})
|
|
11500
11569
|
] }, `DL-${index}`);
|
|
11501
11570
|
}) : null;
|
|
11502
|
-
const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */
|
|
11571
|
+
const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsx282(Row, { ...rowProps(), children: /* @__PURE__ */ jsx282(Cell, { colSpan: definingColumnIndex.length + 1, children: /* @__PURE__ */ jsx282(DescriptionList, { children: collapsedRenderedChildren }) }) }) : null;
|
|
11503
11572
|
const definingColumnCells = childrenArray.slice().filter((column2, index) => definingColumnIndex.indexOf(index) > -1).sort((a2, b) => {
|
|
11504
11573
|
return definingColumnIndex.indexOf(childrenArray.indexOf(a2)) - definingColumnIndex.indexOf(childrenArray.indexOf(b));
|
|
11505
11574
|
});
|
|
11506
11575
|
const headerRow = () => {
|
|
11507
11576
|
if (type !== "head" || !isCollapsed) return null;
|
|
11508
|
-
return /* @__PURE__ */
|
|
11577
|
+
return /* @__PURE__ */ jsx282(Row, { ref, ...rowProps(), children: /* @__PURE__ */ jsxs72(Fragment14, { children: [
|
|
11509
11578
|
definingColumnCells,
|
|
11510
11579
|
/* @__PURE__ */ jsxs72(Table2.Cell, { type: "head", layout: "center", children: [
|
|
11511
11580
|
"Utvid",
|
|
11512
|
-
/* @__PURE__ */
|
|
11581
|
+
/* @__PURE__ */ jsx282(VisuallyHidden, { as: "span", children: "raden" })
|
|
11513
11582
|
] })
|
|
11514
11583
|
] }) });
|
|
11515
11584
|
};
|
|
@@ -11518,7 +11587,7 @@ var CollapsibleRow = forwardRef88(
|
|
|
11518
11587
|
if (type !== "body" || !isCollapsed) return null;
|
|
11519
11588
|
return /* @__PURE__ */ jsxs72(Row, { ref, ...rowProps(!childrenCollapsed && true), children: [
|
|
11520
11589
|
definingColumnCells,
|
|
11521
|
-
/* @__PURE__ */
|
|
11590
|
+
/* @__PURE__ */ jsx282(Table2.Cell, { children: /* @__PURE__ */ jsx282(
|
|
11522
11591
|
"button",
|
|
11523
11592
|
{
|
|
11524
11593
|
onClick: () => setChildrenCollapsed(!childrenCollapsed),
|
|
@@ -11530,7 +11599,7 @@ var CollapsibleRow = forwardRef88(
|
|
|
11530
11599
|
utilStyles_default["remove-button-styling"],
|
|
11531
11600
|
focusable
|
|
11532
11601
|
),
|
|
11533
|
-
children: /* @__PURE__ */
|
|
11602
|
+
children: /* @__PURE__ */ jsx282(
|
|
11534
11603
|
AnimatedChevronUpDown,
|
|
11535
11604
|
{
|
|
11536
11605
|
isUp: childrenCollapsed ? false : true,
|
|
@@ -11548,22 +11617,22 @@ var CollapsibleRow = forwardRef88(
|
|
|
11548
11617
|
rowWithChevron(),
|
|
11549
11618
|
childrenCollapsed ? null : collapsedRows
|
|
11550
11619
|
] })
|
|
11551
|
-
] }) : /* @__PURE__ */
|
|
11620
|
+
] }) : /* @__PURE__ */ jsx282(Row, { ref, ...rowProps(), children });
|
|
11552
11621
|
}
|
|
11553
11622
|
);
|
|
11554
11623
|
CollapsibleRow.displayName = "CollapsibleTable.Row";
|
|
11555
11624
|
|
|
11556
11625
|
// src/components/Table/collapsible/CollapsibleTable.tsx
|
|
11557
|
-
import { forwardRef as
|
|
11558
|
-
import { jsx as
|
|
11559
|
-
var CollapsibleTable =
|
|
11626
|
+
import { forwardRef as forwardRef90 } from "react";
|
|
11627
|
+
import { jsx as jsx283 } from "react/jsx-runtime";
|
|
11628
|
+
var CollapsibleTable = forwardRef90((props, ref) => {
|
|
11560
11629
|
const {
|
|
11561
11630
|
isCollapsed,
|
|
11562
11631
|
headerValues,
|
|
11563
11632
|
definingColumnIndex = [0],
|
|
11564
11633
|
...rest
|
|
11565
11634
|
} = props;
|
|
11566
|
-
return /* @__PURE__ */
|
|
11635
|
+
return /* @__PURE__ */ jsx283(
|
|
11567
11636
|
CollapsibleTableContext.Provider,
|
|
11568
11637
|
{
|
|
11569
11638
|
value: {
|
|
@@ -11571,7 +11640,7 @@ var CollapsibleTable = forwardRef89((props, ref) => {
|
|
|
11571
11640
|
headerValues,
|
|
11572
11641
|
definingColumnIndex
|
|
11573
11642
|
},
|
|
11574
|
-
children: /* @__PURE__ */
|
|
11643
|
+
children: /* @__PURE__ */ jsx283(Table2, { ref, ...rest })
|
|
11575
11644
|
}
|
|
11576
11645
|
);
|
|
11577
11646
|
});
|
|
@@ -11583,7 +11652,7 @@ CollapsibleTable2.Row = CollapsibleRow;
|
|
|
11583
11652
|
|
|
11584
11653
|
// src/components/Tabs/Tabs.tsx
|
|
11585
11654
|
import {
|
|
11586
|
-
forwardRef as
|
|
11655
|
+
forwardRef as forwardRef91,
|
|
11587
11656
|
useEffect as useEffect28,
|
|
11588
11657
|
useId as useId23,
|
|
11589
11658
|
useRef as useRef31,
|
|
@@ -11619,8 +11688,8 @@ var Tabs_default = {
|
|
|
11619
11688
|
};
|
|
11620
11689
|
|
|
11621
11690
|
// src/components/Tabs/Tabs.tsx
|
|
11622
|
-
import { jsx as
|
|
11623
|
-
var Tabs =
|
|
11691
|
+
import { jsx as jsx284 } from "react/jsx-runtime";
|
|
11692
|
+
var Tabs = forwardRef91((props, ref) => {
|
|
11624
11693
|
const {
|
|
11625
11694
|
id,
|
|
11626
11695
|
activeTab,
|
|
@@ -11651,7 +11720,7 @@ var Tabs = forwardRef90((props, ref) => {
|
|
|
11651
11720
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11652
11721
|
["--dds-tabs-width"]: width
|
|
11653
11722
|
};
|
|
11654
|
-
return /* @__PURE__ */
|
|
11723
|
+
return /* @__PURE__ */ jsx284(
|
|
11655
11724
|
TabsContext.Provider,
|
|
11656
11725
|
{
|
|
11657
11726
|
value: {
|
|
@@ -11664,7 +11733,7 @@ var Tabs = forwardRef90((props, ref) => {
|
|
|
11664
11733
|
setHasTabFocus,
|
|
11665
11734
|
tabContentDirection
|
|
11666
11735
|
},
|
|
11667
|
-
children: /* @__PURE__ */
|
|
11736
|
+
children: /* @__PURE__ */ jsx284(
|
|
11668
11737
|
"div",
|
|
11669
11738
|
{
|
|
11670
11739
|
ref,
|
|
@@ -11685,7 +11754,7 @@ Tabs.displayName = "Tabs";
|
|
|
11685
11754
|
|
|
11686
11755
|
// src/components/Tabs/Tab.tsx
|
|
11687
11756
|
import {
|
|
11688
|
-
forwardRef as
|
|
11757
|
+
forwardRef as forwardRef92,
|
|
11689
11758
|
useCallback as useCallback7,
|
|
11690
11759
|
useEffect as useEffect29,
|
|
11691
11760
|
useRef as useRef32
|
|
@@ -11697,13 +11766,13 @@ import {
|
|
|
11697
11766
|
useContext as useContext14,
|
|
11698
11767
|
useLayoutEffect as useLayoutEffect2
|
|
11699
11768
|
} from "react";
|
|
11700
|
-
import { jsx as
|
|
11769
|
+
import { jsx as jsx285 } from "react/jsx-runtime";
|
|
11701
11770
|
var TabContext = createContext11(null);
|
|
11702
11771
|
function TabWidthContextProvider({
|
|
11703
11772
|
children,
|
|
11704
11773
|
onChangeWidths
|
|
11705
11774
|
}) {
|
|
11706
|
-
return /* @__PURE__ */
|
|
11775
|
+
return /* @__PURE__ */ jsx285(
|
|
11707
11776
|
TabContext.Provider,
|
|
11708
11777
|
{
|
|
11709
11778
|
value: {
|
|
@@ -11735,8 +11804,8 @@ function useSetTabWidth(index, width) {
|
|
|
11735
11804
|
}
|
|
11736
11805
|
|
|
11737
11806
|
// src/components/Tabs/Tab.tsx
|
|
11738
|
-
import { jsx as
|
|
11739
|
-
var Tab =
|
|
11807
|
+
import { jsx as jsx286, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
11808
|
+
var Tab = forwardRef92((props, ref) => {
|
|
11740
11809
|
const {
|
|
11741
11810
|
active = false,
|
|
11742
11811
|
icon,
|
|
@@ -11798,8 +11867,8 @@ var Tab = forwardRef91((props, ref) => {
|
|
|
11798
11867
|
onKeyDown: handleOnKeyDown,
|
|
11799
11868
|
tabIndex: focus ? 0 : -1,
|
|
11800
11869
|
children: [
|
|
11801
|
-
icon && /* @__PURE__ */
|
|
11802
|
-
/* @__PURE__ */
|
|
11870
|
+
icon && /* @__PURE__ */ jsx286(Icon, { icon, iconSize: "inherit" }),
|
|
11871
|
+
/* @__PURE__ */ jsx286("span", { children })
|
|
11803
11872
|
]
|
|
11804
11873
|
}
|
|
11805
11874
|
);
|
|
@@ -11810,12 +11879,12 @@ Tab.displayName = "Tab";
|
|
|
11810
11879
|
import {
|
|
11811
11880
|
Children as Children6,
|
|
11812
11881
|
cloneElement as cloneElement9,
|
|
11813
|
-
forwardRef as
|
|
11882
|
+
forwardRef as forwardRef93,
|
|
11814
11883
|
isValidElement as isValidElement10,
|
|
11815
11884
|
useState as useState29
|
|
11816
11885
|
} from "react";
|
|
11817
|
-
import { jsx as
|
|
11818
|
-
var TabList =
|
|
11886
|
+
import { jsx as jsx287 } from "react/jsx-runtime";
|
|
11887
|
+
var TabList = forwardRef93(
|
|
11819
11888
|
({ children, id, style, onFocus, ...rest }, ref) => {
|
|
11820
11889
|
const {
|
|
11821
11890
|
activeTab,
|
|
@@ -11858,7 +11927,7 @@ var TabList = forwardRef92(
|
|
|
11858
11927
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11859
11928
|
["--dds-tab-widths"]: widths.join(" ")
|
|
11860
11929
|
};
|
|
11861
|
-
return /* @__PURE__ */
|
|
11930
|
+
return /* @__PURE__ */ jsx287(TabWidthContextProvider, { onChangeWidths: setWidths, children: /* @__PURE__ */ jsx287(
|
|
11862
11931
|
"div",
|
|
11863
11932
|
{
|
|
11864
11933
|
...rest,
|
|
@@ -11884,11 +11953,11 @@ var TabList = forwardRef92(
|
|
|
11884
11953
|
TabList.displayName = "TabList";
|
|
11885
11954
|
|
|
11886
11955
|
// src/components/Tabs/TabPanel.tsx
|
|
11887
|
-
import { forwardRef as
|
|
11888
|
-
import { jsx as
|
|
11889
|
-
var TabPanel =
|
|
11956
|
+
import { forwardRef as forwardRef94 } from "react";
|
|
11957
|
+
import { jsx as jsx288 } from "react/jsx-runtime";
|
|
11958
|
+
var TabPanel = forwardRef94(
|
|
11890
11959
|
({ active = false, children, id, className, htmlProps, ...rest }, ref) => {
|
|
11891
|
-
return /* @__PURE__ */
|
|
11960
|
+
return /* @__PURE__ */ jsx288(
|
|
11892
11961
|
"div",
|
|
11893
11962
|
{
|
|
11894
11963
|
...getBaseHTMLProps(
|
|
@@ -11916,11 +11985,11 @@ TabPanel.displayName = "TabPanel";
|
|
|
11916
11985
|
import {
|
|
11917
11986
|
Children as Children7,
|
|
11918
11987
|
cloneElement as cloneElement10,
|
|
11919
|
-
forwardRef as
|
|
11988
|
+
forwardRef as forwardRef95,
|
|
11920
11989
|
isValidElement as isValidElement11
|
|
11921
11990
|
} from "react";
|
|
11922
|
-
import { jsx as
|
|
11923
|
-
var TabPanels =
|
|
11991
|
+
import { jsx as jsx289 } from "react/jsx-runtime";
|
|
11992
|
+
var TabPanels = forwardRef95(
|
|
11924
11993
|
({ children, ...rest }, ref) => {
|
|
11925
11994
|
const { activeTab, tabsId, tabPanelsRef } = useTabsContext();
|
|
11926
11995
|
const combinedRef = useCombinedRef(ref, tabPanelsRef);
|
|
@@ -11933,13 +12002,13 @@ var TabPanels = forwardRef94(
|
|
|
11933
12002
|
"aria-expanded": active
|
|
11934
12003
|
});
|
|
11935
12004
|
});
|
|
11936
|
-
return /* @__PURE__ */
|
|
12005
|
+
return /* @__PURE__ */ jsx289("div", { ref: combinedRef, ...rest, children: panelChildren });
|
|
11937
12006
|
}
|
|
11938
12007
|
);
|
|
11939
12008
|
TabPanels.displayName = "TabPanels";
|
|
11940
12009
|
|
|
11941
12010
|
// src/components/Tag/Tag.tsx
|
|
11942
|
-
import { forwardRef as
|
|
12011
|
+
import { forwardRef as forwardRef96 } from "react";
|
|
11943
12012
|
|
|
11944
12013
|
// src/components/Tag/Tag.module.css
|
|
11945
12014
|
var Tag_default = {
|
|
@@ -11958,7 +12027,7 @@ var Tag_default = {
|
|
|
11958
12027
|
};
|
|
11959
12028
|
|
|
11960
12029
|
// src/components/Tag/Tag.tsx
|
|
11961
|
-
import { jsx as
|
|
12030
|
+
import { jsx as jsx290, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
11962
12031
|
var icons3 = {
|
|
11963
12032
|
info: InfoIcon,
|
|
11964
12033
|
danger: ErrorIcon,
|
|
@@ -11966,7 +12035,7 @@ var icons3 = {
|
|
|
11966
12035
|
success: CheckCircledIcon,
|
|
11967
12036
|
default: void 0
|
|
11968
12037
|
};
|
|
11969
|
-
var Tag =
|
|
12038
|
+
var Tag = forwardRef96((props, ref) => {
|
|
11970
12039
|
const {
|
|
11971
12040
|
text,
|
|
11972
12041
|
purpose = "default",
|
|
@@ -11996,8 +12065,8 @@ var Tag = forwardRef95((props, ref) => {
|
|
|
11996
12065
|
),
|
|
11997
12066
|
ref,
|
|
11998
12067
|
children: [
|
|
11999
|
-
withIcon && icon && /* @__PURE__ */
|
|
12000
|
-
/* @__PURE__ */
|
|
12068
|
+
withIcon && icon && /* @__PURE__ */ jsx290(Icon, { icon, iconSize: "small" }),
|
|
12069
|
+
/* @__PURE__ */ jsx290(TextOverflowEllipsisInner, { children: children != null ? children : text })
|
|
12001
12070
|
]
|
|
12002
12071
|
}
|
|
12003
12072
|
);
|
|
@@ -12007,7 +12076,7 @@ Tag.displayName = "Tag";
|
|
|
12007
12076
|
// src/components/TextInput/TextInput.tsx
|
|
12008
12077
|
import { ddsTokens as ddsTokens15 } from "@norges-domstoler/dds-design-tokens";
|
|
12009
12078
|
import {
|
|
12010
|
-
forwardRef as
|
|
12079
|
+
forwardRef as forwardRef97,
|
|
12011
12080
|
useId as useId24,
|
|
12012
12081
|
useLayoutEffect as useLayoutEffect3,
|
|
12013
12082
|
useRef as useRef33,
|
|
@@ -12027,7 +12096,6 @@ var TextInput_default = {
|
|
|
12027
12096
|
"with-icon--small": "TextInput_with-icon--small",
|
|
12028
12097
|
"with-icon--tiny": "TextInput_with-icon--tiny",
|
|
12029
12098
|
"input--extended": "TextInput_input--extended",
|
|
12030
|
-
icon: "TextInput_icon",
|
|
12031
12099
|
"icon--medium": "TextInput_icon--medium",
|
|
12032
12100
|
"icon--small": "TextInput_icon--small",
|
|
12033
12101
|
"icon--tiny": "TextInput_icon--tiny",
|
|
@@ -12040,8 +12108,8 @@ var TextInput_default = {
|
|
|
12040
12108
|
};
|
|
12041
12109
|
|
|
12042
12110
|
// src/components/TextInput/TextInput.tsx
|
|
12043
|
-
import { jsx as
|
|
12044
|
-
var TextInput =
|
|
12111
|
+
import { jsx as jsx291, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
12112
|
+
var TextInput = forwardRef97(
|
|
12045
12113
|
({
|
|
12046
12114
|
label,
|
|
12047
12115
|
disabled,
|
|
@@ -12136,15 +12204,15 @@ var TextInput = forwardRef96(
|
|
|
12136
12204
|
className: cn(TextInput_default["input-width"], Input_default["input-group"]),
|
|
12137
12205
|
style: styleVariables,
|
|
12138
12206
|
children: [
|
|
12139
|
-
/* @__PURE__ */
|
|
12207
|
+
/* @__PURE__ */ jsx291(
|
|
12140
12208
|
Icon,
|
|
12141
12209
|
{
|
|
12142
12210
|
icon,
|
|
12143
12211
|
iconSize: getFormInputIconSize(componentSize),
|
|
12144
|
-
className: cn(
|
|
12212
|
+
className: cn(Input_default.icon, TextInput_default[`icon--${componentSize}`])
|
|
12145
12213
|
}
|
|
12146
12214
|
),
|
|
12147
|
-
/* @__PURE__ */
|
|
12215
|
+
/* @__PURE__ */ jsx291(
|
|
12148
12216
|
StatefulInput,
|
|
12149
12217
|
{
|
|
12150
12218
|
ref,
|
|
@@ -12169,7 +12237,7 @@ var TextInput = forwardRef96(
|
|
|
12169
12237
|
className: cn(TextInput_default["affix-container"], TextInput_default["input-width"]),
|
|
12170
12238
|
style: styleVariables,
|
|
12171
12239
|
children: [
|
|
12172
|
-
prefix3 && /* @__PURE__ */
|
|
12240
|
+
prefix3 && /* @__PURE__ */ jsx291(
|
|
12173
12241
|
"span",
|
|
12174
12242
|
{
|
|
12175
12243
|
ref: prefixRef,
|
|
@@ -12182,7 +12250,7 @@ var TextInput = forwardRef96(
|
|
|
12182
12250
|
children: prefix3
|
|
12183
12251
|
}
|
|
12184
12252
|
),
|
|
12185
|
-
/* @__PURE__ */
|
|
12253
|
+
/* @__PURE__ */ jsx291(
|
|
12186
12254
|
StatefulInput,
|
|
12187
12255
|
{
|
|
12188
12256
|
ref,
|
|
@@ -12197,7 +12265,7 @@ var TextInput = forwardRef96(
|
|
|
12197
12265
|
className: TextInput_default["input--extended"]
|
|
12198
12266
|
}
|
|
12199
12267
|
),
|
|
12200
|
-
suffix && /* @__PURE__ */
|
|
12268
|
+
suffix && /* @__PURE__ */ jsx291(
|
|
12201
12269
|
"span",
|
|
12202
12270
|
{
|
|
12203
12271
|
ref: suffixRef,
|
|
@@ -12226,7 +12294,7 @@ var TextInput = forwardRef96(
|
|
|
12226
12294
|
),
|
|
12227
12295
|
style,
|
|
12228
12296
|
children: [
|
|
12229
|
-
hasLabel && /* @__PURE__ */
|
|
12297
|
+
hasLabel && /* @__PURE__ */ jsx291(
|
|
12230
12298
|
Label,
|
|
12231
12299
|
{
|
|
12232
12300
|
htmlFor: uniqueId,
|
|
@@ -12236,7 +12304,7 @@ var TextInput = forwardRef96(
|
|
|
12236
12304
|
children: label
|
|
12237
12305
|
}
|
|
12238
12306
|
),
|
|
12239
|
-
extendedInput ? extendedInput : /* @__PURE__ */
|
|
12307
|
+
extendedInput ? extendedInput : /* @__PURE__ */ jsx291(
|
|
12240
12308
|
StatefulInput,
|
|
12241
12309
|
{
|
|
12242
12310
|
ref,
|
|
@@ -12291,7 +12359,7 @@ var ToggleBar_default = {
|
|
|
12291
12359
|
};
|
|
12292
12360
|
|
|
12293
12361
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
12294
|
-
import { jsx as
|
|
12362
|
+
import { jsx as jsx292, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
12295
12363
|
var ToggleBar = (props) => {
|
|
12296
12364
|
const {
|
|
12297
12365
|
children,
|
|
@@ -12314,7 +12382,7 @@ var ToggleBar = (props) => {
|
|
|
12314
12382
|
(e) => onChange && onChange(e, e.target.value)
|
|
12315
12383
|
);
|
|
12316
12384
|
const labelId = label && `${uniqueId}-label`;
|
|
12317
|
-
return /* @__PURE__ */
|
|
12385
|
+
return /* @__PURE__ */ jsx292(
|
|
12318
12386
|
ToggleBarContext.Provider,
|
|
12319
12387
|
{
|
|
12320
12388
|
value: {
|
|
@@ -12336,8 +12404,8 @@ var ToggleBar = (props) => {
|
|
|
12336
12404
|
role: "radiogroup",
|
|
12337
12405
|
"aria-labelledby": labelId != null ? labelId : htmlProps == null ? void 0 : htmlProps["aria-labelledby"],
|
|
12338
12406
|
children: [
|
|
12339
|
-
label && /* @__PURE__ */
|
|
12340
|
-
/* @__PURE__ */
|
|
12407
|
+
label && /* @__PURE__ */ jsx292(Label, { id: labelId, children: label }),
|
|
12408
|
+
/* @__PURE__ */ jsx292("div", { className: ToggleBar_default.bar, children })
|
|
12341
12409
|
]
|
|
12342
12410
|
}
|
|
12343
12411
|
)
|
|
@@ -12348,10 +12416,10 @@ ToggleBar.displayName = "ToggleBar";
|
|
|
12348
12416
|
|
|
12349
12417
|
// src/components/ToggleBar/ToggleRadio.tsx
|
|
12350
12418
|
import {
|
|
12351
|
-
forwardRef as
|
|
12419
|
+
forwardRef as forwardRef98,
|
|
12352
12420
|
useId as useId26
|
|
12353
12421
|
} from "react";
|
|
12354
|
-
import { jsx as
|
|
12422
|
+
import { jsx as jsx293, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
12355
12423
|
var typographyTypes4 = {
|
|
12356
12424
|
large: "bodySans04",
|
|
12357
12425
|
medium: "bodySans02",
|
|
@@ -12368,7 +12436,7 @@ var calculateChecked = (value, group, checked) => {
|
|
|
12368
12436
|
}
|
|
12369
12437
|
return !!value;
|
|
12370
12438
|
};
|
|
12371
|
-
var ToggleRadio =
|
|
12439
|
+
var ToggleRadio = forwardRef98(
|
|
12372
12440
|
(props, ref) => {
|
|
12373
12441
|
const {
|
|
12374
12442
|
value,
|
|
@@ -12393,7 +12461,7 @@ var ToggleRadio = forwardRef97(
|
|
|
12393
12461
|
};
|
|
12394
12462
|
const contentTypeCn = label ? "with-text" : "just-icon";
|
|
12395
12463
|
return /* @__PURE__ */ jsxs77("label", { htmlFor: uniqueId, className: ToggleBar_default.label, children: [
|
|
12396
|
-
/* @__PURE__ */
|
|
12464
|
+
/* @__PURE__ */ jsx293(
|
|
12397
12465
|
"input",
|
|
12398
12466
|
{
|
|
12399
12467
|
...getBaseHTMLProps(
|
|
@@ -12427,8 +12495,8 @@ var ToggleRadio = forwardRef97(
|
|
|
12427
12495
|
focus_default["focus-styled-sibling"]
|
|
12428
12496
|
),
|
|
12429
12497
|
children: [
|
|
12430
|
-
icon && /* @__PURE__ */
|
|
12431
|
-
label && /* @__PURE__ */
|
|
12498
|
+
icon && /* @__PURE__ */ jsx293(Icon, { icon, iconSize: "inherit" }),
|
|
12499
|
+
label && /* @__PURE__ */ jsx293("span", { children: label })
|
|
12432
12500
|
]
|
|
12433
12501
|
}
|
|
12434
12502
|
)
|
|
@@ -12438,7 +12506,7 @@ var ToggleRadio = forwardRef97(
|
|
|
12438
12506
|
ToggleRadio.displayName = "ToggleRadio";
|
|
12439
12507
|
|
|
12440
12508
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
12441
|
-
import { forwardRef as
|
|
12509
|
+
import { forwardRef as forwardRef99, useId as useId27 } from "react";
|
|
12442
12510
|
|
|
12443
12511
|
// src/components/ToggleButton/ToggleButton.module.css
|
|
12444
12512
|
var ToggleButton_default = {
|
|
@@ -12451,13 +12519,13 @@ var ToggleButton_default = {
|
|
|
12451
12519
|
};
|
|
12452
12520
|
|
|
12453
12521
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
12454
|
-
import { jsx as
|
|
12455
|
-
var ToggleButton =
|
|
12522
|
+
import { jsx as jsx294, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
12523
|
+
var ToggleButton = forwardRef99(
|
|
12456
12524
|
({ id, label, icon, className, htmlProps, ...rest }, ref) => {
|
|
12457
12525
|
const generatedId = useId27();
|
|
12458
12526
|
const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
|
|
12459
12527
|
return /* @__PURE__ */ jsxs78("label", { htmlFor: uniqueId, className: ToggleButton_default.container, children: [
|
|
12460
|
-
/* @__PURE__ */
|
|
12528
|
+
/* @__PURE__ */ jsx294(
|
|
12461
12529
|
"input",
|
|
12462
12530
|
{
|
|
12463
12531
|
...getBaseHTMLProps(
|
|
@@ -12483,7 +12551,7 @@ var ToggleButton = forwardRef98(
|
|
|
12483
12551
|
focus_default["focus-styled-sibling"]
|
|
12484
12552
|
),
|
|
12485
12553
|
children: [
|
|
12486
|
-
icon && /* @__PURE__ */
|
|
12554
|
+
icon && /* @__PURE__ */ jsx294(Icon, { icon, iconSize: "inherit" }),
|
|
12487
12555
|
" ",
|
|
12488
12556
|
label
|
|
12489
12557
|
]
|
|
@@ -12496,7 +12564,7 @@ ToggleButton.displayName = "ToggleButton";
|
|
|
12496
12564
|
|
|
12497
12565
|
// src/components/ToggleButton/ToggleButtonGroup.tsx
|
|
12498
12566
|
import { useId as useId28 } from "react";
|
|
12499
|
-
import { jsx as
|
|
12567
|
+
import { jsx as jsx295, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
12500
12568
|
var ToggleButtonGroup = (props) => {
|
|
12501
12569
|
const {
|
|
12502
12570
|
children,
|
|
@@ -12522,7 +12590,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
12522
12590
|
role: "group",
|
|
12523
12591
|
"aria-labelledby": label ? uniqueLabelId : void 0,
|
|
12524
12592
|
children: [
|
|
12525
|
-
!!label && /* @__PURE__ */
|
|
12593
|
+
!!label && /* @__PURE__ */ jsx295(
|
|
12526
12594
|
Typography,
|
|
12527
12595
|
{
|
|
12528
12596
|
as: "span",
|
|
@@ -12531,7 +12599,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
12531
12599
|
children: label
|
|
12532
12600
|
}
|
|
12533
12601
|
),
|
|
12534
|
-
/* @__PURE__ */
|
|
12602
|
+
/* @__PURE__ */ jsx295("div", { className: cn(ToggleButton_default.group, ToggleButton_default[`group--${direction}`]), children })
|
|
12535
12603
|
]
|
|
12536
12604
|
}
|
|
12537
12605
|
);
|
|
@@ -12758,6 +12826,7 @@ export {
|
|
|
12758
12826
|
SearchSuggestions,
|
|
12759
12827
|
Select,
|
|
12760
12828
|
SettingsIcon,
|
|
12829
|
+
Skeleton,
|
|
12761
12830
|
SkipToContent,
|
|
12762
12831
|
SmsIcon,
|
|
12763
12832
|
Spinner,
|