@hashicorp/mds-react 0.9.3 → 0.9.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 (360) hide show
  1. package/components/accordion/index.js +9 -0
  2. package/components/accordion/index.js.map +1 -0
  3. package/components/accordion/item/button.js +44 -0
  4. package/components/accordion/item/button.js.map +1 -0
  5. package/components/accordion/item/index.js +59 -0
  6. package/components/accordion/item/index.js.map +1 -0
  7. package/components/accordion/style.module.scss.js +24 -0
  8. package/components/accordion/style.module.scss.js.map +1 -0
  9. package/components/alert/alert.module.scss.js +29 -0
  10. package/components/alert/alert.module.scss.js.map +1 -0
  11. package/components/alert/icon.js +34 -0
  12. package/components/alert/icon.js.map +1 -0
  13. package/components/alert/index.js +97 -0
  14. package/components/alert/index.js.map +1 -0
  15. package/components/badge/index.js +50 -0
  16. package/components/badge/index.js.map +1 -0
  17. package/components/badge/style.module.scss.js +22 -0
  18. package/components/badge/style.module.scss.js.map +1 -0
  19. package/components/badge-count/index.js +29 -0
  20. package/components/badge-count/index.js.map +1 -0
  21. package/components/badge-count/style.module.scss.js +15 -0
  22. package/components/badge-count/style.module.scss.js.map +1 -0
  23. package/components/breadcrumbs/index.js +38 -0
  24. package/components/breadcrumbs/index.js.map +1 -0
  25. package/components/breadcrumbs/item/index.js +32 -0
  26. package/components/breadcrumbs/item/index.js.map +1 -0
  27. package/components/breadcrumbs/style.module.scss.js +27 -0
  28. package/components/breadcrumbs/style.module.scss.js.map +1 -0
  29. package/components/breadcrumbs/truncation-button/index.js +25 -0
  30. package/components/breadcrumbs/truncation-button/index.js.map +1 -0
  31. package/components/button/index.d.ts +2 -1
  32. package/components/button/index.js +119 -0
  33. package/components/button/index.js.map +1 -0
  34. package/components/button/styles.module.scss.js +32 -0
  35. package/components/button/styles.module.scss.js.map +1 -0
  36. package/components/card/card-thumbnail/card-thumbnail.module.css.js +8 -0
  37. package/components/card/card-thumbnail/card-thumbnail.module.css.js.map +1 -0
  38. package/components/card/card-thumbnail/index.js +23 -0
  39. package/components/card/card-thumbnail/index.js.map +1 -0
  40. package/components/card/index.d.ts +2 -1
  41. package/components/card/index.js +160 -0
  42. package/components/card/index.js.map +1 -0
  43. package/components/card/styles.module.css.js +29 -0
  44. package/components/card/styles.module.css.js.map +1 -0
  45. package/components/card/types.d.ts +1 -0
  46. package/components/code-block/code-block.module.scss.js +34 -0
  47. package/components/code-block/code-block.module.scss.js.map +1 -0
  48. package/components/code-block/code-lines/index.js +59 -0
  49. package/components/code-block/code-lines/index.js.map +1 -0
  50. package/components/code-block/code-lines/utils/split-html-into-lines.js +19 -0
  51. package/components/code-block/code-lines/utils/split-html-into-lines.js.map +1 -0
  52. package/components/code-block/code-lines/utils/split-jsx-into-lines.js +31 -0
  53. package/components/code-block/code-lines/utils/split-jsx-into-lines.js.map +1 -0
  54. package/components/code-block/hidden-copy-content/index.js +13 -0
  55. package/components/code-block/hidden-copy-content/index.js.map +1 -0
  56. package/components/code-block/index.js +88 -0
  57. package/components/code-block/index.js.map +1 -0
  58. package/components/code-block/utils/parse-highlighted-lines.js +39 -0
  59. package/components/code-block/utils/parse-highlighted-lines.js.map +1 -0
  60. package/components/code-block/utils/process-snippet.js +20 -0
  61. package/components/code-block/utils/process-snippet.js.map +1 -0
  62. package/components/code-block/utils/shellwords.js +33 -0
  63. package/components/code-block/utils/shellwords.js.map +1 -0
  64. package/components/combo-box-primitive/index.js +302 -0
  65. package/components/combo-box-primitive/index.js.map +1 -0
  66. package/components/dialog-primitive/dialog.module.scss.js +12 -0
  67. package/components/dialog-primitive/dialog.module.scss.js.map +1 -0
  68. package/components/dialog-primitive/index.js +15 -0
  69. package/components/dialog-primitive/index.js.map +1 -0
  70. package/components/disclosure-primitive/index.js +57 -0
  71. package/components/disclosure-primitive/index.js.map +1 -0
  72. package/components/disclosure-primitive/styles.module.css.js +7 -0
  73. package/components/disclosure-primitive/styles.module.css.js.map +1 -0
  74. package/components/disclosure-primitive/use-disclosure-primitive.js +17 -0
  75. package/components/disclosure-primitive/use-disclosure-primitive.js.map +1 -0
  76. package/components/dismiss-button/index.js +22 -0
  77. package/components/dismiss-button/index.js.map +1 -0
  78. package/components/dismiss-button/styles.module.scss.js +7 -0
  79. package/components/dismiss-button/styles.module.scss.js.map +1 -0
  80. package/components/dropdown/index.js +79 -0
  81. package/components/dropdown/index.js.map +1 -0
  82. package/components/dropdown/list-item/custom.js +9 -0
  83. package/components/dropdown/list-item/custom.js.map +1 -0
  84. package/components/dropdown/list-item/index.js +14 -0
  85. package/components/dropdown/list-item/index.js.map +1 -0
  86. package/components/dropdown/list-item/interactive.js +49 -0
  87. package/components/dropdown/list-item/interactive.js.map +1 -0
  88. package/components/dropdown/list-item/separator.js +17 -0
  89. package/components/dropdown/list-item/separator.js.map +1 -0
  90. package/components/dropdown/list-item/styles.module.css.js +26 -0
  91. package/components/dropdown/list-item/styles.module.css.js.map +1 -0
  92. package/components/dropdown/list-item/title.js +9 -0
  93. package/components/dropdown/list-item/title.js.map +1 -0
  94. package/components/dropdown/styles.module.css.js +24 -0
  95. package/components/dropdown/styles.module.css.js.map +1 -0
  96. package/components/dropdown/toggle-button/index.js +54 -0
  97. package/components/dropdown/toggle-button/index.js.map +1 -0
  98. package/components/dropdown/toggle-button/styles.module.scss.js +14 -0
  99. package/components/dropdown/toggle-button/styles.module.scss.js.map +1 -0
  100. package/components/flight-icon/flight-icon.module.css.js +12 -0
  101. package/components/flight-icon/flight-icon.module.css.js.map +1 -0
  102. package/components/flight-icon/index.js +58 -0
  103. package/components/flight-icon/index.js.map +1 -0
  104. package/components/form/checkbox/form-checkbox.module.css.js +8 -0
  105. package/components/form/checkbox/form-checkbox.module.css.js.map +1 -0
  106. package/components/form/checkbox/index.js +109 -0
  107. package/components/form/checkbox/index.js.map +1 -0
  108. package/components/form/error/form-error.module.css.js +14 -0
  109. package/components/form/error/form-error.module.css.js.map +1 -0
  110. package/components/form/error/index.js +22 -0
  111. package/components/form/error/index.js.map +1 -0
  112. package/components/form/field/form-field.module.css.js +17 -0
  113. package/components/form/field/form-field.module.css.js.map +1 -0
  114. package/components/form/field/index.js +46 -0
  115. package/components/form/field/index.js.map +1 -0
  116. package/components/form/fieldset/form-fieldset.module.css.js +19 -0
  117. package/components/form/fieldset/form-fieldset.module.css.js.map +1 -0
  118. package/components/form/fieldset/index.js +65 -0
  119. package/components/form/fieldset/index.js.map +1 -0
  120. package/components/form/file-input/form-file-input.module.scss.js +7 -0
  121. package/components/form/file-input/form-file-input.module.scss.js.map +1 -0
  122. package/components/form/file-input/index.js +68 -0
  123. package/components/form/file-input/index.js.map +1 -0
  124. package/components/form/helper-text/form-helper-text.module.css.js +7 -0
  125. package/components/form/helper-text/form-helper-text.module.css.js.map +1 -0
  126. package/components/form/helper-text/index.js +22 -0
  127. package/components/form/helper-text/index.js.map +1 -0
  128. package/components/form/indicator/form-indicator.module.css.js +8 -0
  129. package/components/form/indicator/form-indicator.module.css.js.map +1 -0
  130. package/components/form/indicator/index.js +23 -0
  131. package/components/form/indicator/index.js.map +1 -0
  132. package/components/form/label/form-label.module.css.js +10 -0
  133. package/components/form/label/form-label.module.css.js.map +1 -0
  134. package/components/form/label/index.js +33 -0
  135. package/components/form/label/index.js.map +1 -0
  136. package/components/form/legend/form-legend.module.css.js +10 -0
  137. package/components/form/legend/form-legend.module.css.js.map +1 -0
  138. package/components/form/legend/index.js +19 -0
  139. package/components/form/legend/index.js.map +1 -0
  140. package/components/form/radio/form-radio.module.scss.js +8 -0
  141. package/components/form/radio/form-radio.module.scss.js.map +1 -0
  142. package/components/form/radio/index.js +100 -0
  143. package/components/form/radio/index.js.map +1 -0
  144. package/components/form/radio-card/description.js +10 -0
  145. package/components/form/radio-card/description.js.map +1 -0
  146. package/components/form/radio-card/form-radio-card.module.css.js +30 -0
  147. package/components/form/radio-card/form-radio-card.module.css.js.map +1 -0
  148. package/components/form/radio-card/group.js +31 -0
  149. package/components/form/radio-card/group.js.map +1 -0
  150. package/components/form/radio-card/index.js +67 -0
  151. package/components/form/radio-card/index.js.map +1 -0
  152. package/components/form/radio-card/label.js +10 -0
  153. package/components/form/radio-card/label.js.map +1 -0
  154. package/components/form/select/form-select.module.css.js +14 -0
  155. package/components/form/select/form-select.module.css.js.map +1 -0
  156. package/components/form/select/index.js +79 -0
  157. package/components/form/select/index.js.map +1 -0
  158. package/components/form/super-select/form-super-select.module.css.js +22 -0
  159. package/components/form/super-select/form-super-select.module.css.js.map +1 -0
  160. package/components/form/super-select/index.js +170 -0
  161. package/components/form/super-select/index.js.map +1 -0
  162. package/components/form/text-input/index.js +91 -0
  163. package/components/form/text-input/index.js.map +1 -0
  164. package/components/form/text-input/styles.module.css.js +15 -0
  165. package/components/form/text-input/styles.module.css.js.map +1 -0
  166. package/components/form/textarea/form-textarea.module.css.js +14 -0
  167. package/components/form/textarea/form-textarea.module.css.js.map +1 -0
  168. package/components/form/textarea/index.js +74 -0
  169. package/components/form/textarea/index.js.map +1 -0
  170. package/components/form/toggle/form-toggle.module.scss.js +12 -0
  171. package/components/form/toggle/form-toggle.module.scss.js.map +1 -0
  172. package/components/form/toggle/index.js +102 -0
  173. package/components/form/toggle/index.js.map +1 -0
  174. package/components/hds/wrappers/tooltip.js +51 -0
  175. package/components/hds/wrappers/tooltip.js.map +1 -0
  176. package/components/icon-tile/index.js +50 -0
  177. package/components/icon-tile/index.js.map +1 -0
  178. package/components/icon-tile/style.module.scss.js +29 -0
  179. package/components/icon-tile/style.module.scss.js.map +1 -0
  180. package/components/index.d.ts +1 -1
  181. package/components/index.js +116 -73
  182. package/components/index.js.map +1 -1
  183. package/components/inline-link/index.js +33 -0
  184. package/components/inline-link/index.js.map +1 -0
  185. package/components/inline-link/inline-link.module.css.js +11 -0
  186. package/components/inline-link/inline-link.module.css.js.map +1 -0
  187. package/components/interactive/index.js +59 -0
  188. package/components/interactive/index.js.map +1 -0
  189. package/components/legacy-button/index.js +65 -0
  190. package/components/legacy-button/index.js.map +1 -0
  191. package/components/legacy-button/utils.js +39 -0
  192. package/components/legacy-button/utils.js.map +1 -0
  193. package/components/menu-primitive/index.js +68 -0
  194. package/components/menu-primitive/index.js.map +1 -0
  195. package/components/menu-primitive/styles.module.css.js +12 -0
  196. package/components/menu-primitive/styles.module.css.js.map +1 -0
  197. package/components/menu-primitive/use-menu-primitive.js +17 -0
  198. package/components/menu-primitive/use-menu-primitive.js.map +1 -0
  199. package/components/modal/index.js +61 -0
  200. package/components/modal/index.js.map +1 -0
  201. package/components/modal/modal.module.css.js +8 -0
  202. package/components/modal/modal.module.css.js.map +1 -0
  203. package/components/modal/use-modal.js +17 -0
  204. package/components/modal/use-modal.js.map +1 -0
  205. package/components/separator/index.js +15 -0
  206. package/components/separator/index.js.map +1 -0
  207. package/components/separator/separator.module.css.js +10 -0
  208. package/components/separator/separator.module.css.js.map +1 -0
  209. package/components/standalone-link/index.js +54 -0
  210. package/components/standalone-link/index.js.map +1 -0
  211. package/components/standalone-link/styles.module.scss.js +17 -0
  212. package/components/standalone-link/styles.module.scss.js.map +1 -0
  213. package/components/table/index.js +52 -0
  214. package/components/table/index.js.map +1 -0
  215. package/components/table/table.module.scss.js +33 -0
  216. package/components/table/table.module.scss.js.map +1 -0
  217. package/components/table/td.js +28 -0
  218. package/components/table/td.js.map +1 -0
  219. package/components/table/th-button-tooltip.js +24 -0
  220. package/components/table/th-button-tooltip.js.map +1 -0
  221. package/components/table/th.js +43 -0
  222. package/components/table/th.js.map +1 -0
  223. package/components/table/tr.js +9 -0
  224. package/components/table/tr.js.map +1 -0
  225. package/components/table/utils.js +28 -0
  226. package/components/table/utils.js.map +1 -0
  227. package/components/tabs/index.js +117 -0
  228. package/components/tabs/index.js.map +1 -0
  229. package/components/tabs/tab-panel.js +35 -0
  230. package/components/tabs/tab-panel.js.map +1 -0
  231. package/components/tabs/tab.js +70 -0
  232. package/components/tabs/tab.js.map +1 -0
  233. package/components/tabs/tabs.module.scss.js +22 -0
  234. package/components/tabs/tabs.module.scss.js.map +1 -0
  235. package/components/tabs/use-tabs-context.js +16 -0
  236. package/components/tabs/use-tabs-context.js.map +1 -0
  237. package/components/text/index.js +112 -0
  238. package/components/text/index.js.map +1 -0
  239. package/components/text/style.module.scss.js +9 -0
  240. package/components/text/style.module.scss.js.map +1 -0
  241. package/components/visualizations/bar-chart/horizontal-chart/dataset-value/index.js +62 -0
  242. package/components/visualizations/bar-chart/horizontal-chart/dataset-value/index.js.map +1 -0
  243. package/components/visualizations/bar-chart/horizontal-chart/dataset-value/style.module.css.js +20 -0
  244. package/components/visualizations/bar-chart/horizontal-chart/dataset-value/style.module.css.js.map +1 -0
  245. package/components/visualizations/bar-chart/horizontal-chart/index.js +104 -0
  246. package/components/visualizations/bar-chart/horizontal-chart/index.js.map +1 -0
  247. package/components/visualizations/bar-chart/horizontal-chart/legend/index.js +13 -0
  248. package/components/visualizations/bar-chart/horizontal-chart/legend/index.js.map +1 -0
  249. package/components/visualizations/bar-chart/horizontal-chart/legend/style.module.css.js +14 -0
  250. package/components/visualizations/bar-chart/horizontal-chart/legend/style.module.css.js.map +1 -0
  251. package/components/visualizations/bar-chart/horizontal-chart/style.module.css.js +28 -0
  252. package/components/visualizations/bar-chart/horizontal-chart/style.module.css.js.map +1 -0
  253. package/components/visualizations/bar-chart/index.js +37 -0
  254. package/components/visualizations/bar-chart/index.js.map +1 -0
  255. package/components/visualizations/bar-chart/style.module.css.js +12 -0
  256. package/components/visualizations/bar-chart/style.module.css.js.map +1 -0
  257. package/components/visualizations/donut-chart/components/arc-tooltip/index.js +14 -0
  258. package/components/visualizations/donut-chart/components/arc-tooltip/index.js.map +1 -0
  259. package/components/visualizations/donut-chart/components/arc-tooltip/styles.module.css.js +10 -0
  260. package/components/visualizations/donut-chart/components/arc-tooltip/styles.module.css.js.map +1 -0
  261. package/components/visualizations/donut-chart/components/external-arc-label/index.js +58 -0
  262. package/components/visualizations/donut-chart/components/external-arc-label/index.js.map +1 -0
  263. package/components/visualizations/donut-chart/components/external-arc-label/styles.module.css.js +16 -0
  264. package/components/visualizations/donut-chart/components/external-arc-label/styles.module.css.js.map +1 -0
  265. package/components/visualizations/donut-chart/components/internal-arc-label/index.js +42 -0
  266. package/components/visualizations/donut-chart/components/internal-arc-label/index.js.map +1 -0
  267. package/components/visualizations/donut-chart/components/internal-arc-label/styles.module.css.js +14 -0
  268. package/components/visualizations/donut-chart/components/internal-arc-label/styles.module.css.js.map +1 -0
  269. package/components/visualizations/donut-chart/index.js +90 -0
  270. package/components/visualizations/donut-chart/index.js.map +1 -0
  271. package/components/visualizations/donut-chart/styles.module.css.js +20 -0
  272. package/components/visualizations/donut-chart/styles.module.css.js.map +1 -0
  273. package/hooks/use-media-query/index.js +16 -0
  274. package/hooks/use-media-query/index.js.map +1 -0
  275. package/index.js +155 -101
  276. package/index.js.map +1 -1
  277. package/package.json +1 -1
  278. package/patterns/card/newsroom-card/index.js +26 -0
  279. package/patterns/card/newsroom-card/index.js.map +1 -0
  280. package/patterns/card/newsroom-card/style.module.css.js +8 -0
  281. package/patterns/card/newsroom-card/style.module.css.js.map +1 -0
  282. package/patterns/card/partner-card/index.js +42 -0
  283. package/patterns/card/partner-card/index.js.map +1 -0
  284. package/patterns/card/partner-card/style.module.css.js +12 -0
  285. package/patterns/card/partner-card/style.module.css.js.map +1 -0
  286. package/patterns/card/person-card/index.js +52 -0
  287. package/patterns/card/person-card/index.js.map +1 -0
  288. package/patterns/card/person-card/style.module.css.js +12 -0
  289. package/patterns/card/person-card/style.module.css.js.map +1 -0
  290. package/patterns/card/primitives.js +77 -0
  291. package/patterns/card/primitives.js.map +1 -0
  292. package/patterns/card/promo-card/index.js +36 -0
  293. package/patterns/card/promo-card/index.js.map +1 -0
  294. package/patterns/card/resource-card/index.js +26 -0
  295. package/patterns/card/resource-card/index.js.map +1 -0
  296. package/patterns/card/style.module.css.js +30 -0
  297. package/patterns/card/style.module.css.js.map +1 -0
  298. package/patterns/card/thumbnails/index.js +25 -0
  299. package/patterns/card/thumbnails/index.js.map +1 -0
  300. package/patterns/card/unified-card/index.js +37 -0
  301. package/patterns/card/unified-card/index.js.map +1 -0
  302. package/patterns/copy-button/clipboard.js +78 -0
  303. package/patterns/copy-button/clipboard.js.map +1 -0
  304. package/patterns/copy-button/index.js +57 -0
  305. package/patterns/copy-button/index.js.map +1 -0
  306. package/patterns/copy-button/style.module.css.js +13 -0
  307. package/patterns/copy-button/style.module.css.js.map +1 -0
  308. package/patterns/index.js +32 -22
  309. package/patterns/index.js.map +1 -1
  310. package/patterns/layout/index.js +47 -0
  311. package/patterns/layout/index.js.map +1 -0
  312. package/patterns/layout/layout.module.css.js +20 -0
  313. package/patterns/layout/layout.module.css.js.map +1 -0
  314. package/patterns/product-badge/index.js +22 -0
  315. package/patterns/product-badge/index.js.map +1 -0
  316. package/patterns/product-badge/style.module.css.js +8 -0
  317. package/patterns/product-badge/style.module.css.js.map +1 -0
  318. package/patterns/product-logo/index.js +130 -0
  319. package/patterns/product-logo/index.js.map +1 -0
  320. package/patterns/product-logo/product-logo.module.css.js +13 -0
  321. package/patterns/product-logo/product-logo.module.css.js.map +1 -0
  322. package/patterns/related-content/index.js +65 -0
  323. package/patterns/related-content/index.js.map +1 -0
  324. package/patterns/related-content/style.module.css.js +22 -0
  325. package/patterns/related-content/style.module.css.js.map +1 -0
  326. package/style.css +1 -1
  327. package/utils/get-contrast-yiq.js +13 -0
  328. package/utils/get-contrast-yiq.js.map +1 -0
  329. package/utils/hooks/use-screen-size.js +10 -0
  330. package/utils/hooks/use-screen-size.js.map +1 -0
  331. package/utils/i18n/constants/index.js +98 -0
  332. package/utils/i18n/constants/index.js.map +1 -0
  333. package/utils/i18n/helpers/locale-provider.js +9 -0
  334. package/utils/i18n/helpers/locale-provider.js.map +1 -0
  335. package/utils/i18n/helpers/to-smart-sentence-case.js +12 -0
  336. package/utils/i18n/helpers/to-smart-sentence-case.js.map +1 -0
  337. package/utils/i18n/helpers/to-smart-title-case.js +10 -0
  338. package/utils/i18n/helpers/to-smart-title-case.js.map +1 -0
  339. package/utils/i18n/helpers/use-locale.js +14 -0
  340. package/utils/i18n/helpers/use-locale.js.map +1 -0
  341. package/utils/i18n/index.js +41 -0
  342. package/utils/i18n/index.js.map +1 -0
  343. package/utils/i18n/index2.js +33 -0
  344. package/utils/i18n/index2.js.map +1 -0
  345. package/utils/index.js +7 -7
  346. package/utils/make-normalizer/index.js +34 -0
  347. package/utils/make-normalizer/index.js.map +1 -0
  348. package/{index-DBjAbGt7.js → utils/mds-context/index.js} +20 -19
  349. package/utils/mds-context/index.js.map +1 -0
  350. package/index-B9mPJh9w.js +0 -579
  351. package/index-B9mPJh9w.js.map +0 -1
  352. package/index-BHBlMMNF.js +0 -16
  353. package/index-BHBlMMNF.js.map +0 -1
  354. package/index-C4GBbW3N.js +0 -3567
  355. package/index-C4GBbW3N.js.map +0 -1
  356. package/index-DBjAbGt7.js.map +0 -1
  357. package/index-WkGIywHj.js +0 -767
  358. package/index-WkGIywHj.js.map +0 -1
  359. package/use-screen-size-BOnkX_K-.js +0 -9
  360. package/use-screen-size-BOnkX_K-.js.map +0 -1
