@dynamic-framework/ui-react 1.26.0 → 1.28.0

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 (58) hide show
  1. package/dist/css/dynamic-ui-non-root.css +851 -927
  2. package/dist/css/dynamic-ui-non-root.min.css +2 -2
  3. package/dist/css/dynamic-ui-root.css +228 -152
  4. package/dist/css/dynamic-ui-root.min.css +2 -2
  5. package/dist/css/dynamic-ui.css +1062 -1062
  6. package/dist/css/dynamic-ui.min.css +2 -2
  7. package/dist/index.esm.js +125 -58
  8. package/dist/index.esm.js.map +1 -1
  9. package/dist/index.js +126 -57
  10. package/dist/index.js.map +1 -1
  11. package/dist/types/components/DButtonIcon/DButtonIcon.d.ts +19 -0
  12. package/dist/types/components/DButtonIcon/index.d.ts +2 -0
  13. package/dist/types/components/DDatePicker/DDatePicker.d.ts +3 -3
  14. package/dist/types/components/DDatePickerInput/DDatePickerInput.d.ts +2 -0
  15. package/dist/types/components/DInput/DInput.d.ts +3 -2
  16. package/dist/types/components/DInputCheck/DInputCheck.d.ts +3 -1
  17. package/dist/types/components/DInputCounter/DInputCounter.d.ts +2 -1
  18. package/dist/types/components/DInputCurrency/DInputCurrency.d.ts +2 -1
  19. package/dist/types/components/DInputCurrencyBase/DInputCurrencyBase.d.ts +2 -1
  20. package/dist/types/components/DInputMask/DInputMask.d.ts +2 -1
  21. package/dist/types/components/DInputSearch/DInputSearch.d.ts +2 -1
  22. package/dist/types/components/DInputSelect/DInputSelect.d.ts +3 -2
  23. package/dist/types/components/DInputSwitch/DInputSwitch.d.ts +3 -1
  24. package/dist/types/components/DSelect/DSelect.d.ts +3 -3
  25. package/dist/types/components/DStepper/DStepper.d.ts +2 -1
  26. package/dist/types/components/DStepperDesktop/DStepperDesktop.d.ts +2 -1
  27. package/dist/types/components/DTableHead/DTableHead.d.ts +9 -0
  28. package/dist/types/components/DTableHead/index.d.ts +2 -0
  29. package/dist/types/components/DToastContainer/DToastContainer.d.ts +2 -14
  30. package/dist/types/components/DToastContainer/useDToast.d.ts +11 -12
  31. package/dist/types/components/index.d.ts +2 -0
  32. package/dist/types/contexts/DContext.d.ts +1 -1
  33. package/dist/types/hooks/useFormatCurrency.d.ts +2 -1
  34. package/package.json +7 -5
  35. package/setupJest.js +16 -0
  36. package/src/style/abstracts/_mixins.scss +41 -21
  37. package/src/style/abstracts/variables/_+import.scss +12 -3
  38. package/src/style/abstracts/variables/_border.scss +1 -1
  39. package/src/style/abstracts/variables/_buttons.scss +3 -5
  40. package/src/style/abstracts/variables/_colors.scss +10 -10
  41. package/src/style/abstracts/variables/_forms.scss +24 -50
  42. package/src/style/abstracts/variables/_options.scss +1 -1
  43. package/src/style/abstracts/variables/_quick-action-switch.scss +0 -2
  44. package/src/style/abstracts/variables/_toast.scss +5 -0
  45. package/src/style/base/_+import.scss +1 -0
  46. package/src/style/base/_alert.scss +1 -1
  47. package/src/style/base/_buttons.scss +41 -16
  48. package/src/style/base/_form-check.scss +2 -19
  49. package/src/style/base/_form-switch.scss +4 -53
  50. package/src/style/base/_toast.scss +56 -0
  51. package/src/style/components/_+import.scss +3 -2
  52. package/src/style/components/_d-button-icon.scss +26 -0
  53. package/src/style/components/_d-close.scss +11 -0
  54. package/src/style/components/_d-modal.scss +0 -11
  55. package/src/style/components/_d-offcanvas.scss +0 -11
  56. package/src/style/components/_d-quick-action-switch.scss +0 -7
  57. package/src/style/components/_d-table-head.scss +18 -0
  58. package/src/style/root/_root.scss +42 -36
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ var mask = require('@react-input/mask');
15
15
  var ResponsivePagination = require('react-responsive-pagination');
16
16
  var react = require('@floating-ui/react');
17
17
  var ContentLoader = require('react-content-loader');
18
- var reactToastify = require('react-toastify');
18
+ var reactHotToast = require('react-hot-toast');
19
19
  var i18n = require('i18next');
20
20
  var reactI18next = require('react-i18next');
21
21
 
@@ -159,20 +159,26 @@ function DPortalContextProvider({ portalName, children, availablePortals, }) {
159
159
  closePortal,
160
160
  }), [stack, openPortal, closePortal]);
