@dynamic-framework/ui-react 1.36.2 → 2.0.0-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/dist/css/dynamic-ui-non-root.css +7220 -3665
  2. package/dist/css/dynamic-ui-non-root.min.css +2 -2
  3. package/dist/css/dynamic-ui-root.css +799 -127
  4. package/dist/css/dynamic-ui-root.min.css +2 -2
  5. package/dist/css/dynamic-ui.css +8012 -3785
  6. package/dist/css/dynamic-ui.min.css +2 -2
  7. package/dist/index.esm.js +250 -305
  8. package/dist/index.esm.js.map +1 -1
  9. package/dist/index.js +275 -314
  10. package/dist/index.js.map +1 -1
  11. package/dist/js/bootstrap.bundle.js +3 -6
  12. package/dist/js/bootstrap.bundle.min.js +2 -2
  13. package/dist/js/bootstrap.esm.js +3 -6
  14. package/dist/js/bootstrap.esm.min.js +2 -2
  15. package/dist/js/bootstrap.js +3 -6
  16. package/dist/js/bootstrap.min.js +2 -2
  17. package/dist/types/components/DAlert/DAlert.d.ts +3 -3
  18. package/dist/types/components/DAvatar/DAvatar.d.ts +1 -3
  19. package/dist/types/components/DBadge/DBadge.d.ts +4 -3
  20. package/dist/types/components/DBarChart/DBarChart.d.ts +9 -0
  21. package/dist/types/components/DBox/DBox.d.ts +5 -0
  22. package/dist/types/components/DBox/index.d.ts +2 -0
  23. package/dist/types/components/DBoxFile/useDBoxFile.d.ts +2 -2
  24. package/dist/types/components/DButton/DButton.d.ts +6 -5
  25. package/dist/types/components/DButtonIcon/DButtonIcon.d.ts +3 -3
  26. package/dist/types/components/DCarousel/components/DCarouselSlide.d.ts +3 -1
  27. package/dist/types/components/DChip/DChip.d.ts +3 -3
  28. package/dist/types/components/DCollapse/DCollapse.d.ts +2 -2
  29. package/dist/types/components/DCreditCard/DCreditCard.d.ts +12 -0
  30. package/dist/types/components/DCreditCard/index.d.ts +2 -0
  31. package/dist/types/components/DDatePicker/DDatePicker.d.ts +3 -3
  32. package/dist/types/components/DDatePicker/components/DDatePickerHeaderSelector.d.ts +2 -4
  33. package/dist/types/components/DDropdown/DDropdown.d.ts +20 -0
  34. package/dist/types/components/DDropdown/index.d.ts +2 -0
  35. package/dist/types/components/DIconBase/DIconBase.d.ts +4 -8
  36. package/dist/types/components/DInput/DInput.d.ts +2 -2
  37. package/dist/types/components/DInputCounter/DInputCounter.d.ts +2 -2
  38. package/dist/types/components/DInputCurrency/DInputCurrency.d.ts +3 -3
  39. package/dist/types/components/DInputMask/DInputMask.d.ts +1 -1
  40. package/dist/types/components/DInputPhone/DInputPhone.d.ts +2 -2
  41. package/dist/types/components/DInputPin/DInputPin.d.ts +3 -3
  42. package/dist/types/components/DInputRange/DInputRange.d.ts +2 -2
  43. package/dist/types/components/DInputSelect/DInputSelect.d.ts +3 -3
  44. package/dist/types/components/DLayout/DLayout.d.ts +11 -0
  45. package/dist/types/components/DLayout/components/DLayoutPane.d.ts +13 -0
  46. package/dist/types/components/DLayout/index.d.ts +3 -0
  47. package/dist/types/components/DListGroup/components/DListGroupItem.d.ts +4 -4
  48. package/dist/types/components/DMinimalLineChart/DMinimalLineChart.d.ts +9 -0
  49. package/dist/types/components/DMultiLineChart/DMultiLineChart.d.ts +9 -0
  50. package/dist/types/components/DOtp/DOtp.d.ts +16 -0
  51. package/dist/types/components/DOtp/DOtpspec.d.ts +0 -0
  52. package/dist/types/components/DOtp/components/OtpCountdown.d.ts +7 -0
  53. package/dist/types/components/DOtp/hooks/useCountdown.d.ts +4 -0
  54. package/dist/types/components/DOtp/index.d.ts +2 -0
  55. package/dist/types/components/DPaginator/DPaginator.d.ts +2 -27
  56. package/dist/types/components/DPieChart/DPieChart.d.ts +9 -0
  57. package/dist/types/components/DPopover/DPopover.d.ts +1 -1
  58. package/dist/types/components/DProgress/DProgress.d.ts +2 -1
  59. package/dist/types/components/DRadialBarChart/DRadialBarChart.d.ts +6 -0
  60. package/dist/types/components/DSelect/DSelect.d.ts +3 -3
  61. package/dist/types/components/DTabs/DTabs.d.ts +2 -2
  62. package/dist/types/components/DTimeline/DTimeline.d.ts +15 -0
  63. package/dist/types/components/DTimeline/index.d.ts +2 -0
  64. package/dist/types/components/DToastContainer/useDToast.d.ts +2 -2
  65. package/dist/types/components/DTooltip/DTooltip.d.ts +1 -2
  66. package/dist/types/components/index.d.ts +5 -8
  67. package/dist/types/components/interface.d.ts +3 -8
  68. package/dist/types/contexts/DContext.d.ts +0 -2
  69. package/dist/types/hooks/tests/useDisableBodyScrollEffect.spec.d.ts +1 -0
  70. package/dist/types/hooks/tests/useDisableInputWheel.spec.d.ts +1 -0
  71. package/dist/types/hooks/tests/useFormatCurrency.spec.d.ts +1 -0
  72. package/dist/types/hooks/tests/useInputCurrency.spec.d.ts +1 -0
  73. package/dist/types/hooks/tests/useItemSelection.spec.d.ts +1 -0
  74. package/dist/types/hooks/tests/useMediaBreakpointUp.spec.d.ts +1 -0
  75. package/dist/types/hooks/tests/useMediaQuery.spec.d.ts +1 -0
  76. package/dist/types/hooks/tests/usePortal.spec.d.ts +1 -0
  77. package/dist/types/hooks/tests/useProvidedRefOrCreate.spec.d.ts +1 -0
  78. package/dist/types/hooks/tests/useStackState.spec.d.ts +1 -0
  79. package/dist/types/hooks/useInputCurrency.d.ts +1 -1
  80. package/dist/types/hooks/useProvidedRefOrCreate.d.ts +1 -1
  81. package/dist/types/types/polymorphic.d.ts +3 -3
  82. package/dist/types/utils/tests/attr-accept.spec.d.ts +1 -0
  83. package/dist/types/utils/tests/changeQueryString.spec.d.ts +1 -0
  84. package/dist/types/utils/tests/configureI18n.spec.d.ts +1 -0
  85. package/dist/types/utils/tests/formatCurrency.spec.d.ts +1 -0
  86. package/dist/types/utils/tests/getCssVariable.spec.d.ts +1 -0
  87. package/dist/types/utils/tests/getKeyboardFocusableElements.spec.d.ts +1 -0
  88. package/dist/types/utils/tests/getQueryString.spec.d.ts +1 -0
  89. package/dist/types/utils/tests/mediaQuery.spec.d.ts +1 -0
  90. package/dist/types/utils/tests/validatePhoneNumber.spec.d.ts +1 -0
  91. package/jest/setup.js +94 -1
  92. package/package.json +32 -30
  93. package/src/style/_shame.scss +42 -1
  94. package/src/style/abstracts/_mixins.scss +1 -3
  95. package/src/style/abstracts/_utilities.scss +51 -1
  96. package/src/style/abstracts/variables/_+import.scss +3 -2
  97. package/src/style/abstracts/variables/_alerts.scss +2 -0
  98. package/src/style/abstracts/variables/_body.scss +10 -3
  99. package/src/style/abstracts/variables/_border.scss +5 -5
  100. package/src/style/abstracts/variables/_buttons.scss +17 -11
  101. package/src/style/abstracts/variables/_cards.scss +6 -4
  102. package/src/style/abstracts/variables/_chips.scss +2 -2
  103. package/src/style/abstracts/variables/_colors.scss +140 -69
  104. package/src/style/abstracts/variables/_datepicker.scss +10 -9
  105. package/src/style/abstracts/variables/_dropdowns.scss +6 -4
  106. package/src/style/abstracts/variables/_forms.scss +4 -4
  107. package/src/style/abstracts/variables/_list-group.scss +2 -2
  108. package/src/style/abstracts/variables/_modals.scss +4 -3
  109. package/src/style/abstracts/variables/_offcanvas.scss +1 -0
  110. package/src/style/abstracts/variables/_pagination.scss +4 -4
  111. package/src/style/abstracts/variables/_shadow.scss +1 -0
  112. package/src/style/abstracts/variables/_tables.scss +8 -3
  113. package/src/style/abstracts/variables/_tooltip.scss +1 -1
  114. package/src/style/abstracts/variables/_typography.scss +7 -7
  115. package/src/style/base/_+import.scss +1 -0
  116. package/src/style/base/_alert.scss +1 -27
  117. package/src/style/base/_badge.scss +50 -12
  118. package/src/style/base/_buttons.scss +143 -23
  119. package/src/style/base/_dropdown.scss +18 -0
  120. package/src/style/base/_input-group.scss +5 -0
  121. package/src/style/base/_list-group.scss +6 -0
  122. package/src/style/base/_pagination.scss +2 -0
  123. package/src/style/base/_tables.scss +4 -0
  124. package/src/style/base/_tooltip.scss +1 -10
  125. package/src/style/components/_+import.scss +4 -4
  126. package/src/style/components/_d-avatar.scss +2 -20
  127. package/src/style/components/_d-box.scss +13 -0
  128. package/src/style/components/_d-carousel.scss +19 -1
  129. package/src/style/components/_d-credit-card.scss +67 -0
  130. package/src/style/components/_d-datepicker.scss +64 -26
  131. package/src/style/components/_d-icon.scss +10 -3
  132. package/src/style/components/_d-modal.scss +3 -0
  133. package/src/style/components/_d-stepper-desktop.scss +61 -65
  134. package/src/style/components/_d-stepper-mobile.scss +2 -2
  135. package/src/style/components/_d-tabs.scss +37 -0
  136. package/src/style/components/_d-timeline.scss +108 -0
  137. package/src/style/helpers/_color-bg.scss +13 -3
  138. package/src/style/root/_root.scss +35 -18
  139. package/dist/css/bootstrap-icons.css +0 -2106
  140. package/dist/css/bootstrap-icons.json +0 -2080
  141. package/dist/css/bootstrap-icons.min.css +0 -5
  142. package/dist/css/bootstrap-icons.scss +0 -2118
  143. package/dist/css/fonts/bootstrap-icons.woff +0 -0
  144. package/dist/css/fonts/bootstrap-icons.woff2 +0 -0
  145. package/dist/types/components/DInputCurrencyBase/DInputCurrencyBase.d.ts +0 -26
  146. package/dist/types/components/DInputCurrencyBase/index.d.ts +0 -2
  147. package/dist/types/components/DInputSearch/DInputSearch.d.ts +0 -17
  148. package/dist/types/components/DInputSearch/index.d.ts +0 -2
  149. package/dist/types/components/DList/DList.d.ts +0 -17
  150. package/dist/types/components/DList/components/DListItem.d.ts +0 -13
  151. package/dist/types/components/DList/index.d.ts +0 -3
  152. package/dist/types/components/DQuickActionButton/DQuickActionButton.d.ts +0 -20
  153. package/dist/types/components/DQuickActionButton/index.d.ts +0 -2
  154. package/dist/types/components/DQuickActionCheck/DQuickActionCheck.d.ts +0 -17
  155. package/dist/types/components/DQuickActionCheck/index.d.ts +0 -2
  156. package/dist/types/components/DQuickActionSelect/DQuickActionSelect.d.ts +0 -13
  157. package/dist/types/components/DQuickActionSelect/index.d.ts +0 -2
  158. package/dist/types/components/DQuickActionSwitch/DQuickActionSwitch.d.ts +0 -15
  159. package/dist/types/components/DQuickActionSwitch/index.d.ts +0 -2
  160. package/dist/types/components/DSkeleton/DSkeleton.d.ts +0 -11
  161. package/dist/types/components/DSkeleton/index.d.ts +0 -2
  162. package/src/style/components/_d-quick-action-button.scss +0 -121
  163. package/src/style/components/_d-quick-action-check.scss +0 -74
  164. package/src/style/components/_d-quick-action-select.scss +0 -58
  165. package/src/style/components/_d-quick-action-switch.scss +0 -64
package/dist/index.js CHANGED
@@ -1,9 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var jsxRuntime = require('react/jsx-runtime');
4
- var React = require('react');
5
4
  var classNames = require('classnames');
5
+ var React = require('react');
6
6
  var tslib = require('tslib');
7
+ var LucideIcons = require('lucide-react');
7
8
  var reactDom = require('react-dom');
8
9
  var fileSelector = require('file-selector');
9
10
  var reactSplide = require('@splidejs/react-splide');
@@ -14,55 +15,85 @@ var Select = require('react-select');
14
15
  var mask = require('@react-input/mask');
15
16
  var ResponsivePagination = require('react-responsive-pagination');
16
17
  var react = require('@floating-ui/react');
17
- var ContentLoader = require('react-content-loader');
18
18
  var reactHotToast = require('react-hot-toast');
19
19
  var reactInternationalPhone = require('react-international-phone');
20
20
  var googleLibphonenumber = require('google-libphonenumber');
21
21
  var i18n = require('i18next');
22
22
  var reactI18next = require('react-i18next');
23
23
 
24
+ function _interopNamespaceDefault(e) {
25
+ var n = Object.create(null);
26
+ if (e) {
27
+ Object.keys(e).forEach(function (k) {
28
+ if (k !== 'default') {
29
+ var d = Object.getOwnPropertyDescriptor(e, k);
30
+ Object.defineProperty(n, k, d.get ? d : {
31
+ enumerable: true,
32
+ get: function () { return e[k]; }
33
+ });
34
+ }
35
+ });
36
+ }
37
+ n.default = e;
38
+ return Object.freeze(n);
39
+ }
40
+
41
+ var LucideIcons__namespace = /*#__PURE__*/_interopNamespaceDefault(LucideIcons);
42
+
24
43
  const PREFIX_BS = 'bs-';
25
44
 
26
- function DIconBase({ icon, theme, style, className, size, loading = false, loadingDuration = 1.8, hasCircle = false, circleSize = `calc(var(--${PREFIX_BS}icon-size) * 1)`, color, backgroundColor, materialStyle = false, familyClass = 'bi', familyPrefix = 'bi-', dataAttributes, }) {
45
+ function DIconBase({ icon, color, style, className, size, hasCircle = false, materialStyle = false, familyClass = 'material-symbols-outlined', strokeWidth = 2, dataAttributes, }) {
46
+ // If materialStyle is true, use Material Design icons (legacy)
47
+ const useMaterialIcons = materialStyle;
48
+ // Get Lucide icon component
49
+ const LucideIcon = React.useMemo(() => {
50
+ if (useMaterialIcons)
51
+ return null;
52
+ // Try to find the icon in Lucide (expects PascalCase)
53
+ const icons = LucideIcons__namespace;
54
+ return icons[icon] || null;
55
+ }, [icon, useMaterialIcons]);
27
56
  const colorStyle = React.useMemo(() => {
28
57
  if (color) {
29
- return { [`--${PREFIX_BS}icon-component-color`]: color };
30
- }
31
- if (theme) {
32
- return { [`--${PREFIX_BS}icon-component-color`]: `var(--${PREFIX_BS}${theme})` };
58
+ return { [`--${PREFIX_BS}icon-component-color`]: `var(--${PREFIX_BS}${color})` };
33
59
  }
34
60
  return {};
35
- }, [color, theme]);
61
+ }, [color]);
36
62
  const backgroundStyle = React.useMemo(() => {
37
- if (backgroundColor) {
38
- return { [`--${PREFIX_BS}icon-component-bg-color`]: backgroundColor };
39
- }
40
63
  if (hasCircle) {
41
- if (theme) {
42
- return { [`--${PREFIX_BS}icon-component-bg-color`]: `rgba(var(--${PREFIX_BS}${theme}-rgb), 0.1)` };
64
+ if (color) {
65
+ return { [`--${PREFIX_BS}icon-component-bg-color`]: `rgba(var(--${PREFIX_BS}${color}-rgb), 0.1)` };
43
66
  }
44
67
  return { [`--${PREFIX_BS}icon-component-bg-color`]: `rgba(var(--${PREFIX_BS}body-color-rgb), 0.1)` };
45
68
  }
46
69
  return {};
47
- }, [backgroundColor, hasCircle, theme]);
48
- const circleSizeStyle = React.useMemo(() => {
49
- if (hasCircle) {
50
- return { [`--${PREFIX_BS}icon-component-padding`]: circleSize };
51
- }
52
- return { [`--${PREFIX_BS}icon-component-padding`]: '0' };
53
- }, [circleSize, hasCircle]);
54
- const generateStyleVariables = React.useMemo(() => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ [`--${PREFIX_BS}icon-component-loading-duration`]: `${loadingDuration}s` }, size && { [`--${PREFIX_BS}icon-component-size`]: size }), colorStyle), backgroundStyle), circleSizeStyle), style)), [size, loadingDuration, colorStyle, backgroundStyle, circleSizeStyle, style]);
55
- const generateClasses = React.useMemo(() => (Object.assign(Object.assign({ 'd-icon': true, [familyClass]: true, 'd-icon-loading': loading }, !materialStyle && {
56
- [`${familyPrefix}${icon}`]: true,
70
+ }, [hasCircle, color]);
71
+ const generateStyleVariables = React.useMemo(() => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, size && { [`--${PREFIX_BS}icon-component-size`]: size }), colorStyle), backgroundStyle), hasCircle && { [`--${PREFIX_BS}icon-component-padding`]: `calc(var(--${PREFIX_BS}icon-component-size, 24px) * 0.4)` }), style)), [size, colorStyle, backgroundStyle, hasCircle, style]);
72
+ const generateClasses = React.useMemo(() => (Object.assign(Object.assign({ 'd-icon': true }, useMaterialIcons && {
73
+ [familyClass]: true,
57
74
  }), className && { [className]: true })), [
58
- familyClass,
59
- loading,
60
75
  className,
61
- materialStyle,
62
- familyPrefix,
63
- icon,
76
+ useMaterialIcons,
77
+ familyClass,
64
78
  ]);
65
- return (jsxRuntime.jsx("i", Object.assign({ className: classNames(generateClasses), style: generateStyleVariables }, dataAttributes, { children: materialStyle && icon })));
79
+ const iconSize = React.useMemo(() => {
80
+ if (size) {
81
+ const numSize = parseInt(size, 10);
82
+ return !Number.isNaN(numSize) ? numSize : size;
83
+ }
84
+ return undefined;
85
+ }, [size]);
86
+ // Render Material Design icon (legacy support)
87
+ if (useMaterialIcons) {
88
+ return (jsxRuntime.jsx("i", Object.assign({ className: classNames(generateClasses), style: generateStyleVariables }, dataAttributes, { children: icon })));
89
+ }
90
+ // Render Lucide icon
91
+ if (!LucideIcon) {
92
+ // eslint-disable-next-line no-console
93
+ console.warn(`Icon "${icon}" not found in Lucide. Make sure to use PascalCase names (e.g., "Home", "User", "Settings")`);
94
+ return (jsxRuntime.jsx("span", Object.assign({ className: classNames(generateClasses), style: generateStyleVariables }, dataAttributes, { children: "?" })));
95
+ }
96
+ return (jsxRuntime.jsx("span", Object.assign({ className: classNames(generateClasses), style: generateStyleVariables }, dataAttributes, { children: jsxRuntime.jsx(LucideIcon, { size: iconSize || 24, strokeWidth: strokeWidth }) })));
66
97
  }
67
98
 
68
99
  function useDisableBodyScrollEffect(disable) {
@@ -250,33 +281,27 @@ const DEFAULT_STATE = {
250
281
  materialStyle: false,
251
282
  },
252
283
  iconMap: {
253
- x: 'x',
254
- xLg: 'x-lg',
255
- chevronUp: 'chevron-up',
256
- chevronDown: 'chevron-down',
257
- chevronLeft: 'chevron-left',
258
- chevronRight: 'chevron-right',
259
- upload: 'cloud-upload',
260
- calendar: 'calendar',
261
- check: 'check',
284
+ x: 'X',
285
+ xLg: 'X',
286
+ chevronUp: 'ChevronUp',
287
+ chevronDown: 'ChevronDown',
288
+ chevronLeft: 'ChevronLeft',
289
+ chevronRight: 'ChevronRight',
290
+ upload: 'Upload',
291
+ calendar: 'Calendar',
292
+ check: 'Check',
262
293
  alert: {
263
- warning: 'exclamation-circle',
264
- danger: 'exclamation-triangle',
265
- success: 'check-circle',
266
- info: 'info-circle',
267
- dark: 'info-circle',
268
- light: 'info-circle',
269
- primary: 'info-circle',
270
- secondary: 'info-circle',
294
+ warning: 'AlertCircle',
295
+ danger: 'AlertTriangle',
296
+ success: 'CheckCircle',
297
+ info: 'Info',
271
298
  },
272
299
  input: {
273
- invalid: 'exclamation-circle',
274
- valid: 'check',
275
- search: 'search',
276
- show: 'eye',
277
- hide: 'eye-slash',
278
- increase: 'plus-square',
279
- decrease: 'dash-square',
300
+ search: 'Search',
301
+ show: 'Eye',
302
+ hide: 'EyeOff',
303
+ increase: 'Plus',
304
+ decrease: 'Minus',
280
305
  },
281
306
  },
282
307
  breakpoints: {
@@ -329,25 +354,19 @@ function DIcon(_a) {
329
354
  return (jsxRuntime.jsx(DIconBase, Object.assign({ familyClass: propFamilyClass || familyClass, familyPrefix: propFamilyPrefix || familyPrefix, materialStyle: propMaterialStyle || materialStyle }, props)));
330
355
  }
331
356
 
332
- function DAlert({ theme = 'success', icon: iconProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle = false, iconClose: iconCloseProp, iconCloseFamilyClass, iconCloseFamilyPrefix, iconCloseMaterialStyle = false, showClose, onClose, children, id, className, style, dataAttributes, }) {
357
+ function DAlert({ color = 'success', icon: iconProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle = false, iconClose: iconCloseProp, iconCloseFamilyClass, iconCloseFamilyPrefix, iconCloseMaterialStyle = false, showClose, onClose, children, id, className, style, dataAttributes, }) {
333
358
  const { iconMap: { alert, xLg, }, } = useDContext();
334
- const icon = React.useMemo(() => iconProp || alert[theme], [alert, iconProp, theme]);
359
+ const icon = React.useMemo(() => iconProp || alert[color], [alert, iconProp, color]);
335
360
  const iconClose = React.useMemo(() => (iconCloseProp || xLg), [iconCloseProp, xLg]);
336
- const generateClasses = React.useMemo(() => (Object.assign({ alert: true, [`alert-${theme}`]: true, 'fade show': !!showClose }, className && { [className]: true })), [theme, showClose, className]);
361
+ const generateClasses = React.useMemo(() => (Object.assign({ alert: true, [`alert-${color}`]: true, 'fade show': !!showClose }, className && { [className]: true })), [color, showClose, className]);
337
362
  return (jsxRuntime.jsxs("div", Object.assign({ className: classNames(generateClasses), style: style, role: "alert", id: id }, dataAttributes, { children: [icon && (jsxRuntime.jsx(DIcon, { className: "alert-icon", icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })), jsxRuntime.jsx("div", { className: "alert-text", children: children }), showClose && (jsxRuntime.jsx("button", { type: "button", className: "d-close", "aria-label": "Close", onClick: onClose, children: jsxRuntime.jsx(DIcon, { icon: iconClose, familyClass: iconCloseFamilyClass, familyPrefix: iconCloseFamilyPrefix, materialStyle: iconCloseMaterialStyle }) }))] })));
338
363
  }
339
364
 
340
- function DAvatar({ id, size, image, name: nameProp, useNameAsInitials = false, theme = 'secondary', variant, className, style, dataAttributes, }) {
341
- const generateClasses = React.useMemo(() => {
342
- const variantClass = variant
343
- ? `d-avatar-${variant}-${theme}`
344
- : `d-avatar-${theme}`;
345
- return {
346
- 'd-avatar': true,
347
- [variantClass]: true,
348
- [`d-avatar-${size}`]: !!size,
349
- };
350
- }, [variant, theme, size]);
365
+ function DAvatar({ id, size, image, name: nameProp, useNameAsInitials = false, className, style, dataAttributes, }) {
366
+ const generateClasses = React.useMemo(() => ({
367
+ 'd-avatar': true,
368
+ [`d-avatar-${size}`]: !!size,
369
+ }), [size]);
351
370
  const name = React.useMemo(() => {
352
371
  if (!nameProp) {
353
372
  return undefined;
@@ -360,16 +379,21 @@ function DAvatar({ id, size, image, name: nameProp, useNameAsInitials = false, t
360
379
  return (jsxRuntime.jsxs("div", Object.assign({ className: classNames(generateClasses, className), style: style, id: id }, dataAttributes, { children: [image && jsxRuntime.jsx("img", { src: image, alt: nameProp, className: "d-avatar-img" }), (name && !image) && jsxRuntime.jsx("span", { className: "d-avatar-name", children: name })] })));
361
380
  }
362
381
 
363
- function DBadge({ text, soft = false, theme = 'primary', id, rounded, className, style, iconStart, iconEnd, iconMaterialStyle, iconFamilyClass, iconFamilyPrefix, dataAttributes, }) {
382
+ function DBadge({ text, soft = false, color = 'primary', id, rounded, className, size, style, iconStart, iconEnd, iconMaterialStyle, iconFamilyClass, iconFamilyPrefix, dataAttributes, }) {
364
383
  const generateClasses = React.useMemo(() => ({
365
384
  badge: true,
366
- [`badge-${theme}`]: !!theme && !soft,
367
- [`badge-soft-${theme}`]: !!theme && soft,
385
+ [`badge-${color}`]: !!color && !soft,
386
+ [`badge-soft-${color}`]: !!color && soft,
368
387
  'rounded-pill': !!rounded,
369
- }), [rounded, soft, theme]);
388
+ [`badge-${size}`]: !!size,
389
+ }), [rounded, soft, color, size]);
370
390
  return (jsxRuntime.jsxs("span", Object.assign({ className: classNames(generateClasses, className), style: style }, id && { id }, dataAttributes, { children: [iconStart && (jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })), jsxRuntime.jsx("span", { children: text }), iconEnd && (jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle }))] })));
371
391
  }
372
392
 
393
+ function DBox({ className, style, children, dataAttributes, }) {
394
+ return (jsxRuntime.jsx("div", Object.assign({ style: style, className: classNames('d-box', className) }, dataAttributes, { children: children })));
395
+ }
396
+
373
397
  /* eslint-disable */
374
398
  /**
375
399
  * This file is originally from `@primer/react`
@@ -391,7 +415,7 @@ function useProvidedRefOrCreate(providedRef) {
391
415
  }
392
416
 
393
417
  function DInput(_a, ref) {
394
- var { id: idProp, style, className, label = '', labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, labelIconMaterialStyle, disabled = false, loading = false, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, iconStart, iconStartDisabled, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconStartTabIndex, iconStartMaterialStyle, iconEnd, iconEndDisabled, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconEndTabIndex, iconEndMaterialStyle, hint, size, invalid = false, valid = false, floatingLabel = false, inputStart, inputEnd, value, placeholder = '', dataAttributes, onChange, onIconStartClick, onIconEndClick } = _a, inputProps = tslib.__rest(_a, ["id", "style", "className", "label", "labelIcon", "labelIconFamilyClass", "labelIconFamilyPrefix", "labelIconMaterialStyle", "disabled", "loading", "iconFamilyClass", "iconFamilyPrefix", "iconMaterialStyle", "iconStart", "iconStartDisabled", "iconStartFamilyClass", "iconStartFamilyPrefix", "iconStartAriaLabel", "iconStartTabIndex", "iconStartMaterialStyle", "iconEnd", "iconEndDisabled", "iconEndFamilyClass", "iconEndFamilyPrefix", "iconEndAriaLabel", "iconEndTabIndex", "iconEndMaterialStyle", "hint", "size", "invalid", "valid", "floatingLabel", "inputStart", "inputEnd", "value", "placeholder", "dataAttributes", "onChange", "onIconStartClick", "onIconEndClick"]);
418
+ var { id: idProp, style, className, label = '', disabled = false, loading = false, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, iconStart, iconStartDisabled, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconStartTabIndex, iconStartMaterialStyle, iconEnd, iconEndDisabled, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconEndTabIndex, iconEndMaterialStyle, hint, size, invalid = false, valid = false, floatingLabel = false, inputStart, inputEnd, value, placeholder = '', dataAttributes, onChange, onIconStartClick, onIconEndClick } = _a, inputProps = tslib.__rest(_a, ["id", "style", "className", "label", "disabled", "loading", "iconFamilyClass", "iconFamilyPrefix", "iconMaterialStyle", "iconStart", "iconStartDisabled", "iconStartFamilyClass", "iconStartFamilyPrefix", "iconStartAriaLabel", "iconStartTabIndex", "iconStartMaterialStyle", "iconEnd", "iconEndDisabled", "iconEndFamilyClass", "iconEndFamilyPrefix", "iconEndAriaLabel", "iconEndTabIndex", "iconEndMaterialStyle", "hint", "size", "invalid", "valid", "floatingLabel", "inputStart", "inputEnd", "value", "placeholder", "dataAttributes", "onChange", "onIconStartClick", "onIconEndClick"]);
395
419
  const inputRef = useProvidedRefOrCreate(ref);
396
420
  const innerId = React.useId();
397
421
  const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
@@ -442,13 +466,9 @@ function DInput(_a, ref) {
442
466
  valid,
443
467
  value,
444
468
  ]);
445
- const labelComponent = React.useMemo(() => (jsxRuntime.jsxs("label", { htmlFor: id, children: [label, labelIcon && (jsxRuntime.jsx(DIcon, { icon: labelIcon, size: `var(--${PREFIX_BS}label-font-size)`, familyClass: labelIconFamilyClass, familyPrefix: labelIconFamilyPrefix, materialStyle: labelIconMaterialStyle }))] })), [
469
+ const labelComponent = React.useMemo(() => (jsxRuntime.jsx("label", { htmlFor: id, children: label })), [
446
470
  id,
447
471
  label,
448
- labelIcon,
449
- labelIconFamilyClass,
450
- labelIconFamilyPrefix,
451
- labelIconMaterialStyle,
452
472
  ]);
453
473
  const dynamicComponent = React.useMemo(() => {
454
474
  if (floatingLabel) {
@@ -577,7 +597,7 @@ async function urlToFile(url) {
577
597
  null,
578
598
  {
579
599
  code: ErrorCodes.FailedFetch,
580
- message: `Failed to fetch file from ${url}`,
600
+ message: `Failed to fetch file from ${url} (HTTP ${res.status})`,
581
601
  },
582
602
  ];
583
603
  }
@@ -587,11 +607,13 @@ async function urlToFile(url) {
587
607
  return [file, null];
588
608
  }
589
609
  catch (error) {
610
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
611
+ const isCorsError = errorMessage.includes('CORS') || errorMessage.includes('Failed to fetch');
590
612
  return [
591
613
  null,
592
614
  {
593
615
  code: ErrorCodes.FailedFetch,
594
- message: `Failed to fetch file from ${url}}`,
616
+ message: `Failed to fetch file from ${url}${isCorsError ? ' (CORS error - file may not be accessible from this domain)' : ` (${errorMessage})`}`,
595
617
  },
596
618
  ];
597
619
  }
@@ -867,13 +889,13 @@ function DBoxFile(_a) {
867
889
  : children })] })) })), !!files.length && (jsxRuntime.jsx("ul", { className: "d-box-files", children: files.map((file, index) => (jsxRuntime.jsx(ForwardedDInput, { value: file.name, iconStart: "paperclip", iconEnd: "trash", readOnly: true, onIconEndClick: () => handleRemoveFile(index) }, `${file.name} ${index}`))) }))] }));
868
890
  }
869
891
 
870
- function DButton({ theme = 'primary', size, variant, state, text = '', ariaLabel, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartMaterialStyle, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndMaterialStyle, value, type = 'button', loading = false, loadingAriaLabel, disabled = false, stopPropagationEnabled = true, className, style, form, dataAttributes, onClick, }) {
892
+ function DButton({ color = 'primary', size, variant, state, text = '', children, ariaLabel, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartMaterialStyle, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndMaterialStyle, loadingText, value, type = 'button', loading = false, loadingAriaLabel, disabled = false, stopPropagationEnabled = true, className, style, form, dataAttributes, onClick, }) {
871
893
  const generateClasses = React.useMemo(() => {
872
894
  const variantClass = variant
873
- ? `btn-${variant}-${theme}`
874
- : `btn-${theme}`;
895
+ ? `btn-${variant}-${color}`
896
+ : `btn-${color}`;
875
897
  return Object.assign(Object.assign(Object.assign({ btn: true, [variantClass]: true }, size && { [`btn-${size}`]: true }), (state && state !== 'disabled') && { [state]: true }), { loading });
876
- }, [variant, theme, size, state, loading]);
898
+ }, [variant, color, size, state, loading]);
877
899
  const clickHandler = React.useCallback((event) => {
878
900
  if (stopPropagationEnabled) {
879
901
  event.stopPropagation();
@@ -881,19 +903,20 @@ function DButton({ theme = 'primary', size, variant, state, text = '', ariaLabel
881
903
  onClick === null || onClick === void 0 ? void 0 : onClick(event);
882
904
  }, [stopPropagationEnabled, onClick]);
883
905
  const isDisabled = React.useMemo(() => (state === 'disabled' || loading || disabled), [state, loading, disabled]);
906
+ const content = children || text;
884
907
  const newAriaLabel = React.useMemo(() => (loading
885
908
  ? (loadingAriaLabel || ariaLabel || text)
886
909
  : (ariaLabel || text)), [loading, loadingAriaLabel, ariaLabel, text]);
887
- return (jsxRuntime.jsxs("button", Object.assign({ className: classNames(generateClasses, className), style: style, type: type, disabled: isDisabled, onClick: clickHandler, "aria-label": newAriaLabel, form: form }, dataAttributes, value && { value }, { children: [iconStart && (jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix, materialStyle: iconStartMaterialStyle })), (text && !loading) && (jsxRuntime.jsx("span", { children: text })), loading && (jsxRuntime.jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", children: jsxRuntime.jsx("span", { className: "visually-hidden", children: "Loading..." }) })), iconEnd && (jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix, materialStyle: iconEndMaterialStyle }))] })));
910
+ return (jsxRuntime.jsxs("button", Object.assign({ className: classNames(generateClasses, className), style: style, type: type, disabled: isDisabled, onClick: clickHandler, "aria-label": newAriaLabel, form: form }, dataAttributes, value && { value }, { children: [iconStart && (jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix, materialStyle: iconStartMaterialStyle })), loading && (jsxRuntime.jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", children: jsxRuntime.jsx("span", { className: "visually-hidden", children: "Loading..." }) })), jsxRuntime.jsx("span", { children: loading && loadingText ? loadingText : content }), iconEnd && (jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix, materialStyle: iconEndMaterialStyle }))] })));
888
911
  }
889
912
 
890
- function DButtonIcon({ id, icon, size, className, variant, state, loadingAriaLabel, iconMaterialStyle, ariaLabel, theme = 'primary', type = 'button', loading = false, disabled = false, stopPropagationEnabled = true, style, iconFamilyClass, iconFamilyPrefix, dataAttributes, onClick, }) {
913
+ function DButtonIcon({ id, icon, size, className, variant, state, loadingAriaLabel, iconMaterialStyle, ariaLabel, color = 'primary', type = 'button', loading = false, disabled = false, stopPropagationEnabled = true, style, iconFamilyClass, iconFamilyPrefix, dataAttributes, onClick, }) {
891
914
  const generateClasses = React.useMemo(() => {
892
915
  const variantClass = variant
893
- ? `btn-${variant}-${theme}`
894
- : `btn-${theme}`;
916
+ ? `btn-${variant}-${color}`
917
+ : `btn-${color}`;
895
918
  return Object.assign(Object.assign(Object.assign({ 'btn d-button-icon': true, [variantClass]: true }, size && { [`btn-${size}`]: true }), (state && state !== 'disabled') && { [state]: true }), { loading });
896
- }, [variant, theme, size, state, loading]);
919
+ }, [variant, color, size, state, loading]);
897
920
  const clickHandler = React.useCallback((event) => {
898
921
  if (stopPropagationEnabled) {
899
922
  event.stopPropagation();
@@ -954,11 +977,11 @@ var DCarousel$1 = Object.assign(ForwardedDCarousel, {
954
977
  Slide: DCarouselSlide,
955
978
  });
956
979
 
957
- function DChip({ theme = 'primary', text, icon, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, iconClose: iconCloseProp, iconCloseFamilyClass, iconCloseFamilyPrefix, iconCloseMaterialStyle, showClose = false, closeAriaLabel = 'close', className, style, dataAttributes, onClose, }) {
980
+ function DChip({ color = 'primary', text, icon, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, iconClose: iconCloseProp, iconCloseFamilyClass, iconCloseFamilyPrefix, iconCloseMaterialStyle, showClose = false, closeAriaLabel = 'close', className, style, dataAttributes, onClose, }) {
958
981
  const generateClasses = React.useMemo(() => ({
959
982
  'd-chip': true,
960
- [`d-chip-${theme}`]: !!theme,
961
- }), [theme]);
983
+ [`d-chip-${color}`]: !!color,
984
+ }), [color]);
962
985
  const { iconMap: { xLg, }, } = useDContext();
963
986
  const iconClose = React.useMemo(() => iconCloseProp || xLg, [iconCloseProp, xLg]);
964
987
  return (jsxRuntime.jsxs("span", Object.assign({ className: classNames(generateClasses, className), style: style }, dataAttributes, { children: [icon && (jsxRuntime.jsx("div", { className: "d-chip-icon-container", children: jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle }) })), jsxRuntime.jsx("span", { children: text }), showClose && (jsxRuntime.jsx("button", { type: "button", className: "d-chip-icon-container", onClick: onClose, "aria-label": closeAriaLabel, children: jsxRuntime.jsx(DIcon, { icon: iconClose, familyClass: iconCloseFamilyClass, familyPrefix: iconCloseFamilyPrefix, materialStyle: iconCloseMaterialStyle }) }))] })));
@@ -981,7 +1004,7 @@ function DCollapse({ id, className, style, Component, hasSeparator = false, defa
981
1004
  const generateStyles = React.useMemo(() => ({
982
1005
  [`--${PREFIX_BS}collapse-separator-display`]: hasSeparator ? 'block' : 'none',
983
1006
  }), [hasSeparator]);
984
- return (jsxRuntime.jsxs("div", Object.assign({ id: id, className: classNames('collapse-container', className), style: style }, dataAttributes, { children: [jsxRuntime.jsxs("button", { className: "collapse-button", type: "button", onClick: onChangeCollapse, children: [jsxRuntime.jsx("div", { className: "flex-grow-1", children: Component }), jsxRuntime.jsx(DIcon, { color: `var(--${PREFIX_BS}gray)`, size: `var(--${PREFIX_BS}fs-small)`, icon: collapsed ? iconOpen : iconClose, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })] }), !collapsed && (jsxRuntime.jsx("div", { className: classNames({
1007
+ return (jsxRuntime.jsxs("div", Object.assign({ id: id, className: classNames('collapse-container', className), style: style }, dataAttributes, { children: [jsxRuntime.jsxs("button", { className: "collapse-button", type: "button", onClick: onChangeCollapse, children: [jsxRuntime.jsx("div", { className: "flex-grow-1", children: Component }), jsxRuntime.jsx(DIcon, { color: "gray", size: "1rem", icon: collapsed ? iconOpen : iconClose, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })] }), !collapsed && (jsxRuntime.jsx("div", { className: classNames({
985
1008
  'collapse-body': true,
986
1009
  }), style: generateStyles, children: children }))] })));
987
1010
  }
@@ -1145,7 +1168,7 @@ function DSelectPlaceholder(_a) {
1145
1168
  }
1146
1169
 
1147
1170
  function DSelect(_a) {
1148
- var { id: idProp, className, style, label, labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, hint, iconFamilyClass, iconFamilyPrefix, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconStartTabIndex, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconEndTabIndex, invalid, valid, menuWithMaxContent = false, disabled, clearable, loading, floatingLabel = false, rtl, searchable, multi, components, defaultValue, placeholder, onIconStartClick, onIconEndClick, dataAttributes } = _a, props = tslib.__rest(_a, ["id", "className", "style", "label", "labelIcon", "labelIconFamilyClass", "labelIconFamilyPrefix", "hint", "iconFamilyClass", "iconFamilyPrefix", "iconStart", "iconStartFamilyClass", "iconStartFamilyPrefix", "iconStartAriaLabel", "iconStartTabIndex", "iconEnd", "iconEndFamilyClass", "iconEndFamilyPrefix", "iconEndAriaLabel", "iconEndTabIndex", "invalid", "valid", "menuWithMaxContent", "disabled", "clearable", "loading", "floatingLabel", "rtl", "searchable", "multi", "components", "defaultValue", "placeholder", "onIconStartClick", "onIconEndClick", "dataAttributes"]);
1171
+ var { id: idProp, className, style, label, hint, iconFamilyClass, iconFamilyPrefix, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconStartTabIndex, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconEndTabIndex, invalid, valid, menuWithMaxContent = false, disabled, clearable, loading, floatingLabel = false, rtl, searchable, multi, components, defaultValue, placeholder, onIconStartClick, onIconEndClick, dataAttributes } = _a, props = tslib.__rest(_a, ["id", "className", "style", "label", "hint", "iconFamilyClass", "iconFamilyPrefix", "iconStart", "iconStartFamilyClass", "iconStartFamilyPrefix", "iconStartAriaLabel", "iconStartTabIndex", "iconEnd", "iconEndFamilyClass", "iconEndFamilyPrefix", "iconEndAriaLabel", "iconEndTabIndex", "invalid", "valid", "menuWithMaxContent", "disabled", "clearable", "loading", "floatingLabel", "rtl", "searchable", "multi", "components", "defaultValue", "placeholder", "onIconStartClick", "onIconEndClick", "dataAttributes"]);
1149
1172
  const innerId = React.useId();
1150
1173
  const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
1151
1174
  const handleOnIconStartClick = React.useCallback(() => {
@@ -1157,7 +1180,7 @@ function DSelect(_a) {
1157
1180
  return (jsxRuntime.jsxs("div", Object.assign({ className: classNames('d-select', className, {
1158
1181
  'd-select-floating': floatingLabel,
1159
1182
  disabled: disabled || loading,
1160
- }), style: style }, dataAttributes, { children: [label && (jsxRuntime.jsxs("label", { htmlFor: id, children: [label, labelIcon && (jsxRuntime.jsx(DIcon, { icon: labelIcon, size: `var(--${PREFIX_BS}input-label-font-size)`, familyClass: labelIconFamilyClass, familyPrefix: labelIconFamilyPrefix }))] })), jsxRuntime.jsxs("div", { className: classNames({
1183
+ }), style: style }, dataAttributes, { children: [label && (jsxRuntime.jsx("label", { htmlFor: id, children: label })), jsxRuntime.jsxs("div", { className: classNames({
1161
1184
  'input-group': true,
1162
1185
  'has-validation': invalid,
1163
1186
  disabled: disabled || loading,
@@ -1191,7 +1214,7 @@ var PickerType;
1191
1214
  PickerType["Month"] = "month";
1192
1215
  PickerType["Year"] = "year";
1193
1216
  })(PickerType || (PickerType = {}));
1194
- function DDatePickerHeaderSelector({ date, changeYear, changeMonth, decreaseMonth, increaseMonth, decreaseYear, increaseYear, monthDate, pickerType, prevMonthButtonDisabled, nextMonthButtonDisabled, monthsShown = 1, iconPrev, iconNext, prevYearButtonDisabled, nextYearButtonDisabled, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle = false, prevMonthAriaLabel = 'decrease month', nextMonthAriaLabel = 'increase month', prevYearAriaLabel = 'decrease year', nextYearAriaLabel = 'increase year', iconSize, buttonVariant = 'link', buttonTheme = 'dark', style, className, minYearSelect = 1900, maxYearSelect = 2100, showHeaderSelectors = false, customHeaderCount, locale, }) {
1217
+ function DDatePickerHeaderSelector({ date, changeYear, changeMonth, decreaseMonth, increaseMonth, decreaseYear, increaseYear, monthDate, pickerType, prevMonthButtonDisabled, nextMonthButtonDisabled, monthsShown = 1, iconPrev, iconNext, prevYearButtonDisabled, nextYearButtonDisabled, prevMonthAriaLabel = 'decrease month', nextMonthAriaLabel = 'increase month', prevYearAriaLabel = 'decrease year', nextYearAriaLabel = 'increase year', iconSize, style, className, minYearSelect = 1900, maxYearSelect = 2100, showHeaderSelectors = false, customHeaderCount, locale, }) {
1195
1218
  const { iconMap: { chevronLeft, chevronRight, }, } = useDContext();
1196
1219
  const arrayYears = React.useMemo(() => Array.from({ length: maxYearSelect - minYearSelect + 1 }, (_, index) => minYearSelect + index), [maxYearSelect, minYearSelect]);
1197
1220
  const years = React.useMemo(() => arrayYears.map((year) => ({
@@ -1216,16 +1239,16 @@ function DDatePickerHeaderSelector({ date, changeYear, changeMonth, decreaseMont
1216
1239
  }, [date]);
1217
1240
  const [startYear, endYear] = getYearRange();
1218
1241
  if (pickerType === PickerType.Year) {
1219
- return (jsxRuntime.jsxs("div", { className: classNames('react-datepicker__header-selector react-datepicker__header-year-selector', className), style: style, children: [jsxRuntime.jsx(DButton, { iconStart: iconPrev || chevronLeft, iconStartFamilyClass: iconFamilyClass, iconStartFamilyPrefix: iconFamilyPrefix, iconStartMaterialStyle: iconMaterialStyle, size: iconSize, variant: buttonVariant, theme: buttonTheme, onClick: decreaseYear, disabled: prevYearButtonDisabled, ariaLabel: prevYearAriaLabel, className: "header-button" }), jsxRuntime.jsx("p", { children: `${startYear} - ${endYear}` }), jsxRuntime.jsx(DButton, { iconStart: iconNext || chevronRight, iconStartFamilyClass: iconFamilyClass, iconStartFamilyPrefix: iconFamilyPrefix, iconStartMaterialStyle: iconMaterialStyle, size: iconSize, variant: buttonVariant, theme: buttonTheme, onClick: increaseYear, disabled: nextYearButtonDisabled, ariaLabel: nextYearAriaLabel, className: "header-button" })] }));
1242
+ return (jsxRuntime.jsxs("div", { className: classNames('react-datepicker__header-selector react-datepicker__header-year-selector', className), style: style, children: [jsxRuntime.jsx(DButtonIcon, { icon: iconPrev || chevronLeft, size: iconSize, variant: "link", onClick: decreaseYear, disabled: prevYearButtonDisabled, ariaLabel: prevYearAriaLabel, className: "header-button" }), jsxRuntime.jsx("p", { children: `${startYear} - ${endYear}` }), jsxRuntime.jsx(DButtonIcon, { icon: iconNext || chevronRight, size: iconSize, variant: "link", onClick: increaseYear, disabled: nextYearButtonDisabled, ariaLabel: nextYearAriaLabel, className: "header-button" })] }));
1220
1243
  }
1221
1244
  if (pickerType === PickerType.Quarter || pickerType === PickerType.Month) {
1222
- return (jsxRuntime.jsxs("div", { className: classNames(`react-datepicker__header-selector react-datepicker__header-${pickerType}-selector`, className), style: style, children: [jsxRuntime.jsx(DButton, { iconStart: iconPrev || chevronLeft, iconStartFamilyClass: iconFamilyClass, iconStartFamilyPrefix: iconFamilyPrefix, iconStartMaterialStyle: iconMaterialStyle, size: iconSize, variant: buttonVariant, theme: buttonTheme, onClick: decreaseYear, disabled: prevMonthButtonDisabled, ariaLabel: prevMonthAriaLabel, className: "header-button", style: { visibility: customHeaderCount === 0 ? 'visible' : 'hidden' } }), jsxRuntime.jsx("div", { className: "d-flex justify-content-center flex-grow-1", children: showHeaderSelectors ? (jsxRuntime.jsx(DSelect$1, { options: years, value: defaultYear, defaultValue: defaultYear, onChange: (year) => changeYear(Number(year === null || year === void 0 ? void 0 : year.value)), searchable: false })) : (jsxRuntime.jsx("p", { children: defaultYear === null || defaultYear === void 0 ? void 0 : defaultYear.label })) }), jsxRuntime.jsx(DButton, { iconStart: iconNext || chevronRight, iconStartFamilyClass: iconFamilyClass, iconStartFamilyPrefix: iconFamilyPrefix, iconStartMaterialStyle: iconMaterialStyle, size: iconSize, variant: buttonVariant, theme: buttonTheme, onClick: increaseYear, disabled: nextMonthButtonDisabled, ariaLabel: nextMonthAriaLabel, className: "header-button", style: { visibility: customHeaderCount === monthsShown - 1 ? 'visible' : 'hidden' } })] }));
1245
+ return (jsxRuntime.jsxs("div", { className: classNames(`react-datepicker__header-selector react-datepicker__header-${pickerType}-selector`, className), style: style, children: [jsxRuntime.jsx(DButtonIcon, { icon: iconPrev || chevronLeft, size: iconSize, variant: "link", onClick: decreaseYear, disabled: prevMonthButtonDisabled, ariaLabel: prevMonthAriaLabel, className: "header-button", style: { visibility: customHeaderCount === 0 ? 'visible' : 'hidden' } }), jsxRuntime.jsx("div", { className: "d-flex justify-content-center flex-grow-1", children: showHeaderSelectors ? (jsxRuntime.jsx(DSelect$1, { options: years, value: defaultYear, defaultValue: defaultYear, onChange: (year) => changeYear(Number(year === null || year === void 0 ? void 0 : year.value)), searchable: false })) : (jsxRuntime.jsx("p", { children: defaultYear === null || defaultYear === void 0 ? void 0 : defaultYear.label })) }), jsxRuntime.jsx(DButtonIcon, { icon: iconNext || chevronRight, size: iconSize, variant: "link", onClick: increaseYear, disabled: nextMonthButtonDisabled, ariaLabel: nextMonthAriaLabel, className: "header-button", style: { visibility: customHeaderCount === monthsShown - 1 ? 'visible' : 'hidden' } })] }));
1223
1246
  }
1224
- return (jsxRuntime.jsxs("div", { className: classNames('react-datepicker__header-selector react-datepicker__header-day-selector', className), style: style, children: [jsxRuntime.jsx(DButton, { iconStart: iconPrev || chevronLeft, iconStartFamilyClass: iconFamilyClass, iconStartFamilyPrefix: iconFamilyPrefix, iconStartMaterialStyle: iconMaterialStyle, size: iconSize, variant: buttonVariant, theme: buttonTheme, onClick: decreaseMonth, disabled: prevMonthButtonDisabled, ariaLabel: prevMonthAriaLabel, className: "header-button", style: { visibility: customHeaderCount === 0 ? 'visible' : 'hidden' } }), showHeaderSelectors ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(DSelect$1, { options: months, value: defaultMonth, defaultValue: defaultMonth, onChange: (month) => changeMonth((month === null || month === void 0 ? void 0 : month.value) || 0), searchable: false, className: "custom-month-selector" }), jsxRuntime.jsx(DSelect$1, { options: years, value: defaultYear, defaultValue: defaultYear, onChange: (year) => changeYear(Number(year === null || year === void 0 ? void 0 : year.value)), searchable: false, className: "custom-year-selector" })] })) : (jsxRuntime.jsx("p", { children: `${defaultMonth.label} ${defaultYear === null || defaultYear === void 0 ? void 0 : defaultYear.label}` })), jsxRuntime.jsx(DButton, { iconStart: iconNext || chevronRight, iconStartFamilyClass: iconFamilyClass, iconStartFamilyPrefix: iconFamilyPrefix, iconStartMaterialStyle: iconMaterialStyle, size: iconSize, variant: buttonVariant, theme: buttonTheme, onClick: increaseMonth, disabled: nextMonthButtonDisabled, ariaLabel: nextMonthAriaLabel, className: "header-button", style: { visibility: customHeaderCount === monthsShown - 1 ? 'visible' : 'hidden' } })] }));
1247
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "datepicker-top-header", children: [showHeaderSelectors && (jsxRuntime.jsx("select", { value: defaultYear === null || defaultYear === void 0 ? void 0 : defaultYear.value, onChange: (e) => changeYear(Number(e.target.value)), className: "custom-year-selector", children: years.map((year) => (jsxRuntime.jsx("option", { value: year.value, children: year.label }, year.value))) })), jsxRuntime.jsx("h4", { className: "mb-0 fw-normal", children: dateFns.format(monthDate, 'LLLL, dd', { locale }) })] }), jsxRuntime.jsxs("div", { className: classNames('react-datepicker__header-selector react-datepicker__header-day-selector', className), style: style, children: [jsxRuntime.jsx(DButtonIcon, { icon: iconPrev || chevronLeft, size: iconSize, variant: "link", onClick: decreaseMonth, disabled: prevMonthButtonDisabled, ariaLabel: prevMonthAriaLabel, className: "header-button", style: { visibility: customHeaderCount === 0 ? 'visible' : 'hidden' } }), showHeaderSelectors ? (jsxRuntime.jsx(DSelect$1, { options: months, value: defaultMonth, defaultValue: defaultMonth, onChange: (month) => changeMonth((month === null || month === void 0 ? void 0 : month.value) || 0), searchable: false, className: "custom-month-selector" })) : (jsxRuntime.jsx("p", { children: `${defaultMonth.label} ${defaultYear === null || defaultYear === void 0 ? void 0 : defaultYear.label}` })), jsxRuntime.jsx(DButtonIcon, { icon: iconNext || chevronRight, size: iconSize, variant: "link", onClick: increaseMonth, disabled: nextMonthButtonDisabled, ariaLabel: nextMonthAriaLabel, className: "header-button", style: { visibility: customHeaderCount === monthsShown - 1 ? 'visible' : 'hidden' } })] })] }));
1225
1248
  }
1226
1249
 
1227
1250
  function DDatePicker(_a) {
1228
- var { inputLabel, inputHint, inputAriaLabel, inputActionAriaLabel = 'open calendar', inputId = 'input-calendar', timeId = 'input-time', timeInputLabel, iconInput, iconHeaderPrev, iconHeaderNext, iconMaterialStyle, iconFamilyClass, iconFamilyPrefix, minYearSelect, maxYearSelect, iconHeaderSize, headerPrevMonthAriaLabel, headerNextMonthAriaLabel, headerButtonVariant, headerButtonTheme, invalid = false, valid = false, renderCustomHeader: renderCustomHeaderProp, className, dateFormatCalendar: dateFormatCalendarProp, style, dataAttributes, placeholder, showHeaderSelectors } = _a, props = tslib.__rest(_a, ["inputLabel", "inputHint", "inputAriaLabel", "inputActionAriaLabel", "inputId", "timeId", "timeInputLabel", "iconInput", "iconHeaderPrev", "iconHeaderNext", "iconMaterialStyle", "iconFamilyClass", "iconFamilyPrefix", "minYearSelect", "maxYearSelect", "iconHeaderSize", "headerPrevMonthAriaLabel", "headerNextMonthAriaLabel", "headerButtonVariant", "headerButtonTheme", "invalid", "valid", "renderCustomHeader", "className", "dateFormatCalendar", "style", "dataAttributes", "placeholder", "showHeaderSelectors"]);
1251
+ var { inputLabel, inputHint, inputAriaLabel, inputActionAriaLabel = 'open calendar', inputId = 'input-calendar', timeId = 'input-time', timeInputLabel, minYearSelect, maxYearSelect, iconHeaderSize, iconMaterialStyle, iconInput, headerPrevMonthAriaLabel, headerNextMonthAriaLabel, invalid = false, valid = false, renderCustomHeader: renderCustomHeaderProp, className, dateFormatCalendar: dateFormatCalendarProp, style, dataAttributes, placeholder, showHeaderSelectors } = _a, props = tslib.__rest(_a, ["inputLabel", "inputHint", "inputAriaLabel", "inputActionAriaLabel", "inputId", "timeId", "timeInputLabel", "minYearSelect", "maxYearSelect", "iconHeaderSize", "iconMaterialStyle", "iconInput", "headerPrevMonthAriaLabel", "headerNextMonthAriaLabel", "invalid", "valid", "renderCustomHeader", "className", "dateFormatCalendar", "style", "dataAttributes", "placeholder", "showHeaderSelectors"]);
1229
1252
  const pickerType = React.useMemo(() => {
1230
1253
  if (props.showQuarterYearPicker)
1231
1254
  return PickerType.Quarter;
@@ -1239,15 +1262,10 @@ function DDatePicker(_a) {
1239
1262
  props.showMonthYearPicker,
1240
1263
  props.showYearPicker,
1241
1264
  ]);
1242
- const DatePickerHeader = React.useCallback((headerProps) => (jsxRuntime.jsx(DDatePickerHeaderSelector, Object.assign({}, headerProps, { monthsShown: props.monthsShown, iconPrev: iconHeaderPrev, iconNext: iconHeaderNext, iconMaterialStyle: iconMaterialStyle, prevMonthAriaLabel: headerPrevMonthAriaLabel, nextMonthAriaLabel: headerNextMonthAriaLabel, iconSize: iconHeaderSize, buttonVariant: headerButtonVariant, buttonTheme: headerButtonTheme, minYearSelect: minYearSelect, maxYearSelect: maxYearSelect, pickerType: pickerType, showHeaderSelectors: showHeaderSelectors, locale: props.locale }))), [
1243
- iconHeaderNext,
1244
- iconHeaderPrev,
1245
- iconMaterialStyle,
1265
+ const DatePickerHeader = React.useCallback((headerProps) => (jsxRuntime.jsx(DDatePickerHeaderSelector, Object.assign({}, headerProps, { monthsShown: props.monthsShown, prevMonthAriaLabel: headerPrevMonthAriaLabel, nextMonthAriaLabel: headerNextMonthAriaLabel, iconSize: iconHeaderSize, minYearSelect: minYearSelect, maxYearSelect: maxYearSelect, pickerType: pickerType, showHeaderSelectors: showHeaderSelectors, locale: props.locale }))), [
1246
1266
  headerPrevMonthAriaLabel,
1247
1267
  headerNextMonthAriaLabel,
1248
1268
  iconHeaderSize,
1249
- headerButtonVariant,
1250
- headerButtonTheme,
1251
1269
  minYearSelect,
1252
1270
  maxYearSelect,
1253
1271
  pickerType,
@@ -1260,6 +1278,25 @@ function DDatePicker(_a) {
1260
1278
  return (jsxRuntime.jsx(DatePicker, Object.assign({}, dataAttributes, props, { calendarClassName: "d-date-picker", renderCustomHeader: renderCustomHeader, placeholderText: placeholder, customInput: (jsxRuntime.jsx(ForwardedDDatePickerInput, { id: inputId, "aria-label": inputAriaLabel, iconEndAriaLabel: inputActionAriaLabel, iconMaterialStyle: iconMaterialStyle, iconEnd: iconInput, inputLabel: inputLabel, className: className, style: style, invalid: invalid, valid: valid, hint: inputHint })), customTimeInput: (jsxRuntime.jsx(DDatePickerTime, { id: timeId })) })));
1261
1279
  }
1262
1280
 
1281
+ function DLayoutPane({ className, style, children, cols, colsXs, colsSm, colsMd, colsLg, colsXl, colsXxl, dataAttributes, }) {
1282
+ const colsClass = cols ? `g-col-${cols}` : undefined;
1283
+ const colsXsClass = colsXs ? `g-col-${colsXs}` : undefined;
1284
+ const colsSmClass = colsSm ? `g-col-sm-${colsSm}` : undefined;
1285
+ const colsMdClass = colsMd ? `g-col-md-${colsMd}` : undefined;
1286
+ const colsLgClass = colsLg ? `g-col-lg-${colsLg}` : undefined;
1287
+ const colsXlClass = colsXl ? `g-col-xl-${colsXl}` : undefined;
1288
+ const colsXxlClass = colsXxl ? `g-col-xxl-${colsXxl}` : undefined;
1289
+ return (jsxRuntime.jsx("div", Object.assign({ className: classNames(colsClass, colsXsClass, colsSmClass, colsMdClass, colsLgClass, colsXlClass, colsXxlClass, className), style: style }, dataAttributes, { children: children })));
1290
+ }
1291
+
1292
+ function DLayout({ className, style, children, gap, dataAttributes, }) {
1293
+ const gapClass = gap !== undefined ? `gap-${gap}` : undefined;
1294
+ return (jsxRuntime.jsx("div", Object.assign({ style: style, className: classNames('grid', gapClass, className) }, dataAttributes, { children: children })));
1295
+ }
1296
+ var DLayout$1 = Object.assign(DLayout, {
1297
+ Pane: DLayoutPane,
1298
+ });
1299
+
1263
1300
  function DInputMask(props, ref) {
1264
1301
  return (jsxRuntime.jsx(mask.InputMask, Object.assign({ ref: ref, component: ForwardedDInput }, props)));
1265
1302
  }
@@ -1443,18 +1480,6 @@ function DInputCounter(_a, ref) {
1443
1480
  const ForwardedDInputCounter = React.forwardRef(DInputCounter);
1444
1481
  ForwardedDInputCounter.displayName = 'DInputCounter';
1445
1482
 
1446
- /**
1447
- * @deprecated
1448
- */
1449
- function DInputCurrencyBase(_a, ref) {
1450
- var { value, minValue, maxValue, currencyOptions, currencyCode, onFocus, onBlur, onChange } = _a, inputProps = tslib.__rest(_a, ["value", "minValue", "maxValue", "currencyOptions", "currencyCode", "onFocus", "onBlur", "onChange"]);
1451
- const { handleOnWheel, } = useDisableInputWheel(ref);
1452
- const { inputRef, innerValue, innerType, handleOnFocus, handleOnChange, handleOnBlur, generateStyleVariables, generateSymbolStyleVariables, } = useInputCurrency(currencyOptions, value, onFocus, onChange, onBlur, ref);
1453
- return (jsxRuntime.jsx(ForwardedDInput, Object.assign({ ref: inputRef, value: innerValue, onChange: handleOnChange, style: generateStyleVariables, inputMode: "decimal", type: innerType, onFocus: handleOnFocus, onBlur: handleOnBlur, onWheel: handleOnWheel, inputStart: (jsxRuntime.jsx("span", { slot: "input-start", style: generateSymbolStyleVariables, children: currencyCode || currencyOptions.symbol })) }, inputProps)));
1454
- }
1455
- const ForwardedDInputCurrencyBase$1 = React.forwardRef(DInputCurrencyBase);
1456
- ForwardedDInputCurrencyBase$1.displayName = 'DInputCurrencyBase';
1457
-
1458
1483
  function DInputCurrency(_a, ref) {
1459
1484
  var { value, minValue, maxValue, currencyCode, onFocus, onBlur, onChange } = _a, props = tslib.__rest(_a, ["value", "minValue", "maxValue", "currencyCode", "onFocus", "onBlur", "onChange"]);
1460
1485
  const { currency: currencyOptions } = useDContext();
@@ -1462,19 +1487,8 @@ function DInputCurrency(_a, ref) {
1462
1487
  const { inputRef, innerValue, innerType, handleOnFocus, handleOnChange, handleOnBlur, generateStyleVariables, generateSymbolStyleVariables, } = useInputCurrency(currencyOptions, value, onFocus, onChange, onBlur, ref);
1463
1488
  return (jsxRuntime.jsx(ForwardedDInput, Object.assign({ ref: inputRef, value: innerValue, onChange: handleOnChange, style: generateStyleVariables, inputMode: "decimal", type: innerType, onFocus: handleOnFocus, onBlur: handleOnBlur, onWheel: handleOnWheel, inputStart: (jsxRuntime.jsx("span", { slot: "input-start", style: generateSymbolStyleVariables, children: currencyCode || currencyOptions.symbol })) }, props)));
1464
1489
  }
1465
- const ForwardedDInputCurrencyBase = React.forwardRef(DInputCurrency);
1466
- ForwardedDInputCurrencyBase.displayName = 'DInputCurrency';
1467
-
1468
- /**
1469
- * @deprecated
1470
- */
1471
- function DInputSearch(_a, ref) {
1472
- var { type, iconEnd: iconEndProp, iconEndAriaLabel = 'search' } = _a, props = tslib.__rest(_a, ["type", "iconEnd", "iconEndAriaLabel"]);
1473
- const inputRef = useProvidedRefOrCreate(ref);
1474
- return (jsxRuntime.jsx(ForwardedDInput, Object.assign({ ref: inputRef, type: "text", iconEnd: "search", iconEndAriaLabel: iconEndAriaLabel }, props)));
1475
- }
1476
- const ForwardedDInputSearch = React.forwardRef(DInputSearch);
1477
- ForwardedDInputSearch.displayName = 'DInputSearch';
1490
+ const ForwardedDInputCurrency = React.forwardRef(DInputCurrency);
1491
+ ForwardedDInputCurrency.displayName = 'DInputCurrency';
1478
1492
 
1479
1493
  function DInputPassword(_a, ref) {
1480
1494
  var { onIconEndClick, iconEndAriaLabel = 'show/hide password' } = _a, props = tslib.__rest(_a, ["onIconEndClick", "iconEndAriaLabel"]);
@@ -1491,7 +1505,7 @@ function DInputPassword(_a, ref) {
1491
1505
  const ForwardedDInputPassword = React.forwardRef(DInputPassword);
1492
1506
  ForwardedDInputPassword.displayName = 'DInputPassword';
1493
1507
 
1494
- function DInputPin({ id: idProp, label = '', labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, placeholder, type = 'text', disabled = false, loading = false, secret = false, characters = 4, innerInputMode = 'text', hint, invalid = false, valid = false, className, style, dataAttributes, onChange, }) {
1508
+ function DInputPin({ id: idProp, label = '', placeholder, type = 'text', disabled = false, loading = false, secret = false, characters = 4, innerInputMode = 'text', hint, invalid = false, valid = false, className, style, dataAttributes, onChange, }) {
1495
1509
  const innerId = React.useId();
1496
1510
  const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
1497
1511
  const [pattern, setPattern] = React.useState('');
@@ -1524,7 +1538,8 @@ function DInputPin({ id: idProp, label = '', labelIcon, labelIconFamilyClass, la
1524
1538
  }
1525
1539
  if (input.value !== '') {
1526
1540
  setActiveInput((prev) => {
1527
- const newValue = prev.with(index, input.value);
1541
+ const newValue = [...prev];
1542
+ newValue[index] = input.value;
1528
1543
  return newValue;
1529
1544
  });
1530
1545
  if (input.nextSibling) {
@@ -1540,7 +1555,8 @@ function DInputPin({ id: idProp, label = '', labelIcon, labelIconFamilyClass, la
1540
1555
  if (key === 'Backspace') {
1541
1556
  const { value } = currentTarget;
1542
1557
  setActiveInput((prev) => {
1543
- const newVal = prev.with(index, '');
1558
+ const newVal = [...prev];
1559
+ newVal[index] = '';
1544
1560
  return newVal;
1545
1561
  });
1546
1562
  if (currentTarget.previousSibling && value === '') {
@@ -1553,19 +1569,23 @@ function DInputPin({ id: idProp, label = '', labelIcon, labelIconFamilyClass, la
1553
1569
  }
1554
1570
  }, []);
1555
1571
  const focusInput = React.useCallback((index) => {
1556
- setActiveInput((prev) => prev.with(index, ''));
1572
+ setActiveInput((prev) => {
1573
+ const newVal = [...prev];
1574
+ newVal[index] = '';
1575
+ return newVal;
1576
+ });
1557
1577
  }, []);
1558
1578
  const wheelInput = React.useCallback((event) => {
1559
1579
  event.currentTarget.blur();
1560
1580
  }, []);
1561
- return (jsxRuntime.jsxs("div", Object.assign({ className: classNames('d-input-pin', className), style: style }, dataAttributes, { children: [label && (jsxRuntime.jsxs("label", { htmlFor: "pinIndex0", children: [label, labelIcon && (jsxRuntime.jsx(DIcon, { icon: labelIcon, size: `var(--${PREFIX_BS}input-label-font-size)`, familyClass: labelIconFamilyClass, familyPrefix: labelIconFamilyPrefix }))] })), jsxRuntime.jsxs("div", { className: "d-input-pin-group", id: id, children: [Array.from({ length: characters }).map((_, index) => (jsxRuntime.jsx("input", Object.assign({ className: classNames({
1581
+ return (jsxRuntime.jsxs("div", Object.assign({ className: classNames('d-input-pin', className), style: style }, dataAttributes, { children: [label && (jsxRuntime.jsx("label", { htmlFor: "pinIndex0", children: label })), jsxRuntime.jsxs("div", { className: "d-input-pin-group", id: id, children: [Array.from({ length: characters }).map((_, index) => (jsxRuntime.jsx("input", Object.assign({ className: classNames({
1562
1582
  'form-control': true,
1563
1583
  'is-invalid': invalid,
1564
1584
  'is-valid': valid,
1565
1585
  }), value: activeInput[index], type: secret ? 'password' : type, "aria-describedby": `${id}State`, inputMode: innerInputMode, id: `pinIndex${index}`, name: `pin-${index}`, maxLength: 1, onInput: (event) => nextInput(event, index), onKeyDown: (event) => prevInput(event, index), onFocus: () => focusInput(index), onWheel: wheelInput, onClick: (event) => event.preventDefault(), onPaste: (event) => handlePaste(event), autoComplete: "off", placeholder: placeholder, disabled: disabled || loading, required: true }, type === 'number' && ({ min: 0, max: 9 })), index))), loading && (jsxRuntime.jsx("div", { className: "input-group-text", children: jsxRuntime.jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", children: jsxRuntime.jsx("span", { className: "visually-hidden", children: "Loading..." }) }) }))] }), hint && (jsxRuntime.jsx("div", { className: "form-text", id: `${id}Hint`, children: hint }))] })));
1566
1586
  }
1567
1587
 
1568
- function DInputSelect({ id: idProp, name, label = '', className, style, options = [], labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, disabled = false, loading = false, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, hint, value, size, floatingLabel = false, invalid = false, valid = false, dataAttributes, valueExtractor, labelExtractor, onChange, onBlur, onIconStartClick, onIconEndClick, }) {
1588
+ function DInputSelect({ id: idProp, name, label = '', className, style, options = [], disabled = false, loading = false, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, hint, value, size, floatingLabel = false, invalid = false, valid = false, dataAttributes, valueExtractor, labelExtractor, onChange, onBlur, onIconStartClick, onIconEndClick, }) {
1569
1589
  const innerId = React.useId();
1570
1590
  const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
1571
1591
  const internalValueExtractor = React.useCallback((option) => {
@@ -1633,12 +1653,9 @@ function DInputSelect({ id: idProp, name, label = '', className, style, options
1633
1653
  valid,
1634
1654
  size,
1635
1655
  ]);
1636
- const labelComponent = React.useMemo(() => (jsxRuntime.jsxs("label", { htmlFor: id, children: [label, labelIcon && (jsxRuntime.jsx(DIcon, { icon: labelIcon, size: `var(--${PREFIX_BS}input-label-font-size)`, familyClass: labelIconFamilyClass, familyPrefix: labelIconFamilyPrefix }))] })), [
1656
+ const labelComponent = React.useMemo(() => (jsxRuntime.jsx("label", { htmlFor: id, children: label })), [
1637
1657
  id,
1638
1658
  label,
1639
- labelIcon,
1640
- labelIconFamilyClass,
1641
- labelIconFamilyPrefix,
1642
1659
  ]);
1643
1660
  const dynamicComponent = React.useMemo(() => {
1644
1661
  if (floatingLabel) {
@@ -1706,38 +1723,7 @@ function DInputRange(_a, ref) {
1706
1723
  const ForwardedDInputRange = React.forwardRef(DInputRange);
1707
1724
  ForwardedDInputRange.displayName = 'DInputRange';
1708
1725
 
1709
- /**
1710
- * @deprecated Please use DListGroup.Item or DListGroupItem instead
1711
- */
1712
- function DListItem({ children, className, style, active = false, disabled = false, theme, onClick, }) {
1713
- const Tag = React.useMemo(() => (onClick ? 'button' : 'div'), [onClick]);
1714
- return (jsxRuntime.jsx(Tag, Object.assign({}, Tag === 'button' && {
1715
- onClick,
1716
- type: 'button',
1717
- }, { className: classNames('list-group-item list-group-item-action', theme ? `list-group-item-${theme}` : undefined, className, {
1718
- active,
1719
- disabled,
1720
- }), style: style }, active && { 'aria-current': true }, { children: children })));
1721
- }
1722
-
1723
- /**
1724
- * @deprecated Please use DListGroup instead
1725
- */
1726
- function DList({ children, className, style, flush = false, numbered = false, horizontal = false, horizontalBreakpoint, dataAttributes, }) {
1727
- if (flush && horizontal) {
1728
- throw new Error("Horizontal and Flush props don't work together");
1729
- }
1730
- return (jsxRuntime.jsx("div", Object.assign({ className: classNames('list-group', {
1731
- 'list-group-flush': flush && !horizontal,
1732
- 'list-group-numbered': numbered,
1733
- 'list-group-horizontal': horizontal && !horizontalBreakpoint,
1734
- }, (horizontal && horizontalBreakpoint) && `list-group-horizontal-${horizontalBreakpoint}`, className), style: style }, dataAttributes, { children: children })));
1735
- }
1736
- var DList$1 = Object.assign(DList, {
1737
- Item: DListItem,
1738
- });
1739
-
1740
- function DListGroupItem({ as = 'li', action: actionProp, active, disabled, href, onClick, theme, children, className, style, dataAttributes, }) {
1726
+ function DListGroupItem({ as = 'li', action: actionProp, active, disabled, href, onClick, color, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartMaterialStyle, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndMaterialStyle, children, className, style, dataAttributes, }) {
1741
1727
  const Tag = React.useMemo(() => {
1742
1728
  if (href) {
1743
1729
  return 'a';
@@ -1756,17 +1742,17 @@ function DListGroupItem({ as = 'li', action: actionProp, active, disabled, href,
1756
1742
  const generateClasses = React.useMemo(() => ({
1757
1743
  'list-group-item': true,
1758
1744
  'list-group-item-action': action,
1759
- [`list-group-item-${theme}`]: !!theme,
1745
+ [`list-group-item-${color}`]: !!color,
1760
1746
  active,
1761
1747
  disabled,
1762
- }), [action, active, disabled, theme]);
1748
+ }), [action, active, disabled, color]);
1763
1749
  const ariaAttributes = React.useMemo(() => {
1764
1750
  if (Tag === 'button') {
1765
1751
  return Object.assign(Object.assign({}, active && { 'aria-current': true }), disabled && { disabled: true });
1766
1752
  }
1767
1753
  return Object.assign(Object.assign({}, active && { 'aria-current': true }), disabled && { 'aria-disabled': true });
1768
1754
  }, [Tag, active, disabled]);
1769
- return (jsxRuntime.jsx(Tag, Object.assign({ className: classNames(generateClasses, className), style: style }, Tag === 'a' && href && { href }, onClick && { onClick }, ariaAttributes, dataAttributes, Tag === 'button' && { type: 'button' }, { children: children })));
1755
+ return (jsxRuntime.jsxs(Tag, Object.assign({ className: classNames(generateClasses, className), style: style }, Tag === 'a' && href && { href }, onClick && { onClick }, ariaAttributes, dataAttributes, Tag === 'button' && { type: 'button' }, { children: [iconStart && (jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix, materialStyle: iconStartMaterialStyle })), jsxRuntime.jsx("div", { className: "w-100", children: children }), iconEnd && (jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix, materialStyle: iconEndMaterialStyle, className: "ms-auto" }))] })));
1770
1756
  }
1771
1757
 
1772
1758
  function DListGroup({ as = 'ul', numbered, flush, horizontal, children, className, style, dataAttributes, }) {
@@ -1869,11 +1855,8 @@ var DOffcanvas$1 = Object.assign(DOffcanvas, {
1869
1855
  });
1870
1856
 
1871
1857
  function DPaginator(_a) {
1872
- var { className, page, current, showArrows, navClassName } = _a, props = tslib.__rest(_a, ["className", "page", "current", "showArrows", "navClassName"]);
1873
- const backwardCompatibilityProps = React.useMemo(() => (Object.assign(Object.assign(Object.assign(Object.assign({}, props), { current: Number(page !== undefined ? page : current) }), showArrows !== undefined && { renderNav: showArrows }), props.extraClassName === undefined && className !== undefined && {
1874
- extraClassName: className,
1875
- })), [props, page, current, showArrows, className]);
1876
- return (jsxRuntime.jsx(ResponsivePagination, Object.assign({ navClassName: classNames('page-item-arrow', navClassName) }, backwardCompatibilityProps)));
1858
+ var { navClassName } = _a, props = tslib.__rest(_a, ["navClassName"]);
1859
+ return (jsxRuntime.jsx(ResponsivePagination, Object.assign({ navClassName: classNames('page-item-arrow', navClassName) }, props)));
1877
1860
  }
1878
1861
 
1879
1862
  function DPopover({ children, renderComponent, open, setOpen, adjustContentToRender = false, className, style, dataAttributes, }) {
@@ -1906,123 +1889,22 @@ function DPopover({ children, renderComponent, open, setOpen, adjustContentToRen
1906
1889
  role,
1907
1890
  ]);
1908
1891
  const headingId = react.useId();
1909
- const generateStyleVariables = React.useMemo(() => (Object.assign(Object.assign({}, style), adjustContentToRender && {
1892
+ const generateStyleVariables = React.useMemo(() => (Object.assign(Object.assign({}, style), (adjustContentToRender && {
1910
1893
  [`--${PREFIX_BS}popover-component-min-width`]: 'auto',
1911
- })), [style, adjustContentToRender]);
1894
+ }))), [style, adjustContentToRender]);
1912
1895
  return (jsxRuntime.jsxs("div", Object.assign({ className: classNames('d-popover', className), style: generateStyleVariables }, dataAttributes, { children: [jsxRuntime.jsx("div", Object.assign({ ref: refs.setReference }, getReferenceProps(), { children: renderComponent(isOpen) })), isOpen && (jsxRuntime.jsx(react.FloatingFocusManager, { context: context, modal: false, children: jsxRuntime.jsx("div", Object.assign({ className: classNames('d-popover-content', {
1913
1896
  'w-100': adjustContentToRender,
1914
1897
  }), ref: refs.setFloating, style: floatingStyles, "aria-labelledby": headingId }, getFloatingProps(), { children: children })) }))] })));
1915
1898
  }
1916
1899
 
1917
- function DProgress({ className, style, currentValue, minValue = 0, maxValue = 100, hideCurrentValue = false, enableStripedAnimation = false, dataAttributes, }) {
1900
+ function DProgress({ className, style, currentValue, minValue = 0, maxValue = 100, hideCurrentValue = false, enableStripedAnimation = false, height, dataAttributes, }) {
1918
1901
  const percentage = React.useMemo(() => (Math.round((currentValue * 100) / maxValue)), [currentValue, maxValue]);
1919
1902
  const formatProgress = React.useMemo(() => `${percentage}%`, [percentage]);
1920
1903
  const generateClasses = React.useMemo(() => ({
1921
1904
  'progress-bar': true,
1922
1905
  'progress-bar-striped progress-bar-animated': enableStripedAnimation,
1923
1906
  }), [enableStripedAnimation]);
1924
- return (jsxRuntime.jsx("div", Object.assign({ className: classNames('progress', className) }, dataAttributes, { children: jsxRuntime.jsx("div", { className: classNames(generateClasses), role: "progressbar", "aria-label": "Progress bar", style: Object.assign({ width: formatProgress }, style), "aria-valuenow": currentValue, "aria-valuemin": minValue, "aria-valuemax": maxValue, children: !hideCurrentValue && formatProgress }) })));
1925
- }
1926
-
1927
- function DQuickActionButton({ line1, line2, className, actionIcon, actionIconFamilyClass, actionIconFamilyPrefix, actionIconTheme, representativeImage, representativeIcon, representativeIconTheme = 'secondary', representativeIconHasCircle = false, representativeIconFamilyClass, representativeIconFamilyPrefix, onClick, href, hrefTarget, style, dataAttributes, }) {
1928
- const Tag = React.useMemo(() => {
1929
- if (href) {
1930
- return 'a';
1931
- }
1932
- if (onClick) {
1933
- return 'button';
1934
- }
1935
- return 'div';
1936
- }, [href, onClick]);
1937
- const tagProps = React.useMemo(() => {
1938
- if (href) {
1939
- return {
1940
- className: classNames('d-quick-action-button', 'd-quick-action-button-feedback', className),
1941
- href,
1942
- target: hrefTarget,
1943
- };
1944
- }
1945
- if (onClick) {
1946
- return {
1947
- className: classNames('d-quick-action-button', 'd-quick-action-button-feedback', className),
1948
- onClick,
1949
- };
1950
- }
1951
- return {
1952
- className: classNames('d-quick-action-button', className),
1953
- };
1954
- }, [
1955
- className,
1956
- href,
1957
- hrefTarget,
1958
- onClick,
1959
- ]);
1960
- return (jsxRuntime.jsxs(Tag, Object.assign({ style: style }, tagProps, dataAttributes, { children: [representativeIcon && (jsxRuntime.jsx(DIcon, { className: "d-quick-action-button-representative-icon", size: representativeIconHasCircle
1961
- ? `var(--${PREFIX_BS}quick-action-button-representative-icon-size)`
1962
- : `var(--${PREFIX_BS}quick-action-button-representative-image-size)`, icon: representativeIcon, hasCircle: representativeIconHasCircle, theme: representativeIconTheme, familyClass: representativeIconFamilyClass, familyPrefix: representativeIconFamilyPrefix })), representativeImage && (jsxRuntime.jsx("img", { className: "d-quick-action-button-representative-image", src: representativeImage, alt: "" })), jsxRuntime.jsx("div", { className: "d-quick-action-button-content", children: jsxRuntime.jsxs("div", { className: "d-quick-action-button-text", children: [jsxRuntime.jsx("span", { className: "d-quick-action-button-line1", children: line1 }), jsxRuntime.jsx("small", { className: "d-quick-action-button-line2", children: line2 })] }) }), actionIcon && (jsxRuntime.jsx(DIcon, { className: "d-quick-action-button-action-icon", icon: actionIcon, size: `var(--${PREFIX_BS}quick-action-button-action-icon-size)`, theme: actionIconTheme, familyClass: actionIconFamilyClass, familyPrefix: actionIconFamilyPrefix }))] })));
1963
- }
1964
-
1965
- /**
1966
- * @deprecated
1967
- */
1968
- function DQuickActionCheck({ id: idProp, name, value, line1, line2, line3, className, style, checked, dataAttributes, onChange, }) {
1969
- const innerId = React.useId();
1970
- const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
1971
- const changeHandler = React.useCallback((event) => {
1972
- event.stopPropagation();
1973
- onChange === null || onChange === void 0 ? void 0 : onChange(event);
1974
- }, [onChange]);
1975
- return (jsxRuntime.jsxs("label", Object.assign({ className: classNames('d-quick-action-check', className), htmlFor: id, style: style }, dataAttributes, { children: [jsxRuntime.jsx(DInputCheck, { id: id, type: "radio", name: name, value: value, checked: checked, onChange: changeHandler }), jsxRuntime.jsxs("div", { className: "d-quick-action-check-detail", children: [jsxRuntime.jsx("span", { className: "d-quick-action-check-line1", children: line1 }), jsxRuntime.jsx("span", { className: "d-quick-action-check-line2", children: line2 })] }), jsxRuntime.jsx("span", { className: "d-quick-action-check-line3", children: line3 })] })));
1976
- }
1977
-
1978
- function DQuickActionSelect({ id: idProp, name, value, line1, line2, className, style, selected = false, dataAttributes, onChange, }) {
1979
- const innerRef = React.useRef(null);
1980
- const innerId = React.useId();
1981
- const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
1982
- const changeHandler = React.useCallback((event) => {
1983
- event.stopPropagation();
1984
- onChange === null || onChange === void 0 ? void 0 : onChange(event);
1985
- }, [onChange]);
1986
- React.useEffect(() => {
1987
- if (innerRef.current) {
1988
- innerRef.current.checked = selected;
1989
- }
1990
- }, [selected]);
1991
- return (jsxRuntime.jsxs("label", Object.assign({ className: classNames('d-quick-action-select', className), htmlFor: id, style: style }, dataAttributes, { children: [jsxRuntime.jsx("input", { ref: innerRef, id: id, type: "radio", name: name, value: value, onChange: changeHandler }), jsxRuntime.jsx("span", { className: "d-quick-action-select-line1", children: line1 }), jsxRuntime.jsx("span", { className: "d-quick-action-select-line2", children: line2 })] })));
1992
- }
1993
-
1994
- /**
1995
- * @deprecated
1996
- */
1997
- function DQuickActionSwitch({ id: idProp, name, label, hint, checked, disabled, className, style, dataAttributes, onClick, }) {
1998
- const innerId = React.useId();
1999
- const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
2000
- const clickHandler = React.useCallback((event) => {
2001
- event.stopPropagation();
2002
- onClick === null || onClick === void 0 ? void 0 : onClick(checked);
2003
- }, [checked, onClick]);
2004
- return (jsxRuntime.jsxs("button", Object.assign({ className: classNames('d-quick-action-switch', className), type: "button", onClick: clickHandler, style: style }, dataAttributes, { children: [jsxRuntime.jsx("div", { className: "d-quick-action-switch-content", children: jsxRuntime.jsx(DInputSwitch, { id: id, name: name, disabled: disabled, checked: checked, readonly: true, label: label }) }), jsxRuntime.jsx("div", { className: "d-quick-action-switch-hint", children: hint })] })));
2005
- }
2006
-
2007
- /**
2008
- * @deprecated Please use https://getbootstrap.com/docs/5.3/components/placeholders/ instead
2009
- */
2010
- function DSkeleton({ speed = 2, viewBox, backgroundColor, foregroundColor, children, }) {
2011
- const innerBackgroundColor = React.useMemo(() => {
2012
- if (backgroundColor) {
2013
- return backgroundColor;
2014
- }
2015
- const computedStyle = getComputedStyle(document.documentElement);
2016
- return computedStyle.getPropertyValue(`--${PREFIX_BS}secondary-100`);
2017
- }, [backgroundColor]);
2018
- const innerForegroundColor = React.useMemo(() => {
2019
- if (foregroundColor) {
2020
- return foregroundColor;
2021
- }
2022
- const computedStyle = getComputedStyle(document.documentElement);
2023
- return computedStyle.getPropertyValue(`--${PREFIX_BS}gray-100`);
2024
- }, [foregroundColor]);
2025
- return (jsxRuntime.jsx(ContentLoader, { speed: speed, viewBox: viewBox, backgroundColor: innerBackgroundColor, foregroundColor: innerForegroundColor, children: children }));
1907
+ return (jsxRuntime.jsx("div", Object.assign({ className: classNames('progress', className), style: Object.assign({ height }, style) }, dataAttributes, { children: jsxRuntime.jsx("div", { className: classNames(generateClasses), role: "progressbar", "aria-label": "Progress bar", style: { width: formatProgress }, "aria-valuenow": currentValue, "aria-valuemin": minValue, "aria-valuemax": maxValue, children: !hideCurrentValue && formatProgress }) })));
2026
1908
  }
2027
1909
 
2028
1910
  function DStepper$2({ options, currentStep, iconSuccess: iconSuccessProp, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle = false, vertical = false, completed, alignStart = false, className, style, }) {
@@ -2035,13 +1917,13 @@ function DStepper$2({ options, currentStep, iconSuccess: iconSuccessProp, iconSu
2035
1917
  'd-stepper-desktop': true,
2036
1918
  'is-vertical': vertical,
2037
1919
  'is-align-start': alignStart && !vertical,
2038
- }, className), style: style, children: options.map(({ label, value, description }) => (jsxRuntime.jsxs("div", { className: "d-step", children: [jsxRuntime.jsx("div", { className: "d-step-value", children: jsxRuntime.jsx("div", { className: classNames({
1920
+ }, className), style: style, children: options.map(({ label, value, description }) => (jsxRuntime.jsxs("div", { className: classNames({
1921
+ 'd-step': true,
1922
+ 'd-step-current': value === currentStep && !completed,
1923
+ }), children: [jsxRuntime.jsx("div", { className: "d-step-value", children: jsxRuntime.jsxs("div", { className: classNames({
2039
1924
  'd-step-icon-container': true,
2040
1925
  'd-step-check': value < currentStep || completed,
2041
- 'd-step-current': value === currentStep && !completed,
2042
- }), children: value < currentStep || completed
2043
- ? (jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconSuccessFamilyClass, familyPrefix: iconSuccessFamilyPrefix, materialStyle: iconSuccessMaterialStyle, className: "d-step-icon" }))
2044
- : value }) }), jsxRuntime.jsxs("div", { className: "d-step-text-container", children: [jsxRuntime.jsx("div", { className: "d-step-label", children: label }), description && (jsxRuntime.jsx("div", { className: "d-step-description", children: description }))] })] }, value))) }));
1926
+ }), children: [((value < currentStep) || completed) && (jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconSuccessFamilyClass, familyPrefix: iconSuccessFamilyPrefix, materialStyle: iconSuccessMaterialStyle, className: "d-step-icon" })), value] }) }), jsxRuntime.jsxs("div", { className: "d-step-text-container", children: [jsxRuntime.jsx("div", { className: "d-step-label", children: label }), description && (jsxRuntime.jsx("div", { className: "d-step-description", children: description }))] })] }, value))) }));
2045
1927
  }
2046
1928
 
2047
1929
  function DStepper$1({ options, currentStep, className, style, }) {
@@ -2081,7 +1963,7 @@ function DStepper({ options, currentStep, iconSuccess, iconSuccessFamilyClass, i
2081
1963
  const ARROW_WIDTH = 8;
2082
1964
  const ARROW_HEIGHT = 4;
2083
1965
  const GAP = 2;
2084
- function DTooltip({ className, childrenClassName, style, offSet = ARROW_HEIGHT + GAP, padding, withFocus = false, withClick = false, withHover = true, open = false, theme = 'dark', placement = 'top', size, Component, children, }) {
1966
+ function DTooltip({ className, childrenClassName, style, offSet = ARROW_HEIGHT + GAP, padding, withFocus = false, withClick = false, withHover = true, open = false, placement = 'top', size, Component, children, }) {
2085
1967
  const [isOpen, setIsOpen] = React.useState(open);
2086
1968
  const arrowRef = React.useRef(null);
2087
1969
  const { refs, context, floatingStyles, } = react.useFloating({
@@ -2112,10 +1994,16 @@ function DTooltip({ className, childrenClassName, style, offSet = ARROW_HEIGHT +
2112
1994
  dismiss,
2113
1995
  role,
2114
1996
  ]);
2115
- const generateClasses = React.useMemo(() => (Object.assign({ 'tooltip show': true, [`tooltip-${size}`]: !!size, [`tooltip-${theme}`]: !!theme }, className && { [className]: true })), [size, theme, className]);
1997
+ const generateClasses = React.useMemo(() => (Object.assign({ 'tooltip show': true, [`tooltip-${size}`]: !!size }, className && { [className]: true })), [size, className]);
2116
1998
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", Object.assign({ className: childrenClassName, ref: refs.setReference }, getReferenceProps(), { children: Component })), jsxRuntime.jsx(react.FloatingPortal, { children: isOpen && (jsxRuntime.jsxs("div", Object.assign({ className: classNames(generateClasses), ref: refs.setFloating, style: Object.assign(Object.assign({}, floatingStyles), style) }, getFloatingProps(), { children: [jsxRuntime.jsx(react.FloatingArrow, { ref: arrowRef, context: context, width: ARROW_WIDTH, height: ARROW_HEIGHT }), jsxRuntime.jsx("div", { className: "tooltip-inner", children: children })] }))) })] }));
2117
1999
  }
2118
2000
 
2001
+ function DTimeline({ className, style, dataAttributes, items, }) {
2002
+ return (jsxRuntime.jsx("div", Object.assign({ style: style, className: classNames('d-timeline', className) }, dataAttributes, { children: items.map((item, index) => (jsxRuntime.jsxs("div", { className: classNames('d-timeline-item', {
2003
+ [`d-timeline-item-${item.status}`]: item.status,
2004
+ }), children: [jsxRuntime.jsx("div", { className: "d-timeline-item-connector" }), jsxRuntime.jsx("div", { className: "d-timeline-item-icon", children: jsxRuntime.jsx("i", { className: `bi bi-${item.icon || 'check'}` }) }), jsxRuntime.jsxs("div", { className: "d-timeline-item-content", children: [jsxRuntime.jsx("div", { className: "d-timeline-item-title", children: item.title }), item.description && jsxRuntime.jsx("div", { className: "d-timeline-item-description", children: item.description }), item.time && jsxRuntime.jsx("div", { className: "d-timeline-item-time", children: item.time }), item.children] })] }, index))) })));
2005
+ }
2006
+
2119
2007
  const TabContext = React.createContext(undefined);
2120
2008
  function useTabContext() {
2121
2009
  const context = React.useContext(TabContext);
@@ -2154,7 +2042,7 @@ function DTabs({ children, defaultSelected, onChange, options, className, classN
2154
2042
  'flex-column': !vertical || variant === 'tabs',
2155
2043
  }), style: style }, dataAttributes, { children: [jsxRuntime.jsx("nav", { className: classNames(generateClasses), children: options.map((option) => (jsxRuntime.jsx("button", { id: `${option.tab}Tab`, className: classNames('nav-link', {
2156
2044
  active: option.tab === selected,
2157
- }, classNameTab), type: "button", role: "tab", "aria-controls": `${option.tab}Pane`, "aria-selected": option.tab === selected, disabled: option.disabled, onClick: () => onSelect(option), children: option.label }, option.label))) }), jsxRuntime.jsx("div", { className: "tab-content w-100", children: children })] })) }));
2045
+ }, classNameTab), type: "button", role: "tab", "aria-controls": `${option.tab}Pane`, "aria-selected": option.tab === selected, disabled: option.disabled, onClick: () => onSelect(option), children: option.label }, option.tab))) }), jsxRuntime.jsx("div", { className: "tab-content w-100", children: children })] })) }));
2158
2046
  }
2159
2047
  var DTabs$1 = Object.assign(DTabs, {
2160
2048
  Tab: DTabContent,
@@ -2186,20 +2074,18 @@ function useDToast() {
2186
2074
  if (typeof data === 'function') {
2187
2075
  return reactHotToast.toast.custom(data, toastProps);
2188
2076
  }
2189
- const { title, description, icon, closeIcon, timestamp, theme, soft, } = data;
2077
+ const { title, description, icon, closeIcon, timestamp, color, } = data;
2190
2078
  return reactHotToast.toast.custom(({ id, visible }) => {
2191
2079
  if (!visible) {
2192
2080
  return null;
2193
2081
  }
2194
2082
  if (!description) {
2195
2083
  return (jsxRuntime.jsx(DToast$1, { className: classNames({
2196
- [`toast-${theme}`]: !!theme && !soft,
2197
- [`toast-soft-${theme}`]: !!theme && !!soft,
2084
+ [`toast-${color}`]: !!color,
2198
2085
  }, 'show'), children: jsxRuntime.jsxs(DToast$1.Body, { children: [icon && (jsxRuntime.jsx(DIcon, { className: "toast-icon", icon: icon })), jsxRuntime.jsx("p", { className: "toast-title", children: title }), jsxRuntime.jsx("button", { type: "button", className: "d-close align-self-center", "aria-label": "Close", onClick: () => reactHotToast.toast.dismiss(id), children: jsxRuntime.jsx(DIcon, { icon: closeIcon || xLg }) })] }) }));
2199
2086
  }
2200
2087
  return (jsxRuntime.jsxs(DToast$1, { className: classNames({
2201
- [`toast-${theme}`]: !!theme && !soft,
2202
- [`toast-soft-${theme}`]: !!theme && !!soft,
2088
+ [`toast-${color}`]: !!color,
2203
2089
  }, 'show'), children: [jsxRuntime.jsxs(DToast$1.Header, { children: [icon && (jsxRuntime.jsx(DIcon, { className: "toast-icon", icon: icon })), jsxRuntime.jsx("p", { className: "toast-title", children: title }), timestamp && (jsxRuntime.jsx("small", { className: "toast-timestamp", children: timestamp })), jsxRuntime.jsx("button", { type: "button", className: "d-close align-self-center", "aria-label": "Close", onClick: () => reactHotToast.toast.dismiss(id), children: jsxRuntime.jsx(DIcon, { icon: closeIcon || xLg }) })] }), jsxRuntime.jsx(DToast$1.Body, { children: jsxRuntime.jsx("span", { children: description }) })] }));
2204
2090
  }, toastProps);
2205
2091
  }, [xLg]);
@@ -2270,7 +2156,7 @@ function validatePhoneNumber(phone) {
2270
2156
  }
2271
2157
 
2272
2158
  function DInputPhone(_a, ref) {
2273
- var { id: idProp, style, className, label = '', labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, labelIconMaterialStyle, disabled = false, loading = false, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, iconEnd, iconEndDisabled, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconEndTabIndex, iconEndMaterialStyle, hint, size, invalid = false, valid = false, floatingLabel = false, inputEnd, value, placeholder = '', dataAttributes, onChange, onIconEndClick, countrySelectorProps, filteredCountries, defaultCountry = 'cl' } = _a, inputProps = tslib.__rest(_a, ["id", "style", "className", "label", "labelIcon", "labelIconFamilyClass", "labelIconFamilyPrefix", "labelIconMaterialStyle", "disabled", "loading", "iconFamilyClass", "iconFamilyPrefix", "iconMaterialStyle", "iconEnd", "iconEndDisabled", "iconEndFamilyClass", "iconEndFamilyPrefix", "iconEndAriaLabel", "iconEndTabIndex", "iconEndMaterialStyle", "hint", "size", "invalid", "valid", "floatingLabel", "inputEnd", "value", "placeholder", "dataAttributes", "onChange", "onIconEndClick", "countrySelectorProps", "filteredCountries", "defaultCountry"]);
2159
+ var { id: idProp, style, className, label = '', disabled = false, loading = false, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, iconEnd, iconEndDisabled, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconEndTabIndex, iconEndMaterialStyle, hint, size, invalid = false, valid = false, floatingLabel = false, inputEnd, value, placeholder = '', dataAttributes, onChange, onIconEndClick, countrySelectorProps, filteredCountries, defaultCountry = 'cl' } = _a, inputProps = tslib.__rest(_a, ["id", "style", "className", "label", "disabled", "loading", "iconFamilyClass", "iconFamilyPrefix", "iconMaterialStyle", "iconEnd", "iconEndDisabled", "iconEndFamilyClass", "iconEndFamilyPrefix", "iconEndAriaLabel", "iconEndTabIndex", "iconEndMaterialStyle", "hint", "size", "invalid", "valid", "floatingLabel", "inputEnd", "value", "placeholder", "dataAttributes", "onChange", "onIconEndClick", "countrySelectorProps", "filteredCountries", "defaultCountry"]);
2274
2160
  const innerRef = useProvidedRefOrCreate(ref);
2275
2161
  const innerId = React.useId();
2276
2162
  const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
@@ -2329,13 +2215,9 @@ function DInputPhone(_a, ref) {
2329
2215
  placeholder,
2330
2216
  valid,
2331
2217
  ]);
2332
- const labelComponent = React.useMemo(() => (jsxRuntime.jsxs("label", { htmlFor: id, children: [label, labelIcon && (jsxRuntime.jsx(DIcon, { icon: labelIcon, size: `var(--${PREFIX_BS}label-font-size)`, familyClass: labelIconFamilyClass, familyPrefix: labelIconFamilyPrefix, materialStyle: labelIconMaterialStyle }))] })), [
2218
+ const labelComponent = React.useMemo(() => (jsxRuntime.jsx("label", { htmlFor: id, children: label })), [
2333
2219
  id,
2334
2220
  label,
2335
- labelIcon,
2336
- labelIconFamilyClass,
2337
- labelIconFamilyPrefix,
2338
- labelIconMaterialStyle,
2339
2221
  ]);
2340
2222
  const dynamicComponent = React.useMemo(() => {
2341
2223
  if (floatingLabel) {
@@ -2356,9 +2238,92 @@ function DInputPhone(_a, ref) {
2356
2238
  const ForwardedDInputPhone = React.forwardRef(DInputPhone);
2357
2239
  ForwardedDInputPhone.displayName = 'DInputPhone';
2358
2240
 
2241
+ const DEFAULT_IMAGE = 'https://cdn.modyo.cloud/uploads/06b434f7-b943-4f54-9543-84a904e189aa/original/Visa_Logo_1_.png';
2242
+ const CHIP_IMAGE = 'https://cdn.modyo.cloud/uploads/4660ad00-e5d8-477e-8919-52b53d0a26fb/original/chip-debit-svgrepo-com_1_.png';
2243
+ function DCreditCard({ brand = 'visa', name, number, holderText = 'Card Holder', logoImage, isChipVisible = true, className, isVertical = false, }) {
2244
+ return (jsxRuntime.jsxs("div", { className: classNames('d-credit-card overflow-hidden text-white', 'position-relative rounded-3', 'd-none d-lg-flex', isVertical && 'is-vertical', className), children: [jsxRuntime.jsxs("div", { className: "d-credit-card-header", children: [jsxRuntime.jsx("img", { src: logoImage || DEFAULT_IMAGE, alt: brand, className: "d-credit-card-logo", width: 100 }), isChipVisible && (jsxRuntime.jsx("div", { className: "d-credit-card-chip p-2 rounded-2", children: jsxRuntime.jsx("img", { src: CHIP_IMAGE, alt: "chip", width: 30, className: "d-credit-card-chip-image" }) }))] }), jsxRuntime.jsxs("div", { className: "d-credit-card-details mt-auto d-none d-sm-block", children: [jsxRuntime.jsx("div", { className: "d-credit-card-number d-none d-sm-block mb-4", children: number }), jsxRuntime.jsx("small", { className: "d-block opacity-50", children: holderText }), jsxRuntime.jsx("span", { className: "name", children: name })] })] }));
2245
+ }
2246
+
2247
+ const getItemClass = (action) => {
2248
+ const base = `dropdown-item d-flex align-items-center
2249
+ ${action.color ? `dropdown-item-${action.color}` : ''} ${action.disabled ? 'disabled' : ''}`;
2250
+ return base;
2251
+ };
2252
+ function DDropdown({ actions, dropdownToggle, className, }) {
2253
+ const [open, setOpen] = React.useState(false);
2254
+ const dropdownRef = React.useRef(null);
2255
+ const [position, setPosition] = React.useState('down'); // 🆕
2256
+ // Cerrar al hacer click fuera
2257
+ React.useEffect(() => {
2258
+ const handleClickOutside = (event) => {
2259
+ if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
2260
+ setOpen(false);
2261
+ }
2262
+ };
2263
+ document.addEventListener('mousedown', handleClickOutside);
2264
+ return () => document.removeEventListener('mousedown', handleClickOutside);
2265
+ }, []);
2266
+ // 🆕 Calcular posición del menú al abrir
2267
+ React.useEffect(() => {
2268
+ if (open && dropdownRef.current) {
2269
+ const rect = dropdownRef.current.getBoundingClientRect();
2270
+ const spaceBottom = window.innerHeight - rect.bottom;
2271
+ const spaceRight = window.innerWidth - rect.right;
2272
+ if (spaceBottom < 150) {
2273
+ setPosition('up');
2274
+ }
2275
+ else if (spaceRight < 150) {
2276
+ setPosition('start');
2277
+ }
2278
+ else {
2279
+ setPosition('down');
2280
+ }
2281
+ }
2282
+ }, [open]);
2283
+ let ToggleElement;
2284
+ if (dropdownToggle) {
2285
+ if (typeof dropdownToggle === 'function') {
2286
+ ToggleElement = dropdownToggle({ open, toggle: () => setOpen(!open) });
2287
+ }
2288
+ else {
2289
+ ToggleElement = dropdownToggle;
2290
+ }
2291
+ }
2292
+ else {
2293
+ ToggleElement = (jsxRuntime.jsx(DButtonIcon, { variant: "link", stopPropagationEnabled: false, onClick: () => setOpen(!open), icon: "MoreVertical" }));
2294
+ }
2295
+ return (jsxRuntime.jsxs("div", { className: `dropdown position-relative drop-${position} ${className}`, ref: dropdownRef, children: [ToggleElement, jsxRuntime.jsx("ul", { style: {
2296
+ position: 'absolute',
2297
+ top: position === 'up' ? 'auto' : '100%',
2298
+ bottom: position === 'up' ? '100%' : 'auto',
2299
+ left: position === 'start' ? 'auto' : 0,
2300
+ right: position === 'start' ? '0' : 'auto',
2301
+ transform: 'translateY(4px)',
2302
+ }, className: `dropdown-menu p-2 ${open ? 'show' : ''}`, children: actions.map((action, index) => {
2303
+ if (action.isDivider) {
2304
+ return (jsxRuntime.jsx("hr", { className: "dropdown-divider" }, index));
2305
+ }
2306
+ return (jsxRuntime.jsx("li", { children: action.href ? (jsxRuntime.jsxs("a", { className: getItemClass(action), href: action.href, onClick: (e) => {
2307
+ if (action.disabled) {
2308
+ e.preventDefault();
2309
+ }
2310
+ else {
2311
+ setOpen(false);
2312
+ }
2313
+ }, children: [action.icon && (jsxRuntime.jsx(DIcon, { icon: action.icon, className: "me-2", size: "1rem" })), action.label] })) : (jsxRuntime.jsxs("button", { className: getItemClass(action), type: "button", onClick: () => {
2314
+ var _a;
2315
+ if (!action.disabled) {
2316
+ (_a = action.onClick) === null || _a === void 0 ? void 0 : _a.call(action);
2317
+ setOpen(false);
2318
+ }
2319
+ }, disabled: action.disabled, children: [action.icon && (jsxRuntime.jsx(DIcon, { icon: action.icon, className: "me-2", size: "1rem" })), action.label] })) }, index));
2320
+ }) })] }));
2321
+ }
2322
+
2359
2323
  exports.DAlert = DAlert;
2360
2324
  exports.DAvatar = DAvatar;
2361
2325
  exports.DBadge = DBadge;
2326
+ exports.DBox = DBox;
2362
2327
  exports.DBoxFile = DBoxFile;
2363
2328
  exports.DButton = DButton;
2364
2329
  exports.DButtonIcon = DButtonIcon;
@@ -2372,27 +2337,27 @@ exports.DChip = DChip;
2372
2337
  exports.DCollapse = DCollapse;
2373
2338
  exports.DContext = DContext;
2374
2339
  exports.DContextProvider = DContextProvider;
2340
+ exports.DCreditCard = DCreditCard;
2375
2341
  exports.DCurrencyText = DCurrencyText;
2376
2342
  exports.DDatePicker = DDatePicker;
2343
+ exports.DDropdown = DDropdown;
2377
2344
  exports.DIcon = DIcon;
2378
2345
  exports.DIconBase = DIconBase;
2379
2346
  exports.DInput = ForwardedDInput;
2380
2347
  exports.DInputCheck = DInputCheck;
2381
2348
  exports.DInputCounter = ForwardedDInputCounter;
2382
- exports.DInputCurrency = ForwardedDInputCurrencyBase;
2383
- exports.DInputCurrencyBase = ForwardedDInputCurrencyBase$1;
2349
+ exports.DInputCurrency = ForwardedDInputCurrency;
2384
2350
  exports.DInputMask = ForwardedDInputMask;
2385
2351
  exports.DInputPassword = ForwardedDInputPassword;
2386
2352
  exports.DInputPhone = ForwardedDInputPhone;
2387
2353
  exports.DInputPin = DInputPin;
2388
2354
  exports.DInputRange = ForwardedDInputRange;
2389
- exports.DInputSearch = ForwardedDInputSearch;
2390
2355
  exports.DInputSelect = DInputSelect;
2391
2356
  exports.DInputSwitch = DInputSwitch;
2392
- exports.DList = DList$1;
2357
+ exports.DLayout = DLayout$1;
2358
+ exports.DLayoutPane = DLayoutPane;
2393
2359
  exports.DListGroup = DListGroup$1;
2394
2360
  exports.DListGroupItem = DListGroupItem;
2395
- exports.DListItem = DListItem;
2396
2361
  exports.DModal = DModal$1;
2397
2362
  exports.DModalBody = DModalBody;
2398
2363
  exports.DModalFooter = DModalFooter;
@@ -2404,18 +2369,14 @@ exports.DOffcanvasHeader = DOffcanvasHeader;
2404
2369
  exports.DPaginator = DPaginator;
2405
2370
  exports.DPopover = DPopover;
2406
2371
  exports.DProgress = DProgress;
2407
- exports.DQuickActionButton = DQuickActionButton;
2408
- exports.DQuickActionCheck = DQuickActionCheck;
2409
- exports.DQuickActionSelect = DQuickActionSelect;
2410
- exports.DQuickActionSwitch = DQuickActionSwitch;
2411
2372
  exports.DSelect = DSelect$1;
2412
- exports.DSkeleton = DSkeleton;
2413
2373
  exports.DStepper = DStepper;
2414
2374
  exports.DStepperDesktop = DStepper$2;
2415
2375
  exports.DStepperMobile = DStepper$1;
2416
2376
  exports.DTabContent = DTabContent;
2417
2377
  exports.DTableHead = DTableHead;
2418
2378
  exports.DTabs = DTabs$1;
2379
+ exports.DTimeline = DTimeline;
2419
2380
  exports.DToast = DToast$1;
2420
2381
  exports.DToastContainer = DToastContainer;
2421
2382
  exports.DTooltip = DTooltip;