@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,111 +0,0 @@
1
- "use client";
2
- import { h as p } from "./has-window.ut_-aShB.js";
3
- import { g as t } from "./helpers.CcqWV-wZ.js";
4
- import "react";
5
- const a = 8, i = 5, T = ["medium", "small"], u = [
6
- "color",
7
- "date",
8
- "datetime-local",
9
- "email",
10
- "file",
11
- "month",
12
- "number",
13
- "range",
14
- "tel",
15
- "text",
16
- "time",
17
- "url"
18
- ], l = [
19
- "week",
20
- "hidden",
21
- "button",
22
- "checkbox",
23
- "password",
24
- "radio",
25
- "search",
26
- "reset",
27
- "submit",
28
- "image",
29
- "datetime"
30
- ], b = ({
31
- id: e,
32
- label: n,
33
- prefix: o,
34
- suffix: s,
35
- leadingIconName: r,
36
- leadingIconSource: d,
37
- actionButtonIconName: m,
38
- actionButtonIconSource: c
39
- }) => {
40
- if (!e)
41
- throw new Error(
42
- t(
43
- "DSInput",
44
- 'A unique "id" prop is required. Please add a unique "id" prop to the DSInput component.'
45
- )
46
- );
47
- if (!n)
48
- throw new Error(
49
- t(
50
- "DSInput",
51
- `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInput component. If you don't want to display a label, set hideLabel={true}.`
52
- )
53
- );
54
- o && o.length > a && console.warn(
55
- t(
56
- "DSInput",
57
- `Prefix length must not exceed ${a} characters.`
58
- )
59
- ), s && s.length > i && console.warn(
60
- t(
61
- "DSInput",
62
- `Suffix length must not exceed ${i} characters.`
63
- )
64
- ), o && (r || d) && console.warn(
65
- t(
66
- "DSInput",
67
- "Prefix and a leading Icon cannot be used at the same time."
68
- )
69
- ), s && (m || c) && console.warn(
70
- t(
71
- "DSInput",
72
- "Suffix and an action button cannot be used at the same time."
73
- )
74
- );
75
- }, D = (e) => {
76
- if (!u.includes(e) && !l.includes(e))
77
- throw new Error(
78
- t(
79
- "DSInput",
80
- `The type "${e}" is not supported by the DSInput component.`
81
- )
82
- );
83
- const n = {
84
- number: "Type number is not recommended. Use type text with inputmode numeric/decimal or DSInputStepper component instead.",
85
- button: "Type button is not recommended. Use DSButton component instead.",
86
- checkbox: "Type checkbox is not recommended. Use DSCheckbox component instead.",
87
- password: "Type password is not recommended. Use DSInputPassword component instead.",
88
- radio: "Type radio is not recommended. Use DSRadioGroup component instead.",
89
- search: "Type search is not recommended. Use DSInputSearch component instead.",
90
- reset: "Type reset is not recommended. Use DSButton component with type reset instead.",
91
- submit: "Type submit is not recommended. Use DSButton component with type submit instead.",
92
- image: "Type image is not recommended. Use DSButton component instead.",
93
- datetime: "Type datetime is not recommended. Use type datetime-local instead.",
94
- week: "Type week is not recommended. Mobile safari does not support type week.",
95
- hidden: 'Type hidden is not supported by DSInput component. Use a default <input type="hidden" /> element instead.'
96
- };
97
- n[e] && console.warn(t("DSInput", n[e]));
98
- }, h = () => p && "showPicker" in HTMLInputElement.prototype && !!window.navigator.userAgent.match(/chrome|chromium|crios|edg/i), y = (e, n) => h() && (e || n), U = (e) => e === "date" || e === "datetime-local" || e === "month", P = (e) => e === "time";
99
- export {
100
- T as I,
101
- a as M,
102
- u as S,
103
- l as U,
104
- i as a,
105
- D as b,
106
- P as c,
107
- h,
108
- U as i,
109
- y as s,
110
- b as v
111
- };
@@ -1,143 +0,0 @@
1
- "use client";
2
- import { j as a } from "./jsx-runtime.C115EyI4.js";
3
- import { c as i } from "./index.CvOaL64Y.js";
4
- import { useState as A } from "react";
5
- import { u as L } from "./useBreakpoint.B8XxjSVJ.js";
6
- import { Asterisk as C } from "../asterisk.DpzETKdT.js";
7
- import { DSButton as $ } from "../button.BfcWQZhx.js";
8
- import { DSSystemFeedback as E } from "../systemfeedback.C3Pfxxpp.js";
9
- import { g as m } from "./helpers.CcqWV-wZ.js";
10
- import '../assets/InputPassword.CG7Ugu73.css';const q = "ds-input-password_input_1842u_1", R = "ds-input-password_input--invalid_1842u_113", V = "ds-input-password_input--small_1842u_120", O = "ds-input-password_input--has-leading-icon_1842u_173", F = "ds-input-password_input--has-action-button_1842u_176", M = "ds-input-password_input--has-second-action-button_1842u_179", T = "ds-input-password_input--has-affix_1842u_191", G = "ds-input-password_input--is-ready_1842u_205", J = "ds-input-password_root_1842u_212", K = "ds-input-password_hint_1842u_220", Q = "ds-input-password_label_1842u_220", U = "ds-input-password_wrapper_1842u_224", W = "ds-input-password_action-button_1842u_230", X = "ds-input-password_label--hidden_1842u_248", Y = "ds-input-password_label--disabled_1842u_261", Z = "ds-input-password_feedback_1842u_281", s = {
11
- input: q,
12
- "input--invalid": "ds-input-password_input--invalid_1842u_113",
13
- inputInvalid: R,
14
- "input--small": "ds-input-password_input--small_1842u_120",
15
- inputSmall: V,
16
- "input--has-leading-icon": "ds-input-password_input--has-leading-icon_1842u_173",
17
- inputHasLeadingIcon: O,
18
- "input--has-action-button": "ds-input-password_input--has-action-button_1842u_176",
19
- inputHasActionButton: F,
20
- "input--has-second-action-button": "ds-input-password_input--has-second-action-button_1842u_179",
21
- inputHasSecondActionButton: M,
22
- "input--has-affix": "ds-input-password_input--has-affix_1842u_191",
23
- inputHasAffix: T,
24
- "input--is-ready": "ds-input-password_input--is-ready_1842u_205",
25
- inputIsReady: G,
26
- root: J,
27
- hint: K,
28
- label: Q,
29
- wrapper: U,
30
- "action-button": "ds-input-password_action-button_1842u_230",
31
- actionButton: W,
32
- "label--hidden": "ds-input-password_label--hidden_1842u_248",
33
- labelHidden: X,
34
- "label--disabled": "ds-input-password_label--disabled_1842u_261",
35
- labelDisabled: Y,
36
- feedback: Z
37
- }, z = ({ id: t, label: n }) => {
38
- if (!t)
39
- throw new Error(
40
- m(
41
- "DSInputPassword",
42
- 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputPassword component.'
43
- )
44
- );
45
- if (!n)
46
- throw new Error(
47
- m(
48
- "DSInputPassword",
49
- `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputPassword component. If you don't want to display a label, set hideLabel={true}.`
50
- )
51
- );
52
- }, ds = ({
53
- id: t,
54
- label: n,
55
- autoComplete: h = "new-password",
56
- className: f,
57
- disabled: e = !1,
58
- hidePasswordText: y = "Hide password",
59
- hint: u,
60
- hideLabel: S = !1,
61
- invalid: o = !1,
62
- readonly: r = !1,
63
- required: c = !1,
64
- showPasswordText: x = "Show password",
65
- size: d = "medium",
66
- systemFeedback: p,
67
- ...I
68
- }) => {
69
- process.env.NODE_ENV !== "production" && z({
70
- id: t,
71
- label: n
72
- });
73
- const [l, v] = A(!1), _ = `${t}-label`, w = `${t}-feedback`, b = `${t}-hint`, B = u ? ` ${b}` : "", H = L(S), g = i(s.root, f), D = i(s.input, {
74
- // small input
75
- [s.inputSmall]: d === "small",
76
- // invalid state
77
- [s.inputInvalid]: o,
78
- // action button - input password always has an action button
79
- [s.inputHasActionButton]: !0
80
- }), P = i(s.label, {
81
- // hide label only visually to keep them available for assistive technologies
82
- [s.labelHidden]: H,
83
- [s.labelDisabled]: e
84
- }), N = i(s.actionButton, {
85
- [s.actionButtonSmall]: d === "small"
86
- }), j = () => {
87
- v((k) => !k);
88
- };
89
- return /* @__PURE__ */ a.jsxs("div", { className: g, children: [
90
- /* @__PURE__ */ a.jsxs("label", { className: P, id: _, htmlFor: t, children: [
91
- n,
92
- c && /* @__PURE__ */ a.jsx(C, {})
93
- ] }),
94
- u && /* @__PURE__ */ a.jsx("div", { className: s.hint, id: b, children: u }),
95
- o && p && /* @__PURE__ */ a.jsx(
96
- E,
97
- {
98
- className: s.feedback,
99
- message: p,
100
- type: "invalid",
101
- id: w
102
- }
103
- ),
104
- /* @__PURE__ */ a.jsxs("div", { className: s.wrapper, children: [
105
- /* @__PURE__ */ a.jsx(
106
- "input",
107
- {
108
- className: D,
109
- id: t,
110
- ...I,
111
- "aria-labelledby": `${_}${B}`,
112
- "aria-describedby": o && p ? w : void 0,
113
- "aria-invalid": o,
114
- "aria-disabled": r,
115
- readOnly: r,
116
- required: c,
117
- disabled: e,
118
- autoComplete: h,
119
- type: l ? "text" : "password"
120
- }
121
- ),
122
- /* @__PURE__ */ a.jsx(
123
- $,
124
- {
125
- hideLabel: !0,
126
- theme: "light",
127
- iconName: l ? "eye-closed" : "eye",
128
- variant: "ghost",
129
- className: N,
130
- size: d,
131
- onClick: j,
132
- type: "button",
133
- disabled: e,
134
- children: l ? y : x
135
- }
136
- )
137
- ] })
138
- ] });
139
- };
140
- export {
141
- ds as D,
142
- z as v
143
- };
@@ -1,192 +0,0 @@
1
- "use client";
2
- import { j as e } from "./jsx-runtime.C115EyI4.js";
3
- import { c as u } from "./index.CvOaL64Y.js";
4
- import { useState as J, useRef as D, useEffect as x } from "react";
5
- import { g as w, a as K } from "./helpers.CcqWV-wZ.js";
6
- import { u as Q } from "./useBreakpoint.B8XxjSVJ.js";
7
- import { Asterisk as U } from "../asterisk.DpzETKdT.js";
8
- import { DSButton as N } from "../button.BfcWQZhx.js";
9
- import { DSSystemFeedback as X } from "../systemfeedback.C3Pfxxpp.js";
10
- import '../assets/InputSearch.CseChMc-.css';const Y = "ds-input-search_input_wn1tk_1", Z = "ds-input-search_input--invalid_wn1tk_113", z = "ds-input-search_input--small_wn1tk_120", tt = "ds-input-search_input--has-leading-icon_wn1tk_173", nt = "ds-input-search_input--has-action-button_wn1tk_176", et = "ds-input-search_input--has-second-action-button_wn1tk_179", st = "ds-input-search_input--has-affix_wn1tk_191", at = "ds-input-search_input--is-ready_wn1tk_205", it = "ds-input-search_root_wn1tk_212", ot = "ds-input-search_hint_wn1tk_220", ct = "ds-input-search_label_wn1tk_220", ut = "ds-input-search_wrapper_wn1tk_224", rt = "ds-input-search_action-button_wn1tk_230", lt = "ds-input-search_second-action-button_wn1tk_234", pt = "ds-input-search_label--hidden_wn1tk_252", dt = "ds-input-search_label--disabled_wn1tk_265", ht = "ds-input-search_feedback_wn1tk_285", t = {
11
- input: Y,
12
- "input--invalid": "ds-input-search_input--invalid_wn1tk_113",
13
- inputInvalid: Z,
14
- "input--small": "ds-input-search_input--small_wn1tk_120",
15
- inputSmall: z,
16
- "input--has-leading-icon": "ds-input-search_input--has-leading-icon_wn1tk_173",
17
- inputHasLeadingIcon: tt,
18
- "input--has-action-button": "ds-input-search_input--has-action-button_wn1tk_176",
19
- inputHasActionButton: nt,
20
- "input--has-second-action-button": "ds-input-search_input--has-second-action-button_wn1tk_179",
21
- inputHasSecondActionButton: et,
22
- "input--has-affix": "ds-input-search_input--has-affix_wn1tk_191",
23
- inputHasAffix: st,
24
- "input--is-ready": "ds-input-search_input--is-ready_wn1tk_205",
25
- inputIsReady: at,
26
- root: it,
27
- hint: ot,
28
- label: ct,
29
- wrapper: ut,
30
- "action-button": "ds-input-search_action-button_wn1tk_230",
31
- actionButton: rt,
32
- "second-action-button": "ds-input-search_second-action-button_wn1tk_234",
33
- secondActionButton: lt,
34
- "label--hidden": "ds-input-search_label--hidden_wn1tk_252",
35
- labelHidden: pt,
36
- "label--disabled": "ds-input-search_label--disabled_wn1tk_265",
37
- labelDisabled: dt,
38
- feedback: ht
39
- }, _t = ({ id: n, label: r }) => {
40
- if (!n)
41
- throw new Error(
42
- w(
43
- "DSInputSearch",
44
- 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputSearch component.'
45
- )
46
- );
47
- if (!r)
48
- throw new Error(
49
- w(
50
- "DSInputSearch",
51
- `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputSearch component. If you don't want to display a label, set hideLabel={true}.`
52
- )
53
- );
54
- }, bt = (n) => !!K(n, "form"), Bt = ({
55
- id: n,
56
- label: r,
57
- className: A,
58
- clearButtonLabel: H = "Clear search field",
59
- disabled: a = !1,
60
- hint: _,
61
- hideLabel: E = !1,
62
- invalid: l = !1,
63
- readonly: i = !1,
64
- required: k = !1,
65
- size: o = "medium",
66
- submitButtonLabel: j = "Search",
67
- systemFeedback: b,
68
- value: m,
69
- submitButtonOnClick: C,
70
- onChange: S,
71
- ...L
72
- }) => {
73
- process.env.NODE_ENV !== "production" && _t({
74
- id: n,
75
- label: r
76
- });
77
- const [p, I] = J(m), f = D(null), d = D(null), V = Q(E);
78
- x(() => {
79
- I(m);
80
- }, [m]), x(() => {
81
- f.current && !bt(f.current) && process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && console.warn(
82
- w(
83
- "DSInputSearch",
84
- `The DSInputSearch component with the id "${n}" is not within a form element. This may cause issues with form submission. Please ensure the DSInputSearch component is within a form element.`
85
- )
86
- );
87
- }, []);
88
- const g = `${n}-label`, v = `${n}-feedback`, B = `${n}-hint`, O = _ ? ` ${B}` : "", y = p !== "" && p !== void 0 && p !== null, P = u(t.root, A), $ = u(t.input, {
89
- // small input
90
- [t.inputSmall]: o === "small",
91
- // invalid state
92
- [t.inputInvalid]: l,
93
- // action button - input password always has an action button
94
- [t.inputHasActionButton]: !0,
95
- // action second action button
96
- [t.inputHasSecondActionButton]: y && !i && !a
97
- }), R = u(t.label, {
98
- // hide label only visually to keep them available for assistive technologies
99
- [t.labelHidden]: V,
100
- [t.labelDisabled]: a
101
- }), q = u(t.actionButton, {
102
- [t.actionButtonSmall]: o === "small"
103
- }), T = u(t.secondActionButton, {
104
- [t.secondActionButtonSmall]: o === "small"
105
- }), F = (s, c) => {
106
- const G = Object.getPrototypeOf(s), h = Object.getOwnPropertyDescriptor(
107
- G,
108
- "value"
109
- );
110
- h != null && h.set ? h.set.call(s, c) : s.value = c;
111
- }, M = () => {
112
- var c;
113
- if (!d.current) return;
114
- F(d.current, "");
115
- const s = new Event("change", { bubbles: !0 });
116
- (c = d.current) == null || c.dispatchEvent(s);
117
- }, W = (s) => {
118
- I(s.target.value), S && S(s);
119
- };
120
- return /* @__PURE__ */ e.jsxs("div", { className: P, ref: f, children: [
121
- /* @__PURE__ */ e.jsxs("label", { className: R, id: g, htmlFor: n, children: [
122
- r,
123
- k && /* @__PURE__ */ e.jsx(U, {})
124
- ] }),
125
- _ && /* @__PURE__ */ e.jsx("div", { className: t.hint, id: B, children: _ }),
126
- l && b && /* @__PURE__ */ e.jsx(
127
- X,
128
- {
129
- className: t.feedback,
130
- message: b,
131
- type: "invalid",
132
- id: v
133
- }
134
- ),
135
- /* @__PURE__ */ e.jsxs("div", { className: t.wrapper, children: [
136
- /* @__PURE__ */ e.jsx(
137
- "input",
138
- {
139
- className: $,
140
- id: n,
141
- ref: d,
142
- ...L,
143
- "aria-labelledby": `${g}${O}`,
144
- "aria-describedby": l && b ? v : void 0,
145
- "aria-invalid": l,
146
- "aria-disabled": i,
147
- readOnly: i,
148
- required: k,
149
- disabled: a,
150
- type: "search",
151
- value: p,
152
- onChange: W
153
- }
154
- ),
155
- y && !i && !a && /* @__PURE__ */ e.jsx(
156
- N,
157
- {
158
- hideLabel: !0,
159
- theme: "light",
160
- iconName: "cross",
161
- className: T,
162
- variant: "ghost",
163
- size: o,
164
- onClick: M,
165
- type: "button",
166
- tabIndex: -1,
167
- children: H
168
- }
169
- ),
170
- /* @__PURE__ */ e.jsx(
171
- N,
172
- {
173
- hideLabel: !0,
174
- theme: "light",
175
- iconName: "magnifying-glass",
176
- className: q,
177
- variant: "ghost",
178
- size: o,
179
- onClick: C,
180
- type: "submit",
181
- disabled: a || i,
182
- children: j
183
- }
184
- )
185
- ] })
186
- ] });
187
- };
188
- export {
189
- Bt as D,
190
- bt as i,
191
- _t as v
192
- };