@drivenets/design-system 0.0.3 → 0.0.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 (221) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/components/ds-alert-banner/ds-alert-banner.cjs +157 -52
  3. package/dist/components/ds-alert-banner/ds-alert-banner.d.cts +5 -5
  4. package/dist/components/ds-alert-banner/ds-alert-banner.d.cts.map +1 -1
  5. package/dist/components/ds-alert-banner/ds-alert-banner.js +157 -52
  6. package/dist/components/ds-alert-banner/ds-alert-banner.js.map +1 -1
  7. package/dist/components/ds-alert-banner/ds-alert-banner.types.d.cts.map +1 -1
  8. package/dist/components/ds-alert-banner/ds-alert-banner.types.js.map +1 -1
  9. package/dist/components/ds-breadcrumb/ds-breadcrumb.cjs +59 -16
  10. package/dist/components/ds-breadcrumb/ds-breadcrumb.js +59 -16
  11. package/dist/components/ds-breadcrumb/ds-breadcrumb.js.map +1 -1
  12. package/dist/components/ds-button/ds-button.cjs +18 -2
  13. package/dist/components/ds-button/ds-button.d.cts +2 -2
  14. package/dist/components/ds-button/ds-button.d.ts +2 -2
  15. package/dist/components/ds-button/ds-button.js +18 -2
  16. package/dist/components/ds-button/ds-button.js.map +1 -1
  17. package/dist/components/ds-button/versions/ds-button-legacy/ds-button-legacy.cjs +79 -10
  18. package/dist/components/ds-button/versions/ds-button-legacy/ds-button-legacy.js +79 -10
  19. package/dist/components/ds-button/versions/ds-button-legacy/ds-button-legacy.js.map +1 -1
  20. package/dist/components/ds-button/versions/ds-button-new/ds-button-new.cjs +78 -10
  21. package/dist/components/ds-button/versions/ds-button-new/ds-button-new.js +78 -10
  22. package/dist/components/ds-button/versions/ds-button-new/ds-button-new.js.map +1 -1
  23. package/dist/components/ds-checkbox/ds-checkbox.cjs +89 -18
  24. package/dist/components/ds-checkbox/ds-checkbox.js +89 -18
  25. package/dist/components/ds-checkbox/ds-checkbox.js.map +1 -1
  26. package/dist/components/ds-chip/ds-chip.cjs +100 -30
  27. package/dist/components/ds-chip/ds-chip.js +100 -30
  28. package/dist/components/ds-chip/ds-chip.js.map +1 -1
  29. package/dist/components/ds-chip-group/ds-chip-group.cjs +6 -6
  30. package/dist/components/ds-chip-group/ds-chip-group.js +6 -6
  31. package/dist/components/ds-chip-group/ds-chip-group.js.map +1 -1
  32. package/dist/components/ds-chip-group/hooks/use-chip-row-calculation.js.map +1 -1
  33. package/dist/components/ds-confirmation/ds-confirmation.cjs +210 -56
  34. package/dist/components/ds-confirmation/ds-confirmation.d.cts +8 -8
  35. package/dist/components/ds-confirmation/ds-confirmation.d.cts.map +1 -1
  36. package/dist/components/ds-confirmation/ds-confirmation.d.ts +8 -8
  37. package/dist/components/ds-confirmation/ds-confirmation.js +210 -56
  38. package/dist/components/ds-confirmation/ds-confirmation.js.map +1 -1
  39. package/dist/components/ds-dialog/ds-dialog.js.map +1 -1
  40. package/dist/components/ds-drawer/ds-drawer.cjs +261 -61
  41. package/dist/components/ds-drawer/ds-drawer.d.cts +9 -9
  42. package/dist/components/ds-drawer/ds-drawer.d.ts +9 -9
  43. package/dist/components/ds-drawer/ds-drawer.js +261 -61
  44. package/dist/components/ds-drawer/ds-drawer.js.map +1 -1
  45. package/dist/components/ds-dropdown-menu/ds-dropdown-menu.cjs +481 -135
  46. package/dist/components/ds-dropdown-menu/ds-dropdown-menu.js +481 -135
  47. package/dist/components/ds-dropdown-menu/ds-dropdown-menu.js.map +1 -1
  48. package/dist/components/ds-expandable-text-input/ds-expandable-text-input.cjs +146 -56
  49. package/dist/components/ds-expandable-text-input/ds-expandable-text-input.d.cts +2 -2
  50. package/dist/components/ds-expandable-text-input/ds-expandable-text-input.d.ts +2 -2
  51. package/dist/components/ds-expandable-text-input/ds-expandable-text-input.js +146 -56
  52. package/dist/components/ds-expandable-text-input/ds-expandable-text-input.js.map +1 -1
  53. package/dist/components/ds-file-upload/components/file-upload/file-upload.cjs +190 -69
  54. package/dist/components/ds-file-upload/components/file-upload/file-upload.js +190 -69
  55. package/dist/components/ds-file-upload/components/file-upload/file-upload.js.map +1 -1
  56. package/dist/components/ds-file-upload/components/file-upload-item/file-upload-item.cjs +273 -132
  57. package/dist/components/ds-file-upload/components/file-upload-item/file-upload-item.js +273 -132
  58. package/dist/components/ds-file-upload/components/file-upload-item/file-upload-item.js.map +1 -1
  59. package/dist/components/ds-file-upload/ds-file-upload.cjs +96 -16
  60. package/dist/components/ds-file-upload/ds-file-upload.js +96 -16
  61. package/dist/components/ds-file-upload/ds-file-upload.js.map +1 -1
  62. package/dist/components/ds-file-upload/errors/file-upload-errors.js.map +1 -1
  63. package/dist/components/ds-file-upload/hooks/use-file-upload.cjs +93 -93
  64. package/dist/components/ds-file-upload/hooks/use-file-upload.js +93 -93
  65. package/dist/components/ds-file-upload/hooks/use-file-upload.js.map +1 -1
  66. package/dist/components/ds-file-upload/types/accept-types.js.map +1 -1
  67. package/dist/components/ds-file-upload/utils/accept-utils.js.map +1 -1
  68. package/dist/components/ds-file-upload/utils/constants.js.map +1 -1
  69. package/dist/components/ds-file-upload/utils/file-factory.js.map +1 -1
  70. package/dist/components/ds-file-upload/utils/format-file-size.js.map +1 -1
  71. package/dist/components/ds-file-upload/utils/generate-helper-text.js.map +1 -1
  72. package/dist/components/ds-file-upload/utils/get-error-message.js.map +1 -1
  73. package/dist/components/ds-file-upload/utils/is-file-equal.js.map +1 -1
  74. package/dist/components/ds-form-control/ds-form-control.cjs +119 -34
  75. package/dist/components/ds-form-control/ds-form-control.d.cts +7 -7
  76. package/dist/components/ds-form-control/ds-form-control.d.ts +7 -7
  77. package/dist/components/ds-form-control/ds-form-control.d.ts.map +1 -1
  78. package/dist/components/ds-form-control/ds-form-control.js +119 -34
  79. package/dist/components/ds-form-control/ds-form-control.js.map +1 -1
  80. package/dist/components/ds-form-control/ds-form-control.types.js.map +1 -1
  81. package/dist/components/ds-grid/ds-grid.js.map +1 -1
  82. package/dist/components/ds-icon/ds-icon.cjs +84 -13
  83. package/dist/components/ds-icon/ds-icon.js +84 -13
  84. package/dist/components/ds-icon/ds-icon.js.map +1 -1
  85. package/dist/components/ds-icon/ds-icon.types.d.cts.map +1 -1
  86. package/dist/components/ds-icon/ds-icon.types.js.map +1 -1
  87. package/dist/components/ds-modal/ds-modal.cjs +222 -55
  88. package/dist/components/ds-modal/ds-modal.d.cts +8 -8
  89. package/dist/components/ds-modal/ds-modal.d.cts.map +1 -1
  90. package/dist/components/ds-modal/ds-modal.d.ts +8 -8
  91. package/dist/components/ds-modal/ds-modal.d.ts.map +1 -1
  92. package/dist/components/ds-modal/ds-modal.js +222 -55
  93. package/dist/components/ds-modal/ds-modal.js.map +1 -1
  94. package/dist/components/ds-number-input/ds-number-input.cjs +136 -49
  95. package/dist/components/ds-number-input/ds-number-input.js +136 -49
  96. package/dist/components/ds-number-input/ds-number-input.js.map +1 -1
  97. package/dist/components/ds-panel/ds-panel.cjs +111 -19
  98. package/dist/components/ds-panel/ds-panel.d.cts +2 -2
  99. package/dist/components/ds-panel/ds-panel.d.cts.map +1 -1
  100. package/dist/components/ds-panel/ds-panel.js +111 -19
  101. package/dist/components/ds-panel/ds-panel.js.map +1 -1
  102. package/dist/components/ds-password-input/ds-password-input.cjs +108 -41
  103. package/dist/components/ds-password-input/ds-password-input.js +108 -41
  104. package/dist/components/ds-password-input/ds-password-input.js.map +1 -1
  105. package/dist/components/ds-popover/ds-popover.cjs +50 -12
  106. package/dist/components/ds-popover/ds-popover.js +50 -12
  107. package/dist/components/ds-popover/ds-popover.js.map +1 -1
  108. package/dist/components/ds-radio-group/ds-radio-group.cjs +209 -53
  109. package/dist/components/ds-radio-group/ds-radio-group.js +209 -53
  110. package/dist/components/ds-radio-group/ds-radio-group.js.map +1 -1
  111. package/dist/components/ds-select/ds-select.cjs +198 -89
  112. package/dist/components/ds-select/ds-select.d.cts +2 -2
  113. package/dist/components/ds-select/ds-select.d.cts.map +1 -1
  114. package/dist/components/ds-select/ds-select.js +198 -89
  115. package/dist/components/ds-select/ds-select.js.map +1 -1
  116. package/dist/components/ds-select/select-items-chips.cjs +73 -22
  117. package/dist/components/ds-select/select-items-chips.js +73 -22
  118. package/dist/components/ds-select/select-items-chips.js.map +1 -1
  119. package/dist/components/ds-smart-tabs/ds-smart-tabs.cjs +208 -46
  120. package/dist/components/ds-smart-tabs/ds-smart-tabs.d.cts +2 -2
  121. package/dist/components/ds-smart-tabs/ds-smart-tabs.d.cts.map +1 -1
  122. package/dist/components/ds-smart-tabs/ds-smart-tabs.d.ts +2 -2
  123. package/dist/components/ds-smart-tabs/ds-smart-tabs.d.ts.map +1 -1
  124. package/dist/components/ds-smart-tabs/ds-smart-tabs.js +208 -46
  125. package/dist/components/ds-smart-tabs/ds-smart-tabs.js.map +1 -1
  126. package/dist/components/ds-smart-tabs/ds-smart-tabs.types.js.map +1 -1
  127. package/dist/components/ds-spinner/ds-spinner.cjs +90 -20
  128. package/dist/components/ds-spinner/ds-spinner.js +90 -20
  129. package/dist/components/ds-spinner/ds-spinner.js.map +1 -1
  130. package/dist/components/ds-spinner/ds-spinner.types.js.map +1 -1
  131. package/dist/components/ds-status-badge/ds-status-badge.cjs +54 -11
  132. package/dist/components/ds-status-badge/ds-status-badge.js +54 -11
  133. package/dist/components/ds-status-badge/ds-status-badge.js.map +1 -1
  134. package/dist/components/ds-stepper/components/ds-step-content.cjs +59 -13
  135. package/dist/components/ds-stepper/components/ds-step-content.d.cts +2 -2
  136. package/dist/components/ds-stepper/components/ds-step-content.d.ts +2 -2
  137. package/dist/components/ds-stepper/components/ds-step-content.js +59 -13
  138. package/dist/components/ds-stepper/components/ds-step-content.js.map +1 -1
  139. package/dist/components/ds-stepper/components/ds-step-description.cjs +14 -5
  140. package/dist/components/ds-stepper/components/ds-step-description.js +14 -5
  141. package/dist/components/ds-stepper/components/ds-step-description.js.map +1 -1
  142. package/dist/components/ds-stepper/components/ds-step-label.cjs +14 -5
  143. package/dist/components/ds-stepper/components/ds-step-label.js +14 -5
  144. package/dist/components/ds-stepper/components/ds-step-label.js.map +1 -1
  145. package/dist/components/ds-stepper/components/ds-step-next-button.cjs +23 -6
  146. package/dist/components/ds-stepper/components/ds-step-next-button.d.cts +2 -2
  147. package/dist/components/ds-stepper/components/ds-step-next-button.d.ts +2 -2
  148. package/dist/components/ds-stepper/components/ds-step-next-button.js +23 -6
  149. package/dist/components/ds-stepper/components/ds-step-next-button.js.map +1 -1
  150. package/dist/components/ds-stepper/components/ds-step.cjs +106 -25
  151. package/dist/components/ds-stepper/components/ds-step.d.cts +2 -2
  152. package/dist/components/ds-stepper/components/ds-step.d.ts +2 -2
  153. package/dist/components/ds-stepper/components/ds-step.js +106 -25
  154. package/dist/components/ds-stepper/components/ds-step.js.map +1 -1
  155. package/dist/components/ds-stepper/ds-stepper.cjs +62 -15
  156. package/dist/components/ds-stepper/ds-stepper.d.cts +2 -2
  157. package/dist/components/ds-stepper/ds-stepper.d.cts.map +1 -1
  158. package/dist/components/ds-stepper/ds-stepper.d.ts +2 -2
  159. package/dist/components/ds-stepper/ds-stepper.js +62 -15
  160. package/dist/components/ds-stepper/ds-stepper.js.map +1 -1
  161. package/dist/components/ds-stepper/hooks/use-stepper.js.map +1 -1
  162. package/dist/components/ds-stepper/hooks/use-steps.cjs +29 -9
  163. package/dist/components/ds-stepper/hooks/use-steps.js +29 -9
  164. package/dist/components/ds-stepper/hooks/use-steps.js.map +1 -1
  165. package/dist/components/ds-system-status/ds-system-status.cjs +37 -7
  166. package/dist/components/ds-system-status/ds-system-status.js +37 -7
  167. package/dist/components/ds-system-status/ds-system-status.js.map +1 -1
  168. package/dist/components/ds-system-status/ds-system-status.types.js.map +1 -1
  169. package/dist/components/ds-table/components/core-table/core-table.cjs +281 -48
  170. package/dist/components/ds-table/components/core-table/core-table.js +281 -48
  171. package/dist/components/ds-table/components/core-table/core-table.js.map +1 -1
  172. package/dist/components/ds-table/components/ds-table-bulk-actions/ds-table-bulk-actions.cjs +134 -50
  173. package/dist/components/ds-table/components/ds-table-bulk-actions/ds-table-bulk-actions.js +134 -50
  174. package/dist/components/ds-table/components/ds-table-bulk-actions/ds-table-bulk-actions.js.map +1 -1
  175. package/dist/components/ds-table/components/ds-table-cell/ds-table-cell.cjs +140 -43
  176. package/dist/components/ds-table/components/ds-table-cell/ds-table-cell.js +140 -43
  177. package/dist/components/ds-table/components/ds-table-cell/ds-table-cell.js.map +1 -1
  178. package/dist/components/ds-table/components/ds-table-header/ds-table-header.cjs +37 -6
  179. package/dist/components/ds-table/components/ds-table-header/ds-table-header.js +37 -6
  180. package/dist/components/ds-table/components/ds-table-header/ds-table-header.js.map +1 -1
  181. package/dist/components/ds-table/components/ds-table-row/ds-table-row.cjs +272 -100
  182. package/dist/components/ds-table/components/ds-table-row/ds-table-row.js +272 -100
  183. package/dist/components/ds-table/components/ds-table-row/ds-table-row.js.map +1 -1
  184. package/dist/components/ds-table/context/ds-table-context.js.map +1 -1
  185. package/dist/components/ds-table/ds-table.cjs +15 -15
  186. package/dist/components/ds-table/ds-table.d.cts +2 -2
  187. package/dist/components/ds-table/ds-table.js +15 -15
  188. package/dist/components/ds-table/ds-table.js.map +1 -1
  189. package/dist/components/ds-table/hooks/use-drag-and-drop.cjs +126 -38
  190. package/dist/components/ds-table/hooks/use-drag-and-drop.js +126 -38
  191. package/dist/components/ds-table/hooks/use-drag-and-drop.js.map +1 -1
  192. package/dist/components/ds-table/utils/column-styling.js.map +1 -1
  193. package/dist/components/ds-table/utils/create-columns-grid-template.js.map +1 -1
  194. package/dist/components/ds-table/utils/merge-refs.js.map +1 -1
  195. package/dist/components/ds-text-input/ds-text-input.cjs +128 -43
  196. package/dist/components/ds-text-input/ds-text-input.js +128 -43
  197. package/dist/components/ds-text-input/ds-text-input.js.map +1 -1
  198. package/dist/components/ds-text-input/ds-text-input.types.js.map +1 -1
  199. package/dist/components/ds-textarea/ds-textarea.cjs +66 -22
  200. package/dist/components/ds-textarea/ds-textarea.js +66 -22
  201. package/dist/components/ds-textarea/ds-textarea.js.map +1 -1
  202. package/dist/components/ds-toast/ds-toast-context.cjs +62 -17
  203. package/dist/components/ds-toast/ds-toast-context.js +62 -17
  204. package/dist/components/ds-toast/ds-toast-context.js.map +1 -1
  205. package/dist/components/ds-toast/ds-toast.cjs +90 -26
  206. package/dist/components/ds-toast/ds-toast.js +90 -26
  207. package/dist/components/ds-toast/ds-toast.js.map +1 -1
  208. package/dist/components/ds-tooltip/ds-tooltip.cjs +51 -13
  209. package/dist/components/ds-tooltip/ds-tooltip.js +51 -13
  210. package/dist/components/ds-tooltip/ds-tooltip.js.map +1 -1
  211. package/dist/components/ds-typography/ds-typography.cjs +51 -7
  212. package/dist/components/ds-typography/ds-typography.config.js.map +1 -1
  213. package/dist/components/ds-typography/ds-typography.js +51 -7
  214. package/dist/components/ds-typography/ds-typography.js.map +1 -1
  215. package/dist/components/ds-vertical-tabs/ds-vertical-tabs.cjs +91 -30
  216. package/dist/components/ds-vertical-tabs/ds-vertical-tabs.d.cts +5 -5
  217. package/dist/components/ds-vertical-tabs/ds-vertical-tabs.d.ts +5 -5
  218. package/dist/components/ds-vertical-tabs/ds-vertical-tabs.js +91 -30
  219. package/dist/components/ds-vertical-tabs/ds-vertical-tabs.js.map +1 -1
  220. package/dist/index.min.css +1 -1
  221. package/package.json +7 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @drivenets/design-system
