@plumile/ui 0.1.55 → 0.1.56

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 (218) hide show
  1. package/lib/atomic/atoms/button/Button.d.ts.map +1 -1
  2. package/lib/atomic/atoms/button/Button.js +5 -2
  3. package/lib/atomic/atoms/formatted-date/FormattedDate.d.ts +14 -0
  4. package/lib/atomic/atoms/formatted-date/FormattedDate.d.ts.map +1 -0
  5. package/lib/atomic/atoms/formatted-date/FormattedDate.js +29 -0
  6. package/lib/atomic/atoms/icon-button/IconMenuButton.d.ts +8 -0
  7. package/lib/atomic/atoms/icon-button/IconMenuButton.d.ts.map +1 -0
  8. package/lib/atomic/atoms/icon-button/IconMenuButton.js +10 -0
  9. package/lib/atomic/molecules/breadcrumb_navigation/BreadcrumbMenuDropdown.d.ts +14 -0
  10. package/lib/atomic/molecules/breadcrumb_navigation/BreadcrumbMenuDropdown.d.ts.map +1 -0
  11. package/lib/atomic/molecules/breadcrumb_navigation/BreadcrumbMenuDropdown.js +16 -0
  12. package/lib/atomic/molecules/breadcrumb_navigation/BreadcrumbMenuPopover.d.ts +13 -0
  13. package/lib/atomic/molecules/breadcrumb_navigation/BreadcrumbMenuPopover.d.ts.map +1 -0
  14. package/lib/atomic/molecules/breadcrumb_navigation/BreadcrumbMenuPopover.js +42 -0
  15. package/lib/atomic/molecules/breadcrumb_navigation/BreadcrumbNavigation.d.ts +13 -0
  16. package/lib/atomic/molecules/breadcrumb_navigation/BreadcrumbNavigation.d.ts.map +1 -0
  17. package/lib/atomic/molecules/breadcrumb_navigation/BreadcrumbNavigation.js +37 -0
  18. package/lib/atomic/molecules/breadcrumb_navigation/breadcrumbNavigation.css.d.ts +25 -0
  19. package/lib/atomic/molecules/breadcrumb_navigation/breadcrumbNavigation.css.d.ts.map +1 -0
  20. package/lib/atomic/molecules/breadcrumb_navigation/breadcrumbNavigation.css.js +221 -0
  21. package/lib/atomic/molecules/breadcrumb_navigation/types.d.ts +15 -0
  22. package/lib/atomic/molecules/breadcrumb_navigation/types.d.ts.map +1 -0
  23. package/lib/atomic/molecules/breadcrumb_navigation/types.js +2 -0
  24. package/lib/atomic/molecules/dropdown/Dropdown.d.ts +26 -0
  25. package/lib/atomic/molecules/dropdown/Dropdown.d.ts.map +1 -0
  26. package/lib/atomic/molecules/dropdown/Dropdown.js +271 -0
  27. package/lib/atomic/molecules/dropdown/dropdown.css.d.ts +8 -0
  28. package/lib/atomic/molecules/dropdown/dropdown.css.d.ts.map +1 -0
  29. package/lib/atomic/molecules/dropdown/dropdown.css.js +30 -0
  30. package/lib/atomic/molecules/form-actions/FormActions.d.ts +16 -0
  31. package/lib/atomic/molecules/form-actions/FormActions.d.ts.map +1 -0
  32. package/lib/atomic/molecules/form-actions/FormActions.js +27 -0
  33. package/lib/atomic/molecules/toast/ToastProvider.d.ts +19 -0
  34. package/lib/atomic/molecules/toast/ToastProvider.d.ts.map +1 -0
  35. package/lib/atomic/molecules/toast/ToastProvider.js +113 -0
  36. package/lib/atomic/molecules/toast/ToastViewport.d.ts +24 -0
  37. package/lib/atomic/molecules/toast/ToastViewport.d.ts.map +1 -0
  38. package/lib/atomic/molecules/toast/ToastViewport.js +40 -0
  39. package/lib/atomic/molecules/toast/constants.d.ts +2 -0
  40. package/lib/atomic/molecules/toast/constants.d.ts.map +1 -0
  41. package/lib/atomic/molecules/toast/constants.js +2 -0
  42. package/lib/atomic/molecules/toast/toast.css.d.ts +25 -0
  43. package/lib/atomic/molecules/toast/toast.css.d.ts.map +1 -0
  44. package/lib/atomic/molecules/toast/toast.css.js +106 -0
  45. package/lib/components/data-table/DataTable.css.d.ts +61 -0
  46. package/lib/components/data-table/DataTable.css.d.ts.map +1 -0
  47. package/lib/components/data-table/DataTable.css.js +285 -0
  48. package/lib/components/data-table/DataTable.d.ts +32 -0
  49. package/lib/components/data-table/DataTable.d.ts.map +1 -0
  50. package/lib/components/data-table/DataTable.js +95 -0
  51. package/lib/components/data-table/TableCell.css.d.ts +26 -0
  52. package/lib/components/data-table/TableCell.css.d.ts.map +1 -0
  53. package/lib/components/data-table/TableCell.css.js +45 -0
  54. package/lib/components/data-table/TableCell.d.ts +46 -0
  55. package/lib/components/data-table/TableCell.d.ts.map +1 -0
  56. package/lib/components/data-table/TableCell.js +72 -0
  57. package/lib/components/data-table/TableCellBase.d.ts +13 -0
  58. package/lib/components/data-table/TableCellBase.d.ts.map +1 -0
  59. package/lib/components/data-table/TableCellBase.js +11 -0
  60. package/lib/components/data-table/VirtualizedConnectionTable.css.d.ts +5 -0
  61. package/lib/components/data-table/VirtualizedConnectionTable.css.d.ts.map +1 -0
  62. package/lib/components/data-table/VirtualizedConnectionTable.css.js +18 -0
  63. package/lib/components/data-table/VirtualizedConnectionTable.d.ts +32 -0
  64. package/lib/components/data-table/VirtualizedConnectionTable.d.ts.map +1 -0
  65. package/lib/components/data-table/VirtualizedConnectionTable.js +304 -0
  66. package/lib/components/data-table/tableBreakpoints.d.ts +9 -0
  67. package/lib/components/data-table/tableBreakpoints.d.ts.map +1 -0
  68. package/lib/components/data-table/tableBreakpoints.js +34 -0
  69. package/lib/components/select/SimpleSelect.css.d.ts +23 -0
  70. package/lib/components/select/SimpleSelect.css.d.ts.map +1 -0
  71. package/lib/components/select/SimpleSelect.css.js +175 -0
  72. package/lib/components/select/SimpleSelect.d.ts +22 -0
  73. package/lib/components/select/SimpleSelect.d.ts.map +1 -0
  74. package/lib/components/select/SimpleSelect.js +218 -0
  75. package/lib/components/subscriptions/RefetchNeededBanner.css.d.ts +5 -0
  76. package/lib/components/subscriptions/RefetchNeededBanner.css.d.ts.map +1 -0
  77. package/lib/components/subscriptions/RefetchNeededBanner.css.js +32 -0
  78. package/lib/components/subscriptions/RefetchNeededBanner.d.ts +9 -0
  79. package/lib/components/subscriptions/RefetchNeededBanner.d.ts.map +1 -0
  80. package/lib/components/subscriptions/RefetchNeededBanner.js +17 -0
  81. package/lib/esm/atomic/atoms/button/Button.js +35 -33
  82. package/lib/esm/atomic/atoms/button/Button.js.map +1 -1
  83. package/lib/esm/atomic/atoms/formatted-date/FormattedDate.js +32 -0
  84. package/lib/esm/atomic/atoms/formatted-date/FormattedDate.js.map +1 -0
  85. package/lib/esm/atomic/atoms/icon-button/IconMenuButton.js +26 -0
  86. package/lib/esm/atomic/atoms/icon-button/IconMenuButton.js.map +1 -0
  87. package/lib/esm/atomic/molecules/breadcrumb_navigation/BreadcrumbMenuDropdown.js +55 -0
  88. package/lib/esm/atomic/molecules/breadcrumb_navigation/BreadcrumbMenuDropdown.js.map +1 -0
  89. package/lib/esm/atomic/molecules/breadcrumb_navigation/BreadcrumbMenuPopover.js +61 -0
  90. package/lib/esm/atomic/molecules/breadcrumb_navigation/BreadcrumbMenuPopover.js.map +1 -0
  91. package/lib/esm/atomic/molecules/breadcrumb_navigation/BreadcrumbNavigation.js +64 -0
  92. package/lib/esm/atomic/molecules/breadcrumb_navigation/BreadcrumbNavigation.js.map +1 -0
  93. package/lib/esm/atomic/molecules/breadcrumb_navigation/breadcrumbNavigation.css.js +30 -0
  94. package/lib/esm/atomic/molecules/breadcrumb_navigation/breadcrumbNavigation.css.js.map +1 -0
  95. package/lib/esm/atomic/molecules/breadcrumb_navigation/breadcrumbNavigation.css.ts.vanilla-Bhz61Foa.css +1 -0
  96. package/lib/esm/atomic/molecules/breadcrumb_navigation/types.js +2 -0
  97. package/lib/esm/atomic/molecules/breadcrumb_navigation/types.js.map +1 -0
  98. package/lib/esm/atomic/molecules/dropdown/Dropdown.js +178 -0
  99. package/lib/esm/atomic/molecules/dropdown/Dropdown.js.map +1 -0
  100. package/lib/esm/atomic/molecules/dropdown/dropdown.css.js +13 -0
  101. package/lib/esm/atomic/molecules/dropdown/dropdown.css.js.map +1 -0
  102. package/lib/esm/atomic/molecules/form-actions/FormActions.js +57 -0
  103. package/lib/esm/atomic/molecules/form-actions/FormActions.js.map +1 -0
  104. package/lib/esm/atomic/molecules/toast/ToastProvider.js +78 -0
  105. package/lib/esm/atomic/molecules/toast/ToastProvider.js.map +1 -0
  106. package/lib/esm/atomic/molecules/toast/ToastViewport.js +71 -0
  107. package/lib/esm/atomic/molecules/toast/ToastViewport.js.map +1 -0
  108. package/lib/esm/atomic/molecules/toast/constants.js +5 -0
  109. package/lib/esm/atomic/molecules/toast/constants.js.map +1 -0
  110. package/lib/esm/atomic/molecules/toast/toast.css.js +17 -0
  111. package/lib/esm/atomic/molecules/toast/toast.css.js.map +1 -0
  112. package/lib/esm/atomic/molecules/toast/toast.css.ts.vanilla-2GtcGJsi.css +1 -0
  113. package/lib/esm/components/data-table/DataTable.css.js +24 -0
  114. package/lib/esm/components/data-table/DataTable.css.js.map +1 -0
  115. package/lib/esm/components/data-table/DataTable.css.ts.vanilla-BLE98fwj.css +1 -0
  116. package/lib/esm/components/data-table/DataTable.js +141 -0
  117. package/lib/esm/components/data-table/DataTable.js.map +1 -0
  118. package/lib/esm/components/data-table/TableCell.css.js +15 -0
  119. package/lib/esm/components/data-table/TableCell.css.js.map +1 -0
  120. package/lib/esm/components/data-table/TableCell.css.ts.vanilla-i5QJvdbl.css +1 -0
  121. package/lib/esm/components/data-table/TableCell.js +74 -0
  122. package/lib/esm/components/data-table/TableCell.js.map +1 -0
  123. package/lib/esm/components/data-table/TableCellBase.js +16 -0
  124. package/lib/esm/components/data-table/TableCellBase.js.map +1 -0
  125. package/lib/esm/components/data-table/VirtualizedConnectionTable.css.js +10 -0
  126. package/lib/esm/components/data-table/VirtualizedConnectionTable.css.js.map +1 -0
  127. package/lib/esm/components/data-table/VirtualizedConnectionTable.js +249 -0
  128. package/lib/esm/components/data-table/VirtualizedConnectionTable.js.map +1 -0
  129. package/lib/esm/components/data-table/tableBreakpoints.js +37 -0
  130. package/lib/esm/components/data-table/tableBreakpoints.js.map +1 -0
  131. package/lib/esm/components/select/SimpleSelect.css.js +22 -0
  132. package/lib/esm/components/select/SimpleSelect.css.js.map +1 -0
  133. package/lib/esm/components/select/SimpleSelect.css.ts.vanilla-Bil1v8q6.css +1 -0
  134. package/lib/esm/components/select/SimpleSelect.js +185 -0
  135. package/lib/esm/components/select/SimpleSelect.js.map +1 -0
  136. package/lib/esm/components/subscriptions/RefetchNeededBanner.css.js +10 -0
  137. package/lib/esm/components/subscriptions/RefetchNeededBanner.css.js.map +1 -0
  138. package/lib/esm/components/subscriptions/RefetchNeededBanner.js +24 -0
  139. package/lib/esm/components/subscriptions/RefetchNeededBanner.js.map +1 -0
  140. package/lib/esm/i18n/useUiTranslation.js +8 -0
  141. package/lib/esm/i18n/useUiTranslation.js.map +1 -0
  142. package/lib/esm/index.js +68 -47
  143. package/lib/esm/index.js.map +1 -1
  144. package/lib/esm/styles/slots.js +2 -0
  145. package/lib/esm/styles/slots.js.map +1 -0
  146. package/lib/i18n/useUiTranslation.d.ts +3 -0
  147. package/lib/i18n/useUiTranslation.d.ts.map +1 -0
  148. package/lib/i18n/useUiTranslation.js +5 -0
  149. package/lib/index.d.ts +10 -0
  150. package/lib/index.d.ts.map +1 -1
  151. package/lib/index.js +11 -1
  152. package/lib/styles/slots.d.ts +2 -0
  153. package/lib/styles/slots.d.ts.map +1 -0
  154. package/lib/styles/slots.js +2 -0
  155. package/lib/types/atomic/atoms/button/Button.d.ts.map +1 -1
  156. package/lib/types/atomic/atoms/formatted-date/FormattedDate.d.ts +14 -0
  157. package/lib/types/atomic/atoms/formatted-date/FormattedDate.d.ts.map +1 -0
  158. package/lib/types/atomic/atoms/icon-button/IconMenuButton.d.ts +8 -0
  159. package/lib/types/atomic/atoms/icon-button/IconMenuButton.d.ts.map +1 -0
  160. package/lib/types/atomic/molecules/breadcrumb_navigation/BreadcrumbMenuDropdown.d.ts +14 -0
  161. package/lib/types/atomic/molecules/breadcrumb_navigation/BreadcrumbMenuDropdown.d.ts.map +1 -0
  162. package/lib/types/atomic/molecules/breadcrumb_navigation/BreadcrumbMenuPopover.d.ts +13 -0
  163. package/lib/types/atomic/molecules/breadcrumb_navigation/BreadcrumbMenuPopover.d.ts.map +1 -0
  164. package/lib/types/atomic/molecules/breadcrumb_navigation/BreadcrumbNavigation.d.ts +13 -0
  165. package/lib/types/atomic/molecules/breadcrumb_navigation/BreadcrumbNavigation.d.ts.map +1 -0
  166. package/lib/types/atomic/molecules/breadcrumb_navigation/breadcrumbNavigation.css.d.ts +25 -0
  167. package/lib/types/atomic/molecules/breadcrumb_navigation/breadcrumbNavigation.css.d.ts.map +1 -0
  168. package/lib/types/atomic/molecules/breadcrumb_navigation/types.d.ts +15 -0
  169. package/lib/types/atomic/molecules/breadcrumb_navigation/types.d.ts.map +1 -0
  170. package/lib/types/atomic/molecules/dropdown/Dropdown.d.ts +26 -0
  171. package/lib/types/atomic/molecules/dropdown/Dropdown.d.ts.map +1 -0
  172. package/lib/types/atomic/molecules/dropdown/dropdown.css.d.ts +8 -0
  173. package/lib/types/atomic/molecules/dropdown/dropdown.css.d.ts.map +1 -0
  174. package/lib/types/atomic/molecules/form-actions/FormActions.d.ts +16 -0
  175. package/lib/types/atomic/molecules/form-actions/FormActions.d.ts.map +1 -0
  176. package/lib/types/atomic/molecules/toast/ToastProvider.d.ts +19 -0
  177. package/lib/types/atomic/molecules/toast/ToastProvider.d.ts.map +1 -0
  178. package/lib/types/atomic/molecules/toast/ToastViewport.d.ts +24 -0
  179. package/lib/types/atomic/molecules/toast/ToastViewport.d.ts.map +1 -0
  180. package/lib/types/atomic/molecules/toast/constants.d.ts +2 -0
  181. package/lib/types/atomic/molecules/toast/constants.d.ts.map +1 -0
  182. package/lib/types/atomic/molecules/toast/toast.css.d.ts +25 -0
  183. package/lib/types/atomic/molecules/toast/toast.css.d.ts.map +1 -0
  184. package/lib/types/components/data-table/DataTable.css.d.ts +61 -0
  185. package/lib/types/components/data-table/DataTable.css.d.ts.map +1 -0
  186. package/lib/types/components/data-table/DataTable.d.ts +32 -0
  187. package/lib/types/components/data-table/DataTable.d.ts.map +1 -0
  188. package/lib/types/components/data-table/TableCell.css.d.ts +26 -0
  189. package/lib/types/components/data-table/TableCell.css.d.ts.map +1 -0
  190. package/lib/types/components/data-table/TableCell.d.ts +46 -0
  191. package/lib/types/components/data-table/TableCell.d.ts.map +1 -0
  192. package/lib/types/components/data-table/TableCellBase.d.ts +13 -0
  193. package/lib/types/components/data-table/TableCellBase.d.ts.map +1 -0
  194. package/lib/types/components/data-table/VirtualizedConnectionTable.css.d.ts +5 -0
  195. package/lib/types/components/data-table/VirtualizedConnectionTable.css.d.ts.map +1 -0
  196. package/lib/types/components/data-table/VirtualizedConnectionTable.d.ts +32 -0
  197. package/lib/types/components/data-table/VirtualizedConnectionTable.d.ts.map +1 -0
  198. package/lib/types/components/data-table/tableBreakpoints.d.ts +9 -0
  199. package/lib/types/components/data-table/tableBreakpoints.d.ts.map +1 -0
  200. package/lib/types/components/select/SimpleSelect.css.d.ts +23 -0
  201. package/lib/types/components/select/SimpleSelect.css.d.ts.map +1 -0
  202. package/lib/types/components/select/SimpleSelect.d.ts +22 -0
  203. package/lib/types/components/select/SimpleSelect.d.ts.map +1 -0
  204. package/lib/types/components/subscriptions/RefetchNeededBanner.css.d.ts +5 -0
  205. package/lib/types/components/subscriptions/RefetchNeededBanner.css.d.ts.map +1 -0
  206. package/lib/types/components/subscriptions/RefetchNeededBanner.d.ts +9 -0
  207. package/lib/types/components/subscriptions/RefetchNeededBanner.d.ts.map +1 -0
  208. package/lib/types/i18n/useUiTranslation.d.ts +3 -0
  209. package/lib/types/i18n/useUiTranslation.d.ts.map +1 -0
  210. package/lib/types/index.d.ts +10 -0
  211. package/lib/types/index.d.ts.map +1 -1
  212. package/lib/types/styles/slots.d.ts +2 -0
  213. package/lib/types/styles/slots.d.ts.map +1 -0
  214. package/package.json +10 -3
  215. package/src/i18n/locales/en/ui.json +53 -0
  216. package/src/i18n/locales/fr/ui.json +53 -0
  217. package/src/i18n/useUiTranslation.ts +6 -0
  218. /package/lib/esm/components/layout/{TabsContentLayout.css.ts.vanilla-tn0RQdqM.css → ContentLayout.css.ts.vanilla-tn0RQdqM.css} +0 -0
