@midas-ds/components 1.0.2

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 (243) hide show
  1. package/Breadcrumbs.css +1 -0
  2. package/Button-CCevm2s3.js +183 -0
  3. package/Button.css +1 -0
  4. package/ButtonGroup.css +1 -0
  5. package/CHANGELOG.md +76 -0
  6. package/Card.css +1 -0
  7. package/Checkbox-CllWDBxF.js +405 -0
  8. package/Checkbox.css +1 -0
  9. package/Collection-B3xUVWPF.js +483 -0
  10. package/ComboBox.css +1 -0
  11. package/DatePicker.css +1 -0
  12. package/Dialog-CLTyYwkS.js +1889 -0
  13. package/DragAndDrop-OTN7La7U.js +42 -0
  14. package/Dropdown.css +1 -0
  15. package/FileUpload.css +1 -0
  16. package/Flex.css +1 -0
  17. package/Flex.module-CpoxBzQX.js +37 -0
  18. package/FocusScope-BR0SJ-cZ.js +512 -0
  19. package/Form-DXLoQL91.js +240 -0
  20. package/Grid.css +1 -0
  21. package/Grid.module-Ia0e9Dix.js +36 -0
  22. package/Group-DPMuN3h8.js +44 -0
  23. package/Hidden-BQWDvze4.js +37 -0
  24. package/InfoBanner.css +1 -0
  25. package/Label-C18A_4Z5.js +69 -0
  26. package/Layout.css +1 -0
  27. package/Link-BU1h3K2a.js +77 -0
  28. package/Link.css +1 -0
  29. package/LinkButton.css +1 -0
  30. package/ListBox-D21tdwTs.js +463 -0
  31. package/ListKeyboardDelegate-DxMjfMsI.js +172 -0
  32. package/Logo.css +1 -0
  33. package/Modal.css +1 -0
  34. package/MultiSelect.css +1 -0
  35. package/PressResponder-DP8ZDNGy.js +31 -0
  36. package/README.md +7 -0
  37. package/RSPContexts-EOiWkKOf.js +11 -0
  38. package/Radio.css +1 -0
  39. package/SearchField.css +1 -0
  40. package/Select.css +1 -0
  41. package/SelectionManager-D4WtKtey.js +988 -0
  42. package/Separator-DLUHK9vv.js +48 -0
  43. package/Spinner.css +1 -0
  44. package/Table.css +1 -0
  45. package/Tabs.css +1 -0
  46. package/Tag-CEd6WWSc.js +725 -0
  47. package/Tag.css +1 -0
  48. package/Text-DGLaY3HR.js +17 -0
  49. package/TextArea.css +1 -0
  50. package/TextField-C_hq9WeT.js +226 -0
  51. package/TextField.css +1 -0
  52. package/TextField.module-Cwq1FAm7.js +141 -0
  53. package/Toast.css +1 -0
  54. package/VisuallyHidden-B_XzVvlX.js +39 -0
  55. package/accordion/Accordion.d.ts +13 -0
  56. package/accordion/AccordionContent.d.ts +3 -0
  57. package/accordion/AccordionItem.d.ts +3 -0
  58. package/accordion/AccordionTagContext.d.ts +3 -0
  59. package/accordion/AccordionTrigger.d.ts +3 -0
  60. package/accordion/index.d.ts +5 -0
  61. package/breadcrumbs/Breadcrumbs.d.ts +9 -0
  62. package/breadcrumbs/index.d.ts +1 -0
  63. package/button/Button.d.ts +41 -0
  64. package/button/ButtonGroup.d.ts +12 -0
  65. package/button/index.d.ts +2 -0
  66. package/card/Card.d.ts +34 -0
  67. package/card/index.d.ts +1 -0
  68. package/checkbox/Checkbox.d.ts +2 -0
  69. package/checkbox/CheckboxGroup.d.ts +10 -0
  70. package/checkbox/index.d.ts +2 -0
  71. package/chevron-down-Cd1bkzXT.js +13 -0
  72. package/chevron-right-DBMc9VMi.js +23 -0
  73. package/clsx-OuTLNxxd.js +16 -0
  74. package/combobox/ComboBox.d.ts +12 -0
  75. package/combobox/index.d.ts +1 -0
  76. package/context-ScOIq_Gu.js +80 -0
  77. package/createLucideIcon-DeWljiyi.js +79 -0
  78. package/date-picker/DatePicker.d.ts +14 -0
  79. package/date-picker/index.d.ts +2 -0
  80. package/dropdown/Dropdown.d.ts +8 -0
  81. package/dropdown/index.d.ts +1 -0
  82. package/file-upload/FileUpload.d.ts +11 -0
  83. package/file-upload/index.d.ts +1 -0
  84. package/flex/Flex.d.ts +17 -0
  85. package/flex/FlexItem.d.ts +15 -0
  86. package/flex/index.d.ts +2 -0
  87. package/grid/Grid.d.ts +16 -0
  88. package/grid/GridItem.d.ts +7 -0
  89. package/grid/index.d.ts +2 -0
  90. package/index-CEg5vZQH.js +132 -0
  91. package/index-CgfokhRq.js +674 -0
  92. package/index-CorR1LBD.js +3122 -0
  93. package/index-Dl1Q-tbj.js +26984 -0
  94. package/index.css +1 -0
  95. package/index.d.ts +29 -0
  96. package/index.js +114 -0
  97. package/index10.js +4 -0
  98. package/index11.js +5 -0
  99. package/index12.js +4 -0
  100. package/index13.js +4 -0
  101. package/index14.js +4 -0
  102. package/index15.js +6 -0
  103. package/index16.js +6 -0
  104. package/index17.js +6 -0
  105. package/index18.js +4 -0
  106. package/index19.js +6 -0
  107. package/index2.js +8 -0
  108. package/index20.js +6 -0
  109. package/index21.js +4 -0
  110. package/index22.js +5 -0
  111. package/index23.js +5 -0
  112. package/index24.js +5 -0
  113. package/index25.js +6 -0
  114. package/index26.js +6 -0
  115. package/index27.js +6 -0
  116. package/index28.js +4 -0
  117. package/index29.js +12 -0
  118. package/index3.js +8 -0
  119. package/index30.js +20 -0
  120. package/index31.js +22 -0
  121. package/index32.js +14 -0
  122. package/index33.js +11 -0
  123. package/index34.js +31 -0
  124. package/index35.js +8 -0
  125. package/index36.js +9 -0
  126. package/index37.js +19 -0
  127. package/index38.js +9 -0
  128. package/index39.js +9 -0
  129. package/index4.js +4 -0
  130. package/index40.js +16 -0
  131. package/index41.js +16 -0
  132. package/index42.js +31 -0
  133. package/index43.js +16 -0
  134. package/index44.js +6 -0
  135. package/index45.js +53 -0
  136. package/index46.js +18 -0
  137. package/index47.js +27 -0
  138. package/index48.js +18 -0
  139. package/index49.js +21 -0
  140. package/index5.js +5 -0
  141. package/index50.js +49 -0
  142. package/index51.js +5 -0
  143. package/index52.js +25 -0
  144. package/index53.js +18 -0
  145. package/index54.js +9 -0
  146. package/index55.js +25 -0
  147. package/index56.js +18 -0
  148. package/index57.js +11 -0
  149. package/index58.js +12 -0
  150. package/index59.js +15 -0
  151. package/index6.js +4 -0
  152. package/index60.js +9 -0
  153. package/index61.js +9 -0
  154. package/index62.js +19 -0
  155. package/index63.js +22 -0
  156. package/index64.js +61 -0
  157. package/index65.js +15 -0
  158. package/index66.js +11 -0
  159. package/index67.js +63 -0
  160. package/index68.js +85 -0
  161. package/index69.js +74 -0
  162. package/index7.js +9 -0
  163. package/index70.js +24 -0
  164. package/index71.js +69 -0
  165. package/index72.js +80 -0
  166. package/index73.js +140 -0
  167. package/index74.js +70 -0
  168. package/index75.js +42 -0
  169. package/index76.js +82 -0
  170. package/index77.js +71 -0
  171. package/index78.js +104 -0
  172. package/index79.js +274 -0
  173. package/index8.js +4 -0
  174. package/index80.js +724 -0
  175. package/index81.js +491 -0
  176. package/index82.js +317 -0
  177. package/index83.js +391 -0
  178. package/index84.js +254 -0
  179. package/index85.js +1364 -0
  180. package/index86.js +1009 -0
  181. package/index87.js +388 -0
  182. package/index88.js +2105 -0
  183. package/index89.js +2371 -0
  184. package/index9.js +5 -0
  185. package/index90.js +6834 -0
  186. package/index91.js +17 -0
  187. package/index92.js +14 -0
  188. package/index93.js +6 -0
  189. package/index94.js +9 -0
  190. package/info-banner/InfoBanner.d.ts +21 -0
  191. package/info-banner/index.d.ts +1 -0
  192. package/intlStrings-Cd44R5hT.js +278 -0
  193. package/layout/Layout.d.ts +51 -0
  194. package/layout/index.d.ts +1 -0
  195. package/link/Link.d.ts +13 -0
  196. package/link/index.d.ts +1 -0
  197. package/link-button/LinkButton.d.ts +18 -0
  198. package/link-button/index.d.ts +1 -0
  199. package/logo/Logo.d.ts +16 -0
  200. package/logo/index.d.ts +1 -0
  201. package/modal/Modal.d.ts +13 -0
  202. package/modal/index.d.ts +1 -0
  203. package/multi-select/MultiSelect.d.ts +28 -0
  204. package/multi-select/index.d.ts +1 -0
  205. package/package.json +29 -0
  206. package/radio/Radio.d.ts +20 -0
  207. package/radio/index.d.ts +1 -0
  208. package/react.esm-D8HpDGKP.js +11060 -0
  209. package/search-field/SearchField.d.ts +13 -0
  210. package/search-field/index.d.ts +1 -0
  211. package/select/Select.d.ts +11 -0
  212. package/select/index.d.ts +1 -0
  213. package/spinner/Spinner.d.ts +11 -0
  214. package/spinner/index.d.ts +1 -0
  215. package/table/Table.d.ts +12 -0
  216. package/table/index.d.ts +1 -0
  217. package/tabs/Tabs.d.ts +12 -0
  218. package/tabs/index.d.ts +1 -0
  219. package/tag/Tag.d.ts +11 -0
  220. package/tag/index.d.ts +1 -0
  221. package/textarea/TextArea.d.ts +20 -0
  222. package/textarea/index.d.ts +1 -0
  223. package/textfield/TextField.d.ts +16 -0
  224. package/textfield/index.d.ts +3 -0
  225. package/theme/index.d.ts +138 -0
  226. package/theme/tokens.d.ts +135 -0
  227. package/toast/Toast.d.ts +25 -0
  228. package/toast/index.d.ts +1 -0
  229. package/tokens-CjXmpXTi.js +160 -0
  230. package/triangle-alert-1OYl9KWz.js +56 -0
  231. package/useControlledState-S_TYcV_c.js +45 -0
  232. package/useDescription-D4_zk_sA.js +32 -0
  233. package/useFilter-BnJDBCkt.js +35 -0
  234. package/useFocusRing-D97-G3fT.js +1324 -0
  235. package/useFocusable-C-N9wcwm.js +56 -0
  236. package/useGridSelectionCheckbox-i1rsjlC-.js +22 -0
  237. package/useHasTabbableChild-DeuCnGGv.js +34 -0
  238. package/useHighlightSelectionDescription-JVx2MW_e.js +552 -0
  239. package/useListState-DSOTbsL3.js +119 -0
  240. package/useLocalizedStringFormatter-DVCAZqcL.js +96 -0
  241. package/useSingleSelectListState-CmX9_L5H.js +34 -0
  242. package/useUpdateEffect-Dtz-i14F.js +12 -0
  243. package/x-JK7i-TQC.js +14 -0
