@navikt/ds-react 5.2.0 → 5.3.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.
Files changed (60) hide show
  1. package/_docs.json +334 -54
  2. package/cjs/form/Textarea.js +1 -4
  3. package/cjs/typography/BodyLong.js +14 -7
  4. package/cjs/typography/BodyShort.js +13 -8
  5. package/cjs/typography/Detail.js +14 -7
  6. package/cjs/typography/ErrorMessage.js +6 -4
  7. package/cjs/typography/Heading.js +10 -6
  8. package/cjs/typography/Ingress.js +4 -2
  9. package/cjs/typography/Label.js +10 -6
  10. package/cjs/typography/types.js +2 -0
  11. package/cjs/typography/util.js +19 -0
  12. package/esm/form/Textarea.js +1 -4
  13. package/esm/form/Textarea.js.map +1 -1
  14. package/esm/typography/BodyLong.d.ts +9 -10
  15. package/esm/typography/BodyLong.js +14 -7
  16. package/esm/typography/BodyLong.js.map +1 -1
  17. package/esm/typography/BodyShort.d.ts +6 -9
  18. package/esm/typography/BodyShort.js +13 -8
  19. package/esm/typography/BodyShort.js.map +1 -1
  20. package/esm/typography/Detail.d.ts +4 -7
  21. package/esm/typography/Detail.js +14 -7
  22. package/esm/typography/Detail.js.map +1 -1
  23. package/esm/typography/ErrorMessage.d.ts +4 -7
  24. package/esm/typography/ErrorMessage.js +6 -4
  25. package/esm/typography/ErrorMessage.js.map +1 -1
  26. package/esm/typography/Heading.d.ts +3 -7
  27. package/esm/typography/Heading.js +10 -6
  28. package/esm/typography/Heading.js.map +1 -1
  29. package/esm/typography/Ingress.d.ts +4 -2
  30. package/esm/typography/Ingress.js +4 -2
  31. package/esm/typography/Ingress.js.map +1 -1
  32. package/esm/typography/Label.d.ts +4 -7
  33. package/esm/typography/Label.js +10 -6
  34. package/esm/typography/Label.js.map +1 -1
  35. package/esm/typography/types.d.ts +26 -0
  36. package/esm/typography/types.js +2 -0
  37. package/esm/typography/types.js.map +1 -0
  38. package/esm/typography/util.d.ts +4 -0
  39. package/esm/typography/util.js +13 -0
  40. package/esm/typography/util.js.map +1 -0
  41. package/package.json +2 -2
  42. package/src/form/Textarea.tsx +1 -1
  43. package/src/typography/BodyLong.tsx +36 -15
  44. package/src/typography/BodyShort.tsx +34 -15
  45. package/src/typography/Detail.tsx +28 -13
  46. package/src/typography/ErrorMessage.tsx +17 -11
  47. package/src/typography/Heading.tsx +32 -12
  48. package/src/typography/Ingress.tsx +4 -2
  49. package/src/typography/Label.tsx +28 -13
  50. package/src/typography/stories/bodylong.stories.tsx +165 -0
  51. package/src/typography/stories/bodyshort.stories.tsx +164 -0
  52. package/src/typography/stories/detail.stories.tsx +88 -0
  53. package/src/typography/stories/error-message.stories.tsx +93 -0
  54. package/src/typography/stories/heading.stories.tsx +143 -0
  55. package/src/typography/stories/ingress.stories.tsx +51 -0
  56. package/src/typography/stories/label.stories.tsx +98 -0
  57. package/src/typography/types.ts +26 -0
  58. package/src/typography/util.ts +14 -0
  59. package/src/typography/heading.stories.tsx +0 -77
  60. package/src/typography/typography.stories.tsx +0 -166
package/_docs.json CHANGED
@@ -9665,7 +9665,7 @@
9665
9665
  "defaultValue": {
9666
9666
  "value": "medium"
9667
9667
  },
9668
- "description": "medium: 18px, small: 16px",
9668
+ "description": "large: 20px, medium: 18px, small: 16px",
9669
9669
  "name": "size",
