@entifix/react-controls 0.1.2 → 0.1.3

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 (122) hide show
  1. package/README.md +5 -5
  2. package/dist/index.d.ts +12 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +12 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/primitives.d.ts +12 -0
  7. package/dist/primitives.d.ts.map +1 -1
  8. package/dist/primitives.js +12 -0
  9. package/dist/primitives.js.map +1 -1
  10. package/dist/theme/index.d.ts +1 -0
  11. package/dist/theme/index.d.ts.map +1 -1
  12. package/dist/theme/index.js +1 -0
  13. package/dist/theme/index.js.map +1 -1
  14. package/dist/theme/theme-script.d.ts +26 -0
  15. package/dist/theme/theme-script.d.ts.map +1 -0
  16. package/dist/theme/theme-script.js +38 -0
  17. package/dist/theme/theme-script.js.map +1 -0
  18. package/dist/ui/atoms/external-link/external-link.d.ts +9 -0
  19. package/dist/ui/atoms/external-link/external-link.d.ts.map +1 -0
  20. package/dist/ui/atoms/external-link/external-link.js +13 -0
  21. package/dist/ui/atoms/external-link/external-link.js.map +1 -0
  22. package/dist/ui/atoms/external-link/index.d.ts +2 -0
  23. package/dist/ui/atoms/external-link/index.d.ts.map +1 -0
  24. package/dist/ui/atoms/external-link/index.js +3 -0
  25. package/dist/ui/atoms/external-link/index.js.map +1 -0
  26. package/dist/ui/atoms/switch/index.d.ts +2 -0
  27. package/dist/ui/atoms/switch/index.d.ts.map +1 -0
  28. package/dist/ui/atoms/switch/index.js +3 -0
  29. package/dist/ui/atoms/switch/index.js.map +1 -0
  30. package/dist/ui/atoms/switch/switch.d.ts +10 -0
  31. package/dist/ui/atoms/switch/switch.d.ts.map +1 -0
  32. package/dist/ui/atoms/switch/switch.js +43 -0
  33. package/dist/ui/atoms/switch/switch.js.map +1 -0
  34. package/dist/ui/molecules/nav-menu/index.d.ts +2 -0
  35. package/dist/ui/molecules/nav-menu/index.d.ts.map +1 -0
  36. package/dist/ui/molecules/nav-menu/index.js +3 -0
  37. package/dist/ui/molecules/nav-menu/index.js.map +1 -0
  38. package/dist/ui/molecules/nav-menu/nav-menu.d.ts +30 -0
  39. package/dist/ui/molecules/nav-menu/nav-menu.d.ts.map +1 -0
  40. package/dist/ui/molecules/nav-menu/nav-menu.js +58 -0
  41. package/dist/ui/molecules/nav-menu/nav-menu.js.map +1 -0
  42. package/dist/ui/molecules/segmented-control/index.d.ts +2 -0
  43. package/dist/ui/molecules/segmented-control/index.d.ts.map +1 -0
  44. package/dist/ui/molecules/segmented-control/index.js +3 -0
  45. package/dist/ui/molecules/segmented-control/index.js.map +1 -0
  46. package/dist/ui/molecules/segmented-control/segmented-control.d.ts +21 -0
  47. package/dist/ui/molecules/segmented-control/segmented-control.d.ts.map +1 -0
  48. package/dist/ui/molecules/segmented-control/segmented-control.js +55 -0
  49. package/dist/ui/molecules/segmented-control/segmented-control.js.map +1 -0
  50. package/dist/ui/molecules/segmented-nav/index.d.ts +2 -0
  51. package/dist/ui/molecules/segmented-nav/index.d.ts.map +1 -0
  52. package/dist/ui/molecules/segmented-nav/index.js +3 -0
  53. package/dist/ui/molecules/segmented-nav/index.js.map +1 -0
  54. package/dist/ui/molecules/segmented-nav/segment-classes.d.ts +9 -0
  55. package/dist/ui/molecules/segmented-nav/segment-classes.d.ts.map +1 -0
  56. package/dist/ui/molecules/segmented-nav/segment-classes.js +9 -0
  57. package/dist/ui/molecules/segmented-nav/segment-classes.js.map +1 -0
  58. package/dist/ui/molecules/segmented-nav/segmented-nav.d.ts +30 -0
  59. package/dist/ui/molecules/segmented-nav/segmented-nav.d.ts.map +1 -0
  60. package/dist/ui/molecules/segmented-nav/segmented-nav.js +46 -0
  61. package/dist/ui/molecules/segmented-nav/segmented-nav.js.map +1 -0
  62. package/dist/ui/molecules/split-button/index.d.ts +2 -0
  63. package/dist/ui/molecules/split-button/index.d.ts.map +1 -0
  64. package/dist/ui/molecules/split-button/index.js +3 -0
  65. package/dist/ui/molecules/split-button/index.js.map +1 -0
  66. package/dist/ui/molecules/split-button/split-button.d.ts +21 -0
  67. package/dist/ui/molecules/split-button/split-button.d.ts.map +1 -0
  68. package/dist/ui/molecules/split-button/split-button.js +35 -0
  69. package/dist/ui/molecules/split-button/split-button.js.map +1 -0
  70. package/dist/ui/molecules/split-view/index.d.ts +2 -0
  71. package/dist/ui/molecules/split-view/index.d.ts.map +1 -0
  72. package/dist/ui/molecules/split-view/index.js +3 -0
  73. package/dist/ui/molecules/split-view/index.js.map +1 -0
  74. package/dist/ui/molecules/split-view/split-view.d.ts +35 -0
  75. package/dist/ui/molecules/split-view/split-view.d.ts.map +1 -0
  76. package/dist/ui/molecules/split-view/split-view.js +76 -0
  77. package/dist/ui/molecules/split-view/split-view.js.map +1 -0
  78. package/dist/ui/utils/active-heading/active-heading.d.ts +16 -0
  79. package/dist/ui/utils/active-heading/active-heading.d.ts.map +1 -0
  80. package/dist/ui/utils/active-heading/active-heading.js +68 -0
  81. package/dist/ui/utils/active-heading/active-heading.js.map +1 -0
  82. package/dist/ui/utils/active-heading/index.d.ts +2 -0
  83. package/dist/ui/utils/active-heading/index.d.ts.map +1 -0
  84. package/dist/ui/utils/active-heading/index.js +3 -0
  85. package/dist/ui/utils/active-heading/index.js.map +1 -0
  86. package/dist/ui/utils/active-section/active-section.d.ts +11 -0
  87. package/dist/ui/utils/active-section/active-section.d.ts.map +1 -0
  88. package/dist/ui/utils/active-section/active-section.js +45 -0
  89. package/dist/ui/utils/active-section/active-section.js.map +1 -0
  90. package/dist/ui/utils/active-section/index.d.ts +2 -0
  91. package/dist/ui/utils/active-section/index.d.ts.map +1 -0
  92. package/dist/ui/utils/active-section/index.js +3 -0
  93. package/dist/ui/utils/active-section/index.js.map +1 -0
  94. package/dist/ui/utils/fold-script/fold-script.d.ts +20 -0
  95. package/dist/ui/utils/fold-script/fold-script.d.ts.map +1 -0
  96. package/dist/ui/utils/fold-script/fold-script.js +30 -0
  97. package/dist/ui/utils/fold-script/fold-script.js.map +1 -0
  98. package/dist/ui/utils/fold-script/index.d.ts +2 -0
  99. package/dist/ui/utils/fold-script/index.d.ts.map +1 -0
  100. package/dist/ui/utils/fold-script/index.js +3 -0
  101. package/dist/ui/utils/fold-script/index.js.map +1 -0
  102. package/dist/ui/utils/keep-section/index.d.ts +2 -0
  103. package/dist/ui/utils/keep-section/index.d.ts.map +1 -0
  104. package/dist/ui/utils/keep-section/index.js +3 -0
  105. package/dist/ui/utils/keep-section/index.js.map +1 -0
  106. package/dist/ui/utils/keep-section/keep-section.d.ts +8 -0
  107. package/dist/ui/utils/keep-section/keep-section.d.ts.map +1 -0
  108. package/dist/ui/utils/keep-section/keep-section.js +24 -0
  109. package/dist/ui/utils/keep-section/keep-section.js.map +1 -0
  110. package/dist/ui/utils/media-query/index.d.ts +2 -0
  111. package/dist/ui/utils/media-query/index.d.ts.map +1 -0
  112. package/dist/ui/utils/media-query/index.js +3 -0
  113. package/dist/ui/utils/media-query/index.js.map +1 -0
  114. package/dist/ui/utils/media-query/media-query.d.ts +7 -0
  115. package/dist/ui/utils/media-query/media-query.d.ts.map +1 -0
  116. package/dist/ui/utils/media-query/media-query.js +18 -0
  117. package/dist/ui/utils/media-query/media-query.js.map +1 -0
  118. package/package.json +5 -5
  119. package/dist/i18n/spec-support/catalogs.d.ts +0 -2
  120. package/dist/i18n/spec-support/catalogs.d.ts.map +0 -1
  121. package/dist/i18n/spec-support/catalogs.js +0 -142
  122. package/dist/i18n/spec-support/catalogs.js.map +0 -1