161
161
  const handleClose = React.useCallback((target) => {
162
- if (target instanceof HTMLDivElement) {
163
- if (target.classList.contains('portal')) {
164
- if (!('bsBackdrop' in target.dataset)) {
165
- closePortal();
166
- }
162
+ if (!(target instanceof HTMLDivElement)) {
163
+ return;
164
+ }
165
+ if (target.classList.contains('portal') && !('bsBackdrop' in target.dataset)) {
166
+ closePortal();
167
+ return;
168
+ }
169
+ if (target.classList.contains('backdrop')) {
170
+ const lastPortal = target.nextElementSibling;
171
+ if (lastPortal && lastPortal.classList.contains('portal') && !('bsBackdrop' in lastPortal.dataset)) {
172
+ closePortal();
167
173
  }
168
174
  }
169
175
  }, [closePortal]);
170
176
  React.useEffect(() => {
171
177
  const keyEvent = (event) => {
172
178
  if (event.key === 'Escape') {
173
- const lastModal = document.querySelector(`#${portalName} > div > div:last-child`);
174
- if (lastModal) {
175
- handleClose(lastModal);
179
+ const lastPortal = document.querySelector(`#${portalName} > div > div:last-child`);
180
+ if (lastPortal) {
181
+ handleClose(lastPortal);
176
182
  }
177
183
  }
178
184
  };
@@ -321,6 +327,28 @@ function DButton({ theme = 'primary', size, variant, state, text = '', ariaLabel
321
327
  return (jsxRuntime.jsxs("button", Object.assign({ className: classNames(generateClasses, className), style: style, type: type, disabled: isDisabled, onClick: clickHandler, "aria-label": newAriaLabel, form: form }, 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 }))] })));
322
328
  }
323
329
 
330
+ function DButtonIcon({ id, icon, size, className, variant, state, loadingAriaLabel, iconMaterialStyle, ariaLabel, theme = 'primary', type = 'button', loading = false, disabled = false, stopPropagationEnabled = true, style, iconFamilyClass, iconFamilyPrefix, onClick, }) {
331
+ const generateClasses = React.useMemo(() => {
332
+ const variantClass = variant
333
+ ? `btn-${variant}-${theme}`
334
+ : `btn-${theme}`;
335
+ return Object.assign(Object.assign(Object.assign({ 'btn d-button-icon': true, [variantClass]: true }, size && { [`btn-${size}`]: true }), (state && state !== 'disabled') && { [state]: true }), { loading });
336
+ }, [variant, theme, size, state, loading]);
337
+ const clickHandler = React.useCallback((event) => {
338
+ if (stopPropagationEnabled) {
339
+ event.stopPropagation();
340
+ }
341
+ onClick === null || onClick === void 0 ? void 0 : onClick(event);
342
+ }, [stopPropagationEnabled, onClick]);
343
+ const isDisabled = React.useMemo(() => (state === 'disabled' || loading || disabled), [state, loading, disabled]);
344
+ const newAriaLabel = React.useMemo(() => (loading
345
+ ? (loadingAriaLabel || ariaLabel)
346
+ : (ariaLabel)), [ariaLabel, loading, loadingAriaLabel]);
347
+ return (jsxRuntime.jsx("button", { className: classNames(generateClasses, className), style: style, type: type, disabled: isDisabled, onClick: clickHandler, "aria-label": newAriaLabel, id: id, children: loading
348
+ ? (jsxRuntime.jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", children: jsxRuntime.jsx("span", { className: "visually-hidden", children: "Loading..." }) }))
349
+ : (jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })) }));
350
+ }
351
+
324
352
  function DCardHeader({ className, style, children, }) {
325
353
  return (jsxRuntime.jsx("div", { className: classNames('card-header', className), style: style, children: children }));
326
354
  }