2
2
 
3
+ ## 0.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 5e21f4b: Add React Compiler
8
+
3
9
  ## 0.0.3
4
10
 
5
11
  ### Patch Changes
@@ -4,6 +4,7 @@ const require_ds_icon = require('../ds-icon/ds-icon.cjs');
4
4
  require('../ds-icon/index.cjs');
5
5
  const require_ds_typography = require('../ds-typography/ds-typography.cjs');
6
6
  require('../ds-typography/index.cjs');
7
+ let react_compiler_runtime = require("react/compiler-runtime");
7
8
  let classnames = require("classnames");
8
9
  classnames = require_rolldown_runtime.__toESM(classnames);
9
10
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -13,61 +14,165 @@ let react_jsx_runtime = require("react/jsx-runtime");
13
14
  * Design system AlertBanner component
14
15
  * Controlled component that displays alert messages with different variants
15
16
  */
16
- const DsAlertBanner = ({ open, onOpenChange, inline = false, variant = "info-blue", icon, closable = false, className, style = {}, children }) => {
17
- const variantClass = {
18
- "info-neutral": require_ds_alert_banner_module.default.infoNeutral,
19
- "info-blue": require_ds_alert_banner_module.default.infoBlue,
20
- warning: require_ds_alert_banner_module.default.warning,
21
- error: require_ds_alert_banner_module.default.error,
22
- success: require_ds_alert_banner_module.default.success
23
- }[variant];
24
- const alertBannerClass = (0, classnames.default)(require_ds_alert_banner_module.default.alertBanner, inline && require_ds_alert_banner_module.default.inline, !inline && require_ds_alert_banner_module.default.global, variantClass, { [require_ds_alert_banner_module.default.hidden]: !open }, className);
25
- const handleClose = () => {
26
- onOpenChange(false);
27
- };
17
+ const DsAlertBanner = (t0) => {
18
+ const $ = (0, react_compiler_runtime.c)(20);
19
+ const { open, onOpenChange, inline: t1, variant: t2, icon, closable: t3, className, style: t4, children } = t0;
20
+ const inline = t1 === void 0 ? false : t1;
21
+ const variant = t2 === void 0 ? "info-blue" : t2;
22
+ const closable = t3 === void 0 ? false : t3;
23
+ let t5;
24
+ if ($[0] !== t4) {
25
+ t5 = t4 === void 0 ? {} : t4;
26
+ $[0] = t4;
27
+ $[1] = t5;
28
+ } else t5 = $[1];
29
+ const style = t5;
30
+ let t6;
31
+ if ($[2] !== className || $[3] !== inline || $[4] !== open || $[5] !== variant) {
32
+ const variantClass = {
33
+ "info-neutral": require_ds_alert_banner_module.default.infoNeutral,
34
+ "info-blue": require_ds_alert_banner_module.default.infoBlue,
35
+ warning: require_ds_alert_banner_module.default.warning,
36
+ error: require_ds_alert_banner_module.default.error,
37
+ success: require_ds_alert_banner_module.default.success
38
+ }[variant];
39
+ t6 = (0, classnames.default)(require_ds_alert_banner_module.default.alertBanner, inline && require_ds_alert_banner_module.default.inline, !inline && require_ds_alert_banner_module.default.global, variantClass, { [require_ds_alert_banner_module.default.hidden]: !open }, className);
40
+ $[2] = className;
41
+ $[3] = inline;
42
+ $[4] = open;
43
+ $[5] = variant;
44
+ $[6] = t6;
45
+ } else t6 = $[6];
46
+ const alertBannerClass = t6;
47
+ let t7;
48
+ if ($[7] !== onOpenChange) {
49
+ t7 = () => {
50
+ onOpenChange(false);
51
+ };
52
+ $[7] = onOpenChange;
53
+ $[8] = t7;
54
+ } else t7 = $[8];
55
+ const handleClose = t7;
28
56
  if (!open) return null;
29
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
30
- className: alertBannerClass,
31
- style,
32
- children: [
33
- icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_icon.default, {
34
- className: require_ds_alert_banner_module.default.icon,
35
- icon,
36
- size: "small",
37
- filled: true
38
- }),
39
- children,
40
- closable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
41
- type: "button",
42
- className: require_ds_alert_banner_module.default.closeButton,
43
- onClick: handleClose,
44
- "aria-label": "Close alert",
45
- "data-close": true,
46
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_icon.default, {
47
- icon: "close",
48
- size: "small"
49
- })
57
+ let t8;
58
+ if ($[9] !== icon) {
59
+ t8 = icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_icon.default, {
60
+ className: require_ds_alert_banner_module.default.icon,
61
+ icon,
62
+ size: "small",
63
+ filled: true
64
+ });
65
+ $[9] = icon;
66
+ $[10] = t8;
67
+ } else t8 = $[10];
68
+ let t9;
69
+ if ($[11] !== closable || $[12] !== handleClose) {
70
+ t9 = closable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
71
+ type: "button",
72
+ className: require_ds_alert_banner_module.default.closeButton,
73
+ onClick: handleClose,
74
+ "aria-label": "Close alert",
75
+ "data-close": true,
76
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_icon.default, {
77
+ icon: "close",
78
+ size: "small"
50
79
  })
