@navikt/ds-react 4.7.3 → 4.8.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 (58) hide show
  1. package/_docs.json +374 -70
  2. package/cjs/dropdown/Menu/GroupedList/index.js +4 -4
  3. package/cjs/index.js +1 -0
  4. package/cjs/layout/stack/HStack.js +51 -0
  5. package/cjs/layout/stack/Spacer.js +21 -0
  6. package/cjs/layout/stack/Stack.js +51 -0
  7. package/cjs/layout/stack/VStack.js +51 -0
  8. package/cjs/layout/stack/index.js +9 -0
  9. package/cjs/layout/stack/package.json +6 -0
  10. package/cjs/layout/utilities/css.js +17 -0
  11. package/esm/dropdown/Menu/GroupedList/{Heading.js → GroupedHeading.js} +1 -1
  12. package/esm/dropdown/Menu/GroupedList/GroupedHeading.js.map +1 -0
  13. package/esm/dropdown/Menu/GroupedList/{Item.js → GroupedItem.js} +1 -1
  14. package/esm/dropdown/Menu/GroupedList/GroupedItem.js.map +1 -0
  15. package/esm/dropdown/Menu/GroupedList/index.d.ts +2 -2
  16. package/esm/dropdown/Menu/GroupedList/index.js +2 -2
  17. package/esm/dropdown/Menu/GroupedList/index.js.map +1 -1
  18. package/esm/form/TextField.d.ts +1 -1
  19. package/esm/index.d.ts +1 -0
  20. package/esm/index.js +1 -0
  21. package/esm/index.js.map +1 -1
  22. package/esm/layout/stack/HStack.d.ts +24 -0
  23. package/esm/layout/stack/HStack.js +26 -0
  24. package/esm/layout/stack/HStack.js.map +1 -0
  25. package/esm/layout/stack/Spacer.d.ts +14 -0
  26. package/esm/layout/stack/Spacer.js +15 -0
  27. package/esm/layout/stack/Spacer.js.map +1 -0
  28. package/esm/layout/stack/Stack.d.ts +26 -0
  29. package/esm/layout/stack/Stack.js +23 -0
  30. package/esm/layout/stack/Stack.js.map +1 -0
  31. package/esm/layout/stack/VStack.d.ts +24 -0
  32. package/esm/layout/stack/VStack.js +26 -0
  33. package/esm/layout/stack/VStack.js.map +1 -0
  34. package/esm/layout/stack/index.d.ts +3 -0
  35. package/esm/layout/stack/index.js +4 -0
  36. package/esm/layout/stack/index.js.map +1 -0
  37. package/esm/layout/utilities/css.d.ts +10 -0
  38. package/esm/layout/utilities/css.js +14 -0
  39. package/esm/layout/utilities/css.js.map +1 -0
  40. package/package.json +2 -2
  41. package/src/dropdown/Menu/GroupedList/index.tsx +2 -2
  42. package/src/form/TextField.tsx +1 -1
  43. package/src/index.ts +1 -0
  44. package/src/layout/stack/HStack.tsx +30 -0
  45. package/src/layout/stack/Spacer.tsx +15 -0
  46. package/src/layout/stack/Stack.tsx +76 -0
  47. package/src/layout/stack/VStack.tsx +30 -0
  48. package/src/layout/stack/index.ts +3 -0
  49. package/src/layout/stack/stack.stories.tsx +161 -0
  50. package/src/layout/utilities/css.ts +56 -0
  51. package/esm/dropdown/Menu/GroupedList/Heading.js.map +0 -1
  52. package/esm/dropdown/Menu/GroupedList/Item.js.map +0 -1
  53. /package/cjs/dropdown/Menu/GroupedList/{Heading.js → GroupedHeading.js} +0 -0
  54. /package/cjs/dropdown/Menu/GroupedList/{Item.js → GroupedItem.js} +0 -0
  55. /package/esm/dropdown/Menu/GroupedList/{Heading.d.ts → GroupedHeading.d.ts} +0 -0
  56. /package/esm/dropdown/Menu/GroupedList/{Item.d.ts → GroupedItem.d.ts} +0 -0
  57. /package/src/dropdown/Menu/GroupedList/{Heading.tsx → GroupedHeading.tsx} +0 -0
  58. /package/src/dropdown/Menu/GroupedList/{Item.tsx → GroupedItem.tsx} +0 -0
