@stihl-design-system/components 1.0.0-RC.14 → 1.0.0-RC.16

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 (244) hide show
  1. package/accordion.Dm5MWHQ6.js +12 -0
  2. package/arialiveregions.BwwB-OfU.js +19 -0
  3. package/assets/Accordion.B5bGf8mR.css +1 -0
  4. package/assets/Breadcrumb.BaYrwrYl.css +1 -0
  5. package/assets/NavigationTabList.B6x56sAV.css +1 -0
  6. package/assets/linkstandalone.LMdnj-G0.css +1 -0
  7. package/asterisk.DUzshaw5.js +8 -0
  8. package/breadcrumb.BDpXhffn.js +11 -0
  9. package/breadcrumb.d.ts +2 -0
  10. package/button.Ywd82k7O.js +121 -0
  11. package/buttonround.CI5RGkR9.js +105 -0
  12. package/checkbox.C1JJOQeV.js +103 -0
  13. package/checkboxgroup.o5t3fWsf.js +9 -0
  14. package/chip.DcJLVxEm.js +11 -0
  15. package/chipgroup.CCq2AMSa.js +187 -0
  16. package/chunks/Accordion.BmI7nlus.js +166 -0
  17. package/chunks/AriaLiveRegions.utils.zSFFD3SF.js +27 -0
  18. package/chunks/Breadcrumb.BycdSn-b.js +106 -0
  19. package/chunks/CheckboxGroup.C-Adg1hA.js +74 -0
  20. package/chunks/Chip.BY8kLPnz.js +120 -0
  21. package/chunks/CustomReactSelect.C2yN7CYh.js +3622 -0
  22. package/chunks/Dialog.CjzCKRr2.js +140 -0
  23. package/chunks/Drawer.m2JeVNBp.js +148 -0
  24. package/chunks/Fieldset.DfWsQgjD.js +105 -0
  25. package/chunks/Icon.DhKyUWtM.js +231 -0
  26. package/chunks/Input.utils.Um8Pqp4U.js +52 -0
  27. package/chunks/InputPassword.CmvZcn6n.js +141 -0
  28. package/chunks/InputSearch.CwXaGLJp.js +179 -0
  29. package/chunks/InputStepper.NCl90c4h.js +275 -0
  30. package/chunks/NavigationTabList.BOrhiSiM.js +63 -0
  31. package/chunks/NavigationTabs.DW_6fZxc.js +63 -0
  32. package/chunks/Notification.Bp28ubaX.js +99 -0
  33. package/chunks/RadioGroup.Dh-7jSOg.js +105 -0
  34. package/chunks/Select.CMwsbHvQ.js +190 -0
  35. package/chunks/TabPane.utils.DG16Y2uD.js +10 -0
  36. package/chunks/Tabs.D3yDE5nU.js +77 -0
  37. package/chunks/Textarea.CMRn2Aof.js +184 -0
  38. package/chunks/Toast.Boi6TEHu.js +76 -0
  39. package/chunks/index.CEyLAtio.js +48 -0
  40. package/chunks/index.CgTHIF3K.js +293 -0
  41. package/chunks/{translate.isa3FHb8.js → translate.nuU7uChI.js} +1 -4
  42. package/chunks/useBreakpoint.CMOR9ZOB.js +44 -0
  43. package/combobox.BhzaJrs7.js +55 -0
  44. package/components/Accordion/Accordion.d.ts +5 -1
  45. package/components/Accordion/Accordion.utils.d.ts +2 -2
  46. package/components/AriaLiveRegions/AriaLiveRegions.d.ts +1 -0
  47. package/components/Asterisk/Asterisk.d.ts +1 -0
  48. package/components/Breadcrumb/Breadcrumb.d.ts +45 -0
  49. package/components/Breadcrumb/Breadcrumb.utils.d.ts +4 -0
  50. package/components/Button/Button.d.ts +6 -4
  51. package/components/ButtonRound/ButtonRound.d.ts +4 -1
  52. package/components/Checkbox/Checkbox.d.ts +2 -0
  53. package/components/CheckboxGroup/CheckboxGroup.d.ts +3 -1
  54. package/components/ChipGroup/ChipGroup.d.ts +2 -0
  55. package/components/Combobox/Combobox.d.ts +3 -0
  56. package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +3 -2
  57. package/components/Combobox/CustomReactSelect/OptionCheckbox.d.ts +1 -1
  58. package/components/Dialog/Dialog.d.ts +15 -4
  59. package/components/Drawer/Drawer.d.ts +15 -5
  60. package/components/Fieldset/Fieldset.d.ts +3 -1
  61. package/components/Flag/Flag.d.ts +3 -0
  62. package/components/FloatingActionButton/FloatingActionButton.d.ts +4 -1
  63. package/components/Heading/Heading.d.ts +3 -1
  64. package/components/Icon/Icon.d.ts +3 -1
  65. package/components/Input/Input.d.ts +23 -10
  66. package/components/Input/Input.utils.d.ts +2 -2
  67. package/components/InputPassword/InputPassword.d.ts +18 -9
  68. package/components/InputSearch/InputSearch.d.ts +17 -7
  69. package/components/InputStepper/InputStepper.d.ts +24 -8
  70. package/components/Link/Link.d.ts +6 -3
  71. package/components/LinkStandalone/LinkStandalone.d.ts +4 -1
  72. package/components/Logo/Logo.d.ts +3 -1
  73. package/components/NavigationTabs/NavigationTabs.d.ts +43 -0
  74. package/components/NavigationTabs/NavigationTabs.test.d.ts +1 -0
  75. package/components/NavigationTabs/NavigationTabs.utils.d.ts +6 -0
  76. package/components/Notification/Notification.d.ts +14 -5
  77. package/components/NumberIndicator/NumberIndicator.d.ts +1 -0
  78. package/components/RadioGroup/RadioGroup.d.ts +2 -0
  79. package/components/Select/Select.d.ts +2 -1
  80. package/components/SkipToContent/SkipToContent.d.ts +3 -0
  81. package/components/Spinner/Spinner.d.ts +7 -1
  82. package/components/Switch/Switch.d.ts +6 -4
  83. package/components/SystemFeedback/SystemFeedback.d.ts +1 -1
  84. package/components/Tabs/TabList/NavigationTabList/NavigationTabList.d.ts +22 -0
  85. package/components/Tabs/TabList/TabList.d.ts +38 -0
  86. package/components/Tabs/TabList/TabList.utils.d.ts +6 -0
  87. package/components/Tabs/TabList/TabList.utils.test.d.ts +1 -0
  88. package/components/Tabs/TabPane/TabPane.d.ts +1 -1
  89. package/components/Tabs/Tabs.d.ts +9 -2
  90. package/components/Tabs/Tabs.utils.d.ts +1 -6
  91. package/components/Text/Text.d.ts +6 -4
  92. package/components/Textarea/Textarea.d.ts +3 -1
  93. package/components/Title/Title.d.ts +3 -1
  94. package/components/Toast/Toast.d.ts +2 -0
  95. package/customreactselect.CW5-QQSM.js +14 -0
  96. package/dialog.DuAgAwfs.js +10 -0
  97. package/drawer.D3E46fH1.js +10 -0
  98. package/fieldset.4UygHVV3.js +12 -0
  99. package/flag.BJk5fHMs.js +50 -0
  100. package/floatingactionbutton.DFZ2YwaJ.js +74 -0
  101. package/heading.6LOBHJG6.js +55 -0
  102. package/icon.dww0DXWN.js +9 -0
  103. package/index.d.ts +4 -0
  104. package/index.es.js +139 -179
  105. package/input.DXzeHdRE.js +211 -0
  106. package/inputpassword.DXEvvgZt.js +13 -0
  107. package/inputsearch.DzwXj82k.js +14 -0
  108. package/inputstepper.CYwcFoQ1.js +16 -0
  109. package/link.CgNqBaNn.js +106 -0
  110. package/linkstandalone.Dn-uDj5T.js +69 -0
  111. package/logo.BgnYvK7t.js +51 -0
  112. package/navigationtablist.XNy54fXK.js +9 -0
  113. package/navigationtablist.d.ts +2 -0
  114. package/navigationtabs.DheMj9hs.js +9 -0
  115. package/navigationtabs.d.ts +2 -0
  116. package/notification.BnyOWmCm.js +10 -0
  117. package/numberindicator.Do92cr0z.js +35 -0
  118. package/optioncheckbox.DcckSTrV.js +52 -0
  119. package/package.json +53 -50
  120. package/partials/index.js +248 -2131
  121. package/partials/lib/partials.d.ts +77 -4
  122. package/radio.TDaeblOB.js +130 -0
  123. package/radiogroup.DyL_cJzK.js +11 -0
  124. package/select.BoeUz4Fb.js +13 -0
  125. package/skiptocontent.D7xhN0KM.js +35 -0
  126. package/spinner.gilnr6vN.js +52 -0
  127. package/switch.Ca9tRATr.js +68 -0
  128. package/systemfeedback.7I6fnqjX.js +34 -0
  129. package/tablist.TWjlHs5Y.js +251 -0
  130. package/tablist.d.ts +2 -0
  131. package/tabpane.CB-eudyw.js +37 -0
  132. package/tabs.Cr2CMXbY.js +11 -0
  133. package/text.C6gOJ2nV.js +59 -0
  134. package/textarea.CqDSxfcU.js +12 -0
  135. package/title.CSCXJnBN.js +43 -0
  136. package/toast.BN0v57nF.js +11 -0
  137. package/toastmanager.B9CR9plV.js +115 -0
  138. package/utils/render-documentation.d.ts +1 -0
  139. package/accordion.C6_sqiW2.js +0 -10
  140. package/arialiveregions.2dxodwBP.js +0 -27
  141. package/assets/Accordion.i4k5SMQM.css +0 -1
  142. package/assets/Tabs.DUqlqP6R.css +0 -1
  143. package/assets/linkstandalone.DIazcjIv.css +0 -1
  144. package/asterisk.DpzETKdT.js +0 -8
  145. package/button.BfcWQZhx.js +0 -135
  146. package/buttonround.E56F_805.js +0 -118
  147. package/checkbox.Dt0OWryN.js +0 -111
  148. package/checkboxgroup.je32bRPr.js +0 -8
  149. package/chip.CpnDX4Ro.js +0 -10
  150. package/chipgroup.Cy76KMWu.js +0 -175
  151. package/chunks/Accordion.Bza3TO4Y.js +0 -125
  152. package/chunks/AriaLiveRegions.utils.Bq6Mp2bE.js +0 -40
  153. package/chunks/CheckboxGroup.C_2ZwEQJ.js +0 -95
  154. package/chunks/Chip.BvlKC503.js +0 -148
  155. package/chunks/CustomReactSelect.CB41lklE.js +0 -3598
  156. package/chunks/Dialog.ClBjJWOh.js +0 -148
  157. package/chunks/Drawer.ReDW3ohH.js +0 -154
  158. package/chunks/Fieldset.Ct_JFRs9.js +0 -99
  159. package/chunks/Icon.BCmt_XBG.js +0 -223
  160. package/chunks/Input.utils.DYbmWlx6.js +0 -111
  161. package/chunks/InputPassword.Cvk5J8w1.js +0 -143
  162. package/chunks/InputSearch.BIIW-ERk.js +0 -192
  163. package/chunks/InputStepper.DGzR3KY6.js +0 -296
  164. package/chunks/Notification.uAEjPywP.js +0 -92
  165. package/chunks/RadioGroup.D10-pe9H.js +0 -146
  166. package/chunks/Select.DsLnW29U.js +0 -194
  167. package/chunks/TabPane.CYuUi0oL.js +0 -51
  168. package/chunks/Tabs.D_JAsvoh.js +0 -270
  169. package/chunks/Textarea.Dh9R9YdZ.js +0 -199
  170. package/chunks/Toast.j7LPnQ36.js +0 -89
  171. package/chunks/index.CvOaL64Y.js +0 -45
  172. package/chunks/jsx-runtime.C115EyI4.js +0 -635
  173. package/chunks/useBreakpoint.B8XxjSVJ.js +0 -48
  174. package/combobox.D6zXg976.js +0 -47
  175. package/customreactselect.BcjDvZG6.js +0 -13
  176. package/dialog.BkVOgeWY.js +0 -9
  177. package/drawer.DM_NKGTQ.js +0 -9
  178. package/fieldset.CSNoVbL1.js +0 -11
  179. package/flag.BKpsdB_-.js +0 -43
  180. package/floatingactionbutton.D5L0B7zI.js +0 -87
  181. package/heading.IPIYc5vW.js +0 -50
  182. package/icon.Ck0BpI34.js +0 -8
  183. package/input.BbnmbMCI.js +0 -241
  184. package/inputpassword.KnZRwWCQ.js +0 -12
  185. package/inputsearch.DgYJPZ2v.js +0 -13
  186. package/inputstepper.T_of1Gz0.js +0 -15
  187. package/link.L8O_InKe.js +0 -116
  188. package/linkstandalone.BBoEniZ_.js +0 -79
  189. package/logo.Hul8qCFo.js +0 -65
  190. package/notification.Bt9TbAAt.js +0 -9
  191. package/numberindicator.UU7FSouT.js +0 -26
  192. package/optioncheckbox.BRUTnQnJ.js +0 -43
  193. package/radio.B-2uuWHq.js +0 -114
  194. package/radiogroup.DM_lF4hI.js +0 -10
  195. package/select.COLuwr89.js +0 -12
  196. package/skiptocontent.DxogCFvU.js +0 -45
  197. package/spinner.Bq97Og-6.js +0 -58
  198. package/switch.DI8YYa5G.js +0 -65
  199. package/systemfeedback.C3Pfxxpp.js +0 -25
  200. package/tabpane.BnQBzVXw.js +0 -8
  201. package/tabs.BaELlVri.js +0 -15
  202. package/text.DThvTwm8.js +0 -57
  203. package/textarea.Wcl_pVBb.js +0 -13
  204. package/title.DqzdB2Gq.js +0 -36
  205. package/toast.DQlMWU6I.js +0 -10
  206. package/toastmanager.DxHFtr5C.js +0 -119
  207. /package/assets/{CheckboxGroup.BH1Br1dg.css → CheckboxGroup.Dd-Huo7x.css} +0 -0
  208. /package/assets/{Chip.DSdLuzoi.css → Chip.dxIYIjj7.css} +0 -0
  209. /package/assets/{CustomReactSelect.vHt8qNKC.css → CustomReactSelect.DYDaP5r5.css} +0 -0
  210. /package/assets/{Dialog.BgzebVk4.css → Dialog.DXmPdExC.css} +0 -0
  211. /package/assets/{Drawer.Bauwxrk7.css → Drawer.BcM0epJS.css} +0 -0
  212. /package/assets/{Fieldset.DOdTbb7C.css → Fieldset.Og4EsnPI.css} +0 -0
  213. /package/assets/{Icon.DxRSBRSL.css → Icon.ZNrKuqgu.css} +0 -0
  214. /package/assets/{InputPassword.CG7Ugu73.css → InputPassword.DtKteerr.css} +0 -0
  215. /package/assets/{InputSearch.CseChMc-.css → InputSearch.Mql3oFlQ.css} +0 -0
  216. /package/assets/{InputStepper.C0eAYr7P.css → InputStepper.BXz1MMBg.css} +0 -0
  217. /package/assets/{Notification.DbRapUJo.css → Notification.DZIF-Wo6.css} +0 -0
  218. /package/assets/{RadioGroup.BfMo157q.css → RadioGroup.CM2mYOzc.css} +0 -0
  219. /package/assets/{Select.D4EXgIbz.css → Select.KvAgxJZk.css} +0 -0
  220. /package/assets/{Textarea.KJGPTYMz.css → Textarea.BIRQlv6m.css} +0 -0
  221. /package/assets/{Toast.CuafTAf7.css → Toast.CuM-yS7S.css} +0 -0
  222. /package/assets/{arialiveregions.DhsijBaL.css → arialiveregions.e0Q16ZWi.css} +0 -0
  223. /package/assets/{asterisk.BfVAUBO7.css → asterisk.B41DaZDe.css} +0 -0
  224. /package/assets/{button.DF4RBeC2.css → button.CpPeQPsM.css} +0 -0
  225. /package/assets/{buttonround.19uK_-oO.css → buttonround.BFauSRAb.css} +0 -0
  226. /package/assets/{checkbox.ByOoFouu.css → checkbox.BKHQN_tu.css} +0 -0
  227. /package/assets/{chipgroup.BzfZLbkv.css → chipgroup.CUIkyYBW.css} +0 -0
  228. /package/assets/{flag.B-RLcMcf.css → flag.C7i3MAAP.css} +0 -0
  229. /package/assets/{floatingactionbutton.E9HekT6S.css → floatingactionbutton.l0nvFiJU.css} +0 -0
  230. /package/assets/{heading.u4f8Mz94.css → heading.B-rdLVZD.css} +0 -0
  231. /package/assets/{input.BAkFKPW3.css → input.B5spSeMe.css} +0 -0
  232. /package/assets/{link.DDJj0D1U.css → link.Be5OF_8E.css} +0 -0
  233. /package/assets/{logo.CnW8alZU.css → logo.bVXt9m9R.css} +0 -0
  234. /package/assets/{numberindicator.BJ9vFpnd.css → numberindicator.BJnvB-K3.css} +0 -0
  235. /package/assets/{optioncheckbox.BZaWtRD7.css → optioncheckbox.DAffEKvY.css} +0 -0
  236. /package/assets/{radio.X-RTl_jo.css → radio.CGf7v0D_.css} +0 -0
  237. /package/assets/{skiptocontent.PTL3256m.css → skiptocontent.CTSDC_kG.css} +0 -0
  238. /package/assets/{spinner.2iWJWKyA.css → spinner.BJ5xwnYH.css} +0 -0
  239. /package/assets/{switch.gw6aa3kx.css → switch.Bc9KIyw9.css} +0 -0
  240. /package/assets/{systemfeedback.BPz5YlPC.css → systemfeedback.DoqgHZPH.css} +0 -0
  241. /package/assets/{TabPane.zywjfwo8.css → tabpane.D1LTb432.css} +0 -0
  242. /package/assets/{text.DjTG_qNb.css → text.BlRcxO8n.css} +0 -0
  243. /package/assets/{title.rosWPEG3.css → title.B0tsgJ-n.css} +0 -0
  244. /package/components/{Tabs/Tabs.utils.test.d.ts → Breadcrumb/Breadcrumb.test.d.ts} +0 -0
