@smudi/designsystem 2.1.0 → 2.2.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 (236) hide show
  1. package/@smudi/assets/JetBrainsMono-Medium.woff2 +0 -0
  2. package/@smudi/assets/JetBrainsMono-OFL.txt +93 -0
  3. package/@smudi/assets/JetBrainsMono-Regular.woff2 +0 -0
  4. package/@smudi/assets/JetBrainsMono-SemiBold.woff2 +0 -0
  5. package/@smudi/components/actionbar/actionbar-button.js +52 -0
  6. package/@smudi/components/actionbar/actionbar-context.js +23 -0
  7. package/@smudi/components/actionbar/actionbar-divider.js +24 -0
  8. package/@smudi/components/actionbar/actionbar-host.js +102 -0
  9. package/@smudi/components/actionbar/actionbar.js +134 -0
  10. package/@smudi/components/actionbar/use-actionbar-button-count-warning.js +21 -0
  11. package/@smudi/components/actionbar/use-actionbar-missing-focusable-content-warning.js +38 -0
  12. package/@smudi/components/divider/divider.js +18 -4
  13. package/@smudi/components/header/header-divider.js +13 -11
  14. package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion.js +9 -9
  15. package/@smudi/components/utils/is-dev-environment.js +8 -0
  16. package/@smudi/icons/generated/index.d.ts +64 -0
  17. package/@smudi/react.d.ts +1671 -0
  18. package/@smudi/react.js +133 -131
  19. package/@smudi/styles.css +1 -1
  20. package/package.json +24 -21
  21. package/@smudi/components/actionbar/actionbar.d.ts +0 -71
  22. package/@smudi/components/actionbar/actionbar.d.ts.map +0 -1
  23. package/@smudi/components/actionbar/actionbar.types.d.ts +0 -11
  24. package/@smudi/components/actionbar/actionbar.types.d.ts.map +0 -1
  25. package/@smudi/components/actionbar/use-actionbar-button-count-warning.d.ts +0 -9
  26. package/@smudi/components/actionbar/use-actionbar-button-count-warning.d.ts.map +0 -1
  27. package/@smudi/components/actionbar/use-actionbar-missing-focusable-content-warning.d.ts +0 -12
  28. package/@smudi/components/actionbar/use-actionbar-missing-focusable-content-warning.d.ts.map +0 -1
  29. package/@smudi/components/alert/alert.d.ts +0 -6
  30. package/@smudi/components/alert/alert.d.ts.map +0 -1
  31. package/@smudi/components/avatar/avatar.d.ts +0 -6
  32. package/@smudi/components/avatar/avatar.d.ts.map +0 -1
  33. package/@smudi/components/avatar-stack/avatar-stack.d.ts +0 -6
  34. package/@smudi/components/avatar-stack/avatar-stack.d.ts.map +0 -1
  35. package/@smudi/components/badge/badge.d.ts +0 -6
  36. package/@smudi/components/badge/badge.d.ts.map +0 -1
  37. package/@smudi/components/breadcrumbs/breadcrumbs.d.ts +0 -6
  38. package/@smudi/components/breadcrumbs/breadcrumbs.d.ts.map +0 -1
  39. package/@smudi/components/button/button.d.ts +0 -26
  40. package/@smudi/components/button/button.d.ts.map +0 -1
  41. package/@smudi/components/card/card-icon-block.d.ts +0 -24
  42. package/@smudi/components/card/card-icon-block.d.ts.map +0 -1
  43. package/@smudi/components/card/card.d.ts +0 -22
  44. package/@smudi/components/card/card.d.ts.map +0 -1
  45. package/@smudi/components/checkbox/checkbox.d.ts +0 -6
  46. package/@smudi/components/checkbox/checkbox.d.ts.map +0 -1
  47. package/@smudi/components/chip/chip.d.ts +0 -5
  48. package/@smudi/components/chip/chip.d.ts.map +0 -1
  49. package/@smudi/components/details/details.d.ts +0 -6
  50. package/@smudi/components/details/details.d.ts.map +0 -1
  51. package/@smudi/components/dialog/dialog-section.d.ts +0 -22
  52. package/@smudi/components/dialog/dialog-section.d.ts.map +0 -1
  53. package/@smudi/components/dialog/dialog.d.ts +0 -21
  54. package/@smudi/components/dialog/dialog.d.ts.map +0 -1
  55. package/@smudi/components/divider/divider.d.ts +0 -6
  56. package/@smudi/components/divider/divider.d.ts.map +0 -1
  57. package/@smudi/components/dropdown/dropdown-button.d.ts +0 -39
  58. package/@smudi/components/dropdown/dropdown-button.d.ts.map +0 -1
  59. package/@smudi/components/dropdown/dropdown-context.d.ts +0 -7
  60. package/@smudi/components/dropdown/dropdown-context.d.ts.map +0 -1
  61. package/@smudi/components/dropdown/dropdown-item.d.ts +0 -20
  62. package/@smudi/components/dropdown/dropdown-item.d.ts.map +0 -1
  63. package/@smudi/components/dropdown/dropdown-list.d.ts +0 -20
  64. package/@smudi/components/dropdown/dropdown-list.d.ts.map +0 -1
  65. package/@smudi/components/dropdown/dropdown.d.ts +0 -35
  66. package/@smudi/components/dropdown/dropdown.d.ts.map +0 -1
  67. package/@smudi/components/error-summary/error-summary.d.ts +0 -6
  68. package/@smudi/components/error-summary/error-summary.d.ts.map +0 -1
  69. package/@smudi/components/field/field.d.ts +0 -6
  70. package/@smudi/components/field/field.d.ts.map +0 -1
  71. package/@smudi/components/fieldset/fieldset.d.ts +0 -6
  72. package/@smudi/components/fieldset/fieldset.d.ts.map +0 -1
  73. package/@smudi/components/file-upload/file-upload.d.ts +0 -8
  74. package/@smudi/components/file-upload/file-upload.d.ts.map +0 -1
  75. package/@smudi/components/header/header-content.d.ts +0 -15
  76. package/@smudi/components/header/header-content.d.ts.map +0 -1
  77. package/@smudi/components/header/header-divider.d.ts +0 -18
  78. package/@smudi/components/header/header-divider.d.ts.map +0 -1
  79. package/@smudi/components/header/header-menu/header-menu-button.d.ts +0 -13
  80. package/@smudi/components/header/header-menu/header-menu-button.d.ts.map +0 -1
  81. package/@smudi/components/header/header-menu/header-menu-content.d.ts +0 -17
  82. package/@smudi/components/header/header-menu/header-menu-content.d.ts.map +0 -1
  83. package/@smudi/components/header/header-menu/header-menu-group.d.ts +0 -14
  84. package/@smudi/components/header/header-menu/header-menu-group.d.ts.map +0 -1
  85. package/@smudi/components/header/header-menu/header-menu-item.d.ts +0 -28
  86. package/@smudi/components/header/header-menu/header-menu-item.d.ts.map +0 -1
  87. package/@smudi/components/header/header-menu/header-menu.d.ts +0 -20
  88. package/@smudi/components/header/header-menu/header-menu.d.ts.map +0 -1
  89. package/@smudi/components/header/header-menu/index.d.ts +0 -11
  90. package/@smudi/components/header/header-menu/index.d.ts.map +0 -1
  91. package/@smudi/components/header/header-search/header-search-button.d.ts +0 -26
  92. package/@smudi/components/header/header-search/header-search-button.d.ts.map +0 -1
  93. package/@smudi/components/header/header-search/header-search.d.ts +0 -35
  94. package/@smudi/components/header/header-search/header-search.d.ts.map +0 -1
  95. package/@smudi/components/header/header-search/index.d.ts +0 -5
  96. package/@smudi/components/header/header-search/index.d.ts.map +0 -1
  97. package/@smudi/components/header/header.d.ts +0 -97
  98. package/@smudi/components/header/header.d.ts.map +0 -1
  99. package/@smudi/components/header/index.d.ts +0 -36
  100. package/@smudi/components/header/index.d.ts.map +0 -1
  101. package/@smudi/components/input/input.d.ts +0 -6
  102. package/@smudi/components/input/input.d.ts.map +0 -1
  103. package/@smudi/components/layout-components/box-layouts/box-layout.d.ts +0 -37
  104. package/@smudi/components/layout-components/box-layouts/box-layout.d.ts.map +0 -1
  105. package/@smudi/components/layout-components/center-layouts/center-layout.d.ts +0 -30
  106. package/@smudi/components/layout-components/center-layouts/center-layout.d.ts.map +0 -1
  107. package/@smudi/components/layout-components/cluster-layouts/cluster-layout.d.ts +0 -33
  108. package/@smudi/components/layout-components/cluster-layouts/cluster-layout.d.ts.map +0 -1
  109. package/@smudi/components/layout-components/cluster-layouts/constants/cluster-align-css.d.ts +0 -2
  110. package/@smudi/components/layout-components/cluster-layouts/constants/cluster-align-css.d.ts.map +0 -1
  111. package/@smudi/components/layout-components/cluster-layouts/constants/cluster-justify-css.d.ts +0 -2
  112. package/@smudi/components/layout-components/cluster-layouts/constants/cluster-justify-css.d.ts.map +0 -1
  113. package/@smudi/components/layout-components/cluster-layouts/types/cluster-align.type.d.ts +0 -2
  114. package/@smudi/components/layout-components/cluster-layouts/types/cluster-align.type.d.ts.map +0 -1
  115. package/@smudi/components/layout-components/cluster-layouts/types/cluster-justify.type.d.ts +0 -2
  116. package/@smudi/components/layout-components/cluster-layouts/types/cluster-justify.type.d.ts.map +0 -1
  117. package/@smudi/components/layout-components/grid-layouts/grid-layout.d.ts +0 -39
  118. package/@smudi/components/layout-components/grid-layouts/grid-layout.d.ts.map +0 -1
  119. package/@smudi/components/layout-components/split-view/index.d.ts +0 -8
  120. package/@smudi/components/layout-components/split-view/index.d.ts.map +0 -1
  121. package/@smudi/components/layout-components/split-view/split-view-divider.d.ts +0 -8
  122. package/@smudi/components/layout-components/split-view/split-view-divider.d.ts.map +0 -1
  123. package/@smudi/components/layout-components/split-view/split-view-panel.d.ts +0 -23
  124. package/@smudi/components/layout-components/split-view/split-view-panel.d.ts.map +0 -1
  125. package/@smudi/components/layout-components/split-view/split-view.d.ts +0 -14
  126. package/@smudi/components/layout-components/split-view/split-view.d.ts.map +0 -1
  127. package/@smudi/components/layout-components/split-view/use-resize.d.ts +0 -34
  128. package/@smudi/components/layout-components/split-view/use-resize.d.ts.map +0 -1
  129. package/@smudi/components/layout-components/stack-layouts/stack-layout.d.ts +0 -31
  130. package/@smudi/components/layout-components/stack-layouts/stack-layout.d.ts.map +0 -1
  131. package/@smudi/components/layout-components/wrapper-layouts/wrapper-layout.d.ts +0 -34
  132. package/@smudi/components/layout-components/wrapper-layouts/wrapper-layout.d.ts.map +0 -1
  133. package/@smudi/components/link/link.d.ts +0 -6
  134. package/@smudi/components/link/link.d.ts.map +0 -1
  135. package/@smudi/components/list/list.d.ts +0 -5
  136. package/@smudi/components/list/list.d.ts.map +0 -1
  137. package/@smudi/components/pagination/pagination.d.ts +0 -6
  138. package/@smudi/components/pagination/pagination.d.ts.map +0 -1
  139. package/@smudi/components/popover/popover.d.ts +0 -6
  140. package/@smudi/components/popover/popover.d.ts.map +0 -1
  141. package/@smudi/components/radio/radio.d.ts +0 -6
  142. package/@smudi/components/radio/radio.d.ts.map +0 -1
  143. package/@smudi/components/search/search.d.ts +0 -6
  144. package/@smudi/components/search/search.d.ts.map +0 -1
  145. package/@smudi/components/select/select.d.ts +0 -6
  146. package/@smudi/components/select/select.d.ts.map +0 -1
  147. package/@smudi/components/skeleton/skeleton.d.ts +0 -6
  148. package/@smudi/components/skeleton/skeleton.d.ts.map +0 -1
  149. package/@smudi/components/skip-link/skip-link.d.ts +0 -6
  150. package/@smudi/components/skip-link/skip-link.d.ts.map +0 -1
  151. package/@smudi/components/spinner/spinner.d.ts +0 -6
  152. package/@smudi/components/spinner/spinner.d.ts.map +0 -1
  153. package/@smudi/components/stepper/index.d.ts +0 -15
  154. package/@smudi/components/stepper/index.d.ts.map +0 -1
  155. package/@smudi/components/stepper/step/step-list.d.ts +0 -7
  156. package/@smudi/components/stepper/step/step-list.d.ts.map +0 -1
  157. package/@smudi/components/stepper/step/step.d.ts +0 -22
  158. package/@smudi/components/stepper/step/step.d.ts.map +0 -1
  159. package/@smudi/components/stepper/step-content/step-content-list.d.ts +0 -2
  160. package/@smudi/components/stepper/step-content/step-content-list.d.ts.map +0 -1
  161. package/@smudi/components/stepper/step-content/step-content.d.ts +0 -13
  162. package/@smudi/components/stepper/step-content/step-content.d.ts.map +0 -1
  163. package/@smudi/components/stepper/stepper-context.d.ts +0 -49
  164. package/@smudi/components/stepper/stepper-context.d.ts.map +0 -1
  165. package/@smudi/components/stepper/stepper.d.ts +0 -42
  166. package/@smudi/components/stepper/stepper.d.ts.map +0 -1
  167. package/@smudi/components/stepper/use-stepper-state.d.ts +0 -43
  168. package/@smudi/components/stepper/use-stepper-state.d.ts.map +0 -1
  169. package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion-context.d.ts +0 -9
  170. package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion-context.d.ts.map +0 -1
  171. package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion-list.d.ts +0 -8
  172. package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion-list.d.ts.map +0 -1
  173. package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion.d.ts +0 -54
  174. package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion.d.ts.map +0 -1
  175. package/@smudi/components/suggestion/suggestion-no-chips/suggestion-no-chips.d.ts +0 -31
  176. package/@smudi/components/suggestion/suggestion-no-chips/suggestion-no-chips.d.ts.map +0 -1
  177. package/@smudi/components/suggestion/suggestion.d.ts +0 -17
  178. package/@smudi/components/suggestion/suggestion.d.ts.map +0 -1
  179. package/@smudi/components/switch/switch.d.ts +0 -6
  180. package/@smudi/components/switch/switch.d.ts.map +0 -1
  181. package/@smudi/components/table/table.d.ts +0 -28
  182. package/@smudi/components/table/table.d.ts.map +0 -1
  183. package/@smudi/components/tabs/tabs-content.d.ts +0 -6
  184. package/@smudi/components/tabs/tabs-content.d.ts.map +0 -1
  185. package/@smudi/components/tabs/tabs-list.d.ts +0 -6
  186. package/@smudi/components/tabs/tabs-list.d.ts.map +0 -1
  187. package/@smudi/components/tabs/tabs-trigger.d.ts +0 -6
  188. package/@smudi/components/tabs/tabs-trigger.d.ts.map +0 -1
  189. package/@smudi/components/tabs/tabs.d.ts +0 -6
  190. package/@smudi/components/tabs/tabs.d.ts.map +0 -1
  191. package/@smudi/components/tag/tag.d.ts +0 -6
  192. package/@smudi/components/tag/tag.d.ts.map +0 -1
  193. package/@smudi/components/textarea/text-area.d.ts +0 -6
  194. package/@smudi/components/textarea/text-area.d.ts.map +0 -1
  195. package/@smudi/components/textfield/textfield.d.ts +0 -6
  196. package/@smudi/components/textfield/textfield.d.ts.map +0 -1
  197. package/@smudi/components/toast/toast.d.ts +0 -84
  198. package/@smudi/components/toast/toast.d.ts.map +0 -1
  199. package/@smudi/components/toggle-group/toggle-group.d.ts +0 -6
  200. package/@smudi/components/toggle-group/toggle-group.d.ts.map +0 -1
  201. package/@smudi/components/tooltip/tooltip.d.ts +0 -6
  202. package/@smudi/components/tooltip/tooltip.d.ts.map +0 -1
  203. package/@smudi/components/typography/heading/heading.d.ts +0 -9
  204. package/@smudi/components/typography/heading/heading.d.ts.map +0 -1
  205. package/@smudi/components/typography/paragraph/paragraph.d.ts +0 -6
  206. package/@smudi/components/typography/paragraph/paragraph.d.ts.map +0 -1
  207. package/@smudi/components/utils/apply-inert-outside.d.ts +0 -17
  208. package/@smudi/components/utils/apply-inert-outside.d.ts.map +0 -1
  209. package/@smudi/components/utils/class-names.d.ts +0 -2
  210. package/@smudi/components/utils/class-names.d.ts.map +0 -1
  211. package/@smudi/components/utils/is-dev-environment.d.ts +0 -2
  212. package/@smudi/components/utils/is-dev-environment.d.ts.map +0 -1
  213. package/@smudi/smudi/icons/generated/SmudiBiometryIcon.d.ts +0 -8
  214. package/@smudi/smudi/icons/generated/SmudiBiometryIcon.d.ts.map +0 -1
  215. package/@smudi/smudi/icons/generated/SmudiFingerprintIcon.d.ts +0 -8
  216. package/@smudi/smudi/icons/generated/SmudiFingerprintIcon.d.ts.map +0 -1
  217. package/@smudi/smudi/icons/generated/SmudiFlagIcon.d.ts +0 -8
  218. package/@smudi/smudi/icons/generated/SmudiFlagIcon.d.ts.map +0 -1
  219. package/@smudi/smudi/icons/generated/SmudiScanIcon.d.ts +0 -8
  220. package/@smudi/smudi/icons/generated/SmudiScanIcon.d.ts.map +0 -1
  221. package/@smudi/smudi/icons/generated/index.d.ts +0 -5
  222. package/@smudi/smudi/icons/generated/index.d.ts.map +0 -1
  223. package/@smudi/smudi/icons/metadata.d.ts +0 -32
  224. package/@smudi/smudi/icons/metadata.d.ts.map +0 -1
  225. package/@smudi/smudi/react.d.ts +0 -59
  226. package/@smudi/smudi/react.d.ts.map +0 -1
  227. package/@smudi/types/modular-scale.type.d.ts +0 -18
  228. package/@smudi/types/modular-scale.type.d.ts.map +0 -1
  229. package/@smudi/types/polymorphic-component.type.d.ts +0 -35
  230. package/@smudi/types/polymorphic-component.type.d.ts.map +0 -1
  231. package/@smudi/types/utils/coerce-string-to-number.d.ts +0 -4
  232. package/@smudi/types/utils/coerce-string-to-number.d.ts.map +0 -1
  233. package/@smudi/types/utils/exclude-strict.d.ts +0 -2
  234. package/@smudi/types/utils/exclude-strict.d.ts.map +0 -1
  235. package/@smudi/types/utils/omit-strict.d.ts +0 -2
  236. package/@smudi/types/utils/omit-strict.d.ts.map +0 -1