package/index91.js ADDED
@@ -0,0 +1,17 @@
1
+ import { j as o, b as i, c as r, d as t, l as e, h as n, a as b, k as d, e as l, f, i as C, m as h, g as m, s as c } from "./tokens-CjXmpXTi.js";
2
+ export {
3
+ o as accessibility,
4
+ i as baseColors,
5
+ r as borderRadius,
6
+ t as borderWidths,
7
+ e as boxShadow,
8
+ n as breakpoints,
9
+ b as buttonColors,
10
+ d as font,
11
+ l as fontSizes,
12
+ f as fontWeights,
13
+ C as inputColor,
14
+ h as midasColors,
15
+ m as midasTransitions,
16
+ c as signalColors
17
+ };
package/index92.js ADDED
@@ -0,0 +1,14 @@
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import "./Form-DXLoQL91.js";
4
+ import "./TextField.module-Cwq1FAm7.js";
5
+ import "./Label-C18A_4Z5.js";
6
+ import "./Text-DGLaY3HR.js";
7
+ import { I as n, T as I, s as T } from "./TextField-C_hq9WeT.js";
8
+ import "./index69.js";
9
+ import "./clsx-OuTLNxxd.js";
10
+ export {
11
+ n as InputWrapper,
12
+ I as TextField,
13
+ T as ssnRegEx
14
+ };
package/index93.js ADDED
@@ -0,0 +1,6 @@
1
+ import "react/jsx-runtime";
2
+ import "./clsx-OuTLNxxd.js";
3
+ import { C as t } from "./Checkbox-CllWDBxF.js";
4
+ export {
5
+ t as Checkbox
6
+ };
package/index94.js ADDED
@@ -0,0 +1,9 @@
1
+ import "react/jsx-runtime";
2
+ import { T as i, a as T } from "./Tag-CEd6WWSc.js";
3
+ import "./index69.js";
4
+ import "./clsx-OuTLNxxd.js";
5
+ import "./x-JK7i-TQC.js";
6
+ export {
7
+ i as Tag,
8
+ T as TagGroup
9
+ };
@@ -0,0 +1,21 @@
1
+ import * as React from 'react';
2
+ export interface InfoBannerProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
3
+ /**
4
+ * Specify what state the InfoBanner represents
5
+ **/
6
+ type: 'success' | 'info' | 'important' | 'warning';
7
+ /** Specify the title */
8
+ title?: string;
9
+ /** Specify the message. Element or string */
10
+ message?: string | React.ReactNode;
11
+ /** Additional elements displayed inside the banner */
12
+ children?: React.ReactNode;
13
+ /**
14
+ * Specify if the InfoBanner should have a dismiss button in the top right corner
15
+ */
16
+ dismissable?: boolean;
17
+ }
18
+ /**
19
+ * Displays a static message as an inline banner
20
+ */
21
+ export declare const InfoBanner: React.FC<InfoBannerProps>;
@@ -0,0 +1 @@
1
+ export { InfoBanner } from './InfoBanner';
@@ -0,0 +1,278 @@
1
+ var e = {};
2
+ e = {
3
+ colorSwatchPicker: "تغييرات الألوان",
4
+ dropzoneLabel: "DropZone",
5
+ selectPlaceholder: "حدد عنصرًا",
6
+ tableResizer: "أداة تغيير الحجم"
7
+ };
8
+ var u = {};
9
+ u = {
10
+ colorSwatchPicker: "Цветови мостри",
11
+ dropzoneLabel: "DropZone",
12
+ selectPlaceholder: "Изберете предмет",
13
+ tableResizer: "Преоразмерител"
14
+ };
15
+ var r = {};
16
+ r = {
17
+ colorSwatchPicker: "Vzorky barev",
18
+ dropzoneLabel: "Místo pro přetažení",
19
+ selectPlaceholder: "Vyberte položku",
20
+ tableResizer: "Změna velikosti"
21
+ };
22
+ var o = {};
23
+ o = {
24
+ colorSwatchPicker: "Farveprøver",
25
+ dropzoneLabel: "DropZone",
26
+ selectPlaceholder: "Vælg et element",
27
+ tableResizer: "Størrelsesændring"
28
+ };
29
+ var a = {};
30
+ a = {
31
+ colorSwatchPicker: "Farbfelder",
32
+ dropzoneLabel: "Ablegebereich",
33
+ selectPlaceholder: "Element wählen",
34
+ tableResizer: "Größenanpassung"
35
+ };
36
+ var l = {};
37
+ l = {
38
+ colorSwatchPicker: "Χρωματικά δείγματα",
39
+ dropzoneLabel: "DropZone",
40
+ selectPlaceholder: "Επιλέξτε ένα αντικείμενο",
41
+ tableResizer: "Αλλαγή μεγέθους"
42
+ };
43
+ var c = {};
44
+ c = {
45
+ selectPlaceholder: "Select an item",
46
+ tableResizer: "Resizer",
47
+ dropzoneLabel: "DropZone",
48
+ colorSwatchPicker: "Color swatches"
49
+ };
50
+ var t = {};
51
+ t = {
52
+ colorSwatchPicker: "Muestras de colores",
53
+ dropzoneLabel: "DropZone",
54
+ selectPlaceholder: "Seleccionar un artículo",
55
+ tableResizer: "Cambiador de tamaño"
56
+ };
57
+ var s = {};
58
+ s = {
59
+ colorSwatchPicker: "Värvinäidised",
60
+ dropzoneLabel: "DropZone",
61
+ selectPlaceholder: "Valige üksus",
62
+ tableResizer: "Suuruse muutja"
63
+ };
64
+ var i = {};
65
+ i = {
66
+ colorSwatchPicker: "Värimallit",
67
+ dropzoneLabel: "DropZone",
68
+ selectPlaceholder: "Valitse kohde",
69
+ tableResizer: "Koon muuttaja"
70
+ };
71
+ var n = {};
72
+ n = {
73
+ colorSwatchPicker: "Échantillons de couleurs",
74
+ dropzoneLabel: "DropZone",
75
+ selectPlaceholder: "Sélectionner un élément",
76
+ tableResizer: "Redimensionneur"
77
+ };
78
+ var d = {};
79
+ d = {
80
+ colorSwatchPicker: "דוגמיות צבע",
81
+ dropzoneLabel: "DropZone",
82
+ selectPlaceholder: "בחר פריט",
83
+ tableResizer: "שינוי גודל"
84
+ };
85
+ var b = {};
86
+ b = {
87
+ colorSwatchPicker: "Uzorci boja",
88
+ dropzoneLabel: "Zona spuštanja",
89
+ selectPlaceholder: "Odaberite stavku",
90
+ tableResizer: "Promjena veličine"
91
+ };
92
+ var p = {};
93
+ p = {
94
+ colorSwatchPicker: "Színtárak",
95
+ dropzoneLabel: "DropZone",
96
+ selectPlaceholder: "Válasszon ki egy elemet",
97
+ tableResizer: "Átméretező"
98
+ };
99
+ var z = {};
100
+ z = {
101
+ colorSwatchPicker: "Campioni di colore",
102
+ dropzoneLabel: "Zona di rilascio",
103
+ selectPlaceholder: "Seleziona un elemento",
104
+ tableResizer: "Ridimensionamento"
105
+ };
106
+ var h = {};
107
+ h = {
108
+ colorSwatchPicker: "カラースウォッチ",
109
+ dropzoneLabel: "ドロップゾーン",
110
+ selectPlaceholder: "項目を選択",
111
+ tableResizer: "サイズ変更ツール"
112
+ };
113
+ var P = {};
114
+ P = {
115
+ colorSwatchPicker: "색상 견본",
116
+ dropzoneLabel: "드롭 영역",
117
+ selectPlaceholder: "항목 선택",
118
+ tableResizer: "크기 조정기"
119
+ };
120
+ var D = {};
121
+ D = {
122
+ colorSwatchPicker: "Spalvų pavyzdžiai",
123
+ dropzoneLabel: "„DropZone“",
124
+ selectPlaceholder: "Pasirinkite elementą",
125
+ tableResizer: "Dydžio keitiklis"
126
+ };
127
+ var x = {};
128
+ x = {
129
+ colorSwatchPicker: "Krāsu paraugi",
130
+ dropzoneLabel: "DropZone",
131
+ selectPlaceholder: "Izvēlēties vienumu",
132
+ tableResizer: "Izmēra mainītājs"
133
+ };
134
+ var $ = {};
135
+ $ = {
136
+ colorSwatchPicker: "Fargekart",
137
+ dropzoneLabel: "Droppsone",
138
+ selectPlaceholder: "Velg et element",
139
+ tableResizer: "Størrelsesendrer"
140
+ };
141
+ var B = {};
142
+ B = {
143
+ colorSwatchPicker: "kleurstalen",
144
+ dropzoneLabel: "DropZone",
145
+ selectPlaceholder: "Selecteer een item",
146
+ tableResizer: "Resizer"
147
+ };
148
+ var k = {};
149
+ k = {
150
+ colorSwatchPicker: "Próbki kolorów",
151
+ dropzoneLabel: "Strefa upuszczania",
152
+ selectPlaceholder: "Wybierz element",
153
+ tableResizer: "Zmiana rozmiaru"
154
+ };
155
+ var C = {};
156
+ C = {
157
+ colorSwatchPicker: "Amostras de cores",
158
+ dropzoneLabel: "DropZone",
159
+ selectPlaceholder: "Selecione um item",
160
+ tableResizer: "Redimensionador"
161
+ };
162
+ var S = {};
163
+ S = {
164
+ colorSwatchPicker: "Amostras de cores",
165
+ dropzoneLabel: "DropZone",
166
+ selectPlaceholder: "Selecione um item",
167
+ tableResizer: "Redimensionador"
168
+ };
169
+ var E = {};
170
+ E = {
171
+ colorSwatchPicker: "Specimene de culoare",
172
+ dropzoneLabel: "Zonă de plasare",
173
+ selectPlaceholder: "Selectați un element",
174
+ tableResizer: "Instrument de redimensionare"
175
+ };
176
+ var v = {};
177
+ v = {
178
+ colorSwatchPicker: "Цветовые образцы",
179
+ dropzoneLabel: "DropZone",
180
+ selectPlaceholder: "Выберите элемент",
181
+ tableResizer: "Средство изменения размера"
182
+ };
183
+ var R = {};
184
+ R = {
185
+ colorSwatchPicker: "Vzorkovníky farieb",
186
+ dropzoneLabel: "DropZone",
187
+ selectPlaceholder: "Vyberte položku",
188
+ tableResizer: "Nástroj na zmenu veľkosti"
189
+ };
190
+ var f = {};
191
+ f = {
192
+ colorSwatchPicker: "Barvne palete",
193
+ dropzoneLabel: "DropZone",
194
+ selectPlaceholder: "Izberite element",
195
+ tableResizer: "Spreminjanje velikosti"
196
+ };
197
+ var m = {};
198
+ m = {
199
+ colorSwatchPicker: "Uzorci boje",
200
+ dropzoneLabel: "DropZone",
201
+ selectPlaceholder: "Izaberite stavku",
202
+ tableResizer: "Promena veličine"
203
+ };
204
+ var A = {};
205
+ A = {
206
+ colorSwatchPicker: "Färgrutor",
207
+ dropzoneLabel: "DropZone",
208
+ selectPlaceholder: "Välj en artikel",
209
+ tableResizer: "Storleksändrare"
210
+ };
211
+ var L = {};
212
+ L = {
213
+ colorSwatchPicker: "Renk örnekleri",
214
+ dropzoneLabel: "Bırakma Bölgesi",
215
+ selectPlaceholder: "Bir öğe seçin",
216
+ tableResizer: "Yeniden boyutlandırıcı"
217
+ };
218
+ var w = {};
219
+ w = {
220
+ colorSwatchPicker: "Зразки кольорів",
221
+ dropzoneLabel: "DropZone",
222
+ selectPlaceholder: "Виберіть елемент",
223
+ tableResizer: "Засіб змінення розміру"
224
+ };
225
+ var F = {};
226
+ F = {
227
+ colorSwatchPicker: "颜色色板",
228
+ dropzoneLabel: "放置区域",
229
+ selectPlaceholder: "选择一个项目",
230
+ tableResizer: "尺寸调整器"
231
+ };
232
+ var Z = {};
233
+ Z = {
234
+ colorSwatchPicker: "色票",
235
+ dropzoneLabel: "放置區",
236
+ selectPlaceholder: "選取項目",
237
+ tableResizer: "大小調整器"
238
+ };
239
+ var V = {};
240
+ V = {
241
+ "ar-AE": e,
242
+ "bg-BG": u,
243
+ "cs-CZ": r,
244
+ "da-DK": o,
245
+ "de-DE": a,
246
+ "el-GR": l,
247
+ "en-US": c,
248
+ "es-ES": t,
249
+ "et-EE": s,
250
+ "fi-FI": i,
251
+ "fr-FR": n,
252
+ "he-IL": d,
253
+ "hr-HR": b,
254
+ "hu-HU": p,
255
+ "it-IT": z,
256
+ "ja-JP": h,
257
+ "ko-KR": P,
258
+ "lt-LT": D,
259
+ "lv-LV": x,
260
+ "nb-NO": $,
261
+ "nl-NL": B,
262
+ "pl-PL": k,
263
+ "pt-BR": C,
264
+ "pt-PT": S,
265
+ "ro-RO": E,
266
+ "ru-RU": v,
267
+ "sk-SK": R,
268
+ "sl-SI": f,
269
+ "sr-SP": m,
270
+ "sv-SE": A,
271
+ "tr-TR": L,
272
+ "uk-UA": w,
273
+ "zh-CN": F,
274
+ "zh-TW": Z
275
+ };
276
+ export {
277
+ V as $
278
+ };
@@ -0,0 +1,51 @@
1
+ import { LucideIcon } from 'lucide-react';
2
+ import { default as React } from 'react';
3
+ export interface SidebarLinkGroup {
4
+ title?: string;
5
+ items: SidebarLink[];
6
+ }
7
+ export interface SidebarLink {
8
+ title: string;
9
+ href: string;
10
+ icon: LucideIcon;
11
+ }
12
+ export interface SidebarUser {
13
+ name: string;
14
+ title: string;
15
+ }
16
+ type HEX = `#${string}`;
17
+ interface App {
18
+ name: string;
19
+ shortName: string;
20
+ color?: HEX;
21
+ }
22
+ export interface MidasLayout {
23
+ items: SidebarLinkGroup[];
24
+ title: string;
25
+ children: React.ReactNode;
26
+ headerChildren: React.ReactNode;
27
+ user: SidebarUser;
28
+ app: App;
29
+ clientSideRouter?: (path: string, routerOptions: undefined) => void;
30
+ }
31
+ export interface MidasHeader {
32
+ title: string;
33
+ headerChildren: React.ReactNode;
34
+ user: SidebarUser;
35
+ app: App;
36
+ isOpened?: boolean;
37
+ setIsOpened?: React.Dispatch<React.SetStateAction<boolean>>;
38
+ setIsCollapsed?: React.Dispatch<React.SetStateAction<boolean>>;
39
+ }
40
+ export interface MidasSidebar {
41
+ items: SidebarLinkGroup[];
42
+ app: App;
43
+ isOpened?: boolean;
44
+ isCollapsed: boolean;
45
+ setIsCollapsed: React.Dispatch<React.SetStateAction<boolean>>;
46
+ clientSideRouter?: (path: string, routerOptions: undefined) => void;
47
+ }
48
+ export declare const Layout: React.FC<MidasLayout>;
49
+ export declare const Sidebar: React.FC<MidasSidebar>;
50
+ export declare const Header: React.FC<MidasHeader>;
51
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Layout';
package/link/Link.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ import { RouterProvider } from 'react-aria-components';
2
+ import { LucideIcon } from 'lucide-react';
3
+ interface MidasLinkProps<C extends React.ElementType> {
4
+ children: React.ReactNode;
5
+ standalone?: boolean;
6
+ stretched?: boolean;
7
+ icon?: LucideIcon;
8
+ className?: string;
9
+ as?: C;
10
+ }
11
+ export type LinkProps<C extends React.ElementType> = MidasLinkProps<C> & Omit<React.ComponentProps<C>, keyof MidasLinkProps<C>>;
12
+ export declare const Link: <C extends React.ElementType = (props: import('react-aria-components').LinkProps & import('react').RefAttributes<HTMLAnchorElement>) => import('react').ReactElement | null>({ children, standalone, stretched, icon: IconComponent, className, as, ...rest }: LinkProps<C>) => import("react/jsx-runtime").JSX.Element;
13
+ export { RouterProvider };
@@ -0,0 +1 @@
1
+ export { Link, RouterProvider } from './Link';
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+ import { RouterProvider } from 'react-aria-components';
3
+ import { LucideIcon } from 'lucide-react';
4
+ interface MidasLinkProps<C extends React.ElementType> {
5
+ children: React.ReactNode;
6
+ variant?: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'icon';
7
+ fullwidth?: boolean;
8
+ iconPlacement?: 'left' | 'right';
9
+ icon?: LucideIcon; /**Optional icon prop */
10
+ className?: string;
11
+ as?: C;
12
+ }
13
+ export type LinkButtonProps<C extends React.ElementType> = MidasLinkProps<C> & Omit<React.ComponentProps<C>, keyof MidasLinkProps<C>>;
14
+ /**
15
+ * A link to be used when a user expects a button but web technologies force us to use a a-tag
16
+ * */
17
+ export declare const LinkButton: <C extends React.ElementType = (props: import('react-aria-components').LinkProps & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement | null>({ children, variant, fullwidth, icon: IconComponent, iconPlacement, className, as, ...rest }: LinkButtonProps<C>) => import("react/jsx-runtime").JSX.Element;
18
+ export { RouterProvider };
@@ -0,0 +1 @@
1
+ export * from './LinkButton';
package/logo/Logo.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ export interface LogoProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
3
+ /**
4
+ * Display logo in primary color, set to false for monochrome/dark version of the logo
5
+ */
6
+ primary?: boolean;
7
+ /**
8
+ * Specify logo size
9
+ */
10
+ size?: 'x-small' | 'small' | 'medium' | 'large';
11
+ /** Display background fill using selected primary or dark color */
12
+ background?: boolean;
13
+ /** There must be whitespace around the logo. By disabling our built in padding you must add at least an equal amount yourself. */
14
+ padding?: boolean;
15
+ }
16
+ export declare const Logo: React.FC<LogoProps>;
@@ -0,0 +1 @@
1
+ export { Logo } from './Logo';
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ interface MidasModal extends React.DetailedHTMLProps<React.DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement> {
3
+ /** Id for accessibility */
4
+ id: string;
5
+ /** Heading for the modal window */
6
+ title: string;
7
+ /** Whether the modal is open or not */
8
+ isOpen: boolean;
9
+ /** State handler to toggle isOpen */
10
+ onOpenChange: (isOpen: boolean) => void;
11
+ }
12
+ export declare const Modal: React.FC<MidasModal>;
13
+ export {};
@@ -0,0 +1 @@
1
+ export { Modal } from './Modal';
@@ -0,0 +1,28 @@
1
+ import { ValidationResult } from 'react-aria-components';
2
+ import { Key } from 'react-stately';
3
+ import * as React from 'react';
4
+ interface MidasMultiSelect {
5
+ /** Label for multiselect */
6
+ label: string;
7
+ /** Description for multiselect */
8
+ description?: string;
9
+ /** Array of items that will be included in the list */
10
+ items: {
11
+ name: string;
12
+ id: string;
13
+ }[];
14
+ /** Handler for when list of selected item is changed */
15
+ onSelectionChange?: (selectedKeys: Set<Key>) => void;
16
+ /** Control selected keys */
17
+ selectedKeys?: string[];
18
+ /** Set list of pre-selected keys, or 'all' */
19
+ defaultSelectedKeys?: string[] | 'all';
20
+ /** Set MultiSelect in disabled state */
21
+ isDisabled?: boolean;
22
+ /** Set MultiSelect in invalid state */
23
+ isInvalid?: boolean;
24
+ /** Set error message as string or as a validation function */
25
+ errorMessage?: string | ((validation: ValidationResult) => string) | undefined;
26
+ }
27
+ export declare const MultiSelect: React.FC<MidasMultiSelect>;
28
+ export {};
@@ -0,0 +1 @@
1
+ export { MultiSelect } from './MultiSelect';
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@midas-ds/components",
3
+ "author": {
4
+ "name": "Migrationsverket"
5
+ },
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "description": "Midas Components",
10
+ "license": "CC0-1.0",
11
+ "version": "1.0.2",
12
+ "main": "./index.js",
13
+ "types": "./index.d.ts",
14
+ "type": "module",
15
+ "files": [
16
+ "./"
17
+ ],
18
+ "sideEffects": [
19
+ "**/*.css"
20
+ ],
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/migrationsverket/midas"
24
+ },
25
+ "peerDependencies": {
26
+ "react": "^18.3.1",
27
+ "react-dom": "^18.3.1"
28
+ }
29
+ }
@@ -0,0 +1,20 @@
1
+ import { RadioGroupProps, ValidationResult, RadioProps } from 'react-aria-components';
2
+ import * as React from 'react';
3
+ interface MVDSRadioGroupProps extends Omit<RadioGroupProps, 'children'> {
4
+ children?: React.ReactNode;
5
+ /** Label for the RadioGroup */
6
+ label?: string;
7
+ /** Additional description rendered below the label */
8
+ description?: string;
9
+ /** String to display as error message or function to handle the result and produce the error message */
10
+ errorMessage?: string | ((validation: ValidationResult) => string);
11
+ }
12
+ /**
13
+ * RadioGroup is used to group several radio items together
14
+ */
15
+ export declare const RadioGroup: React.FC<MVDSRadioGroupProps>;
16
+ /**
17
+ * Radio item
18
+ * */
19
+ export declare const Radio: (props: RadioProps) => import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -0,0 +1 @@
1
+ export { Radio, RadioGroup } from './Radio';