@@ -1,8 +0,0 @@
1
- "use client";
2
- import "./chunks/jsx-runtime.C115EyI4.js";
3
- import "./chunks/index.CvOaL64Y.js";
4
- import "react";
5
- import { T as m } from "./chunks/TabPane.CYuUi0oL.js";
6
- export {
7
- m as TabPane
8
- };
package/tabs.BaELlVri.js DELETED
@@ -1,15 +0,0 @@
1
- "use client";
2
- import "./chunks/jsx-runtime.C115EyI4.js";
3
- import "./chunks/index.CvOaL64Y.js";
4
- import "react";
5
- import "./chunks/has-window.ut_-aShB.js";
6
- import "./chunks/helpers.CcqWV-wZ.js";
7
- import { D as f } from "./chunks/Tabs.D_JAsvoh.js";
8
- import "./chunks/useIsomorphicLayoutEffect.CnJ9AMFS.js";
9
- import "./button.BfcWQZhx.js";
10
- import "./chunks/Icon.BCmt_XBG.js";
11
- import "./numberindicator.UU7FSouT.js";
12
- import "./chunks/TabPane.CYuUi0oL.js";
13
- export {
14
- f as DSTabs
15
- };
package/text.DThvTwm8.js DELETED
@@ -1,57 +0,0 @@
1
- "use client";
2
- import { j as x } from "./chunks/jsx-runtime.C115EyI4.js";
3
- import { c as k } from "./chunks/index.CvOaL64Y.js";
4
- import './assets/text.DjTG_qNb.css';const c = "ds-text_root_12k0t_1", n = "ds-text_root--large_12k0t_7", u = "ds-text_root--large-bold_12k0t_18", b = "ds-text_root--medium_12k0t_29", S = "ds-text_root--medium-bold_12k0t_40", g = "ds-text_root--small_12k0t_51", B = "ds-text_root--small-bold_12k0t_62", i = "ds-text_root--x-small_12k0t_73", X = "ds-text_root--x-small-bold_12k0t_84", L = "ds-text_root--xx-small_12k0t_95", M = "ds-text_root--theme-dark_12k0t_189", o = {
5
- root: c,
6
- "root--large": "ds-text_root--large_12k0t_7",
7
- rootLarge: n,
8
- "root--large-bold": "ds-text_root--large-bold_12k0t_18",
9
- rootLargeBold: u,
10
- "root--medium": "ds-text_root--medium_12k0t_29",
11
- rootMedium: b,
12
- "root--medium-bold": "ds-text_root--medium-bold_12k0t_40",
13
- rootMediumBold: S,
14
- "root--small": "ds-text_root--small_12k0t_51",
15
- rootSmall: g,
16
- "root--small-bold": "ds-text_root--small-bold_12k0t_62",
17
- rootSmallBold: B,
18
- "root--x-small": "ds-text_root--x-small_12k0t_73",
19
- rootXSmall: i,
20
- "root--x-small-bold": "ds-text_root--x-small-bold_12k0t_84",
21
- rootXSmallBold: X,
22
- "root--xx-small": "ds-text_root--xx-small_12k0t_95",
23
- rootXxSmall: L,
24
- "root--theme-dark": "ds-text_root--theme-dark_12k0t_189",
25
- rootThemeDark: M
26
- }, h = ({
27
- children: r,
28
- className: m,
29
- size: t = "medium",
30
- tag: d = "p",
31
- theme: a = "light",
32
- weight: l = "normal",
33
- ...s
34
- }) => {
35
- const _ = d, e = k(o.root, m, {
36
- // large
37
- [o.rootLarge]: t === "large",
38
- [o.rootLargeBold]: t === "large" && l === "bold",
39
- // medium
40
- [o.rootMedium]: t == "medium",
41
- [o.rootMediumBold]: t === "medium" && l === "bold",
42
- // small
43
- [o.rootSmall]: t == "small",
44
- [o.rootSmallBold]: t == "small" && l === "bold",
45
- // x-small
46
- [o.rootXSmall]: t == "x-small",
47
- [o.rootXSmallBold]: t == "x-small" && l === "bold",
48
- // xx-small
49
- [o.rootXxSmall]: t == "xx-small",
50
- // dark theme
51
- [o.rootThemeDark]: a === "dark"
52
- });
53
- return /* @__PURE__ */ x.jsx(_, { className: e, ...s, children: r });
54
- };
55
- export {
56
- h as DSText
57
- };
@@ -1,13 +0,0 @@
1
- "use client";
2
- import "./chunks/jsx-runtime.C115EyI4.js";
3
- import "./chunks/index.CvOaL64Y.js";
4
- import "react";
5
- import "./chunks/has-window.ut_-aShB.js";
6
- import "./chunks/helpers.CcqWV-wZ.js";
7
- import "./chunks/useBreakpoint.B8XxjSVJ.js";
8
- import "./asterisk.DpzETKdT.js";
9
- import "./systemfeedback.C3Pfxxpp.js";
10
- import { D } from "./chunks/Textarea.Dh9R9YdZ.js";
11
- export {
12
- D as DSTextarea
13
- };
package/title.DqzdB2Gq.js DELETED
@@ -1,36 +0,0 @@
1
- "use client";
2
- import { j as r } from "./chunks/jsx-runtime.C115EyI4.js";
3
- import { c as d } from "./chunks/index.CvOaL64Y.js";
4
- import './assets/title.rosWPEG3.css';const g = "ds-title_root_tt8l3_1", i = "ds-title_root--x-large-uppercase_tt8l3_4", n = "ds-title_root--large-uppercase_tt8l3_20", h = "ds-title_root--theme-dark_tt8l3_36", m = "ds-title_dash_tt8l3_39", t = {
5
- root: g,
6
- "root--x-large-uppercase": "ds-title_root--x-large-uppercase_tt8l3_4",
7
- rootXLargeUppercase: i,
8
- "root--large-uppercase": "ds-title_root--large-uppercase_tt8l3_20",
9
- rootLargeUppercase: n,
10
- "root--theme-dark": "ds-title_root--theme-dark_tt8l3_36",
11
- rootThemeDark: h,
12
- dash: m
13
- }, k = ({
14
- children: o,
15
- className: s,
16
- size: e = "x-large",
17
- tag: a = "h1",
18
- // Design suggested to set default tag to h1
19
- theme: l = "light",
20
- ...p
21
- }) => {
22
- const c = a, _ = d(t.root, s, {
23
- // sizes
24
- [t.rootXLargeUppercase]: e === "x-large",
25
- [t.rootLargeUppercase]: e === "large",
26
- // dark theme
27
- [t.rootThemeDark]: l === "dark"
28
- });
29
- return /* @__PURE__ */ r.jsxs(c, { className: _, ...p, children: [
30
- o,
31
- /* @__PURE__ */ r.jsx("span", { className: t.dash, "aria-hidden": "true", children: "ƒ" })
32
- ] });
33
- };
34
- export {
35
- k as DSTitle
36
- };
package/toast.DQlMWU6I.js DELETED
@@ -1,10 +0,0 @@
1
- "use client";
2
- import "./chunks/jsx-runtime.C115EyI4.js";
3
- import "./chunks/index.CvOaL64Y.js";
4
- import "react";
5
- import "./button.BfcWQZhx.js";
6
- import "./chunks/Icon.BCmt_XBG.js";
7
- import { D as s } from "./chunks/Toast.j7LPnQ36.js";
8
- export {
9
- s as DSToast
10
- };
@@ -1,119 +0,0 @@
1
- "use client";
2
- import { j as g } from "./chunks/jsx-runtime.C115EyI4.js";
3
- import { createContext as y, useContext as C, useState as S, useRef as O, useEffect as A, useMemo as j } from "react";
4
- import { g as a } from "./chunks/helpers.CcqWV-wZ.js";
5
- import { b as D, g as E } from "./chunks/AriaLiveRegions.utils.Bq6Mp2bE.js";
6
- import { D as _, s as U } from "./chunks/Toast.j7LPnQ36.js";
7
- import { h as q } from "./chunks/has-window.ut_-aShB.js";
8
- const Q = () => {
9
- if (!D() || !E())
10
- throw new Error(
11
- a(
12
- "DSToast",
13
- 'The DSAriaLiveRegions component has to be placed at the root of your application, as close to the "body" as possible, e.g. in your "App.tsx" or "layout.tsx".'
14
- )
15
- );
16
- }, k = () => {
17
- if (!q)
18
- return;
19
- if (document.querySelectorAll("[data-ds-toast]").length > 1)
20
- throw new Error(
21
- a(
22
- "DSToast",
23
- 'The destructured "toast" element should only be used once in the DOM.'
24
- )
25
- );
26
- }, i = "data-ds-toast-timeout-id", w = "closing", B = 1e4, x = y(void 0), H = () => {
27
- const n = C(x);
28
- if (!n)
29
- throw new Error(
30
- a(
31
- "DSToastProvider",
32
- "useDSToast must be used within a <DSToastProvider />, which wraps around your root component."
33
- )
34
- );
35
- return n;
36
- }, J = ({
37
- children: n
38
- }) => {
39
- const [u, c] = S([]), [s, l] = S(null), o = O(null);
40
- A(() => {
41
- !s && u.length > 0 && setTimeout(() => {
42
- l(u[0]);
43
- });
44
- }, [u]), A(() => {
45
- s && (L(s.message, s.variant), I());
46
- }, [s]);
47
- const T = () => {
48
- var e;
49
- return ((e = o.current) == null ? void 0 : e.getAttribute(i)) || null;
50
- }, m = (e) => {
51
- var t;
52
- (t = o.current) == null || t.setAttribute(i, e);
53
- }, p = () => {
54
- var e;
55
- return (e = o.current) == null ? void 0 : e.removeAttribute(i);
56
- }, L = (e, t) => {
57
- if (t === "warning") {
58
- const r = D();
59
- r && (r.innerText = e);
60
- } else if (t === "success" || t === "info") {
61
- const r = E();
62
- r && (r.innerText = e);
63
- }
64
- }, d = (e, t) => {
65
- Q();
66
- const r = {
67
- message: e,
68
- hideIcon: t == null ? void 0 : t.hideIcon,
69
- variant: (t == null ? void 0 : t.variant) || "info",
70
- onClick: () => {
71
- v();
72
- },
73
- onMouseEnter: M,
74
- onMouseLeave: R
75
- };
76
- c((P) => [...P, r]);
77
- }, M = () => {
78
- f();
79
- }, f = () => {
80
- var t;
81
- const e = T();
82
- e && (clearTimeout(e), (t = o.current) == null || t.removeAttribute(i));
83
- }, h = () => {
84
- const e = setTimeout(() => {
85
- v();
86
- }, B);
87
- m(String(e));
88
- }, R = () => {
89
- T() !== w && o.current && h();
90
- }, I = () => {
91
- var e;
92
- k(), s && ((e = o.current) != null && e.showPopover) && (o.current.showPopover(), h());
93
- }, v = () => {
94
- f(), m(w), o.current && (o.current.addEventListener(
95
- "animationend",
96
- () => {
97
- var e;
98
- (e = o.current) != null && e.hidePopover && (o.current.hidePopover(), p(), o.current = null, c((t) => t.slice(1)), l(null));
99
- },
100
- {
101
- once: !0
102
- // removes event listener after being called once
103
- }
104
- ), o.current.classList.add(U.rootClosing));
105
- }, b = j(
106
- () => ({
107
- queueDSToastMessage: d
108
- }),
109
- [d]
110
- );
111
- return /* @__PURE__ */ g.jsxs(x.Provider, { value: b, children: [
112
- s ? /* @__PURE__ */ g.jsx(_, { ...s, ref: o }) : null,
113
- n
114
- ] });
115
- };
116
- export {
117
- J as DSToastProvider,
118
- H as useDSToast
119
- };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes