@dynamic-framework/ui-react 2.0.0-dev.1 → 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 (126) hide show
  1. package/dist/css/dynamic-ui-non-root.css +7205 -3655
  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 +8010 -3788
  6. package/dist/css/dynamic-ui.min.css +2 -2
  7. package/dist/index.esm.js +248 -301
  8. package/dist/index.esm.js.map +1 -1
  9. package/dist/index.js +273 -310
  10. package/dist/index.js.map +1 -1
  11. package/dist/types/components/DAlert/DAlert.d.ts +3 -3
  12. package/dist/types/components/DAvatar/DAvatar.d.ts +1 -3
  13. package/dist/types/components/DBadge/DBadge.d.ts +4 -3
  14. package/dist/types/components/DBarChart/DBarChart.d.ts +9 -0
  15. package/dist/types/components/DBox/DBox.d.ts +5 -0
  16. package/dist/types/components/DBox/index.d.ts +2 -0
  17. package/dist/types/components/DButton/DButton.d.ts +6 -5
  18. package/dist/types/components/DButtonIcon/DButtonIcon.d.ts +3 -3
  19. package/dist/types/components/DChip/DChip.d.ts +3 -3
  20. package/dist/types/components/DCollapse/DCollapse.d.ts +1 -1
  21. package/dist/types/components/DCreditCard/DCreditCard.d.ts +12 -0
  22. package/dist/types/components/DCreditCard/index.d.ts +2 -0
  23. package/dist/types/components/DDatePicker/DDatePicker.d.ts +3 -3
  24. package/dist/types/components/DDatePicker/components/DDatePickerHeaderSelector.d.ts +2 -4
  25. package/dist/types/components/DDropdown/DDropdown.d.ts +20 -0
  26. package/dist/types/components/DDropdown/index.d.ts +2 -0
  27. package/dist/types/components/DIconBase/DIconBase.d.ts +4 -8
  28. package/dist/types/components/DInput/DInput.d.ts +2 -2
  29. package/dist/types/components/DInputCounter/DInputCounter.d.ts +2 -2
  30. package/dist/types/components/DInputCurrency/DInputCurrency.d.ts +3 -3
  31. package/dist/types/components/DInputMask/DInputMask.d.ts +1 -1
  32. package/dist/types/components/DInputPhone/DInputPhone.d.ts +2 -2
  33. package/dist/types/components/DInputPin/DInputPin.d.ts +3 -3
  34. package/dist/types/components/DInputRange/DInputRange.d.ts +2 -2
  35. package/dist/types/components/DInputSelect/DInputSelect.d.ts +3 -3
  36. package/dist/types/components/DLayout/DLayout.d.ts +11 -0
  37. package/dist/types/components/DLayout/components/DLayoutPane.d.ts +13 -0
  38. package/dist/types/components/DLayout/index.d.ts +3 -0
  39. package/dist/types/components/DListGroup/components/DListGroupItem.d.ts +4 -4
  40. package/dist/types/components/DMinimalLineChart/DMinimalLineChart.d.ts +9 -0
  41. package/dist/types/components/DMultiLineChart/DMultiLineChart.d.ts +9 -0
  42. package/dist/types/components/DOtp/DOtp.d.ts +16 -0
  43. package/dist/types/components/DOtp/DOtpspec.d.ts +0 -0
  44. package/dist/types/components/DOtp/components/OtpCountdown.d.ts +7 -0
  45. package/dist/types/components/DOtp/hooks/useCountdown.d.ts +4 -0
  46. package/dist/types/components/DOtp/index.d.ts +2 -0
  47. package/dist/types/components/DPaginator/DPaginator.d.ts +2 -27
  48. package/dist/types/components/DPieChart/DPieChart.d.ts +9 -0
  49. package/dist/types/components/DProgress/DProgress.d.ts +2 -1
  50. package/dist/types/components/DRadialBarChart/DRadialBarChart.d.ts +6 -0
  51. package/dist/types/components/DSelect/DSelect.d.ts +3 -3
  52. package/dist/types/components/DTabs/DTabs.d.ts +2 -2
  53. package/dist/types/components/DTimeline/DTimeline.d.ts +15 -0
  54. package/dist/types/components/DTimeline/index.d.ts +2 -0
  55. package/dist/types/components/DToastContainer/useDToast.d.ts +2 -2
  56. package/dist/types/components/DTooltip/DTooltip.d.ts +1 -2
  57. package/dist/types/components/index.d.ts +5 -8
  58. package/dist/types/components/interface.d.ts +3 -8
  59. package/package.json +8 -3
  60. package/src/style/_shame.scss +42 -1
  61. package/src/style/abstracts/_mixins.scss +1 -3
  62. package/src/style/abstracts/_utilities.scss +51 -1
  63. package/src/style/abstracts/variables/_+import.scss +3 -2
  64. package/src/style/abstracts/variables/_alerts.scss +2 -0
  65. package/src/style/abstracts/variables/_body.scss +10 -3
  66. package/src/style/abstracts/variables/_border.scss +5 -5
  67. package/src/style/abstracts/variables/_buttons.scss +17 -11
  68. package/src/style/abstracts/variables/_cards.scss +6 -4
  69. package/src/style/abstracts/variables/_chips.scss +2 -2
  70. package/src/style/abstracts/variables/_colors.scss +140 -69
  71. package/src/style/abstracts/variables/_datepicker.scss +10 -9
  72. package/src/style/abstracts/variables/_dropdowns.scss +6 -4
  73. package/src/style/abstracts/variables/_forms.scss +4 -4
  74. package/src/style/abstracts/variables/_list-group.scss +2 -2
  75. package/src/style/abstracts/variables/_modals.scss +4 -3
  76. package/src/style/abstracts/variables/_offcanvas.scss +1 -0
  77. package/src/style/abstracts/variables/_pagination.scss +4 -4
  78. package/src/style/abstracts/variables/_shadow.scss +1 -0
  79. package/src/style/abstracts/variables/_tables.scss +8 -3
  80. package/src/style/abstracts/variables/_tooltip.scss +1 -1
  81. package/src/style/abstracts/variables/_typography.scss +7 -7
  82. package/src/style/base/_+import.scss +1 -0
  83. package/src/style/base/_alert.scss +1 -27
  84. package/src/style/base/_badge.scss +50 -12
  85. package/src/style/base/_buttons.scss +143 -23
  86. package/src/style/base/_dropdown.scss +18 -0
  87. package/src/style/base/_input-group.scss +5 -0
  88. package/src/style/base/_list-group.scss +6 -0
  89. package/src/style/base/_pagination.scss +2 -0
  90. package/src/style/base/_tables.scss +4 -0
  91. package/src/style/base/_tooltip.scss +1 -10
  92. package/src/style/components/_+import.scss +4 -4
  93. package/src/style/components/_d-avatar.scss +2 -20
  94. package/src/style/components/_d-box.scss +13 -0
  95. package/src/style/components/_d-carousel.scss +19 -1
  96. package/src/style/components/_d-credit-card.scss +67 -0
  97. package/src/style/components/_d-datepicker.scss +64 -26
  98. package/src/style/components/_d-icon.scss +10 -3
  99. package/src/style/components/_d-modal.scss +3 -0
  100. package/src/style/components/_d-stepper-desktop.scss +61 -65
  101. package/src/style/components/_d-stepper-mobile.scss +2 -2
  102. package/src/style/components/_d-tabs.scss +37 -0
  103. package/src/style/components/_d-timeline.scss +108 -0
  104. package/src/style/helpers/_color-bg.scss +13 -3
  105. package/src/style/root/_root.scss +35 -18
  106. package/dist/types/components/DInputCurrencyBase/DInputCurrencyBase.d.ts +0 -26
  107. package/dist/types/components/DInputCurrencyBase/index.d.ts +0 -2
  108. package/dist/types/components/DInputSearch/DInputSearch.d.ts +0 -17
  109. package/dist/types/components/DInputSearch/index.d.ts +0 -2
  110. package/dist/types/components/DList/DList.d.ts +0 -17
  111. package/dist/types/components/DList/components/DListItem.d.ts +0 -13
  112. package/dist/types/components/DList/index.d.ts +0 -3
  113. package/dist/types/components/DQuickActionButton/DQuickActionButton.d.ts +0 -20
  114. package/dist/types/components/DQuickActionButton/index.d.ts +0 -2
  115. package/dist/types/components/DQuickActionCheck/DQuickActionCheck.d.ts +0 -17
  116. package/dist/types/components/DQuickActionCheck/index.d.ts +0 -2
  117. package/dist/types/components/DQuickActionSelect/DQuickActionSelect.d.ts +0 -13
  118. package/dist/types/components/DQuickActionSelect/index.d.ts +0 -2
  119. package/dist/types/components/DQuickActionSwitch/DQuickActionSwitch.d.ts +0 -15
  120. package/dist/types/components/DQuickActionSwitch/index.d.ts +0 -2
  121. package/dist/types/components/DSkeleton/DSkeleton.d.ts +0 -11
  122. package/dist/types/components/DSkeleton/index.d.ts +0 -2
  123. package/src/style/components/_d-quick-action-button.scss +0 -121
  124. package/src/style/components/_d-quick-action-check.scss +0 -74
  125. package/src/style/components/_d-quick-action-select.scss +0 -58
  126. 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,31 +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