51
- ]
52
- });
80
+ });
81
+ $[11] = closable;
82
+ $[12] = handleClose;
83
+ $[13] = t9;
84
+ } else t9 = $[13];
85
+ let t10;
86
+ if ($[14] !== alertBannerClass || $[15] !== children || $[16] !== style || $[17] !== t8 || $[18] !== t9) {
87
+ t10 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
88
+ className: alertBannerClass,
89
+ style,
90
+ children: [
91
+ t8,
92
+ children,
93
+ t9
94
+ ]
95
+ });
96
+ $[14] = alertBannerClass;
97
+ $[15] = children;
98
+ $[16] = style;
99
+ $[17] = t8;
100
+ $[18] = t9;
101
+ $[19] = t10;
102
+ } else t10 = $[19];
103
+ return t10;
104
+ };
105
+ const Title = (t0) => {
106
+ const $ = (0, react_compiler_runtime.c)(6);
107
+ const { style, className, children } = t0;
108
+ let t1;
109
+ if ($[0] !== className) {
110
+ t1 = (0, classnames.default)(require_ds_alert_banner_module.default.title, className);
111
+ $[0] = className;
112
+ $[1] = t1;
113
+ } else t1 = $[1];
114
+ let t2;
115
+ if ($[2] !== children || $[3] !== style || $[4] !== t1) {
116
+ t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_typography.default, {
117
+ style,
118
+ className: t1,
119
+ variant: "body-md-md",
120
+ children
121
+ });
122
+ $[2] = children;
123
+ $[3] = style;
124
+ $[4] = t1;
125
+ $[5] = t2;
126
+ } else t2 = $[5];
127
+ return t2;
128
+ };
129
+ const Body = (t0) => {
130
+ const $ = (0, react_compiler_runtime.c)(6);
131
+ const { style, className, children } = t0;
132
+ let t1;
133
+ if ($[0] !== className) {
134
+ t1 = (0, classnames.default)(require_ds_alert_banner_module.default.description, className);
135
+ $[0] = className;
136
+ $[1] = t1;
137
+ } else t1 = $[1];
138
+ let t2;
139
+ if ($[2] !== children || $[3] !== style || $[4] !== t1) {
140
+ t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_typography.default, {
141
+ style,
142
+ className: t1,
143
+ variant: "body-sm-reg",
144
+ children
145
+ });
146
+ $[2] = children;
147
+ $[3] = style;
148
+ $[4] = t1;
149
+ $[5] = t2;
150
+ } else t2 = $[5];
151
+ return t2;
152
+ };
153
+ const Actions = (t0) => {
154
+ const $ = (0, react_compiler_runtime.c)(6);
155
+ const { style, className, children } = t0;
156
+ let t1;
157
+ if ($[0] !== className) {
158
+ t1 = (0, classnames.default)(require_ds_alert_banner_module.default.actions, className);
159
+ $[0] = className;
160
+ $[1] = t1;
161
+ } else t1 = $[1];
162
+ let t2;
163
+ if ($[2] !== children || $[3] !== style || $[4] !== t1) {
164
+ t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
165
+ style,
166
+ className: t1,
167
+ children
168
+ });
169
+ $[2] = children;
170
+ $[3] = style;
171
+ $[4] = t1;
172
+ $[5] = t2;
173
+ } else t2 = $[5];
174
+ return t2;
53
175
  };