@@ -0,0 +1,9 @@
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import s from "classnames";
3
+ import i from "./style.module.scss.js";
4
+ const a = ({ children: o, className: r, ...c }) => /* @__PURE__ */ m("div", { className: s(i.accordion, r), ...c, children: o });
5
+ a.displayName = "Accordion";
6
+ export {
7
+ a as Accordion
8
+ };
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/accordion/index.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react'\nimport classNames from 'classnames'\nimport s from './style.module.scss'\n\ninterface AccordionProps extends HTMLAttributes<HTMLDivElement> {\n\t/**\n\t * optional class name to add to the accordion\n\t */\n\tclassName?: string\n}\n\nconst Accordion = ({ children, className, ...rest }: AccordionProps) => {\n\treturn (\n\t\t<div className={classNames(s.accordion, className)} {...rest}>\n\t\t\t{children}\n\t\t</div>\n\t)\n}\n\nAccordion.displayName = 'Accordion'\n\nexport { Accordion }\nexport type { AccordionProps }\nexport { AccordionContent, AccordionItem, AccordionToggle } from './item'\n"],"names":["Accordion","children","className","rest","jsx","classNames","s"],"mappings":";;;AAWA,MAAMA,IAAY,CAAC,EAAE,UAAAC,GAAU,WAAAC,GAAW,GAAGC,QAE3C,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAWC,EAAE,WAAWJ,CAAS,GAAI,GAAGC,GACtD,UAAAF,EAAA,CACF;AAIFD,EAAU,cAAc;"}
@@ -0,0 +1,44 @@
1
+ "use client";
2
+ import { jsx as i } from "react/jsx-runtime";
3
+ import a from "classnames";
4
+ import { FlightIcon as u } from "../../flight-icon/index.js";
5
+ import { useDisclosurePrimitive as d } from "../../disclosure-primitive/use-disclosure-primitive.js";
6
+ import t from "../style.module.scss.js";
7
+ const C = ({ anchorId: n, updateUrl: r }) => {
8
+ const {
9
+ onClickToggle: c,
10
+ isOpen: e,
11
+ contentId: s,
12
+ containsInteractive: o,
13
+ ariaLabel: l
14
+ } = d(), m = (p) => {
15
+ c(p), !(!r || !n) && (e ? history.replaceState(null, "", window.location.pathname) : history.replaceState(null, "", `#${n}`));
16
+ };
17
+ return /* @__PURE__ */ i(
18
+ "button",
19
+ {
20
+ type: "button",
21
+ className: a(t.button, {
22
+ [t["parent-contains-interactive"]]: o,
23
+ [t["parent-does-not-contain-interactive"]]: !o
24
+ }),
25
+ onClick: m,
26
+ "aria-controls": s,
27
+ "aria-expanded": e,
28
+ "aria-label": l,
29
+ children: /* @__PURE__ */ i(
30
+ u,
31
+ {
32
+ name: "chevron-down",
33
+ size: 24,
34
+ isInlineBlock: !1,
35
+ className: a(t.icon, { [t["icon-rotate"]]: e })
36
+ }
37
+ )
38
+ }
39
+ );
40
+ };
41
+ export {
42
+ C as AccordionButton
43
+ };
44
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.js","sources":["../../../../src/components/accordion/item/button.tsx"],"sourcesContent":["'use client'\n\nimport classNames from 'classnames'\nimport { FlightIcon } from '../../flight-icon'\nimport { useDisclosurePrimitive } from '../../disclosure-primitive/use-disclosure-primitive'\nimport s from '../style.module.scss'\nimport type { MouseEventHandler } from 'react'\n\ninterface AccordionButtonProps {\n\tanchorId?: string\n\tupdateUrl?: boolean\n}\n\nconst AccordionButton = ({ anchorId, updateUrl }: AccordionButtonProps) => {\n\tconst {\n\t\tonClickToggle,\n\t\tisOpen,\n\t\tcontentId,\n\t\tcontainsInteractive: parentContainsInteractive,\n\t\tariaLabel,\n\t} = useDisclosurePrimitive()\n\n\tconst handleClick: MouseEventHandler<HTMLButtonElement> = (e) => {\n\t\tonClickToggle(e)\n\n\t\tif (!updateUrl || !anchorId) return\n\n\t\tif (!isOpen) {\n\t\t\thistory.replaceState(null, '', `#${anchorId}`)\n\t\t} else {\n\t\t\thistory.replaceState(null, '', window.location.pathname)\n\t\t}\n\t}\n\n\treturn (\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tclassName={classNames(s['button'], {\n\t\t\t\t[s['parent-contains-interactive']]: parentContainsInteractive,\n\t\t\t\t[s['parent-does-not-contain-interactive']]: !parentContainsInteractive,\n\t\t\t})}\n\t\t\tonClick={handleClick}\n\t\t\taria-controls={contentId}\n\t\t\taria-expanded={isOpen}\n\t\t\taria-label={ariaLabel}\n\t\t>\n\t\t\t<FlightIcon\n\t\t\t\tname=\"chevron-down\"\n\t\t\t\tsize={24}\n\t\t\t\tisInlineBlock={false}\n\t\t\t\tclassName={classNames(s.icon, { [s['icon-rotate']]: isOpen })}\n\t\t\t/>\n\t\t</button>\n\t)\n}\n\nexport { AccordionButton }\n"],"names":["AccordionButton","anchorId","updateUrl","onClickToggle","isOpen","contentId","parentContainsInteractive","useDisclosurePrimitive","handleClick","e","jsx","classNames","s","FlightIcon"],"mappings":";;;;;;AAcC,MAAAA,IAAM,CAAA,EAAA,UAAAC,GAAA,WAAAC,EAAA,MAAA;AAAA,QACL;AAAA,IACA,eAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,qBAAAC;AAAA;EAGD,IAAAC,EAAiE,GAChEC,IAAe,CAAAC,MAAA;AAIf,IAFAN,EAAKM,CAAA,GAED,GAACP,KAAQ,CAAAD,OACZG,IAGD,QAAA,aAAA,MAAA,IAAA,OAAA,SAAA,QAAA,IAFA,QAAO,aAAA,MAAA,IAAA,IAAAH,CAAA,EAAA;AAAA,EAKR;AACC,SAAC,gBAAAS;AAAA,IAAA;AAAA,IAAA;AAAA,MAEA,MAAA;AAAA,MAAmC,WAC/BC,EAAAC,EAAA,QAA8B;AAAA,QACjC,CAACA,EAAE,6BAAA,CAAA,GAAAN;AAAA,QACH,CAAAM,EAAA,qCAAA,CAAA,GAAA,CAAAN;AAAA,MACD,CAAA;AAAA,MACA,SAAAE;AAAA,MACA,iBAAeH;AAAA,MACf,iBAAYD;AAAA,MAEZ;MAAA,UAAC,gBAAAM;AAAA,QAAAG;AAAA,QAAA;AAAA,UAEA,MAAM;AAAA,UACN,MAAA;AAAA,UACA,eAAW;AAAA,UAAiD,WAAAF,EAAAC,EAAA,MAAA,EAAA,CAAAA,EAAA,aAAA,CAAA,GAAAR,EAAA,CAAA;AAAA,QAAA;AAAA,MAC7D;AAAA,IACD;AAAA,EAEF;;"}
@@ -0,0 +1,59 @@
1
+ "use client";
2
+ import { jsx as e, jsxs as d } from "react/jsx-runtime";
3
+ import c from "classnames";
4
+ import { DisclosurePrimitive as n } from "../../disclosure-primitive/index.js";
5
+ import { useDisclosurePrimitive as a } from "../../disclosure-primitive/use-disclosure-primitive.js";
6
+ import { AccordionButton as l } from "./button.js";
7
+ import r from "../style.module.scss.js";
8
+ import { Text as p } from "../../text/index.js";
9
+ const g = ({
10
+ children: t,
11
+ containsInteractive: o,
12
+ isOpen: i,
13
+ ariaLabel: s = "Toggle display",
14
+ ...m
15
+ }) => /* @__PURE__ */ e(
16
+ n.Provider,
17
+ {
18
+ className: c(r.item, {
19
+ [r["contains-interactive"]]: o,
20
+ [r["does-not-contain-interactive"]]: !o
21
+ }),
22
+ trackedIsOpen: i,
23
+ containsInteractive: o,
24
+ ariaLabel: s,
25
+ ...m,
26
+ children: t
27
+ }
28
+ );
29
+ g.displayName = "AccordionItem";
30
+ const y = ({
31
+ children: t,
32
+ anchorId: o,
33
+ updateUrl: i
34
+ }) => /* @__PURE__ */ d("div", { className: r.toggle, children: [
35
+ /* @__PURE__ */ e(l, { anchorId: o ?? "", updateUrl: i }),
36
+ /* @__PURE__ */ e("div", { className: c(r["toggle-content"]), children: /* @__PURE__ */ e(p.Body, { weight: "semibold", children: t }) })
37
+ ] });
38
+ y.displayName = "AccordionToggle";
39
+ const u = ({ children: t }) => {
40
+ const { contentId: o } = a();
41
+ return /* @__PURE__ */ e(n.Content, { children: /* @__PURE__ */ e(
42
+ "div",
43
+ {
44
+ className: c(
45
+ r.content,
46
+ "mds-typography-legacy-body-200 mds-foreground-primary"
47
+ ),
48
+ id: o,
49
+ children: t
50
+ }
51
+ ) });
52
+ };
53
+ u.displayName = "AccordionContent";
54
+ export {
55
+ u as AccordionContent,
56
+ g as AccordionItem,
57
+ y as AccordionToggle
58
+ };
59
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/accordion/item/index.tsx"],"sourcesContent":["'use client'\n\nimport classNames from 'classnames'\nimport { DisclosurePrimitive } from '../../disclosure-primitive'\nimport { useDisclosurePrimitive } from '../../disclosure-primitive/use-disclosure-primitive'\nimport type { HTMLAttributes } from 'react'\nimport { AccordionButton } from './button'\nimport s from '../style.module.scss'\nimport { Text } from '../../text'\n\ninterface AccordionItemProps extends HTMLAttributes<HTMLDivElement> {\n\tariaLabel?: string\n\tisOpen?: boolean\n\tcontainsInteractive?: boolean\n}\n\nconst AccordionItem = ({\n\tchildren,\n\tcontainsInteractive,\n\tisOpen,\n\tariaLabel = 'Toggle display',\n\t...rest\n}: AccordionItemProps) => {\n\treturn (\n\t\t<DisclosurePrimitive.Provider\n\t\t\tclassName={classNames(s.item, {\n\t\t\t\t[s['contains-interactive']]: containsInteractive,\n\t\t\t\t[s['does-not-contain-interactive']]: !containsInteractive,\n\t\t\t})}\n\t\t\ttrackedIsOpen={isOpen}\n\t\t\tcontainsInteractive={containsInteractive}\n\t\t\tariaLabel={ariaLabel}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</DisclosurePrimitive.Provider>\n\t)\n}\n\nAccordionItem.displayName = 'AccordionItem'\n\ninterface AccordionToggleProps {\n\tchildren: React.ReactNode\n\tanchorId?: string\n\tupdateUrl?: boolean\n}\nconst AccordionToggle = ({\n\tchildren,\n\tanchorId,\n\tupdateUrl,\n}: AccordionToggleProps) => {\n\treturn (\n\t\t<div className={s.toggle}>\n\t\t\t<AccordionButton anchorId={anchorId ?? ''} updateUrl={updateUrl} />\n\t\t\t<div className={classNames(s['toggle-content'])}>\n\t\t\t\t<Text.Body weight=\"semibold\">{children}</Text.Body>\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n\nAccordionToggle.displayName = 'AccordionToggle'\n\nconst AccordionContent = ({ children }: React.PropsWithChildren) => {\n\tconst { contentId } = useDisclosurePrimitive()\n\n\treturn (\n\t\t<DisclosurePrimitive.Content>\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\ts['content'],\n\t\t\t\t\t'mds-typography-legacy-body-200 mds-foreground-primary'\n\t\t\t\t)}\n\t\t\t\tid={contentId}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</DisclosurePrimitive.Content>\n\t)\n}\n\nAccordionContent.displayName = 'AccordionContent'\n\nexport { AccordionItem, AccordionToggle, AccordionContent }\n"],"names":["AccordionItem","children","containsInteractive","isOpen","ariaLabel","rest","jsx","DisclosurePrimitive","classNames","s","AccordionToggle","anchorId","updateUrl","jsxs","AccordionButton","Text","contentId","useDisclosurePrimitive"],"mappings":";;;;;;;;AAgBuB,MACtBA,IAAA,CAAA;AAAA,EACA,UAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC,IAAG;AAAA,EACJ,GAAAC;AACC,MACsB,gBAAAC;AAAA,EAApBC,EAAA;AAAA,EAAA;AAAA,IAC8B,WAC1BC,EAAAC,EAAA;MACH,CAACA,EAAE,sBAAA,CAAA,GAAAP;AAAA,MACH,CAAAO,EAAA,8BAAA,CAAA,GAAA,CAAAP;AAAA,IACD,CAAA;AAAA,IACA,eAAAC;AAAA,IACA,qBAAAD;AAAA,IACC,WAAAE;AAAA,IAEA,GAAAC;AAAA,IAAA,UAAAJ;AAAA,EACF;AAEF;AASAD,EAAM,cAAmB;AAAA,MACxBU,IAAA,CAAA;AAAA,EACA,UAAAT;AAAA,EACA,UAAAU;AAAA,EACD,WAAAC;AACC,MAEG,gBAAAC,EAAA,OAAA,EAAA,WAAgBJ,EAAA,QAAU,UAAgB;AAAA,EAC3C,gBAAAH,EAACQ,GAAI,EAAA,UAAWH,KAAa,IAAA,WAAAC,EAC5B,CAAA;AAAA,EAEF,gBAAAN,EAAA,OAAA,EAAA,WAAAE,EAAAC,EAAA,gBAAA,CAAA,GAAA,UAAA,gBAAAH,EAAAS,EAAA,MAAA,EAAA,QAAA,YAAA,UAAAd,EAAA,CAAA,EAAA,CAAA;AAEF,EAAA,CAAA;AAIAS,gBAA4B;AAC3B;AAEA,QAAA,EAAA,WAAAM,EAAA,IAAAC,EACE;AACA,SAAC,gBAAAX,EAAAC,EAAA,SAAA,EAAA,UAAA,gBAAAD;AAAA,IAAA;AAAA,IAAA;AAAA,MACW,WACRE;AAAA,QACFC,EAAA;AAAA,QACD;AAAA,MACA;AAAA,MAEC,IAAAO;AAAA,MAAA,UAAAf;AAAA;EAIL,EAAA,CAAA;AAEA;;"}
@@ -0,0 +1,24 @@
1
+ const t = "accordion__tWR7C", n = "item__MYeus", o = "toggle__cD-PM", e = "button__e63te", c = "icon__xZL-n", i = "content__RNHA7", a = {
2
+ accordion: t,
3
+ item: n,
4
+ "does-not-contain-interactive": "does-not-contain-interactive__9u5oz",
5
+ "contains-interactive": "contains-interactive__7-Y60",
6
+ toggle: o,
7
+ button: e,
8
+ icon: c,
9
+ "icon-rotate": "icon-rotate__OTQtF",
10
+ "parent-does-not-contain-interactive": "parent-does-not-contain-interactive__H4GPb",
11
+ "parent-contains-interactive": "parent-contains-interactive__FGVlz",
12
+ "toggle-content": "toggle-content__6cjUu",
13
+ content: i
14
+ };
15
+ export {
16
+ t as accordion,
17
+ e as button,
18
+ i as content,
19
+ a as default,
20
+ c as icon,
21
+ n as item,
22
+ o as toggle
23
+ };
24
+ //# sourceMappingURL=style.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
@@ -0,0 +1,29 @@
1
+ const t = "alert__j7ZRS", o = "icon__vbZHd", c = "content__0FEM2", n = "text__qorMN", e = "description__PMywu", i = "actions__vQ07y", _ = "title__MWel2", s = {
2
+ alert: t,
3
+ icon: o,
4
+ "type-compact": "type-compact__ptTlw",
5
+ content: c,
6
+ text: n,
7
+ description: e,
8
+ actions: i,
9
+ "dismiss-button-wrapper": "dismiss-button-wrapper__vcfJ-",
10
+ "type-page": "type-page__tP9-W",
11
+ "type-inline": "type-inline__7sxYA",
12
+ title: _,
13
+ "color-neutral": "color-neutral__x4pkI",
14
+ "color-highlight": "color-highlight__64nTZ",
15
+ "color-success": "color-success__UMfyG",
16
+ "color-warning": "color-warning__V1hfX",
17
+ "color-critical": "color-critical__3hs0B"
18
+ };
19
+ export {
20
+ i as actions,
21
+ t as alert,
22
+ c as content,
23
+ s as default,
24
+ e as description,
25
+ o as icon,
26
+ n as text,
27
+ _ as title
28
+ };
29
+ //# sourceMappingURL=alert.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,34 @@
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { FlightIcon as n } from "../flight-icon/index.js";
3
+ import r from "./alert.module.scss.js";
4
+ const a = {
5
+ neutral: {
6
+ compact: "info-fill",
7
+ default: "info"
8
+ },
9
+ highlight: {
10
+ compact: "info-fill",
11
+ default: "info"
12
+ },
13
+ success: {
14
+ compact: "check-circle-fill",
15
+ default: "check-circle"
16
+ },
17
+ warning: {
18
+ compact: "alert-triangle-fill",
19
+ default: "alert-triangle"
20
+ },
21
+ critical: {
22
+ compact: "alert-diamond-fill",
23
+ default: "alert-diamond"
24
+ }
25
+ }, s = ({ icon: t, type: e, color: c }) => {
26
+ if (t === !1)
27
+ return null;
28
+ const i = e === "compact" ? a[c].compact : a[c].default, o = t ?? i;
29
+ return /* @__PURE__ */ l("div", { className: r.icon, children: /* @__PURE__ */ l(n, { name: o, stretched: !0 }) });
30
+ };
31
+ export {
32
+ s as Icon
33
+ };
34
+ //# sourceMappingURL=icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.js","sources":["../../../src/components/alert/icon.tsx"],"sourcesContent":["import type { AlertColor, AlertProps } from '.'\nimport type { FlightIconName } from '../flight-icon'\nimport { FlightIcon } from '../flight-icon'\nimport s from './alert.module.scss'\n\nconst ICON_BY_COLOR_AND_TYPE = {\n\tneutral: {\n\t\tcompact: 'info-fill',\n\t\tdefault: 'info',\n\t},\n\thighlight: {\n\t\tcompact: 'info-fill',\n\t\tdefault: 'info',\n\t},\n\tsuccess: {\n\t\tcompact: 'check-circle-fill',\n\t\tdefault: 'check-circle',\n\t},\n\twarning: {\n\t\tcompact: 'alert-triangle-fill',\n\t\tdefault: 'alert-triangle',\n\t},\n\tcritical: {\n\t\tcompact: 'alert-diamond-fill',\n\t\tdefault: 'alert-diamond',\n\t},\n} as const satisfies Record<\n\tAlertColor,\n\tRecord<'compact' | 'default', FlightIconName>\n>\n\ninterface IconProps {\n\ticon?: FlightIconName | false\n\tcolor: AlertColor\n\ttype: AlertProps['type']\n}\n\nconst Icon = ({ icon, type, color }: IconProps) => {\n\tif (icon === false) {\n\t\treturn null\n\t}\n\n\tconst defaultIconName: FlightIconName =\n\t\ttype === 'compact'\n\t\t\t? ICON_BY_COLOR_AND_TYPE[color].compact\n\t\t\t: ICON_BY_COLOR_AND_TYPE[color].default\n\n\tconst iconName = icon ?? defaultIconName\n\n\treturn (\n\t\t<div className={s.icon}>\n\t\t\t<FlightIcon name={iconName} stretched />\n\t\t</div>\n\t)\n}\n\nexport { Icon }\n"],"names":["ICON_BY_COLOR_AND_TYPE","Icon","icon","type","color","defaultIconName","iconName","jsx","s","FlightIcon"],"mappings":";;;AAKA,MAAMA,IAAyB;AAAA,EAC9B,SAAS;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,EAAA;AAAA,EAEV,WAAW;AAAA,IACV,SAAS;AAAA,IACT,SAAS;AAAA,EAAA;AAAA,EAEV,SAAS;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,EAAA;AAAA,EAEV,SAAS;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,EAAA;AAAA,EAEV,UAAU;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,EAAA;AAEX,GAWMC,IAAO,CAAC,EAAE,MAAAC,GAAM,MAAAC,GAAM,OAAAC,QAAuB;AAClD,MAAIF,MAAS;AACZ,WAAO;AAGR,QAAMG,IACLF,MAAS,YACNH,EAAuBI,CAAK,EAAE,UAC9BJ,EAAuBI,CAAK,EAAE,SAE5BE,IAAWJ,KAAQG;AAEzB,SACC,gBAAAE,EAAC,OAAA,EAAI,WAAWC,EAAE,MACjB,UAAA,gBAAAD,EAACE,GAAA,EAAW,MAAMH,GAAU,WAAS,GAAA,CAAC,GACvC;AAEF;"}
@@ -0,0 +1,97 @@
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import o from "classnames";
3
+ import { useId as u } from "react";
4
+ import { DismissButton as f } from "../dismiss-button/index.js";
5
+ import { StandaloneLink as N } from "../standalone-link/index.js";
6
+ import { Icon as g } from "./icon.js";
7
+ import { Button as A } from "../button/index.js";
8
+ import t from "./alert.module.scss.js";
9
+ const v = ({
10
+ type: r,
11
+ color: n = "neutral",
12
+ icon: d,
13
+ onDismiss: m,
14
+ title: a,
15
+ description: i,
16
+ children: c,
17
+ role: p,
18
+ className: y,
19
+ ...h
20
+ }) => {
21
+ if (!a && !i)
22
+ throw new Error(
23
+ "Alert must include either a title or a description, or both"
24
+ );
25
+ const s = u();
26
+ return /* @__PURE__ */ l(
27
+ "div",
28
+ {
29
+ className: o(
30
+ t.alert,
31
+ t[`type-${r}`],
32
+ t[`color-${n}`],
33
+ y
34
+ ),
35
+ role: p,
36
+ "aria-live": "polite",
37
+ "aria-labelledby": s,
38
+ ...h,
39
+ children: [
40
+ /* @__PURE__ */ e(g, { icon: d, type: r, color: n }),
41
+ /* @__PURE__ */ l("div", { className: t.content, children: [
42
+ /* @__PURE__ */ l(
43
+ "div",
44
+ {
45
+ className: o(
46
+ t.text,
47
+ r === "compact" ? "mds-typography-legacy-body-100" : "mds-typography-legacy-body-200"
48
+ ),
49
+ children: [
50
+ a && /* @__PURE__ */ e(
51
+ "div",
52
+ {
53
+ className: o(
54
+ t.title,
55
+ "mds-typography-font-weight-semibold"
56
+ ),
57
+ id: s,
58
+ children: a
59
+ }
60
+ ),
61
+ i && /* @__PURE__ */ e(
62
+ "div",
63
+ {
64
+ className: o(
65
+ t.description,
66
+ "mds-typography-font-weight-regular mds-foreground-primary"
67
+ ),
68
+ id: a ? void 0 : s,
69
+ children: i
70
+ }
71
+ )
72
+ ]
73
+ }
74
+ ),
75
+ c
76
+ ] }),
77
+ m && /* @__PURE__ */ e("div", { className: t["dismiss-button-wrapper"], children: /* @__PURE__ */ e(f, { onClick: m }) })
78
+ ]
79
+ }
80
+ );
81
+ };
82
+ v.displayName = "Alert";
83
+ const b = ({ children: r }) => /* @__PURE__ */ e("div", { className: t.actions, children: r });
84
+ b.displayName = "AlertActions";
85
+ const w = ({ ...r }) => /* @__PURE__ */ e(A, { size: "small", ...r });
86
+ w.displayName = "AlertButton";
87
+ const k = ({
88
+ ...r
89
+ }) => /* @__PURE__ */ e(N, { size: "small", ...r });
90
+ k.displayName = "AlertStandaloneLink";
91
+ export {
92
+ v as Alert,
93
+ b as AlertActions,
94
+ w as AlertButton,
95
+ k as AlertStandaloneLink
96
+ };
97
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/alert/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { useId } from 'react'\nimport { DismissButton } from '../dismiss-button'\nimport { StandaloneLink, type StandaloneLinkProps } from '../standalone-link'\nimport { Icon } from './icon'\nimport type { HTMLAttributes, PropsWithChildren, ReactNode } from 'react'\nimport type { ButtonProps } from '../button'\nimport { Button } from '../button'\nimport s from './alert.module.scss'\nimport type { FlightIconName } from '../flight-icon'\n\ntype AlertColor = 'neutral' | 'highlight' | 'success' | 'warning' | 'critical'\n\ninterface CommonAlertProps extends HTMLAttributes<HTMLDivElement> {\n\t/**\n\t * Sets the color scheme for `background`, `border`, `title`, and `description`, which cannot be overridden.\n\t * `color` results in a default icon, which can be overridden.\n\t * default: `neutral`\n\t */\n\tcolor?: AlertColor\n\t/**\n\t * The alert can be dismissed by the user. When a function is passed, the \"dismiss\" button is displayed.\n\t */\n\tonDismiss?: () => void\n\t/**\n\t * A string used for the title of the alert.\n\t * Alert must have either a title or a description, or both.\n\t */\n\ttitle?: string\n\t/**\n\t * A plain text string or basic html that is used for the description.\n\t * Alert must have either a title or a description, or both.\n\t */\n\tdescription?: ReactNode\n\t/**\n\t * Role for the alert.\n\t * `alertdialog` should be used when the alert includes interactive elements (<Alert.Actions>).\n\t * `alert` should be used for all other scenarios.\n\t */\n\trole: 'alert' | 'alertdialog'\n}\n\ntype AlertProps =\n\t| (CommonAlertProps & {\n\t\t\t/** compact alerts must specify an icon */\n\t\t\ttype: 'compact'\n\t\t\t/** an icon from the Flight Icon set or false to hide the default icon */\n\t\t\ticon?: FlightIconName\n\t })\n\t| (CommonAlertProps & {\n\t\t\t/** page & inline alerts get an optional icon override */\n\t\t\ttype: 'page' | 'inline'\n\t\t\t/** an icon from the Flight Icon set or false to hide the default icon */\n\t\t\ticon?: FlightIconName | false\n\t })\n\nconst Alert = ({\n\ttype,\n\tcolor = 'neutral',\n\ticon,\n\tonDismiss,\n\ttitle,\n\tdescription,\n\tchildren,\n\trole,\n\tclassName,\n\t...rest\n}: AlertProps) => {\n\tif (!title && !description) {\n\t\tthrow new Error(\n\t\t\t'Alert must include either a title or a description, or both'\n\t\t)\n\t}\n\n\t// `alertdialog` must have an accessible name so we use either the\n\t// title or the description as label for the alert\n\tconst generatedLabelId = useId()\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(\n\t\t\t\ts.alert,\n\t\t\t\ts[`type-${type}`],\n\t\t\t\ts[`color-${color}`],\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\trole={role}\n\t\t\taria-live=\"polite\"\n\t\t\taria-labelledby={generatedLabelId}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<Icon icon={icon} type={type} color={color} />\n\t\t\t<div className={s.content}>\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\ts.text,\n\t\t\t\t\t\ttype === 'compact'\n\t\t\t\t\t\t\t? 'mds-typography-legacy-body-100'\n\t\t\t\t\t\t\t: 'mds-typography-legacy-body-200'\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{title && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\ts.title,\n\t\t\t\t\t\t\t\t'mds-typography-font-weight-semibold'\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\tid={generatedLabelId}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{description && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\ts.description,\n\t\t\t\t\t\t\t\t'mds-typography-font-weight-regular mds-foreground-primary'\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\tid={!title ? generatedLabelId : undefined}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{description}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t\t{onDismiss && (\n\t\t\t\t<div className={s['dismiss-button-wrapper']}>\n\t\t\t\t\t<DismissButton onClick={onDismiss} />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t)\n}\n\nAlert.displayName = 'Alert'\n\nconst AlertActions = ({ children }: PropsWithChildren) => {\n\treturn <div className={s.actions}>{children}</div>\n}\n\nAlertActions.displayName = 'AlertActions'\n\nconst AlertButton = ({ ...props }: Exclude<ButtonProps, 'size'>) => {\n\treturn <Button size=\"small\" {...props} />\n}\n\nAlertButton.displayName = 'AlertButton'\n\nconst AlertStandaloneLink = ({\n\t...props\n}: Exclude<StandaloneLinkProps, 'size'>) => {\n\treturn <StandaloneLink size=\"small\" {...props} />\n}\n\nAlertStandaloneLink.displayName = 'AlertStandaloneLink'\n\nexport { Alert, AlertActions, AlertButton, AlertStandaloneLink }\nexport type { AlertProps, AlertColor }\n"],"names":["Alert","type","color","icon","onDismiss","title","description","children","role","className","rest","generatedLabelId","useId","jsxs","classNames","s","jsx","Icon","DismissButton","AlertActions","AlertButton","props","Button","AlertStandaloneLink","StandaloneLink"],"mappings":";;;;;;;;AAwDA,MAAMA,IAAQ,CAAC;AAAA,EACd,MAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACJ,MAAkB;AACjB,MAAI,CAACL,KAAS,CAACC;AACd,UAAM,IAAI;AAAA,MACT;AAAA,IAAA;AAMF,QAAMK,IAAmBC,EAAA;AAEzB,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,WAAWC;AAAA,QACVC,EAAE;AAAA,QACFA,EAAE,QAAQd,CAAI,EAAE;AAAA,QAChBc,EAAE,SAASb,CAAK,EAAE;AAAA,QAClBO;AAAA,MAAA;AAAA,MAED,MAAAD;AAAA,MACA,aAAU;AAAA,MACV,mBAAiBG;AAAA,MAChB,GAAGD;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAM,EAACC,GAAA,EAAK,MAAAd,GAAY,MAAAF,GAAY,OAAAC,EAAA,CAAc;AAAA,QAC5C,gBAAAW,EAAC,OAAA,EAAI,WAAWE,EAAE,SACjB,UAAA;AAAA,UAAA,gBAAAF;AAAA,YAAC;AAAA,YAAA;AAAA,cACA,WAAWC;AAAA,gBACVC,EAAE;AAAA,gBACFd,MAAS,YACN,mCACA;AAAA,cAAA;AAAA,cAGH,UAAA;AAAA,gBAAAI,KACA,gBAAAW;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBACA,WAAWF;AAAA,sBACVC,EAAE;AAAA,sBACF;AAAA,oBAAA;AAAA,oBAED,IAAIJ;AAAA,oBAEH,UAAAN;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAGFC,KACA,gBAAAU;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBACA,WAAWF;AAAA,sBACVC,EAAE;AAAA,sBACF;AAAA,oBAAA;AAAA,oBAED,IAAKV,IAA2B,SAAnBM;AAAA,oBAEZ,UAAAL;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACF;AAAA,YAAA;AAAA,UAAA;AAAA,UAGDC;AAAA,QAAA,GACF;AAAA,QACCH,KACA,gBAAAY,EAAC,OAAA,EAAI,WAAWD,EAAE,wBAAwB,GACzC,UAAA,gBAAAC,EAACE,GAAA,EAAc,SAASd,EAAA,CAAW,EAAA,CACpC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIJ;AAEAJ,EAAM,cAAc;AAEpB,MAAMmB,IAAe,CAAC,EAAE,UAAAZ,QAChB,gBAAAS,EAAC,OAAA,EAAI,WAAWD,EAAE,SAAU,UAAAR,GAAS;AAG7CY,EAAa,cAAc;AAE3B,MAAMC,IAAc,CAAC,EAAE,GAAGC,QAClB,gBAAAL,EAACM,GAAA,EAAO,MAAK,SAAS,GAAGD,GAAO;AAGxCD,EAAY,cAAc;AAE1B,MAAMG,IAAsB,CAAC;AAAA,EAC5B,GAAGF;AACJ,MACQ,gBAAAL,EAACQ,GAAA,EAAe,MAAK,SAAS,GAAGH,GAAO;AAGhDE,EAAoB,cAAc;"}
@@ -0,0 +1,50 @@
1
+ import { jsxs as c, jsx as s } from "react/jsx-runtime";
2
+ import g from "classnames";
3
+ import { FlightIcon as u } from "../flight-icon/index.js";
4
+ import e from "./style.module.scss.js";
5
+ const S = ["small", "medium", "large"], _ = ["filled", "inverted", "outlined"], A = [
6
+ "neutral",
7
+ "neutral-dark-mode",
8
+ "highlight",
9
+ "success",
10
+ "warning",
11
+ "critical"
12
+ ], p = {
13
+ small: 12,
14
+ medium: 16,
15
+ large: 16
16
+ }, h = ({
17
+ icon: l,
18
+ iconColor: m,
19
+ iconOnly: i,
20
+ text: r,
21
+ size: a = "medium",
22
+ type: o = "filled",
23
+ color: t = "neutral",
24
+ className: d,
25
+ ...n
26
+ }) => /* @__PURE__ */ c(
27
+ "div",
28
+ {
29
+ className: g(
30
+ e.badge,
31
+ e[`size-${a}`],
32
+ e[`type-${o}`],
33
+ e[`color-${t}`],
34
+ d
35
+ ),
36
+ ...n,
37
+ children: [
38
+ l && /* @__PURE__ */ s(u, { name: l, color: m, size: p[a] }),
39
+ i && l ? /* @__PURE__ */ s("span", { className: "sr-only", children: r }) : /* @__PURE__ */ s("div", { className: e.text, children: r })
40
+ ]
41
+ }
42
+ );
43
+ h.displayName = "Badge";
44
+ export {
45
+ A as BADGE_COLORS,
46
+ S as BADGE_SIZES,
47
+ _ as BADGE_TYPES,
48
+ h as Badge
49
+ };
50
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/badge/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport type { FlightIconName, FlightIconSize } from '../flight-icon'\nimport { FlightIcon } from '../flight-icon'\nimport s from './style.module.scss'\n\nconst BADGE_SIZES = ['small', 'medium', 'large'] as const\ntype BadgeSize = (typeof BADGE_SIZES)[number]\n\nconst BADGE_TYPES = ['filled', 'inverted', 'outlined'] as const\ntype BadgeType = (typeof BADGE_TYPES)[number]\n\nconst BADGE_COLORS = [\n\t'neutral',\n\t'neutral-dark-mode',\n\t'highlight',\n\t'success',\n\t'warning',\n\t'critical',\n] as const\ntype BadgeColor = (typeof BADGE_COLORS)[number]\n\nconst ICON_SIZE_MAP = {\n\tsmall: 12,\n\tmedium: 16,\n\tlarge: 16,\n} as const satisfies Record<'small' | 'medium' | 'large', FlightIconSize>\n\ninterface BadgeProps {\n\t/** Use this parameter to show an icon. */\n\ticon?: FlightIconName\n\n\t/**\n\t * The `iconColor` prop can be used to change the icon color. It works by setting\n\t * the value of the icon SVG’s fill property.\n\t */\n\ticonColor?: string\n\n\t/** This indicates if the button will only contain an icon. An internal check is in place to ensure that accessible text is still applied to the component. */\n\ticonOnly?: boolean\n\n\t/** The text of the Badge or value of the screen-reader only element if isIconOnly is set to true. If no text value is defined an error will be thrown. */\n\ttext: string\n\n\tsize?: BadgeSize\n\ttype?: BadgeType\n\tcolor?: BadgeColor\n\tclassName?: string\n}\n\nconst Badge = ({\n\ticon,\n\ticonColor,\n\ticonOnly,\n\ttext,\n\tsize = 'medium',\n\ttype = 'filled',\n\tcolor = 'neutral',\n\tclassName,\n\t...rest\n}: BadgeProps) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(\n\t\t\t\ts.badge,\n\t\t\t\ts[`size-${size}`],\n\t\t\t\ts[`type-${type}`],\n\t\t\t\ts[`color-${color}`],\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{icon && (\n\t\t\t\t<FlightIcon name={icon} color={iconColor} size={ICON_SIZE_MAP[size]} />\n\t\t\t)}\n\t\t\t{iconOnly && icon ? (\n\t\t\t\t<span className=\"sr-only\">{text}</span>\n\t\t\t) : (\n\t\t\t\t<div className={s.text}>{text}</div>\n\t\t\t)}\n\t\t</div>\n\t)\n}\n\nBadge.displayName = 'Badge'\n\nexport type { BadgeProps, BadgeColor, BadgeSize, BadgeType }\nexport { Badge, BADGE_COLORS, BADGE_SIZES, BADGE_TYPES }\n"],"names":["BADGE_SIZES","BADGE_TYPES","BADGE_COLORS","ICON_SIZE_MAP","Badge","icon","iconColor","iconOnly","text","size","type","color","className","rest","jsxs","classNames","s","jsx","FlightIcon"],"mappings":";;;;AAKA,MAAMA,IAAc,CAAC,SAAS,UAAU,OAAO,GAGzCC,IAAc,CAAC,UAAU,YAAY,UAAU,GAG/CC,IAAe;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAGMC,IAAgB;AAAA,EACrB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACR,GAwBMC,IAAQ,CAAC;AAAA,EACd,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,WAAAC;AAAA,EACA,GAAGC;AACJ,MAEE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACA,WAAWC;AAAA,MACVC,EAAE;AAAA,MACFA,EAAE,QAAQP,CAAI,EAAE;AAAA,MAChBO,EAAE,QAAQN,CAAI,EAAE;AAAA,MAChBM,EAAE,SAASL,CAAK,EAAE;AAAA,MAClBC;AAAA,IAAA;AAAA,IAEA,GAAGC;AAAA,IAEH,UAAA;AAAA,MAAAR,KACA,gBAAAY,EAACC,KAAW,MAAMb,GAAM,OAAOC,GAAW,MAAMH,EAAcM,CAAI,EAAA,CAAG;AAAA,MAErEF,KAAYF,IACZ,gBAAAY,EAAC,QAAA,EAAK,WAAU,WAAW,UAAAT,EAAA,CAAK,IAEhC,gBAAAS,EAAC,OAAA,EAAI,WAAWD,EAAE,MAAO,UAAAR,EAAA,CAAK;AAAA,IAAA;AAAA,EAAA;AAAA;AAMlCJ,EAAM,cAAc;"}
@@ -0,0 +1,22 @@
1
+ const e = "badge__zns82", l = "text__WoM4W", o = {
2
+ badge: e,
3
+ text: l,
4
+ "size-small": "size-small__8xHdE",
5
+ "size-medium": "size-medium__xqCpO",
6
+ "size-large": "size-large__Pviip",
7
+ "color-neutral": "color-neutral__6Csf4",
8
+ "type-filled": "type-filled__ZaWsu",
9
+ "type-inverted": "type-inverted__A3554",
10
+ "type-outlined": "type-outlined__l0zjH",
11
+ "color-neutral-dark-mode": "color-neutral-dark-mode__C1TO4",
12
+ "color-highlight": "color-highlight__eWwJ5",
13
+ "color-success": "color-success__EuxKz",
14
+ "color-warning": "color-warning__gCbUY",
15
+ "color-critical": "color-critical__hV-l-"
16
+ };
17
+ export {
18
+ e as badge,
19
+ o as default,
20
+ l as text
21
+ };
22
+ //# sourceMappingURL=style.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
@@ -0,0 +1,29 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import d from "classnames";
3
+ import e from "./style.module.scss.js";
4
+ const l = ({
5
+ text: o,
6
+ size: r = "medium",
7
+ type: m = "filled",
8
+ color: t = "neutral",
9
+ className: a,
10
+ ...s
11
+ }) => /* @__PURE__ */ i(
12
+ "div",
13
+ {
14
+ className: d(
15
+ e["badge-count"],
16
+ e[`size-${r}`],
17
+ e[`type-${m}`],
18
+ e[`color-${t}`],
19
+ a
20
+ ),
21
+ ...s,
22
+ children: o
23
+ }
24
+ );
25
+ l.displayName = "BadgeCount";
26
+ export {
27
+ l as BadgeCount
28
+ };
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/badge-count/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport type { HTMLAttributes } from 'react'\nimport s from './style.module.scss'\n\ninterface BadgeCountProps extends HTMLAttributes<HTMLDivElement> {\n\tsize?: 'small' | 'medium' | 'large'\n\ttype?: 'filled' | 'inverted' | 'outlined'\n\tcolor?: 'neutral' | 'neutral-dark-mode'\n\t/**\n\t * Text value that renders in the Badge Count.\n\t */\n\ttext: string\n}\n\nconst BadgeCount = ({\n\ttext,\n\tsize = 'medium',\n\ttype = 'filled',\n\tcolor = 'neutral',\n\tclassName,\n\t...rest\n}: BadgeCountProps) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(\n\t\t\t\ts['badge-count'],\n\t\t\t\ts[`size-${size}`],\n\t\t\t\ts[`type-${type}`],\n\t\t\t\ts[`color-${color}`],\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{text}\n\t\t</div>\n\t)\n}\n\nBadgeCount.displayName = 'BadgeCount'\n\nexport type { BadgeCountProps }\nexport { BadgeCount }\n"],"names":["BadgeCount","text","size","type","color","className","rest","jsx","classNames","s"],"mappings":";;;AAcA,MAAMA,IAAa,CAAC;AAAA,EACnB,MAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,WAAAC;AAAA,EACA,GAAGC;AACJ,MAEE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACA,WAAWC;AAAA,MACVC,EAAE,aAAa;AAAA,MACfA,EAAE,QAAQP,CAAI,EAAE;AAAA,MAChBO,EAAE,QAAQN,CAAI,EAAE;AAAA,MAChBM,EAAE,SAASL,CAAK,EAAE;AAAA,MAClBC;AAAA,IAAA;AAAA,IAEA,GAAGC;AAAA,IAEH,UAAAL;AAAA,EAAA;AAAA;AAKJD,EAAW,cAAc;"}
@@ -0,0 +1,15 @@
1
+ const e = {
2
+ "badge-count": "badge-count__9xA6z",
3
+ "size-small": "size-small__LxiPj",
4
+ "size-medium": "size-medium__emKOI",
5
+ "size-large": "size-large__M7RFP",
6
+ "color-neutral": "color-neutral__j2CVd",
7
+ "type-filled": "type-filled__tb7Yx",
8
+ "type-inverted": "type-inverted__Oc-mV",
9
+ "type-outlined": "type-outlined__V714E",
10
+ "color-neutral-dark-mode": "color-neutral-dark-mode__LLW-g"
11
+ };
12
+ export {
13
+ e as default
14
+ };
15
+ //# sourceMappingURL=style.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -0,0 +1,38 @@
1
+ import { jsx as r, jsxs as c } from "react/jsx-runtime";
2
+ import s from "classnames";
3
+ import { Provider as m, Toggle as l, Content as u } from "../menu-primitive/index.js";
4
+ import { Item as d } from "./item/index.js";
5
+ import { TruncationButton as b } from "./truncation-button/index.js";
6
+ import t from "./style.module.scss.js";
7
+ const p = ({
8
+ itemsCanWrap: e = !0,
9
+ ariaLabel: o = "breadcrumbs",
10
+ children: a,
11
+ className: n,
12
+ ...i
13
+ }) => /* @__PURE__ */ r(
14
+ "nav",
15
+ {
16
+ className: s(
17
+ t.breadcrumbs,
18
+ {
19
+ [t["items-can-wrap"]]: e
20
+ },
21
+ n
22
+ ),
23
+ "aria-label": o,
24
+ ...i,
25
+ children: /* @__PURE__ */ r("ol", { className: t.list, children: a })
26
+ }
27
+ ), f = ({
28
+ ariaLabel: e,
29
+ children: o,
30
+ ...a
31
+ }) => /* @__PURE__ */ r("li", { className: s(t.item, t.truncation), ...a, children: /* @__PURE__ */ c(m, { children: [
32
+ /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(b, {}) }),
33
+ /* @__PURE__ */ r(u, { children: /* @__PURE__ */ r("div", { className: t["truncation-content"], children: /* @__PURE__ */ r("ol", { className: t.sublist, children: o }) }) })
34
+ ] }) }), j = { Root: p, Item: d, Truncation: f };
35
+ export {
36
+ j as Breadcrumbs
37
+ };
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/breadcrumbs/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport * as MenuPrimitive from '../menu-primitive'\nimport { Item } from './item'\nimport { TruncationButton } from './truncation-button'\nimport type { BreadcrumbProps, BreadcrumbTruncationProps } from './types'\nimport s from './style.module.scss'\n\nconst Root = ({\n\titemsCanWrap = true,\n\tariaLabel = 'breadcrumbs',\n\tchildren,\n\tclassName,\n\t...rest\n}: BreadcrumbProps) => {\n\treturn (\n\t\t<nav\n\t\t\tclassName={classNames(\n\t\t\t\ts.breadcrumbs,\n\t\t\t\t{\n\t\t\t\t\t[s['items-can-wrap']]: itemsCanWrap,\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\taria-label={ariaLabel}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<ol className={s.list}>{children}</ol>\n\t\t</nav>\n\t)\n}\n\nconst Truncation = ({\n\tariaLabel,\n\tchildren,\n\t...rest\n}: BreadcrumbTruncationProps) => {\n\treturn (\n\t\t<li className={classNames(s.item, s.truncation)} {...rest}>\n\t\t\t<MenuPrimitive.Provider>\n\t\t\t\t<MenuPrimitive.Toggle>\n\t\t\t\t\t<TruncationButton />\n\t\t\t\t</MenuPrimitive.Toggle>\n\t\t\t\t<MenuPrimitive.Content>\n\t\t\t\t\t<div className={s['truncation-content']}>\n\t\t\t\t\t\t<ol className={s.sublist}>{children}</ol>\n\t\t\t\t\t</div>\n\t\t\t\t</MenuPrimitive.Content>\n\t\t\t</MenuPrimitive.Provider>\n\t\t</li>\n\t)\n}\n\nconst Breadcrumbs = { Root, Item, Truncation }\n\nexport { Breadcrumbs }\n"],"names":["Root","itemsCanWrap","ariaLabel","children","className","rest","jsx","classNames","s","Truncation","jsxs","MenuPrimitive.Provider","MenuPrimitive.Toggle","TruncationButton","MenuPrimitive.Content","Breadcrumbs","Item"],"mappings":";;;;;;AAOA,MAAMA,IAAO,CAAC;AAAA,EACb,cAAAC,IAAe;AAAA,EACf,WAAAC,IAAY;AAAA,EACZ,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACJ,MAEE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACA,WAAWC;AAAA,MACVC,EAAE;AAAA,MACF;AAAA,QACC,CAACA,EAAE,gBAAgB,CAAC,GAAGP;AAAA,MAAA;AAAA,MAExBG;AAAA,IAAA;AAAA,IAED,cAAYF;AAAA,IACX,GAAGG;AAAA,IAEJ,UAAA,gBAAAC,EAAC,MAAA,EAAG,WAAWE,EAAE,MAAO,UAAAL,EAAA,CAAS;AAAA,EAAA;AAAA,GAK9BM,IAAa,CAAC;AAAA,EACnB,WAAAP;AAAA,EACA,UAAAC;AAAA,EACA,GAAGE;AACJ,MAEE,gBAAAC,EAAC,MAAA,EAAG,WAAWC,EAAWC,EAAE,MAAMA,EAAE,UAAU,GAAI,GAAGH,GACpD,UAAA,gBAAAK,EAACC,GAAA,EACA,UAAA;AAAA,EAAA,gBAAAL,EAACM,GAAA,EACA,UAAA,gBAAAN,EAACO,KAAiB,GACnB;AAAA,oBACCC,GAAA,EACA,UAAA,gBAAAR,EAAC,SAAI,WAAWE,EAAE,oBAAoB,GACrC,4BAAC,MAAA,EAAG,WAAWA,EAAE,SAAU,UAAAL,GAAS,GACrC,EAAA,CACD;AAAA,EAAA,CACD,EAAA,CACD,GAIIY,IAAc,EAAE,MAAAf,GAAM,MAAAgB,GAAM,YAAAP,EAAA;"}
@@ -0,0 +1,32 @@
1
+ "use client";
2
+ import { jsx as e, jsxs as o, Fragment as d } from "react/jsx-runtime";
3
+ import { useMDSLink as h } from "../../../utils/mds-context/index.js";
4
+ import s from "../style.module.scss.js";
5
+ const i = ({ icon: r, text: n }) => /* @__PURE__ */ o(d, { children: [
6
+ r && /* @__PURE__ */ e("div", { className: s.icon, children: r }),
7
+ /* @__PURE__ */ e("span", { className: s.text, children: n })
8
+ ] }), f = ({
9
+ maxWidth: r,
10
+ current: n,
11
+ icon: t,
12
+ text: c,
13
+ url: l,
14
+ ...m
15
+ }) => {
16
+ const a = h();
17
+ return /* @__PURE__ */ e(
18
+ "li",
19
+ {
20
+ className: s.item,
21
+ style: {
22
+ ...r && { maxWidth: r }
23
+ },
24
+ ...m,
25
+ children: n ? /* @__PURE__ */ e("div", { className: s.current, children: /* @__PURE__ */ e(i, { icon: t, text: c }) }) : /* @__PURE__ */ e(a, { className: s.link, href: l, children: /* @__PURE__ */ e(i, { icon: t, text: c }) })
26
+ }
27
+ );
28
+ };
29
+ export {
30
+ f as Item
31
+ };
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/breadcrumbs/item/index.tsx"],"sourcesContent":["'use client'\n\nimport { useMDSLink } from '../../../utils/mds-context'\nimport type { BreadcrumbItemProps } from '../types'\nimport s from '../style.module.scss'\n\ninterface ItemContentProps {\n\ttext: string\n\t/**\n\t * Use to show an flight icon.\n\t */\n\ticon?: React.ReactNode\n}\n\nconst ItemContent = ({ icon, text }: ItemContentProps) => {\n\treturn (\n\t\t<>\n\t\t\t{icon && <div className={s.icon}>{icon}</div>}\n\n\t\t\t<span className={s.text}>{text}</span>\n\t\t</>\n\t)\n}\n\nexport const Item = ({\n\tmaxWidth,\n\tcurrent,\n\ticon,\n\ttext,\n\turl,\n\t...rest\n}: BreadcrumbItemProps) => {\n\tconst Link = useMDSLink()\n\n\treturn (\n\t\t<li\n\t\t\tclassName={s.item}\n\t\t\tstyle={{\n\t\t\t\t...(maxWidth && { maxWidth }),\n\t\t\t}}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{current ? (\n\t\t\t\t<div className={s.current}>\n\t\t\t\t\t<ItemContent icon={icon} text={text} />\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<Link className={s.link} href={url}>\n\t\t\t\t\t<ItemContent icon={icon} text={text} />\n\t\t\t\t</Link>\n\t\t\t)}\n\t\t</li>\n\t)\n}\n"],"names":["text","jsxs","Fragment","icon","jsx","Item","maxWidth","current","url","rest","ItemContent","Link"],"mappings":";;;;AAeC,sBACC,MAAAA,QACE,gBAAAC,EAAQC,GAAC,EAAI,UAAW;AAAA,EAAcC,KAEtC,gBAAAC,EAAA,OAAK,EAAA,aAAoB,MAAA,UAAKD,EAAA,CAAA;AAAA,EAChC,gBAAAC,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,UAAAJ,EAAA,CAAA;AAEF,EAAA,CAAA,GAGCK,IAAA,CAAA;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAJ;AAAA,EACA,MAAAH;AAAA,EACA,KAAAQ;AAAA,EACD,GAAAC;AACC,MAAA;AAEA,cACC;AAAA,SAAC,gBAAAL;AAAA,IAAA;AAAA,IAAA;AAAA,MAEA,WAAO,EAAA;AAAA,MAAA,OACF;AAAA,QACL,GAAAE,KAAA,EAAA,UAAAA,EAAA;AAAA,MACC;AAAA,MAEA,GAAAG;AAAA,MAOA,UAAAF,IAAA,gBAAAH,EAAA,OAAA,EAAA,WAAA,EAAA,SAAA,UAAA,gBAAAA,EAAAM,GAAA,EAAA,MAAAP,GAAA,MAAAH,EAAA,CAAA,EAAA,CAAA,IAAA,gBAAAI,EAAAO,GAAA,EAAA,WAAA,EAAA,MAAA,MAAAH,GAAA,UAAA,gBAAAJ,EAAAM,GAAA,EAAA,MAAAP,GAAA,MAAAH,EAAA,CAAA,EAAA,CAAA;AAAA,IAEF;AAAA,EAEF;;"}
@@ -0,0 +1,27 @@
1
+ const t = "breadcrumbs__qRWRC", n = "list__ex8fu", c = "sublist__sSjxU", s = "item__vAjEk", i = "truncation__Kmsae", o = "link__T7iXX", _ = "text__g0Z5V", r = "current__RtvDC", e = "icon__QZYpF", u = {
2
+ breadcrumbs: t,
3
+ list: n,
4
+ "items-can-wrap": "items-can-wrap__vfE8u",
5
+ sublist: c,
6
+ item: s,
7
+ truncation: i,
8
+ link: o,
9
+ text: _,
10
+ current: r,
11
+ icon: e,
12
+ "truncation-button": "truncation-button__3eNF8",
13
+ "truncation-content": "truncation-content__P-Vh1"
14
+ };
15
+ export {
16
+ t as breadcrumbs,
17
+ r as current,
18
+ u as default,
19
+ e as icon,
20
+ s as item,
21
+ o as link,
22
+ n as list,
23
+ c as sublist,
24
+ _ as text,
25
+ i as truncation
26
+ };
27
+ //# sourceMappingURL=style.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}