@@ -404,7 +432,7 @@ function formatCurrency(amount, options) {
404
432
 
405
433
  function useFormatCurrency(...args) {
406
434
  const { currency } = useDContext();
407
- const format = React.useCallback((value) => formatCurrency(value, currency), [currency]);
435
+ const format = React.useCallback((value, currencyOptions) => formatCurrency(value, currencyOptions || currency), [currency]);
408
436
  const values = (args || []).map((value) => (formatCurrency(value !== null && value !== void 0 ? value : 0, currency)));
409
437
  return {
410
438
  format,
@@ -438,7 +466,7 @@ function useProvidedRefOrCreate(providedRef) {
438
466
  }
439
467
 
440
468
  function DInput(_a, ref) {
441
- 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, invalidIcon: invalidIconProp, validIcon: validIconProp, hint, invalid = false, valid = false, floatingLabel = false, inputStart, inputEnd, value, placeholder = '', 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", "invalidIcon", "validIcon", "hint", "invalid", "valid", "floatingLabel", "inputStart", "inputEnd", "value", "placeholder", "onChange", "onIconStartClick", "onIconEndClick"]);
469
+ 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, invalidIcon: invalidIconProp, validIcon: validIconProp, hint, size, invalid = false, valid = false, floatingLabel = false, inputStart, inputEnd, value, placeholder = '', 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", "invalidIcon", "validIcon", "hint", "size", "invalid", "valid", "floatingLabel", "inputStart", "inputEnd", "value", "placeholder", "onChange", "onIconStartClick", "onIconEndClick"]);
442
470
  const inputRef = useProvidedRefOrCreate(ref);
443
471
  const innerId = React.useId();
444
472
  const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
@@ -473,6 +501,7 @@ function DInput(_a, ref) {
473
501
  hint,
474
502
  ]);
475
503
  const inputComponent = React.useMemo(() => (jsxRuntime.jsx("input", Object.assign({ ref: inputRef, id: id, className: classNames('form-control', {
504
+ [`form-control-${size}`]: !!size,
476
505
  'is-invalid': invalid,
477
506
  'is-valid': valid,
478
507
  }), disabled: disabled || loading, value: value, onChange: handleOnChange }, (floatingLabel || placeholder) && { placeholder: floatingLabel ? '' : placeholder }, ariaDescribedby && { 'aria-describedby': ariaDescribedby }, inputProps))), [
@@ -488,8 +517,9 @@ function DInput(_a, ref) {
488
517
  floatingLabel,
489
518
  valid,
490
519
  value,
520
+ size,
491
521
  ]);
492
- 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, materialStyle: labelIconMaterialStyle }))] })), [
522
+ 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 }))] })), [
493
523
  id,
494
524
  label,
495
525
  labelIcon,
@@ -523,14 +553,14 @@ function DDatePickerTime(_a) {
523
553
  }
524
554
 
525
555
  function DDatePickerInput(_a, ref) {
526
- var { value, onClick, id, iconEnd, className, style, inputLabel, readOnly: ignored } = _a, props = tslib.__rest(_a, ["value", "onClick", "id", "iconEnd", "className", "style", "inputLabel", "readOnly"]);
527
- return (jsxRuntime.jsx(DInput$1, Object.assign({ ref: ref, onClick: onClick, readOnly: true, type: "text", id: id, value: value, onIconEndClick: onClick, iconEnd: iconEnd, className: className, style: style, label: inputLabel }, props)));
556
+ var { value, onClick, id, iconEnd, className, style, inputLabel, validIcon, invalidIcon, readOnly: ignored } = _a, props = tslib.__rest(_a, ["value", "onClick", "id", "iconEnd", "className", "style", "inputLabel", "validIcon", "invalidIcon", "readOnly"]);
557
+ return (jsxRuntime.jsx(DInput$1, Object.assign({ ref: ref, onClick: onClick, readOnly: true, type: "text", id: id, value: value, onIconEndClick: onClick, iconEnd: iconEnd, className: className, style: style, label: inputLabel, invalidIcon: invalidIcon, validIcon: validIcon }, props)));
528
558
  }
529
559
  const ForwardedDDatePickerInput = React.forwardRef(DDatePickerInput);
530
560
  ForwardedDDatePickerInput.displayName = 'DDatePickerInput';
531
561
  var DDatePickerInput$1 = ForwardedDDatePickerInput;
532
562
 
533
- function DInputCheck({ id: idProp, type, name, label, ariaLabel, checked = false, disabled = false, indeterminate, value, onChange, className, style, }) {
563
+ function DInputCheck({ id: idProp, type, name, label, ariaLabel, checked = false, disabled = false, invalid = false, valid = false, indeterminate, value, onChange, className, style, }) {
534
564
  const innerRef = React.useRef(null);
535
565
  const innerId = React.useId();
536
566
  const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
@@ -547,10 +577,15 @@ function DInputCheck({ id: idProp, type, name, label, ariaLabel, checked = false
547
577
  innerRef.current.checked = checked;
548
578
  }
549
579
  }, [checked]);
550
- const inputComponent = React.useMemo(() => (jsxRuntime.jsx("input", { ref: innerRef, onChange: handleChange, className: classNames('form-check-input', className), style: style, id: id, disabled: disabled, type: type, name: name, value: value, "aria-label": ariaLabel })), [
580
+ const inputComponent = React.useMemo(() => (jsxRuntime.jsx("input", { ref: innerRef, onChange: handleChange, className: classNames('form-check-input', {
581
+ 'is-invalid': invalid,
582
+ 'is-valid': valid,
583
+ }, className), style: style, id: id, disabled: disabled, type: type, name: name, value: value, "aria-label": ariaLabel })), [
551
584
  ariaLabel,
552
585
  className,
553
586
  disabled,
587
+ valid,
588
+ invalid,
554
589
  handleChange,
555
590
  id,
556
591
  name,
@@ -633,13 +668,16 @@ function DSelectSingleValueEmojiText(_a) {
633
668
  }
634
669
 
635
670
  function DSelect(_a) {
636
- var { id, 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, rtl, searchable, multi, components, defaultValue, onIconStartClick, onIconEndClick } = _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", "rtl", "searchable", "multi", "components", "defaultValue", "onIconStartClick", "onIconEndClick"]);
671
+ var { id, className, style, label, labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, hint, iconFamilyClass, iconFamilyPrefix, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconStartTabIndex, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconEndTabIndex, invalid, valid, invalidIcon: invalidIconProp, validIcon: validIconProp, menuWithMaxContent = false, disabled, clearable, loading, rtl, searchable, multi, components, defaultValue, onIconStartClick, onIconEndClick } = _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", "invalidIcon", "validIcon", "menuWithMaxContent", "disabled", "clearable", "loading", "rtl", "searchable", "multi", "components", "defaultValue", "onIconStartClick", "onIconEndClick"]);
637
672
  const handleOnIconStartClick = React.useCallback(() => {
638
673
  onIconStartClick === null || onIconStartClick === void 0 ? void 0 : onIconStartClick(defaultValue);
639
674
  }, [onIconStartClick, defaultValue]);
640
675
  const handleOnIconEndClick = React.useCallback(() => {
641
676
  onIconEndClick === null || onIconEndClick === void 0 ? void 0 : onIconEndClick(defaultValue);
642
677
  }, [onIconEndClick, defaultValue]);
678
+ const { iconMap: { input } } = useDContext();
679
+ const invalidIcon = React.useMemo(() => invalidIconProp || input.invalid, [input.invalid, invalidIconProp]);
680
+ const validIcon = React.useMemo(() => validIconProp || input.valid, [input.valid, validIconProp]);
643
681
  return (jsxRuntime.jsxs("div", { className: classNames('d-select', className, {
644
682
  disabled: disabled || loading,
645
683
  }), style: style, 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({
@@ -649,11 +687,11 @@ function DSelect(_a) {
649
687
  }), children: [iconStart && (jsxRuntime.jsx("button", { type: "button", className: "input-group-text", id: `${id}Start`, onClick: handleOnIconStartClick, disabled: disabled || loading, "aria-label": iconStartAriaLabel, tabIndex: iconStartTabIndex, children: jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix }) })), jsxRuntime.jsx(Select, Object.assign({ styles: {
650
688
  control: (base) => (Object.assign(Object.assign({}, base), { minHeight: 'unset' })),
651
689
  container: (base) => (Object.assign(Object.assign({}, base), { flex: 1 })),
652
- menu: (base) => (Object.assign(Object.assign({}, base), { width: menuWithMaxContent ? 'max-context' : '100%' })),
690
+ menu: (base) => (Object.assign(Object.assign({}, base), { width: menuWithMaxContent ? 'max-context' : '100%', zIndex: 1000 })),
653
691
  }, className: classNames('d-select-component', {
654
692
  'is-invalid': invalid,
655
693
  'is-valid': valid,
656
- }), classNamePrefix: "d-select", isDisabled: disabled || loading, isClearable: clearable, isLoading: loading, isRtl: rtl, isSearchable: searchable, isMulti: multi, defaultValue: defaultValue, unstyled: true, components: Object.assign({ DropdownIndicator: DSelectDropdownIndicator, ClearIndicator: DSelectClearIndicator, MultiValueRemove: DSelectMultiValueRemove, LoadingIndicator: DSelectLoadingIndicator }, components) }, props)), ((invalid || valid) && !iconEnd && !loading) && (jsxRuntime.jsx("span", { className: "input-group-text", id: `${id}State`, children: jsxRuntime.jsx(DIcon, { className: "input-group-validation-icon", icon: invalid ? 'exclamation-circle' : 'check', familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix }) })), (iconEnd && !loading) && (jsxRuntime.jsx("button", { type: "button", className: "input-group-text", id: `${id}End`, onClick: handleOnIconEndClick, disabled: disabled || loading, "aria-label": iconEndAriaLabel, tabIndex: iconEndTabIndex, children: iconEnd && (jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix })) }))] }), hint && (jsxRuntime.jsx("div", { className: "form-text", id: `${id}Hint`, children: hint }))] }));
694
+ }), classNamePrefix: "d-select", isDisabled: disabled || loading, isClearable: clearable, isLoading: loading, isRtl: rtl, isSearchable: searchable, isMulti: multi, defaultValue: defaultValue, unstyled: true, components: Object.assign({ DropdownIndicator: DSelectDropdownIndicator, ClearIndicator: DSelectClearIndicator, MultiValueRemove: DSelectMultiValueRemove, LoadingIndicator: DSelectLoadingIndicator }, components) }, props)), ((invalid || valid) && !iconEnd && !loading) && (jsxRuntime.jsx("span", { className: "input-group-text", id: `${id}State`, children: jsxRuntime.jsx(DIcon, { className: "input-group-validation-icon", icon: invalid ? invalidIcon : validIcon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix }) })), (iconEnd && !loading) && (jsxRuntime.jsx("button", { type: "button", className: "input-group-text", id: `${id}End`, onClick: handleOnIconEndClick, disabled: disabled || loading, "aria-label": iconEndAriaLabel, tabIndex: iconEndTabIndex, children: iconEnd && (jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix })) }))] }), hint && (jsxRuntime.jsx("div", { className: "form-text", id: `${id}Hint`, children: hint }))] }));
657
695
  }