- search: 'search',
274
- show: 'eye',
275
- hide: 'eye-slash',
276
- increase: 'plus-square',
277
- decrease: 'dash-square',
300
+ search: 'Search',
301
+ show: 'Eye',
302
+ hide: 'EyeOff',
303
+ increase: 'Plus',
304
+ decrease: 'Minus',
278
305
  },
279
306
  },
280
307
  breakpoints: {
@@ -327,25 +354,19 @@ function DIcon(_a) {
327
354
  return (jsxRuntime.jsx(DIconBase, Object.assign({ familyClass: propFamilyClass || familyClass, familyPrefix: propFamilyPrefix || familyPrefix, materialStyle: propMaterialStyle || materialStyle }, props)));
328
355
  }
329
356
 
330
- 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, }) {
331
358
  const { iconMap: { alert, xLg, }, } = useDContext();
332
- const icon = React.useMemo(() => iconProp || alert[theme], [alert, iconProp, theme]);
359
+ const icon = React.useMemo(() => iconProp || alert[color], [alert, iconProp, color]);
333
360
  const iconClose = React.useMemo(() => (iconCloseProp || xLg), [iconCloseProp, xLg]);
334
- 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]);
335
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 }) }))] })));
336
363
  }
337
364
 
338
- function DAvatar({ id, size, image, name: nameProp, useNameAsInitials = false, theme = 'secondary', variant, className, style, dataAttributes, }) {
339
- const generateClasses = React.useMemo(() => {
340
- const variantClass = variant
341
- ? `d-avatar-${variant}-${theme}`
342
- : `d-avatar-${theme}`;
343
- return {
344
- 'd-avatar': true,
345
- [variantClass]: true,
346
- [`d-avatar-${size}`]: !!size,
347
- };
348
- }, [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]);
349
370
  const name = React.useMemo(() => {
350
371
  if (!nameProp) {
351
372
  return undefined;
@@ -358,16 +379,21 @@ function DAvatar({ id, size, image, name: nameProp, useNameAsInitials = false, t
358
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 })] })));
359
380
  }