package/_docs.json CHANGED
@@ -3634,7 +3634,7 @@
3634
3634
  ],
3635
3635
  "required": false,
3636
3636
  "type": {
3637
- "name": "\"number\" | \"email\" | \"password\" | \"tel\" | \"text\" | \"url\""
3637
+ "name": "\"number\" | \"email\" | \"password\" | \"tel\" | \"text\" | \"url\" | \"time\""
3638
3638
  }
3639
3639
  },
3640
3640
  "error": {
@@ -16428,6 +16428,373 @@
16428
16428
  }
16429
16429
  }
16430
16430
  },
16431
+ {
16432
+ "filePath": "src/layout/stack/HStack.tsx",
16433
+ "displayName": "HStack",
16434
+ "props": {
16435
+ "justify": {
16436
+ "defaultValue": null,
16437
+ "description": "Justify-content",
16438
+ "name": "justify",
16439
+ "parent": {
16440
+ "fileName": "react/src/layout/stack/Stack.tsx",
16441
+ "name": "StackProps"
16442
+ },
16443
+ "declarations": [
16444
+ {
16445
+ "fileName": "react/src/layout/stack/Stack.tsx",
16446
+ "name": "StackProps"
16447
+ }
16448
+ ],
16449
+ "required": false,
16450
+ "type": {
16451
+ "name": "\"start\" | \"center\" | \"end\" | \"space-around\" | \"space-between\" | \"space-evenly\""
16452
+ }
16453
+ },
16454
+ "align": {
16455
+ "defaultValue": null,
16456
+ "description": "Align-items",
16457
+ "name": "align",
16458
+ "parent": {
16459
+ "fileName": "react/src/layout/stack/Stack.tsx",
16460
+ "name": "StackProps"
16461
+ },
16462
+ "declarations": [
16463
+ {
16464
+ "fileName": "react/src/layout/stack/Stack.tsx",
16465
+ "name": "StackProps"
16466
+ }
16467
+ ],
16468
+ "required": false,
16469
+ "type": {
16470
+ "name": "\"start\" | \"center\" | \"end\" | \"baseline\" | \"stretch\""
16471
+ }
16472
+ },
16473
+ "wrap": {
16474
+ "defaultValue": null,
16475
+ "description": "flex-wrap",
16476
+ "name": "wrap",
16477
+ "parent": {
16478
+ "fileName": "react/src/layout/stack/Stack.tsx",
16479
+ "name": "StackProps"
16480
+ },
16481
+ "declarations": [
16482
+ {
16483
+ "fileName": "react/src/layout/stack/Stack.tsx",
16484
+ "name": "StackProps"
16485
+ }
16486
+ ],
16487
+ "required": false,
16488
+ "type": {
16489
+ "name": "boolean"
16490
+ }
16491
+ },
16492
+ "gap": {
16493
+ "defaultValue": null,
16494
+ "description": "@example gap='4'\ngap={{xs: '2', sm: '3', md: '4', lg: '5', xl: '6'}}",
16495
+ "name": "gap",
16496
+ "parent": {
16497
+ "fileName": "react/src/layout/stack/Stack.tsx",
16498
+ "name": "StackProps"
16499
+ },
16500
+ "declarations": [
16501
+ {
16502
+ "fileName": "react/src/layout/stack/Stack.tsx",
16503
+ "name": "StackProps"
16504
+ }
16505
+ ],
16506
+ "required": false,
16507
+ "type": {
16508
+ "name": "ResponsiveProp<SpacingScale>"
16509
+ }
16510
+ },
16511
+ "className": {
16512
+ "defaultValue": null,
16513
+ "description": "",
16514
+ "name": "className",
16515
+ "parent": {
16516
+ "fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
16517
+ "name": "HTMLAttributes"
16518
+ },
16519
+ "declarations": [
16520
+ {
16521
+ "fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
16522
+ "name": "HTMLAttributes"
16523
+ }
16524
+ ],
16525
+ "required": false,
16526
+ "type": {
16527
+ "name": "string"
16528
+ }
16529
+ },
16530
+ "ref": {
16531
+ "defaultValue": null,
16532
+ "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",
16533
+ "name": "ref",
16534
+ "parent": {
16535
+ "fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
16536
+ "name": "RefAttributes"
16537
+ },
16538
+ "declarations": [
16539
+ {
16540
+ "fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
16541
+ "name": "RefAttributes"
16542
+ }
16543
+ ],
16544
+ "required": false,
16545
+ "type": {
16546
+ "name": "Ref<HTMLDivElement>"
16547
+ }
16548
+ }
16549
+ }
16550
+ },
16551
+ {
16552
+ "filePath": "src/layout/stack/Spacer.tsx",
16553
+ "displayName": "Spacer",
16554
+ "props": {}
16555
+ },
16556
+ {
16557
+ "filePath": "src/layout/stack/Stack.tsx",
16558
+ "displayName": "Stack",
16559
+ "props": {
16560
+ "justify": {
16561
+ "defaultValue": null,
16562
+ "description": "Justify-content",
16563
+ "name": "justify",
16564
+ "parent": {
16565
+ "fileName": "src/layout/stack/Stack.tsx",
16566
+ "name": "StackProps"
16567
+ },
16568
+ "declarations": [
16569
+ {
16570
+ "fileName": "src/layout/stack/Stack.tsx",
16571
+ "name": "StackProps"
16572
+ }
16573
+ ],
16574
+ "required": false,
16575
+ "type": {
16576
+ "name": "\"start\" | \"center\" | \"end\" | \"space-around\" | \"space-between\" | \"space-evenly\""
16577
+ }
16578
+ },
16579
+ "align": {
16580
+ "defaultValue": null,
16581
+ "description": "Align-items",
16582
+ "name": "align",
16583
+ "parent": {
16584
+ "fileName": "src/layout/stack/Stack.tsx",
16585
+ "name": "StackProps"
16586
+ },
16587
+ "declarations": [
16588
+ {
16589
+ "fileName": "src/layout/stack/Stack.tsx",
16590
+ "name": "StackProps"
16591
+ }
16592
+ ],
16593
+ "required": false,
16594
+ "type": {
16595
+ "name": "\"start\" | \"center\" | \"end\" | \"baseline\" | \"stretch\""
16596
+ }
16597
+ },
16598
+ "wrap": {
16599
+ "defaultValue": {
16600
+ "value": "true"
16601
+ },
16602
+ "description": "flex-wrap",
16603
+ "name": "wrap",
16604
+ "parent": {
16605
+ "fileName": "src/layout/stack/Stack.tsx",
16606
+ "name": "StackProps"
16607
+ },
16608
+ "declarations": [
16609
+ {
16610
+ "fileName": "src/layout/stack/Stack.tsx",
16611
+ "name": "StackProps"
16612
+ }
16613
+ ],
16614
+ "required": false,
16615
+ "type": {
16616
+ "name": "boolean"
16617
+ }
16618
+ },
16619
+ "gap": {
16620
+ "defaultValue": null,
16621
+ "description": "@example gap='4'\ngap={{xs: '2', sm: '3', md: '4', lg: '5', xl: '6'}}",
16622
+ "name": "gap",
16623
+ "parent": {
16624
+ "fileName": "src/layout/stack/Stack.tsx",
16625
+ "name": "StackProps"
16626
+ },
16627
+ "declarations": [
16628
+ {
16629
+ "fileName": "src/layout/stack/Stack.tsx",
16630
+ "name": "StackProps"
16631
+ }
16632
+ ],
16633
+ "required": false,
16634
+ "type": {
16635
+ "name": "ResponsiveProp<SpacingScale>"
16636
+ }
16637
+ },
16638
+ "direction": {
16639
+ "defaultValue": null,
16640
+ "description": "",
16641
+ "name": "direction",
16642
+ "parent": {
16643
+ "fileName": "src/layout/stack/Stack.tsx",
16644
+ "name": "StackProps"
16645
+ },
16646
+ "declarations": [
16647
+ {
16648
+ "fileName": "src/layout/stack/Stack.tsx",
16649
+ "name": "StackProps"
16650
+ }
16651
+ ],
16652
+ "required": true,
16653
+ "type": {
16654
+ "name": "\"row\" | \"column\""
16655
+ }
16656
+ },
16657
+ "className": {
16658
+ "defaultValue": null,
16659
+ "description": "",
16660
+ "name": "className",
16661
+ "parent": {
16662
+ "fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
16663
+ "name": "HTMLAttributes"
16664
+ },
16665
+ "declarations": [
16666
+ {
16667
+ "fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
16668
+ "name": "HTMLAttributes"
16669
+ }
16670
+ ],
16671
+ "required": false,
16672
+ "type": {
16673
+ "name": "string"
16674
+ }
16675
+ },
16676
+ "ref": {
16677
+ "defaultValue": null,
16678
+ "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",
16679
+ "name": "ref",
16680
+ "parent": {
16681
+ "fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
16682
+ "name": "RefAttributes"
16683
+ },
16684
+ "declarations": [
16685
+ {
16686
+ "fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
16687
+ "name": "RefAttributes"
16688
+ }
16689
+ ],
16690
+ "required": false,
16691
+ "type": {
16692
+ "name": "Ref<HTMLDivElement>"
16693
+ }
16694
+ }
16695
+ }
16696
+ },
16697
+ {
16698
+ "filePath": "src/layout/stack/VStack.tsx",
16699
+ "displayName": "VStack",
16700
+ "props": {
16701
+ "justify": {
16702
+ "defaultValue": null,
16703
+ "description": "Justify-content",
16704
+ "name": "justify",
16705
+ "parent": {
16706
+ "fileName": "react/src/layout/stack/Stack.tsx",
16707
+ "name": "StackProps"
16708
+ },
16709
+ "declarations": [
16710
+ {
16711
+ "fileName": "react/src/layout/stack/Stack.tsx",
16712
+ "name": "StackProps"
16713
+ }
16714
+ ],
16715
+ "required": false,
16716
+ "type": {
16717
+ "name": "\"start\" | \"center\" | \"end\" | \"space-around\" | \"space-between\" | \"space-evenly\""
16718
+ }
16719
+ },
16720
+ "align": {
16721
+ "defaultValue": null,
16722
+ "description": "Align-items",
16723
+ "name": "align",
16724
+ "parent": {
16725
+ "fileName": "react/src/layout/stack/Stack.tsx",
16726
+ "name": "StackProps"
16727
+ },
16728
+ "declarations": [
16729
+ {
16730
+ "fileName": "react/src/layout/stack/Stack.tsx",
16731
+ "name": "StackProps"
16732
+ }
16733
+ ],
16734
+ "required": false,
16735
+ "type": {
16736
+ "name": "\"start\" | \"center\" | \"end\" | \"baseline\" | \"stretch\""
16737
+ }
16738
+ },
16739
+ "gap": {
16740
+ "defaultValue": null,
16741
+ "description": "@example gap='4'\ngap={{xs: '2', sm: '3', md: '4', lg: '5', xl: '6'}}",
16742
+ "name": "gap",
16743
+ "parent": {
16744
+ "fileName": "react/src/layout/stack/Stack.tsx",
16745
+ "name": "StackProps"
16746
+ },
16747
+ "declarations": [
16748
+ {
16749
+ "fileName": "react/src/layout/stack/Stack.tsx",
16750
+ "name": "StackProps"
16751
+ }
16752
+ ],
16753
+ "required": false,
16754
+ "type": {
16755
+ "name": "ResponsiveProp<SpacingScale>"
16756
+ }
16757
+ },
16758
+ "className": {
16759
+ "defaultValue": null,
16760
+ "description": "",
16761
+ "name": "className",
16762
+ "parent": {
16763
+ "fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
16764
+ "name": "HTMLAttributes"
16765
+ },
16766
+ "declarations": [
16767
+ {
16768
+ "fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
16769
+ "name": "HTMLAttributes"
16770
+ }
16771
+ ],
16772
+ "required": false,
16773
+ "type": {
16774
+ "name": "string"
16775
+ }
16776
+ },
16777
+ "ref": {
16778
+ "defaultValue": null,
16779
+ "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",
16780
+ "name": "ref",
16781
+ "parent": {
16782
+ "fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
16783
+ "name": "RefAttributes"
16784
+ },
16785
+ "declarations": [
16786
+ {
16787
+ "fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
16788
+ "name": "RefAttributes"
16789
+ }
16790
+ ],
16791
+ "required": false,
16792
+ "type": {
16793
+ "name": "Ref<HTMLDivElement>"
16794
+ }
16795
+ }
16796
+ }
16797
+ },
16431
16798
  {
16432
16799
  "filePath": "src/timeline/period/NonClickablePeriod.tsx",
16433
16800
  "displayName": "NonClickablePeriod",
@@ -16983,7 +17350,7 @@
16983
17350
  "props": {}
16984
17351
  },