658
696
  var DSelect$1 = Object.assign(DSelect, {
659
697
  OptionCheck: DSelectOptionCheck,
@@ -688,7 +726,7 @@ function DDatePickerHeader({ date, changeYear, changeMonth, decreaseMonth, incre
688
726
  }
689
727
 
690
728
  function DDatePicker(_a) {
691
- var { date, selectsRange = false, inputLabel, inputHint, inputAriaLabel, inputActionAriaLabel = 'open calendar', inputId = 'input-calendar', timeId = 'input-time', timeLabel, iconInput: iconInputProp, iconHeaderPrevMonth: iconHeaderPrevMonthProp, iconHeaderNextMonth: iconHeaderNextMonthProp, iconMaterialStyle: iconMaterialStyleProp, iconFamilyClass, iconFamilyPrefix, minYearSelect = 1900, maxYearSelect = 2100, iconHeaderSize = 'sm', headerPrevMonthAriaLabel = 'decrease month', headerNextMonthAriaLabel = 'increase month', headerButtonVariant = 'link', headerButtonTheme = 'dark', invalid = false, valid = false, locale, className, formatWeekDay: formatWeekDayProp, style } = _a, props = tslib.__rest(_a, ["date", "selectsRange", "inputLabel", "inputHint", "inputAriaLabel", "inputActionAriaLabel", "inputId", "timeId", "timeLabel", "iconInput", "iconHeaderPrevMonth", "iconHeaderNextMonth", "iconMaterialStyle", "iconFamilyClass", "iconFamilyPrefix", "minYearSelect", "maxYearSelect", "iconHeaderSize", "headerPrevMonthAriaLabel", "headerNextMonthAriaLabel", "headerButtonVariant", "headerButtonTheme", "invalid", "valid", "locale", "className", "formatWeekDay", "style"]);
729
+ var { date, selectsRange = false, inputLabel, inputHint, inputAriaLabel, inputActionAriaLabel = 'open calendar', inputId = 'input-calendar', timeId = 'input-time', timeLabel, iconInput: iconInputProp, iconHeaderPrevMonth: iconHeaderPrevMonthProp, iconHeaderNextMonth: iconHeaderNextMonthProp, iconMaterialStyle: iconMaterialStyleProp, iconFamilyClass, iconFamilyPrefix, minYearSelect = 1900, maxYearSelect = 2100, iconHeaderSize = 'sm', headerPrevMonthAriaLabel = 'decrease month', headerNextMonthAriaLabel = 'increase month', headerButtonVariant = 'link', headerButtonTheme = 'dark', invalid = false, valid = false, renderCustomHeader: renderCustomHeaderProp, validIcon, invalidIcon, locale, className, formatWeekDay: formatWeekDayProp, style } = _a, props = tslib.__rest(_a, ["date", "selectsRange", "inputLabel", "inputHint", "inputAriaLabel", "inputActionAriaLabel", "inputId", "timeId", "timeLabel", "iconInput", "iconHeaderPrevMonth", "iconHeaderNextMonth", "iconMaterialStyle", "iconFamilyClass", "iconFamilyPrefix", "minYearSelect", "maxYearSelect", "iconHeaderSize", "headerPrevMonthAriaLabel", "headerNextMonthAriaLabel", "headerButtonVariant", "headerButtonTheme", "invalid", "valid", "renderCustomHeader", "validIcon", "invalidIcon", "locale", "className", "formatWeekDay", "style"]);
692
730
  const { iconMap: { calendar, chevronLeft, chevronRight, }, } = useDContext();
693
731
  const selected = React.useMemo(() => (date ? dateFns.parseISO(date) : null), [date]);
694
732
  const iconInput = React.useMemo(() => iconInputProp || calendar, [calendar, iconInputProp]);
@@ -710,7 +748,13 @@ function DDatePicker(_a) {
710
748
  minYearSelect,
711
749
  maxYearSelect,
712
750
  ]);
713
- return (jsxRuntime.jsx(DatePicker, Object.assign({ selected: selected, calendarClassName: "d-date-picker", renderCustomHeader: (headerProps) => jsxRuntime.jsx(DatePickerHeader, Object.assign({}, headerProps)), selectsRange: selectsRange, formatWeekDay: handleFormatWeekDay, customInput: (jsxRuntime.jsx(DDatePickerInput$1, { id: inputId, "aria-label": inputAriaLabel, iconEndAriaLabel: inputActionAriaLabel, iconMaterialStyle: iconMaterialStyleProp, iconEnd: iconInput, inputLabel: inputLabel, className: className, style: style, invalid: invalid, valid: valid, hint: inputHint })), customTimeInput: (jsxRuntime.jsx(DDatePickerTime, { id: timeId, label: timeLabel })) }, locale && { locale }, props)));
751
+ const defaultRenderCustomHeader = React.useCallback((headerProps) => (jsxRuntime.jsx(DatePickerHeader, Object.assign({}, headerProps))), [DatePickerHeader]);
752
+ const renderCustomHeader = React.useMemo(() => (renderCustomHeaderProp || defaultRenderCustomHeader), [defaultRenderCustomHeader, renderCustomHeaderProp]);
753
+ return (jsxRuntime.jsx(DatePicker, Object.assign({ selected: selected, calendarClassName: "d-date-picker", renderCustomHeader: renderCustomHeader, selectsRange: selectsRange, formatWeekDay: handleFormatWeekDay, customInput: (jsxRuntime.jsx(DDatePickerInput$1, Object.assign({ id: inputId, "aria-label": inputAriaLabel, iconEndAriaLabel: inputActionAriaLabel, iconMaterialStyle: iconMaterialStyleProp }, ((!valid && !invalid)
754
+ || (valid && !validIcon)
755
+ || (invalid && !invalidIcon)) && {
756
+ iconEnd: iconInput,
757
+ }, { inputLabel: inputLabel, className: className, style: style, invalid: invalid, valid: valid, validIcon: validIcon, invalidIcon: invalidIcon, hint: inputHint }))), customTimeInput: (jsxRuntime.jsx(DDatePickerTime, { id: timeId, label: timeLabel })) }, locale && { locale }, props)));
714
758
  }
715
759
 
716
760
  function DInputMask(props, ref) {
@@ -892,15 +936,17 @@ function DInputPin({ id: idProp, label = '', labelIcon, labelIconFamilyClass, la
892
936
  const otpValue = otp.join('');
893
937
  onChange === null || onChange === void 0 ? void 0 : onChange(otpValue);
894
938
  }, [onChange]);
939
+ React.useEffect(() => {
940
+ handleOTPChange(activeInput);
941
+ }, [activeInput, handleOTPChange]);
895
942
  const handlePaste = React.useCallback((event) => {
896
943
  event.preventDefault();
897
944
  const pastedData = event.clipboardData.getData('text/plain');
898
945
  const cleanData = isInputNum ? pastedData.replace(/[^0-9]/gmi, '') : pastedData;
899
946
  const newInput = Array.from({ length: characters }).map((_, index) => cleanData[index] || '');
900
947
  setActiveInput(newInput);
901
- handleOTPChange(newInput);
902
948
  event.currentTarget.blur();
903
- }, [characters, handleOTPChange, isInputNum]);
949
+ }, [characters, isInputNum]);
904
950
  const nextInput = React.useCallback((event, index) => {
905
951
  var _a;
906
952
  const regex = new RegExp(pattern);
@@ -911,7 +957,6 @@ function DInputPin({ id: idProp, label = '', labelIcon, labelIconFamilyClass, la
911
957
  if (input.value !== '') {
912
958
  setActiveInput((prev) => {
913
959
  const newValue = prev.with(index, input.value);
914
- handleOTPChange(newValue);
915
960
  return newValue;
916
961
  });
917
962
  if (input.nextSibling) {
@@ -921,14 +966,13 @@ function DInputPin({ id: idProp, label = '', labelIcon, labelIconFamilyClass, la
921
966
  input.blur();
922
967
  }
923
968
  }
924
- }, [handleOTPChange, pattern]);
969
+ }, [pattern]);
925
970
  const prevInput = React.useCallback(({ key, currentTarget }, index) => {
926
971
  var _a;
927
972
  if (key === 'Backspace') {
928
973
  const { value } = currentTarget;
929
974
  setActiveInput((prev) => {
930
975
  const newVal = prev.with(index, '');
931
- handleOTPChange(newVal);
932
976
  return newVal;
933
977
  });
934
978
  if (currentTarget.previousSibling && value === '') {
@@ -939,7 +983,7 @@ function DInputPin({ id: idProp, label = '', labelIcon, labelIconFamilyClass, la
939
983
  currentTarget.focus();
940
984
  }
941
985
  }
942
- }, [handleOTPChange]);
986
+ }, []);
943
987
  const focusInput = React.useCallback((index) => {
944
988
  setActiveInput((prev) => prev.with(index, ''));
945
989
  }, []);
@@ -956,7 +1000,7 @@ function DInputPin({ id: idProp, label = '', labelIcon, labelIconFamilyClass, la
956
1000
  }), 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))), (invalid || valid) && !loading && (jsxRuntime.jsx("span", { className: "input-group-text", id: `${id}State`, children: jsxRuntime.jsx(DIcon, { className: "input-group-validation-icon", icon: invalid ? invalidIcon : validIcon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix }) })), 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 }))] }));