360
381
 
361
- 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, }) {
362
383
  const generateClasses = React.useMemo(() => ({
363
384
  badge: true,
364
- [`badge-${theme}`]: !!theme && !soft,
365
- [`badge-soft-${theme}`]: !!theme && soft,
385
+ [`badge-${color}`]: !!color && !soft,
386
+ [`badge-soft-${color}`]: !!color && soft,
366
387
  'rounded-pill': !!rounded,
367
- }), [rounded, soft, theme]);
388
+ [`badge-${size}`]: !!size,
389
+ }), [rounded, soft, color, size]);
368
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 }))] })));
369
391
  }
370
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
+
371
397
  /* eslint-disable */
372
398
  /**
373
399
  * This file is originally from `@primer/react`
@@ -389,7 +415,7 @@ function useProvidedRefOrCreate(providedRef) {
389
415
  }
390
416
 
391
417
  function DInput(_a, ref) {
392
- 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"]);
393
419
  const inputRef = useProvidedRefOrCreate(ref);
394
420
  const innerId = React.useId();
395
421
  const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
@@ -440,13 +466,9 @@ function DInput(_a, ref) {
440
466
  valid,
441
467
  value,
442
468
  ]);
443
- 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 })), [
444
470
  id,
445
471
  label,
446
- labelIcon,
447
- labelIconFamilyClass,
448
- labelIconFamilyPrefix,
449
- labelIconMaterialStyle,
450
472
  ]);
451
473
  const dynamicComponent = React.useMemo(() => {
452
474
  if (floatingLabel) {
@@ -575,7 +597,7 @@ async function urlToFile(url) {
575
597
  null,
576
598
  {
577
599
  code: ErrorCodes.FailedFetch,
578
- message: `Failed to fetch file from ${url}`,
600
+ message: `Failed to fetch file from ${url} (HTTP ${res.status})`,
579
601
  },
580
602
  ];
581
603
  }
@@ -585,11 +607,13 @@ async function urlToFile(url) {
585
607
  return [file, null];
586
608
  }
587
609
  catch (error) {
610
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
611
+ const isCorsError = errorMessage.includes('CORS') || errorMessage.includes('Failed to fetch');
588
612
  return [
589
613
  null,
590
614
  {
591
615
  code: ErrorCodes.FailedFetch,
592
- 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})`}`,
593
617
  },
594
618
  ];
595
619
  }
@@ -865,13 +889,13 @@ function DBoxFile(_a) {
865
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}`))) }))] }));
866
890
  }
867
891
 
868
- 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, }) {
869
893
  const generateClasses = React.useMemo(() => {
870
894
  const variantClass = variant
871
- ? `btn-${variant}-${theme}`
872
- : `btn-${theme}`;
895
+ ? `btn-${variant}-${color}`
896
+ : `btn-${color}`;
873
897
  return Object.assign(Object.assign(Object.assign({ btn: true, [variantClass]: true }, size && { [`btn-${size}`]: true }), (state && state !== 'disabled') && { [state]: true }), { loading });
874
- }, [variant, theme, size, state, loading]);
898
+ }, [variant, color, size, state, loading]);
875
899
  const clickHandler = React.useCallback((event) => {
876
900
  if (stopPropagationEnabled) {
877
901
  event.stopPropagation();
@@ -879,19 +903,20 @@ function DButton({ theme = 'primary', size, variant, state, text = '', ariaLabel
879
903
  onClick === null || onClick === void 0 ? void 0 : onClick(event);
880
904
  }, [stopPropagationEnabled, onClick]);
881
905
  const isDisabled = React.useMemo(() => (state === 'disabled' || loading || disabled), [state, loading, disabled]);
906
+ const content = children || text;
882
907
  const newAriaLabel = React.useMemo(() => (loading
883
908
  ? (loadingAriaLabel || ariaLabel || text)
884
909
  : (ariaLabel || text)), [loading, loadingAriaLabel, ariaLabel, text]);
885
- 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 }))] })));
886
911
  }
887
912
 
888
- 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, }) {
889
914
  const generateClasses = React.useMemo(() => {
890
915
  const variantClass = variant
891
- ? `btn-${variant}-${theme}`
892
- : `btn-${theme}`;
916
+ ? `btn-${variant}-${color}`
917
+ : `btn-${color}`;
893
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 });
894
- }, [variant, theme, size, state, loading]);
919
+ }, [variant, color, size, state, loading]);
895
920
  const clickHandler = React.useCallback((event) => {
896
921
  if (stopPropagationEnabled) {
897
922
  event.stopPropagation();
@@ -952,11 +977,11 @@ var DCarousel$1 = Object.assign(ForwardedDCarousel, {
952
977
  Slide: DCarouselSlide,
953
978
  });
954
979
 
955
- 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, }) {
956
981
  const generateClasses = React.useMemo(() => ({
957
982
  'd-chip': true,
958
- [`d-chip-${theme}`]: !!theme,
959
- }), [theme]);
983
+ [`d-chip-${color}`]: !!color,
984
+ }), [color]);
960
985
  const { iconMap: { xLg, }, } = useDContext();
961
986
  const iconClose = React.useMemo(() => iconCloseProp || xLg, [iconCloseProp, xLg]);
962
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 }) }))] })));
@@ -979,7 +1004,7 @@ function DCollapse({ id, className, style, Component, hasSeparator = false, defa
979
1004
  const generateStyles = React.useMemo(() => ({
980
1005
  [`--${PREFIX_BS}collapse-separator-display`]: hasSeparator ? 'block' : 'none',
981
1006
  }), [hasSeparator]);
982
- 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({
983
1008
  'collapse-body': true,
984
1009
  }), style: generateStyles, children: children }))] })));
985
1010
  }
@@ -1143,7 +1168,7 @@ function DSelectPlaceholder(_a) {
1143
1168
  }
1144
1169
 
1145
1170
  function DSelect(_a) {
1146
- 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"]);
1147
1172
  const innerId = React.useId();
1148
1173
  const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
1149
1174
  const handleOnIconStartClick = React.useCallback(() => {
@@ -1155,7 +1180,7 @@ function DSelect(_a) {
1155
1180
  return (jsxRuntime.jsxs("div", Object.assign({ className: classNames('d-select', className, {
1156
1181
  'd-select-floating': floatingLabel,
1157
1182
  disabled: disabled || loading,
1158
- }), 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({
1159
1184
  'input-group': true,
1160
1185
  'has-validation': invalid,
1161
1186
  disabled: disabled || loading,
@@ -1189,7 +1214,7 @@ var PickerType;
1189
1214
  PickerType["Month"] = "month";
1190
1215
  PickerType["Year"] = "year";
1191
1216
  })(PickerType || (PickerType = {}));
1192
- 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, }) {
1193
1218
  const { iconMap: { chevronLeft, chevronRight, }, } = useDContext();
1194
1219
  const arrayYears = React.useMemo(() => Array.from({ length: maxYearSelect - minYearSelect + 1 }, (_, index) => minYearSelect + index), [maxYearSelect, minYearSelect]);
1195
1220
  const years = React.useMemo(() => arrayYears.map((year) => ({
@@ -1214,16 +1239,16 @@ function DDatePickerHeaderSelector({ date, changeYear, changeMonth, decreaseMont
1214
1239
  }, [date]);
1215
1240
  const [startYear, endYear] = getYearRange();
1216
1241
  if (pickerType === PickerType.Year) {
1217
- 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" })] }));
1218
1243
  }
1219
1244
  if (pickerType === PickerType.Quarter || pickerType === PickerType.Month) {
1220
- 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' } })] }));
1221
1246
  }
1222
- 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' } })] })] }));
1223
1248
  }
1224
1249
 
1225
1250
  function DDatePicker(_a) {
1226
- 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"]);
1227
1252
  const pickerType = React.useMemo(() => {
1228
1253
  if (props.showQuarterYearPicker)
1229
1254
  return PickerType.Quarter;
@@ -1237,15 +1262,10 @@ function DDatePicker(_a) {
1237
1262
  props.showMonthYearPicker,
1238
1263
  props.showYearPicker,
1239
1264
  ]);
1240
- 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 }))), [
1241
- iconHeaderNext,
1242
- iconHeaderPrev,
1243
- 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 }))), [
1244
1266
  headerPrevMonthAriaLabel,
1245
1267
  headerNextMonthAriaLabel,
1246
1268
  iconHeaderSize,
1247
- headerButtonVariant,
1248
- headerButtonTheme,
1249
1269
  minYearSelect,
1250
1270
  maxYearSelect,
1251
1271
  pickerType,
@@ -1258,6 +1278,25 @@ function DDatePicker(_a) {
1258
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 })) })));
1259
1279
  }
1260
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
+
1261
1300
  function DInputMask(props, ref) {
1262
1301
  return (jsxRuntime.jsx(mask.InputMask, Object.assign({ ref: ref, component: ForwardedDInput }, props)));
1263
1302
  }
@@ -1441,18 +1480,6 @@ function DInputCounter(_a, ref) {
1441
1480
  const ForwardedDInputCounter = React.forwardRef(DInputCounter);
1442
1481
  ForwardedDInputCounter.displayName = 'DInputCounter';
1443
1482
 
1444
- /**
1445
- * @deprecated
1446
- */
1447
- function DInputCurrencyBase(_a, ref) {
1448
- var { value, minValue, maxValue, currencyOptions, currencyCode, onFocus, onBlur, onChange } = _a, inputProps = tslib.__rest(_a, ["value", "minValue", "maxValue", "currencyOptions", "currencyCode", "onFocus", "onBlur", "onChange"]);
1449
- const { handleOnWheel, } = useDisableInputWheel(ref);
1450
- const { inputRef, innerValue, innerType, handleOnFocus, handleOnChange, handleOnBlur, generateStyleVariables, generateSymbolStyleVariables, } = useInputCurrency(currencyOptions, value, onFocus, onChange, onBlur, ref);
1451
- 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)));
1452
- }
1453
- const ForwardedDInputCurrencyBase$1 = React.forwardRef(DInputCurrencyBase);
1454
- ForwardedDInputCurrencyBase$1.displayName = 'DInputCurrencyBase';
1455
-
1456
1483
  function DInputCurrency(_a, ref) {
1457
1484
  var { value, minValue, maxValue, currencyCode, onFocus, onBlur, onChange } = _a, props = tslib.__rest(_a, ["value", "minValue", "maxValue", "currencyCode", "onFocus", "onBlur", "onChange"]);
1458
1485
  const { currency: currencyOptions } = useDContext();
@@ -1460,19 +1487,8 @@ function DInputCurrency(_a, ref) {
1460
1487
  const { inputRef, innerValue, innerType, handleOnFocus, handleOnChange, handleOnBlur, generateStyleVariables, generateSymbolStyleVariables, } = useInputCurrency(currencyOptions, value, onFocus, onChange, onBlur, ref);
1461
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)));
1462
1489
  }