9670
9670
  "parent": {
9671
9671
  "fileName": "src/typography/BodyLong.tsx",
@@ -9679,12 +9679,12 @@
9679
9679
  ],
9680
9680
  "required": false,
9681
9681
  "type": {
9682
- "name": "\"medium\" | \"small\""
9682
+ "name": "\"large\" | \"medium\" | \"small\""
9683
9683
  }
9684
9684
  },
9685
9685
  "children": {
9686
9686
  "defaultValue": null,
9687
- "description": "Paragraph text",
9687
+ "description": "Text",
9688
9688
  "name": "children",
9689
9689
  "parent": {
9690
9690
  "fileName": "src/typography/BodyLong.tsx",
@@ -9701,18 +9701,76 @@
9701
9701
  "name": "ReactNode"
9702
9702
  }
9703
9703
  },
9704
+ "truncate": {
9705
+ "defaultValue": null,
9706
+ "description": "Truncate text overflow with ellipsis.",
9707
+ "name": "truncate",
9708
+ "declarations": [
9709
+ {
9710
+ "fileName": "react/src/typography/types.ts",
9711
+ "name": "TypeLiteral"
9712
+ }
9713
+ ],
9714
+ "required": false,
9715
+ "type": {
9716
+ "name": "boolean"
9717
+ }
9718
+ },
9719
+ "weight": {
9720
+ "defaultValue": {
9721
+ "value": "regular"
9722
+ },
9723
+ "description": "Adjusts font-weight.",
9724
+ "name": "weight",
9725
+ "declarations": [
9726
+ {
9727
+ "fileName": "react/src/typography/types.ts",
9728
+ "name": "TypeLiteral"
9729
+ }
9730
+ ],
9731
+ "required": false,
9732
+ "type": {
9733
+ "name": "\"regular\" | \"semibold\""
9734
+ }
9735
+ },
9736
+ "align": {
9737
+ "defaultValue": null,
9738
+ "description": "Adjust text-align.",
9739
+ "name": "align",
9740
+ "declarations": [
9741
+ {
9742
+ "fileName": "react/src/typography/types.ts",
9743
+ "name": "TypeLiteral"
9744
+ }
9745
+ ],
9746
+ "required": false,
9747
+ "type": {
9748
+ "name": "\"start\" | \"center\" | \"end\""
9749
+ }
9750
+ },
9751
+ "visuallyHidden": {
9752
+ "defaultValue": null,
9753
+ "description": "Visually hide text. Text will still be accessible for screenreaders",
9754
+ "name": "visuallyHidden",
9755
+ "declarations": [
9756
+ {
9757
+ "fileName": "react/src/typography/types.ts",
9758
+ "name": "TypeLiteral"
9759
+ }
9760
+ ],
9761
+ "required": false,
9762
+ "type": {
9763
+ "name": "boolean"
9764
+ }
9765
+ },
9704
9766
  "spacing": {
9705
9767
  "defaultValue": null,
9706
- "description": "Adds margin-bottom",
9768
+ "description": "Adds spacing below text",
9707
9769
  "name": "spacing",
9708
- "parent": {
9709
- "fileName": "src/typography/BodyLong.tsx",
9710
- "name": "BodyLongProps"
9711
- },
9712
9770
  "declarations": [
9713
9771
  {
9714
- "fileName": "src/typography/BodyLong.tsx",
9715
- "name": "BodyLongProps"
9772
+ "fileName": "react/src/typography/types.ts",
9773
+ "name": "TypeLiteral"
9716
9774
  }
9717
9775
  ],
9718
9776
  "required": false,
@@ -9720,6 +9778,21 @@
9720
9778
  "name": "boolean"
9721
9779
  }
9722
9780
  },