@@ -0,0 +1,93 @@
1
+ Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ https://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,52 @@
1
+ "use client";
2
+ import { jsx as c } from "react/jsx-runtime";
3
+ import { forwardRef as I, useId as x } from "react";
4
+ import { Button as h } from "../button/button.js";
5
+ import { Tooltip as z } from "../tooltip/tooltip.js";
6
+ import { classNames as v } from "../utils/class-names.js";
7
+ import { useActionbarHostContext as y, useActionbarContext as N } from "./actionbar-context.js";
8
+ const k = I(function({
9
+ children: u,
10
+ onClick: d,
11
+ onFocus: e,
12
+ tooltip: r,
13
+ className: m,
14
+ "data-size": b,
15
+ variant: l = "secondary-tinted",
16
+ ...o
17
+ }, f) {
18
+ const p = y(), t = N(), n = x(), A = b ?? t.size, a = o["aria-disabled"] === !0 || o["aria-disabled"] === "true";
19
+ function B(i) {
20
+ if (a) {
21
+ e?.(i);
22
+ return;
23
+ }
24
+ t.setActiveButtonId(n), e?.(i);
25
+ }
26
+ function C(i) {
27
+ a || (t.setActiveButtonId(n), d?.({ itemId: p.itemId, event: i }));
28
+ }
29
+ const s = /* @__PURE__ */ c(
30
+ h,
31
+ {
32
+ ...o,
33
+ ref: f,
34
+ icon: !0,
35
+ type: "button",
36
+ variant: l,
37
+ className: v("smudi-actionbar-button", m),
38
+ "data-size": A,
39
+ "data-smudi-actionbar-button": "true",
40
+ "data-smudi-actionbar-button-id": n,
41
+ tabIndex: t.isVisible && t.activeButtonId === n && !o.disabled && !a ? 0 : -1,
42
+ onClick: C,
43
+ onFocus: B,
44
+ children: u
45
+ }
46
+ );
47
+ return r ? /* @__PURE__ */ c(z, { content: r, children: s }) : s;
48
+ });
49
+ k.displayName = "Actionbar.Button";
50
+ export {
51
+ k as ActionbarButton
52
+ };
@@ -0,0 +1,23 @@
1
+ "use client";
2
+ import { createContext as n, useContext as o } from "react";
3
+ const e = n(null), r = n(
4
+ null
5
+ );
6
+ function i() {
7
+ const t = o(e);
8
+ if (!t)
9
+ throw new Error("Actionbar must be used inside Actionbar.Host.");
10
+ return t;
11
+ }
12
+ function s() {
13
+ const t = o(r);
14
+ if (!t)
15
+ throw new Error("Actionbar.Button must be used inside Actionbar.");
16
+ return t;
17
+ }
18
+ export {
19
+ r as ActionbarContext,
20
+ e as ActionbarHostContext,
21
+ s as useActionbarContext,
22
+ i as useActionbarHostContext
23
+ };
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ import { jsx as e } from "react/jsx-runtime";
3
+ import { forwardRef as n } from "react";
4
+ import { Divider as d } from "../divider/divider.js";
5
+ import { classNames as m } from "../utils/class-names.js";
6
+ const c = n(function({ className: a, role: i, "aria-hidden": t, ...r }, o) {
7
+ return /* @__PURE__ */ e(
8
+ d,
9
+ {
10
+ ...r,
11
+ ref: o,
12
+ orientation: "vertical",
13
+ role: i,
14
+ "aria-hidden": i ? !1 : t ?? "true",
15
+ "aria-orientation": i ? r["aria-orientation"] ?? "vertical" : void 0,
16
+ tabIndex: -1,
17
+ className: m("smudi-actionbar-divider", a)
18
+ }
19
+ );
20
+ });
21
+ c.displayName = "Actionbar.Divider";
22
+ export {
23
+ c as ActionbarDivider
24
+ };
@@ -0,0 +1,102 @@
1
+ "use client";
2
+ import { jsx as v } from "react/jsx-runtime";
3
+ import { forwardRef as W, useRef as y, useState as E, useEffect as g, useMemo as Q } from "react";
4
+ import { classNames as S } from "../utils/class-names.js";
5
+ import { isDevEnvironment as _ } from "../utils/is-dev-environment.js";
6
+ import { combineRefs as j } from "../../utils/combine-refs.js";
7
+ import { ActionbarHostContext as D } from "./actionbar-context.js";
8
+ import { useActionbarMissingFocusableContentWarning as U } from "./use-actionbar-missing-focusable-content-warning.js";
9
+ const Y = "(hover: hover) and (pointer: fine)", k = W(
10
+ function({
11
+ itemId: l,
12
+ visibility: t = "hover-focus",
13
+ nonHoverBehavior: r = "show",
14
+ open: m,
15
+ defaultOpen: s,
16
+ onOpenChange: R,
17
+ className: C,
18
+ children: h,
19
+ onBlurCapture: L,
20
+ onFocusCapture: V,
21
+ onPointerEnter: b,
22
+ onPointerLeave: A,
23
+ ...F
24
+ }, H) {
25
+ const p = y(null), o = m !== void 0, [a, w] = E(
26
+ t !== "always"
27
+ ), [N, i] = E(() => t === "always" ? !0 : s ?? !1);
28
+ g(() => {
29
+ !_() || !o || (s !== void 0 || r === "hide") && console.warn(
30
+ "[Actionbar.Host] `open` controls visibility state. `defaultOpen` and `nonHoverBehavior` are ignored while `open` is provided."
31
+ );
32
+ }, [s, o, r]);
33
+ function u(e) {
34
+ o || i(e), R?.(e);
35
+ }
36
+ g(() => {
37
+ if (t !== "hover-focus" || typeof window > "u") {
38
+ w(!1), o || i(t === "always");
39
+ return;
40
+ }
41
+ const e = window.matchMedia(Y), n = (f) => {
42
+ if (w(f), !o) {
43
+ if (f) {
44
+ i(s ?? !1);
45
+ return;
46
+ }
47
+ i(r === "show");
48
+ }
49
+ };
50
+ n(e.matches);
51
+ const c = (f) => {
52
+ n(f.matches);
53
+ };
54
+ return typeof e.addEventListener == "function" ? (e.addEventListener("change", c), () => e.removeEventListener("change", c)) : (e.addListener(c), () => e.removeListener(c));
55
+ }, [s, o, r, t]), U({
56
+ children: h,
57
+ hostRef: p,
58
+ supportsHoverReveal: a,
59
+ visibility: t
60
+ });
61
+ const d = o ? !!m : t === "always" ? !0 : a ? N : r === "show", P = Q(
62
+ () => ({ itemId: l, isVisible: d }),
63
+ [l, d]
64
+ );
65
+ function T(e) {
66
+ t === "hover-focus" && a && u(!0), b?.(e);
67
+ }
68
+ function x(e) {
69
+ if (t === "hover-focus" && a) {
70
+ const n = typeof document > "u" ? null : document.activeElement;
71
+ n instanceof Node && e.currentTarget.contains(n) || u(!1);
72
+ }
73
+ A?.(e);
74
+ }
75
+ function M(e) {
76
+ t === "hover-focus" && u(!0), V?.(e);
77
+ }
78
+ function I(e) {
79
+ const n = e.relatedTarget;
80
+ t === "hover-focus" && a && !e.currentTarget.contains(n) && u(!1), L?.(e);
81
+ }
82
+ return /* @__PURE__ */ v(D.Provider, { value: P, children: /* @__PURE__ */ v(
83
+ "div",
84
+ {
85
+ ...F,
86
+ ref: j(H, p),
87
+ className: S("smudi-actionbar-host", C),
88
+ "data-visible": d ? "true" : "false",
89
+ "data-visibility": t,
90
+ onBlurCapture: I,
91
+ onFocusCapture: M,
92
+ onPointerEnter: T,
93
+ onPointerLeave: x,
94
+ children: h
95
+ }
96
+ ) });
97
+ }
98
+ );
99
+ k.displayName = "Actionbar.Host";
100
+ export {
101
+ k as ActionbarHost
102
+ };
@@ -0,0 +1,134 @@
1
+ "use client";
2
+ import { jsx as p } from "react/jsx-runtime";
3
+ import { forwardRef as V, useRef as y, useState as R, useEffect as k, useMemo as C } from "react";
4
+ import { classNames as E } from "../utils/class-names.js";
5
+ import { combineRefs as H } from "../../utils/combine-refs.js";
6
+ import { ActionbarHost as F } from "./actionbar-host.js";
7
+ import { ActionbarButton as N } from "./actionbar-button.js";
8
+ import { ActionbarDivider as j } from "./actionbar-divider.js";
9
+ import { useActionbarHostContext as M, ActionbarContext as q } from "./actionbar-context.js";
10
+ import { useActionbarButtonCountWarning as z } from "./use-actionbar-button-count-warning.js";
11
+ function I(a) {
12
+ return a ? Array.from(
13
+ a.querySelectorAll(
14
+ '[data-smudi-actionbar-button="true"]'
15
+ )
16
+ ).filter(
17
+ (e) => !e.disabled && e.getAttribute("aria-disabled") !== "true"
18
+ ) : [];
19
+ }
20
+ function l(a, e) {
21
+ const c = a[e];
22
+ c && c.focus();
23
+ }
24
+ const B = V(function({
25
+ children: e,
26
+ className: c,
27
+ onFocusCapture: x,
28
+ onKeyDown: f,
29
+ "data-color": b = "primary",
30
+ "data-size": m = "md",
31
+ ...g
32
+ }, h) {
33
+ const s = M(), u = y(null), [i, r] = R(null);
34
+ z({ children: e, rootRef: u }), k(() => {
35
+ if (!s.isVisible)
36
+ return;
37
+ const o = I(u.current);
38
+ if (o.length === 0) {
39
+ r(null);
40
+ return;
41
+ }
42
+ i && o.some(
43
+ (t) => t.dataset.smudiActionbarButtonId === i
44
+ ) || r(o[0].dataset.smudiActionbarButtonId ?? null);
45
+ }, [i, e, s.isVisible]);
46
+ const w = C(
47
+ () => ({
48
+ activeButtonId: i,
49
+ setActiveButtonId: r,
50
+ isVisible: s.isVisible,
51
+ size: m,
52
+ color: b,
53
+ rootRef: u
54
+ }),
55
+ [i, b, m, s.isVisible]
56
+ );
57
+ function D(o) {
58
+ const d = o.target.dataset.smudiActionbarButtonId;
59
+ d && r(d), x?.(o);
60
+ }
61
+ function v(o) {
62
+ const t = I(u.current);
63
+ if (t.length === 0) {
64
+ f?.(o);
65
+ return;
66
+ }
67
+ const d = document.activeElement?.dataset?.smudiActionbarButtonId ?? i, A = Math.max(
68
+ t.findIndex(
69
+ (n) => n.dataset.smudiActionbarButtonId === d
70
+ ),
71
+ 0
72
+ );
73
+ switch (o.key) {
74
+ case "ArrowRight":
75
+ case "ArrowDown": {
76
+ o.preventDefault();
77
+ const n = (A + 1) % t.length;
78
+ r(
79
+ t[n].dataset.smudiActionbarButtonId ?? null
80
+ ), l(t, n);
81
+ break;
82
+ }
83
+ case "ArrowLeft":
84
+ case "ArrowUp": {
85
+ o.preventDefault();
86
+ const n = (A - 1 + t.length) % t.length;
87
+ r(
88
+ t[n].dataset.smudiActionbarButtonId ?? null
89
+ ), l(t, n);
90
+ break;
91
+ }
92
+ case "Home": {
93
+ o.preventDefault(), r(t[0].dataset.smudiActionbarButtonId ?? null), l(t, 0);
94
+ break;
95
+ }
96
+ case "End": {
97
+ o.preventDefault();
98
+ const n = t.length - 1;
99
+ r(
100
+ t[n].dataset.smudiActionbarButtonId ?? null
101
+ ), l(t, n);
102
+ break;
103
+ }
104
+ }
105
+ f?.(o);
106
+ }
107
+ return /* @__PURE__ */ p(q.Provider, { value: w, children: /* @__PURE__ */ p(
108
+ "div",
109
+ {
110
+ ...g,
111
+ ref: H(u, h),
112
+ role: "toolbar",
113
+ className: E("smudi-actionbar", c),
114
+ "data-color": b,
115
+ "data-size": m,
116
+ "data-visible": s.isVisible ? "true" : "false",
117
+ onFocusCapture: D,
118
+ onKeyDown: v,
119
+ children: e
120
+ }
121
+ ) });
122
+ });
123
+ B.displayName = "Actionbar";
124
+ const S = Object.assign(B, {
125
+ Host: F,
126
+ Button: N,
127
+ Divider: j
128
+ });
129
+ export {
130
+ S as Actionbar,
131
+ N as ActionbarButton,
132
+ j as ActionbarDivider,
133
+ F as ActionbarHost
134
+ };
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ import { useRef as i, useEffect as s } from "react";
3
+ import { isDevEnvironment as c } from "../utils/is-dev-environment.js";
4
+ const e = 2, r = 5;
5
+ function d({
6
+ children: o,
7
+ rootRef: u
8
+ }) {
9
+ const n = i(/* @__PURE__ */ new Set());
10
+ s(() => {
11
+ if (!c())
12
+ return;
13
+ const t = u.current?.querySelectorAll('[data-smudi-actionbar-button="true"]').length ?? 0;
14
+ t >= e && t <= r || n.current.has(t) || (n.current.add(t), console.warn(
15
+ `[Actionbar] Expected between ${e} and ${r} buttons, but received ${t}. Consider using another pattern when the number of actions falls outside this range.`
16
+ ));
17
+ }, [o]);
18
+ }
19
+ export {
20
+ d as useActionbarButtonCountWarning
21
+ };
@@ -0,0 +1,38 @@
1
+ "use client";
2
+ import { useRef as u, useEffect as i } from "react";
3
+ import { isDevEnvironment as s } from "../utils/is-dev-environment.js";
4
+ const c = 'a[href], button, input:not([type="hidden"]), select, textarea, [tabindex], [contenteditable="true"]';
5
+ function l(e) {
6
+ return e.matches('[data-smudi-actionbar-button="true"]');
7
+ }
8
+ function f(e) {
9
+ return "disabled" in e && e.disabled === !0 || e.getAttribute("aria-disabled") === "true";
10
+ }
11
+ function b(e) {
12
+ return e.tabIndex < 0;
13
+ }
14
+ function d(e) {
15
+ return Array.from(
16
+ e.querySelectorAll(c)
17
+ ).filter((t) => l(t) || f(t) ? !1 : !b(t)).length > 0;
18
+ }
19
+ function E({
20
+ children: e,
21
+ hostRef: r,
22
+ supportsHoverReveal: t,
23
+ visibility: n
24
+ }) {
25
+ const o = u(!1);
26
+ i(() => {
27
+ if (!s() || n !== "hover-focus" || !t || o.current)
28
+ return;
29
+ const a = r.current;
30
+ if (!(!a || d(a)))
31
+ throw o.current = !0, new Error(
32
+ "[Actionbar.Host] visibility='hover-focus' requires at least one focusable element in the host content. Add tabIndex={0} to the host root element (for example Card) when there are no naturally focusable children."
33
+ );
34
+ }, [e, r, t, n]);
35
+ }
36
+ export {
37
+ E as useActionbarMissingFocusableContentWarning
38
+ };
@@ -1,7 +1,21 @@
1
1
  "use client";