1463
- const ForwardedDInputCurrencyBase = React.forwardRef(DInputCurrency);
1464
- ForwardedDInputCurrencyBase.displayName = 'DInputCurrency';
1465
-
1466
- /**
1467
- * @deprecated
1468
- */
1469
- function DInputSearch(_a, ref) {
1470
- var { type, iconEnd: iconEndProp, iconEndAriaLabel = 'search' } = _a, props = tslib.__rest(_a, ["type", "iconEnd", "iconEndAriaLabel"]);
1471
- const inputRef = useProvidedRefOrCreate(ref);
1472
- return (jsxRuntime.jsx(ForwardedDInput, Object.assign({ ref: inputRef, type: "text", iconEnd: "search", iconEndAriaLabel: iconEndAriaLabel }, props)));
1473
- }
1474
- const ForwardedDInputSearch = React.forwardRef(DInputSearch);
1475
- ForwardedDInputSearch.displayName = 'DInputSearch';
1490
+ const ForwardedDInputCurrency = React.forwardRef(DInputCurrency);
1491
+ ForwardedDInputCurrency.displayName = 'DInputCurrency';
1476
1492
 
1477
1493
  function DInputPassword(_a, ref) {
1478
1494
  var { onIconEndClick, iconEndAriaLabel = 'show/hide password' } = _a, props = tslib.__rest(_a, ["onIconEndClick", "iconEndAriaLabel"]);
@@ -1489,7 +1505,7 @@ function DInputPassword(_a, ref) {
1489
1505
  const ForwardedDInputPassword = React.forwardRef(DInputPassword);
1490
1506
  ForwardedDInputPassword.displayName = 'DInputPassword';
1491
1507
 
1492
- 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, }) {
1493
1509
  const innerId = React.useId();
1494
1510
  const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
1495
1511
  const [pattern, setPattern] = React.useState('');
@@ -1522,7 +1538,8 @@ function DInputPin({ id: idProp, label = '', labelIcon, labelIconFamilyClass, la
1522
1538
  }
1523
1539
  if (input.value !== '') {
1524
1540
  setActiveInput((prev) => {
1525
- const newValue = prev.with(index, input.value);
1541
+ const newValue = [...prev];
1542
+ newValue[index] = input.value;
1526
1543
  return newValue;
1527
1544
  });
1528
1545
  if (input.nextSibling) {
@@ -1538,7 +1555,8 @@ function DInputPin({ id: idProp, label = '', labelIcon, labelIconFamilyClass, la
1538
1555
  if (key === 'Backspace') {
1539
1556
  const { value } = currentTarget;
1540
1557
  setActiveInput((prev) => {
1541
- const newVal = prev.with(index, '');
1558
+ const newVal = [...prev];
1559
+ newVal[index] = '';
1542
1560
  return newVal;
1543
1561
  });
1544
1562
  if (currentTarget.previousSibling && value === '') {
@@ -1551,19 +1569,23 @@ function DInputPin({ id: idProp, label = '', labelIcon, labelIconFamilyClass, la
1551
1569
  }
1552
1570
  }, []);
1553
1571
  const focusInput = React.useCallback((index) => {
1554
- setActiveInput((prev) => prev.with(index, ''));
1572
+ setActiveInput((prev) => {
1573
+ const newVal = [...prev];
1574
+ newVal[index] = '';
1575
+ return newVal;
1576
+ });
1555
1577
  }, []);
1556
1578
  const wheelInput = React.useCallback((event) => {
1557
1579
  event.currentTarget.blur();
1558
1580
  }, []);
1559
- 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({
1560
1582
  'form-control': true,
1561
1583
  'is-invalid': invalid,
1562
1584
  'is-valid': valid,
1563
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 }))] })));
1564
1586
  }