16985
17352
  {
16986
- "filePath": "src/dropdown/Menu/GroupedList/Heading.tsx",
17353
+ "filePath": "src/dropdown/Menu/GroupedList/GroupedHeading.tsx",
16987
17354
  "displayName": "GroupedHeading",
16988
17355
  "props": {
16989
17356
  "children": {
@@ -16991,75 +17358,12 @@
16991
17358
  "description": "Heading",
16992
17359
  "name": "children",
16993
17360
  "parent": {
16994
- "fileName": "src/dropdown/Menu/GroupedList/Heading.tsx",
16995
- "name": "GroupedHeadingProps"
16996
- },
16997
- "declarations": [
16998
- {
16999
- "fileName": "src/dropdown/Menu/GroupedList/Heading.tsx",
17000
- "name": "GroupedHeadingProps"
17001
- }
17002
- ],
17003
- "required": true,
17004
- "type": {
17005
- "name": "ReactNode"
17006
- }
17007
- },
17008
- "className": {
17009
- "defaultValue": null,
17010
- "description": "",
17011
- "name": "className",
17012
- "parent": {
17013
- "fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
17014
- "name": "HTMLAttributes"
17015
- },
17016
- "declarations": [
17017
- {
17018
- "fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
17019
- "name": "HTMLAttributes"
17020
- }
17021
- ],
17022
- "required": false,
17023
- "type": {
17024
- "name": "string"
17025
- }
17026
- },
17027
- "ref": {
17028
- "defaultValue": null,
17029
- "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",
17030
- "name": "ref",
17031
- "parent": {
17032
- "fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
17033
- "name": "RefAttributes"
17034
- },
17035
- "declarations": [
17036
- {
17037
- "fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
17038
- "name": "RefAttributes"
17039
- }
17040
- ],
17041
- "required": false,
17042
- "type": {
17043
- "name": "Ref<HTMLDetailsElement>"
17044
- }
17045
- }
17046
- }
17047
- },
17048
- {
17049
- "filePath": "src/dropdown/Menu/GroupedList/Heading.tsx",
17050
- "displayName": "Heading",
17051
- "props": {
17052
- "children": {
17053
- "defaultValue": null,
17054
- "description": "Heading",
17055
- "name": "children",
17056
- "parent": {
17057
- "fileName": "src/dropdown/Menu/GroupedList/Heading.tsx",
17361
+ "fileName": "src/dropdown/Menu/GroupedList/GroupedHeading.tsx",
17058
17362
  "name": "GroupedHeadingProps"
17059
17363
  },
17060
17364
  "declarations": [
17061
17365
  {
17062
- "fileName": "src/dropdown/Menu/GroupedList/Heading.tsx",
17366
+ "fileName": "src/dropdown/Menu/GroupedList/GroupedHeading.tsx",
17063
17367
  "name": "GroupedHeadingProps"
17064
17368
  }
17065
17369
  ],
@@ -17109,7 +17413,7 @@
17109
17413
  }
17110
17414
  },
17111
17415
  {
17112
- "filePath": "src/dropdown/Menu/GroupedList/Item.tsx",
17416
+ "filePath": "src/dropdown/Menu/GroupedList/GroupedItem.tsx",
17113
17417
  "displayName": "GroupedItem",
17114
17418
  "props": {
17115
17419
  "children": {
@@ -17117,12 +17421,12 @@
17117
17421
  "description": "Menu item content",
17118
17422
  "name": "children",
17119
17423
  "parent": {
17120
- "fileName": "src/dropdown/Menu/GroupedList/Item.tsx",
17424
+ "fileName": "src/dropdown/Menu/GroupedList/GroupedItem.tsx",
17121
17425
  "name": "GroupedItemProps"
17122
17426
  },
17123
17427
  "declarations": [
17124
17428
  {
17125
- "fileName": "src/dropdown/Menu/GroupedList/Item.tsx",
17429
+ "fileName": "src/dropdown/Menu/GroupedList/GroupedItem.tsx",
17126
17430
  "name": "GroupedItemProps"
17127
17431
  }
17128
17432
  ],
@@ -40,12 +40,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
40
40
  exports.DescriptionList = void 0;
41
41
  const clsx_1 = __importDefault(require("clsx"));
42
42
  const react_1 = __importStar(require("react"));
43
- const Heading_1 = __importDefault(require("./Heading"));
44
- const Item_1 = __importDefault(require("./Item"));
43
+ const GroupedHeading_1 = __importDefault(require("./GroupedHeading"));
44
+ const GroupedItem_1 = __importDefault(require("./GroupedItem"));
45
45
  exports.DescriptionList = (0, react_1.forwardRef)((_a, ref) => {
46
46
  var { className, children } = _a, rest = __rest(_a, ["className", "children"]);
47
47
  return (react_1.default.createElement("dl", Object.assign({}, rest, { ref: ref, className: (0, clsx_1.default)("navds-dropdown__list", className) }), children));
48
48
  });
49
- exports.DescriptionList.Heading = Heading_1.default;
50
- exports.DescriptionList.Item = Item_1.default;
49
+ exports.DescriptionList.Heading = GroupedHeading_1.default;
50
+ exports.DescriptionList.Item = GroupedItem_1.default;
51
51
  exports.default = exports.DescriptionList;
package/cjs/index.js CHANGED
@@ -48,3 +48,4 @@ __exportStar(require("./toggle-group"), exports);
48
48
  __exportStar(require("./tooltip"), exports);
49
49
  __exportStar(require("./typography"), exports);
50
50
  __exportStar(require("./util"), exports);
51
+ __exportStar(require("./layout/stack"), exports);
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.HStack = void 0;
27
+ const react_1 = __importStar(require("react"));
28
+ const Stack_1 = require("./Stack");
29
+ /**
30
+ * Layout-primitive for horizontal flexbox
31
+ *
32
+ * @see [📝 Documentation](https://aksel.nav.no/komponenter/core/Stack)
33
+ * @see 🏷️ {@link HStackProps}
34
+ * @see [🤖 OverridableComponent](https://aksel.nav.no/grunnleggende/kode/overridablecomponent) support
35
+ *
36
+ * @example
37
+ * <HStack gap="8">
38
+ * <MyComponent />
39
+ * <MyComponent />
40
+ * </HStack>
41
+ *
42
+ * @example
43
+ * // Responsive gap
44
+ * <HStack gap={{xs: "2", md: "6"}}>
45
+ * <MyComponent />
46
+ * <MyComponent />
47
+ * </HStack>
48
+ */
49
+ exports.HStack = (0, react_1.forwardRef)((props, ref) => {
50
+ return react_1.default.createElement(Stack_1.Stack, Object.assign({}, props, { ref: ref, direction: "row" }));
51
+ });
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Spacer = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ /**
9
+ * Layout-primitive for auto-spacing between elements
10
+ *
11
+ * @see [📝 Documentation](https://aksel.nav.no/komponenter/core/Stack)
12
+ *
13
+ * @example
14
+ * <HStack gap="8">
15
+ * <MyComponent />
16
+ * <Spacer />
17
+ * <MyComponent />
18
+ * </HStack>
19
+ */
20
+ const Spacer = () => react_1.default.createElement("div", { className: "navds-stack__spacer" });
21
+ exports.Spacer = Spacer;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __rest = (this && this.__rest) || function (s, e) {
26
+ var t = {};
27
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
28
+ t[p] = s[p];
29
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
30
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
32
+ t[p[i]] = s[p[i]];
33
+ }
34
+ return t;
35
+ };
36
+ var __importDefault = (this && this.__importDefault) || function (mod) {
37
+ return (mod && mod.__esModule) ? mod : { "default": mod };
38
+ };
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.Stack = void 0;
41
+ const clsx_1 = __importDefault(require("clsx"));
42
+ const react_1 = __importStar(require("react"));
43
+ const css_1 = require("../utilities/css");
44
+ exports.Stack = (0, react_1.forwardRef)((_a, ref) => {
45
+ var { as: Component = "div", className, align, justify, wrap = true, gap, style: _style, direction } = _a, rest = __rest(_a, ["as", "className", "align", "justify", "wrap", "gap", "style", "direction"]);
46
+ const style = Object.assign(Object.assign({ "--ac-stack-direction": direction, "--ac-stack-align": align, "--ac-stack-justify": justify, "--ac-stack-wrap": wrap ? "wrap" : "nowrap" }, (0, css_1.getResponsiveProps)(`stack`, "gap", "spacing", gap)), _style);
47
+ return (react_1.default.createElement(Component, Object.assign({}, rest, { ref: ref, style: style, className: (0, clsx_1.default)("navds-stack", className, {
48
+ "navds-vstack": direction === "column",
49
+ "navds-hstack": direction === "row",
50
+ }) })));
51
+ });