54
- const Title = ({ style, className, children }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_typography.default, {
55
- style,
56
- className: (0, classnames.default)(require_ds_alert_banner_module.default.title, className),
57
- variant: "body-md-md",
58
- children
59
- });
60
- const Body = ({ style, className, children }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_typography.default, {
61
- style,
62
- className: (0, classnames.default)(require_ds_alert_banner_module.default.description, className),
63
- variant: "body-sm-reg",
64
- children
65
- });
66
- const Actions = ({ style, className, children }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
67
- style,
68
- className: (0, classnames.default)(require_ds_alert_banner_module.default.actions, className),
69
- children
70
- });
71
176
  DsAlertBanner.Title = Title;
72
177
  DsAlertBanner.Body = Body;
73
178
  DsAlertBanner.Actions = Actions;
@@ -1,5 +1,5 @@
1
1
  import { DsAlertBannerProps } from "./ds-alert-banner.types.cjs";
2
- import * as react_jsx_runtime18 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
  import { CSSProperties, ReactNode } from "react";
4
4
 
5
5
  //#region src/components/ds-alert-banner/ds-alert-banner.d.ts
@@ -19,7 +19,7 @@ declare const DsAlertBanner: {
19
19
  className,
20
20
  style,
21
21
  children
22
- }: DsAlertBannerProps): react_jsx_runtime18.JSX.Element | null;
22
+ }: DsAlertBannerProps): react_jsx_runtime0.JSX.Element | null;
23
23
  Title: ({
24
24
  style,
25
25
  className,
@@ -28,7 +28,7 @@ declare const DsAlertBanner: {
28
28
  style?: CSSProperties;
29
29
  className?: string;
30
30
  children: ReactNode;
31
- }) => react_jsx_runtime18.JSX.Element;
31
+ }) => react_jsx_runtime0.JSX.Element;
32
32
  Body: ({
33
33
  style,
34
34
  className,
@@ -37,7 +37,7 @@ declare const DsAlertBanner: {
37
37
  style?: CSSProperties;
38
38
  className?: string;
39
39
  children: ReactNode;
40
- }) => react_jsx_runtime18.JSX.Element;
40
+ }) => react_jsx_runtime0.JSX.Element;
41
41
  Actions: ({
42
42
  style,
43
43
  className,
@@ -46,7 +46,7 @@ declare const DsAlertBanner: {
46
46
  style?: CSSProperties;
47
47
  className?: string;
48
48
  children: ReactNode;
49
- }) => react_jsx_runtime18.JSX.Element;
49
+ }) => react_jsx_runtime0.JSX.Element;
50
50
  };