1565
1587
 
1566
- 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, }) {
1567
1589
  const innerId = React.useId();
1568
1590
  const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
1569
1591
  const internalValueExtractor = React.useCallback((option) => {
@@ -1631,12 +1653,9 @@ function DInputSelect({ id: idProp, name, label = '', className, style, options
1631
1653
  valid,
1632
1654
  size,
1633
1655
  ]);
1634
- 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 })), [
1635
1657
  id,
1636
1658
  label,
1637
- labelIcon,
1638
- labelIconFamilyClass,
1639
- labelIconFamilyPrefix,
1640
1659
  ]);
1641
1660
  const dynamicComponent = React.useMemo(() => {
1642
1661
  if (floatingLabel) {
@@ -1704,38 +1723,7 @@ function DInputRange(_a, ref) {
1704
1723
  const ForwardedDInputRange = React.forwardRef(DInputRange);
1705
1724
  ForwardedDInputRange.displayName = 'DInputRange';
1706
1725
 
1707
- /**
1708
- * @deprecated Please use DListGroup.Item or DListGroupItem instead
1709
- */
1710
- function DListItem({ children, className, style, active = false, disabled = false, theme, onClick, }) {
1711
- const Tag = React.useMemo(() => (onClick ? 'button' : 'div'), [onClick]);
1712
- return (jsxRuntime.jsx(Tag, Object.assign({}, Tag === 'button' && {
1713
- onClick,
1714
- type: 'button',
1715
- }, { className: classNames('list-group-item list-group-item-action', theme ? `list-group-item-${theme}` : undefined, className, {
1716
- active,
1717
- disabled,
1718
- }), style: style }, active && { 'aria-current': true }, { children: children })));
1719
- }
1720
-
1721
- /**
1722
- * @deprecated Please use DListGroup instead
1723
- */
1724
- function DList({ children, className, style, flush = false, numbered = false, horizontal = false, horizontalBreakpoint, dataAttributes, }) {
1725
- if (flush && horizontal) {
1726
- throw new Error("Horizontal and Flush props don't work together");
1727
- }
1728
- return (jsxRuntime.jsx("div", Object.assign({ className: classNames('list-group', {
1729
- 'list-group-flush': flush && !horizontal,
1730
- 'list-group-numbered': numbered,
1731
- 'list-group-horizontal': horizontal && !horizontalBreakpoint,
1732
- }, (horizontal && horizontalBreakpoint) && `list-group-horizontal-${horizontalBreakpoint}`, className), style: style }, dataAttributes, { children: children })));
1733
- }
1734
- var DList$1 = Object.assign(DList, {
1735
- Item: DListItem,
1736
- });
1737
-
1738
- 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, }) {
1739
1727
  const Tag = React.useMemo(() => {
1740
1728
  if (href) {
1741
1729
  return 'a';
@@ -1754,17 +1742,17 @@ function DListGroupItem({ as = 'li', action: actionProp, active, disabled, href,
1754
1742
  const generateClasses = React.useMemo(() => ({
1755
1743
  'list-group-item': true,
1756
1744
  'list-group-item-action': action,
1757
- [`list-group-item-${theme}`]: !!theme,
1745
+ [`list-group-item-${color}`]: !!color,
1758
1746
  active,
1759
1747
  disabled,
1760
- }), [action, active, disabled, theme]);
1748
+ }), [action, active, disabled, color]);
1761
1749
  const ariaAttributes = React.useMemo(() => {
1762
1750
  if (Tag === 'button') {
1763
1751
  return Object.assign(Object.assign({}, active && { 'aria-current': true }), disabled && { disabled: true });
1764
1752
  }
1765
1753
  return Object.assign(Object.assign({}, active && { 'aria-current': true }), disabled && { 'aria-disabled': true });
1766
1754
  }, [Tag, active, disabled]);
1767
- 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" }))] })));
1768
1756
  }
1769
1757
 
1770
1758
  function DListGroup({ as = 'ul', numbered, flush, horizontal, children, className, style, dataAttributes, }) {
@@ -1867,11 +1855,8 @@ var DOffcanvas$1 = Object.assign(DOffcanvas, {
1867
1855
  });
1868
1856
 
1869
1857
  function DPaginator(_a) {
1870
- var { className, page, current, showArrows, navClassName } = _a, props = tslib.__rest(_a, ["className", "page", "current", "showArrows", "navClassName"]);
1871
- 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 && {
1872
- extraClassName: className,
1873
- })), [props, page, current, showArrows, className]);
1874
- 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)));
1875
1860
  }