@@ -1,58 +1,60 @@
1
- import { jsxs as L, jsx as n, Fragment as x } from "react/jsx-runtime";
1
+ import { jsxs as v, jsx as o, Fragment as x } from "react/jsx-runtime";
2
2
  import { ButtonLoadingSpinnerSvg as B } from "../../../icons/ButtonLoadingSpinnerSvg.js";
3
- import { button as v, spinnerIcon as j, loadingIndicator as w, iconLeft as C, content as R, iconRight as S } from "./button.css.js";
3
+ import { useUiTranslation as j } from "../../../i18n/useUiTranslation.js";
4
+ import { button as w, spinnerIcon as C, loadingIndicator as R, iconLeft as S, content as z, iconRight as D } from "./button.css.js";
4
5
  import { cx as e } from "../../../theme/tools.js";
5
- const k = (l) => {
6
- const {
7
- children: r,
8
- className: d,
9
- disabled: m,
6
+ const q = (l) => {
7
+ const { t: r } = j(), {
8
+ children: d,
9
+ className: m,
10
+ disabled: h,
10
11
  isLoading: i = !1,
11
- loadingLabel: h,
12
+ loadingLabel: p,
12
13
  classes: s,
13
14
  leftIcon: a,
14
15
  rightIcon: c,
15
- size: p,
16
- variant: f,
17
- width: g,
18
- ref: u,
19
- ...N
20
- } = l, b = e(v({ variant: f, size: p, width: g }), d), I = !!i || !!m;
16
+ size: f,
17
+ variant: g,
18
+ width: u,
19
+ ref: N,
20
+ ...b
21
+ } = l, L = e(w({ variant: g, size: f, width: u }), m), I = !!i || !!h;
21
22
  let t;
22
- if (i)
23
- t = /* @__PURE__ */ L("span", { className: e(w, s?.loadingIndicator), children: [
24
- /* @__PURE__ */ n(
23
+ if (i) {
24
+ const n = p ?? r("common.loading");
25
+ t = /* @__PURE__ */ v("span", { className: e(R, s?.loadingIndicator), children: [
26
+ /* @__PURE__ */ o(
25
27
  B,
26
28
  {
27
- className: e(j, s?.spinnerIcon),
29
+ className: e(C, s?.spinnerIcon),
28
30
  width: 20,
29
31
  height: 20
30
32
  }
31
33
  ),
32
- h
34
+ n
33
35
  ] });
34
- else {
35
- const o = [];
36
- a != null && o.push(
37
- /* @__PURE__ */ n("span", { className: e(C, s?.iconLeft), children: a }, "left-icon")
38
- ), o.push(
39
- /* @__PURE__ */ n("span", { className: e(R, s?.content), children: r }, "content")
40
- ), c != null && o.push(
41
- /* @__PURE__ */ n("span", { className: e(S, s?.iconRight), children: c }, "right-icon")
42
- ), t = /* @__PURE__ */ n(x, { children: o });
36
+ } else {
37
+ const n = [];
38
+ a != null && n.push(
39
+ /* @__PURE__ */ o("span", { className: e(S, s?.iconLeft), children: a }, "left-icon")
40
+ ), n.push(
41
+ /* @__PURE__ */ o("span", { className: e(z, s?.content), children: d }, "content")
42
+ ), c != null && n.push(
43
+ /* @__PURE__ */ o("span", { className: e(D, s?.iconRight), children: c }, "right-icon")
44
+ ), t = /* @__PURE__ */ o(x, { children: n });
43
45
  }
44
- return /* @__PURE__ */ n(
46
+ return /* @__PURE__ */ o(
45
47
  "button",
46
48
  {
47
- ref: u,
48
- className: b,
49
+ ref: N,
50
+ className: L,
49
51
  disabled: I,
50
- ...N,
52
+ ...b,
51
53
  children: t
52
54
  }
53
55
  );
54
56
  };
55
57
  export {
56
- k as Button
58
+ q as Button
57
59
  };
58
60
  //# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../../../../../src/atomic/atoms/button/Button.tsx"],"sourcesContent":["import React, { type Ref, type JSX } from 'react';\n\nimport { ButtonLoadingSpinnerSvg } from '../../../icons/ButtonLoadingSpinnerSvg.js';\n\nimport {\n button,\n content as contentClass,\n iconLeft,\n iconRight,\n loadingIndicator,\n spinnerIcon,\n type ButtonVariants,\n} from './button.css.js';\nimport { cx } from '../../../theme/tools.js';\n\ntype ButtonSlot =\n | 'loadingIndicator'\n | 'spinnerIcon'\n | 'content'\n | 'iconLeft'\n | 'iconRight';\n\ntype SlotClasses<T extends string> = Partial<Record<T, string>>;\n\n// Omit the conflicting 'size' property from HTML button attributes\ntype Props = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'size'> & {\n variant?: NonNullable<ButtonVariants>['variant'];\n size?: NonNullable<ButtonVariants>['size'];\n width?: NonNullable<ButtonVariants>['width'];\n isLoading?: boolean;\n loadingLabel?: React.ReactNode;\n leftIcon?: React.ReactNode;\n rightIcon?: React.ReactNode;\n ref?: Ref<HTMLButtonElement>;\n classes?: SlotClasses<ButtonSlot>;\n};\n\nexport const Button = (props: Props): JSX.Element => {\n const {\n children,\n className,\n disabled,\n isLoading = false,\n loadingLabel,\n classes,\n leftIcon,\n rightIcon,\n size,\n variant,\n width,\n ref,\n ...rest\n } = props;\n\n const resolvedClassName = cx(button({ variant, size, width }), className);\n const isDisabled = Boolean(isLoading) || Boolean(disabled);\n\n let renderedContent: JSX.Element;\n\n if (isLoading) {\n renderedContent = (\n <span className={cx(loadingIndicator, classes?.loadingIndicator)}>\n <ButtonLoadingSpinnerSvg\n className={cx(spinnerIcon, classes?.spinnerIcon)}\n width={20}\n height={20}\n />\n {loadingLabel}\n </span>\n );\n } else {\n const iconElements: JSX.Element[] = [];\n\n if (leftIcon != null) {\n iconElements.push(\n <span className={cx(iconLeft, classes?.iconLeft)} key=\"left-icon\">\n {leftIcon}\n </span>,\n );\n }\n\n iconElements.push(\n <span className={cx(contentClass, classes?.content)} key=\"content\">\n {children}\n </span>,\n );\n\n if (rightIcon != null) {\n iconElements.push(\n <span className={cx(iconRight, classes?.iconRight)} key=\"right-icon\">\n {rightIcon}\n </span>,\n );\n }\n\n renderedContent = <>{iconElements}</>;\n }\n\n return (\n <button\n ref={ref}\n className={resolvedClassName}\n disabled={isDisabled}\n {...rest}\n >\n {renderedContent}\n </button>\n );\n};\n"],"names":["Button","props","children","className","disabled","isLoading","loadingLabel","classes","leftIcon","rightIcon","size","variant","width","ref","rest","resolvedClassName","cx","button","isDisabled","renderedContent","loadingIndicator","jsx","ButtonLoadingSpinnerSvg","spinnerIcon","iconElements","iconLeft","contentClass","iconRight"],"mappings":";;;;AAqCO,MAAMA,IAAS,CAACC,MAA8B;AACnD,QAAM;AAAA,IACJ,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,cAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC;AAAA,IACA,KAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDb,GAEEc,IAAoBC,EAAGC,EAAO,EAAE,SAAAN,GAAS,MAAAD,GAAM,OAAAE,GAAO,GAAGT,CAAS,GAClEe,IAAa,EAAQb,KAAc,EAAQD;AAEjD,MAAIe;AAEJ,MAAId;AACF,IAAAc,sBACG,QAAA,EAAK,WAAWH,EAAGI,GAAkBb,GAAS,gBAAgB,GAC7D,UAAA;AAAA,MAAA,gBAAAc;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,WAAWN,EAAGO,GAAahB,GAAS,WAAW;AAAA,UAC/C,OAAO;AAAA,UACP,QAAQ;AAAA,QAAA;AAAA,MAAA;AAAA,MAETD;AAAA,IAAA,GACH;AAAA,OAEG;AACL,UAAMkB,IAA8B,CAAA;AAEpC,IAAIhB,KAAY,QACdgB,EAAa;AAAA,MACX,gBAAAH,EAAC,UAAK,WAAWL,EAAGS,GAAUlB,GAAS,QAAQ,GAC5C,UAAAC,EAAA,GADmD,WAEtD;AAAA,IAAA,GAIJgB,EAAa;AAAA,MACX,gBAAAH,EAAC,UAAK,WAAWL,EAAGU,GAAcnB,GAAS,OAAO,GAC/C,UAAAL,EAAA,GADsD,SAEzD;AAAA,IAAA,GAGEO,KAAa,QACfe,EAAa;AAAA,MACX,gBAAAH,EAAC,UAAK,WAAWL,EAAGW,GAAWpB,GAAS,SAAS,GAC9C,UAAAE,EAAA,GADqD,YAExD;AAAA,IAAA,GAIJU,2BAAqB,UAAAK,EAAA,CAAa;AAAA,EACpC;AAEA,SACE,gBAAAH;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAR;AAAA,MACA,WAAWE;AAAA,MACX,UAAUG;AAAA,MACT,GAAGJ;AAAA,MAEH,UAAAK;AAAA,IAAA;AAAA,EAAA;AAGP;"}
1
+ {"version":3,"file":"Button.js","sources":["../../../../../src/atomic/atoms/button/Button.tsx"],"sourcesContent":["import React, { type Ref, type JSX } from 'react';\n\nimport { ButtonLoadingSpinnerSvg } from '../../../icons/ButtonLoadingSpinnerSvg.js';\nimport { useUiTranslation } from '../../../i18n/useUiTranslation.js';\n\nimport {\n button,\n content as contentClass,\n iconLeft,\n iconRight,\n loadingIndicator,\n spinnerIcon,\n type ButtonVariants,\n} from './button.css.js';\nimport { cx } from '../../../theme/tools.js';\n\ntype ButtonSlot =\n | 'loadingIndicator'\n | 'spinnerIcon'\n | 'content'\n | 'iconLeft'\n | 'iconRight';\n\ntype SlotClasses<T extends string> = Partial<Record<T, string>>;\n\n// Omit the conflicting 'size' property from HTML button attributes\ntype Props = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'size'> & {\n variant?: NonNullable<ButtonVariants>['variant'];\n size?: NonNullable<ButtonVariants>['size'];\n width?: NonNullable<ButtonVariants>['width'];\n isLoading?: boolean;\n loadingLabel?: React.ReactNode;\n leftIcon?: React.ReactNode;\n rightIcon?: React.ReactNode;\n ref?: Ref<HTMLButtonElement>;\n classes?: SlotClasses<ButtonSlot>;\n};\n\nexport const Button = (props: Props): JSX.Element => {\n const { t } = useUiTranslation();\n const {\n children,\n className,\n disabled,\n isLoading = false,\n loadingLabel,\n classes,\n leftIcon,\n rightIcon,\n size,\n variant,\n width,\n ref,\n ...rest\n } = props;\n\n const resolvedClassName = cx(button({ variant, size, width }), className);\n const isDisabled = Boolean(isLoading) || Boolean(disabled);\n\n let renderedContent: JSX.Element;\n\n if (isLoading) {\n const resolvedLoadingLabel = loadingLabel ?? t('common.loading');\n renderedContent = (\n <span className={cx(loadingIndicator, classes?.loadingIndicator)}>\n <ButtonLoadingSpinnerSvg\n className={cx(spinnerIcon, classes?.spinnerIcon)}\n width={20}\n height={20}\n />\n {resolvedLoadingLabel}\n </span>\n );\n } else {\n const iconElements: JSX.Element[] = [];\n\n if (leftIcon != null) {\n iconElements.push(\n <span className={cx(iconLeft, classes?.iconLeft)} key=\"left-icon\">\n {leftIcon}\n </span>,\n );\n }\n\n iconElements.push(\n <span className={cx(contentClass, classes?.content)} key=\"content\">\n {children}\n </span>,\n );\n\n if (rightIcon != null) {\n iconElements.push(\n <span className={cx(iconRight, classes?.iconRight)} key=\"right-icon\">\n {rightIcon}\n </span>,\n );\n }\n\n renderedContent = <>{iconElements}</>;\n }\n\n return (\n <button\n ref={ref}\n className={resolvedClassName}\n disabled={isDisabled}\n {...rest}\n >\n {renderedContent}\n </button>\n );\n};\n"],"names":["Button","props","t","useUiTranslation","children","className","disabled","isLoading","loadingLabel","classes","leftIcon","rightIcon","size","variant","width","ref","rest","resolvedClassName","cx","button","isDisabled","renderedContent","resolvedLoadingLabel","loadingIndicator","jsx","ButtonLoadingSpinnerSvg","spinnerIcon","iconElements","iconLeft","contentClass","iconRight"],"mappings":";;;;;AAsCO,MAAMA,IAAS,CAACC,MAA8B;AACnD,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR;AAAA,IACJ,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,cAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC;AAAA,IACA,KAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDf,GAEEgB,IAAoBC,EAAGC,EAAO,EAAE,SAAAN,GAAS,MAAAD,GAAM,OAAAE,GAAO,GAAGT,CAAS,GAClEe,IAAa,EAAQb,KAAc,EAAQD;AAEjD,MAAIe;AAEJ,MAAId,GAAW;AACb,UAAMe,IAAuBd,KAAgBN,EAAE,gBAAgB;AAC/D,IAAAmB,sBACG,QAAA,EAAK,WAAWH,EAAGK,GAAkBd,GAAS,gBAAgB,GAC7D,UAAA;AAAA,MAAA,gBAAAe;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,WAAWP,EAAGQ,GAAajB,GAAS,WAAW;AAAA,UAC/C,OAAO;AAAA,UACP,QAAQ;AAAA,QAAA;AAAA,MAAA;AAAA,MAETa;AAAA,IAAA,GACH;AAAA,EAEJ,OAAO;AACL,UAAMK,IAA8B,CAAA;AAEpC,IAAIjB,KAAY,QACdiB,EAAa;AAAA,MACX,gBAAAH,EAAC,UAAK,WAAWN,EAAGU,GAAUnB,GAAS,QAAQ,GAC5C,UAAAC,EAAA,GADmD,WAEtD;AAAA,IAAA,GAIJiB,EAAa;AAAA,MACX,gBAAAH,EAAC,UAAK,WAAWN,EAAGW,GAAcpB,GAAS,OAAO,GAC/C,UAAAL,EAAA,GADsD,SAEzD;AAAA,IAAA,GAGEO,KAAa,QACfgB,EAAa;AAAA,MACX,gBAAAH,EAAC,UAAK,WAAWN,EAAGY,GAAWrB,GAAS,SAAS,GAC9C,UAAAE,EAAA,GADqD,YAExD;AAAA,IAAA,GAIJU,2BAAqB,UAAAM,EAAA,CAAa;AAAA,EACpC;AAEA,SACE,gBAAAH;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAT;AAAA,MACA,WAAWE;AAAA,MACX,UAAUG;AAAA,MACT,GAAGJ;AAAA,MAEH,UAAAK;AAAA,IAAA;AAAA,EAAA;AAGP;"}
@@ -0,0 +1,32 @@
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { useMemo as u } from "react";
3
+ import { useUiTranslation as l } from "../../../i18n/useUiTranslation.js";
4
+ const d = {
5
+ year: "numeric",
6
+ month: "short",
7
+ day: "numeric"
8
+ }, h = ({
9
+ value: r,
10
+ fallback: m,
11
+ options: e = d,
12
+ locale: n,
13
+ className: a
14
+ }) => {
15
+ const { t: i } = l(), t = m ?? i("common.notAvailable"), s = u(() => {
16
+ if (r == null)
17
+ return t;
18
+ const o = new Date(String(r));
19
+ if (Number.isNaN(o.getTime()))
20
+ return t;
21
+ try {
22
+ return new Intl.DateTimeFormat(n, e).format(o);
23
+ } catch {
24
+ return t;
25
+ }
26
+ }, [r, t, n, e]);
27
+ return /* @__PURE__ */ c("span", { className: a, children: s });
28
+ };
29
+ export {
30
+ h as FormattedDate
31
+ };
32
+ //# sourceMappingURL=FormattedDate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormattedDate.js","sources":["../../../../../src/atomic/atoms/formatted-date/FormattedDate.tsx"],"sourcesContent":["import { type JSX, useMemo } from 'react';\nimport { useUiTranslation } from '../../../i18n/useUiTranslation.js';\n\ntype DateValue = string | { toString: () => string };\n\ntype Props = {\n value: DateValue | null | undefined;\n fallback?: string;\n options?: Intl.DateTimeFormatOptions;\n locale?: string;\n className?: string;\n};\n\nconst DEFAULT_OPTIONS: Intl.DateTimeFormatOptions = {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n};\n\nexport const FormattedDate = ({\n value,\n fallback,\n options = DEFAULT_OPTIONS,\n locale,\n className,\n}: Props): JSX.Element => {\n const { t } = useUiTranslation();\n const resolvedFallback = fallback ?? t('common.notAvailable');\n const displayValue = useMemo(() => {\n if (value == null) {\n return resolvedFallback;\n }\n\n const date = new Date(String(value));\n if (Number.isNaN(date.getTime())) {\n return resolvedFallback;\n }\n\n try {\n return new Intl.DateTimeFormat(locale, options).format(date);\n } catch {\n return resolvedFallback;\n }\n }, [value, resolvedFallback, locale, options]);\n\n return <span className={className}>{displayValue}</span>;\n};\n"],"names":["DEFAULT_OPTIONS","FormattedDate","value","fallback","options","locale","className","t","useUiTranslation","resolvedFallback","displayValue","useMemo","date","jsx"],"mappings":";;;AAaA,MAAMA,IAA8C;AAAA,EAClD,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AACP,GAEaC,IAAgB,CAAC;AAAA,EAC5B,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC,IAAUJ;AAAA,EACV,QAAAK;AAAA,EACA,WAAAC;AACF,MAA0B;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IAAmBN,KAAYI,EAAE,qBAAqB,GACtDG,IAAeC,EAAQ,MAAM;AACjC,QAAIT,KAAS;AACX,aAAOO;AAGT,UAAMG,IAAO,IAAI,KAAK,OAAOV,CAAK,CAAC;AACnC,QAAI,OAAO,MAAMU,EAAK,QAAA,CAAS;AAC7B,aAAOH;AAGT,QAAI;AACF,aAAO,IAAI,KAAK,eAAeJ,GAAQD,CAAO,EAAE,OAAOQ,CAAI;AAAA,IAC7D,QAAQ;AACN,aAAOH;AAAA,IACT;AAAA,EACF,GAAG,CAACP,GAAOO,GAAkBJ,GAAQD,CAAO,CAAC;AAE7C,SAAO,gBAAAS,EAAC,QAAA,EAAK,WAAAP,GAAuB,UAAAI,EAAA,CAAa;AACnD;"}
@@ -0,0 +1,26 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { Button as a } from "../button/Button.js";
3
+ import { useUiTranslation as i } from "../../../i18n/useUiTranslation.js";
4
+ const l = "⋮", b = ({
5
+ label: o,
6
+ icon: t = l,
7
+ type: n = "button",
8
+ ...r
9
+ }) => {
10
+ const { t: e } = i(), m = o ?? e("common.menu.open");
11
+ return /* @__PURE__ */ s(
12
+ a,
13
+ {
14
+ "aria-label": m,
15
+ variant: "text",
16
+ size: "small",
17
+ type: n,
18
+ ...r,
19
+ children: t
20
+ }
21
+ );
22
+ };
23
+ export {
24
+ b as IconMenuButton
25
+ };
26
+ //# sourceMappingURL=IconMenuButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconMenuButton.js","sources":["../../../../../src/atomic/atoms/icon-button/IconMenuButton.tsx"],"sourcesContent":["import { type ComponentProps, type JSX } from 'react';\n\nimport { Button } from '../button/Button.js';\nimport { useUiTranslation } from '../../../i18n/useUiTranslation.js';\n\nconst DEFAULT_ICON = '⋮';\n\nexport type IconMenuButtonProps = Omit<\n ComponentProps<typeof Button>,\n 'children' | 'variant' | 'size'\n> & {\n label?: string;\n icon?: JSX.Element | string;\n};\n\nexport const IconMenuButton = ({\n label,\n icon = DEFAULT_ICON,\n type = 'button',\n ...rest\n}: IconMenuButtonProps): JSX.Element => {\n const { t } = useUiTranslation();\n const resolvedLabel = label ?? t('common.menu.open');\n return (\n <Button\n aria-label={resolvedLabel}\n variant=\"text\"\n size=\"small\"\n type={type}\n {...rest}\n >\n {icon}\n </Button>\n );\n};\n"],"names":["DEFAULT_ICON","IconMenuButton","label","icon","type","rest","t","useUiTranslation","resolvedLabel","jsx","Button"],"mappings":";;;AAKA,MAAMA,IAAe,KAURC,IAAiB,CAAC;AAAA,EAC7B,OAAAC;AAAA,EACA,MAAAC,IAAOH;AAAA,EACP,MAAAI,IAAO;AAAA,EACP,GAAGC;AACL,MAAwC;AACtC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IAAgBN,KAASI,EAAE,kBAAkB;AACnD,SACE,gBAAAG;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,cAAYF;AAAA,MACZ,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,MAAAJ;AAAA,MACC,GAAGC;AAAA,MAEH,UAAAF;AAAA,IAAA;AAAA,EAAA;AAGP;"}
@@ -0,0 +1,55 @@
1
+ import { jsx as r, jsxs as d } from "react/jsx-runtime";
2
+ import { Link as b } from "@plumile/router";
3
+ import { ChevronDownSvg as l } from "../../../icons/ChevronDownSvg.js";
4
+ import { Dropdown as p } from "../dropdown/Dropdown.js";
5
+ import { cx as u } from "../../../theme/tools.js";
6
+ import { breadcrumbSection as h, breadcrumbNameRow as v, breadcrumbLink as f, popoverPanel as N, breadcrumbChevronButton as g, breadcrumbChevronOpen as w, breadcrumbChevron as C } from "./breadcrumbNavigation.css.js";
7
+ import { BreadcrumbMenuPopover as x } from "./BreadcrumbMenuPopover.js";
8
+ const P = ({
9
+ node: e,
10
+ menu: o,
11
+ ariaLabel: t,
12
+ searchPlaceholder: m,
13
+ searchAriaLabel: n,
14
+ emptyLabel: a,
15
+ emptyMatchesLabel: c
16
+ }) => {
17
+ const i = o?.items ?? [];
18
+ return /* @__PURE__ */ r("div", { className: h, children: /* @__PURE__ */ d("div", { className: v, children: [
19
+ /* @__PURE__ */ r(b, { to: e.to, className: f, children: e.name }),
20
+ /* @__PURE__ */ r(
21
+ p,
22
+ {
23
+ trigger: (s) => /* @__PURE__ */ r("button", { type: "button", className: g, children: /* @__PURE__ */ r(
24
+ l,
25
+ {
26
+ width: 14,
27
+ height: 14,
28
+ className: u(C, {
29
+ [w]: s
30
+ })
31
+ }
32
+ ) }),
33
+ ariaLabel: t,
34
+ placement: "bottom-start",
35
+ matchTriggerWidth: !1,
36
+ contentClassName: N,
37
+ children: /* @__PURE__ */ r(
38
+ x,
39
+ {
40
+ items: i,
41
+ selectedId: o?.selectedId,
42
+ searchPlaceholder: m,
43
+ searchAriaLabel: n,
44
+ emptyLabel: a,
45
+ emptyMatchesLabel: c
46
+ }
47
+ )
48
+ }
49
+ )
50
+ ] }) });
51
+ };
52
+ export {
53
+ P as BreadcrumbMenuDropdown
54
+ };
55
+ //# sourceMappingURL=BreadcrumbMenuDropdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BreadcrumbMenuDropdown.js","sources":["../../../../../src/atomic/molecules/breadcrumb_navigation/BreadcrumbMenuDropdown.tsx"],"sourcesContent":["import { type JSX } from 'react';\nimport { Link } from '@plumile/router';\nimport { ChevronDownSvg } from '../../../icons/ChevronDownSvg.js';\nimport { Dropdown } from '../dropdown/Dropdown.js';\nimport { cx } from '../../../theme/tools.js';\n\nimport * as styles from './breadcrumbNavigation.css.js';\nimport { BreadcrumbMenuPopover } from './BreadcrumbMenuPopover.js';\nimport type { BreadcrumbMenuConfig, BreadcrumbNode } from './types.js';\n\ntype Props = {\n node: BreadcrumbNode;\n menu?: BreadcrumbMenuConfig;\n ariaLabel: string;\n searchPlaceholder: string;\n searchAriaLabel: string;\n emptyLabel: string;\n emptyMatchesLabel: string;\n};\n\nexport const BreadcrumbMenuDropdown = ({\n node,\n menu,\n ariaLabel,\n searchPlaceholder,\n searchAriaLabel,\n emptyLabel,\n emptyMatchesLabel,\n}: Props): JSX.Element => {\n const menuItems = menu?.items ?? [];\n\n return (\n <div className={styles.breadcrumbSection}>\n {/* <span className={styles.breadcrumbLabel}>{sectionLabel}</span> */}\n <div className={styles.breadcrumbNameRow}>\n <Link to={node.to} className={styles.breadcrumbLink}>\n {node.name}\n </Link>\n <Dropdown\n trigger={(isOpen) => {\n return (\n <button type=\"button\" className={styles.breadcrumbChevronButton}>\n <ChevronDownSvg\n width={14}\n height={14}\n className={cx(styles.breadcrumbChevron, {\n [styles.breadcrumbChevronOpen]: isOpen,\n })}\n />\n </button>\n );\n }}\n ariaLabel={ariaLabel}\n placement=\"bottom-start\"\n matchTriggerWidth={false}\n contentClassName={styles.popoverPanel}\n >\n <BreadcrumbMenuPopover\n items={menuItems}\n selectedId={menu?.selectedId}\n searchPlaceholder={searchPlaceholder}\n searchAriaLabel={searchAriaLabel}\n emptyLabel={emptyLabel}\n emptyMatchesLabel={emptyMatchesLabel}\n />\n </Dropdown>\n </div>\n </div>\n );\n};\n"],"names":["BreadcrumbMenuDropdown","node","menu","ariaLabel","searchPlaceholder","searchAriaLabel","emptyLabel","emptyMatchesLabel","menuItems","jsx","styles.breadcrumbSection","jsxs","styles.breadcrumbNameRow","Link","styles.breadcrumbLink","Dropdown","isOpen","styles.breadcrumbChevronButton","ChevronDownSvg","cx","styles.breadcrumbChevron","styles.breadcrumbChevronOpen","styles.popoverPanel","BreadcrumbMenuPopover"],"mappings":";;;;;;;AAoBO,MAAMA,IAAyB,CAAC;AAAA,EACrC,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,mBAAAC;AACF,MAA0B;AACxB,QAAMC,IAAYN,GAAM,SAAS,CAAA;AAEjC,SACE,gBAAAO,EAAC,SAAI,WAAWC,GAEd,UAAA,gBAAAC,EAAC,OAAA,EAAI,WAAWC,GACd,UAAA;AAAA,IAAA,gBAAAH,EAACI,GAAA,EAAK,IAAIZ,EAAK,IAAI,WAAWa,GAC3B,YAAK,KAAA,CACR;AAAA,IACA,gBAAAL;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,SAAS,CAACC,wBAEL,UAAA,EAAO,MAAK,UAAS,WAAWC,GAC/B,UAAA,gBAAAR;AAAA,UAACS;AAAA,UAAA;AAAA,YACC,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,WAAWC,EAAGC,GAA0B;AAAA,cACtC,CAACC,CAA4B,GAAGL;AAAA,YAAA,CACjC;AAAA,UAAA;AAAA,QAAA,GAEL;AAAA,QAGJ,WAAAb;AAAA,QACA,WAAU;AAAA,QACV,mBAAmB;AAAA,QACnB,kBAAkBmB;AAAAA,QAElB,UAAA,gBAAAb;AAAA,UAACc;AAAA,UAAA;AAAA,YACC,OAAOf;AAAA,YACP,YAAYN,GAAM;AAAA,YAClB,mBAAAE;AAAA,YACA,iBAAAC;AAAA,YACA,YAAAC;AAAA,YACA,mBAAAC;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EACF,EAAA,CACF,EAAA,CACF;AAEJ;"}
@@ -0,0 +1,61 @@
1
+ import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
+ import { useState as N, useMemo as y } from "react";
3
+ import { Link as C } from "@plumile/router";
4
+ import { Input as I } from "../../atoms/input/Input.js";
5
+ import { useDropdown as L } from "../dropdown/Dropdown.js";
6
+ import { cx as x } from "../../../theme/tools.js";
7
+ import { popoverContent as b, popoverSearch as g, popoverList as w, popoverEmpty as S, popoverItemActive as j, popoverItem as k, popoverItemDescription as z, popoverItemName as D } from "./breadcrumbNavigation.css.js";
8
+ const W = ({
9
+ items: t,
10
+ selectedId: p,
11
+ searchPlaceholder: c,
12
+ searchAriaLabel: m,
13
+ emptyLabel: d,
14
+ emptyMatchesLabel: u
15
+ }) => {
16
+ const { close: h } = L(), [n, v] = N(""), o = n.trim().toLowerCase(), a = y(() => o === "" ? t : t.filter((e) => e.name.toLowerCase().includes(o)), [t, o]);
17
+ let l;
18
+ return o === "" ? l = d : l = u, /* @__PURE__ */ s("div", { className: b, children: [
19
+ /* @__PURE__ */ r("div", { className: g, children: /* @__PURE__ */ r(
20
+ I,
21
+ {
22
+ type: "search",
23
+ size: "small",
24
+ fullWidth: !0,
25
+ placeholder: c,
26
+ value: n,
27
+ onChange: (e) => {
28
+ v(e.target.value);
29
+ },
30
+ "aria-label": m
31
+ }
32
+ ) }),
33
+ /* @__PURE__ */ s("ul", { className: w, children: [
34
+ a.length === 0 && /* @__PURE__ */ r("li", { className: S, children: l }),
35
+ a.map((e) => {
36
+ const f = x(k, {
37
+ [j]: e.id === p
38
+ });
39
+ let i = null;
40
+ return e.description != null && e.description !== "" && (i = /* @__PURE__ */ r("span", { className: z, children: e.description })), /* @__PURE__ */ r("li", { children: /* @__PURE__ */ s(
41
+ C,
42
+ {
43
+ to: e.to,
44
+ className: f,
45
+ onClick: () => {
46
+ h();
47
+ },
48
+ children: [
49
+ /* @__PURE__ */ r("span", { className: D, children: e.name }),
50
+ i
51
+ ]
52
+ }
53
+ ) }, e.id);
54
+ })
55
+ ] })
56
+ ] });
57
+ };
58
+ export {
59
+ W as BreadcrumbMenuPopover
60
+ };
61
+ //# sourceMappingURL=BreadcrumbMenuPopover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BreadcrumbMenuPopover.js","sources":["../../../../../src/atomic/molecules/breadcrumb_navigation/BreadcrumbMenuPopover.tsx"],"sourcesContent":["import { type JSX, useMemo, useState } from 'react';\nimport { Link } from '@plumile/router';\nimport { Input } from '../../atoms/input/Input.js';\nimport { useDropdown } from '../dropdown/Dropdown.js';\nimport { cx } from '../../../theme/tools.js';\n\nimport * as styles from './breadcrumbNavigation.css.js';\nimport type { BreadcrumbMenuItem } from './types.js';\n\ntype Props = {\n items: readonly BreadcrumbMenuItem[];\n selectedId?: string | null;\n searchPlaceholder: string;\n searchAriaLabel: string;\n emptyLabel: string;\n emptyMatchesLabel: string;\n};\n\nexport const BreadcrumbMenuPopover = ({\n items,\n selectedId,\n searchPlaceholder,\n searchAriaLabel,\n emptyLabel,\n emptyMatchesLabel,\n}: Props): JSX.Element => {\n const { close } = useDropdown();\n const [query, setQuery] = useState('');\n const normalizedQuery = query.trim().toLowerCase();\n\n const filteredItems = useMemo(() => {\n if (normalizedQuery === '') {\n return items;\n }\n\n return items.filter((item) => {\n return item.name.toLowerCase().includes(normalizedQuery);\n });\n }, [items, normalizedQuery]);\n\n let emptyStateLabel: string;\n if (normalizedQuery === '') {\n emptyStateLabel = emptyLabel;\n } else {\n emptyStateLabel = emptyMatchesLabel;\n }\n\n return (\n <div className={styles.popoverContent}>\n <div className={styles.popoverSearch}>\n <Input\n type=\"search\"\n size=\"small\"\n fullWidth\n placeholder={searchPlaceholder}\n value={query}\n onChange={(event) => {\n setQuery(event.target.value);\n }}\n aria-label={searchAriaLabel}\n />\n </div>\n <ul className={styles.popoverList}>\n {filteredItems.length === 0 && (\n <li className={styles.popoverEmpty}>{emptyStateLabel}</li>\n )}\n {filteredItems.map((item) => {\n const itemClassName = cx(styles.popoverItem, {\n [styles.popoverItemActive]: item.id === selectedId,\n });\n\n let descriptionNode: JSX.Element | null = null;\n if (item.description != null && item.description !== '') {\n descriptionNode = (\n <span className={styles.popoverItemDescription}>\n {item.description}\n </span>\n );\n }\n\n return (\n <li key={item.id}>\n <Link\n to={item.to}\n className={itemClassName}\n onClick={() => {\n close();\n }}\n >\n <span className={styles.popoverItemName}>{item.name}</span>\n {descriptionNode}\n </Link>\n </li>\n );\n })}\n </ul>\n </div>\n );\n};\n"],"names":["BreadcrumbMenuPopover","items","selectedId","searchPlaceholder","searchAriaLabel","emptyLabel","emptyMatchesLabel","close","useDropdown","query","setQuery","useState","normalizedQuery","filteredItems","useMemo","item","emptyStateLabel","jsxs","styles.popoverContent","jsx","styles.popoverSearch","Input","event","styles.popoverList","styles.popoverEmpty","itemClassName","cx","styles.popoverItem","styles.popoverItemActive","descriptionNode","styles.popoverItemDescription","Link","styles.popoverItemName"],"mappings":";;;;;;;AAkBO,MAAMA,IAAwB,CAAC;AAAA,EACpC,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,mBAAAC;AACF,MAA0B;AACxB,QAAM,EAAE,OAAAC,EAAA,IAAUC,EAAA,GACZ,CAACC,GAAOC,CAAQ,IAAIC,EAAS,EAAE,GAC/BC,IAAkBH,EAAM,KAAA,EAAO,YAAA,GAE/BI,IAAgBC,EAAQ,MACxBF,MAAoB,KACfX,IAGFA,EAAM,OAAO,CAACc,MACZA,EAAK,KAAK,YAAA,EAAc,SAASH,CAAe,CACxD,GACA,CAACX,GAAOW,CAAe,CAAC;AAE3B,MAAII;AACJ,SAAIJ,MAAoB,KACtBI,IAAkBX,IAElBW,IAAkBV,GAIlB,gBAAAW,EAAC,OAAA,EAAI,WAAWC,GACd,UAAA;AAAA,IAAA,gBAAAC,EAAC,OAAA,EAAI,WAAWC,GACd,UAAA,gBAAAD;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,MAAK;AAAA,QACL,WAAS;AAAA,QACT,aAAalB;AAAA,QACb,OAAOM;AAAA,QACP,UAAU,CAACa,MAAU;AACnB,UAAAZ,EAASY,EAAM,OAAO,KAAK;AAAA,QAC7B;AAAA,QACA,cAAYlB;AAAA,MAAA;AAAA,IAAA,GAEhB;AAAA,IACA,gBAAAa,EAAC,MAAA,EAAG,WAAWM,GACZ,UAAA;AAAA,MAAAV,EAAc,WAAW,KACxB,gBAAAM,EAAC,QAAG,WAAWK,GAAsB,UAAAR,GAAgB;AAAA,MAEtDH,EAAc,IAAI,CAACE,MAAS;AAC3B,cAAMU,IAAgBC,EAAGC,GAAoB;AAAA,UAC3C,CAACC,CAAwB,GAAGb,EAAK,OAAOb;AAAA,QAAA,CACzC;AAED,YAAI2B,IAAsC;AAC1C,eAAId,EAAK,eAAe,QAAQA,EAAK,gBAAgB,OACnDc,sBACG,QAAA,EAAK,WAAWC,GACd,YAAK,aACR,sBAKD,MAAA,EACC,UAAA,gBAAAb;AAAA,UAACc;AAAA,UAAA;AAAA,YACC,IAAIhB,EAAK;AAAA,YACT,WAAWU;AAAA,YACX,SAAS,MAAM;AACb,cAAAlB,EAAA;AAAA,YACF;AAAA,YAEA,UAAA;AAAA,cAAA,gBAAAY,EAAC,QAAA,EAAK,WAAWa,GAAyB,YAAK,MAAK;AAAA,cACnDH;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA,EACH,GAVOd,EAAK,EAWd;AAAA,MAEJ,CAAC;AAAA,IAAA,EAAA,CACH;AAAA,EAAA,GACF;AAEJ;"}
@@ -0,0 +1,64 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useUiTranslation as y } from "../../../i18n/useUiTranslation.js";
3
+ import { Link as M } from "@plumile/router";
4
+ import { SidebarHomeSvg as S } from "../../../icons/SidebarHomeSvg.js";
5
+ import { breadcrumbItem as o, homeLink as A, homeIcon as B, breadcrumbList as I, breadcrumbSeparator as k, breadcrumb as w } from "./breadcrumbNavigation.css.js";
6
+ import { cx as x } from "../../../theme/tools.js";
7
+ import { BreadcrumbMenuDropdown as u } from "./BreadcrumbMenuDropdown.js";
8
+ const T = (p) => {
9
+ const { organization: c, group: t, project: n, groupMenu: d, projectMenu: h, className: g } = p, { t: a } = y(), i = a("navigation.breadcrumb.empty.matches"), m = a("navigation.breadcrumb.search.groups"), L = a("navigation.breadcrumb.empty.groups"), f = a("navigation.breadcrumb.menu.group"), s = a("navigation.breadcrumb.search.projects"), j = a("navigation.breadcrumb.empty.projects"), v = a("navigation.breadcrumb.menu.project"), e = [];
10
+ e.push(
11
+ /* @__PURE__ */ r("li", { className: o, children: /* @__PURE__ */ r(
12
+ M,
13
+ {
14
+ to: c.to,
15
+ className: A,
16
+ "aria-label": `Organization: ${c.name}`,
17
+ children: /* @__PURE__ */ r(S, { width: 16, height: 16, className: B })
18
+ }
19
+ ) }, "home")
20
+ ), t != null && e.push(
21
+ /* @__PURE__ */ r("li", { className: o, children: /* @__PURE__ */ r(
22
+ u,
23
+ {
24
+ node: t,
25
+ menu: d,
26
+ ariaLabel: f,
27
+ searchPlaceholder: m,
28
+ searchAriaLabel: m,
29
+ emptyLabel: L,
30
+ emptyMatchesLabel: i
31
+ }
32
+ ) }, "group")
33
+ ), n != null && e.push(
34
+ /* @__PURE__ */ r("li", { className: o, children: /* @__PURE__ */ r(
35
+ u,
36
+ {
37
+ node: n,
38
+ menu: h,
39
+ ariaLabel: v,
40
+ searchPlaceholder: s,
41
+ searchAriaLabel: s,
42
+ emptyLabel: j,
43
+ emptyMatchesLabel: i
44
+ }
45
+ ) }, "project")
46
+ );
47
+ const N = e.flatMap((l, b) => b === 0 ? [l] : [
48
+ /* @__PURE__ */ r(
49
+ "li",
50
+ {
51
+ className: k,
52
+ "aria-hidden": "true",
53
+ children: "/"
54
+ },
55
+ `separator-${b}`
56
+ ),
57
+ l
58
+ ]);
59
+ return /* @__PURE__ */ r("nav", { className: x(w, g), "aria-label": "Breadcrumb", children: /* @__PURE__ */ r("ol", { className: I, children: N }) });
60
+ };
61
+ export {
62
+ T as BreadcrumbNavigation
63
+ };
64
+ //# sourceMappingURL=BreadcrumbNavigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BreadcrumbNavigation.js","sources":["../../../../../src/atomic/molecules/breadcrumb_navigation/BreadcrumbNavigation.tsx"],"sourcesContent":["import { type JSX } from 'react';\nimport { useUiTranslation } from '../../../i18n/useUiTranslation.js';\nimport { Link } from '@plumile/router';\nimport { SidebarHomeSvg } from '../../../icons/SidebarHomeSvg.js';\n\nimport * as styles from './breadcrumbNavigation.css.js';\nimport { cx } from '../../../theme/tools.js';\nimport { BreadcrumbMenuDropdown } from './BreadcrumbMenuDropdown.js';\nimport type { BreadcrumbMenuConfig, BreadcrumbNode } from './types.js';\n\ntype Props = {\n organization: BreadcrumbNode;\n group?: BreadcrumbNode | null;\n project?: BreadcrumbNode | null;\n groupMenu?: BreadcrumbMenuConfig;\n projectMenu?: BreadcrumbMenuConfig;\n className?: string;\n};\n\nexport const BreadcrumbNavigation = (props: Props): JSX.Element => {\n const { organization, group, project, groupMenu, projectMenu, className } =\n props;\n const { t } = useUiTranslation();\n const emptyMatchesLabel = t('navigation.breadcrumb.empty.matches');\n\n const groupSearchLabel = t('navigation.breadcrumb.search.groups');\n const groupEmptyLabel = t('navigation.breadcrumb.empty.groups');\n const groupMenuAriaLabel = t('navigation.breadcrumb.menu.group');\n\n const projectSearchLabel = t('navigation.breadcrumb.search.projects');\n const projectEmptyLabel = t('navigation.breadcrumb.empty.projects');\n const projectMenuAriaLabel = t('navigation.breadcrumb.menu.project');\n const breadcrumbItems: JSX.Element[] = [];\n\n breadcrumbItems.push(\n <li key=\"home\" className={styles.breadcrumbItem}>\n <Link\n to={organization.to}\n className={styles.homeLink}\n aria-label={`Organization: ${organization.name}`}\n >\n <SidebarHomeSvg width={16} height={16} className={styles.homeIcon} />\n </Link>\n </li>,\n );\n\n if (group != null) {\n breadcrumbItems.push(\n <li key=\"group\" className={styles.breadcrumbItem}>\n <BreadcrumbMenuDropdown\n node={group}\n menu={groupMenu}\n ariaLabel={groupMenuAriaLabel}\n searchPlaceholder={groupSearchLabel}\n searchAriaLabel={groupSearchLabel}\n emptyLabel={groupEmptyLabel}\n emptyMatchesLabel={emptyMatchesLabel}\n />\n </li>,\n );\n }\n\n if (project != null) {\n breadcrumbItems.push(\n <li key=\"project\" className={styles.breadcrumbItem}>\n <BreadcrumbMenuDropdown\n node={project}\n menu={projectMenu}\n ariaLabel={projectMenuAriaLabel}\n searchPlaceholder={projectSearchLabel}\n searchAriaLabel={projectSearchLabel}\n emptyLabel={projectEmptyLabel}\n emptyMatchesLabel={emptyMatchesLabel}\n />\n </li>,\n );\n }\n\n const breadcrumbsWithSeparators = breadcrumbItems.flatMap((item, index) => {\n if (index === 0) {\n return [item];\n }\n return [\n <li\n key={`separator-${index}`}\n className={styles.breadcrumbSeparator}\n aria-hidden=\"true\"\n >\n /{/* <ChevronRightSvg width={16} height={16} /> */}\n </li>,\n item,\n ];\n });\n\n return (\n <nav className={cx(styles.breadcrumb, className)} aria-label=\"Breadcrumb\">\n <ol className={styles.breadcrumbList}>{breadcrumbsWithSeparators}</ol>\n </nav>\n );\n};\n\nexport type {\n BreadcrumbNode,\n BreadcrumbMenuItem,\n BreadcrumbMenuConfig,\n} from './types.js';\n"],"names":["BreadcrumbNavigation","props","organization","group","project","groupMenu","projectMenu","className","t","useUiTranslation","emptyMatchesLabel","groupSearchLabel","groupEmptyLabel","groupMenuAriaLabel","projectSearchLabel","projectEmptyLabel","projectMenuAriaLabel","breadcrumbItems","jsx","styles.breadcrumbItem","Link","styles.homeLink","SidebarHomeSvg","styles.homeIcon","BreadcrumbMenuDropdown","breadcrumbsWithSeparators","item","index","styles.breadcrumbSeparator","cx","styles.breadcrumb","styles.breadcrumbList"],"mappings":";;;;;;;AAmBO,MAAMA,IAAuB,CAACC,MAA8B;AACjE,QAAM,EAAE,cAAAC,GAAc,OAAAC,GAAO,SAAAC,GAAS,WAAAC,GAAW,aAAAC,GAAa,WAAAC,MAC5DN,GACI,EAAE,GAAAO,EAAA,IAAMC,EAAA,GACRC,IAAoBF,EAAE,qCAAqC,GAE3DG,IAAmBH,EAAE,qCAAqC,GAC1DI,IAAkBJ,EAAE,oCAAoC,GACxDK,IAAqBL,EAAE,kCAAkC,GAEzDM,IAAqBN,EAAE,uCAAuC,GAC9DO,IAAoBP,EAAE,sCAAsC,GAC5DQ,IAAuBR,EAAE,oCAAoC,GAC7DS,IAAiC,CAAA;AAEvC,EAAAA,EAAgB;AAAA,IACd,gBAAAC,EAAC,MAAA,EAAc,WAAWC,GACxB,UAAA,gBAAAD;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,IAAIlB,EAAa;AAAA,QACjB,WAAWmB;AAAAA,QACX,cAAY,iBAAiBnB,EAAa,IAAI;AAAA,QAE9C,UAAA,gBAAAgB,EAACI,KAAe,OAAO,IAAI,QAAQ,IAAI,WAAWC,EAAO,CAAU;AAAA,MAAA;AAAA,IAAA,KAN/D,MAQR;AAAA,EAAA,GAGEpB,KAAS,QACXc,EAAgB;AAAA,IACd,gBAAAC,EAAC,MAAA,EAAe,WAAWC,GACzB,UAAA,gBAAAD;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,MAAMrB;AAAA,QACN,MAAME;AAAA,QACN,WAAWQ;AAAA,QACX,mBAAmBF;AAAA,QACnB,iBAAiBA;AAAA,QACjB,YAAYC;AAAA,QACZ,mBAAAF;AAAA,MAAA;AAAA,IAAA,KARI,OAUR;AAAA,EAAA,GAIAN,KAAW,QACba,EAAgB;AAAA,IACd,gBAAAC,EAAC,MAAA,EAAiB,WAAWC,GAC3B,UAAA,gBAAAD;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,MAAMpB;AAAA,QACN,MAAME;AAAA,QACN,WAAWU;AAAA,QACX,mBAAmBF;AAAA,QACnB,iBAAiBA;AAAA,QACjB,YAAYC;AAAA,QACZ,mBAAAL;AAAA,MAAA;AAAA,IAAA,KARI,SAUR;AAAA,EAAA;AAIJ,QAAMe,IAA4BR,EAAgB,QAAQ,CAACS,GAAMC,MAC3DA,MAAU,IACL,CAACD,CAAI,IAEP;AAAA,IACL,gBAAAR;AAAA,MAAC;AAAA,MAAA;AAAA,QAEC,WAAWU;AAAAA,QACX,eAAY;AAAA,QACb,UAAA;AAAA,MAAA;AAAA,MAHM,aAAaD,CAAK;AAAA,IAAA;AAAA,IAMzBD;AAAA,EAAA,CAEH;AAED,2BACG,OAAA,EAAI,WAAWG,EAAGC,GAAmBvB,CAAS,GAAG,cAAW,cAC3D,4BAAC,MAAA,EAAG,WAAWwB,GAAwB,aAA0B,GACnE;AAEJ;"}
@@ -0,0 +1,30 @@
1
+ /* empty css */
2
+ /* empty css */
3
+ var q = "_1u1q1110 txvbqb9io txvbqbco", x = "_1u1q1111 txvbqb9io txvbqbco txvbqbfax txvbqbfbo txvbqbl9f txvbqbaof", t = "_1u1q1112 txvbqb9io txvbqbco", o = "_1u1q1113 txvbqb9io txvbqbai6 txvbqbcf txvbqbanx", r = "_1u1q1114 txvbqb8f txvbqbamo txvbqb66 txvbqbeef txvbqbv8t txvbqbegx", a = "_1u1q1115 txvbqb9jf txvbqbco txvbqbao6", e = "_1u1q1116 txvbqbv4z txvbqb77 txvbqb6x txvbqb7k", u = "_1u1q1117 txvbqb2w txvbqbv8p", p = "_1u1q1119 _1u1q1118 txvbqb78 txvbqb6x txvbqb7k txvbqb9jf txvbqbco txvbqb96 txvbqbamo txvbqbv8p txvbqb3b txvbqbf3x", c = "_1u1q111a txvbqb9io txvbqbco txvbqbdnx txvbqbv8t txvbqb8x txvbqbamx", i = "_1u1q111c _1u1q111b txvbqb78 txvbqb6x txvbqb7k txvbqb9io txvbqbco txvbqbdnx txvbqbtwo txvbqbc66 txvbqbk6f txvbqbjho txvbqb1rf txvbqb12f txvbqb1px txvbqbv31 txvbqbv8p txvbqbv txvbqbl9f", m = "_1u1q111d txvbqb9jf txvbqbco txvbqbdnx txvbqbc6o txvbqb1qx txvbqbv8p txvbqb78 txvbqb6x txvbqb7k", _ = "_1u1q111e txvbqbv4z", f = "_1u1q111h _1u1q111g txvbqbl9x txvbqbkcx txvbqbjcf txvbqb8r6 txvbqb6l", n = "_1u1q111i txvbqb9io txvbqbai6 txvbqbaof", d = "_1u1q111j txvbqb9io txvbqbco txvbqbdoo", l = "_1u1q111k txvbqb8o txvbqbamo txvbqb66 txvbqbeef txvbqbv8t", k = "_1u1q111l txvbqb9io", h = "_1u1q111m txvbqbfax txvbqbfbo txvbqbl9f txvbqb9io txvbqbai6 txvbqbanx txvbqbirx txvbqbl7o", j = "_1u1q111o _1u1q111n txvbqb78 txvbqb6w txvbqb7k txvbqb9io txvbqbai6 txvbqbanx txvbqboif txvbqbnv6 txvbqbp5f txvbqblx6 txvbqb1rf txvbqb3b txvbqbv8p", I = "_1u1q111p txvbqbv2j txvbqbv7z", L = "_1u1q111q txvbqb8x txvbqbamo", s = "_1u1q111r txvbqb8o txvbqbv8r", w = "_1u1q111s txvbqbl9x txvbqb8x txvbqbv8r";
4
+ export {
5
+ q as breadcrumb,
6
+ e as breadcrumbChevron,
7
+ i as breadcrumbChevronButton,
8
+ u as breadcrumbChevronOpen,
9
+ t as breadcrumbItem,
10
+ r as breadcrumbLabel,
11
+ p as breadcrumbLink,
12
+ x as breadcrumbList,
13
+ a as breadcrumbNameRow,
14
+ o as breadcrumbSection,
15
+ c as breadcrumbSeparator,
16
+ _ as homeIcon,
17
+ m as homeLink,
18
+ n as popoverContent,
19
+ w as popoverEmpty,
20
+ d as popoverHeader,
21
+ j as popoverItem,
22
+ I as popoverItemActive,
23
+ s as popoverItemDescription,
24
+ L as popoverItemName,
25
+ h as popoverList,
26
+ f as popoverPanel,
27
+ k as popoverSearch,
28
+ l as popoverTitle
29
+ };
30
+ //# sourceMappingURL=breadcrumbNavigation.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumbNavigation.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -0,0 +1 @@
1
+ @keyframes _1u1q111f{0%{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}._1u1q1119:hover{color:var(--kronex-colors-primary);text-decoration:none}._1u1q1119:focus{outline:none;color:var(--kronex-colors-primary)}._1u1q111c:hover:not(:disabled){background-color:var(--kronex-colors-backgroundTertiary);color:var(--kronex-colors-text)}._1u1q111h{animation:_1u1q111f .16s ease}._1u1q111o:hover{background-color:var(--kronex-colors-backgroundSecondary);color:var(--kronex-colors-text)}._1u1q111o:focus{outline:2px solid var(--kronex-colors-primaryLight);outline-offset:2px}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,178 @@
1
+ import { jsx as N, jsxs as st } from "react/jsx-runtime";
2
+ import { createContext as ct, useContext as it, useState as V, useRef as v, useCallback as w, useLayoutEffect as lt, useEffect as h, isValidElement as ut, cloneElement as ft } from "react";
3
+ import { createPortal as at } from "react-dom";
4
+ import { contentPositioned as dt, content as pt, container as mt } from "./dropdown.css.js";
5
+ import { cx as $ } from "../../../theme/tools.js";
6
+ const q = ct(null), xt = () => {
7
+ const c = it(q);
8
+ if (c == null)
9
+ throw new Error("useDropdown must be used within a <Dropdown />");
10
+ return c;
11
+ }, wt = (c) => c == null || typeof c != "object" ? !1 : c.$$typeof === Symbol.for("react.forward_ref"), kt = ({
12
+ trigger: c,
13
+ children: H,
14
+ className: I,
15
+ contentClassName: U,
16
+ placement: x = "bottom-start",
17
+ offset: l = 4,
18
+ matchTriggerWidth: M = !0,
19
+ open: T,
20
+ defaultOpen: _ = !1,
21
+ onOpenChange: W,
22
+ closeOnItemClick: F = !1,
23
+ portalContainer: G,
24
+ ariaLabel: k
25
+ }) => {
26
+ const D = T != null, [J, Q] = V(_);
27
+ let e = J;
28
+ D && (e = !!T);
29
+ const R = v(null), C = v(null), f = v(null), [g, X] = V(null), p = v([]), a = w(
30
+ (t) => {
31
+ D || Q(t), W?.(t);
32
+ },
33
+ [D, W]
34
+ ), K = w(() => {
35
+ a(!e);
36
+ }, [e, a]), d = w(() => {
37
+ a(!1);
38
+ }, [a]), Y = w(() => {
39
+ a(!0);
40
+ }, [a]), b = w(() => {
41
+ const t = C.current, r = f.current;
42
+ if (t == null || r == null)
43
+ return;
44
+ const n = t.getBoundingClientRect();
45
+ let o = 0, s = 0;
46
+ switch (x) {
47
+ case "bottom-start":
48
+ o = n.bottom + l, s = n.left;
49
+ break;
50
+ case "bottom-end":
51
+ o = n.bottom + l, s = n.right - r.offsetWidth;
52
+ break;
53
+ case "top-start":
54
+ o = n.top - r.offsetHeight - l, s = n.left;
55
+ break;
56
+ case "top-end":
57
+ o = n.top - r.offsetHeight - l, s = n.right - r.offsetWidth;
58
+ break;
59
+ default:
60
+ o = n.bottom + l, s = n.left;
61
+ }
62
+ const O = window.innerWidth, L = window.innerHeight;
63
+ let P;
64
+ M && (P = n.width);
65
+ const z = P ?? r.offsetWidth;
66
+ s + z > O - 4 && (s = Math.max(4, O - z - 4)), s < 4 && (s = 4);
67
+ const y = r.offsetHeight;
68
+ if (o + y > L - 4)
69
+ if (x.startsWith("bottom")) {
70
+ const A = n.top - y - l;
71
+ A >= 4 ? o = A : o = Math.max(4, L - y - 4);
72
+ } else
73
+ o = Math.max(4, L - y - 4);
74
+ o < 4 && (o = 4), X({ top: o, left: s, width: P });
75
+ }, [x, l, M]);
76
+ lt(() => {
77
+ e && b();
78
+ }, [e, b, H]), h(() => {
79
+ if (!e) return;
80
+ const t = () => {
81
+ b();
82
+ };
83
+ window.addEventListener("resize", t), window.addEventListener("scroll", t, !0);
84
+ const r = () => {
85
+ window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0);
86
+ };
87
+ p.current.push(r);
88
+ }, [e, b]), h(() => {
89
+ if (!e) return;
90
+ const t = (o) => {
91
+ const s = o.target;
92
+ R.current != null && f.current != null && !R.current.contains(s) && !f.current.contains(s) && d();
93
+ }, r = (o) => {
94
+ o.key === "Escape" && (d(), C.current?.focus());
95
+ };
96
+ document.addEventListener("mousedown", t), document.addEventListener("keydown", r);
97
+ const n = () => {
98
+ document.removeEventListener("mousedown", t), document.removeEventListener("keydown", r);
99
+ };
100
+ p.current.push(n);
101
+ }, [e, d]), h(() => {
102
+ if (!e) return;
103
+ f.current?.querySelector(
104
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
105
+ )?.focus();
106
+ }, [e]), h(() => {
107
+ if (!e || !F) return;
108
+ const t = (n) => {
109
+ f.current?.contains(n.target) && d();
110
+ };
111
+ document.addEventListener("click", t, { capture: !0 });
112
+ const r = () => {
113
+ document.removeEventListener("click", t, { capture: !0 });
114
+ };
115
+ p.current.push(r);
116
+ }, [e, F, d]), h(() => () => {
117
+ p.current.forEach((t) => {
118
+ t();
119
+ }), p.current = [];
120
+ }, []);
121
+ let i = c;
122
+ if (typeof c == "function" && (i = c(e)), !ut(i))
123
+ throw new Error("Dropdown trigger must be a React element.");
124
+ const S = typeof i.type == "string", Z = S && i.type === "button";
125
+ if (!(S || typeof i.type == "function" || wt(i.type)))
126
+ throw new Error(
127
+ "Dropdown trigger must be a DOM element or component that accepts a ref."
128
+ );
129
+ const E = i.props.ref ?? i.ref, tt = (t) => {
130
+ C.current = t, typeof E == "function" ? E(t) : E != null && (E.current = t);
131
+ }, m = i.props, et = (t) => {
132
+ m.onClick?.(t), !t.defaultPrevented && K();
133
+ }, nt = (t) => {
134
+ m.onKeyDown?.(t), !t.defaultPrevented && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), K());
135
+ }, u = {
136
+ onClick: et,
137
+ "aria-haspopup": "menu",
138
+ "aria-expanded": e
139
+ };
140
+ k != null && k !== "" && (u["aria-label"] = k), Z ? m.type == null && (u.type = "button") : (u.onKeyDown = nt, m.role == null && (u.role = "button"), m.tabIndex == null && (u.tabIndex = 0)), u.ref = tt;
141
+ let j = {};
142
+ g != null && (j = {
143
+ top: g.top,
144
+ left: g.left,
145
+ width: g.width
146
+ });
147
+ const ot = G ?? document.body, rt = {
148
+ close: d,
149
+ open: Y,
150
+ isOpen: e
151
+ };
152
+ let B = null;
153
+ return e && (B = at(
154
+ /* @__PURE__ */ N(
155
+ "div",
156
+ {
157
+ ref: f,
158
+ role: "menu",
159
+ className: $(
160
+ pt,
161
+ dt,
162
+ U
163
+ ),
164
+ style: j,
165
+ children: H
166
+ }
167
+ ),
168
+ ot
169
+ )), /* @__PURE__ */ st(q.Provider, { value: rt, children: [
170
+ /* @__PURE__ */ N("div", { className: $(mt, I), ref: R, children: ft(i, u) }),
171
+ B
172
+ ] });
173
+ };
174
+ export {
175
+ kt as Dropdown,
176
+ xt as useDropdown
177
+ };
178
+ //# sourceMappingURL=Dropdown.js.map