957
1001
  }
958
1002
 
959
- function DInputSelect({ id: idProp, name, label = '', className, style, options = [], labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, disabled = false, loading = false, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, invalidIcon: invalidIconProp, validIcon: validIconProp, hint, value, floatingLabel = false, invalid = false, valid = false, valueExtractor, labelExtractor, onChange, onBlur, onIconStartClick, onIconEndClick, }) {
1003
+ function DInputSelect({ id: idProp, name, label = '', className, style, options = [], labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, disabled = false, loading = false, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, invalidIcon: invalidIconProp, validIcon: validIconProp, hint, value, size, floatingLabel = false, invalid = false, valid = false, valueExtractor, labelExtractor, onChange, onBlur, onIconStartClick, onIconEndClick, }) {
960
1004
  const innerId = React.useId();
961
1005
  const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
962
1006
  const internalValueExtractor = React.useCallback((option) => {
@@ -1005,6 +1049,7 @@ function DInputSelect({ id: idProp, name, label = '', className, style, options
1005
1049
  .join(' ')), [id, iconStart, iconEnd, hint]);
1006
1050
  const selectComponent = React.useMemo(() => (jsxRuntime.jsx("select", Object.assign({ id: id, name: name, className: classNames({
1007
1051
  'form-select': true,
1052
+ [`form-select-${size}`]: !!size,
1008
1053
  'floating-label': floatingLabel,
1009
1054
  'is-invalid': invalid,
1010
1055
  'is-valid': valid,
@@ -1024,6 +1069,7 @@ function DInputSelect({ id: idProp, name, label = '', className, style, options
1024
1069
  floatingLabel,
1025
1070
  invalid,
1026
1071
  valid,
1072
+ size,
1027
1073
  ]);
1028
1074
  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 }))] })), [
1029
1075
  id,
@@ -1043,7 +1089,7 @@ function DInputSelect({ id: idProp, name, label = '', className, style, options
1043
1089
  }), children: [iconStart && (jsxRuntime.jsx("button", { type: "button", className: "input-group-text", id: `${id}Start`, onClick: iconStartClickHandler, disabled: disabled || loading, "aria-label": iconStartAriaLabel, children: iconStart && (jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix })) })), dynamicComponent, ((invalid || valid) && !iconEnd && !loading) && (jsxRuntime.jsx("span", { className: "input-group-text", id: `${id}State`, children: jsxRuntime.jsx(DIcon, { className: "input-group-validation-icon", icon: invalid ? invalidIcon : validIcon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle }) })), iconEnd && !loading && (jsxRuntime.jsx("button", { type: "button", className: "input-group-text", id: `${id}End`, onClick: iconEndClickHandler, disabled: disabled || loading, "aria-label": iconEndAriaLabel, children: iconEnd && (jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix })) })), loading && (jsxRuntime.jsx("div", { className: "input-group-text form-control-icon loading", 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 }))] }));
