@norges-domstoler/dds-components 14.3.1 → 14.4.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.d.mts +2 -4
- package/dist/index.d.ts +2 -4
- package/dist/index.js +187 -192
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +239 -239
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -7
- package/src/index.ts +52 -0
package/dist/index.mjs
CHANGED
|
@@ -108,12 +108,8 @@ var input = {
|
|
|
108
108
|
gap: spacing.SizesDdsSpacingX1NumberPx
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
|
-
var container = {
|
|
112
|
-
gap: spacing.SizesDdsSpacingX0125
|
|
113
|
-
};
|
|
114
111
|
var inputTokens = {
|
|
115
|
-
input
|
|
116
|
-
container
|
|
112
|
+
input
|
|
117
113
|
};
|
|
118
114
|
|
|
119
115
|
// src/components/Typography/Typography.tokens.tsx
|
|
@@ -658,7 +654,7 @@ var visibilityTransition = (open) => {
|
|
|
658
654
|
};
|
|
659
655
|
|
|
660
656
|
// src/components/helpers/Input/Input.styles.tsx
|
|
661
|
-
var { input: input2
|
|
657
|
+
var { input: input2 } = inputTokens;
|
|
662
658
|
var Input = styled3.input`
|
|
663
659
|
position: relative;
|
|
664
660
|
color: ${input2.base.color};
|
|
@@ -752,8 +748,7 @@ var StatefulInput = styled3(Input).withConfig({
|
|
|
752
748
|
`;
|
|
753
749
|
var OuterInputContainer = styled3.div`
|
|
754
750
|
position: relative;
|
|
755
|
-
|
|
756
|
-
width: ${({ width }) => width};
|
|
751
|
+
width: ${({ $width }) => $width};
|
|
757
752
|
`;
|
|
758
753
|
var InputContainer = styled3.div`
|
|
759
754
|
position: relative;
|
|
@@ -4001,7 +3996,7 @@ var link = {
|
|
|
4001
3996
|
backgroundColor: colors10.DdsColorInteractiveLightest
|
|
4002
3997
|
}
|
|
4003
3998
|
};
|
|
4004
|
-
var
|
|
3999
|
+
var container = {
|
|
4005
4000
|
border: `${border6.BordersDdsBorderStyleLightStrokeWeight} ${border6.BordersDdsBorderStyleLightStroke} solid `,
|
|
4006
4001
|
backgroundColor: colors10.DdsColorNeutralsWhite,
|
|
4007
4002
|
borderRadius: borderRadius4.RadiiDdsBorderRadius1Radius
|
|
@@ -4011,7 +4006,7 @@ var divider = {
|
|
|
4011
4006
|
marginLeft: spacing7.SizesDdsSpacingX15
|
|
4012
4007
|
};
|
|
4013
4008
|
var overflowMenuTokens = {
|
|
4014
|
-
container
|
|
4009
|
+
container,
|
|
4015
4010
|
element,
|
|
4016
4011
|
link,
|
|
4017
4012
|
divider,
|
|
@@ -4491,7 +4486,7 @@ var scrollbarStyling = {
|
|
|
4491
4486
|
|
|
4492
4487
|
// src/components/OverflowMenu/OverflowMenu.tsx
|
|
4493
4488
|
import { Fragment as Fragment3, jsx as jsx176, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4494
|
-
var { container:
|
|
4489
|
+
var { container: container2, divider: divider3 } = overflowMenuTokens;
|
|
4495
4490
|
var Container = styled19.div`
|
|
4496
4491
|
box-sizing: border-box;
|
|
4497
4492
|
z-index: 100;
|
|
@@ -4499,9 +4494,9 @@ var Container = styled19.div`
|
|
|
4499
4494
|
min-width: 180px;
|
|
4500
4495
|
max-width: 300px;
|
|
4501
4496
|
${({ $isOpen }) => visibilityTransition($isOpen)}
|
|
4502
|
-
border: ${
|
|
4503
|
-
background-color: ${
|
|
4504
|
-
border-radius: ${
|
|
4497
|
+
border: ${container2.border};
|
|
4498
|
+
background-color: ${container2.backgroundColor};
|
|
4499
|
+
border-radius: ${container2.borderRadius};
|
|
4505
4500
|
|
|
4506
4501
|
${scrollbarStyling.webkit}
|
|
4507
4502
|
${scrollbarStyling.firefox}
|
|
@@ -5093,7 +5088,7 @@ var selectionControl = {
|
|
|
5093
5088
|
}
|
|
5094
5089
|
}
|
|
5095
5090
|
};
|
|
5096
|
-
var
|
|
5091
|
+
var container3 = {
|
|
5097
5092
|
color: colors12.DdsColorNeutralsGray9,
|
|
5098
5093
|
disabled: {
|
|
5099
5094
|
color: colors12.DdsColorNeutralsGray6
|
|
@@ -5117,7 +5112,7 @@ var outerGroupContainer = {
|
|
|
5117
5112
|
var selectionControlTokens = {
|
|
5118
5113
|
selectionControl,
|
|
5119
5114
|
checkmark,
|
|
5120
|
-
container:
|
|
5115
|
+
container: container3,
|
|
5121
5116
|
groupContainer,
|
|
5122
5117
|
outerGroupContainer
|
|
5123
5118
|
};
|
|
@@ -5125,7 +5120,7 @@ var selectionControlTokens = {
|
|
|
5125
5120
|
// src/components/SelectionControl/SelectionControl.styles.tsx
|
|
5126
5121
|
var {
|
|
5127
5122
|
selectionControl: selectionControl2,
|
|
5128
|
-
container:
|
|
5123
|
+
container: container4,
|
|
5129
5124
|
checkmark: checkmark2,
|
|
5130
5125
|
groupContainer: groupContainer2,
|
|
5131
5126
|
outerGroupContainer: outerGroupContainer2
|
|
@@ -5156,11 +5151,11 @@ var Container2 = styled23.label`
|
|
|
5156
5151
|
cursor: pointer;
|
|
5157
5152
|
user-select: none;
|
|
5158
5153
|
width: fit-content;
|
|
5159
|
-
color: ${
|
|
5154
|
+
color: ${container4.color};
|
|
5160
5155
|
${({ $hasLabel }) => $hasLabel ? css10`
|
|
5161
|
-
padding-left: ${
|
|
5156
|
+
padding-left: ${container4.withLabel.paddingLeft};
|
|
5162
5157
|
` : css10`
|
|
5163
|
-
padding: ${
|
|
5158
|
+
padding: ${container4.noLabel.padding};
|
|
5164
5159
|
`}
|
|
5165
5160
|
|
|
5166
5161
|
input ~ ${CustomSelectionControl} {
|
|
@@ -5239,7 +5234,7 @@ var Container2 = styled23.label`
|
|
|
5239
5234
|
|
|
5240
5235
|
${({ disabled }) => disabled && css10`
|
|
5241
5236
|
cursor: not-allowed;
|
|
5242
|
-
color: ${
|
|
5237
|
+
color: ${container4.disabled.color};
|
|
5243
5238
|
`}
|
|
5244
5239
|
${({ $controlType }) => $controlType === "checkbox" ? css10`
|
|
5245
5240
|
${CustomSelectionControl}:after {
|
|
@@ -5847,7 +5842,7 @@ var TextInput2 = forwardRef16(
|
|
|
5847
5842
|
const outerInputContainerProps = {
|
|
5848
5843
|
className,
|
|
5849
5844
|
style,
|
|
5850
|
-
width: getWidth(componentSize, width)
|
|
5845
|
+
$width: getWidth(componentSize, width)
|
|
5851
5846
|
};
|
|
5852
5847
|
const showRequiredStyling = !!(required || ariaRequired);
|
|
5853
5848
|
let extendedInput = null;
|
|
@@ -6491,7 +6486,7 @@ import styled28, { css as css14 } from "styled-components";
|
|
|
6491
6486
|
import { ddsBaseTokens as ddsBaseTokens26 } from "@norges-domstoler/dds-design-tokens";
|
|
6492
6487
|
var { colors: colors15, spacing: spacing13 } = ddsBaseTokens26;
|
|
6493
6488
|
var typographyType2 = "bodySans02";
|
|
6494
|
-
var
|
|
6489
|
+
var container5 = {
|
|
6495
6490
|
borderBottom: "2px solid",
|
|
6496
6491
|
padding: `0 ${spacing13.SizesDdsSpacingX1}`,
|
|
6497
6492
|
info: {
|
|
@@ -6531,7 +6526,7 @@ var purposeVariants = {
|
|
|
6531
6526
|
}
|
|
6532
6527
|
};
|
|
6533
6528
|
var globalMessageTokens = {
|
|
6534
|
-
container:
|
|
6529
|
+
container: container5,
|
|
6535
6530
|
contentContainer,
|
|
6536
6531
|
icon: {
|
|
6537
6532
|
marginRight: `${spacing13.SizesDdsSpacingX075}`,
|
|
@@ -6549,19 +6544,19 @@ var globalMessageTokens = {
|
|
|
6549
6544
|
|
|
6550
6545
|
// src/components/GlobalMessage/GlobalMessage.tsx
|
|
6551
6546
|
import { jsx as jsx188, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
6552
|
-
var { container:
|
|
6547
|
+
var { container: container6, contentContainer: contentContainer2, icon: icon6 } = globalMessageTokens;
|
|
6553
6548
|
var Container4 = styled28.div`
|
|
6554
6549
|
display: flex;
|
|
6555
6550
|
align-items: center;
|
|
6556
6551
|
justify-content: space-between;
|
|
6557
6552
|
box-sizing: border-box;
|
|
6558
6553
|
width: 100%;
|
|
6559
|
-
padding: ${
|
|
6560
|
-
border-bottom: ${
|
|
6554
|
+
padding: ${container6.padding};
|
|
6555
|
+
border-bottom: ${container6.borderBottom};
|
|
6561
6556
|
${getFontStyling(typographyType2, true)}
|
|
6562
6557
|
${({ $purpose }) => css14`
|
|
6563
|
-
border-color: ${
|
|
6564
|
-
background-color: ${
|
|
6558
|
+
border-color: ${container6[$purpose].borderColor};
|
|
6559
|
+
background-color: ${container6[$purpose].backgroundColor};
|
|
6565
6560
|
`}
|
|
6566
6561
|
`;
|
|
6567
6562
|
var MessageIconWrapper = styled28(Icon)`
|
|
@@ -6637,7 +6632,7 @@ import styled29, { css as css15 } from "styled-components";
|
|
|
6637
6632
|
// src/components/LocalMessage/LocalMessage.tokens.tsx
|
|
6638
6633
|
import { ddsBaseTokens as ddsBaseTokens27 } from "@norges-domstoler/dds-design-tokens";
|
|
6639
6634
|
var { colors: colors16, spacing: spacing14, borderRadius: borderRadius7, border: border9, outerShadow: outerShadow3 } = ddsBaseTokens27;
|
|
6640
|
-
var
|
|
6635
|
+
var container7 = {
|
|
6641
6636
|
base: {
|
|
6642
6637
|
boxShadow: outerShadow3.DdsShadow1Onlight,
|
|
6643
6638
|
borderRadius: borderRadius7.RadiiDdsBorderRadius1Radius,
|
|
@@ -6720,7 +6715,7 @@ var icon7 = {
|
|
|
6720
6715
|
}
|
|
6721
6716
|
};
|
|
6722
6717
|
var localMessageTokens = {
|
|
6723
|
-
container:
|
|
6718
|
+
container: container7,
|
|
6724
6719
|
purposeVariants: purposeVariants2,
|
|
6725
6720
|
icon: icon7
|
|
6726
6721
|
};
|
|
@@ -6728,7 +6723,7 @@ var localMessageTokens = {
|
|
|
6728
6723
|
// src/components/LocalMessage/LocalMessage.tsx
|
|
6729
6724
|
import { Fragment as Fragment5, jsx as jsx189, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
6730
6725
|
var defaultWidth3 = "400px";
|
|
6731
|
-
var { container:
|
|
6726
|
+
var { container: container8, icon: icon8, purposeVariants: purposeVariants3 } = localMessageTokens;
|
|
6732
6727
|
var Container5 = styled29.div.withConfig({
|
|
6733
6728
|
shouldForwardProp: (prop) => {
|
|
6734
6729
|
const styleOnlyProps = [
|
|
@@ -6744,11 +6739,11 @@ var Container5 = styled29.div.withConfig({
|
|
|
6744
6739
|
display: grid;
|
|
6745
6740
|
grid-template-areas: ${({ layout, closable }) => getGridTemplateAreas(layout, closable)};
|
|
6746
6741
|
grid-template-columns: ${({ layout, closable }) => getGridTemplateColumns(layout, closable)};
|
|
6747
|
-
box-shadow: ${
|
|
6748
|
-
border: ${
|
|
6749
|
-
border-radius: ${
|
|
6750
|
-
padding: ${
|
|
6751
|
-
gap: ${
|
|
6742
|
+
box-shadow: ${container8.base.boxShadow};
|
|
6743
|
+
border: ${container8.base.border};
|
|
6744
|
+
border-radius: ${container8.base.borderRadius};
|
|
6745
|
+
padding: ${container8.base.padding};
|
|
6746
|
+
gap: ${container8.base.gap};
|
|
6752
6747
|
align-items: center;
|
|
6753
6748
|
${getFontStyling(defaultTypographyType, true)}
|
|
6754
6749
|
|
|
@@ -6756,8 +6751,8 @@ var Container5 = styled29.div.withConfig({
|
|
|
6756
6751
|
${selection}
|
|
6757
6752
|
}
|
|
6758
6753
|
${({ purpose }) => purpose && css15`
|
|
6759
|
-
border-color: ${
|
|
6760
|
-
background-color: ${
|
|
6754
|
+
border-color: ${container8.purpose[purpose].borderColor};
|
|
6755
|
+
background-color: ${container8.purpose[purpose].backgroundColor};
|
|
6761
6756
|
`}
|
|
6762
6757
|
width: ${({ width }) => width};
|
|
6763
6758
|
`;
|
|
@@ -6788,7 +6783,7 @@ var TextContainer2 = styled29.div`
|
|
|
6788
6783
|
`;
|
|
6789
6784
|
var CloseButton = styled29(Button)`
|
|
6790
6785
|
grid-area: closeButton;
|
|
6791
|
-
margin: -${
|
|
6786
|
+
margin: -${container8.base.padding} 0;
|
|
6792
6787
|
`;
|
|
6793
6788
|
var LocalMessage = forwardRef19(
|
|
6794
6789
|
(props, ref) => {
|
|
@@ -9491,20 +9486,20 @@ var Backdrop = styled58.div.withConfig({
|
|
|
9491
9486
|
`;
|
|
9492
9487
|
|
|
9493
9488
|
// src/components/Modal/Backdrop/Backdrop.utils.tsx
|
|
9494
|
-
var isVerticalScrollbarDisplayed = (
|
|
9495
|
-
function handleElementWithBackdropMount(
|
|
9496
|
-
if (isVerticalScrollbarDisplayed(
|
|
9489
|
+
var isVerticalScrollbarDisplayed = (container16) => container16.clientHeight > window.innerHeight;
|
|
9490
|
+
function handleElementWithBackdropMount(container16) {
|
|
9491
|
+
if (isVerticalScrollbarDisplayed(container16)) {
|
|
9497
9492
|
const scrollY = Math.round(window.scrollY);
|
|
9498
|
-
|
|
9499
|
-
|
|
9500
|
-
|
|
9493
|
+
container16.style.overflowY = "scroll";
|
|
9494
|
+
container16.style.position = "fixed";
|
|
9495
|
+
container16.style.top = `-${scrollY}px`;
|
|
9501
9496
|
}
|
|
9502
9497
|
}
|
|
9503
|
-
function handleElementWithBackdropUnmount(
|
|
9498
|
+
function handleElementWithBackdropUnmount(container16) {
|
|
9504
9499
|
const scrollY = parseInt(document.body.style.top);
|
|
9505
|
-
|
|
9506
|
-
|
|
9507
|
-
|
|
9500
|
+
container16.style.removeProperty("overflow-y");
|
|
9501
|
+
container16.style.removeProperty("position");
|
|
9502
|
+
container16.style.removeProperty("top");
|
|
9508
9503
|
if (isNaN(scrollY)) {
|
|
9509
9504
|
return;
|
|
9510
9505
|
}
|
|
@@ -9514,7 +9509,7 @@ function handleElementWithBackdropUnmount(container18) {
|
|
|
9514
9509
|
// src/components/Modal/Modal.tokens.tsx
|
|
9515
9510
|
import { ddsBaseTokens as ddsBaseTokens40 } from "@norges-domstoler/dds-design-tokens";
|
|
9516
9511
|
var { spacing: spacing25 } = ddsBaseTokens40;
|
|
9517
|
-
var
|
|
9512
|
+
var container9 = {
|
|
9518
9513
|
padding: `${spacing25.SizesDdsSpacingX1} ${spacing25.SizesDdsSpacingX1} ${spacing25.SizesDdsSpacingX15} ${spacing25.SizesDdsSpacingX15}`
|
|
9519
9514
|
};
|
|
9520
9515
|
var contentContainer3 = {
|
|
@@ -9525,19 +9520,19 @@ var actionsContainer = {
|
|
|
9525
9520
|
gap: spacing25.SizesDdsSpacingX1
|
|
9526
9521
|
};
|
|
9527
9522
|
var modalTokens = {
|
|
9528
|
-
container:
|
|
9523
|
+
container: container9,
|
|
9529
9524
|
contentContainer: contentContainer3,
|
|
9530
9525
|
actionsContainer
|
|
9531
9526
|
};
|
|
9532
9527
|
|
|
9533
9528
|
// src/components/Modal/Modal.tsx
|
|
9534
9529
|
import { jsx as jsx221, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
9535
|
-
var { container:
|
|
9530
|
+
var { container: container10, contentContainer: contentContainer4 } = modalTokens;
|
|
9536
9531
|
var Container8 = styled59(Paper)`
|
|
9537
9532
|
display: flex;
|
|
9538
9533
|
flex-direction: column-reverse;
|
|
9539
9534
|
min-width: 200px;
|
|
9540
|
-
padding: ${
|
|
9535
|
+
padding: ${container10.padding};
|
|
9541
9536
|
&::selection,
|
|
9542
9537
|
*::selection {
|
|
9543
9538
|
${selection}
|
|
@@ -9677,7 +9672,7 @@ import { ddsBaseTokens as ddsBaseTokens41 } from "@norges-domstoler/dds-design-t
|
|
|
9677
9672
|
var { spacing: spacing26 } = ddsBaseTokens41;
|
|
9678
9673
|
var contentContainerPaddingNumberPx = spacing26.SizesDdsSpacingX025NumberPx;
|
|
9679
9674
|
var contentContainerPadding = `${contentContainerPaddingNumberPx}px`;
|
|
9680
|
-
var
|
|
9675
|
+
var container11 = {
|
|
9681
9676
|
padding: `${spacing26.SizesDdsSpacingX1NumberPx - contentContainerPaddingNumberPx}px ${spacing26.SizesDdsSpacingX1NumberPx - contentContainerPaddingNumberPx}px ${spacing26.SizesDdsSpacingX1NumberPx - contentContainerPaddingNumberPx}px ${spacing26.SizesDdsSpacingX15NumberPx - contentContainerPaddingNumberPx}px`
|
|
9682
9677
|
};
|
|
9683
9678
|
var contentContainer5 = {
|
|
@@ -9685,13 +9680,13 @@ var contentContainer5 = {
|
|
|
9685
9680
|
padding: contentContainerPadding
|
|
9686
9681
|
};
|
|
9687
9682
|
var drawerTokens = {
|
|
9688
|
-
container:
|
|
9683
|
+
container: container11,
|
|
9689
9684
|
contentContainer: contentContainer5
|
|
9690
9685
|
};
|
|
9691
9686
|
|
|
9692
9687
|
// src/components/Drawer/Drawer.tsx
|
|
9693
9688
|
import { jsx as jsx224, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
9694
|
-
var { container:
|
|
9689
|
+
var { container: container12, contentContainer: contentContainer6 } = drawerTokens;
|
|
9695
9690
|
var getMaxWidth = (size2) => {
|
|
9696
9691
|
if (size2 === "large")
|
|
9697
9692
|
return "800px";
|
|
@@ -9719,7 +9714,7 @@ var Container11 = styled62(Paper).withConfig({
|
|
|
9719
9714
|
justify-content: flex-end;
|
|
9720
9715
|
min-width: 300px;
|
|
9721
9716
|
z-index: 100;
|
|
9722
|
-
padding: ${
|
|
9717
|
+
padding: ${container12.padding};
|
|
9723
9718
|
|
|
9724
9719
|
${({ size: size2 }) => css29`
|
|
9725
9720
|
max-width: ${getMaxWidth(size2)};
|
|
@@ -10270,9 +10265,7 @@ var CalendarPopover = ({
|
|
|
10270
10265
|
useOnKeyDown("Escape", onClose);
|
|
10271
10266
|
return /* @__PURE__ */ jsx228(CalendarPopoverContext.Provider, { value: { anchorRef, isOpen, onClose }, children });
|
|
10272
10267
|
};
|
|
10273
|
-
var Anchor = styled66.div
|
|
10274
|
-
display: inline-flex;
|
|
10275
|
-
`;
|
|
10268
|
+
var Anchor = styled66.div``;
|
|
10276
10269
|
var CalendarPopoverAnchor = ({
|
|
10277
10270
|
children
|
|
10278
10271
|
}) => {
|
|
@@ -10326,7 +10319,10 @@ import {
|
|
|
10326
10319
|
useDateField
|
|
10327
10320
|
} from "@react-aria/datepicker";
|
|
10328
10321
|
import { useDateFieldState } from "@react-stately/datepicker";
|
|
10329
|
-
import {
|
|
10322
|
+
import {
|
|
10323
|
+
forwardRef as forwardRef50,
|
|
10324
|
+
useRef as useRef20
|
|
10325
|
+
} from "react";
|
|
10330
10326
|
|
|
10331
10327
|
// src/components/date-inputs/DatePicker/DateField/CalendarButton.tsx
|
|
10332
10328
|
import { useButton } from "@react-aria/button";
|
|
@@ -10400,15 +10396,15 @@ var calendarButton = {
|
|
|
10400
10396
|
};
|
|
10401
10397
|
var datefield = {
|
|
10402
10398
|
medium: {
|
|
10403
|
-
|
|
10399
|
+
width: "160px",
|
|
10404
10400
|
paddingX: ddsBaseTokens43.spacing.SizesDdsSpacingX05
|
|
10405
10401
|
},
|
|
10406
10402
|
small: {
|
|
10407
|
-
|
|
10403
|
+
width: "140px",
|
|
10408
10404
|
paddingX: ddsBaseTokens43.spacing.SizesDdsSpacingX05
|
|
10409
10405
|
},
|
|
10410
10406
|
tiny: {
|
|
10411
|
-
|
|
10407
|
+
width: "125px",
|
|
10412
10408
|
paddingX: ddsBaseTokens43.spacing.SizesDdsSpacingX025
|
|
10413
10409
|
},
|
|
10414
10410
|
disabled: {
|
|
@@ -10419,7 +10415,6 @@ var datefield = {
|
|
|
10419
10415
|
};
|
|
10420
10416
|
var datePickerTokens = {
|
|
10421
10417
|
gap: ddsBaseTokens43.spacing.SizesDdsSpacingX025,
|
|
10422
|
-
labelGap: ddsBaseTokens43.spacing.SizesDdsSpacingX0125,
|
|
10423
10418
|
datefield,
|
|
10424
10419
|
calendarButton
|
|
10425
10420
|
};
|
|
@@ -10583,22 +10578,12 @@ function DateSegment({
|
|
|
10583
10578
|
DateSegment.displayName = "DateSegment";
|
|
10584
10579
|
|
|
10585
10580
|
// src/components/date-inputs/common/DateInput.tsx
|
|
10586
|
-
import {
|
|
10587
|
-
|
|
10581
|
+
import {
|
|
10582
|
+
forwardRef as forwardRef49
|
|
10583
|
+
} from "react";
|
|
10584
|
+
import styled69 from "styled-components";
|
|
10588
10585
|
import { jsx as jsx231, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
10589
|
-
var
|
|
10590
|
-
display: inline-flex;
|
|
10591
|
-
flex-direction: column;
|
|
10592
|
-
gap: ${datePickerTokens.labelGap};
|
|
10593
|
-
`;
|
|
10594
|
-
var InputDiv = styled69(StatefulInput).attrs({
|
|
10595
|
-
as: "div"
|
|
10596
|
-
})`
|
|
10597
|
-
${({ $width, componentSize = "medium" }) => $width ? css33`
|
|
10598
|
-
width: ${$width};
|
|
10599
|
-
` : css33`
|
|
10600
|
-
min-width: ${datePickerTokens.datefield[componentSize].minWidth};
|
|
10601
|
-
`}
|
|
10586
|
+
var InputDiv = styled69(StatefulInput)`
|
|
10602
10587
|
display: inline-flex;
|
|
10603
10588
|
flex-direction: row;
|
|
10604
10589
|
gap: ${datePickerTokens.gap};
|
|
@@ -10610,111 +10595,125 @@ var DateSegmentContainer = styled69.div`
|
|
|
10610
10595
|
display: flex;
|
|
10611
10596
|
flex-direction: row;
|
|
10612
10597
|
`;
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
|
|
10618
|
-
|
|
10619
|
-
|
|
10620
|
-
|
|
10621
|
-
|
|
10622
|
-
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
|
|
10626
|
-
|
|
10627
|
-
|
|
10628
|
-
|
|
10629
|
-
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10647
|
-
|
|
10648
|
-
hasErrorMessage,
|
|
10649
|
-
className: cn(
|
|
10650
|
-
disabled && "disabled",
|
|
10651
|
-
active && "active",
|
|
10652
|
-
readOnly && "read-only"
|
|
10653
|
-
),
|
|
10654
|
-
children: [
|
|
10655
|
-
button3,
|
|
10656
|
-
/* @__PURE__ */ jsx231(DateSegmentContainer, { children })
|
|
10657
|
-
]
|
|
10658
|
-
}
|
|
10659
|
-
),
|
|
10660
|
-
hasMessage && /* @__PURE__ */ jsx231(
|
|
10661
|
-
InputMessage,
|
|
10662
|
-
{
|
|
10663
|
-
messageType: hasErrorMessage ? "error" : "tip",
|
|
10664
|
-
message: (_a = errorMessage != null ? errorMessage : tip) != null ? _a : ""
|
|
10665
|
-
}
|
|
10666
|
-
)
|
|
10667
|
-
] });
|
|
10668
|
-
}
|
|
10669
|
-
);
|
|
10670
|
-
DateInput.displayName = "DateInput";
|
|
10671
|
-
|
|
10672
|
-
// src/components/date-inputs/DatePicker/DateField/DateField.tsx
|
|
10673
|
-
import { jsx as jsx232 } from "react/jsx-runtime";
|
|
10674
|
-
var DateField = forwardRef50(
|
|
10675
|
-
({ componentSize = "medium", buttonProps, ...props }, forwardedRef) => {
|
|
10676
|
-
const state = useDateFieldState({
|
|
10677
|
-
...props,
|
|
10678
|
-
locale,
|
|
10679
|
-
createCalendar: createCalendar2
|
|
10680
|
-
});
|
|
10681
|
-
const ref = useRef20(null);
|
|
10682
|
-
const { labelProps, fieldProps } = useDateField(props, state, ref);
|
|
10683
|
-
const disabled = props.isDisabled || !!fieldProps["aria-disabled"];
|
|
10684
|
-
return /* @__PURE__ */ jsx232(
|
|
10685
|
-
DateInput,
|
|
10686
|
-
{
|
|
10687
|
-
...props,
|
|
10688
|
-
componentSize,
|
|
10689
|
-
label: props.label,
|
|
10690
|
-
disabled,
|
|
10691
|
-
required: props.isRequired,
|
|
10692
|
-
ref: forwardedRef,
|
|
10693
|
-
internalRef: ref,
|
|
10694
|
-
readOnly: props.isReadOnly,
|
|
10695
|
-
prefix: !props.isReadOnly && /* @__PURE__ */ jsx232(
|
|
10696
|
-
CalendarButton,
|
|
10598
|
+
function _DateInput({
|
|
10599
|
+
errorMessage,
|
|
10600
|
+
tip,
|
|
10601
|
+
componentSize = "medium",
|
|
10602
|
+
style,
|
|
10603
|
+
className,
|
|
10604
|
+
disabled,
|
|
10605
|
+
active,
|
|
10606
|
+
internalRef,
|
|
10607
|
+
readOnly,
|
|
10608
|
+
required,
|
|
10609
|
+
children,
|
|
10610
|
+
prefix: button3,
|
|
10611
|
+
labelProps,
|
|
10612
|
+
fieldProps,
|
|
10613
|
+
groupProps,
|
|
10614
|
+
width = datePickerTokens.datefield[componentSize].width,
|
|
10615
|
+
...props
|
|
10616
|
+
}, forwardedRef) {
|
|
10617
|
+
var _a;
|
|
10618
|
+
const hasErrorMessage = !!errorMessage;
|
|
10619
|
+
const hasTip = !!tip;
|
|
10620
|
+
const hasLabel = props.label != null;
|
|
10621
|
+
const hasMessage = hasErrorMessage || hasTip;
|
|
10622
|
+
return /* @__PURE__ */ jsxs53(
|
|
10623
|
+
OuterInputContainer,
|
|
10624
|
+
{
|
|
10625
|
+
...groupProps,
|
|
10626
|
+
$width: width,
|
|
10627
|
+
className,
|
|
10628
|
+
ref: forwardedRef,
|
|
10629
|
+
children: [
|
|
10630
|
+
hasLabel && /* @__PURE__ */ jsx231(Label, { ...labelProps, showRequiredStyling: required, children: props.label }),
|
|
10631
|
+
/* @__PURE__ */ jsxs53(
|
|
10632
|
+
InputDiv,
|
|
10697
10633
|
{
|
|
10634
|
+
...fieldProps,
|
|
10635
|
+
as: "div",
|
|
10636
|
+
style,
|
|
10637
|
+
disabled,
|
|
10698
10638
|
componentSize,
|
|
10699
|
-
|
|
10700
|
-
|
|
10639
|
+
ref: internalRef,
|
|
10640
|
+
hasErrorMessage,
|
|
10641
|
+
className: cn(
|
|
10642
|
+
disabled && "disabled",
|
|
10643
|
+
active && "active",
|
|
10644
|
+
readOnly && "read-only"
|
|
10645
|
+
),
|
|
10646
|
+
children: [
|
|
10647
|
+
button3,
|
|
10648
|
+
/* @__PURE__ */ jsx231(DateSegmentContainer, { children })
|
|
10649
|
+
]
|
|
10701
10650
|
}
|
|
10702
10651
|
),
|
|
10703
|
-
|
|
10704
|
-
|
|
10705
|
-
children: state.segments.map((segment2, i) => /* @__PURE__ */ jsx232(
|
|
10706
|
-
DateSegment,
|
|
10652
|
+
hasMessage && /* @__PURE__ */ jsx231(
|
|
10653
|
+
InputMessage,
|
|
10707
10654
|
{
|
|
10708
|
-
|
|
10709
|
-
|
|
10710
|
-
|
|
10711
|
-
|
|
10712
|
-
|
|
10713
|
-
|
|
10714
|
-
|
|
10715
|
-
|
|
10716
|
-
|
|
10717
|
-
|
|
10655
|
+
messageType: hasErrorMessage ? "error" : "tip",
|
|
10656
|
+
message: (_a = errorMessage != null ? errorMessage : tip) != null ? _a : ""
|
|
10657
|
+
}
|
|
10658
|
+
)
|
|
10659
|
+
]
|
|
10660
|
+
}
|
|
10661
|
+
);
|
|
10662
|
+
}
|
|
10663
|
+
var DateInput = forwardRef49(_DateInput);
|
|
10664
|
+
DateInput.displayName = "DateInput";
|
|
10665
|
+
|
|
10666
|
+
// src/components/date-inputs/DatePicker/DateField/DateField.tsx
|
|
10667
|
+
import { jsx as jsx232 } from "react/jsx-runtime";
|
|
10668
|
+
function _DateField({
|
|
10669
|
+
componentSize = "medium",
|
|
10670
|
+
buttonProps,
|
|
10671
|
+
groupProps,
|
|
10672
|
+
...props
|
|
10673
|
+
}, forwardedRef) {
|
|
10674
|
+
const state = useDateFieldState({
|
|
10675
|
+
...props,
|
|
10676
|
+
locale,
|
|
10677
|
+
createCalendar: createCalendar2
|
|
10678
|
+
});
|
|
10679
|
+
const ref = useRef20(null);
|
|
10680
|
+
const { labelProps, fieldProps } = useDateField(props, state, ref);
|
|
10681
|
+
const disabled = props.isDisabled || !!fieldProps["aria-disabled"];
|
|
10682
|
+
return /* @__PURE__ */ jsx232(
|
|
10683
|
+
DateInput,
|
|
10684
|
+
{
|
|
10685
|
+
...props,
|
|
10686
|
+
groupProps,
|
|
10687
|
+
componentSize,
|
|
10688
|
+
label: props.label,
|
|
10689
|
+
disabled,
|
|
10690
|
+
required: props.isRequired,
|
|
10691
|
+
ref: forwardedRef,
|
|
10692
|
+
internalRef: ref,
|
|
10693
|
+
readOnly: props.isReadOnly,
|
|
10694
|
+
prefix: !props.isReadOnly && /* @__PURE__ */ jsx232(
|
|
10695
|
+
CalendarButton,
|
|
10696
|
+
{
|
|
10697
|
+
componentSize,
|
|
10698
|
+
...buttonProps,
|
|
10699
|
+
isDisabled: disabled
|
|
10700
|
+
}
|
|
10701
|
+
),
|
|
10702
|
+
labelProps,
|
|
10703
|
+
fieldProps,
|
|
10704
|
+
children: state.segments.map((segment2, i) => /* @__PURE__ */ jsx232(
|
|
10705
|
+
DateSegment,
|
|
10706
|
+
{
|
|
10707
|
+
componentSize,
|
|
10708
|
+
segment: segment2,
|
|
10709
|
+
state
|
|
10710
|
+
},
|
|
10711
|
+
i
|
|
10712
|
+
))
|
|
10713
|
+
}
|
|
10714
|
+
);
|
|
10715
|
+
}
|
|
10716
|
+
var DateField = forwardRef50(_DateField);
|
|
10718
10717
|
DateField.displayName = "DateField";
|
|
10719
10718
|
|
|
10720
10719
|
// src/components/date-inputs/utils/useFocusManagerRef.ts
|
|
@@ -10750,7 +10749,7 @@ function _DatePicker({ errorMessage, componentSize, tip, style, width, ...props
|
|
|
10750
10749
|
);
|
|
10751
10750
|
const ref = useRef22(null);
|
|
10752
10751
|
const combinedRef = useCombinedRef(ref, domRef);
|
|
10753
|
-
const { buttonProps, calendarProps, fieldProps } = useDatePicker(
|
|
10752
|
+
const { buttonProps, calendarProps, fieldProps, groupProps } = useDatePicker(
|
|
10754
10753
|
{ ...props, granularity: "day" },
|
|
10755
10754
|
state,
|
|
10756
10755
|
ref
|
|
@@ -10760,6 +10759,7 @@ function _DatePicker({ errorMessage, componentSize, tip, style, width, ...props
|
|
|
10760
10759
|
DateField,
|
|
10761
10760
|
{
|
|
10762
10761
|
...fieldProps,
|
|
10762
|
+
groupProps,
|
|
10763
10763
|
ref: combinedRef,
|
|
10764
10764
|
componentSize,
|
|
10765
10765
|
tip,
|
|
@@ -10872,7 +10872,7 @@ function calendarDateToNativeDate(date, time = new Time(12, 0, 0, 0)) {
|
|
|
10872
10872
|
// src/components/Popover/Popover.tsx
|
|
10873
10873
|
import { ddsBaseTokens as ddsBaseTokens45 } from "@norges-domstoler/dds-design-tokens";
|
|
10874
10874
|
import { forwardRef as forwardRef53 } from "react";
|
|
10875
|
-
import styled71, { css as
|
|
10875
|
+
import styled71, { css as css33 } from "styled-components";
|
|
10876
10876
|
|
|
10877
10877
|
// src/components/Popover/Popover.tokens.tsx
|
|
10878
10878
|
import { ddsBaseTokens as ddsBaseTokens44 } from "@norges-domstoler/dds-design-tokens";
|
|
@@ -10914,7 +10914,7 @@ var Wrapper6 = styled71(Paper)`
|
|
|
10914
10914
|
&:focus-visible {
|
|
10915
10915
|
${focusVisible}
|
|
10916
10916
|
}
|
|
10917
|
-
${({ $sizeProps }) => $sizeProps &&
|
|
10917
|
+
${({ $sizeProps }) => $sizeProps && css33`
|
|
10918
10918
|
width: ${$sizeProps.width};
|
|
10919
10919
|
height: ${$sizeProps.height};
|
|
10920
10920
|
min-width: ${$sizeProps.minWidth};
|
|
@@ -10927,7 +10927,7 @@ var TitleContainer = styled71.div`
|
|
|
10927
10927
|
margin-right: ${title2.marginRight};
|
|
10928
10928
|
`;
|
|
10929
10929
|
var ContentContainer4 = styled71.div`
|
|
10930
|
-
${({ $withCloseButton, $hasTitle }) => $withCloseButton && !$hasTitle &&
|
|
10930
|
+
${({ $withCloseButton, $hasTitle }) => $withCloseButton && !$hasTitle && css33`
|
|
10931
10931
|
margin-top: ${content4.noTitle.marginTop};
|
|
10932
10932
|
`}
|
|
10933
10933
|
`;
|
|
@@ -11077,7 +11077,7 @@ PopoverGroup.displayName = "PopoverGroup";
|
|
|
11077
11077
|
|
|
11078
11078
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
11079
11079
|
import { forwardRef as forwardRef54, useId as useId18 } from "react";
|
|
11080
|
-
import styled72, { css as
|
|
11080
|
+
import styled72, { css as css34 } from "styled-components";
|
|
11081
11081
|
|
|
11082
11082
|
// src/components/ToggleButton/ToggleButton.tokens.tsx
|
|
11083
11083
|
import { ddsBaseTokens as ddsBaseTokens46 } from "@norges-domstoler/dds-design-tokens";
|
|
@@ -11102,13 +11102,13 @@ var toggleButton = {
|
|
|
11102
11102
|
var group2 = {
|
|
11103
11103
|
gap: spacing28.SizesDdsSpacingX075
|
|
11104
11104
|
};
|
|
11105
|
-
var
|
|
11105
|
+
var container13 = {
|
|
11106
11106
|
gap: spacing28.SizesDdsSpacingX05
|
|
11107
11107
|
};
|
|
11108
11108
|
var toggleButtonTokens = {
|
|
11109
11109
|
toggleButton,
|
|
11110
11110
|
group: group2,
|
|
11111
|
-
container:
|
|
11111
|
+
container: container13
|
|
11112
11112
|
};
|
|
11113
11113
|
|
|
11114
11114
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
@@ -11136,7 +11136,7 @@ var Content2 = styled72.span`
|
|
|
11136
11136
|
${focusVisibleTransitionValue};
|
|
11137
11137
|
}
|
|
11138
11138
|
|
|
11139
|
-
${({ $hasIcon }) => $hasIcon &&
|
|
11139
|
+
${({ $hasIcon }) => $hasIcon && css34`
|
|
11140
11140
|
gap: ${toggleButton2.gap};
|
|
11141
11141
|
`}
|
|
11142
11142
|
|
|
@@ -11191,13 +11191,13 @@ ToggleButton.displayName = "ToggleButton";
|
|
|
11191
11191
|
|
|
11192
11192
|
// src/components/ToggleButton/ToggleButtonGroup.tsx
|
|
11193
11193
|
import { useId as useId19 } from "react";
|
|
11194
|
-
import styled73, { css as
|
|
11194
|
+
import styled73, { css as css35 } from "styled-components";
|
|
11195
11195
|
import { jsx as jsx238, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
11196
11196
|
var Group = styled73.div`
|
|
11197
11197
|
gap: ${toggleButtonTokens.group.gap};
|
|
11198
11198
|
display: flex;
|
|
11199
11199
|
flex-wrap: wrap;
|
|
11200
|
-
${({ direction }) =>
|
|
11200
|
+
${({ direction }) => css35`
|
|
11201
11201
|
flex-direction: ${direction};
|
|
11202
11202
|
`}
|
|
11203
11203
|
`;
|
|
@@ -11250,7 +11250,7 @@ import {
|
|
|
11250
11250
|
useRef as useRef25,
|
|
11251
11251
|
useState as useState22
|
|
11252
11252
|
} from "react";
|
|
11253
|
-
import styled74, { css as
|
|
11253
|
+
import styled74, { css as css36 } from "styled-components";
|
|
11254
11254
|
|
|
11255
11255
|
// src/components/Tabs/Tabs.context.tsx
|
|
11256
11256
|
import { createContext as createContext8, useContext as useContext8 } from "react";
|
|
@@ -11269,7 +11269,7 @@ var useTabsContext = () => useContext8(TabsContext);
|
|
|
11269
11269
|
// src/components/Tabs/Tabs.tsx
|
|
11270
11270
|
import { jsx as jsx239 } from "react/jsx-runtime";
|
|
11271
11271
|
var Container14 = styled74.div`
|
|
11272
|
-
${({ $width }) => $width &&
|
|
11272
|
+
${({ $width }) => $width && css36`
|
|
11273
11273
|
width: ${$width};
|
|
11274
11274
|
`};
|
|
11275
11275
|
`;
|
|
@@ -11330,7 +11330,7 @@ import {
|
|
|
11330
11330
|
useEffect as useEffect22,
|
|
11331
11331
|
useRef as useRef26
|
|
11332
11332
|
} from "react";
|
|
11333
|
-
import styled75, { css as
|
|
11333
|
+
import styled75, { css as css37 } from "styled-components";
|
|
11334
11334
|
|
|
11335
11335
|
// src/components/Tabs/Tabs.tokens.tsx
|
|
11336
11336
|
import { ddsBaseTokens as ddsBaseTokens47 } from "@norges-domstoler/dds-design-tokens";
|
|
@@ -11437,12 +11437,12 @@ var Button2 = styled75.button`
|
|
|
11437
11437
|
${focusVisibleTransitionValue};
|
|
11438
11438
|
}
|
|
11439
11439
|
|
|
11440
|
-
${({ $direction }) =>
|
|
11440
|
+
${({ $direction }) => css37`
|
|
11441
11441
|
flex-direction: ${$direction};
|
|
11442
11442
|
gap: ${tab2[$direction].gap};
|
|
11443
11443
|
`};
|
|
11444
11444
|
|
|
11445
|
-
${({ $active }) => $active &&
|
|
11445
|
+
${({ $active }) => $active && css37`
|
|
11446
11446
|
background-color: ${tab2.active.backgroundColor};
|
|
11447
11447
|
border-color: ${tab2.active.borderColor};
|
|
11448
11448
|
color: ${tab2.active.color};
|
|
@@ -11534,14 +11534,14 @@ import {
|
|
|
11534
11534
|
isValidElement as isValidElement5,
|
|
11535
11535
|
useState as useState23
|
|
11536
11536
|
} from "react";
|
|
11537
|
-
import styled76, { css as
|
|
11537
|
+
import styled76, { css as css38 } from "styled-components";
|
|
11538
11538
|
import { jsx as jsx242 } from "react/jsx-runtime";
|
|
11539
11539
|
var { tabList: tabList2 } = tabsTokens;
|
|
11540
|
-
var autoFlow =
|
|
11540
|
+
var autoFlow = css38`
|
|
11541
11541
|
grid-auto-flow: column;
|
|
11542
11542
|
grid-auto-columns: 1fr;
|
|
11543
11543
|
`;
|
|
11544
|
-
var templateColumns = (templateColumns2) =>
|
|
11544
|
+
var templateColumns = (templateColumns2) => css38`
|
|
11545
11545
|
grid-template-columns: ${templateColumns2};
|
|
11546
11546
|
`;
|
|
11547
11547
|
var TabRow = styled76.div`
|
|
@@ -11618,7 +11618,7 @@ TabList.displayName = "TabList";
|
|
|
11618
11618
|
|
|
11619
11619
|
// src/components/Tabs/TabPanel.tsx
|
|
11620
11620
|
import { forwardRef as forwardRef58 } from "react";
|
|
11621
|
-
import styled77, { css as
|
|
11621
|
+
import styled77, { css as css39 } from "styled-components";
|
|
11622
11622
|
import { jsx as jsx243 } from "react/jsx-runtime";
|
|
11623
11623
|
var { panel: panel2 } = tabsTokens;
|
|
11624
11624
|
var Panel = styled77.div`
|
|
@@ -11627,7 +11627,7 @@ var Panel = styled77.div`
|
|
|
11627
11627
|
transition: ${focusVisibleTransitionValue};
|
|
11628
11628
|
}
|
|
11629
11629
|
|
|
11630
|
-
${({ $active }) => !$active &&
|
|
11630
|
+
${({ $active }) => !$active && css39`
|
|
11631
11631
|
display: none;
|
|
11632
11632
|
`}
|
|
11633
11633
|
&:focus-visible {
|
|
@@ -11679,7 +11679,7 @@ TabPanels.displayName = "TabPanels";
|
|
|
11679
11679
|
|
|
11680
11680
|
// src/components/Tag/Tag.tsx
|
|
11681
11681
|
import { forwardRef as forwardRef60 } from "react";
|
|
11682
|
-
import styled78, { css as
|
|
11682
|
+
import styled78, { css as css40 } from "styled-components";
|
|
11683
11683
|
|
|
11684
11684
|
// src/components/Tag/Tag.tokens.tsx
|
|
11685
11685
|
import { ddsBaseTokens as ddsBaseTokens48 } from "@norges-domstoler/dds-design-tokens";
|
|
@@ -11714,7 +11714,7 @@ var Wrapper7 = styled78(TextOverflowEllipsisWrapper)`
|
|
|
11714
11714
|
border-radius: ${wrapper8.borderRadius};
|
|
11715
11715
|
padding: ${wrapper8.padding};
|
|
11716
11716
|
${getFontStyling(typographyType5)}
|
|
11717
|
-
${({ $purpose }) =>
|
|
11717
|
+
${({ $purpose }) => css40`
|
|
11718
11718
|
background-color: ${wrapper8.purpose[$purpose].backgroundColor};
|
|
11719
11719
|
border-color: ${wrapper8.purpose[$purpose].borderColor};
|
|
11720
11720
|
`}
|
|
@@ -11748,7 +11748,7 @@ import styled79 from "styled-components";
|
|
|
11748
11748
|
import { ddsBaseTokens as ddsBaseTokens49 } from "@norges-domstoler/dds-design-tokens";
|
|
11749
11749
|
var { colors: colors30, spacing: spacing31, borderRadius: borderRadius10 } = ddsBaseTokens49;
|
|
11750
11750
|
var typographyType6 = "bodySans01";
|
|
11751
|
-
var
|
|
11751
|
+
var container14 = {
|
|
11752
11752
|
gap: spacing31.SizesDdsSpacingX025,
|
|
11753
11753
|
padding: `${spacing31.SizesDdsSpacingX0125} ${spacing31.SizesDdsSpacingX025}`,
|
|
11754
11754
|
backgroundColor: colors30.DdsColorNeutralsGray1,
|
|
@@ -11759,22 +11759,22 @@ var group3 = {
|
|
|
11759
11759
|
gap: spacing31.SizesDdsSpacingX075
|
|
11760
11760
|
};
|
|
11761
11761
|
var chipTokens = {
|
|
11762
|
-
container:
|
|
11762
|
+
container: container14,
|
|
11763
11763
|
group: group3
|
|
11764
11764
|
};
|
|
11765
11765
|
|
|
11766
11766
|
// src/components/Chip/Chip.tsx
|
|
11767
11767
|
import { jsx as jsx246, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
11768
|
-
var { container:
|
|
11768
|
+
var { container: container15 } = chipTokens;
|
|
11769
11769
|
var Container15 = styled79(TextOverflowEllipsisWrapper)`
|
|
11770
11770
|
display: flex;
|
|
11771
11771
|
align-items: center;
|
|
11772
11772
|
max-width: 100%;
|
|
11773
|
-
gap: ${
|
|
11774
|
-
padding: ${
|
|
11775
|
-
border: ${
|
|
11776
|
-
border-radius: ${
|
|
11777
|
-
background-color: ${
|
|
11773
|
+
gap: ${container15.gap};
|
|
11774
|
+
padding: ${container15.padding};
|
|
11775
|
+
border: ${container15.border};
|
|
11776
|
+
border-radius: ${container15.borderRadius};
|
|
11777
|
+
background-color: ${container15.backgroundColor};
|
|
11778
11778
|
${getFontStyling(typographyType6, true)};
|
|
11779
11779
|
`;
|
|
11780
11780
|
var Chip = forwardRef61((props, ref) => {
|
|
@@ -11830,7 +11830,7 @@ ChipGroup.displayName = "ChipGroup";
|
|
|
11830
11830
|
|
|
11831
11831
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
11832
11832
|
import { useId as useId21, useState as useState25 } from "react";
|
|
11833
|
-
import styled81, { css as
|
|
11833
|
+
import styled81, { css as css41 } from "styled-components";
|
|
11834
11834
|
|
|
11835
11835
|
// src/components/ToggleBar/ToggleBar.context.tsx
|
|
11836
11836
|
import { createContext as createContext10, useContext as useContext10 } from "react";
|
|
@@ -11955,7 +11955,7 @@ var OuterContainer4 = styled81.div`
|
|
|
11955
11955
|
*::selection {
|
|
11956
11956
|
${selection}
|
|
11957
11957
|
}
|
|
11958
|
-
${({ $width }) => $width &&
|
|
11958
|
+
${({ $width }) => $width && css41`
|
|
11959
11959
|
width: ${$width};
|
|
11960
11960
|
`}
|
|
11961
11961
|
`;
|
|
@@ -12020,7 +12020,7 @@ import {
|
|
|
12020
12020
|
} from "react";
|
|
12021
12021
|
|
|
12022
12022
|
// src/components/ToggleBar/ToggleRadio.styles.tsx
|
|
12023
|
-
import styled82, { css as
|
|
12023
|
+
import styled82, { css as css42 } from "styled-components";
|
|
12024
12024
|
var { content: content6, label: label2 } = toggleBarTokens;
|
|
12025
12025
|
var Content3 = styled82.span`
|
|
12026
12026
|
display: flex;
|
|
@@ -12040,11 +12040,11 @@ var Content3 = styled82.span`
|
|
|
12040
12040
|
}
|
|
12041
12041
|
background-color: ${content6.base.backgroundColor};
|
|
12042
12042
|
|
|
12043
|
-
${({ $size, $justIcon }) =>
|
|
12044
|
-
${$justIcon ?
|
|
12043
|
+
${({ $size, $justIcon }) => css42`
|
|
12044
|
+
${$justIcon ? css42`
|
|
12045
12045
|
font-size: ${content6.size[$size].justIcon.fontSize};
|
|
12046
12046
|
padding: ${content6.size[$size].justIcon.padding};
|
|
12047
|
-
` :
|
|
12047
|
+
` : css42`
|
|
12048
12048
|
gap: ${content6.size[$size].withText.gap};
|
|
12049
12049
|
padding: ${content6.size[$size].withText.padding};
|
|
12050
12050
|
${getFontStyling(typographyTypes6[$size])}
|
|
@@ -12145,7 +12145,7 @@ var ToggleRadio = forwardRef63(
|
|
|
12145
12145
|
ToggleRadio.displayName = "ToggleRadio";
|
|
12146
12146
|
|
|
12147
12147
|
// src/components/Grid/Grid.tsx
|
|
12148
|
-
import styled83, { css as
|
|
12148
|
+
import styled83, { css as css43 } from "styled-components";
|
|
12149
12149
|
|
|
12150
12150
|
// src/components/Grid/Grid.context.tsx
|
|
12151
12151
|
import { createContext as createContext11, useContext as useContext11 } from "react";
|
|
@@ -12274,7 +12274,7 @@ var StyledGrid = styled83.div.withConfig({
|
|
|
12274
12274
|
}
|
|
12275
12275
|
})`
|
|
12276
12276
|
display: grid;
|
|
12277
|
-
${({ maxWidth }) =>
|
|
12277
|
+
${({ maxWidth }) => css43`
|
|
12278
12278
|
max-width: ${maxWidth};
|
|
12279
12279
|
`}
|
|
12280
12280
|
${({ screenSize, maxWidth, rowGap }) => getHooksGridStyling(screenSize, maxWidth, rowGap)}
|
|
@@ -12443,7 +12443,7 @@ var progressTrackerTokens = {
|
|
|
12443
12443
|
|
|
12444
12444
|
// src/components/ProgressTracker/ProgressTrackerItem.tsx
|
|
12445
12445
|
import { useMemo } from "react";
|
|
12446
|
-
import styled85, { css as
|
|
12446
|
+
import styled85, { css as css44 } from "styled-components";
|
|
12447
12447
|
import { jsx as jsx252, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
12448
12448
|
var toItemState = (active, completed, disabled) => {
|
|
12449
12449
|
if (disabled) {
|
|
@@ -12481,31 +12481,31 @@ var ItemNumber = styled85.div`
|
|
|
12481
12481
|
${({ $state: state }) => {
|
|
12482
12482
|
switch (state) {
|
|
12483
12483
|
case "activeIncomplete":
|
|
12484
|
-
return
|
|
12484
|
+
return css44`
|
|
12485
12485
|
border-color: ${itemNumber2.active.borderColor};
|
|
12486
12486
|
color: ${itemNumber2.active.color};
|
|
12487
12487
|
background-color: ${itemNumber2.active.backgroundColor};
|
|
12488
12488
|
`;
|
|
12489
12489
|
case "activeCompleted":
|
|
12490
|
-
return
|
|
12490
|
+
return css44`
|
|
12491
12491
|
border-color: ${itemNumber2.completed.borderColor};
|
|
12492
12492
|
color: ${itemNumber2.completed.color};
|
|
12493
12493
|
background-color: ${itemNumber2.completed.backgroundColor};
|
|
12494
12494
|
`;
|
|
12495
12495
|
case "inactiveCompleted":
|
|
12496
|
-
return
|
|
12496
|
+
return css44`
|
|
12497
12497
|
border-color: ${itemNumber2.completed.borderColor};
|
|
12498
12498
|
color: ${itemNumber2.completed.color};
|
|
12499
12499
|
background-color: ${itemNumber2.completed.backgroundColor};
|
|
12500
12500
|
`;
|
|
12501
12501
|
case "inactiveIncomplete":
|
|
12502
|
-
return
|
|
12502
|
+
return css44`
|
|
12503
12503
|
border-color: ${itemNumber2.inactive.borderColor};
|
|
12504
12504
|
color: ${itemNumber2.inactive.color};
|
|
12505
12505
|
background-color: ${itemNumber2.inactive.backgroundColor};
|
|
12506
12506
|
`;
|
|
12507
12507
|
case "disabled":
|
|
12508
|
-
return
|
|
12508
|
+
return css44`
|
|
12509
12509
|
border-color: ${itemNumber2.disabled.borderColor};
|
|
12510
12510
|
color: ${itemNumber2.disabled.color};
|
|
12511
12511
|
background-color: ${itemNumber2.disabled.backgroundColor};
|
|
@@ -12523,18 +12523,18 @@ var ItemText = styled85.div`
|
|
|
12523
12523
|
switch (state) {
|
|
12524
12524
|
case "activeCompleted":
|
|
12525
12525
|
case "activeIncomplete":
|
|
12526
|
-
return
|
|
12526
|
+
return css44`
|
|
12527
12527
|
color: ${itemText2.active.color};
|
|
12528
12528
|
text-decoration-color: ${itemText2.active.textDecorationColor};
|
|
12529
12529
|
`;
|
|
12530
12530
|
case "inactiveCompleted":
|
|
12531
12531
|
case "inactiveIncomplete":
|
|
12532
|
-
return
|
|
12532
|
+
return css44`
|
|
12533
12533
|
color: ${itemText2.inactive.color};
|
|
12534
12534
|
text-decoration-color: ${itemText2.inactive.textDecorationColor};
|
|
12535
12535
|
`;
|
|
12536
12536
|
case "disabled":
|
|
12537
|
-
return
|
|
12537
|
+
return css44`
|
|
12538
12538
|
color: ${itemText2.disabled.color};
|
|
12539
12539
|
text-decoration: ${itemText2.disabled.textDecoration};
|
|
12540
12540
|
`;
|
|
@@ -12558,7 +12558,7 @@ var ItemContentWrapper = styled85.button`
|
|
|
12558
12558
|
${focusVisible}
|
|
12559
12559
|
}
|
|
12560
12560
|
|
|
12561
|
-
${({ $state: state }) => state !== "disabled" &&
|
|
12561
|
+
${({ $state: state }) => state !== "disabled" && css44`
|
|
12562
12562
|
cursor: pointer;
|
|
12563
12563
|
`}
|
|
12564
12564
|
`;
|
|
@@ -12759,7 +12759,7 @@ InlineEdit.displayName = "InlineEdit";
|
|
|
12759
12759
|
import { forwardRef as forwardRef65, useId as useId23, useRef as useRef27 } from "react";
|
|
12760
12760
|
|
|
12761
12761
|
// src/components/InlineEdit/InlineEdit.styles.tsx
|
|
12762
|
-
import styled87, { css as
|
|
12762
|
+
import styled87, { css as css45 } from "styled-components";
|
|
12763
12763
|
|
|
12764
12764
|
// src/components/InlineEdit/InlineEdit.tokens.ts
|
|
12765
12765
|
import { ddsBaseTokens as ddsBaseTokens53 } from "@norges-domstoler/dds-design-tokens";
|
|
@@ -12797,7 +12797,7 @@ var StyledInlineInput = styled87(StatefulInput).withConfig({
|
|
|
12797
12797
|
background-color: ${inlineEdit2.backgroundColor};
|
|
12798
12798
|
padding: ${inlineEdit2.padding};
|
|
12799
12799
|
${inlineEdit2.font};
|
|
12800
|
-
${({ isEditing, hideIcon }) => !isEditing && !hideIcon &&
|
|
12800
|
+
${({ isEditing, hideIcon }) => !isEditing && !hideIcon && css45`
|
|
12801
12801
|
padding-left: ${inlineEdit2.withIcon.paddingLeft};
|
|
12802
12802
|
`}
|
|
12803
12803
|
|
|
@@ -12856,7 +12856,7 @@ var InlineTextArea = forwardRef65((props, ref) => {
|
|
|
12856
12856
|
const descId = derivativeIdGenerator(uniqueId, "desc");
|
|
12857
12857
|
const inputRef = useRef27(null);
|
|
12858
12858
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
12859
|
-
return /* @__PURE__ */ jsxs65(OuterInputContainer, { width, children: [
|
|
12859
|
+
return /* @__PURE__ */ jsxs65(OuterInputContainer, { $width: width, children: [
|
|
12860
12860
|
/* @__PURE__ */ jsxs65(InputContainer, { children: [
|
|
12861
12861
|
!isEditing && !hideIcon && /* @__PURE__ */ jsx255(
|
|
12862
12862
|
IconWrapper2,
|
|
@@ -12940,7 +12940,7 @@ var InlineInput = forwardRef67(
|
|
|
12940
12940
|
const descId = derivativeIdGenerator(uniqueId, "desc");
|
|
12941
12941
|
const inputRef = useRef29(null);
|
|
12942
12942
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
12943
|
-
return /* @__PURE__ */ jsxs66(OuterInputContainer, { width, children: [
|
|
12943
|
+
return /* @__PURE__ */ jsxs66(OuterInputContainer, { $width: width, children: [
|
|
12944
12944
|
/* @__PURE__ */ jsxs66(InputContainer, { children: [
|
|
12945
12945
|
!isEditing && !hideIcon && /* @__PURE__ */ jsx257(
|
|
12946
12946
|
IconWrapper2,
|
|
@@ -13068,7 +13068,7 @@ var TextArea = forwardRef69(
|
|
|
13068
13068
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
13069
13069
|
const showRequiredStyling = required || !!ariaRequired;
|
|
13070
13070
|
const containerProps = {
|
|
13071
|
-
width,
|
|
13071
|
+
$width: width,
|
|
13072
13072
|
className,
|
|
13073
13073
|
style
|
|
13074
13074
|
};
|
|
@@ -13188,7 +13188,7 @@ SplitButton.displayName = "SplitButton";
|
|
|
13188
13188
|
|
|
13189
13189
|
// src/components/Stack/Stack.tsx
|
|
13190
13190
|
import { forwardRef as forwardRef71 } from "react";
|
|
13191
|
-
import styled90, { css as
|
|
13191
|
+
import styled90, { css as css46 } from "styled-components";
|
|
13192
13192
|
|
|
13193
13193
|
// src/components/Stack/Stack.tokens.tsx
|
|
13194
13194
|
import { ddsBaseTokens as ddsBaseTokens56 } from "@norges-domstoler/dds-design-tokens";
|
|
@@ -13230,11 +13230,11 @@ var Stack = styled90.div.withConfig({
|
|
|
13230
13230
|
align-items: ${(props) => props.align};
|
|
13231
13231
|
justify-content: ${(props) => props.justify};
|
|
13232
13232
|
|
|
13233
|
-
${({ gap }) => gap !== void 0 &&
|
|
13233
|
+
${({ gap }) => gap !== void 0 && css46`
|
|
13234
13234
|
gap: ${gap === 0 ? "0" : stackTokens.spacing[gap]};
|
|
13235
13235
|
`}
|
|
13236
13236
|
|
|
13237
|
-
${({ padding }) => padding !== void 0 &&
|
|
13237
|
+
${({ padding }) => padding !== void 0 && css46`
|
|
13238
13238
|
padding: ${padding === 0 ? "0" : stackTokens.spacing[padding]};
|
|
13239
13239
|
`}
|
|
13240
13240
|
`;
|
|
@@ -13896,12 +13896,12 @@ var CommentComponent = ({
|
|
|
13896
13896
|
|
|
13897
13897
|
// src/components/Feedback/RatingComponent.tsx
|
|
13898
13898
|
import { ddsBaseTokens as ddsBaseTokens61 } from "@norges-domstoler/dds-design-tokens";
|
|
13899
|
-
import styled97, { css as
|
|
13899
|
+
import styled97, { css as css47 } from "styled-components";
|
|
13900
13900
|
import { jsx as jsx268, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
13901
13901
|
var RatingContainer = styled97.div`
|
|
13902
13902
|
display: flex;
|
|
13903
13903
|
gap: ${ddsBaseTokens61.spacing.SizesDdsSpacingX1};
|
|
13904
|
-
${({ $layout }) =>
|
|
13904
|
+
${({ $layout }) => css47`
|
|
13905
13905
|
flex-direction: ${$layout === "horizontal" ? "row" : "column"};
|
|
13906
13906
|
align-items: ${$layout === "horizontal" ? "center" : "start"};
|
|
13907
13907
|
`}
|