2
- import { Divider as i } from "@digdir/designsystemet-react";
3
- const e = i;
4
- e.displayName = "Divider";
2
+ import { jsx as e } from "react/jsx-runtime";
3
+ import { Divider as t } from "@digdir/designsystemet-react";
4
+ import { forwardRef as m } from "react";
5
+ import { classNames as d } from "../utils/class-names.js";
6
+ const n = m(function({ orientation: i = "horizontal", className: o, ...r }, a) {
7
+ return /* @__PURE__ */ e(
8
+ t,
9
+ {
10
+ ...r,
11
+ ref: a,
12
+ className: d("smudi-divider", o),
13
+ "data-orientation": i,
14
+ "aria-orientation": r["aria-orientation"] ?? i
15
+ }
16
+ );
17
+ });
18
+ n.displayName = "Divider";
5
19
  export {
6
- e as Divider
20
+ n as Divider
7
21
  };
@@ -1,24 +1,26 @@
1
1
  "use client";
2
- import { jsx as t } from "react/jsx-runtime";
2
+ import { jsx as e } from "react/jsx-runtime";
3
3
  import { forwardRef as n } from "react";
4
4
  import { classNames as m } from "../utils/class-names.js";
5
- const s = n(
6
- function({ className: a, role: i, "aria-hidden": e, ...r }, d) {
7
- const o = i ? r["aria-orientation"] ?? "vertical" : void 0;
8
- return /* @__PURE__ */ t(
5
+ import { Divider as s } from "../divider/divider.js";
6
+ const v = n(
7
+ function({ className: a, role: i, "aria-hidden": d, ...r }, o) {
8
+ const t = i ? r["aria-orientation"] ?? "vertical" : void 0;
9
+ return /* @__PURE__ */ e(
9
10
  "div",
10
11
  {
11
12
  ...r,
12
- ref: d,
13
+ ref: o,
13
14
  role: i,
14
- "aria-orientation": o,
15
- "aria-hidden": i ? void 0 : e ?? "true",
16
- className: m("smudi-header__divider", a)
15
+ "aria-orientation": t,
16
+ "aria-hidden": i ? void 0 : d ?? "true",
17
+ className: m("smudi-header__divider", a),
18
+ children: /* @__PURE__ */ e(s, { orientation: "vertical" })
17
19
  }
18
20
  );
19
21
  }
20
22
  );
21
- s.displayName = "Header.Divider";
23
+ v.displayName = "Header.Divider";
22
24
  export {
23
- s as HeaderDivider
25
+ v as HeaderDivider
24
26
  };
@@ -8,21 +8,21 @@ const s = "internal_select_all_marker", p = (a) => /* @__PURE__ */ o("data", { c
8
8
  selected: n,
9
9
  multiple: e,
10
10
  items: i,
11
- showToggleAll: d,
11
+ showToggleAll: g,
12
12
  onSelectedChange: t,
13
- ...g
13
+ ...d
14
14
  }) => {
15
- const l = e === !0 && Array.isArray(n) ? new Set(
15
+ const c = e === !0 && Array.isArray(n) ? new Set(
16
16
  n.map(
17
17
  (r) => typeof r == "string" ? r : r?.value
18
18
  )
19
- ) : null, c = e === !0 && !!i?.length && !!l && i.every((r) => l.has(r.value)), f = e && Array.isArray(n) ? c ? [
19
+ ) : null, l = e === !0 && !!i?.length && !!c && i.every((r) => c.has(r.value)), f = e && Array.isArray(n) && l ? [
20
20
  ...n,
21
21
  {
22
22
  label: s,
23
23
  value: s
24
24
  }
25
- ] : n : n ?? void 0;
25
+ ] : n;
26
26
  function S(r) {
27
27
  if (!t) return;
28
28
  if (e) {
@@ -33,12 +33,12 @@ const s = "internal_select_all_marker", p = (a) => /* @__PURE__ */ o("data", { c
33
33
  return;
34
34
  }
35
35
  const u = t;
36
- !r || Array.isArray(r) || r.value !== s && u(r);
36
+ Array.isArray(r) || r?.value !== s && u(r);
37
37
  }
38
38
  const h = (r) => r.value === s ? null : (A ?? p)(r);
39
39
  function y() {
40
40
  if (!e || !t) return;
41
- t(c ? [] : i ?? []);
41
+ t(l ? [] : i ?? []);
42
42
  }
43
43
  return /* @__PURE__ */ o(
44
44
  v,
@@ -47,11 +47,11 @@ const s = "internal_select_all_marker", p = (a) => /* @__PURE__ */ o("data", { c
47
47
  selected: f,
48
48
  onSelectedChange: S,
49
49
  renderSelected: h,
50
- ...g,
50
+ ...d,
51
51
  children: /* @__PURE__ */ o(
52
52
  R.Provider,
53
53
  {
54
- value: { isAllSelected: c, showToggleAll: d, toggleSelectAll: y },
54
+ value: { isAllSelected: l, showToggleAll: g, toggleSelectAll: y },
55
55
  children: a
56
56
  }
57
57
  )
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ function o() {
3
+ const e = typeof import.meta < "u" && !1;
4
+ return e ?? (typeof process < "u" ? process.env?.NODE_ENV : void 0) !== "production";
5
+ }
6
+ export {
7
+ o as isDevEnvironment
8
+ };