1044
1090
  }
1045
1091
 
1046
- function DInputSwitch({ id: idProp, label, ariaLabel, name, checked, disabled, readonly, className, style, onChange, }) {
1092
+ function DInputSwitch({ id: idProp, label, ariaLabel, name, checked, disabled, invalid = false, valid = false, readonly, className, style, onChange, }) {
1047
1093
  const innerId = React.useId();
1048
1094
  const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
1049
1095
  const [internalIsChecked, setInternalIsChecked] = React.useState(checked);
@@ -1055,7 +1101,10 @@ function DInputSwitch({ id: idProp, label, ariaLabel, name, checked, disabled, r
1055
1101
  setInternalIsChecked(value);
1056
1102
  onChange === null || onChange === void 0 ? void 0 : onChange(value);
1057
1103
  }, [onChange]);
1058
- return (jsxRuntime.jsxs("div", { className: "form-check form-switch", children: [jsxRuntime.jsx("input", { id: id, name: name, onChange: readonly ? () => false : changeHandler, className: classNames('form-check-input', className), style: style, type: "checkbox", role: "switch", checked: internalIsChecked, disabled: disabled, "aria-label": ariaLabel }), label && (jsxRuntime.jsx("label", { className: "form-check-label", htmlFor: id, children: label }))] }));
1104
+ return (jsxRuntime.jsxs("div", { className: "form-check form-switch", children: [jsxRuntime.jsx("input", { id: id, name: name, onChange: readonly ? () => false : changeHandler, className: classNames('form-check-input', {
1105
+ 'is-invalid': invalid,
1106
+ 'is-valid': valid,
1107
+ }, className), style: style, type: "checkbox", role: "switch", checked: internalIsChecked, disabled: disabled, "aria-label": ariaLabel }), label && (jsxRuntime.jsx("label", { className: "form-check-label", htmlFor: id, children: label }))] }));
1059
1108
  }
1060
1109
 
1061
1110
  function DInputRange(_a, ref) {
@@ -1124,7 +1173,7 @@ var DList$1 = Object.assign(DList, {
1124
1173
  function DModalHeader({ showCloseButton, onClose, children, className, style, iconFamilyClass, iconFamilyPrefix, icon: iconProp, materialStyle = false, }) {
1125
1174
  const { iconMap: { xLg, }, } = useDContext();
1126
1175
  const icon = React.useMemo(() => iconProp || xLg, [iconProp, xLg]);
1127
- return (jsxRuntime.jsxs("div", { className: classNames('modal-header', className), style: style, children: [jsxRuntime.jsx("div", { children: children }), showCloseButton && (jsxRuntime.jsx("button", { type: "button", className: "d-modal-close", "aria-label": "Close", onClick: onClose, children: jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: materialStyle }) }))] }));
1176
+ return (jsxRuntime.jsxs("div", { className: classNames('modal-header', className), style: style, children: [jsxRuntime.jsx("div", { children: children }), showCloseButton && (jsxRuntime.jsx("button", { type: "button", className: "d-close", "aria-label": "Close", onClick: onClose, children: jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: materialStyle }) }))] }));
1128
1177
  }
