@midas-ds/components 17.15.3 → 17.15.4

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 (246) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/accordion/index.js +2 -5
  3. package/assets/Button.css +1 -1
  4. package/assets/TextField.css +1 -1
  5. package/assets/accordion.css +1 -0
  6. package/assets/badge.css +1 -0
  7. package/assets/breadcrumbs.css +1 -0
  8. package/assets/button2.css +1 -0
  9. package/assets/calendar.css +1 -0
  10. package/assets/card.css +1 -0
  11. package/assets/checkbox.css +1 -0
  12. package/assets/{ColorSchemeSwitch.css → color-scheme-switch.css} +1 -1
  13. package/assets/combobox.css +1 -0
  14. package/assets/date-field.css +1 -0
  15. package/assets/date-picker.css +1 -0
  16. package/assets/default.css +1 -1
  17. package/assets/field-error.css +1 -0
  18. package/assets/file-list.css +1 -0
  19. package/assets/{FileUpload.css → file-upload.css} +1 -1
  20. package/assets/grid.css +1 -0
  21. package/assets/info-banner.css +1 -0
  22. package/assets/label.css +1 -0
  23. package/assets/layout.css +1 -0
  24. package/assets/link-button.css +1 -0
  25. package/assets/link.css +1 -0
  26. package/assets/list-box.css +1 -0
  27. package/assets/logo.css +1 -0
  28. package/assets/menu.css +1 -0
  29. package/assets/modal.css +1 -0
  30. package/assets/popover.css +1 -0
  31. package/assets/progress-bar.css +1 -0
  32. package/assets/radio.css +1 -0
  33. package/assets/search-field.css +1 -0
  34. package/assets/select.css +1 -0
  35. package/assets/skeleton.css +1 -0
  36. package/assets/spinner.css +1 -0
  37. package/assets/table.css +1 -0
  38. package/assets/tabs.css +1 -0
  39. package/assets/{TagGroup.css → tag.css} +1 -1
  40. package/assets/{Text.css → text.css} +1 -1
  41. package/assets/time-field.css +1 -0
  42. package/assets/toast.css +1 -0
  43. package/assets/toggle-button.css +1 -0
  44. package/assets/tooltip.css +1 -0
  45. package/badge/index.js +2 -5
  46. package/breadcrumbs/index.js +2 -5
  47. package/button/index.js +2 -6
  48. package/calendar/index.js +2 -5
  49. package/card/index.js +2 -12
  50. package/character-counter/index.js +2 -4
  51. package/checkbox/index.js +2 -6
  52. package/chunks/Button.module-0C2ArlRs.js +13 -0
  53. package/chunks/FeedbackStatusIcon-A1trvSCf.js +54 -0
  54. package/chunks/TextField.module-CrR3Krxn.js +12 -0
  55. package/chunks/accordion-AqEcuKz_.js +87 -0
  56. package/chunks/arrow-right-7yeXXFNV.js +10 -0
  57. package/chunks/badge-DrCn-5SX.js +22 -0
  58. package/chunks/breadcrumbs-XTH3axtt.js +23 -0
  59. package/chunks/button-CFjf-bDe.js +34 -0
  60. package/chunks/calendar-C0rlcHfr.js +74 -0
  61. package/chunks/card-CF8iwdg3.js +103 -0
  62. package/chunks/character-counter-CSoVSrxZ.js +16 -0
  63. package/chunks/check-BiPE7lAA.js +7 -0
  64. package/chunks/checkbox-B_41DFjp.js +174 -0
  65. package/chunks/chevron-down-Buf0eTzo.js +7 -0
  66. package/chunks/chevron-right-DJ7qKNKG.js +7 -0
  67. package/chunks/clear-button-Cb4MTvBR.js +17 -0
  68. package/chunks/clsx-BtlV5Vo3.js +21 -0
  69. package/chunks/color-scheme-switch-Ce4vL8Yz.js +122 -0
  70. package/chunks/combobox-BLGIYxNy.js +90 -0
  71. package/chunks/createLucideIcon-DhIhuN5D.js +39 -0
  72. package/chunks/date-field-Cy0HGw6v.js +73 -0
  73. package/chunks/date-picker-ByfWqOZh.js +191 -0
  74. package/chunks/field-error-DYp2kgFr.js +19 -0
  75. package/chunks/file-list-DYOuch5G.js +68 -0
  76. package/chunks/file-upload-CZRTVw5O.js +11 -0
  77. package/chunks/grid-CUYMbO7c.js +225 -0
  78. package/chunks/heading-595zCrRS.js +28 -0
  79. package/chunks/info-Bm2gRija.js +19 -0
  80. package/chunks/info-banner-hHq0Atii.js +59 -0
  81. package/chunks/label-uwnwLD3z.js +49 -0
  82. package/chunks/layout-BzK7P4Xn.js +426 -0
  83. package/chunks/link-Q46Ny2Po.js +40 -0
  84. package/chunks/link-button-Cm2B0s4X.js +39 -0
  85. package/chunks/list-box-Dm2itiZD.js +75 -0
  86. package/chunks/logo-D7tz-4hp.js +93 -0
  87. package/chunks/menu-CB6VDQ-u.js +49 -0
  88. package/chunks/modal-Dr0ythpF.js +66 -0
  89. package/chunks/popover-DxnYz_IT.js +27 -0
  90. package/chunks/progress-bar-Dppkp0cT.js +40 -0
  91. package/chunks/radio-PBrD5BO4.js +43 -0
  92. package/chunks/search-field-B5RciSq0.js +90 -0
  93. package/chunks/select-BZ0greL0.js +171 -0
  94. package/chunks/skeleton-OqKFBcmO.js +36 -0
  95. package/chunks/spinner-C3WiZYld.js +32 -0
  96. package/chunks/square-arrow-out-up-right-Bobm4VNc.js +17 -0
  97. package/chunks/table-BZ7VvZaq.js +150 -0
  98. package/chunks/tabs-eshGdQJJ.js +52 -0
  99. package/chunks/tag-CELJrUEQ.js +78 -0
  100. package/chunks/text-mAeDlv5N.js +23 -0
  101. package/chunks/textfield-CZSw2R67.js +112 -0
  102. package/chunks/time-field-DaQfnJQF.js +60 -0
  103. package/chunks/toast-AYzfHBcQ.js +91 -0
  104. package/chunks/toggle-button-DlPo9GJW.js +17 -0
  105. package/chunks/tooltip-BE_r_CBm.js +33 -0
  106. package/chunks/useLocalizedStringFormatter-bRLuRzVD.js +19 -0
  107. package/chunks/x-Bs_QW3q8.js +10 -0
  108. package/clear-button/index.js +2 -4
  109. package/color-scheme-switch/index.js +2 -4
  110. package/combobox/index.js +2 -4
  111. package/date-field/index.js +2 -9
  112. package/date-picker/index.js +2 -5
  113. package/field-error/index.js +2 -4
  114. package/file-list/index.js +2 -5
  115. package/file-upload/index.js +2 -5
  116. package/grid/index.js +2 -6
  117. package/heading/index.js +2 -4
  118. package/index.js +91 -165
  119. package/info-banner/index.js +2 -4
  120. package/label/index.js +2 -4
  121. package/layout/index.js +2 -8
  122. package/link/index.js +2 -6
  123. package/link-button/index.js +2 -6
  124. package/list-box/index.js +2 -13
  125. package/logo/index.js +2 -5
  126. package/menu/index.js +2 -10
  127. package/modal/index.js +2 -7
  128. package/package.json +1 -1
  129. package/popover/index.js +2 -4
  130. package/progress-bar/index.js +2 -4
  131. package/radio/index.js +2 -5
  132. package/search-field/index.js +2 -4
  133. package/select/index.js +2 -4
  134. package/skeleton/index.js +2 -4
  135. package/spinner/index.js +2 -4
  136. package/table/index.js +2 -9
  137. package/tabs/index.js +2 -7
  138. package/tag/index.js +2 -6
  139. package/text/index.js +2 -4
  140. package/textfield/index.js +2 -7
  141. package/time-field/index.js +2 -4
  142. package/toast/index.js +2 -10
  143. package/toggle-button/index.js +2 -5
  144. package/tooltip/index.js +2 -5
  145. package/assets/AccordionItem.css +0 -1
  146. package/assets/BadgeContainer.css +0 -1
  147. package/assets/Breadcrumb.css +0 -1
  148. package/assets/ButtonGroup.css +0 -1
  149. package/assets/CardHeader.css +0 -1
  150. package/assets/Checkbox.css +0 -1
  151. package/assets/ComboBox.css +0 -1
  152. package/assets/DateField.css +0 -1
  153. package/assets/DateInput.css +0 -1
  154. package/assets/DateRangePicker.css +0 -1
  155. package/assets/FieldError.css +0 -1
  156. package/assets/FileListItem.css +0 -1
  157. package/assets/GridItem.css +0 -1
  158. package/assets/InfoBanner.css +0 -1
  159. package/assets/Label.css +0 -1
  160. package/assets/Layout.css +0 -1
  161. package/assets/Link.css +0 -1
  162. package/assets/LinkButton.css +0 -1
  163. package/assets/ListBox.css +0 -1
  164. package/assets/ListBoxEmptyState.css +0 -1
  165. package/assets/Logo.css +0 -1
  166. package/assets/Modal.css +0 -1
  167. package/assets/Popover.css +0 -1
  168. package/assets/ProgressBar.css +0 -1
  169. package/assets/Radio.css +0 -1
  170. package/assets/RangeCalendar.css +0 -1
  171. package/assets/SearchField.css +0 -1
  172. package/assets/Select.css +0 -1
  173. package/assets/Separator.css +0 -1
  174. package/assets/Skeleton.css +0 -1
  175. package/assets/Spinner.css +0 -1
  176. package/assets/TabList.css +0 -1
  177. package/assets/Table.css +0 -1
  178. package/assets/TimeField.css +0 -1
  179. package/assets/Toast.css +0 -1
  180. package/assets/ToggleButtonGroup.css +0 -1
  181. package/assets/Tooltip.css +0 -1
  182. package/chunks/AccordionItem-DHhQDd6o.js +0 -129
  183. package/chunks/BadgeContainer-DyQDrY6S.js +0 -38
  184. package/chunks/Breadcrumb-Bs836gOn.js +0 -37
  185. package/chunks/Button-GCROAMSl.js +0 -56
  186. package/chunks/Button.module-byTN5rhp.js +0 -14
  187. package/chunks/ButtonGroup-Dr6HOBo2.js +0 -22
  188. package/chunks/CardHeader-BnwDMzW9.js +0 -184
  189. package/chunks/CharacterCounter-Dgnv-orm.js +0 -22
  190. package/chunks/Checkbox-CyamRrFD.js +0 -146
  191. package/chunks/CheckboxGroup-CmjQm14M.js +0 -84
  192. package/chunks/ClearButton-DkC8PIMi.js +0 -22
  193. package/chunks/ColorSchemeSwitch-CjXb7w5A.js +0 -118
  194. package/chunks/ComboBox-BCfucCKv.js +0 -102
  195. package/chunks/DateField-CpvZGNHu.js +0 -89
  196. package/chunks/DateInput-NzWcnB4y.js +0 -29
  197. package/chunks/DateInputDivider-BHAwPkIR.js +0 -13
  198. package/chunks/DateRangePicker-BBLNlQ2y.js +0 -202
  199. package/chunks/FeedbackStatusIcon-X9Bjgeta.js +0 -56
  200. package/chunks/FieldError-krpMBtie.js +0 -24
  201. package/chunks/FileListItem-CKF9HPjw.js +0 -69
  202. package/chunks/FileUpload-D6oyWcDA.js +0 -17
  203. package/chunks/Grid-C7aRFvmS.js +0 -24
  204. package/chunks/GridItem-DenBLGXB.js +0 -237
  205. package/chunks/Heading-nfcRc2QF.js +0 -38
  206. package/chunks/InfoBanner-CWLvkP6D.js +0 -76
  207. package/chunks/Label-Cqo7Xz2v.js +0 -67
  208. package/chunks/Layout-D-nVSBJY.js +0 -493
  209. package/chunks/Link-CSIZehbN.js +0 -59
  210. package/chunks/LinkButton-Dzp8ZAPs.js +0 -68
  211. package/chunks/ListBox-CJhp9Hsb.js +0 -60
  212. package/chunks/ListBoxEmptyState-BxWWr2D9.js +0 -30
  213. package/chunks/ListBoxHeader-Cl56gGEe.js +0 -63
  214. package/chunks/Logo-DDykn5b2.js +0 -150
  215. package/chunks/Modal-yigospxi.js +0 -78
  216. package/chunks/Popover-CjEPHe4A.js +0 -34
  217. package/chunks/ProgressBar-BrWLkY8H.js +0 -53
  218. package/chunks/Radio-CFolRKKY.js +0 -44
  219. package/chunks/RangeCalendar-DxLInTav.js +0 -99
  220. package/chunks/SearchField-BXIDm898.js +0 -121
  221. package/chunks/Select-BQ109AJG.js +0 -231
  222. package/chunks/Separator-CDRwpeHz.js +0 -76
  223. package/chunks/Skeleton-ClvqZoDy.js +0 -88
  224. package/chunks/Spinner-CfKMn18u.js +0 -43
  225. package/chunks/TabList-CJSnr6O0.js +0 -87
  226. package/chunks/Table-CDdv7GeG.js +0 -140
  227. package/chunks/TagGroup-C-pkXtVn.js +0 -119
  228. package/chunks/Text-D0r_W4lH.js +0 -36
  229. package/chunks/TextArea-CNP1Y3jR.js +0 -135
  230. package/chunks/TextField.module-BDIbEV87.js +0 -12
  231. package/chunks/TimeField-B3IdCqTf.js +0 -88
  232. package/chunks/Toast-BFq_0Ue4.js +0 -158
  233. package/chunks/ToggleButtonGroup-DRnEEi5-.js +0 -29
  234. package/chunks/Tooltip-BYEaNkZG.js +0 -44
  235. package/chunks/arrow-right-BVcFGZmy.js +0 -8
  236. package/chunks/check-Bt2UikoU.js +0 -5
  237. package/chunks/chevron-down-BBFYYzZq.js +0 -5
  238. package/chunks/chevron-right-DvXGOiS_.js +0 -5
  239. package/chunks/clsx-AexbMWKp.js +0 -24
  240. package/chunks/createLucideIcon-CP-mMPfa.js +0 -75
  241. package/chunks/info-N5jWZg2A.js +0 -9
  242. package/chunks/square-arrow-out-up-right-x_I6wdNi.js +0 -9
  243. package/chunks/useLocalizedStringFormatter-BHvsRxDk.js +0 -25
  244. package/chunks/x-B9bYxG31.js +0 -8
  245. /package/assets/{CharacterCounter.css → character-counter.css} +0 -0
  246. /package/assets/{Heading.css → heading.css} +0 -0