package/README.md CHANGED
@@ -12,11 +12,11 @@ pnpm add @entifix/react-controls effect react
12
12
 
13
13
  ## Entry points
14
14
 
15
- | Import | What it holds |
16
- | ------------------------------------ | ----------------------------------------------------------------------------------------- |
17
- | `@entifix/react-controls` | Everything: entity organisms, layout primitives, atoms, theme and UI-preference providers |
18
- | `@entifix/react-controls/primitives` | Layout primitives and atoms only — no entity metadata |
19
- | `@entifix/react-controls/i18next` | `I18nProvider`, binding the controls to i18next |
15
+ | Import | What it holds |
16
+ | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
17
+ | `@entifix/react-controls` | Everything: entity organisms, layout primitives, atoms, theme and UI-preference providers |
18
+ | `@entifix/react-controls/primitives` | Layout primitives, atoms and presentational molecules (`SegmentedNav`, `SplitView`, `NavMenu`…), `ThemeScript` — no entity metadata |
19
+ | `@entifix/react-controls/i18next` | `I18nProvider`, binding the controls to i18next |
20
20
 
21
21
  ## Optional peers
22
22
 
package/dist/index.d.ts CHANGED
@@ -4,9 +4,11 @@ export * from './theme/index.js';
4
4
  export * from './ui/actions/index.js';
5
5
  export * from './ui/atoms/button/index.js';
6
6
  export * from './ui/atoms/cell-value/index.js';
7
+ export * from './ui/atoms/external-link/index.js';
7
8
  export * from './ui/atoms/field/index.js';
8
9
  export * from './ui/atoms/field-control/index.js';
9
10
  export * from './ui/atoms/skeleton/index.js';
11
+ export * from './ui/atoms/switch/index.js';
10
12
  export * from './ui/atoms/table/index.js';
11
13
  export * from './ui/atoms/text/index.js';
12
14
  export * from './ui/layout/box/index.js';
@@ -29,8 +31,13 @@ export * from './ui/molecules/entity-record-card/index.js';
29
31
  export * from './ui/molecules/filter-builder/index.js';
30
32
  export * from './ui/molecules/loading-boundary/index.js';
31
33
  export * from './ui/molecules/menu/index.js';
34
+ export * from './ui/molecules/nav-menu/index.js';
32
35
  export * from './ui/molecules/pagination/index.js';
36
+ export * from './ui/molecules/segmented-control/index.js';
37
+ export * from './ui/molecules/segmented-nav/index.js';
33
38
  export * from './ui/molecules/sort-builder/index.js';
39
+ export * from './ui/molecules/split-button/index.js';
40
+ export * from './ui/molecules/split-view/index.js';
34
41
  export * from './ui/molecules/stack/index.js';
35
42
  export * from './ui/molecules/tab-strip/index.js';
36
43
  export * from './ui/molecules/table-toolbar/index.js';
@@ -41,6 +48,11 @@ export * from './ui/organisms/entity-form/index.js';
41
48
  export * from './ui/organisms/entity-table/index.js';
42
49
  export * from './ui/organisms/top-bar/index.js';
43
50
  export * from './ui/organisms/wizard/index.js';
51
+ export * from './ui/utils/active-heading/index.js';
52
+ export * from './ui/utils/active-section/index.js';
44
53
  export * from './ui/utils/cn.js';
54
+ export * from './ui/utils/fold-script/index.js';
55
+ export * from './ui/utils/keep-section/index.js';
56
+ export * from './ui/utils/media-query/index.js';
45
57
  export * from './ui/utils/use-hotkey.js';
46
58
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC"}
package/dist/index.js CHANGED
@@ -4,9 +4,11 @@ export * from './theme/index.js';
4
4
  export * from './ui/actions/index.js';
5
5
  export * from './ui/atoms/button/index.js';
6
6
  export * from './ui/atoms/cell-value/index.js';
7
+ export * from './ui/atoms/external-link/index.js';
7
8
  export * from './ui/atoms/field/index.js';
8
9
  export * from './ui/atoms/field-control/index.js';
9
10
  export * from './ui/atoms/skeleton/index.js';
11
+ export * from './ui/atoms/switch/index.js';
10
12
  export * from './ui/atoms/table/index.js';
11
13
  export * from './ui/atoms/text/index.js';
12
14
  export * from './ui/layout/box/index.js';
@@ -29,8 +31,13 @@ export * from './ui/molecules/entity-record-card/index.js';
29
31
  export * from './ui/molecules/filter-builder/index.js';
30
32
  export * from './ui/molecules/loading-boundary/index.js';
31
33
  export * from './ui/molecules/menu/index.js';
34
+ export * from './ui/molecules/nav-menu/index.js';
32
35
  export * from './ui/molecules/pagination/index.js';
36
+ export * from './ui/molecules/segmented-control/index.js';
37
+ export * from './ui/molecules/segmented-nav/index.js';
33
38
  export * from './ui/molecules/sort-builder/index.js';
39
+ export * from './ui/molecules/split-button/index.js';
40
+ export * from './ui/molecules/split-view/index.js';
34
41
  export * from './ui/molecules/stack/index.js';
35
42
  export * from './ui/molecules/tab-strip/index.js';
36
43
  export * from './ui/molecules/table-toolbar/index.js';
@@ -41,7 +48,12 @@ export * from './ui/organisms/entity-form/index.js';
41
48
  export * from './ui/organisms/entity-table/index.js';
42
49
  export * from './ui/organisms/top-bar/index.js';
43
50
  export * from './ui/organisms/wizard/index.js';
51
+ export * from './ui/utils/active-heading/index.js';
52
+ export * from './ui/utils/active-section/index.js';
44
53
  export * from './ui/utils/cn.js';
54
+ export * from './ui/utils/fold-script/index.js';
55
+ export * from './ui/utils/keep-section/index.js';
56
+ export * from './ui/utils/media-query/index.js';
45
57
  export * from './ui/utils/use-hotkey.js';
46
58
 