1129
1178
 
1130
1179
  function DModalBody({ children, className, style, }) {
@@ -1161,7 +1210,7 @@ var DModal$1 = Object.assign(DModal, {
1161
1210
  function DOffcanvasHeader({ showCloseButton, onClose, children, className, style, iconFamilyClass, iconFamilyPrefix, icon: iconProp, materialStyle = false, }) {
1162
1211
  const { iconMap: { xLg, }, } = useDContext();
1163
1212
  const icon = React.useMemo(() => iconProp || xLg, [iconProp, xLg]);
1164
- return (jsxRuntime.jsxs("div", { className: classNames('offcanvas-header', className), style: style, children: [jsxRuntime.jsx("div", { children: children }), showCloseButton && (jsxRuntime.jsx("button", { type: "button", className: "d-offcanvas-close", "aria-label": "Close", onClick: onClose, children: jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: materialStyle }) }))] }));
1213
+ return (jsxRuntime.jsxs("div", { className: classNames('offcanvas-header', className), style: style, children: [jsxRuntime.jsx("div", { children: children }), showCloseButton && (jsxRuntime.jsx("button", { type: "button", className: "d-close", "aria-label": "Close", onClick: onClose, children: jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: materialStyle }) }))] }));
1165
1214
  }
1166
1215
 
1167
1216
  function DOffcanvasBody({ children, className, style, }) {
@@ -1318,7 +1367,7 @@ function DSkeleton({ speed = 2, viewBox, backgroundColor, foregroundColor, child
1318
1367
  return (jsxRuntime.jsx(ContentLoader, { speed: speed, viewBox: viewBox, backgroundColor: innerBackgroundColor, foregroundColor: innerForegroundColor, children: children }));
1319
1368
  }
1320
1369
 
1321
- function DStepper$2({ options, currentStep, iconSuccess: iconSuccessProp, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle = false, vertical = false, className, style, }) {
1370
+ function DStepper$2({ options, currentStep, iconSuccess: iconSuccessProp, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle = false, vertical = false, completed, className, style, }) {
1322
1371
  const { iconMap: { check, }, } = useDContext();
1323
1372
  const icon = React.useMemo(() => iconSuccessProp || check, [check, iconSuccessProp]);
1324
1373
  if (currentStep < 1 || currentStep > options.length) {
@@ -1329,9 +1378,9 @@ function DStepper$2({ options, currentStep, iconSuccess: iconSuccessProp, iconSu
1329
1378
  'is-vertical': vertical,
1330
1379
  }, className), style: style, children: options.map(({ label, value }) => (jsxRuntime.jsxs("div", { className: "d-step", children: [jsxRuntime.jsx("div", { className: "d-step-value", children: jsxRuntime.jsx("div", { className: classNames({
1331
1380
  'd-step-icon-container': true,
1332
- 'd-step-check': value < currentStep,
1333
- 'd-step-current': value === currentStep,
1334
- }), children: value < currentStep
1381
+ 'd-step-check': value < currentStep || completed,
1382
+ 'd-step-current': value === currentStep && !completed,
1383
+ }), children: value < currentStep || completed
1335
1384
  ? (jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconSuccessFamilyClass, familyPrefix: iconSuccessFamilyPrefix, materialStyle: iconSuccessMaterialStyle, className: "d-step-icon" }))
1336
1385
  : value }) }), jsxRuntime.jsx("div", { className: "d-step-label", children: label })] }, value))) }));
1337
1386
  }
@@ -1366,8 +1415,8 @@ function DStepper$1({ options, currentStep, className, style, }) {
1366
1415
  return (jsxRuntime.jsxs("div", { className: classNames('d-stepper', className), style: style, children: [jsxRuntime.jsx("div", { className: "d-step-bar", style: { background: progressStyle }, children: jsxRuntime.jsx("p", { className: "d-step-number", children: `${currentStep}/${options.length}` }) }), jsxRuntime.jsx("div", { className: "d-step-info", children: Object.keys(currentOption).length > 0 && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "d-step-label", children: currentOption.label }), jsxRuntime.jsx("div", { className: "d-step-description", children: currentOption.description || '' })] })) })] }));
1367
1416
  }
1368
1417
 