@@ -1,22 +0,0 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { c as a } from "./clsx-AexbMWKp.js";
3
- import '../assets/ButtonGroup.css';const n = "_buttonGroup_o1hqg_1", p = {
4
- buttonGroup: n
5
- }, b = ({
6
- children: o,
7
- className: t,
8
- "aria-label": r,
9
- ...u
10
- }) => /* @__PURE__ */ s(
11
- "div",
12
- {
13
- role: "group",
14
- "aria-label": r,
15
- className: a(p.buttonGroup, t),
16
- ...u,
17
- children: o
18
- }
19
- );
20
- export {
21
- b as B
22
- };
@@ -1,184 +0,0 @@
1
- import { jsx as c, jsxs as m } from "react/jsx-runtime";
2
- import { c as o } from "./clsx-AexbMWKp.js";
3
- import * as s from "react";
4
- import { H as u } from "./Heading-nfcRc2QF.js";
5
- import { Button as h, Link as z } from "react-aria-components";
6
- import { A as x } from "./arrow-right-BVcFGZmy.js";
7
- import { T as p } from "./Text-D0r_W4lH.js";
8
- import '../assets/CardHeader.css';const A = "_card_7i5z9_1", g = "_horizontal_7i5z9_12", v = "_cardLink_7i5z9_17", I = "_cardContent_7i5z9_28", N = "_cardActions_7i5z9_47", y = "_deprecated_7i5z9_61", k = "_cardActionArea_7i5z9_67", H = "_cardImage_7i5z9_100", L = "_cardLinkIcon_7i5z9_132", r = {
9
- card: A,
10
- horizontal: g,
11
- cardLink: v,
12
- cardContent: I,
13
- cardActions: N,
14
- deprecated: y,
15
- cardActionArea: k,
16
- cardImage: H,
17
- cardLinkIcon: L
18
- }, l = s.createContext({
19
- horizontal: void 0,
20
- titleId: void 0
21
- }), C = s.createContext(void 0), E = ({
22
- horizontal: t,
23
- className: a,
24
- children: e,
25
- ...n
26
- }) => {
27
- const i = `card-title-${s.useId()}`;
28
- return /* @__PURE__ */ c(l.Provider, { value: { horizontal: t, titleId: i }, children: /* @__PURE__ */ c(
29
- "div",
30
- {
31
- ...n,
32
- className: o(
33
- r.card,
34
- t && r.horizontal,
35
- a
36
- ),
37
- children: e
38
- }
39
- ) });
40
- }, F = ({
41
- children: t,
42
- ...a
43
- }) => {
44
- const { horizontal: e } = s.useContext(l);
45
- return /* @__PURE__ */ c(C.Provider, { value: {}, children: /* @__PURE__ */ c(
46
- "div",
47
- {
48
- ...a,
49
- className: o(r.cardContent, e && r.horizontal),
50
- children: t
51
- }
52
- ) });
53
- }, f = ({
54
- elementType: t = "h2",
55
- children: a,
56
- className: e,
57
- ...n
58
- }) => {
59
- const { horizontal: d, titleId: i } = s.useContext(l);
60
- return /* @__PURE__ */ c(
61
- u,
62
- {
63
- level: 3,
64
- elementType: t,
65
- className: o(
66
- e,
67
- r.cardTitle,
68
- d && r.horizontal
69
- ),
70
- id: i,
71
- ...n,
72
- children: a
73
- }
74
- );
75
- }, G = ({
76
- children: t,
77
- ...a
78
- }) => {
79
- const { horizontal: e } = s.useContext(l), n = !!s.useContext(C);
80
- return /* @__PURE__ */ c(
81
- "div",
82
- {
83
- ...a,
84
- className: o(
85
- r.cardActions,
86
- e && r.horizontal,
87
- n && r.deprecated
88
- ),
89
- children: t
90
- }
91
- );
92
- }, J = ({ children: t, className: a, ...e }) => {
93
- const { titleId: n } = s.useContext(l);
94
- return /* @__PURE__ */ c(
95
- h,
96
- {
97
- ...e,
98
- "aria-labelledby": n,
99
- className: o(r.cardActionArea, a),
100
- children: t
101
- }
102
- );
103
- }, K = ({
104
- as: t = "img",
105
- className: a,
106
- ...e
107
- }) => /* @__PURE__ */ c(
108
- t,
109
- {
110
- ...e,
111
- "data-card-image": !0,
112
- className: o(r.cardImage, a)
113
- }
114
- ), M = ({
115
- children: t,
116
- as: a,
117
- ...e
118
- }) => /* @__PURE__ */ m(
119
- a || z,
120
- {
121
- ...e,
122
- className: o(r.cardLink, e.className),
123
- children: [
124
- t,
125
- /* @__PURE__ */ c(
126
- x,
127
- {
128
- className: r.cardLinkIcon,
129
- size: 24
130
- }
131
- )
132
- ]
133
- }
134
- ), b = "_cardBody_337uy_1", B = {
135
- cardBody: b
136
- }, O = ({ className: t, ...a }) => /* @__PURE__ */ c(
137
- "div",
138
- {
139
- className: o(t, B.cardBody),
140
- ...a
141
- }
142
- ), T = "_cardHeader_1625c_1", $ = "_textContainer_1625c_14", j = "_subHeading_1625c_20", _ = {
143
- cardHeader: T,
144
- textContainer: $,
145
- subHeading: j
146
- }, Q = ({
147
- children: t,
148
- className: a,
149
- heading: e,
150
- headingLevel: n,
151
- subHeading: d,
152
- ...i
153
- }) => /* @__PURE__ */ m(
154
- "div",
155
- {
156
- className: o(a, _.cardHeader),
157
- ...i,
158
- children: [
159
- /* @__PURE__ */ m("div", { className: _.textContainer, children: [
160
- /* @__PURE__ */ c(f, { elementType: n, children: e }),
161
- d && /* @__PURE__ */ c(
162
- p,
163
- {
164
- slot: "description",
165
- className: _.subHeading,
166
- children: d
167
- }
168
- )
169
- ] }),
170
- t
171
- ]
172
- }
173
- );
174
- export {
175
- E as C,
176
- J as a,
177
- G as b,
178
- O as c,
179
- F as d,
180
- Q as e,
181
- K as f,
182
- M as g,
183
- f as h
184
- };
@@ -1,22 +0,0 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { forwardRef as i } from "react";
3
- import { useContextProps as d, InputContext as C } from "react-aria-components";
4
- import '../assets/CharacterCounter.css';const h = "_characterCounter_1cgvx_1", u = {
5
- characterCounter: h
6
- }, l = i((t, a) => {
7
- [t] = d(t, a, C);
8
- const { maxLength: e, value: n, isLonely: c } = t, { length: r } = n?.toString() ?? "", o = e !== void 0;
9
- return /* @__PURE__ */ s(
10
- "span",
11
- {
12
- className: u.characterCounter,
13
- "data-exceeded": o && r > e || void 0,
14
- "data-lonely": c || void 0,
15
- children: o ? `${r} / ${e}` : r
16
- }
17
- );
18
- });
19
- l.displayName = "CharacterCounter";
20
- export {
21
- l as C
22
- };
@@ -1,146 +0,0 @@
1
- import { jsxs as L, jsx as t } from "react/jsx-runtime";
2
- import S, { forwardRef as u, useContext as H, useRef as j } from "react";
3
- import { VisuallyHidden as D, mergeProps as h, useCheckboxGroupItem as M, useCheckbox as O, useHover as V, usePress as q, useFocusRing as w } from "react-aria";
4
- import { useContextProps as A, CheckboxContext as T, useSlottedContext as E, FormContext as J } from "react-aria-components";
5
- import { a as x } from "./clsx-AexbMWKp.js";
6
- import { variables as m } from "@midas-ds/theme";
7
- import { c as K } from "./createLucideIcon-CP-mMPfa.js";
8
- import { C as Q } from "./check-Bt2UikoU.js";
9
- import { useToggleState as U } from "@react-stately/toggle";
10
- import '../assets/Checkbox.css';const W = [["path", { d: "M5 12h14", key: "1ays0h" }]], X = K("minus", W), Y = S.createContext(null), Z = "_checkboxInner_v5u0z_1", $ = "_checkbox_v5u0z_1", ee = "_checkboxGroup_v5u0z_144", oe = "_checkboxList_v5u0z_155", v = {
11
- checkboxInner: Z,
12
- checkbox: $,
13
- checkboxGroup: ee,
14
- checkboxList: oe
15
- }, l = u(
16
- ({
17
- hoverResult: e,
18
- pressResult: o,
19
- focusRingAria: c,
20
- labelProps: i,
21
- slot: n,
22
- className: a,
23
- isSelected: r,
24
- isIndeterminate: s,
25
- isDisabled: d,
26
- isInvalid: C,
27
- isReadOnly: f,
28
- isRequired: _,
29
- inputProps: p,
30
- inputRef: I,
31
- children: R
32
- }, y) => {
33
- const { hoverProps: G, isHovered: P } = e, { pressProps: g, isPressed: N } = o, { isFocused: z, isFocusVisible: B, focusProps: F } = c;
34
- return /* @__PURE__ */ L(
35
- "label",
36
- {
37
- ref: y,
38
- ...h(G, g, i),
39
- slot: n || void 0,
40
- className: x(v.checkbox, a),
41
- "data-hovered": P || void 0,
42
- "data-selected": r || void 0,
43
- "data-indeterminate": s || void 0,
44
- "data-pressed": N || void 0,
45
- "data-disabled": d || void 0,
46
- "data-readonly": f || void 0,
47
- "data-invalid": C || void 0,
48
- "data-focused": z || void 0,
49
- "data-focus-visible": B || void 0,
50
- "data-required": _ || void 0,
51
- children: [
52
- /* @__PURE__ */ t("div", { className: x(v.checkboxInner), children: s ? /* @__PURE__ */ t(
53
- X,
54
- {
55
- size: 14,
56
- color: m.iconOnColor
57
- }
58
- ) : /* @__PURE__ */ t(
59
- Q,
60
- {
61
- size: 14,
62
- color: m.iconOnColor
63
- }
64
- ) }),
65
- /* @__PURE__ */ t(D, { children: /* @__PURE__ */ t(
66
- "input",
67
- {
68
- ...h(p, F),
69
- ref: I
70
- }
71
- ) }),
72
- R
73
- ]
74
- }
75
- );
76
- }
77
- );
78
- l.displayName = "CheckboxInner";
79
- const b = u((e, o) => {
80
- const c = M(
81
- {
82
- ...e,
83
- value: e.value || ""
84
- },
85
- e.state,
86
- e.inputRef
87
- );
88
- return /* @__PURE__ */ t(
89
- l,
90
- {
91
- ...e,
92
- ...c,
93
- ref: o
94
- }
95
- );
96
- });
97
- b.displayName = "CheckBoxGroupItem";
98
- const k = u((e, o) => {
99
- const c = O(e, U(e), e.inputRef);
100
- return /* @__PURE__ */ t(
101
- l,
102
- {
103
- ...e,
104
- ...c,
105
- ref: o
106
- }
107
- );
108
- });
109
- k.displayName = "SingleCheckbox";
110
- const te = u(
111
- (e, o) => {
112
- [e, o] = A(e, o, T);
113
- const c = E(J), i = e.validationBehavior ?? c?.validationBehavior ?? "native", n = H(Y), a = j(null), r = V(e), s = q({
114
- ref: o,
115
- isDisabled: e.isDisabled
116
- }), d = w();
117
- return n ? /* @__PURE__ */ t(
118
- b,
119
- {
120
- ...e,
121
- state: n,
122
- inputRef: a,
123
- hoverResult: r,
124
- pressResult: s,
125
- focusRingAria: d,
126
- validationBehavior: i
127
- }
128
- ) : /* @__PURE__ */ t(
129
- k,
130
- {
131
- ...e,
132
- inputRef: a,
133
- hoverResult: r,
134
- pressResult: s,
135
- focusRingAria: d,
136
- validationBehavior: i
137
- }
138
- );
139
- }
140
- );
141
- te.displayName = "Checkbox";
142
- export {
143
- te as C,
144
- Y as a,
145
- v as s
146
- };
@@ -1,84 +0,0 @@
1
- import { jsx as o, jsxs as h } from "react/jsx-runtime";
2
- import { useCheckboxGroup as C } from "react-aria";
3
- import { useCheckboxGroupState as v } from "react-stately";
4
- import { a as k, L as S } from "./Label-Cqo7Xz2v.js";
5
- import { T as y } from "./Text-D0r_W4lH.js";
6
- import * as r from "react";
7
- import { C as d, s as u, a as g } from "./Checkbox-CyamRrFD.js";
8
- import { FieldErrorContext as A } from "react-aria-components";
9
- import { F as P } from "./FieldError-krpMBtie.js";
10
- import { u as V } from "./useLocalizedStringFormatter-BHvsRxDk.js";
11
- const F = (e, { value: t }) => {
12
- const a = r.Children.toArray(e).filter(
13
- (l) => r.isValidElement(l) && l.type === d
14
- ), c = r.Children.count(a), n = r.Children.toArray(e).filter((l) => r.isValidElement(l)).filter((l) => !!l && l.type === d).map((l) => l.props.value || ""), s = t.length === 0, i = t.length === c;
15
- return {
16
- allSelected: i,
17
- someSelected: !s && !i,
18
- checkboxValues: n
19
- };
20
- }, b = ({ state: e, errorMessage: t }) => /* @__PURE__ */ o(A.Provider, { value: e.displayValidation, children: /* @__PURE__ */ o(P, { children: t }) }), G = { selectAll: "Select all" }, L = { selectAll: "Välj alla" }, E = {
21
- en: G,
22
- sv: L
23
- };
24
- function W(e) {
25
- const t = v(e), a = V(E), { groupProps: c, labelProps: n, descriptionProps: s } = C(
26
- e,
27
- t
28
- ), { allSelected: i, someSelected: m, checkboxValues: l } = F(
29
- e.children,
30
- t
31
- ), x = (f) => {
32
- t.setValue(f ? l : []);
33
- };
34
- return /* @__PURE__ */ h(
35
- "div",
36
- {
37
- ...c,
38
- className: u.checkboxGroup,
39
- "data-readonly": e.isReadOnly || void 0,
40
- "data-disabled": e.isDisabled || void 0,
41
- children: [
42
- /* @__PURE__ */ o(k, { popover: e.popover, children: e.label && /* @__PURE__ */ o(S, { ...n, children: e.label }) }),
43
- e.description && /* @__PURE__ */ o(
44
- y,
45
- {
46
- slot: "description",
47
- ...s,
48
- children: e.description
49
- }
50
- ),
51
- e.errorPosition === "top" && /* @__PURE__ */ o(
52
- b,
53
- {
54
- ...e,
55
- state: t
56
- }
57
- ),
58
- /* @__PURE__ */ h("div", { className: u.checkboxList, children: [
59
- e.showSelectAll && /* @__PURE__ */ o(
60
- d,
61
- {
62
- isSelected: i,
63
- isIndeterminate: m,
64
- isReadOnly: e.isReadOnly,
65
- onChange: x,
66
- children: e.selectAllLabel || a.format("selectAll")
67
- }
68
- ),
69
- /* @__PURE__ */ o(g.Provider, { value: t, children: e.children })
70
- ] }),
71
- e.errorPosition === "bottom" && /* @__PURE__ */ o(
72
- b,
73
- {
74
- ...e,
75
- state: t
76
- }
77
- )
78
- ]
79
- }
80
- );
81
- }
82
- export {
83
- W as C
84
- };
@@ -1,22 +0,0 @@
1
- 'use client';
2
- import { jsx as r } from "react/jsx-runtime";
3
- import { B as o } from "./Button-GCROAMSl.js";
4
- import { X as i } from "./x-B9bYxG31.js";
5
- const m = (t) => /* @__PURE__ */ r(
6
- o,
7
- {
8
- variant: "icon",
9
- slot: null,
10
- ...t,
11
- children: /* @__PURE__ */ r(
12
- i,
13
- {
14
- size: 20,
15
- "aria-hidden": !0
16
- }
17
- )
18
- }
19
- );
20
- export {
21
- m as C
22
- };
@@ -1,118 +0,0 @@
1
- 'use client';
2
- import { jsxs as s, jsx as e } from "react/jsx-runtime";
3
- import * as p from "react";
4
- import { VisuallyHidden as i } from "react-aria";
5
- import { SelectionIndicator as d } from "react-aria-components";
6
- import { a as M, T as m } from "./ToggleButtonGroup-DRnEEi5-.js";
7
- import { c as h } from "./createLucideIcon-CP-mMPfa.js";
8
- import { u as _ } from "./useLocalizedStringFormatter-BHvsRxDk.js";
9
- import '../assets/ColorSchemeSwitch.css';const v = [
10
- [
11
- "path",
12
- {
13
- d: "M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",
14
- key: "1pdavp"
15
- }
16
- ],
17
- ["path", { d: "M20.054 15.987H3.946", key: "14rxg9" }]
18
- ], N = h("laptop", v);
19
- const I = [
20
- [
21
- "path",
22
- {
23
- d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
24
- key: "kfwtm"
25
- }
26
- ]
27
- ], b = h("moon", I);
28
- const w = [
29
- ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
30
- ["path", { d: "M12 2v2", key: "tus03m" }],
31
- ["path", { d: "M12 20v2", key: "1lh1kg" }],
32
- ["path", { d: "m4.93 4.93 1.41 1.41", key: "149t6j" }],
33
- ["path", { d: "m17.66 17.66 1.41 1.41", key: "ptbguv" }],
34
- ["path", { d: "M2 12h2", key: "1t8f8n" }],
35
- ["path", { d: "M20 12h2", key: "1q8mjw" }],
36
- ["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
37
- ["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
38
- ], x = h("sun", w), j = "_button_1r8vq_1", C = "_selectionIndicator_1r8vq_14", o = {
39
- button: j,
40
- selectionIndicator: C
41
- }, L = { darkMode: "Dark Mode", lightMode: "Light Mode", system: "System Setting" }, q = { darkMode: "Mörkt läge", lightMode: "Ljust läge", system: "Systeminställning" }, z = {
42
- en: L,
43
- sv: q
44
- }, V = ({
45
- selector: c = ":root",
46
- defaultScheme: g = "light dark",
47
- scheme: a,
48
- onSchemeChange: y,
49
- defaultValue: u,
50
- className: k
51
- }) => {
52
- const [f, S] = p.useState(
53
- u ?? /* @__PURE__ */ new Set([a ?? g])
54
- ), r = a ? /* @__PURE__ */ new Set([a]) : f;
55
- p.useEffect(() => {
56
- const t = document.querySelector(c);
57
- if (t) {
58
- const n = Array.from(r).join(" ");
59
- t.style.removeProperty("color-scheme"), n === "light dark" ? delete t.dataset.colorScheme : t.dataset.colorScheme = n;
60
- } else
61
- console.warn(`No element found for selector: "${c}"`);
62
- }, [r, c]);
63
- const l = _(z);
64
- return /* @__PURE__ */ s(
65
- M,
66
- {
67
- selectionMode: "single",
68
- selectedKeys: r,
69
- onSelectionChange: (t) => {
70
- const n = Array.from(t)[0];
71
- S(t), y?.(n);
72
- },
73
- disallowEmptySelection: !0,
74
- className: k,
75
- children: [
76
- /* @__PURE__ */ s(
77
- m,
78
- {
79
- id: "light dark",
80
- className: o.button,
81
- children: [
82
- /* @__PURE__ */ e(N, {}),
83
- /* @__PURE__ */ e(i, { children: l.format("system") }),
84
- /* @__PURE__ */ e(d, { className: o.selectionIndicator })
85
- ]
86
- }
87
- ),
88
- /* @__PURE__ */ s(
89
- m,
90
- {
91
- id: "light",
92
- className: o.button,
93
- children: [
94
- /* @__PURE__ */ e(x, {}),
95
- /* @__PURE__ */ e(i, { children: l.format("lightMode") }),
96
- /* @__PURE__ */ e(d, { className: o.selectionIndicator })
97
- ]
98
- }
99
- ),
100
- /* @__PURE__ */ s(
101
- m,
102
- {
103
- id: "dark",
104
- className: o.button,
105
- children: [
106
- /* @__PURE__ */ e(b, {}),
107
- /* @__PURE__ */ e(i, { children: l.format("darkMode") }),
108
- /* @__PURE__ */ e(d, { className: o.selectionIndicator })
109
- ]
110
- }
111
- )
112
- ]
113
- }
114
- );
115
- };
116
- export {
117
- V as C
118
- };
@@ -1,102 +0,0 @@
1
- 'use client';
2
- import { jsxs as c, jsx as o } from "react/jsx-runtime";
3
- import { useRef as F } from "react";
4
- import { ComboBox as w, Input as v, Button as y } from "react-aria-components";
5
- import { c as e } from "./clsx-AexbMWKp.js";
6
- import { a as B, L as R } from "./Label-Cqo7Xz2v.js";
7
- import { T as C } from "./Text-D0r_W4lH.js";
8
- import { F as u } from "./FieldError-krpMBtie.js";
9
- import { L as N } from "./ListBox-CJhp9Hsb.js";
10
- import { a as g, L as E } from "./ListBoxEmptyState-BxWWr2D9.js";
11
- import { C as S } from "./chevron-down-BBFYYzZq.js";
12
- import { u as T } from "./useLocalizedStringFormatter-BHvsRxDk.js";
13
- import '../assets/ComboBox.css';const j = "_combobox_1uann_1", I = "_inputField_1uann_6", O = "_medium_1uann_28", P = "_wrap_1uann_80", U = "_button_1uann_85", z = "_icon_1uann_122", t = {
14
- combobox: j,
15
- inputField: I,
16
- medium: O,
17
- wrap: P,
18
- button: U,
19
- icon: z
20
- }, D = { showList: "Show list", noResultsFound: "No results found" }, V = { showList: "Visa lista", noResultsFound: "Inga träffar" }, W = {
21
- en: D,
22
- sv: V
23
- };
24
- function Z({
25
- label: i,
26
- description: r,
27
- errorMessage: s,
28
- children: p,
29
- items: f,
30
- className: h,
31
- errorPosition: a = "top",
32
- size: m = "large",
33
- popover: b,
34
- listBoxProps: _,
35
- ...n
36
- }) {
37
- const d = F(null), l = T(W), x = (L) => {
38
- L.currentTarget.value && d.current?.select();
39
- };
40
- return /* @__PURE__ */ c(
41
- w,
42
- {
43
- className: e(t.combobox, h),
44
- ...n,
45
- "data-readonly": n.isReadOnly || void 0,
46
- children: [
47
- /* @__PURE__ */ o(B, { popover: b, children: i && /* @__PURE__ */ o(R, { children: i }) }),
48
- r && /* @__PURE__ */ o(C, { slot: "description", children: r }),
49
- a === "top" && /* @__PURE__ */ o(u, { "data-testid": "fieldError", children: s }),
50
- /* @__PURE__ */ c("div", { className: t.wrap, children: [
51
- /* @__PURE__ */ o(
52
- v,
53
- {
54
- className: e(t.inputField, {
55
- [t.medium]: m === "medium"
56
- }),
57
- "data-readonly": n.isReadOnly || void 0,
58
- onPointerUp: x,
59
- ref: d
60
- }
61
- ),
62
- /* @__PURE__ */ o(
63
- y,
64
- {
65
- className: e(t.button, {
66
- [t.medium]: m === "medium"
67
- }),
68
- "aria-label": l.format("showList"),
69
- children: /* @__PURE__ */ o(
70
- "div",
71
- {
72
- className: t.icon,
73
- "aria-hidden": "true",
74
- children: /* @__PURE__ */ o(
75
- S,
76
- {
77
- size: 20,
78
- "aria-hidden": !0
79
- }
80
- )
81
- }
82
- )
83
- }
84
- )
85
- ] }),
86
- a === "bottom" && /* @__PURE__ */ o(u, { "data-testid": "fieldError", children: s }),
87
- /* @__PURE__ */ o(g, { offset: 4, children: /* @__PURE__ */ o(
88
- N,
89
- {
90
- items: f,
91
- renderEmptyState: () => /* @__PURE__ */ o(E, { children: l.format("noResultsFound") }),
92
- ..._,
93
- children: p
94
- }
95
- ) })
96
- ]
97
- }
98
- );
99
- }
100
- export {
101
- Z as C
102
- };