@navikt/ds-react 5.2.1 → 5.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_docs.json +336 -140
- package/cjs/date/DateInput.js +1 -1
- package/cjs/date/monthpicker/MonthButton.js +5 -5
- package/cjs/form/Textarea.js +1 -4
- package/cjs/guide-panel/GuidePanel.js +7 -5
- package/cjs/guide-panel/Illustration.js +12 -16
- package/cjs/typography/BodyLong.js +14 -7
- package/cjs/typography/BodyShort.js +13 -8
- package/cjs/typography/Detail.js +14 -7
- package/cjs/typography/ErrorMessage.js +6 -4
- package/cjs/typography/Heading.js +10 -6
- package/cjs/typography/Ingress.js +4 -2
- package/cjs/typography/Label.js +10 -6
- package/cjs/typography/types.js +2 -0
- package/cjs/typography/util.js +19 -0
- package/esm/date/DateInput.js +1 -1
- package/esm/date/DateInput.js.map +1 -1
- package/esm/date/monthpicker/MonthButton.js +5 -5
- package/esm/date/monthpicker/MonthButton.js.map +1 -1
- package/esm/form/Textarea.js +1 -4
- package/esm/form/Textarea.js.map +1 -1
- package/esm/guide-panel/GuidePanel.d.ts +3 -3
- package/esm/guide-panel/GuidePanel.js +7 -5
- package/esm/guide-panel/GuidePanel.js.map +1 -1
- package/esm/guide-panel/Illustration.js +12 -16
- package/esm/guide-panel/Illustration.js.map +1 -1
- package/esm/guide-panel/index.d.ts +0 -1
- package/esm/guide-panel/index.js.map +1 -1
- package/esm/typography/BodyLong.d.ts +9 -10
- package/esm/typography/BodyLong.js +14 -7
- package/esm/typography/BodyLong.js.map +1 -1
- package/esm/typography/BodyShort.d.ts +6 -9
- package/esm/typography/BodyShort.js +13 -8
- package/esm/typography/BodyShort.js.map +1 -1
- package/esm/typography/Detail.d.ts +4 -7
- package/esm/typography/Detail.js +14 -7
- package/esm/typography/Detail.js.map +1 -1
- package/esm/typography/ErrorMessage.d.ts +4 -7
- package/esm/typography/ErrorMessage.js +6 -4
- package/esm/typography/ErrorMessage.js.map +1 -1
- package/esm/typography/Heading.d.ts +3 -7
- package/esm/typography/Heading.js +10 -6
- package/esm/typography/Heading.js.map +1 -1
- package/esm/typography/Ingress.d.ts +4 -2
- package/esm/typography/Ingress.js +4 -2
- package/esm/typography/Ingress.js.map +1 -1
- package/esm/typography/Label.d.ts +4 -7
- package/esm/typography/Label.js +10 -6
- package/esm/typography/Label.js.map +1 -1
- package/esm/typography/types.d.ts +26 -0
- package/esm/typography/types.js +2 -0
- package/esm/typography/types.js.map +1 -0
- package/esm/typography/util.d.ts +4 -0
- package/esm/typography/util.js +13 -0
- package/esm/typography/util.js.map +1 -0
- package/package.json +2 -2
- package/src/date/DateInput.tsx +1 -1
- package/src/date/datepicker/datepicker.stories.tsx +23 -19
- package/src/date/monthpicker/MonthButton.tsx +5 -7
- package/src/date/monthpicker/monthpicker.stories.tsx +30 -32
- package/src/form/Textarea.tsx +1 -1
- package/src/guide-panel/GuidePanel.tsx +11 -10
- package/src/guide-panel/Illustration.tsx +23 -47
- package/src/guide-panel/guidepanel.stories.tsx +39 -14
- package/src/guide-panel/index.ts +0 -1
- package/src/typography/BodyLong.tsx +36 -15
- package/src/typography/BodyShort.tsx +34 -15
- package/src/typography/Detail.tsx +28 -13
- package/src/typography/ErrorMessage.tsx +17 -11
- package/src/typography/Heading.tsx +32 -12
- package/src/typography/Ingress.tsx +4 -2
- package/src/typography/Label.tsx +28 -13
- package/src/typography/stories/bodylong.stories.tsx +165 -0
- package/src/typography/stories/bodyshort.stories.tsx +164 -0
- package/src/typography/stories/detail.stories.tsx +88 -0
- package/src/typography/stories/error-message.stories.tsx +93 -0
- package/src/typography/stories/heading.stories.tsx +143 -0
- package/src/typography/stories/ingress.stories.tsx +51 -0
- package/src/typography/stories/label.stories.tsx +98 -0
- package/src/typography/types.ts +26 -0
- package/src/typography/util.ts +14 -0
- package/cjs/guide-panel/Guide.js +0 -48
- package/esm/guide-panel/Guide.d.ts +0 -14
- package/esm/guide-panel/Guide.js +0 -21
- package/esm/guide-panel/Guide.js.map +0 -1
- package/src/guide-panel/Guide.tsx +0 -34
- package/src/typography/heading.stories.tsx +0 -77
- package/src/typography/typography.stories.tsx +0 -166
package/_docs.json
CHANGED
|
@@ -4423,90 +4423,6 @@
|
|
|
4423
4423
|
}
|
|
4424
4424
|
}
|
|
4425
4425
|
},
|
|
4426
|
-
{
|
|
4427
|
-
"filePath": "src/guide-panel/Guide.tsx",
|
|
4428
|
-
"displayName": "Guide",
|
|
4429
|
-
"props": {
|
|
4430
|
-
"illustration": {
|
|
4431
|
-
"defaultValue": null,
|
|
4432
|
-
"description": "Custom svg/img element",
|
|
4433
|
-
"name": "illustration",
|
|
4434
|
-
"parent": {
|
|
4435
|
-
"fileName": "src/guide-panel/Guide.tsx",
|
|
4436
|
-
"name": "GuideProps"
|
|
4437
|
-
},
|
|
4438
|
-
"declarations": [
|
|
4439
|
-
{
|
|
4440
|
-
"fileName": "src/guide-panel/Guide.tsx",
|
|
4441
|
-
"name": "GuideProps"
|
|
4442
|
-
}
|
|
4443
|
-
],
|
|
4444
|
-
"required": false,
|
|
4445
|
-
"type": {
|
|
4446
|
-
"name": "ReactNode"
|
|
4447
|
-
}
|
|
4448
|
-
},
|
|
4449
|
-
"size": {
|
|
4450
|
-
"defaultValue": {
|
|
4451
|
-
"value": "medium"
|
|
4452
|
-
},
|
|
4453
|
-
"description": "Predefined size properties for illustration",
|
|
4454
|
-
"name": "size",
|
|
4455
|
-
"parent": {
|
|
4456
|
-
"fileName": "src/guide-panel/Guide.tsx",
|
|
4457
|
-
"name": "GuideProps"
|
|
4458
|
-
},
|
|
4459
|
-
"declarations": [
|
|
4460
|
-
{
|
|
4461
|
-
"fileName": "src/guide-panel/Guide.tsx",
|
|
4462
|
-
"name": "GuideProps"
|
|
4463
|
-
}
|
|
4464
|
-
],
|
|
4465
|
-
"required": false,
|
|
4466
|
-
"type": {
|
|
4467
|
-
"name": "\"small\" | \"medium\""
|
|
4468
|
-
}
|
|
4469
|
-
},
|
|
4470
|
-
"className": {
|
|
4471
|
-
"defaultValue": null,
|
|
4472
|
-
"description": "",
|
|
4473
|
-
"name": "className",
|
|
4474
|
-
"parent": {
|
|
4475
|
-
"fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
|
|
4476
|
-
"name": "HTMLAttributes"
|
|
4477
|
-
},
|
|
4478
|
-
"declarations": [
|
|
4479
|
-
{
|
|
4480
|
-
"fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
|
|
4481
|
-
"name": "HTMLAttributes"
|
|
4482
|
-
}
|
|
4483
|
-
],
|
|
4484
|
-
"required": false,
|
|
4485
|
-
"type": {
|
|
4486
|
-
"name": "string"
|
|
4487
|
-
}
|
|
4488
|
-
},
|
|
4489
|
-
"ref": {
|
|
4490
|
-
"defaultValue": null,
|
|
4491
|
-
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).\n@see https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom",
|
|
4492
|
-
"name": "ref",
|
|
4493
|
-
"parent": {
|
|
4494
|
-
"fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
|
|
4495
|
-
"name": "RefAttributes"
|
|
4496
|
-
},
|
|
4497
|
-
"declarations": [
|
|
4498
|
-
{
|
|
4499
|
-
"fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
|
|
4500
|
-
"name": "RefAttributes"
|
|
4501
|
-
}
|
|
4502
|
-
],
|
|
4503
|
-
"required": false,
|
|
4504
|
-
"type": {
|
|
4505
|
-
"name": "Ref<HTMLDivElement>"
|
|
4506
|
-
}
|
|
4507
|
-
}
|
|
4508
|
-
}
|
|
4509
|
-
},
|
|
4510
4426
|
{
|
|
4511
4427
|
"filePath": "src/guide-panel/GuidePanel.tsx",
|
|
4512
4428
|
"displayName": "GuidePanel",
|
|
@@ -4551,9 +4467,9 @@
|
|
|
4551
4467
|
},
|
|
4552
4468
|
"poster": {
|
|
4553
4469
|
"defaultValue": {
|
|
4554
|
-
"value": "
|
|
4470
|
+
"value": "true on mobile (<480px)"
|
|
4555
4471
|
},
|
|
4556
|
-
"description": "
|
|
4472
|
+
"description": "Render illustation above content",
|
|
4557
4473
|
"name": "poster",
|
|
4558
4474
|
"parent": {
|
|
4559
4475
|
"fileName": "src/guide-panel/GuidePanel.tsx",
|
|
@@ -9665,7 +9581,7 @@
|
|
|
9665
9581
|
"defaultValue": {
|
|
9666
9582
|
"value": "medium"
|
|
9667
9583
|
},
|
|
9668
|
-
"description": "medium: 18px, small: 16px",
|
|
9584
|
+
"description": "large: 20px, medium: 18px, small: 16px",
|
|
9669
9585
|
"name": "size",
|
|
9670
9586
|
"parent": {
|
|
9671
9587
|
"fileName": "src/typography/BodyLong.tsx",
|
|
@@ -9679,12 +9595,12 @@
|
|
|
9679
9595
|
],
|
|
9680
9596
|
"required": false,
|
|
9681
9597
|
"type": {
|
|
9682
|
-
"name": "\"medium\" | \"small\""
|
|
9598
|
+
"name": "\"large\" | \"medium\" | \"small\""
|
|
9683
9599
|
}
|
|
9684
9600
|
},
|
|
9685
9601
|
"children": {
|
|
9686
9602
|
"defaultValue": null,
|
|
9687
|
-
"description": "
|
|
9603
|
+
"description": "Text",
|
|
9688
9604
|
"name": "children",
|
|
9689
9605
|
"parent": {
|
|
9690
9606
|
"fileName": "src/typography/BodyLong.tsx",
|
|
@@ -9701,18 +9617,76 @@
|
|
|
9701
9617
|
"name": "ReactNode"
|
|
9702
9618
|
}
|
|
9703
9619
|
},
|
|
9620
|
+
"truncate": {
|
|
9621
|
+
"defaultValue": null,
|
|
9622
|
+
"description": "Truncate text overflow with ellipsis.",
|
|
9623
|
+
"name": "truncate",
|
|
9624
|
+
"declarations": [
|
|
9625
|
+
{
|
|
9626
|
+
"fileName": "react/src/typography/types.ts",
|
|
9627
|
+
"name": "TypeLiteral"
|
|
9628
|
+
}
|
|
9629
|
+
],
|
|
9630
|
+
"required": false,
|
|
9631
|
+
"type": {
|
|
9632
|
+
"name": "boolean"
|
|
9633
|
+
}
|
|
9634
|
+
},
|
|
9635
|
+
"weight": {
|
|
9636
|
+
"defaultValue": {
|
|
9637
|
+
"value": "regular"
|
|
9638
|
+
},
|
|
9639
|
+
"description": "Adjusts font-weight.",
|
|
9640
|
+
"name": "weight",
|
|
9641
|
+
"declarations": [
|
|
9642
|
+
{
|
|
9643
|
+
"fileName": "react/src/typography/types.ts",
|
|
9644
|
+
"name": "TypeLiteral"
|
|
9645
|
+
}
|
|
9646
|
+
],
|
|
9647
|
+
"required": false,
|
|
9648
|
+
"type": {
|
|
9649
|
+
"name": "\"regular\" | \"semibold\""
|
|
9650
|
+
}
|
|
9651
|
+
},
|
|
9652
|
+
"align": {
|
|
9653
|
+
"defaultValue": null,
|
|
9654
|
+
"description": "Adjust text-align.",
|
|
9655
|
+
"name": "align",
|
|
9656
|
+
"declarations": [
|
|
9657
|
+
{
|
|
9658
|
+
"fileName": "react/src/typography/types.ts",
|
|
9659
|
+
"name": "TypeLiteral"
|
|
9660
|
+
}
|
|
9661
|
+
],
|
|
9662
|
+
"required": false,
|
|
9663
|
+
"type": {
|
|
9664
|
+
"name": "\"start\" | \"center\" | \"end\""
|
|
9665
|
+
}
|
|
9666
|
+
},
|
|
9667
|
+
"visuallyHidden": {
|
|
9668
|
+
"defaultValue": null,
|
|
9669
|
+
"description": "Visually hide text. Text will still be accessible for screenreaders",
|
|
9670
|
+
"name": "visuallyHidden",
|
|
9671
|
+
"declarations": [
|
|
9672
|
+
{
|
|
9673
|
+
"fileName": "react/src/typography/types.ts",
|
|
9674
|
+
"name": "TypeLiteral"
|
|
9675
|
+
}
|
|
9676
|
+
],
|
|
9677
|
+
"required": false,
|
|
9678
|
+
"type": {
|
|
9679
|
+
"name": "boolean"
|
|
9680
|
+
}
|
|
9681
|
+
},
|
|
9704
9682
|
"spacing": {
|
|
9705
9683
|
"defaultValue": null,
|
|
9706
|
-
"description": "Adds
|
|
9684
|
+
"description": "Adds spacing below text",
|
|
9707
9685
|
"name": "spacing",
|
|
9708
|
-
"parent": {
|
|
9709
|
-
"fileName": "src/typography/BodyLong.tsx",
|
|
9710
|
-
"name": "BodyLongProps"
|
|
9711
|
-
},
|
|
9712
9686
|
"declarations": [
|
|
9713
9687
|
{
|
|
9714
|
-
"fileName": "src/typography/
|
|
9715
|
-
"name": "
|
|
9688
|
+
"fileName": "react/src/typography/types.ts",
|
|
9689
|
+
"name": "TypeLiteral"
|
|
9716
9690
|
}
|
|
9717
9691
|
],
|
|
9718
9692
|
"required": false,
|
|
@@ -9720,6 +9694,21 @@
|
|
|
9720
9694
|
"name": "boolean"
|
|
9721
9695
|
}
|
|
9722
9696
|
},
|
|
9697
|
+
"textColor": {
|
|
9698
|
+
"defaultValue": null,
|
|
9699
|
+
"description": "Adjusts color",
|
|
9700
|
+
"name": "textColor",
|
|
9701
|
+
"declarations": [
|
|
9702
|
+
{
|
|
9703
|
+
"fileName": "react/src/typography/types.ts",
|
|
9704
|
+
"name": "TypeLiteral"
|
|
9705
|
+
}
|
|
9706
|
+
],
|
|
9707
|
+
"required": false,
|
|
9708
|
+
"type": {
|
|
9709
|
+
"name": "\"default\" | \"subtle\""
|
|
9710
|
+
}
|
|
9711
|
+
},
|
|
9723
9712
|
"className": {
|
|
9724
9713
|
"defaultValue": null,
|
|
9725
9714
|
"description": "",
|
|
@@ -9768,7 +9757,7 @@
|
|
|
9768
9757
|
"defaultValue": {
|
|
9769
9758
|
"value": "medium"
|
|
9770
9759
|
},
|
|
9771
|
-
"description": "medium: 18px, small: 16px",
|
|
9760
|
+
"description": "large: 20px, medium: 18px, small: 16px",
|
|
9772
9761
|
"name": "size",
|
|
9773
9762
|
"parent": {
|
|
9774
9763
|
"fileName": "src/typography/BodyShort.tsx",
|
|
@@ -9782,7 +9771,7 @@
|
|
|
9782
9771
|
],
|
|
9783
9772
|
"required": false,
|
|
9784
9773
|
"type": {
|
|
9785
|
-
"name": "\"medium\" | \"small\""
|
|
9774
|
+
"name": "\"large\" | \"medium\" | \"small\""
|
|
9786
9775
|
}
|
|
9787
9776
|
},
|
|
9788
9777
|
"children": {
|
|
@@ -9804,18 +9793,76 @@
|
|
|
9804
9793
|
"name": "ReactNode"
|
|
9805
9794
|
}
|
|
9806
9795
|
},
|
|
9796
|
+
"truncate": {
|
|
9797
|
+
"defaultValue": null,
|
|
9798
|
+
"description": "Truncate text overflow with ellipsis.",
|
|
9799
|
+
"name": "truncate",
|
|
9800
|
+
"declarations": [
|
|
9801
|
+
{
|
|
9802
|
+
"fileName": "react/src/typography/types.ts",
|
|
9803
|
+
"name": "TypeLiteral"
|
|
9804
|
+
}
|
|
9805
|
+
],
|
|
9806
|
+
"required": false,
|
|
9807
|
+
"type": {
|
|
9808
|
+
"name": "boolean"
|
|
9809
|
+
}
|
|
9810
|
+
},
|
|
9811
|
+
"weight": {
|
|
9812
|
+
"defaultValue": {
|
|
9813
|
+
"value": "regular"
|
|
9814
|
+
},
|
|
9815
|
+
"description": "Adjusts font-weight.",
|
|
9816
|
+
"name": "weight",
|
|
9817
|
+
"declarations": [
|
|
9818
|
+
{
|
|
9819
|
+
"fileName": "react/src/typography/types.ts",
|
|
9820
|
+
"name": "TypeLiteral"
|
|
9821
|
+
}
|
|
9822
|
+
],
|
|
9823
|
+
"required": false,
|
|
9824
|
+
"type": {
|
|
9825
|
+
"name": "\"regular\" | \"semibold\""
|
|
9826
|
+
}
|
|
9827
|
+
},
|
|
9828
|
+
"align": {
|
|
9829
|
+
"defaultValue": null,
|
|
9830
|
+
"description": "Adjust text-align.",
|
|
9831
|
+
"name": "align",
|
|
9832
|
+
"declarations": [
|
|
9833
|
+
{
|
|
9834
|
+
"fileName": "react/src/typography/types.ts",
|
|
9835
|
+
"name": "TypeLiteral"
|
|
9836
|
+
}
|
|
9837
|
+
],
|
|
9838
|
+
"required": false,
|
|
9839
|
+
"type": {
|
|
9840
|
+
"name": "\"start\" | \"center\" | \"end\""
|
|
9841
|
+
}
|
|
9842
|
+
},
|
|
9843
|
+
"visuallyHidden": {
|
|
9844
|
+
"defaultValue": null,
|
|
9845
|
+
"description": "Visually hide text. Text will still be accessible for screenreaders",
|
|
9846
|
+
"name": "visuallyHidden",
|
|
9847
|
+
"declarations": [
|
|
9848
|
+
{
|
|
9849
|
+
"fileName": "react/src/typography/types.ts",
|
|
9850
|
+
"name": "TypeLiteral"
|
|
9851
|
+
}
|
|
9852
|
+
],
|
|
9853
|
+
"required": false,
|
|
9854
|
+
"type": {
|
|
9855
|
+
"name": "boolean"
|
|
9856
|
+
}
|
|
9857
|
+
},
|
|
9807
9858
|
"spacing": {
|
|
9808
9859
|
"defaultValue": null,
|
|
9809
|
-
"description": "Adds
|
|
9860
|
+
"description": "Adds spacing below text",
|
|
9810
9861
|
"name": "spacing",
|
|
9811
|
-
"parent": {
|
|
9812
|
-
"fileName": "src/typography/BodyShort.tsx",
|
|
9813
|
-
"name": "BodyShortProps"
|
|
9814
|
-
},
|
|
9815
9862
|
"declarations": [
|
|
9816
9863
|
{
|
|
9817
|
-
"fileName": "src/typography/
|
|
9818
|
-
"name": "
|
|
9864
|
+
"fileName": "react/src/typography/types.ts",
|
|
9865
|
+
"name": "TypeLiteral"
|
|
9819
9866
|
}
|
|
9820
9867
|
],
|
|
9821
9868
|
"required": false,
|
|
@@ -9823,6 +9870,21 @@
|
|
|
9823
9870
|
"name": "boolean"
|
|
9824
9871
|
}
|
|
9825
9872
|
},
|
|
9873
|
+
"textColor": {
|
|
9874
|
+
"defaultValue": null,
|
|
9875
|
+
"description": "Adjusts color",
|
|
9876
|
+
"name": "textColor",
|
|
9877
|
+
"declarations": [
|
|
9878
|
+
{
|
|
9879
|
+
"fileName": "react/src/typography/types.ts",
|
|
9880
|
+
"name": "TypeLiteral"
|
|
9881
|
+
}
|
|
9882
|
+
],
|
|
9883
|
+
"required": false,
|
|
9884
|
+
"type": {
|
|
9885
|
+
"name": "\"default\" | \"subtle\""
|
|
9886
|
+
}
|
|
9887
|
+
},
|
|
9826
9888
|
"className": {
|
|
9827
9889
|
"defaultValue": null,
|
|
9828
9890
|
"description": "",
|
|
@@ -9907,10 +9969,10 @@
|
|
|
9907
9969
|
"name": "ReactNode"
|
|
9908
9970
|
}
|
|
9909
9971
|
},
|
|
9910
|
-
"
|
|
9972
|
+
"uppercase": {
|
|
9911
9973
|
"defaultValue": null,
|
|
9912
|
-
"description": "
|
|
9913
|
-
"name": "
|
|
9974
|
+
"description": "All caps",
|
|
9975
|
+
"name": "uppercase",
|
|
9914
9976
|
"parent": {
|
|
9915
9977
|
"fileName": "src/typography/Detail.tsx",
|
|
9916
9978
|
"name": "DetailProps"
|
|
@@ -9926,18 +9988,76 @@
|
|
|
9926
9988
|
"name": "boolean"
|
|
9927
9989
|
}
|
|
9928
9990
|
},
|
|
9929
|
-
"
|
|
9991
|
+
"truncate": {
|
|
9930
9992
|
"defaultValue": null,
|
|
9931
|
-
"description": "
|
|
9932
|
-
"name": "
|
|
9933
|
-
"
|
|
9934
|
-
|
|
9935
|
-
|
|
9993
|
+
"description": "Truncate text overflow with ellipsis.",
|
|
9994
|
+
"name": "truncate",
|
|
9995
|
+
"declarations": [
|
|
9996
|
+
{
|
|
9997
|
+
"fileName": "react/src/typography/types.ts",
|
|
9998
|
+
"name": "TypeLiteral"
|
|
9999
|
+
}
|
|
10000
|
+
],
|
|
10001
|
+
"required": false,
|
|
10002
|
+
"type": {
|
|
10003
|
+
"name": "boolean"
|
|
10004
|
+
}
|
|
10005
|
+
},
|
|
10006
|
+
"weight": {
|
|
10007
|
+
"defaultValue": {
|
|
10008
|
+
"value": "regular"
|
|
9936
10009
|
},
|
|
10010
|
+
"description": "Adjusts font-weight.",
|
|
10011
|
+
"name": "weight",
|
|
9937
10012
|
"declarations": [
|
|
9938
10013
|
{
|
|
9939
|
-
"fileName": "src/typography/
|
|
9940
|
-
"name": "
|
|
10014
|
+
"fileName": "react/src/typography/types.ts",
|
|
10015
|
+
"name": "TypeLiteral"
|
|
10016
|
+
}
|
|
10017
|
+
],
|
|
10018
|
+
"required": false,
|
|
10019
|
+
"type": {
|
|
10020
|
+
"name": "\"regular\" | \"semibold\""
|
|
10021
|
+
}
|
|
10022
|
+
},
|
|
10023
|
+
"align": {
|
|
10024
|
+
"defaultValue": null,
|
|
10025
|
+
"description": "Adjust text-align.",
|
|
10026
|
+
"name": "align",
|
|
10027
|
+
"declarations": [
|
|
10028
|
+
{
|
|
10029
|
+
"fileName": "react/src/typography/types.ts",
|
|
10030
|
+
"name": "TypeLiteral"
|
|
10031
|
+
}
|
|
10032
|
+
],
|
|
10033
|
+
"required": false,
|
|
10034
|
+
"type": {
|
|
10035
|
+
"name": "\"start\" | \"center\" | \"end\""
|
|
10036
|
+
}
|
|
10037
|
+
},
|
|
10038
|
+
"visuallyHidden": {
|
|
10039
|
+
"defaultValue": null,
|
|
10040
|
+
"description": "Visually hide text. Text will still be accessible for screenreaders",
|
|
10041
|
+
"name": "visuallyHidden",
|
|
10042
|
+
"declarations": [
|
|
10043
|
+
{
|
|
10044
|
+
"fileName": "react/src/typography/types.ts",
|
|
10045
|
+
"name": "TypeLiteral"
|
|
10046
|
+
}
|
|
10047
|
+
],
|
|
10048
|
+
"required": false,
|
|
10049
|
+
"type": {
|
|
10050
|
+
"name": "boolean"
|
|
10051
|
+
}
|
|
10052
|
+
},
|
|
10053
|
+
"spacing": {
|
|
10054
|
+
"defaultValue": null,
|
|
10055
|
+
"description": "Adds spacing below text",
|
|
10056
|
+
"name": "spacing",
|
|
10057
|
+
"declarations": [
|
|
10058
|
+
{
|
|
10059
|
+
"fileName": "react/src/typography/types.ts",
|
|
10060
|
+
"name": "TypeLiteral"
|
|
9941
10061
|
}
|
|
9942
10062
|
],
|
|
9943
10063
|
"required": false,
|
|
@@ -9945,6 +10065,21 @@
|
|
|
9945
10065
|
"name": "boolean"
|
|
9946
10066
|
}
|
|
9947
10067
|
},
|
|
10068
|
+
"textColor": {
|
|
10069
|
+
"defaultValue": null,
|
|
10070
|
+
"description": "Adjusts color",
|
|
10071
|
+
"name": "textColor",
|
|
10072
|
+
"declarations": [
|
|
10073
|
+
{
|
|
10074
|
+
"fileName": "react/src/typography/types.ts",
|
|
10075
|
+
"name": "TypeLiteral"
|
|
10076
|
+
}
|
|
10077
|
+
],
|
|
10078
|
+
"required": false,
|
|
10079
|
+
"type": {
|
|
10080
|
+
"name": "\"default\" | \"subtle\""
|
|
10081
|
+
}
|
|
10082
|
+
},
|
|
9948
10083
|
"className": {
|
|
9949
10084
|
"defaultValue": null,
|
|
9950
10085
|
"description": "",
|
|
@@ -10031,16 +10166,12 @@
|
|
|
10031
10166
|
},
|
|
10032
10167
|
"spacing": {
|
|
10033
10168
|
"defaultValue": null,
|
|
10034
|
-
"description": "Adds
|
|
10169
|
+
"description": "Adds spacing below text",
|
|
10035
10170
|
"name": "spacing",
|
|
10036
|
-
"parent": {
|
|
10037
|
-
"fileName": "src/typography/ErrorMessage.tsx",
|
|
10038
|
-
"name": "ErrorMessageProps"
|
|
10039
|
-
},
|
|
10040
10171
|
"declarations": [
|
|
10041
10172
|
{
|
|
10042
|
-
"fileName": "src/typography/
|
|
10043
|
-
"name": "
|
|
10173
|
+
"fileName": "react/src/typography/types.ts",
|
|
10174
|
+
"name": "TypeLiteral"
|
|
10044
10175
|
}
|
|
10045
10176
|
],
|
|
10046
10177
|
"required": false,
|
|
@@ -10152,19 +10283,28 @@
|
|
|
10152
10283
|
}
|
|
10153
10284
|
},
|
|
10154
10285
|
"spacing": {
|
|
10155
|
-
"defaultValue":
|
|
10156
|
-
|
|
10157
|
-
},
|
|
10158
|
-
"description": "Adds margin-bottom",
|
|
10286
|
+
"defaultValue": null,
|
|
10287
|
+
"description": "Adds spacing below text",
|
|
10159
10288
|
"name": "spacing",
|
|
10160
|
-
"parent": {
|
|
10161
|
-
"fileName": "src/typography/Heading.tsx",
|
|
10162
|
-
"name": "HeadingProps"
|
|
10163
|
-
},
|
|
10164
10289
|
"declarations": [
|
|
10165
10290
|
{
|
|
10166
|
-
"fileName": "src/typography/
|
|
10167
|
-
"name": "
|
|
10291
|
+
"fileName": "react/src/typography/types.ts",
|
|
10292
|
+
"name": "TypeLiteral"
|
|
10293
|
+
}
|
|
10294
|
+
],
|
|
10295
|
+
"required": false,
|
|
10296
|
+
"type": {
|
|
10297
|
+
"name": "boolean"
|
|
10298
|
+
}
|
|
10299
|
+
},
|
|
10300
|
+
"visuallyHidden": {
|
|
10301
|
+
"defaultValue": null,
|
|
10302
|
+
"description": "Visually hide text. Text will still be accessible for screenreaders",
|
|
10303
|
+
"name": "visuallyHidden",
|
|
10304
|
+
"declarations": [
|
|
10305
|
+
{
|
|
10306
|
+
"fileName": "react/src/typography/types.ts",
|
|
10307
|
+
"name": "TypeLiteral"
|
|
10168
10308
|
}
|
|
10169
10309
|
],
|
|
10170
10310
|
"required": false,
|
|
@@ -10172,6 +10312,36 @@
|
|
|
10172
10312
|
"name": "boolean"
|
|
10173
10313
|
}
|
|
10174
10314
|
},
|
|
10315
|
+
"align": {
|
|
10316
|
+
"defaultValue": null,
|
|
10317
|
+
"description": "Adjust text-align.",
|
|
10318
|
+
"name": "align",
|
|
10319
|
+
"declarations": [
|
|
10320
|
+
{
|
|
10321
|
+
"fileName": "react/src/typography/types.ts",
|
|
10322
|
+
"name": "TypeLiteral"
|
|
10323
|
+
}
|
|
10324
|
+
],
|
|
10325
|
+
"required": false,
|
|
10326
|
+
"type": {
|
|
10327
|
+
"name": "\"start\" | \"center\" | \"end\""
|
|
10328
|
+
}
|
|
10329
|
+
},
|
|
10330
|
+
"textColor": {
|
|
10331
|
+
"defaultValue": null,
|
|
10332
|
+
"description": "Adjusts color",
|
|
10333
|
+
"name": "textColor",
|
|
10334
|
+
"declarations": [
|
|
10335
|
+
{
|
|
10336
|
+
"fileName": "react/src/typography/types.ts",
|
|
10337
|
+
"name": "TypeLiteral"
|
|
10338
|
+
}
|
|
10339
|
+
],
|
|
10340
|
+
"required": false,
|
|
10341
|
+
"type": {
|
|
10342
|
+
"name": "\"default\" | \"subtle\""
|
|
10343
|
+
}
|
|
10344
|
+
},
|
|
10175
10345
|
"className": {
|
|
10176
10346
|
"defaultValue": null,
|
|
10177
10347
|
"description": "",
|
|
@@ -10338,18 +10508,29 @@
|
|
|
10338
10508
|
"name": "ReactNode"
|
|
10339
10509
|
}
|
|
10340
10510
|
},
|
|
10511
|
+
"visuallyHidden": {
|
|
10512
|
+
"defaultValue": null,
|
|
10513
|
+
"description": "Visually hide text. Text will still be accessible for screenreaders",
|
|
10514
|
+
"name": "visuallyHidden",
|
|
10515
|
+
"declarations": [
|
|
10516
|
+
{
|
|
10517
|
+
"fileName": "react/src/typography/types.ts",
|
|
10518
|
+
"name": "TypeLiteral"
|
|
10519
|
+
}
|
|
10520
|
+
],
|
|
10521
|
+
"required": false,
|
|
10522
|
+
"type": {
|
|
10523
|
+
"name": "boolean"
|
|
10524
|
+
}
|
|
10525
|
+
},
|
|
10341
10526
|
"spacing": {
|
|
10342
10527
|
"defaultValue": null,
|
|
10343
|
-
"description": "Adds
|
|
10528
|
+
"description": "Adds spacing below text",
|
|
10344
10529
|
"name": "spacing",
|
|
10345
|
-
"parent": {
|
|
10346
|
-
"fileName": "src/typography/Label.tsx",
|
|
10347
|
-
"name": "LabelProps"
|
|
10348
|
-
},
|
|
10349
10530
|
"declarations": [
|
|
10350
10531
|
{
|
|
10351
|
-
"fileName": "src/typography/
|
|
10352
|
-
"name": "
|
|
10532
|
+
"fileName": "react/src/typography/types.ts",
|
|
10533
|
+
"name": "TypeLiteral"
|
|
10353
10534
|
}
|
|
10354
10535
|
],
|
|
10355
10536
|
"required": false,
|
|
@@ -10357,6 +10538,21 @@
|
|
|
10357
10538
|
"name": "boolean"
|
|
10358
10539
|
}
|
|
10359
10540
|
},
|
|
10541
|
+
"textColor": {
|
|
10542
|
+
"defaultValue": null,
|
|
10543
|
+
"description": "Adjusts color",
|
|
10544
|
+
"name": "textColor",
|
|
10545
|
+
"declarations": [
|
|
10546
|
+
{
|
|
10547
|
+
"fileName": "react/src/typography/types.ts",
|
|
10548
|
+
"name": "TypeLiteral"
|
|
10549
|
+
}
|
|
10550
|
+
],
|
|
10551
|
+
"required": false,
|
|
10552
|
+
"type": {
|
|
10553
|
+
"name": "\"default\" | \"subtle\""
|
|
10554
|
+
}
|
|
10555
|
+
},
|
|
10360
10556
|
"className": {
|
|
10361
10557
|
"defaultValue": null,
|
|
10362
10558
|
"description": "",
|
package/cjs/date/DateInput.js
CHANGED
|
@@ -75,7 +75,7 @@ const DateInput = (0, react_1.forwardRef)((props, ref) => {
|
|
|
75
75
|
"navds-sr-only": hideLabel,
|
|
76
76
|
}), id: inputDescriptionId, size: size }, description)),
|
|
77
77
|
react_1.default.createElement("div", { className: "navds-date__field-wrapper" },
|
|
78
|
-
react_1.default.createElement("input", Object.assign({ ref: ref }, (0, __1.omit)(rest, ["error", "errorId", "size"]), inputProps, { autoComplete: "off", "aria-controls": open ? ariaId : undefined, readOnly: readOnly, className: (0, clsx_1.default)("navds-date__field-input", "navds-text-field__input", "navds-body-short", `navds-body
|
|
78
|
+
react_1.default.createElement("input", Object.assign({ ref: ref }, (0, __1.omit)(rest, ["error", "errorId", "size"]), inputProps, { autoComplete: "off", "aria-controls": open ? ariaId : undefined, readOnly: readOnly, className: (0, clsx_1.default)("navds-date__field-input", "navds-text-field__input", "navds-body-short", `navds-body-short--${size}`), size: 14 })),
|
|
79
79
|
react_1.default.createElement("button", { disabled: inputProps.disabled || readOnly, tabIndex: readOnly ? -1 : open ? -1 : 0, onClick: () => onOpen(), type: "button", className: "navds-date__field-button" },
|
|
80
80
|
react_1.default.createElement(aksel_icons_1.CalendarIcon, { pointerEvents: "none", title: open
|
|
81
81
|
? conditionalVariables.iconTitle.close
|
|
@@ -28,10 +28,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.MonthButton = void 0;
|
|
30
30
|
const clsx_1 = __importDefault(require("clsx"));
|
|
31
|
-
const compareAsc_1 = __importDefault(require("date-fns/compareAsc"));
|
|
32
|
-
const compareDesc_1 = __importDefault(require("date-fns/compareDesc"));
|
|
33
31
|
const format_1 = __importDefault(require("date-fns/format"));
|
|
34
32
|
const isSameMonth_1 = __importDefault(require("date-fns/isSameMonth"));
|
|
33
|
+
const isSameYear_1 = __importDefault(require("date-fns/isSameYear"));
|
|
35
34
|
const setYear_1 = __importDefault(require("date-fns/setYear"));
|
|
36
35
|
const react_1 = __importStar(require("react"));
|
|
37
36
|
const react_day_picker_1 = require("react-day-picker");
|
|
@@ -39,13 +38,14 @@ const context_1 = require("../context");
|
|
|
39
38
|
const utils_1 = require("../utils");
|
|
40
39
|
const disableMonth = (month, fromDate, toDate) => {
|
|
41
40
|
if (fromDate && toDate) {
|
|
42
|
-
return ((0,
|
|
41
|
+
return ((0, isSameMonth_1.default)(month, fromDate) && (0, isSameYear_1.default)(month, fromDate))
|
|
42
|
+
|| ((0, isSameMonth_1.default)(month, toDate) && (0, isSameYear_1.default)(month, toDate));
|
|
43
43
|
}
|
|
44
44
|
else if (fromDate) {
|
|
45
|
-
return (0,
|
|
45
|
+
return (0, isSameMonth_1.default)(month, fromDate) && (0, isSameYear_1.default)(month, fromDate);
|
|
46
46
|
}
|
|
47
47
|
else if (toDate) {
|
|
48
|
-
return (0,
|
|
48
|
+
return (0, isSameMonth_1.default)(month, toDate) && (0, isSameYear_1.default)(month, toDate);
|
|
49
49
|
}
|
|
50
50
|
return false;
|
|
51
51
|
};
|
package/cjs/form/Textarea.js
CHANGED
|
@@ -94,10 +94,7 @@ exports.Textarea = (0, react_1.forwardRef)((props, ref) => {
|
|
|
94
94
|
"navds-textarea--counter": hasMaxLength,
|
|
95
95
|
}) }, (describedBy ? { "aria-describedby": describedBy } : {}))),
|
|
96
96
|
hasMaxLength && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
97
|
-
react_1.default.createElement("span", { id: maxLengthId, className: "navds-sr-only" },
|
|
98
|
-
"Tekstomr\u00E5de med plass til ",
|
|
99
|
-
maxLength,
|
|
100
|
-
" tegn."),
|
|
97
|
+
react_1.default.createElement("span", { id: maxLengthId, className: "navds-sr-only" }, `Tekstområde med plass til ${maxLength} tegn.`),
|
|
101
98
|
react_1.default.createElement(exports.Counter, { maxLength: maxLength, currentLength: (_c = (_b = props.value) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : controlledValue === null || controlledValue === void 0 ? void 0 : controlledValue.length, size: size, i18n: i18n })))),
|
|
102
99
|
react_1.default.createElement("div", { className: "navds-form-field__error", id: errorId, "aria-relevant": "additions removals", "aria-live": "polite" }, showErrorMsg && (react_1.default.createElement(__1.ErrorMessage, { size: size }, props.error)))));
|
|
103
100
|
});
|