47
59
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './i18n/index.js';\nexport * from './preferences/index.js';\nexport * from './theme/index.js';\nexport * from './ui/actions/index.js';\nexport * from './ui/atoms/button/index.js';\nexport * from './ui/atoms/cell-value/index.js';\nexport * from './ui/atoms/field/index.js';\nexport * from './ui/atoms/field-control/index.js';\nexport * from './ui/atoms/skeleton/index.js';\nexport * from './ui/atoms/table/index.js';\nexport * from './ui/atoms/text/index.js';\nexport * from './ui/layout/box/index.js';\nexport * from './ui/layout/center/index.js';\nexport * from './ui/layout/cluster/index.js';\nexport * from './ui/layout/cover/index.js';\nexport * from './ui/layout/grid/index.js';\nexport * from './ui/layout/sidebar/index.js';\nexport * from './ui/layout/switcher/index.js';\nexport * from './ui/molecules/breadcrumbs/index.js';\nexport * from './ui/molecules/bulk-action-bar/index.js';\nexport * from './ui/molecules/bulk-result/index.js';\nexport * from './ui/molecules/card/index.js';\nexport * from './ui/molecules/column-settings/index.js';\nexport * from './ui/molecules/confirm-dialog/index.js';\nexport * from './ui/molecules/drawer/index.js';\nexport * from './ui/molecules/entity-link-input/index.js';\nexport * from './ui/molecules/entity-link-picker/index.js';\nexport * from './ui/molecules/entity-record-card/index.js';\nexport * from './ui/molecules/filter-builder/index.js';\nexport * from './ui/molecules/loading-boundary/index.js';\nexport * from './ui/molecules/menu/index.js';\nexport * from './ui/molecules/pagination/index.js';\nexport * from './ui/molecules/sort-builder/index.js';\nexport * from './ui/molecules/stack/index.js';\nexport * from './ui/molecules/tab-strip/index.js';\nexport * from './ui/molecules/table-toolbar/index.js';\nexport * from './ui/molecules/theme-switcher/index.js';\nexport * from './ui/organisms/command-palette/index.js';\nexport * from './ui/organisms/entity-detail-grid/index.js';\nexport * from './ui/organisms/entity-form/index.js';\nexport * from './ui/organisms/entity-table/index.js';\nexport * from './ui/organisms/top-bar/index.js';\nexport * from './ui/organisms/wizard/index.js';\nexport * from './ui/utils/cn.js';\nexport * from './ui/utils/use-hotkey.js';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,yBAAyB;AACvC,cAAc,mBAAmB;AACjC,cAAc,wBAAwB;AACtC,cAAc,6BAA6B;AAC3C,cAAc,iCAAiC;AAC/C,cAAc,4BAA4B;AAC1C,cAAc,oCAAoC;AAClD,cAAc,+BAA+B;AAC7C,cAAc,4BAA4B;AAC1C,cAAc,2BAA2B;AACzC,cAAc,2BAA2B;AACzC,cAAc,8BAA8B;AAC5C,cAAc,+BAA+B;AAC7C,cAAc,6BAA6B;AAC3C,cAAc,4BAA4B;AAC1C,cAAc,+BAA+B;AAC7C,cAAc,gCAAgC;AAC9C,cAAc,sCAAsC;AACpD,cAAc,0CAA0C;AACxD,cAAc,sCAAsC;AACpD,cAAc,+BAA+B;AAC7C,cAAc,0CAA0C;AACxD,cAAc,yCAAyC;AACvD,cAAc,iCAAiC;AAC/C,cAAc,4CAA4C;AAC1D,cAAc,6CAA6C;AAC3D,cAAc,6CAA6C;AAC3D,cAAc,yCAAyC;AACvD,cAAc,2CAA2C;AACzD,cAAc,+BAA+B;AAC7C,cAAc,qCAAqC;AACnD,cAAc,uCAAuC;AACrD,cAAc,gCAAgC;AAC9C,cAAc,oCAAoC;AAClD,cAAc,wCAAwC;AACtD,cAAc,yCAAyC;AACvD,cAAc,0CAA0C;AACxD,cAAc,6CAA6C;AAC3D,cAAc,sCAAsC;AACpD,cAAc,uCAAuC;AACrD,cAAc,kCAAkC;AAChD,cAAc,iCAAiC;AAC/C,cAAc,mBAAmB;AACjC,cAAc,2BAA2B"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './i18n/index.js';\nexport * from './preferences/index.js';\nexport * from './theme/index.js';\nexport * from './ui/actions/index.js';\nexport * from './ui/atoms/button/index.js';\nexport * from './ui/atoms/cell-value/index.js';\nexport * from './ui/atoms/external-link/index.js';\nexport * from './ui/atoms/field/index.js';\nexport * from './ui/atoms/field-control/index.js';\nexport * from './ui/atoms/skeleton/index.js';\nexport * from './ui/atoms/switch/index.js';\nexport * from './ui/atoms/table/index.js';\nexport * from './ui/atoms/text/index.js';\nexport * from './ui/layout/box/index.js';\nexport * from './ui/layout/center/index.js';\nexport * from './ui/layout/cluster/index.js';\nexport * from './ui/layout/cover/index.js';\nexport * from './ui/layout/grid/index.js';\nexport * from './ui/layout/sidebar/index.js';\nexport * from './ui/layout/switcher/index.js';\nexport * from './ui/molecules/breadcrumbs/index.js';\nexport * from './ui/molecules/bulk-action-bar/index.js';\nexport * from './ui/molecules/bulk-result/index.js';\nexport * from './ui/molecules/card/index.js';\nexport * from './ui/molecules/column-settings/index.js';\nexport * from './ui/molecules/confirm-dialog/index.js';\nexport * from './ui/molecules/drawer/index.js';\nexport * from './ui/molecules/entity-link-input/index.js';\nexport * from './ui/molecules/entity-link-picker/index.js';\nexport * from './ui/molecules/entity-record-card/index.js';\nexport * from './ui/molecules/filter-builder/index.js';\nexport * from './ui/molecules/loading-boundary/index.js';\nexport * from './ui/molecules/menu/index.js';\nexport * from './ui/molecules/nav-menu/index.js';\nexport * from './ui/molecules/pagination/index.js';\nexport * from './ui/molecules/segmented-control/index.js';\nexport * from './ui/molecules/segmented-nav/index.js';\nexport * from './ui/molecules/sort-builder/index.js';\nexport * from './ui/molecules/split-button/index.js';\nexport * from './ui/molecules/split-view/index.js';\nexport * from './ui/molecules/stack/index.js';\nexport * from './ui/molecules/tab-strip/index.js';\nexport * from './ui/molecules/table-toolbar/index.js';\nexport * from './ui/molecules/theme-switcher/index.js';\nexport * from './ui/organisms/command-palette/index.js';\nexport * from './ui/organisms/entity-detail-grid/index.js';\nexport * from './ui/organisms/entity-form/index.js';\nexport * from './ui/organisms/entity-table/index.js';\nexport * from './ui/organisms/top-bar/index.js';\nexport * from './ui/organisms/wizard/index.js';\nexport * from './ui/utils/active-heading/index.js';\nexport * from './ui/utils/active-section/index.js';\nexport * from './ui/utils/cn.js';\nexport * from './ui/utils/fold-script/index.js';\nexport * from './ui/utils/keep-section/index.js';\nexport * from './ui/utils/media-query/index.js';\nexport * from './ui/utils/use-hotkey.js';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,yBAAyB;AACvC,cAAc,mBAAmB;AACjC,cAAc,wBAAwB;AACtC,cAAc,6BAA6B;AAC3C,cAAc,iCAAiC;AAC/C,cAAc,oCAAoC;AAClD,cAAc,4BAA4B;AAC1C,cAAc,oCAAoC;AAClD,cAAc,+BAA+B;AAC7C,cAAc,6BAA6B;AAC3C,cAAc,4BAA4B;AAC1C,cAAc,2BAA2B;AACzC,cAAc,2BAA2B;AACzC,cAAc,8BAA8B;AAC5C,cAAc,+BAA+B;AAC7C,cAAc,6BAA6B;AAC3C,cAAc,4BAA4B;AAC1C,cAAc,+BAA+B;AAC7C,cAAc,gCAAgC;AAC9C,cAAc,sCAAsC;AACpD,cAAc,0CAA0C;AACxD,cAAc,sCAAsC;AACpD,cAAc,+BAA+B;AAC7C,cAAc,0CAA0C;AACxD,cAAc,yCAAyC;AACvD,cAAc,iCAAiC;AAC/C,cAAc,4CAA4C;AAC1D,cAAc,6CAA6C;AAC3D,cAAc,6CAA6C;AAC3D,cAAc,yCAAyC;AACvD,cAAc,2CAA2C;AACzD,cAAc,+BAA+B;AAC7C,cAAc,mCAAmC;AACjD,cAAc,qCAAqC;AACnD,cAAc,4CAA4C;AAC1D,cAAc,wCAAwC;AACtD,cAAc,uCAAuC;AACrD,cAAc,uCAAuC;AACrD,cAAc,qCAAqC;AACnD,cAAc,gCAAgC;AAC9C,cAAc,oCAAoC;AAClD,cAAc,wCAAwC;AACtD,cAAc,yCAAyC;AACvD,cAAc,0CAA0C;AACxD,cAAc,6CAA6C;AAC3D,cAAc,sCAAsC;AACpD,cAAc,uCAAuC;AACrD,cAAc,kCAAkC;AAChD,cAAc,iCAAiC;AAC/C,cAAc,qCAAqC;AACnD,cAAc,qCAAqC;AACnD,cAAc,mBAAmB;AACjC,cAAc,kCAAkC;AAChD,cAAc,mCAAmC;AACjD,cAAc,kCAAkC;AAChD,cAAc,2BAA2B"}
@@ -1,8 +1,10 @@
1
1
  export * from './i18n/index.js';