9781
+ "textColor": {
9782
+ "defaultValue": null,
9783
+ "description": "Adjusts color",
9784
+ "name": "textColor",
9785
+ "declarations": [
9786
+ {
9787
+ "fileName": "react/src/typography/types.ts",
9788
+ "name": "TypeLiteral"
9789
+ }
9790
+ ],
9791
+ "required": false,
9792
+ "type": {
9793
+ "name": "\"default\" | \"subtle\""
9794
+ }
9795
+ },
9723
9796
  "className": {
9724
9797
  "defaultValue": null,
9725
9798
  "description": "",
@@ -9768,7 +9841,7 @@
9768
9841
  "defaultValue": {
9769
9842
  "value": "medium"
9770
9843
  },
9771
- "description": "medium: 18px, small: 16px",
9844
+ "description": "large: 20px, medium: 18px, small: 16px",
9772
9845
  "name": "size",
9773
9846
  "parent": {
9774
9847
  "fileName": "src/typography/BodyShort.tsx",
@@ -9782,7 +9855,7 @@
9782
9855
  ],
9783
9856
  "required": false,
9784
9857
  "type": {
9785
- "name": "\"medium\" | \"small\""
9858
+ "name": "\"large\" | \"medium\" | \"small\""
9786
9859
  }
9787
9860
  },
9788
9861
  "children": {
@@ -9804,18 +9877,76 @@
9804
9877
  "name": "ReactNode"
9805
9878
  }
9806
9879
  },
9880
+ "truncate": {
9881
+ "defaultValue": null,
9882
+ "description": "Truncate text overflow with ellipsis.",
9883
+ "name": "truncate",
9884
+ "declarations": [
9885
+ {
9886
+ "fileName": "react/src/typography/types.ts",
9887
+ "name": "TypeLiteral"
9888
+ }
9889
+ ],
9890
+ "required": false,
9891
+ "type": {
9892
+ "name": "boolean"
9893
+ }
9894
+ },
9895
+ "weight": {
9896
+ "defaultValue": {
9897
+ "value": "regular"
9898
+ },
9899
+ "description": "Adjusts font-weight.",
9900
+ "name": "weight",
9901
+ "declarations": [
9902
+ {
9903
+ "fileName": "react/src/typography/types.ts",
9904
+ "name": "TypeLiteral"
9905
+ }
9906
+ ],
9907
+ "required": false,
9908
+ "type": {
9909
+ "name": "\"regular\" | \"semibold\""
9910
+ }
9911
+ },
9912
+ "align": {
9913
+ "defaultValue": null,
9914
+ "description": "Adjust text-align.",
9915
+ "name": "align",
9916
+ "declarations": [
9917
+ {
9918
+ "fileName": "react/src/typography/types.ts",
9919
+ "name": "TypeLiteral"
9920
+ }
9921
+ ],
9922
+ "required": false,
9923
+ "type": {
9924
+ "name": "\"start\" | \"center\" | \"end\""
9925
+ }
9926
+ },
9927
+ "visuallyHidden": {
9928
+ "defaultValue": null,
9929
+ "description": "Visually hide text. Text will still be accessible for screenreaders",
9930
+ "name": "visuallyHidden",
9931
+ "declarations": [
9932
+ {
9933
+ "fileName": "react/src/typography/types.ts",
9934
+ "name": "TypeLiteral"
9935
+ }
9936
+ ],
9937
+ "required": false,
9938
+ "type": {
9939
+ "name": "boolean"
9940
+ }
9941
+ },
9807
9942
  "spacing": {
9808
9943
  "defaultValue": null,
9809
- "description": "Adds margin-bottom",
9944
+ "description": "Adds spacing below text",
9810
9945
  "name": "spacing",
9811
- "parent": {
9812
- "fileName": "src/typography/BodyShort.tsx",
9813
- "name": "BodyShortProps"
9814
- },
9815
9946
  "declarations": [
9816
9947
  {
9817
- "fileName": "src/typography/BodyShort.tsx",
9818
- "name": "BodyShortProps"
9948
+ "fileName": "react/src/typography/types.ts",
9949
+ "name": "TypeLiteral"
9819
9950
  }
9820
9951
  ],
9821
9952
  "required": false,
@@ -9823,6 +9954,21 @@
9823
9954
  "name": "boolean"
9824
9955
  }
9825
9956
  },