1369
- function DStepper({ options, currentStep, iconSuccess, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle = false, vertical = false, breakpoint = 'lg', className, style, }) {
1370
- return (jsxRuntime.jsxs("div", { className: className, style: style, children: [jsxRuntime.jsx("div", { className: `d-block d-${breakpoint}-none`, children: jsxRuntime.jsx(DStepper$1, { options: options, currentStep: currentStep }) }), jsxRuntime.jsx("div", { className: `d-none d-${breakpoint}-block`, children: jsxRuntime.jsx(DStepper$2, { options: options, currentStep: currentStep, vertical: vertical, iconSuccess: iconSuccess, iconSuccessFamilyClass: iconSuccessFamilyClass, iconSuccessFamilyPrefix: iconSuccessFamilyPrefix, iconSuccessMaterialStyle: iconSuccessMaterialStyle }) })] }));
1418
+ function DStepper({ options, currentStep, iconSuccess, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle = false, vertical = false, breakpoint = 'lg', className, completed = false, style, }) {
1419
+ return (jsxRuntime.jsxs("div", { className: className, style: style, children: [jsxRuntime.jsx("div", { className: `d-block d-${breakpoint}-none`, children: jsxRuntime.jsx(DStepper$1, { options: options, currentStep: currentStep }) }), jsxRuntime.jsx("div", { className: `d-none d-${breakpoint}-block`, children: jsxRuntime.jsx(DStepper$2, { options: options, currentStep: currentStep, vertical: vertical, iconSuccess: iconSuccess, iconSuccessFamilyClass: iconSuccessFamilyClass, iconSuccessFamilyPrefix: iconSuccessFamilyPrefix, iconSuccessMaterialStyle: iconSuccessMaterialStyle, completed: completed }) })] }));
1371
1420
  }
1372
1421
 
1373
1422
  const ARROW_WIDTH = 8;
@@ -1468,33 +1517,51 @@ var DToast$1 = Object.assign(DToast, {
1468
1517
  Body: DToastBody,
1469
1518
  });
1470
1519
 
1471
- const TOAST_TRANSITIONS$1 = {
1472
- bounce: reactToastify.Bounce,
1473
- flip: reactToastify.Flip,
1474
- slide: reactToastify.Slide,
1475
- zoom: reactToastify.Zoom,
1476
- };
1477
- function DToastContainer({ style, className, closeOnClick, position = 'bottom-center', autoClose = false, stacked = false, transition = 'slide', containerId, }) {
1478
- const selectedTransition = React.useMemo(() => TOAST_TRANSITIONS$1[transition], [transition]);
1479
- return (jsxRuntime.jsx(reactToastify.ToastContainer, { toastClassName: () => classNames('shadow-none p-0 cursor-default', className), position: position, autoClose: autoClose, closeOnClick: closeOnClick, transition: selectedTransition, closeButton: false, style: style, hideProgressBar: true, stacked: stacked, containerId: containerId }));
1520
+ function DToastContainer({ containerClassName, position = 'bottom-center', reverseOrder = false, containerStyle, toastOptions, gutter, }) {
1521
+ return (jsxRuntime.jsx(reactHotToast.Toaster, { containerClassName: containerClassName, position: position, reverseOrder: reverseOrder, containerStyle: containerStyle, gutter: gutter, toastOptions: toastOptions }));
1480
1522
  }
1481
1523
 
1482
- const TOAST_TRANSITIONS = {
1483
- bounce: reactToastify.Bounce,
1484
- flip: reactToastify.Flip,
1485
- slide: reactToastify.Slide,
1486
- zoom: reactToastify.Zoom,
1487
- };
1488
1524
  function useDToast() {
1489
- const toast = React.useCallback((message, _a) => {
1490
- var { icon, iconClose, type = 'info', showClose = true, transition } = _a, rest = tslib.__rest(_a, ["icon", "iconClose", "type", "showClose", "transition"]);
1491
- reactToastify.toast(({ closeToast }) => (jsxRuntime.jsx(DAlert, { onClose: closeToast, id: "alertID", type: type, icon: icon, iconClose: iconClose, showClose: showClose, children: message })), Object.assign({ transition: transition && TOAST_TRANSITIONS[transition] }, rest));
1492
- }, []);
1525
+ const { iconMap: { xLg, }, } = useDContext();
1526
+ const toast = React.useCallback((data, toastProps) => {
1527
+ if (typeof data === 'function') {
1528
+ return reactHotToast.toast.custom(data, toastProps);
1529
+ }
1530
+ const { title, description, icon, closeIcon, timestamp, theme, soft, } = data;
1531
+ return reactHotToast.toast.custom(({ id, visible }) => {
1532
+ if (!visible) {
1533
+ return null;
1534
+ }
1535
+ if (!description) {
1536
+ return (jsxRuntime.jsx(DToast$1, { className: classNames({
1537
+ [`toast-${theme}`]: !!theme,
1538
+ 'toast-soft': soft,
1539
+ }, '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", "aria-label": "Close", onClick: () => reactHotToast.toast.dismiss(id), children: jsxRuntime.jsx(DIcon, { icon: closeIcon || xLg }) })] }) }));
1540
+ }
1541
+ return (jsxRuntime.jsxs(DToast$1, { className: classNames({
1542
+ [`toast-${theme}`]: !!theme,
1543
+ 'toast-soft': soft,
1544
+ }, '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", "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 }) })] }));
1545
+ }, toastProps);
1546
+ }, [xLg]);
1493
1547
  return {
1494
1548
  toast,
1495
1549
  };
1496
1550
  }
1497
1551
 
1552
+ function DTableHead({ className, style, field, label, value = '', onChange, }) {
1553
+ const handleOnChange = React.useCallback(() => {
1554
+ if (value === field) {
1555
+ return onChange(`-${field}`);
1556
+ }
1557
+ if (value === `-${field}`) {
1558
+ return onChange('');
1559
+ }
1560
+ return onChange(field);
1561
+ }, [field, value, onChange]);
1562
+ return (jsxRuntime.jsx("th", { style: style, className: classNames('d-table-head', className), children: jsxRuntime.jsxs("button", { type: "button", onClick: handleOnChange, children: [label, value && value.includes(field) && (jsxRuntime.jsx(DIcon, { icon: value === field ? 'arrow-up' : 'arrow-down' }))] }) }));
1563
+ }
1564
+
1498
1565
  async function configureI8n(resources, _a = {}) {
1499
1566
  var { lng = 'en', fallbackLng = 'en' } = _a, config = tslib.__rest(_a, ["lng", "fallbackLng"]);
1500
1567
  return i18n
@@ -1513,6 +1580,7 @@ exports.DAlert = DAlert;
1513
1580
  exports.DBadge = DBadge;
1514
1581
  exports.DBoxFile = DBoxFile;
1515
1582
  exports.DButton = DButton;
1583
+ exports.DButtonIcon = DButtonIcon;
1516
1584
  exports.DCard = DCard$1;
1517
1585
  exports.DCardBody = DCardBody;
1518
1586
  exports.DCardFooter = DCardFooter;
@@ -1562,6 +1630,7 @@ exports.DStepper = DStepper;
1562
1630
  exports.DStepperDesktop = DStepper$2;
1563
1631
  exports.DStepperMobile = DStepper$1;
1564
1632
  exports.DTabContent = DTabContent;
1633
+ exports.DTableHead = DTableHead;
1565
1634
  exports.DTabs = DTabs$1;
1566
1635
  exports.DToast = DToast$1;
1567
1636
  exports.DToastContainer = DToastContainer;