2
2
  export * from './theme/index.js';
3
3
  export * from './ui/atoms/button/index.js';
4
+ export * from './ui/atoms/external-link/index.js';
4
5
  export * from './ui/atoms/field/index.js';
5
6
  export * from './ui/atoms/skeleton/index.js';
7
+ export * from './ui/atoms/switch/index.js';
6
8
  export * from './ui/atoms/table/index.js';
7
9
  export * from './ui/atoms/text/index.js';
8
10
  export * from './ui/layout/box/index.js';
@@ -17,9 +19,19 @@ export * from './ui/molecules/card/index.js';
17
19
  export * from './ui/molecules/confirm-dialog/index.js';
18
20
  export * from './ui/molecules/loading-boundary/index.js';
19
21
  export * from './ui/molecules/menu/index.js';
22
+ export * from './ui/molecules/nav-menu/index.js';
20
23
  export * from './ui/molecules/pagination/index.js';
24
+ export * from './ui/molecules/segmented-control/index.js';
25
+ export * from './ui/molecules/segmented-nav/index.js';
26
+ export * from './ui/molecules/split-button/index.js';
27
+ export * from './ui/molecules/split-view/index.js';
21
28
  export * from './ui/molecules/stack/index.js';
22
29
  export * from './ui/molecules/tab-strip/index.js';
23
30
  export * from './ui/molecules/theme-switcher/index.js';
31
+ export * from './ui/utils/active-heading/index.js';
32
+ export * from './ui/utils/active-section/index.js';
24
33
  export * from './ui/utils/cn.js';
34
+ export * from './ui/utils/fold-script/index.js';
35
+ export * from './ui/utils/keep-section/index.js';
36
+ export * from './ui/utils/media-query/index.js';
25
37
  //# sourceMappingURL=primitives.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../src/primitives.ts"],"names":[],"mappings":"AAyBA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AAIzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAG9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../src/primitives.ts"],"names":[],"mappings":"AAyBA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AAIzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAG9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC"}
@@ -26,8 +26,10 @@ export * from './i18n/index.js';
26
26
  export * from './theme/index.js';
27
27
  // Atoms — text, buttons, fields, tables, loading placeholders.
28
28
  export * from './ui/atoms/button/index.js';
29
+ export * from './ui/atoms/external-link/index.js';
29
30
  export * from './ui/atoms/field/index.js';
30
31
  export * from './ui/atoms/skeleton/index.js';
32
+ export * from './ui/atoms/switch/index.js';
31
33
  export * from './ui/atoms/table/index.js';
32
34
  export * from './ui/atoms/text/index.js';
33
35
  // Layout primitives (Every Layout): flex-first, with `Grid` the one CSS-Grid
@@ -45,10 +47,20 @@ export * from './ui/molecules/card/index.js';
45
47
  export * from './ui/molecules/confirm-dialog/index.js';
46
48
  export * from './ui/molecules/loading-boundary/index.js';
47
49
  export * from './ui/molecules/menu/index.js';
50
+ export * from './ui/molecules/nav-menu/index.js';
48
51
  export * from './ui/molecules/pagination/index.js';
52
+ export * from './ui/molecules/segmented-control/index.js';
53
+ export * from './ui/molecules/segmented-nav/index.js';
54
+ export * from './ui/molecules/split-button/index.js';
55
+ export * from './ui/molecules/split-view/index.js';
49
56
  export * from './ui/molecules/stack/index.js';
50
57
  export * from './ui/molecules/tab-strip/index.js';
51
58
  export * from './ui/molecules/theme-switcher/index.js';
59
+ export * from './ui/utils/active-heading/index.js';
60
+ export * from './ui/utils/active-section/index.js';
52
61
  export * from './ui/utils/cn.js';
62
+ export * from './ui/utils/fold-script/index.js';
63
+ export * from './ui/utils/keep-section/index.js';
64
+ export * from './ui/utils/media-query/index.js';
53
65
 
54
66
  //# sourceMappingURL=primitives.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/primitives.ts"],"sourcesContent":["// The entity-free half of the design system, published as\n// `@entifix/react-controls/primitives`.\n//\n// It exists because the package's main barrel is one flat re-export of\n// everything, and a bundler cannot drop what a module graph reaches: a\n// storefront page importing `Card` from `.` pulled `EntityTable`,\n// `FilterBuilder`, `SortBuilder`, `ColumnSettings` and the RSQL machinery\n// behind them into its client bundle — 541 KB of back-office UI shipped to a\n// visitor looking at a product.\n//\n// The line drawn here is not \"small vs large\", it is **presentational vs\n// entity-aware**: everything below can be understood without knowing what an\n// entity is. Anything that reads entity metadata (`CellValue`, `FieldControl`,\n// `EntityTable`, `EntityForm`, the filter/sort/column builders, the link\n// inputs) stays behind the main entry, where the back-office already imports it.\n//\n// Consumers that need both may import both; nothing is duplicated, and the main\n// barrel keeps re-exporting all of this so no existing import breaks.\n\n// Providers every app mounts, whatever it renders.\n//\n// `./preferences` is deliberately **not** here. The UI-preferences store is\n// backed by Effect `Layer`s, so re-exporting it drags the whole Effect runtime\n// into the browser — and what it remembers (column visibility, table density)\n// only exists in the back-office. A storefront has no preferences to store.\nexport * from './i18n/index.js';\nexport * from './theme/index.js';\n\n// Atoms — text, buttons, fields, tables, loading placeholders.\nexport * from './ui/atoms/button/index.js';\nexport * from './ui/atoms/field/index.js';\nexport * from './ui/atoms/skeleton/index.js';\nexport * from './ui/atoms/table/index.js';\nexport * from './ui/atoms/text/index.js';\n\n// Layout primitives (Every Layout): flex-first, with `Grid` the one CSS-Grid\n// escape hatch.\nexport * from './ui/layout/box/index.js';\nexport * from './ui/layout/center/index.js';\nexport * from './ui/layout/cluster/index.js';\nexport * from './ui/layout/cover/index.js';\nexport * from './ui/layout/grid/index.js';\nexport * from './ui/layout/sidebar/index.js';\nexport * from './ui/layout/switcher/index.js';\n\n// Molecules that compose the above and nothing else.\nexport * from './ui/molecules/breadcrumbs/index.js';\nexport * from './ui/molecules/card/index.js';\nexport * from './ui/molecules/confirm-dialog/index.js';\nexport * from './ui/molecules/loading-boundary/index.js';\nexport * from './ui/molecules/menu/index.js';\nexport * from './ui/molecules/pagination/index.js';\nexport * from './ui/molecules/stack/index.js';\nexport * from './ui/molecules/tab-strip/index.js';\nexport * from './ui/molecules/theme-switcher/index.js';\nexport * from './ui/utils/cn.js';\n"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,wCAAwC;AACxC,EAAE;AACF,uEAAuE;AACvE,uEAAuE;AACvE,kEAAkE;AAClE,0EAA0E;AAC1E,6EAA6E;AAC7E,gCAAgC;AAChC,EAAE;AACF,yEAAyE;AACzE,6EAA6E;AAC7E,+EAA+E;AAC/E,yEAAyE;AACzE,iFAAiF;AACjF,EAAE;AACF,gFAAgF;AAChF,sEAAsE;AAEtE,mDAAmD;AACnD,EAAE;AACF,4EAA4E;AAC5E,+EAA+E;AAC/E,8EAA8E;AAC9E,4EAA4E;AAC5E,cAAc,kBAAkB;AAChC,cAAc,mBAAmB;AAEjC,+DAA+D;AAC/D,cAAc,6BAA6B;AAC3C,cAAc,4BAA4B;AAC1C,cAAc,+BAA+B;AAC7C,cAAc,4BAA4B;AAC1C,cAAc,2BAA2B;AAEzC,6EAA6E;AAC7E,gBAAgB;AAChB,cAAc,2BAA2B;AACzC,cAAc,8BAA8B;AAC5C,cAAc,+BAA+B;AAC7C,cAAc,6BAA6B;AAC3C,cAAc,4BAA4B;AAC1C,cAAc,+BAA+B;AAC7C,cAAc,gCAAgC;AAE9C,qDAAqD;AACrD,cAAc,sCAAsC;AACpD,cAAc,+BAA+B;AAC7C,cAAc,yCAAyC;AACvD,cAAc,2CAA2C;AACzD,cAAc,+BAA+B;AAC7C,cAAc,qCAAqC;AACnD,cAAc,gCAAgC;AAC9C,cAAc,oCAAoC;AAClD,cAAc,yCAAyC;AACvD,cAAc,mBAAmB"}