9957
+ "textColor": {
9958
+ "defaultValue": null,
9959
+ "description": "Adjusts color",
9960
+ "name": "textColor",
9961
+ "declarations": [
9962
+ {
9963
+ "fileName": "react/src/typography/types.ts",
9964
+ "name": "TypeLiteral"
9965
+ }
9966
+ ],
9967
+ "required": false,
9968
+ "type": {
9969
+ "name": "\"default\" | \"subtle\""
9970
+ }
9971
+ },
9826
9972
  "className": {
9827
9973
  "defaultValue": null,
9828
9974
  "description": "",
@@ -9907,10 +10053,10 @@
9907
10053
  "name": "ReactNode"
9908
10054
  }
9909
10055
  },
9910
- "spacing": {
10056
+ "uppercase": {
9911
10057
  "defaultValue": null,
9912
- "description": "Adds margin-bottom",
9913
- "name": "spacing",
10058
+ "description": "All caps",
10059
+ "name": "uppercase",
9914
10060
  "parent": {
9915
10061
  "fileName": "src/typography/Detail.tsx",
9916
10062
  "name": "DetailProps"
@@ -9926,18 +10072,76 @@
9926
10072
  "name": "boolean"
9927
10073
  }
9928
10074
  },
9929
- "uppercase": {
10075
+ "truncate": {
9930
10076
  "defaultValue": null,
9931
- "description": "All caps",
9932
- "name": "uppercase",
9933
- "parent": {
9934
- "fileName": "src/typography/Detail.tsx",
9935
- "name": "DetailProps"
10077
+ "description": "Truncate text overflow with ellipsis.",
10078
+ "name": "truncate",
10079
+ "declarations": [
10080
+ {
10081
+ "fileName": "react/src/typography/types.ts",
10082
+ "name": "TypeLiteral"
10083
+ }
10084
+ ],
10085
+ "required": false,
10086
+ "type": {
10087
+ "name": "boolean"
10088
+ }
10089
+ },
10090
+ "weight": {
10091
+ "defaultValue": {
10092
+ "value": "regular"
9936
10093
  },
10094
+ "description": "Adjusts font-weight.",
10095
+ "name": "weight",
9937
10096
  "declarations": [
9938
10097
  {
9939
- "fileName": "src/typography/Detail.tsx",
9940
- "name": "DetailProps"
10098
+ "fileName": "react/src/typography/types.ts",
10099
+ "name": "TypeLiteral"
10100
+ }
10101
+ ],
10102
+ "required": false,
10103
+ "type": {
10104
+ "name": "\"regular\" | \"semibold\""
10105
+ }
10106
+ },
10107
+ "align": {
10108
+ "defaultValue": null,
10109
+ "description": "Adjust text-align.",
10110
+ "name": "align",
10111
+ "declarations": [
10112
+ {
10113
+ "fileName": "react/src/typography/types.ts",
10114
+ "name": "TypeLiteral"
10115
+ }
10116
+ ],
10117
+ "required": false,
10118
+ "type": {
10119
+ "name": "\"start\" | \"center\" | \"end\""
10120
+ }
10121
+ },
10122
+ "visuallyHidden": {
10123
+ "defaultValue": null,
10124
+ "description": "Visually hide text. Text will still be accessible for screenreaders",
10125
+ "name": "visuallyHidden",
10126
+ "declarations": [
10127
+ {
10128
+ "fileName": "react/src/typography/types.ts",
10129
+ "name": "TypeLiteral"
10130
+ }
10131
+ ],
10132
+ "required": false,
10133
+ "type": {
10134
+ "name": "boolean"
10135
+ }
10136
+ },
10137
+ "spacing": {
10138
+ "defaultValue": null,
10139
+ "description": "Adds spacing below text",
10140
+ "name": "spacing",
10141
+ "declarations": [
10142
+ {
10143
+ "fileName": "react/src/typography/types.ts",
10144
+ "name": "TypeLiteral"
9941
10145
  }
9942
10146
  ],
9943
10147
  "required": false,
@@ -9945,6 +10149,21 @@
9945
10149
  "name": "boolean"
9946
10150
  }
9947
10151
  },
10152
+ "textColor": {
10153
+ "defaultValue": null,
10154
+ "description": "Adjusts color",
10155
+ "name": "textColor",
10156
+ "declarations": [
10157
+ {
10158
+ "fileName": "react/src/typography/types.ts",
10159
+ "name": "TypeLiteral"
10160
+ }
10161
+ ],
10162
+ "required": false,
10163
+ "type": {
10164
+ "name": "\"default\" | \"subtle\""
10165
+ }
10166
+ },
9948
10167
  "className": {
9949
10168
  "defaultValue": null,
9950
10169
  "description": "",
@@ -10031,16 +10250,12 @@
10031
10250
  },
10032
10251
  "spacing": {
10033
10252
  "defaultValue": null,
10034
- "description": "Adds margin-bottom",
10253
+ "description": "Adds spacing below text",
10035
10254
  "name": "spacing",
10036
- "parent": {
10037
- "fileName": "src/typography/ErrorMessage.tsx",
10038
- "name": "ErrorMessageProps"
10039
- },
10040
10255
  "declarations": [
10041
10256
  {
10042
- "fileName": "src/typography/ErrorMessage.tsx",
10043
- "name": "ErrorMessageProps"
10257
+ "fileName": "react/src/typography/types.ts",
10258
+ "name": "TypeLiteral"
10044
10259
  }
10045
10260
  ],
10046
10261
  "required": false,
@@ -10152,19 +10367,28 @@
10152
10367
  }
10153
10368
  },
10154
10369
  "spacing": {
10155
- "defaultValue": {
10156
- "value": "false"
10157
- },
10158
- "description": "Adds margin-bottom",
10370
+ "defaultValue": null,
10371
+ "description": "Adds spacing below text",
10159
10372
  "name": "spacing",
10160
- "parent": {
10161
- "fileName": "src/typography/Heading.tsx",
10162
- "name": "HeadingProps"
10163
- },
10164
10373
  "declarations": [
10165
10374
  {
10166
- "fileName": "src/typography/Heading.tsx",
10167
- "name": "HeadingProps"
10375
+ "fileName": "react/src/typography/types.ts",
10376
+ "name": "TypeLiteral"
10377
+ }
10378
+ ],
10379
+ "required": false,
10380
+ "type": {
10381
+ "name": "boolean"
10382
+ }
10383
+ },
10384
+ "visuallyHidden": {
10385
+ "defaultValue": null,
10386
+ "description": "Visually hide text. Text will still be accessible for screenreaders",
10387
+ "name": "visuallyHidden",
10388
+ "declarations": [
10389
+ {
10390
+ "fileName": "react/src/typography/types.ts",
10391
+ "name": "TypeLiteral"
10168
10392
  }
10169
10393
  ],
10170
10394
  "required": false,
@@ -10172,6 +10396,36 @@
10172
10396
  "name": "boolean"
10173
10397
  }
10174
10398
  },