1876
1861
 
1877
1862
  function DPopover({ children, renderComponent, open, setOpen, adjustContentToRender = false, className, style, dataAttributes, }) {
@@ -1912,115 +1897,14 @@ function DPopover({ children, renderComponent, open, setOpen, adjustContentToRen
1912
1897
  }), ref: refs.setFloating, style: floatingStyles, "aria-labelledby": headingId }, getFloatingProps(), { children: children })) }))] })));
1913
1898
  }
1914
1899
 
1915
- 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, }) {
1916
1901
  const percentage = React.useMemo(() => (Math.round((currentValue * 100) / maxValue)), [currentValue, maxValue]);
1917
1902
  const formatProgress = React.useMemo(() => `${percentage}%`, [percentage]);
1918
1903
  const generateClasses = React.useMemo(() => ({
1919
1904
  'progress-bar': true,
1920
1905
  'progress-bar-striped progress-bar-animated': enableStripedAnimation,
1921
1906
  }), [enableStripedAnimation]);
1922
- 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 }) })));
1923
- }
1924
-
1925
- function DQuickActionButton({ line1, line2, className, actionIcon, actionIconFamilyClass, actionIconFamilyPrefix, actionIconTheme, representativeImage, representativeIcon, representativeIconTheme = 'secondary', representativeIconHasCircle = false, representativeIconFamilyClass, representativeIconFamilyPrefix, onClick, href, hrefTarget, style, dataAttributes, }) {
1926
- const Tag = React.useMemo(() => {
1927
- if (href) {
1928
- return 'a';
1929
- }
1930
- if (onClick) {
1931
- return 'button';
1932
- }
1933
- return 'div';
1934
- }, [href, onClick]);
1935
- const tagProps = React.useMemo(() => {
1936
- if (href) {
1937
- return {
1938
- className: classNames('d-quick-action-button', 'd-quick-action-button-feedback', className),
1939
- href,
1940
- target: hrefTarget,
1941
- };
1942
- }
1943
- if (onClick) {
1944
- return {
1945
- className: classNames('d-quick-action-button', 'd-quick-action-button-feedback', className),
1946
- onClick,
1947
- };
1948
- }
1949
- return {
1950
- className: classNames('d-quick-action-button', className),
1951
- };
1952
- }, [
1953
- className,
1954
- href,
1955
- hrefTarget,
1956
- onClick,
1957
- ]);
1958
- return (jsxRuntime.jsxs(Tag, Object.assign({ style: style }, tagProps, dataAttributes, { children: [representativeIcon && (jsxRuntime.jsx(DIcon, { className: "d-quick-action-button-representative-icon", size: representativeIconHasCircle
1959
- ? `var(--${PREFIX_BS}quick-action-button-representative-icon-size)`
1960
- : `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 }))] })));
1961
- }
1962
-
1963
- /**
1964
- * @deprecated
1965
- */
1966
- function DQuickActionCheck({ id: idProp, name, value, line1, line2, line3, className, style, checked, dataAttributes, onChange, }) {
1967
- const innerId = React.useId();
1968
- const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
1969
- const changeHandler = React.useCallback((event) => {
1970
- event.stopPropagation();
1971
- onChange === null || onChange === void 0 ? void 0 : onChange(event);
1972
- }, [onChange]);
1973
- 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 })] })));
1974
- }
1975
-
1976
- function DQuickActionSelect({ id: idProp, name, value, line1, line2, className, style, selected = false, dataAttributes, onChange, }) {
1977
- const innerRef = React.useRef(null);
1978
- const innerId = React.useId();
1979
- const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
1980
- const changeHandler = React.useCallback((event) => {
1981
- event.stopPropagation();
1982
- onChange === null || onChange === void 0 ? void 0 : onChange(event);
1983
- }, [onChange]);
1984
- React.useEffect(() => {
1985
- if (innerRef.current) {
1986
- innerRef.current.checked = selected;
1987
- }
1988
- }, [selected]);
1989
- 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 })] })));
1990
- }
1991
-
1992
- /**
1993
- * @deprecated
1994
- */
1995
- function DQuickActionSwitch({ id: idProp, name, label, hint, checked, disabled, className, style, dataAttributes, onClick, }) {
1996
- const innerId = React.useId();
1997
- const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
1998
- const clickHandler = React.useCallback((event) => {
1999
- event.stopPropagation();
2000
- onClick === null || onClick === void 0 ? void 0 : onClick(checked);
2001
- }, [checked, onClick]);
2002
- 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 })] })));
2003
- }
2004
-
2005
- /**
2006
- * @deprecated Please use https://getbootstrap.com/docs/5.3/components/placeholders/ instead
2007
- */
2008
- function DSkeleton({ speed = 2, viewBox, backgroundColor, foregroundColor, children, }) {
2009
- const innerBackgroundColor = React.useMemo(() => {
2010
- if (backgroundColor) {
2011
- return backgroundColor;
2012
- }
2013
- const computedStyle = getComputedStyle(document.documentElement);
2014
- return computedStyle.getPropertyValue(`--${PREFIX_BS}secondary-100`);
2015
- }, [backgroundColor]);
2016
- const innerForegroundColor = React.useMemo(() => {
2017
- if (foregroundColor) {
2018
- return foregroundColor;
2019
- }
2020
- const computedStyle = getComputedStyle(document.documentElement);
2021
- return computedStyle.getPropertyValue(`--${PREFIX_BS}gray-100`);
2022
- }, [foregroundColor]);
2023
- 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 }) })));
2024
1908
  }
2025
1909
 
2026
1910
  function DStepper$2({ options, currentStep, iconSuccess: iconSuccessProp, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle = false, vertical = false, completed, alignStart = false, className, style, }) {
@@ -2033,13 +1917,13 @@ function DStepper$2({ options, currentStep, iconSuccess: iconSuccessProp, iconSu
2033
1917
  'd-stepper-desktop': true,
2034
1918
  'is-vertical': vertical,
2035
1919
  'is-align-start': alignStart && !vertical,
2036
- }, 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({
2037
1924
  'd-step-icon-container': true,
2038
1925
  'd-step-check': value < currentStep || completed,
2039
- 'd-step-current': value === currentStep && !completed,
2040
- }), children: value < currentStep || completed
2041
- ? (jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconSuccessFamilyClass, familyPrefix: iconSuccessFamilyPrefix, materialStyle: iconSuccessMaterialStyle, className: "d-step-icon" }))
2042
- : 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))) }));
2043
1927
  }
2044
1928
 
2045
1929
  function DStepper$1({ options, currentStep, className, style, }) {
@@ -2079,7 +1963,7 @@ function DStepper({ options, currentStep, iconSuccess, iconSuccessFamilyClass, i
2079
1963
  const ARROW_WIDTH = 8;
2080
1964
  const ARROW_HEIGHT = 4;
2081
1965
  const GAP = 2;
2082
- 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, }) {
2083
1967
  const [isOpen, setIsOpen] = React.useState(open);
2084
1968
  const arrowRef = React.useRef(null);
2085
1969
  const { refs, context, floatingStyles, } = react.useFloating({
@@ -2110,10 +1994,16 @@ function DTooltip({ className, childrenClassName, style, offSet = ARROW_HEIGHT +
2110
1994
  dismiss,
2111
1995
  role,
2112
1996
  ]);
2113
- 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]);
2114
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 })] }))) })] }));
2115
1999
  }
2116
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
+
2117
2007
  const TabContext = React.createContext(undefined);
2118
2008
  function useTabContext() {
2119
2009
  const context = React.useContext(TabContext);
@@ -2152,7 +2042,7 @@ function DTabs({ children, defaultSelected, onChange, options, className, classN
2152
2042
  'flex-column': !vertical || variant === 'tabs',
2153
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', {
2154
2044
  active: option.tab === selected,
2155
- }, 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 })] })) }));
2156
2046
  }
2157
2047
  var DTabs$1 = Object.assign(DTabs, {
2158
2048
  Tab: DTabContent,
@@ -2184,20 +2074,18 @@ function useDToast() {
2184
2074
  if (typeof data === 'function') {
2185
2075
  return reactHotToast.toast.custom(data, toastProps);
2186
2076
  }
2187
- const { title, description, icon, closeIcon, timestamp, theme, soft, } = data;
2077
+ const { title, description, icon, closeIcon, timestamp, color, } = data;
2188
2078
  return reactHotToast.toast.custom(({ id, visible }) => {
2189
2079
  if (!visible) {
2190
2080
  return null;
2191
2081
  }
2192
2082
  if (!description) {
2193
2083
  return (jsxRuntime.jsx(DToast$1, { className: classNames({
2194
- [`toast-${theme}`]: !!theme && !soft,
2195
- [`toast-soft-${theme}`]: !!theme && !!soft,
2084
+ [`toast-${color}`]: !!color,
2196
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 }) })] }) }));
2197
2086
  }
2198
2087
  return (jsxRuntime.jsxs(DToast$1, { className: classNames({
2199
- [`toast-${theme}`]: !!theme && !soft,
2200
- [`toast-soft-${theme}`]: !!theme && !!soft,
2088
+ [`toast-${color}`]: !!color,
2201
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 }) })] }));
2202
2090
  }, toastProps);
2203
2091
  }, [xLg]);
@@ -2268,7 +2156,7 @@ function validatePhoneNumber(phone) {
2268
2156
  }
2269
2157
 
2270
2158
  function DInputPhone(_a, ref) {
2271
- 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"]);
2272
2160
  const innerRef = useProvidedRefOrCreate(ref);
2273
2161
  const innerId = React.useId();
2274
2162
  const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
@@ -2327,13 +2215,9 @@ function DInputPhone(_a, ref) {
2327
2215
  placeholder,
2328
2216
  valid,
2329
2217
  ]);
2330
- 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 })), [
2331
2219
  id,
2332
2220
  label,
2333
- labelIcon,
2334
- labelIconFamilyClass,
2335
- labelIconFamilyPrefix,
2336
- labelIconMaterialStyle,
2337
2221
  ]);
2338
2222
  const dynamicComponent = React.useMemo(() => {
2339
2223
  if (floatingLabel) {
@@ -2354,9 +2238,92 @@ function DInputPhone(_a, ref) {
2354
2238
  const ForwardedDInputPhone = React.forwardRef(DInputPhone);
2355
2239
  ForwardedDInputPhone.displayName = 'DInputPhone';
2356
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
+
2357
2323
  exports.DAlert = DAlert;
2358
2324
  exports.DAvatar = DAvatar;
2359
2325
  exports.DBadge = DBadge;
2326
+ exports.DBox = DBox;
2360
2327
  exports.DBoxFile = DBoxFile;
2361
2328
  exports.DButton = DButton;
2362
2329
  exports.DButtonIcon = DButtonIcon;
@@ -2370,27 +2337,27 @@ exports.DChip = DChip;
2370
2337
  exports.DCollapse = DCollapse;
2371
2338
  exports.DContext = DContext;
2372
2339
  exports.DContextProvider = DContextProvider;
2340
+ exports.DCreditCard = DCreditCard;
2373
2341
  exports.DCurrencyText = DCurrencyText;
2374
2342
  exports.DDatePicker = DDatePicker;
2343
+ exports.DDropdown = DDropdown;
2375
2344
  exports.DIcon = DIcon;
2376
2345
  exports.DIconBase = DIconBase;
2377
2346
  exports.DInput = ForwardedDInput;
2378
2347
  exports.DInputCheck = DInputCheck;
2379
2348
  exports.DInputCounter = ForwardedDInputCounter;
2380
- exports.DInputCurrency = ForwardedDInputCurrencyBase;
2381
- exports.DInputCurrencyBase = ForwardedDInputCurrencyBase$1;
2349
+ exports.DInputCurrency = ForwardedDInputCurrency;
2382
2350
  exports.DInputMask = ForwardedDInputMask;
2383
2351
  exports.DInputPassword = ForwardedDInputPassword;
2384
2352
  exports.DInputPhone = ForwardedDInputPhone;
2385
2353
  exports.DInputPin = DInputPin;
2386
2354
  exports.DInputRange = ForwardedDInputRange;
2387
- exports.DInputSearch = ForwardedDInputSearch;
2388
2355
  exports.DInputSelect = DInputSelect;
2389
2356
  exports.DInputSwitch = DInputSwitch;
2390
- exports.DList = DList$1;
2357
+ exports.DLayout = DLayout$1;
2358
+ exports.DLayoutPane = DLayoutPane;
2391
2359
  exports.DListGroup = DListGroup$1;
2392
2360
  exports.DListGroupItem = DListGroupItem;
2393
- exports.DListItem = DListItem;
2394
2361
  exports.DModal = DModal$1;
2395
2362
  exports.DModalBody = DModalBody;
2396
2363
  exports.DModalFooter = DModalFooter;
@@ -2402,18 +2369,14 @@ exports.DOffcanvasHeader = DOffcanvasHeader;
2402
2369
  exports.DPaginator = DPaginator;
2403
2370
  exports.DPopover = DPopover;
2404
2371
  exports.DProgress = DProgress;
2405
- exports.DQuickActionButton = DQuickActionButton;
2406
- exports.DQuickActionCheck = DQuickActionCheck;
2407
- exports.DQuickActionSelect = DQuickActionSelect;
2408
- exports.DQuickActionSwitch = DQuickActionSwitch;
2409
2372
  exports.DSelect = DSelect$1;
2410
- exports.DSkeleton = DSkeleton;
2411
2373
  exports.DStepper = DStepper;
2412
2374
  exports.DStepperDesktop = DStepper$2;
2413
2375
  exports.DStepperMobile = DStepper$1;
2414
2376
  exports.DTabContent = DTabContent;
2415
2377
  exports.DTableHead = DTableHead;
2416
2378
  exports.DTabs = DTabs$1;
2379
+ exports.DTimeline = DTimeline;
2417
2380
  exports.DToast = DToast$1;
2418
2381
  exports.DToastContainer = DToastContainer;
2419
2382
  exports.DTooltip = DTooltip;