1
+ {"version":3,"sources":["../src/primitives.ts"],"sourcesContent":["// The entity-free half of the design system, published as\n// `@entifix/react-controls/primitives`.\n//\n// It exists because the package's main barrel is one flat re-export of\n// everything, and a bundler cannot drop what a module graph reaches: a\n// storefront page importing `Card` from `.` pulled `EntityTable`,\n// `FilterBuilder`, `SortBuilder`, `ColumnSettings` and the RSQL machinery\n// behind them into its client bundle — 541 KB of back-office UI shipped to a\n// visitor looking at a product.\n//\n// The line drawn here is not \"small vs large\", it is **presentational vs\n// entity-aware**: everything below can be understood without knowing what an\n// entity is. Anything that reads entity metadata (`CellValue`, `FieldControl`,\n// `EntityTable`, `EntityForm`, the filter/sort/column builders, the link\n// inputs) stays behind the main entry, where the back-office already imports it.\n//\n// Consumers that need both may import both; nothing is duplicated, and the main\n// barrel keeps re-exporting all of this so no existing import breaks.\n\n// Providers every app mounts, whatever it renders.\n//\n// `./preferences` is deliberately **not** here. The UI-preferences store is\n// backed by Effect `Layer`s, so re-exporting it drags the whole Effect runtime\n// into the browser — and what it remembers (column visibility, table density)\n// only exists in the back-office. A storefront has no preferences to store.\nexport * from './i18n/index.js';\nexport * from './theme/index.js';\n\n// Atoms — text, buttons, fields, tables, loading placeholders.\nexport * from './ui/atoms/button/index.js';\nexport * from './ui/atoms/external-link/index.js';\nexport * from './ui/atoms/field/index.js';\nexport * from './ui/atoms/skeleton/index.js';\nexport * from './ui/atoms/switch/index.js';\nexport * from './ui/atoms/table/index.js';\nexport * from './ui/atoms/text/index.js';\n\n// Layout primitives (Every Layout): flex-first, with `Grid` the one CSS-Grid\n// escape hatch.\nexport * from './ui/layout/box/index.js';\nexport * from './ui/layout/center/index.js';\nexport * from './ui/layout/cluster/index.js';\nexport * from './ui/layout/cover/index.js';\nexport * from './ui/layout/grid/index.js';\nexport * from './ui/layout/sidebar/index.js';\nexport * from './ui/layout/switcher/index.js';\n\n// Molecules that compose the above and nothing else.\nexport * from './ui/molecules/breadcrumbs/index.js';\nexport * from './ui/molecules/card/index.js';\nexport * from './ui/molecules/confirm-dialog/index.js';\nexport * from './ui/molecules/loading-boundary/index.js';\nexport * from './ui/molecules/menu/index.js';\nexport * from './ui/molecules/nav-menu/index.js';\nexport * from './ui/molecules/pagination/index.js';\nexport * from './ui/molecules/segmented-control/index.js';\nexport * from './ui/molecules/segmented-nav/index.js';\nexport * from './ui/molecules/split-button/index.js';\nexport * from './ui/molecules/split-view/index.js';\nexport * from './ui/molecules/stack/index.js';\nexport * from './ui/molecules/tab-strip/index.js';\nexport * from './ui/molecules/theme-switcher/index.js';\nexport * from './ui/utils/active-heading/index.js';\nexport * from './ui/utils/active-section/index.js';\nexport * from './ui/utils/cn.js';\nexport * from './ui/utils/fold-script/index.js';\nexport * from './ui/utils/keep-section/index.js';\nexport * from './ui/utils/media-query/index.js';\n"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,wCAAwC;AACxC,EAAE;AACF,uEAAuE;AACvE,uEAAuE;AACvE,kEAAkE;AAClE,0EAA0E;AAC1E,6EAA6E;AAC7E,gCAAgC;AAChC,EAAE;AACF,yEAAyE;AACzE,6EAA6E;AAC7E,+EAA+E;AAC/E,yEAAyE;AACzE,iFAAiF;AACjF,EAAE;AACF,gFAAgF;AAChF,sEAAsE;AAEtE,mDAAmD;AACnD,EAAE;AACF,4EAA4E;AAC5E,+EAA+E;AAC/E,8EAA8E;AAC9E,4EAA4E;AAC5E,cAAc,kBAAkB;AAChC,cAAc,mBAAmB;AAEjC,+DAA+D;AAC/D,cAAc,6BAA6B;AAC3C,cAAc,oCAAoC;AAClD,cAAc,4BAA4B;AAC1C,cAAc,+BAA+B;AAC7C,cAAc,6BAA6B;AAC3C,cAAc,4BAA4B;AAC1C,cAAc,2BAA2B;AAEzC,6EAA6E;AAC7E,gBAAgB;AAChB,cAAc,2BAA2B;AACzC,cAAc,8BAA8B;AAC5C,cAAc,+BAA+B;AAC7C,cAAc,6BAA6B;AAC3C,cAAc,4BAA4B;AAC1C,cAAc,+BAA+B;AAC7C,cAAc,gCAAgC;AAE9C,qDAAqD;AACrD,cAAc,sCAAsC;AACpD,cAAc,+BAA+B;AAC7C,cAAc,yCAAyC;AACvD,cAAc,2CAA2C;AACzD,cAAc,+BAA+B;AAC7C,cAAc,mCAAmC;AACjD,cAAc,qCAAqC;AACnD,cAAc,4CAA4C;AAC1D,cAAc,wCAAwC;AACtD,cAAc,uCAAuC;AACrD,cAAc,qCAAqC;AACnD,cAAc,gCAAgC;AAC9C,cAAc,oCAAoC;AAClD,cAAc,yCAAyC;AACvD,cAAc,qCAAqC;AACnD,cAAc,qCAAqC;AACnD,cAAc,mBAAmB;AACjC,cAAc,kCAAkC;AAChD,cAAc,mCAAmC;AACjD,cAAc,kCAAkC"}
@@ -1,3 +1,4 @@
1
1
  export * from './theme-context.js';
2
+ export * from './theme-script.js';
2
3
  export * from './types.js';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './theme-context.js';
2
+ export * from './theme-script.js';
2
3
  export * from './types.js';
3
4
 
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/theme/index.ts"],"sourcesContent":["export * from './theme-context.js';\nexport * from './types.js';\n"],"names":[],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,aAAa"}
1
+ {"version":3,"sources":["../../src/theme/index.ts"],"sourcesContent":["export * from './theme-context.js';\nexport * from './theme-script.js';\nexport * from './types.js';\n"],"names":[],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,oBAAoB;AAClC,cAAc,aAAa"}
@@ -0,0 +1,26 @@
1
+ import type { ThemeOption } from './types.js';
2
+ export interface ThemeScriptProps {
3
+ /** The same registry `ThemeProvider` is given. */
4
+ themes: readonly ThemeOption[];
5
+ /** Painted when nothing valid is stored; the first theme otherwise. */
6
+ defaultTheme?: string;
7
+ /** The key `ThemeProvider` stores the choice under. */
8
+ storageKey?: string;
9
+ /** For a Content-Security-Policy that allows inline scripts by nonce. */
10
+ nonce?: string;
11
+ }
12
+ /**
13
+ * Sets `data-theme` on <html> before the first paint, so a server-rendered or
14
+ * statically exported page never flashes the wrong palette. Render it inline
15
+ * in <head>: it runs ahead of any stylesheet applying and long before React
16
+ * hydrates.
17
+ *
18
+ * A stored choice wins; otherwise `defaultTheme`, which is then stored too:
19
+ * `ThemeProvider` persists whatever theme it mounts with, and without a stored
20
+ * value to read it would mount with its own default instead. A page whose
21
+ * storage cannot be read is left unthemed, as it would be without the script.
22
+ *
23
+ * Render it from a server component; it ships no client code.
24
+ */
25
+ export declare function ThemeScript({ themes, defaultTheme, storageKey, nonce, }: ThemeScriptProps): import("react").JSX.Element;
26
+ //# sourceMappingURL=theme-script.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-script.d.ts","sourceRoot":"","sources":["../../src/theme/theme-script.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,MAAM,EAAE,SAAS,WAAW,EAAE,CAAC;IAC/B,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,YAAY,EACZ,UAA4B,EAC5B,KAAK,GACN,EAAE,gBAAgB,+BAgBlB"}
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * Sets `data-theme` on <html> before the first paint, so a server-rendered or
4
+ * statically exported page never flashes the wrong palette. Render it inline
5
+ * in <head>: it runs ahead of any stylesheet applying and long before React
6
+ * hydrates.
7
+ *
8
+ * A stored choice wins; otherwise `defaultTheme`, which is then stored too:
9
+ * `ThemeProvider` persists whatever theme it mounts with, and without a stored
10
+ * value to read it would mount with its own default instead. A page whose
11
+ * storage cannot be read is left unthemed, as it would be without the script.
12
+ *
13
+ * Render it from a server component; it ships no client code.
14
+ */ export function ThemeScript({ themes, defaultTheme, storageKey = 'entifix-theme', nonce }) {
15
+ var _ref;
16
+ const ids = themes.map((theme)=>theme.id);
17
+ const fallback = (_ref = defaultTheme != null ? defaultTheme : ids[0]) != null ? _ref : '';
18
+ const script = `(function () {
19
+ try {
20
+ var themes = ${JSON.stringify(ids)};
21
+ var key = ${JSON.stringify(storageKey)};
22
+ var theme = window.localStorage.getItem(key);
23
+ if (themes.indexOf(theme) === -1) {
24
+ theme = ${JSON.stringify(fallback)};
25
+ window.localStorage.setItem(key, theme);
26
+ }
27
+ document.documentElement.dataset.theme = theme;
28
+ } catch (error) {}
29
+ })();`;
30
+ return /*#__PURE__*/ _jsx("script", {
31
+ nonce: nonce,
32
+ dangerouslySetInnerHTML: {
33
+ __html: script
34
+ }
35
+ });
36
+ }
37
+
38
+ //# sourceMappingURL=theme-script.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/theme/theme-script.tsx"],"sourcesContent":["import type { ThemeOption } from './types.js';\n\nexport interface ThemeScriptProps {\n /** The same registry `ThemeProvider` is given. */\n themes: readonly ThemeOption[];\n /** Painted when nothing valid is stored; the first theme otherwise. */\n defaultTheme?: string;\n /** The key `ThemeProvider` stores the choice under. */\n storageKey?: string;\n /** For a Content-Security-Policy that allows inline scripts by nonce. */\n nonce?: string;\n}\n\n/**\n * Sets `data-theme` on <html> before the first paint, so a server-rendered or\n * statically exported page never flashes the wrong palette. Render it inline\n * in <head>: it runs ahead of any stylesheet applying and long before React\n * hydrates.\n *\n * A stored choice wins; otherwise `defaultTheme`, which is then stored too:\n * `ThemeProvider` persists whatever theme it mounts with, and without a stored\n * value to read it would mount with its own default instead. A page whose\n * storage cannot be read is left unthemed, as it would be without the script.\n *\n * Render it from a server component; it ships no client code.\n */\nexport function ThemeScript({\n themes,\n defaultTheme,\n storageKey = 'entifix-theme',\n nonce,\n}: ThemeScriptProps) {\n const ids = themes.map(theme => theme.id);\n const fallback = defaultTheme ?? ids[0] ?? '';\n const script = `(function () {\n try {\n var themes = ${JSON.stringify(ids)};\n var key = ${JSON.stringify(storageKey)};\n var theme = window.localStorage.getItem(key);\n if (themes.indexOf(theme) === -1) {\n theme = ${JSON.stringify(fallback)};\n window.localStorage.setItem(key, theme);\n }\n document.documentElement.dataset.theme = theme;\n } catch (error) {}\n})();`;\n return <script nonce={nonce} dangerouslySetInnerHTML={{ __html: script }} />;\n}\n"],"names":["ThemeScript","themes","defaultTheme","storageKey","nonce","ids","map","theme","id","fallback","script","JSON","stringify","dangerouslySetInnerHTML","__html"],"mappings":";AAaA;;;;;;;;;;;;CAYC,GACD,OAAO,SAASA,YAAY,EAC1BC,MAAM,EACNC,YAAY,EACZC,aAAa,eAAe,EAC5BC,KAAK,EACY;QAEAF;IADjB,MAAMG,MAAMJ,OAAOK,GAAG,CAACC,CAAAA,QAASA,MAAMC,EAAE;IACxC,MAAMC,YAAWP,OAAAA,uBAAAA,eAAgBG,GAAG,CAAC,EAAE,YAAtBH,OAA0B;IAC3C,MAAMQ,SAAS,CAAC;;iBAED,EAAEC,KAAKC,SAAS,CAACP,KAAK;cACzB,EAAEM,KAAKC,SAAS,CAACT,YAAY;;;cAG7B,EAAEQ,KAAKC,SAAS,CAACH,UAAU;;;;;KAKpC,CAAC;IACJ,qBAAO,KAACC;QAAON,OAAOA;QAAOS,yBAAyB;YAAEC,QAAQJ;QAAO;;AACzE"}
@@ -0,0 +1,9 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ /**
3
+ * A link that leaves the site: a new tab, with no `window.opener` and no
4
+ * referrer handed to the other side.
5
+ */
6
+ export declare function ExternalLink(props: ComponentPropsWithoutRef<'a'> & {
7
+ href: string;
8
+ }): import("react").JSX.Element;
9
+ //# sourceMappingURL=external-link.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"external-link.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/external-link/external-link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAEtD;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,wBAAwB,CAAC,GAAG,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,+BAGxD"}
@@ -0,0 +1,13 @@
1
+ import { _ as _extends } from "@swc/helpers/_/_extends";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ /**
4
+ * A link that leaves the site: a new tab, with no `window.opener` and no
5
+ * referrer handed to the other side.
6
+ */ export function ExternalLink(props) {
7
+ return /*#__PURE__*/ _jsx("a", _extends({}, props, {
8
+ target: "_blank",
9
+ rel: "noopener noreferrer"
10
+ }));
11
+ }
12
+
13
+ //# sourceMappingURL=external-link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/atoms/external-link/external-link.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef } from 'react';\n\n/**\n * A link that leaves the site: a new tab, with no `window.opener` and no\n * referrer handed to the other side.\n */\nexport function ExternalLink(\n props: ComponentPropsWithoutRef<'a'> & { href: string },\n) {\n return <a {...props} target=\"_blank\" rel=\"noopener noreferrer\" />;\n}\n"],"names":["ExternalLink","props","a","target","rel"],"mappings":";;AAEA;;;CAGC,GACD,OAAO,SAASA,aACdC,KAAuD;IAEvD,qBAAO,KAACC,kBAAMD;QAAOE,QAAO;QAASC,KAAI;;AAC3C"}
@@ -0,0 +1,2 @@
1
+ export * from './external-link.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/external-link/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './external-link.js';
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/atoms/external-link/index.ts"],"sourcesContent":["export * from './external-link.js';\n"],"names":[],"mappings":"AAAA,cAAc,qBAAqB"}
@@ -0,0 +1,2 @@
1
+ export * from './switch.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/switch/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './switch.js';
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/atoms/switch/index.ts"],"sourcesContent":["export * from './switch.js';\n"],"names":[],"mappings":"AAAA,cAAc,cAAc"}
@@ -0,0 +1,10 @@
1
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ /**
3
+ * An on/off choice: a native checkbox announced as a switch, drawn as a track
4
+ * and a thumb. The checkbox keeps the keyboard, the form and `onChange`; the
5
+ * track only shows its state.
6
+ */
7
+ export declare function Switch({ children, className, ...input }: Omit<ComponentPropsWithoutRef<'input'>, 'type' | 'role' | 'children'> & {
8
+ children: ReactNode;
9
+ }): import("react").JSX.Element;
10
+ //# sourceMappingURL=switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../../src/ui/atoms/switch/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAejE;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC,GAAG;IACzE,QAAQ,EAAE,SAAS,CAAC;CACrB,+BAgBA"}
@@ -0,0 +1,43 @@
1
+ import { _ as _extends } from "@swc/helpers/_/_extends";
2
+ import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
3
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
+ /** The label: the switch, then its text, on one line. */ const LABEL = 'inline-flex cursor-pointer items-center gap-3xs';
5
+ /**
6
+ * Off: an outlined track, its thumb muted at the start. On: filled with the
7
+ * primary colour, its thumb the surface's, at the end.
8
+ */ const TRACK = 'relative inline-flex h-[1.125rem] w-8 shrink-0 items-center rounded-full border border-content-muted bg-transparent transition-colors motion-reduce:transition-none peer-checked:border-primary peer-checked:bg-primary peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-focus-ring peer-disabled:cursor-not-allowed peer-disabled:opacity-50 peer-checked:[&>span]:translate-x-[0.875rem] peer-checked:[&>span]:bg-surface';
9
+ const THUMB = 'ml-[0.125rem] size-3 rounded-full bg-content-muted transition-[translate,background-color] motion-reduce:transition-none';
10
+ /**
11
+ * An on/off choice: a native checkbox announced as a switch, drawn as a track
12
+ * and a thumb. The checkbox keeps the keyboard, the form and `onChange`; the
13
+ * track only shows its state.
14
+ */ export function Switch(_0) {
15
+ let { children, className } = _0, input = _object_without_properties_loose(_0, [
16
+ "children",
17
+ "className"
18
+ ]);
19
+ return /*#__PURE__*/ _jsxs("label", {
20
+ "data-slot": "switch",
21
+ className: className != null ? className : LABEL,
22
+ children: [
23
+ /*#__PURE__*/ _jsx("input", _extends({}, input, {
24
+ type: "checkbox",
25
+ role: "switch",
26
+ "data-slot": "switch-input",
27
+ className: "peer sr-only"
28
+ })),
29
+ /*#__PURE__*/ _jsx("span", {
30
+ "data-slot": "switch-track",
31
+ "aria-hidden": "true",
32
+ className: TRACK,
33
+ children: /*#__PURE__*/ _jsx("span", {
34
+ "data-slot": "switch-thumb",
35
+ className: THUMB
36
+ })
37
+ }),
38
+ children
39
+ ]
40
+ });
41
+ }
42
+
43
+ //# sourceMappingURL=switch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/atoms/switch/switch.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef, ReactNode } from 'react';\n\n/** The label: the switch, then its text, on one line. */\nconst LABEL = 'inline-flex cursor-pointer items-center gap-3xs';\n\n/**\n * Off: an outlined track, its thumb muted at the start. On: filled with the\n * primary colour, its thumb the surface's, at the end.\n */\nconst TRACK =\n 'relative inline-flex h-[1.125rem] w-8 shrink-0 items-center rounded-full border border-content-muted bg-transparent transition-colors motion-reduce:transition-none peer-checked:border-primary peer-checked:bg-primary peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-focus-ring peer-disabled:cursor-not-allowed peer-disabled:opacity-50 peer-checked:[&>span]:translate-x-[0.875rem] peer-checked:[&>span]:bg-surface';\n\nconst THUMB =\n 'ml-[0.125rem] size-3 rounded-full bg-content-muted transition-[translate,background-color] motion-reduce:transition-none';\n\n/**\n * An on/off choice: a native checkbox announced as a switch, drawn as a track\n * and a thumb. The checkbox keeps the keyboard, the form and `onChange`; the\n * track only shows its state.\n */\nexport function Switch({\n children,\n className,\n ...input\n}: Omit<ComponentPropsWithoutRef<'input'>, 'type' | 'role' | 'children'> & {\n children: ReactNode;\n}) {\n return (\n <label data-slot=\"switch\" className={className ?? LABEL}>\n <input\n {...input}\n type=\"checkbox\"\n role=\"switch\"\n data-slot=\"switch-input\"\n className=\"peer sr-only\"\n />\n <span data-slot=\"switch-track\" aria-hidden=\"true\" className={TRACK}>\n <span data-slot=\"switch-thumb\" className={THUMB} />\n </span>\n {children}\n </label>\n );\n}\n"],"names":["LABEL","TRACK","THUMB","Switch","children","className","input","label","data-slot","type","role","span","aria-hidden"],"mappings":";;;AAEA,uDAAuD,GACvD,MAAMA,QAAQ;AAEd;;;CAGC,GACD,MAAMC,QACJ;AAEF,MAAMC,QACJ;AAEF;;;;CAIC,GACD,OAAO,SAASC,OAAO,EAMtB;QANsB,EACrBC,QAAQ,EACRC,SAAS,EAIV,OAHIC;;;;IAIH,qBACE,MAACC;QAAMC,aAAU;QAASH,SAAS,EAAEA,oBAAAA,YAAaL;;0BAChD,KAACM,sBACKA;gBACJG,MAAK;gBACLC,MAAK;gBACLF,aAAU;gBACVH,WAAU;;0BAEZ,KAACM;gBAAKH,aAAU;gBAAeI,eAAY;gBAAOP,WAAWJ;0BAC3D,cAAA,KAACU;oBAAKH,aAAU;oBAAeH,WAAWH;;;YAE3CE;;;AAGP"}
@@ -0,0 +1,2 @@
1
+ export * from './nav-menu.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/molecules/nav-menu/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './nav-menu.js';
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/molecules/nav-menu/index.ts"],"sourcesContent":["export * from './nav-menu.js';\n"],"names":[],"mappings":"AAAA,cAAc,gBAAgB"}
@@ -0,0 +1,30 @@
1
+ import type { ReactNode } from 'react';
2
+ /**
3
+ * A dropdown in a navigation bar: a native `<details>` disclosure, so it opens
4
+ * and its links work with scripting off. What a dropdown is expected to do on
5
+ * top — one open at a time, closed by a click elsewhere or Escape — is the
6
+ * page's to add.
7
+ *
8
+ * No hooks, so a client component can render it too. Its parts carry
9
+ * `data-slot` (`nav-menu`, `nav-menu-trigger`, `nav-menu-chevron`,
10
+ * `nav-menu-panel`), so a page can restyle them — a panel as wide as the bar
11
+ * on a phone, say — without knowing the classes underneath.
12
+ */
13
+ export declare function NavMenu({ label, icon, summary, chevron, className, triggerClassName, children, }: {
14
+ /** The accessible name of the trigger. */
15
+ label: string;
16
+ icon: ReactNode;
17
+ /** What the trigger shows beside the icon, if anything. */
18
+ summary?: ReactNode;
19
+ /** A chevron after the trigger's content: a menu of choices has one. */
20
+ chevron?: boolean;
21
+ className?: string;
22
+ /** Replaces the trigger's look: a split button draws it as its own segment. */
23
+ triggerClassName?: string;
24
+ children: ReactNode;
25
+ }): import("react").JSX.Element;
26
+ /** A check beside the chosen entry; an equal space beside the others. */
27
+ export declare function NavMenuCheck({ checked }: {
28
+ checked: boolean;
29
+ }): import("react").JSX.Element;
30
+ //# sourceMappingURL=nav-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nav-menu.d.ts","sourceRoot":"","sources":["../../../../src/ui/molecules/nav-menu/nav-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQvC;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,IAAI,EACJ,OAAO,EACP,OAAc,EACd,SAAS,EACT,gBAA0B,EAC1B,QAAQ,GACT,EAAE;IACD,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;IAChB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,wEAAwE;IACxE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,SAAS,CAAC;CACrB,+BA8BA;AAED,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,+BAW7D"}
@@ -0,0 +1,58 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from '../../utils/cn.js';
3
+ /** A bar's trigger: quiet until hovered or open. */ const TRIGGER = 'focus-ring flex h-[2rem] cursor-pointer list-none items-center gap-3xs rounded-md border border-transparent px-2xs text-step-sm font-medium text-content select-none transition-[background-color,border-color] duration-(--duration-fast,150ms) hover:border-border hover:bg-[color-mix(in_srgb,var(--color-content)_6%,transparent)] [&::-webkit-details-marker]:hidden [[open]>&]:border-border [[open]>&]:bg-[color-mix(in_srgb,var(--color-content)_6%,transparent)]';
4
+ /**
5
+ * A dropdown in a navigation bar: a native `<details>` disclosure, so it opens
6
+ * and its links work with scripting off. What a dropdown is expected to do on
7
+ * top — one open at a time, closed by a click elsewhere or Escape — is the
8
+ * page's to add.
9
+ *
10
+ * No hooks, so a client component can render it too. Its parts carry
11
+ * `data-slot` (`nav-menu`, `nav-menu-trigger`, `nav-menu-chevron`,
12
+ * `nav-menu-panel`), so a page can restyle them — a panel as wide as the bar
13
+ * on a phone, say — without knowing the classes underneath.
14
+ */ export function NavMenu({ label, icon, summary, chevron = true, className, triggerClassName = TRIGGER, children }) {
15
+ return /*#__PURE__*/ _jsxs("details", {
16
+ "data-slot": "nav-menu",
17
+ className: cn('relative', className),
18
+ children: [
19
+ /*#__PURE__*/ _jsxs("summary", {
20
+ "aria-label": label,
21
+ title: label,
22
+ "data-slot": "nav-menu-trigger",
23
+ className: triggerClassName,
24
+ children: [
25
+ icon,
26
+ summary,
27
+ chevron && /*#__PURE__*/ _jsx("svg", {
28
+ "aria-hidden": "true",
29
+ viewBox: "0 0 24 24",
30
+ "data-slot": "nav-menu-chevron",
31
+ className: "size-[0.875rem] flex-none fill-none stroke-current stroke-2 text-content-muted transition-[rotate] duration-(--duration-fast,150ms) [stroke-linecap:round] [stroke-linejoin:round] [[open]>summary>&]:rotate-180",
32
+ children: /*#__PURE__*/ _jsx("path", {
33
+ d: "m7 10 5 5 5-5"
34
+ })
35
+ })
36
+ ]
37
+ }),
38
+ /*#__PURE__*/ _jsx("div", {
39
+ "data-slot": "nav-menu-panel",
40
+ className: "right-0 ease-out starting:-translate-y-1 [&_ul]:m-0 [&_ul]:p-0 absolute top-[calc(100%+var(--spacing-3xs))] z-60 min-w-[10rem] rounded-lg border border-border bg-surface-elevated p-3xs shadow-[var(--shadow-overlay)] transition-[opacity,translate] duration-[120ms] motion-reduce:transition-none starting:opacity-0 [&_ul]:list-none",
41
+ children: children
42
+ })
43
+ ]
44
+ });
45
+ }
46
+ /** A check beside the chosen entry; an equal space beside the others. */ export function NavMenuCheck({ checked }) {
47
+ return /*#__PURE__*/ _jsx("svg", {
48
+ "aria-hidden": "true",
49
+ viewBox: "0 0 24 24",
50
+ "data-slot": "nav-menu-check",
51
+ className: "size-[1rem] flex-none fill-none stroke-current stroke-2 [stroke-linecap:round] [stroke-linejoin:round]",
52
+ children: checked && /*#__PURE__*/ _jsx("path", {
53
+ d: "m5 12.5 4.5 4.5L19 7.5"
54
+ })
55
+ });
56
+ }
57
+
58
+ //# sourceMappingURL=nav-menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/ui/molecules/nav-menu/nav-menu.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { cn } from '../../utils/cn.js';\n\n/** A bar's trigger: quiet until hovered or open. */\nconst TRIGGER =\n 'focus-ring flex h-[2rem] cursor-pointer list-none items-center gap-3xs rounded-md border border-transparent px-2xs text-step-sm font-medium text-content select-none transition-[background-color,border-color] duration-(--duration-fast,150ms) hover:border-border hover:bg-[color-mix(in_srgb,var(--color-content)_6%,transparent)] [&::-webkit-details-marker]:hidden [[open]>&]:border-border [[open]>&]:bg-[color-mix(in_srgb,var(--color-content)_6%,transparent)]';\n\n/**\n * A dropdown in a navigation bar: a native `<details>` disclosure, so it opens\n * and its links work with scripting off. What a dropdown is expected to do on\n * top — one open at a time, closed by a click elsewhere or Escape — is the\n * page's to add.\n *\n * No hooks, so a client component can render it too. Its parts carry\n * `data-slot` (`nav-menu`, `nav-menu-trigger`, `nav-menu-chevron`,\n * `nav-menu-panel`), so a page can restyle them — a panel as wide as the bar\n * on a phone, say — without knowing the classes underneath.\n */\nexport function NavMenu({\n label,\n icon,\n summary,\n chevron = true,\n className,\n triggerClassName = TRIGGER,\n children,\n}: {\n /** The accessible name of the trigger. */\n label: string;\n icon: ReactNode;\n /** What the trigger shows beside the icon, if anything. */\n summary?: ReactNode;\n /** A chevron after the trigger's content: a menu of choices has one. */\n chevron?: boolean;\n className?: string;\n /** Replaces the trigger's look: a split button draws it as its own segment. */\n triggerClassName?: string;\n children: ReactNode;\n}) {\n return (\n <details data-slot=\"nav-menu\" className={cn('relative', className)}>\n <summary\n aria-label={label}\n title={label}\n data-slot=\"nav-menu-trigger\"\n className={triggerClassName}\n >\n {icon}\n {summary}\n {chevron && (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n data-slot=\"nav-menu-chevron\"\n className=\"size-[0.875rem] flex-none fill-none stroke-current stroke-2 text-content-muted transition-[rotate] duration-(--duration-fast,150ms) [stroke-linecap:round] [stroke-linejoin:round] [[open]>summary>&]:rotate-180\"\n >\n <path d=\"m7 10 5 5 5-5\" />\n </svg>\n )}\n </summary>\n <div\n data-slot=\"nav-menu-panel\"\n className=\"right-0 ease-out starting:-translate-y-1 [&_ul]:m-0 [&_ul]:p-0 absolute top-[calc(100%+var(--spacing-3xs))] z-60 min-w-[10rem] rounded-lg border border-border bg-surface-elevated p-3xs shadow-[var(--shadow-overlay)] transition-[opacity,translate] duration-[120ms] motion-reduce:transition-none starting:opacity-0 [&_ul]:list-none\"\n >\n {children}\n </div>\n </details>\n );\n}\n\n/** A check beside the chosen entry; an equal space beside the others. */\nexport function NavMenuCheck({ checked }: { checked: boolean }) {\n return (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n data-slot=\"nav-menu-check\"\n className=\"size-[1rem] flex-none fill-none stroke-current stroke-2 [stroke-linecap:round] [stroke-linejoin:round]\"\n >\n {checked && <path d=\"m5 12.5 4.5 4.5L19 7.5\" />}\n </svg>\n );\n}\n"],"names":["cn","TRIGGER","NavMenu","label","icon","summary","chevron","className","triggerClassName","children","details","data-slot","aria-label","title","svg","aria-hidden","viewBox","path","d","div","NavMenuCheck","checked"],"mappings":";AAEA,SAASA,EAAE,QAAQ,oBAAoB;AAEvC,kDAAkD,GAClD,MAAMC,UACJ;AAEF;;;;;;;;;;CAUC,GACD,OAAO,SAASC,QAAQ,EACtBC,KAAK,EACLC,IAAI,EACJC,OAAO,EACPC,UAAU,IAAI,EACdC,SAAS,EACTC,mBAAmBP,OAAO,EAC1BQ,QAAQ,EAaT;IACC,qBACE,MAACC;QAAQC,aAAU;QAAWJ,WAAWP,GAAG,YAAYO;;0BACtD,MAACF;gBACCO,cAAYT;gBACZU,OAAOV;gBACPQ,aAAU;gBACVJ,WAAWC;;oBAEVJ;oBACAC;oBACAC,yBACC,KAACQ;wBACCC,eAAY;wBACZC,SAAQ;wBACRL,aAAU;wBACVJ,WAAU;kCAEV,cAAA,KAACU;4BAAKC,GAAE;;;;;0BAId,KAACC;gBACCR,aAAU;gBACVJ,WAAU;0BAETE;;;;AAIT;AAEA,uEAAuE,GACvE,OAAO,SAASW,aAAa,EAAEC,OAAO,EAAwB;IAC5D,qBACE,KAACP;QACCC,eAAY;QACZC,SAAQ;QACRL,aAAU;QACVJ,WAAU;kBAETc,yBAAW,KAACJ;YAAKC,GAAE;;;AAG1B"}
@@ -0,0 +1,2 @@
1
+ export * from './segmented-control.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/molecules/segmented-control/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}