10399
+ "align": {
10400
+ "defaultValue": null,
10401
+ "description": "Adjust text-align.",
10402
+ "name": "align",
10403
+ "declarations": [
10404
+ {
10405
+ "fileName": "react/src/typography/types.ts",
10406
+ "name": "TypeLiteral"
10407
+ }
10408
+ ],
10409
+ "required": false,
10410
+ "type": {
10411
+ "name": "\"start\" | \"center\" | \"end\""
10412
+ }
10413
+ },
10414
+ "textColor": {
10415
+ "defaultValue": null,
10416
+ "description": "Adjusts color",
10417
+ "name": "textColor",
10418
+ "declarations": [
10419
+ {
10420
+ "fileName": "react/src/typography/types.ts",
10421
+ "name": "TypeLiteral"
10422
+ }
10423
+ ],
10424
+ "required": false,
10425
+ "type": {
10426
+ "name": "\"default\" | \"subtle\""
10427
+ }
10428
+ },
10175
10429
  "className": {
10176
10430
  "defaultValue": null,
10177
10431
  "description": "",
@@ -10338,18 +10592,29 @@
10338
10592
  "name": "ReactNode"
10339
10593
  }
10340
10594
  },
10595
+ "visuallyHidden": {
10596
+ "defaultValue": null,
10597
+ "description": "Visually hide text. Text will still be accessible for screenreaders",
10598
+ "name": "visuallyHidden",
10599
+ "declarations": [
10600
+ {
10601
+ "fileName": "react/src/typography/types.ts",
10602
+ "name": "TypeLiteral"
10603
+ }
10604
+ ],
10605
+ "required": false,
10606
+ "type": {
10607
+ "name": "boolean"
10608
+ }
10609
+ },
10341
10610
  "spacing": {
10342
10611
  "defaultValue": null,
10343
- "description": "Adds margin-bottom",
10612
+ "description": "Adds spacing below text",
10344
10613
  "name": "spacing",
10345
- "parent": {
10346
- "fileName": "src/typography/Label.tsx",
10347
- "name": "LabelProps"
10348
- },
10349
10614
  "declarations": [
10350
10615
  {
10351
- "fileName": "src/typography/Label.tsx",
10352
- "name": "LabelProps"
10616
+ "fileName": "react/src/typography/types.ts",
10617
+ "name": "TypeLiteral"
10353
10618
  }
10354
10619
  ],
10355
10620
  "required": false,
@@ -10357,6 +10622,21 @@
10357
10622
  "name": "boolean"
10358
10623
  }