51
51
  //#endregion
52
52
  export { DsAlertBanner };
@@ -1 +1 @@
1
- {"version":3,"file":"ds-alert-banner.d.cts","names":[],"sources":["../../../src/components/ds-alert-banner/ds-alert-banner.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAGkE;cAQ5D;;;;;;;;;;;KAUH,qBAAkB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;;;YAoDZ;;cAEE;QACV,mBAAA,CAAA,GAAA,CAAA;;;;;;YAWQ;IAlEN,SAAA,CAAA,EAAA,MAAA;IAAkB,QAAA,EAoEV,SApEU;QAqEpB,mBAAA,CAAA,GAAA,CAAA;;;;;EAdA;YAyBQ;IA5BA,SAAA,CAAA,EAAA,MAAA;IAEE,QAAA,EA4BA,SA5BA;EACV,CAAA,EAAA,GA4BA,mBAAA,CAAA,GAAA,CAAA,OA5BA"}
1
+ {"version":3,"file":"ds-alert-banner.d.cts","names":[],"sources":["../../../src/components/ds-alert-banner/ds-alert-banner.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAGkE;cAQ5D;;;;;;;;;;;KAUH,qBAAkB,kBAAA,CAAA,GAAA,CAAA,OAAA;;;;;;YAoDZ;;cAEE;QACV,kBAAA,CAAA,GAAA,CAAA;;;;;;YAWQ;IAlEN,SAAA,CAAA,EAAA,MAAA;IAAkB,QAAA,EAoEV,SApEU;QAqEpB,kBAAA,CAAA,GAAA,CAAA;;;;;EAdA;YAyBQ;IA5BA,SAAA,CAAA,EAAA,MAAA;IAEE,QAAA,EA4BA,SA5BA;EACV,CAAA,EAAA,GA4BA,kBAAA,CAAA,GAAA,CAAA,OA5BA"}
@@ -3,6 +3,7 @@ import ds_icon_default from "../ds-icon/ds-icon.js";
3
3
  import "../ds-icon/index.js";
4
4
  import ds_typography_default from "../ds-typography/ds-typography.js";
5
5
  import "../ds-typography/index.js";
6
+ import { c } from "react/compiler-runtime";
6
7
  import classNames from "classnames";
7
8
  import { jsx, jsxs } from "react/jsx-runtime";
8
9
 
@@ -11,61 +12,165 @@ import { jsx, jsxs } from "react/jsx-runtime";
11
12
  * Design system AlertBanner component
12
13
  * Controlled component that displays alert messages with different variants
13
14
  */
14
- const DsAlertBanner = ({ open, onOpenChange, inline = false, variant = "info-blue", icon, closable = false, className, style = {}, children }) => {
15
- const variantClass = {
16
- "info-neutral": ds_alert_banner_module_default.infoNeutral,
17
- "info-blue": ds_alert_banner_module_default.infoBlue,
18
- warning: ds_alert_banner_module_default.warning,
19
- error: ds_alert_banner_module_default.error,
20
- success: ds_alert_banner_module_default.success
21
- }[variant];
22
- const alertBannerClass = classNames(ds_alert_banner_module_default.alertBanner, inline && ds_alert_banner_module_default.inline, !inline && ds_alert_banner_module_default.global, variantClass, { [ds_alert_banner_module_default.hidden]: !open }, className);
23
- const handleClose = () => {
24
- onOpenChange(false);
25
- };
15
+ const DsAlertBanner = (t0) => {
16
+ const $ = c(20);
17
+ const { open, onOpenChange, inline: t1, variant: t2, icon, closable: t3, className, style: t4, children } = t0;
18
+ const inline = t1 === void 0 ? false : t1;
19
+ const variant = t2 === void 0 ? "info-blue" : t2;
20
+ const closable = t3 === void 0 ? false : t3;
21
+ let t5;
22
+ if ($[0] !== t4) {
23
+ t5 = t4 === void 0 ? {} : t4;
24
+ $[0] = t4;
25
+ $[1] = t5;
26
+ } else t5 = $[1];
27
+ const style = t5;
28
+ let t6;
29
+ if ($[2] !== className || $[3] !== inline || $[4] !== open || $[5] !== variant) {
30
+ const variantClass = {
31
+ "info-neutral": ds_alert_banner_module_default.infoNeutral,
32
+ "info-blue": ds_alert_banner_module_default.infoBlue,
33
+ warning: ds_alert_banner_module_default.warning,
34
+ error: ds_alert_banner_module_default.error,
35
+ success: ds_alert_banner_module_default.success
36
+ }[variant];
37
+ t6 = classNames(ds_alert_banner_module_default.alertBanner, inline && ds_alert_banner_module_default.inline, !inline && ds_alert_banner_module_default.global, variantClass, { [ds_alert_banner_module_default.hidden]: !open }, className);
38
+ $[2] = className;
39
+ $[3] = inline;
40
+ $[4] = open;
41
+ $[5] = variant;
42
+ $[6] = t6;
43
+ } else t6 = $[6];
44
+ const alertBannerClass = t6;
45
+ let t7;
46
+ if ($[7] !== onOpenChange) {
47
+ t7 = () => {
48
+ onOpenChange(false);
49
+ };
50
+ $[7] = onOpenChange;
51
+ $[8] = t7;
52
+ } else t7 = $[8];
53
+ const handleClose = t7;
26
54
  if (!open) return null;
27
- return /* @__PURE__ */ jsxs("div", {
28
- className: alertBannerClass,
29
- style,
30
- children: [
31
- icon && /* @__PURE__ */ jsx(ds_icon_default, {
32
- className: ds_alert_banner_module_default.icon,
33
- icon,
34
- size: "small",
35
- filled: true
36
- }),
37
- children,
38
- closable && /* @__PURE__ */ jsx("button", {
39
- type: "button",
40
- className: ds_alert_banner_module_default.closeButton,
41
- onClick: handleClose,
42
- "aria-label": "Close alert",
43
- "data-close": true,
44
- children: /* @__PURE__ */ jsx(ds_icon_default, {
45
- icon: "close",
46
- size: "small"
47
- })
55
+ let t8;
56
+ if ($[9] !== icon) {
57
+ t8 = icon && /* @__PURE__ */ jsx(ds_icon_default, {
58
+ className: ds_alert_banner_module_default.icon,
59
+ icon,
60
+ size: "small",
61
+ filled: true
62
+ });
63
+ $[9] = icon;
64
+ $[10] = t8;
65
+ } else t8 = $[10];
66
+ let t9;
67
+ if ($[11] !== closable || $[12] !== handleClose) {
68
+ t9 = closable && /* @__PURE__ */ jsx("button", {
69
+ type: "button",
70
+ className: ds_alert_banner_module_default.closeButton,
71
+ onClick: handleClose,
72
+ "aria-label": "Close alert",
73
+ "data-close": true,
74
+ children: /* @__PURE__ */ jsx(ds_icon_default, {
75
+ icon: "close",
76
+ size: "small"
48
77
  })
49
- ]
50
- });
78
+ });
79
+ $[11] = closable;
80
+ $[12] = handleClose;
81
+ $[13] = t9;
82
+ } else t9 = $[13];
83
+ let t10;
84
+ if ($[14] !== alertBannerClass || $[15] !== children || $[16] !== style || $[17] !== t8 || $[18] !== t9) {
85
+ t10 = /* @__PURE__ */ jsxs("div", {
86
+ className: alertBannerClass,
87
+ style,
88
+ children: [
89
+ t8,
90
+ children,
91
+ t9
92
+ ]
93
+ });
94
+ $[14] = alertBannerClass;
95
+ $[15] = children;
96
+ $[16] = style;
97
+ $[17] = t8;
98
+ $[18] = t9;
99
+ $[19] = t10;
100
+ } else t10 = $[19];
101
+ return t10;
102
+ };
103
+ const Title = (t0) => {
104
+ const $ = c(6);
105
+ const { style, className, children } = t0;
106
+ let t1;
107
+ if ($[0] !== className) {
108
+ t1 = classNames(ds_alert_banner_module_default.title, className);
109
+ $[0] = className;
110
+ $[1] = t1;
111
+ } else t1 = $[1];
112
+ let t2;
113
+ if ($[2] !== children || $[3] !== style || $[4] !== t1) {
114
+ t2 = /* @__PURE__ */ jsx(ds_typography_default, {
115
+ style,
116
+ className: t1,
117
+ variant: "body-md-md",
118
+ children
119
+ });
120
+ $[2] = children;
121
+ $[3] = style;
122
+ $[4] = t1;
123
+ $[5] = t2;
124
+ } else t2 = $[5];
125
+ return t2;
126
+ };
127
+ const Body = (t0) => {
128
+ const $ = c(6);
129
+ const { style, className, children } = t0;
130
+ let t1;
131
+ if ($[0] !== className) {
132
+ t1 = classNames(ds_alert_banner_module_default.description, className);
133
+ $[0] = className;
134
+ $[1] = t1;
135
+ } else t1 = $[1];
136
+ let t2;
137
+ if ($[2] !== children || $[3] !== style || $[4] !== t1) {
138
+ t2 = /* @__PURE__ */ jsx(ds_typography_default, {
139
+ style,
140
+ className: t1,
141
+ variant: "body-sm-reg",
142
+ children
143
+ });
144
+ $[2] = children;
145
+ $[3] = style;
146
+ $[4] = t1;
147
+ $[5] = t2;
148
+ } else t2 = $[5];
149
+ return t2;
150
+ };
151
+ const Actions = (t0) => {
152
+ const $ = c(6);
153
+ const { style, className, children } = t0;
154
+ let t1;
155
+ if ($[0] !== className) {
156
+ t1 = classNames(ds_alert_banner_module_default.actions, className);
157
+ $[0] = className;
158
+ $[1] = t1;
159
+ } else t1 = $[1];
160
+ let t2;
161
+ if ($[2] !== children || $[3] !== style || $[4] !== t1) {
162
+ t2 = /* @__PURE__ */ jsx("div", {
163
+ style,
164
+ className: t1,
165
+ children
166
+ });
167
+ $[2] = children;
168
+ $[3] = style;
169
+ $[4] = t1;
170
+ $[5] = t2;
171
+ } else t2 = $[5];
172
+ return t2;
51
173
  };
52
- const Title = ({ style, className, children }) => /* @__PURE__ */ jsx(ds_typography_default, {
53
- style,
54
- className: classNames(ds_alert_banner_module_default.title, className),
55
- variant: "body-md-md",
56
- children
57
- });
58
- const Body = ({ style, className, children }) => /* @__PURE__ */ jsx(ds_typography_default, {
59
- style,
60
- className: classNames(ds_alert_banner_module_default.description, className),
61
- variant: "body-sm-reg",
62
- children
63
- });
64
- const Actions = ({ style, className, children }) => /* @__PURE__ */ jsx("div", {
65
- style,
66
- className: classNames(ds_alert_banner_module_default.actions, className),
67
- children
68
- });
69
174
  DsAlertBanner.Title = Title;
70
175
  DsAlertBanner.Body = Body;
71
176
  DsAlertBanner.Actions = Actions;
@@ -1 +1 @@
1
- {"version":3,"file":"ds-alert-banner.js","names":["styles","DsIcon","DsTypography"],"sources":["../../../src/components/ds-alert-banner/ds-alert-banner.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode } from 'react';\nimport classNames from 'classnames';\nimport styles from './ds-alert-banner.module.scss';\nimport type { DsAlertBannerProps } from './ds-alert-banner.types';\nimport { DsIcon } from '../ds-icon';\nimport { DsTypography } from '../ds-typography';\n\n/**\n * Design system AlertBanner component\n * Controlled component that displays alert messages with different variants\n */\nconst DsAlertBanner = ({\n\topen,\n\tonOpenChange,\n\tinline = false,\n\tvariant = 'info-blue',\n\ticon,\n\tclosable = false,\n\tclassName,\n\tstyle = {},\n\tchildren,\n}: DsAlertBannerProps) => {\n\tconst variantClass = {\n\t\t'info-neutral': styles.infoNeutral,\n\t\t'info-blue': styles.infoBlue,\n\t\twarning: styles.warning,\n\t\terror: styles.error,\n\t\tsuccess: styles.success,\n\t}[variant];\n\n\tconst alertBannerClass = classNames(\n\t\tstyles.alertBanner,\n\t\tinline && styles.inline,\n\t\t!inline && styles.global,\n\t\tvariantClass,\n\t\t{\n\t\t\t[styles.hidden]: !open,\n\t\t},\n\t\tclassName,\n\t);\n\n\tconst handleClose = () => {\n\t\tonOpenChange(false);\n\t};\n\n\tif (!open) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div className={alertBannerClass} style={style}>\n\t\t\t{icon && <DsIcon className={styles.icon} icon={icon} size=\"small\" filled />}\n\t\t\t{children}\n\t\t\t{closable && (\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclassName={styles.closeButton}\n\t\t\t\t\tonClick={handleClose}\n\t\t\t\t\taria-label=\"Close alert\"\n\t\t\t\t\tdata-close\n\t\t\t\t>\n\t\t\t\t\t<DsIcon icon=\"close\" size=\"small\" />\n\t\t\t\t</button>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nconst Title = ({\n\tstyle,\n\tclassName,\n\tchildren,\n}: {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n\tchildren: ReactNode;\n}) => (\n\t<DsTypography style={style} className={classNames(styles.title, className)} variant=\"body-md-md\">\n\t\t{children}\n\t</DsTypography>\n);\n\nconst Body = ({\n\tstyle,\n\tclassName,\n\tchildren,\n}: {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n\tchildren: ReactNode;\n}) => (\n\t<DsTypography style={style} className={classNames(styles.description, className)} variant=\"body-sm-reg\">\n\t\t{children}\n\t</DsTypography>\n);\n\nconst Actions = ({\n\tstyle,\n\tclassName,\n\tchildren,\n}: {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n\tchildren: ReactNode;\n}) => (\n\t<div style={style} className={classNames(styles.actions, className)}>\n\t\t{children}\n\t</div>\n);\n\nDsAlertBanner.Title = Title;\nDsAlertBanner.Body = Body;\nDsAlertBanner.Actions = Actions;\n\nexport default DsAlertBanner;\n"],"mappings":";;;;;;;;;;;;;AAWA,MAAM,iBAAiB,EACtB,MACA,cACA,SAAS,OACT,UAAU,aACV,MACA,WAAW,OACX,WACA,QAAQ,EAAE,EACV,eACyB;CACzB,MAAM,eAAe;EACpB,gBAAgBA,+BAAO;EACvB,aAAaA,+BAAO;EACpB,SAASA,+BAAO;EAChB,OAAOA,+BAAO;EACd,SAASA,+BAAO;EAChB,CAAC;CAEF,MAAM,mBAAmB,WACxBA,+BAAO,aACP,UAAUA,+BAAO,QACjB,CAAC,UAAUA,+BAAO,QAClB,cACA,GACEA,+BAAO,SAAS,CAAC,MAClB,EACD,UACA;CAED,MAAM,oBAAoB;AACzB,eAAa,MAAM;;AAGpB,KAAI,CAAC,KACJ,QAAO;AAGR,QACC,qBAAC;EAAI,WAAW;EAAyB;;GACvC,QAAQ,oBAACC;IAAO,WAAWD,+BAAO;IAAY;IAAM,MAAK;IAAQ;KAAS;GAC1E;GACA,YACA,oBAAC;IACA,MAAK;IACL,WAAWA,+BAAO;IAClB,SAAS;IACT,cAAW;IACX;cAEA,oBAACC;KAAO,MAAK;KAAQ,MAAK;MAAU;KAC5B;;GAEL;;AAIR,MAAM,SAAS,EACd,OACA,WACA,eAMA,oBAACC;CAAoB;CAAO,WAAW,WAAWF,+BAAO,OAAO,UAAU;CAAE,SAAQ;CAClF;EACa;AAGhB,MAAM,QAAQ,EACb,OACA,WACA,eAMA,oBAACE;CAAoB;CAAO,WAAW,WAAWF,+BAAO,aAAa,UAAU;CAAE,SAAQ;CACxF;EACa;AAGhB,MAAM,WAAW,EAChB,OACA,WACA,eAMA,oBAAC;CAAW;CAAO,WAAW,WAAWA,+BAAO,SAAS,UAAU;CACjE;EACI;AAGP,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,UAAU;AAExB,8BAAe"}
1
+ {"version":3,"file":"ds-alert-banner.js","names":["CSSProperties","ReactNode","classNames","styles","DsAlertBannerProps","DsIcon","DsTypography","DsAlertBanner","t0","$","_c","open","onOpenChange","inline","t1","variant","t2","icon","closable","t3","className","style","t4","children","undefined","t5","t6","variantClass","infoNeutral","infoBlue","warning","error","success","alertBanner","global","hidden","alertBannerClass","t7","handleClose","t8","t9","closeButton","t10","Title","title","Body","description","Actions","actions"],"sources":["../../../src/components/ds-alert-banner/ds-alert-banner.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode } from 'react';\nimport classNames from 'classnames';\nimport styles from './ds-alert-banner.module.scss';\nimport type { DsAlertBannerProps } from './ds-alert-banner.types';\nimport { DsIcon } from '../ds-icon';\nimport { DsTypography } from '../ds-typography';\n\n/**\n * Design system AlertBanner component\n * Controlled component that displays alert messages with different variants\n */\nconst DsAlertBanner = ({\n\topen,\n\tonOpenChange,\n\tinline = false,\n\tvariant = 'info-blue',\n\ticon,\n\tclosable = false,\n\tclassName,\n\tstyle = {},\n\tchildren,\n}: DsAlertBannerProps) => {\n\tconst variantClass = {\n\t\t'info-neutral': styles.infoNeutral,\n\t\t'info-blue': styles.infoBlue,\n\t\twarning: styles.warning,\n\t\terror: styles.error,\n\t\tsuccess: styles.success,\n\t}[variant];\n\n\tconst alertBannerClass = classNames(\n\t\tstyles.alertBanner,\n\t\tinline && styles.inline,\n\t\t!inline && styles.global,\n\t\tvariantClass,\n\t\t{\n\t\t\t[styles.hidden]: !open,\n\t\t},\n\t\tclassName,\n\t);\n\n\tconst handleClose = () => {\n\t\tonOpenChange(false);\n\t};\n\n\tif (!open) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div className={alertBannerClass} style={style}>\n\t\t\t{icon && <DsIcon className={styles.icon} icon={icon} size=\"small\" filled />}\n\t\t\t{children}\n\t\t\t{closable && (\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclassName={styles.closeButton}\n\t\t\t\t\tonClick={handleClose}\n\t\t\t\t\taria-label=\"Close alert\"\n\t\t\t\t\tdata-close\n\t\t\t\t>\n\t\t\t\t\t<DsIcon icon=\"close\" size=\"small\" />\n\t\t\t\t</button>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nconst Title = ({\n\tstyle,\n\tclassName,\n\tchildren,\n}: {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n\tchildren: ReactNode;\n}) => (\n\t<DsTypography style={style} className={classNames(styles.title, className)} variant=\"body-md-md\">\n\t\t{children}\n\t</DsTypography>\n);\n\nconst Body = ({\n\tstyle,\n\tclassName,\n\tchildren,\n}: {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n\tchildren: ReactNode;\n}) => (\n\t<DsTypography style={style} className={classNames(styles.description, className)} variant=\"body-sm-reg\">\n\t\t{children}\n\t</DsTypography>\n);\n\nconst Actions = ({\n\tstyle,\n\tclassName,\n\tchildren,\n}: {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n\tchildren: ReactNode;\n}) => (\n\t<div style={style} className={classNames(styles.actions, className)}>\n\t\t{children}\n\t</div>\n);\n\nDsAlertBanner.Title = Title;\nDsAlertBan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Ad,IAAA,KAAAY;AAAAZ,IAAA,KAAAK;AAAAL,IAAA,KAAAO;OAAAA,MAAAP,EAAA;AAAA,QAFNO;;AAKDT,cAAcoC,QAAQA;AACtBpC,cAAcsC,OAAOA;AACrBtC,cAAcwC,UAAUA;AAExB,8BAAexC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ds-alert-banner.types.d.cts","names":[],"sources":["../../../src/components/ds-alert-banner/ds-alert-banner.types.tsx"],"sourcesContent":[],"mappings":";;;;cAIa;AAAA,KACD,kBAAA,GAD4F,CAAA,OAC/D,mBAD+D,CAAA,CAAA,MAAA,CAAA;AAC5F,UAEK,kBAAA,CAFa;EAEb;;;EAkCR,IAAM,EAAA,OAAA;EAIH;;;;;;;;;;;;;YApBD;;;;SAIH;;;;;;;;;;;;UAYC,KAAA,CAAM;;;;aAIH"}
1
+ {"version":3,"file":"ds-alert-banner.types.d.cts","names":[],"sources":["../../../src/components/ds-alert-banner/ds-alert-banner.types.tsx"],"sourcesContent":[],"mappings":";;;;cAIa;AAAA,KACD,kBAAA,GAD4F,CAAA,OAC/D,mBAD+D,CAAA,CAAA,MAAA,CAAA;AAC5F,UAEK,kBAAA,CAFwB;EAExB;;;EAkCR,IAAM,EAAA,OAAA;EAIH;;;;;;;;;;;;;YApBD;;;;SAIH;;;;;;;;;;;;UAYC,KAAA,CAAM;;;;aAIH"}
@@ -1 +1 @@
1
- {"version":3,"file":"ds-alert-banner.types.js","names":[],"sources":["../../../src/components/ds-alert-banner/ds-alert-banner.types.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport type React from 'react';\nimport type { IconType } from '../ds-icon';\n\nexport const alertBannerVariants = ['info-neutral', 'info-blue', 'warning', 'error', 'success'] as const;\nexport type AlertBannerVariant = (typeof alertBannerVariants)[number];\n\nexport interface DsAlertBannerProps {\n\t/**\n\t * Controls whether the alert banner is visible\n\t */\n\topen: boolean;\n\t/**\n\t * Callback fired when the alert banner should be closed\n\t */\n\tonOpenChange: (open: boolean) => void;\n\t/**\n\t * Whether the alert banner should be inline (normal document flow) instead of global (designed for top of the page)\n\t * @default false\n\t */\n\tinline?: boolean;\n\t/**\n\t * The variant of the alert banner\n\t * @default 'info-blue'\n\t */\n\tvariant?: AlertBannerVariant;\n\t/**\n\t * Optional icon to display using DsIcon\n\t */\n\ticon?: IconType;\n\t/**\n\t * Whether the alert banner can be closed with an X button\n\t */\n\tclosable?: boolean;\n\t/**\n\t * Additional CSS class names\n\t */\n\tclassName?: string;\n\t/**\n\t * Additional styles to apply to the component\n\t */\n\tstyle?: React.CSSProperties;\n\t/**\n\t * Optional children to be rendered inside the component (typically action buttons)\n\t */\n\tchildren?: ReactNode;\n}\n"],"mappings":";AAIA,MAAa,sBAAsB;CAAC;CAAgB;CAAa;CAAW;CAAS;CAAU"}
1
+ {"version":3,"file":"ds-alert-banner.types.js","names":["ReactNode","React","IconType","alertBannerVariants","const","AlertBannerVariant","DsAlertBannerProps","open","onOpenChange","inline","variant","icon","closable","className","style","CSSProperties","children"],"sources":["../../../src/components/ds-alert-banner/ds-alert-banner.types.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport type React from 'react';\nimport type { IconType } from '../ds-icon';\n\nexport const alertBannerVariants = ['info-neutral', 'info-blue', 'warning', 'error', 'success'] as const;\nexport type AlertBannerVariant = (typeof alertBannerVariants)[number];\n\nexport interface DsAlertBannerProps {\n\t/**\n\t * Controls whether the alert banner is visible\n\t */\n\topen: boolean;\n\t/**\n\t * Callback fired when the alert banner should be closed\n\t */\n\tonOpenChange: (open: boolean) => void;\n\t/**\n\t * Whether the alert banner should be inline (normal document flow) instead of global (designed for top of the page)\n\t * @default false\n\t */\n\tinline?: boolean;\n\t/**\n\t * The variant of the alert banner\n\t * @default 'info-blue'\n\t */\n\tvariant?: AlertBannerVariant;\n\t/**\n\t * Optional icon to display using DsIcon\n\t */\n\ticon?: IconType;\n\t/**\n\t * Whether the alert banner can be closed with an X button\n\t */\n\tclosable?: boolean;\n\t/**\n\t * Additional CSS class names\n\t */\n\tclassName?: string;\n\t/**\n\t * Additional styles to apply to the component\n\t */\n\tstyle?: React.CSSProperties;\n\t/**\n\t * Optional children to be rendered inside the component (typically action buttons)\n\t */\n\tchildren?: ReactNode;\n}\n"],"mappings":";AAIA,MAAaG,sBAAsB;CAAC;CAAgB;CAAa;CAAW;CAAS;CAAU"}