10359
10624
  },
10625
+ "textColor": {
10626
+ "defaultValue": null,
10627
+ "description": "Adjusts color",
10628
+ "name": "textColor",
10629
+ "declarations": [
10630
+ {
10631
+ "fileName": "react/src/typography/types.ts",
10632
+ "name": "TypeLiteral"
10633
+ }
10634
+ ],
10635
+ "required": false,
10636
+ "type": {
10637
+ "name": "\"default\" | \"subtle\""
10638
+ }
10639
+ },
10360
10640
  "className": {
10361
10641
  "defaultValue": null,
10362
10642
  "description": "",
@@ -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
  });
@@ -40,6 +40,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
40
40
  exports.BodyLong = void 0;
41
41
  const react_1 = __importStar(require("react"));
42
42
  const clsx_1 = __importDefault(require("clsx"));
43
+ const util_1 = require("./util");
43
44
  /**
44
45
  * Part of a set of components for displaying text with consistent typography.
45
46
  *
@@ -49,16 +50,22 @@ const clsx_1 = __importDefault(require("clsx"));
49
50
  *
50
51
  * @example
51
52
  * ```jsx
52
- * <BodyLong level="1" size="xlarge">
53
- * Pengestøtte når du er syk
53
+ * <BodyLong>
54
+ * Hvis du ikke bor sammen med begge foreldrene dine,
55
+ * kan du ha rett til barnebidrag fra en eller begge foreldre mens du
56
+ * fullfører videregående skole eller tilsvarende.
54
57
  * </BodyLong>
55
58
  * ```
56
59
  */
57
60
  exports.BodyLong = (0, react_1.forwardRef)((_a, ref) => {
58
- var { className, size = "medium", spacing, as: Component = "p" } = _a, rest = __rest(_a, ["className", "size", "spacing", "as"]);
59
- return (react_1.default.createElement(Component, Object.assign({}, rest, { ref: ref, className: (0, clsx_1.default)(className, "navds-body-long", {
60
- "navds-body-long--small": size === "small",
61
- "navds-typo--spacing": !!spacing,
62
- }) })));
61
+ var { className, size = "medium", as: Component = "p", spacing, truncate, weight = "regular", align, visuallyHidden, textColor } = _a, rest = __rest(_a, ["className", "size", "as", "spacing", "truncate", "weight", "align", "visuallyHidden", "textColor"]);
62
+ return (react_1.default.createElement(Component, Object.assign({}, rest, { ref: ref, className: (0, clsx_1.default)(className, "navds-body-long", `navds-body-long--${size}`, (0, util_1.typoClassNames)({
63
+ spacing,
64
+ truncate,
65
+ weight,
66
+ align,
67
+ visuallyHidden,
68
+ textColor,
69
+ })) })));
63
70
  });
64
71
  exports.default = exports.BodyLong;
@@ -38,8 +38,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
38
  };
39
39
  Object.defineProperty(exports, "__esModule", { value: true });
40
40
  exports.BodyShort = void 0;
41
- const react_1 = __importStar(require("react"));
42
41
  const clsx_1 = __importDefault(require("clsx"));
42
+ const react_1 = __importStar(require("react"));
43
+ const util_1 = require("./util");
43
44
  /**
44
45
  * Part of a set of components for displaying text with consistent typography.
45
46
  *
@@ -49,16 +50,20 @@ const clsx_1 = __importDefault(require("clsx"));
49
50
  *
50
51
  * @example
51
52
  * ```jsx
52
- * <BodyShort level="1" size="xlarge">
53
- * Pengestøtte når du er syk
53
+ * <BodyShort>
54
+ * Du gjøre en filtrering for å se brukere i listen.
54
55
  * </BodyShort>
55
56
  * ```
56
57
  */
57
58
  exports.BodyShort = (0, react_1.forwardRef)((_a, ref) => {
58
- var { className, size = "medium", spacing, as: Component = "p" } = _a, rest = __rest(_a, ["className", "size", "spacing", "as"]);
59
- return (react_1.default.createElement(Component, Object.assign({}, rest, { ref: ref, className: (0, clsx_1.default)(className, "navds-body-short", {
60
- "navds-body-short--small": size === "small",
61
- "navds-typo--spacing": !!spacing,
62
- }) })));
59
+ var { className, size = "medium", as: Component = "p", spacing, truncate, weight = "regular", align, visuallyHidden, textColor } = _a, rest = __rest(_a, ["className", "size", "as", "spacing", "truncate", "weight", "align", "visuallyHidden", "textColor"]);
60
+ return (react_1.default.createElement(Component, Object.assign({}, rest, { ref: ref, className: (0, clsx_1.default)(className, "navds-body-short", `navds-body-short--${size}`, (0, util_1.typoClassNames)({
61
+ spacing,
62
+ truncate,
63
+ weight,
64
+ align,
65
+ visuallyHidden,
66
+ textColor,
67
+ })) })));
63
68
  });
64
69
  exports.default = exports.BodyShort;
@@ -38,8 +38,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
38
  };
39
39
  Object.defineProperty(exports, "__esModule", { value: true });
40
40
  exports.Detail = void 0;
41
- const react_1 = __importStar(require("react"));
42
41
  const clsx_1 = __importDefault(require("clsx"));
42
+ const react_1 = __importStar(require("react"));
43
+ const util_1 = require("./util");
43
44
  /**
44
45
  * Part of a set of components for displaying text with consistent typography.
45
46
  *
@@ -49,17 +50,23 @@ const clsx_1 = __importDefault(require("clsx"));
49
50
  *
50
51
  * @example
51
52
  * ```jsx
52
- * <Detail level="1" size="xlarge">
53
- * Pengestøtte når du er syk
53
+ * <Detail>
54
+ * Du gjøre en filtrering for å se brukere i listen.
54
55
  * </Detail>
55
56
  * ```
56
57
  */
57
58
  exports.Detail = (0, react_1.forwardRef)((_a, ref) => {
58
- var { className, size = "medium", spacing, uppercase, as: Component = "p" } = _a, rest = __rest(_a, ["className", "size", "spacing", "uppercase", "as"]);
59
- return (react_1.default.createElement(Component, Object.assign({}, rest, { ref: ref, className: (0, clsx_1.default)(className, "navds-detail", {
59
+ var { className, size = "medium", spacing, uppercase, as: Component = "p", truncate, weight = "regular", align, visuallyHidden, textColor } = _a, rest = __rest(_a, ["className", "size", "spacing", "uppercase", "as", "truncate", "weight", "align", "visuallyHidden", "textColor"]);
60
+ return (react_1.default.createElement(Component, Object.assign({}, rest, { ref: ref, className: (0, clsx_1.default)(className, "navds-detail", (0, util_1.typoClassNames)({
61
+ spacing,
62
+ truncate,
63
+ weight,
64
+ align,
65
+ visuallyHidden,
66
+ textColor,
67
+ uppercase,
68
+ }), {
60
69
  "navds-detail--small": size === "small",
61
- "navds-typo--spacing": !!spacing,
62
- "navds-typo--uppercase": !!uppercase,
63
70
  }) })));
64
71
  });
65
72
  exports.default = exports.Detail;