@dynamic-framework/ui-react 2.0.0-dev.5 → 2.0.0-dev.7

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 (36) hide show
  1. package/dist/css/dynamic-ui-non-root.css +128 -511
  2. package/dist/css/dynamic-ui-non-root.min.css +2 -2
  3. package/dist/css/dynamic-ui-root.css +62 -556
  4. package/dist/css/dynamic-ui-root.min.css +2 -2
  5. package/dist/css/dynamic-ui.css +189 -1066
  6. package/dist/css/dynamic-ui.min.css +2 -2
  7. package/dist/index.esm.js +204 -132
  8. package/dist/index.esm.js.map +1 -1
  9. package/dist/index.js +192 -121
  10. package/dist/index.js.map +1 -1
  11. package/dist/types/components/DBoxFile/DBoxFile.d.ts +1 -1
  12. package/dist/types/components/DIconBase/DIconBase.d.ts +10 -2
  13. package/dist/types/components/DInput/DInput.d.ts +2 -1
  14. package/dist/types/components/DInputCounter/DInputCounter.d.ts +3 -2
  15. package/dist/types/components/DInputCurrency/DInputCurrency.d.ts +3 -2
  16. package/dist/types/components/DInputPhone/DInputPhone.d.ts +1 -1
  17. package/dist/types/components/DModal/DModal.d.ts +3 -1
  18. package/dist/types/components/DOffcanvas/DOffcanvas.d.ts +3 -1
  19. package/dist/types/components/config.d.ts +0 -2
  20. package/dist/types/components/index.d.ts +0 -1
  21. package/dist/types/hooks/useResponsiveProp.d.ts +35 -0
  22. package/package.json +16 -24
  23. package/src/style/abstracts/_mixins.scss +34 -16
  24. package/src/style/abstracts/variables/_colors.scss +8 -2
  25. package/src/style/base/_buttons.scss +11 -125
  26. package/src/style/base/_label.scss +0 -4
  27. package/src/style/components/_d-box-file.scss +1 -1
  28. package/src/style/components/_d-datepicker.scss +23 -4
  29. package/src/style/root/_root.scss +94 -88
  30. package/dist/types/components/DBarChart/DBarChart.d.ts +0 -9
  31. package/dist/types/components/DMinimalLineChart/DMinimalLineChart.d.ts +0 -9
  32. package/dist/types/components/DMultiLineChart/DMultiLineChart.d.ts +0 -9
  33. package/dist/types/components/DPieChart/DPieChart.d.ts +0 -9
  34. package/dist/types/components/DRadialBarChart/DRadialBarChart.d.ts +0 -6
  35. package/dist/types/components/DTableHead/DTableHead.d.ts +0 -9
  36. package/dist/types/components/DTableHead/index.d.ts +0 -2
package/dist/index.esm.js CHANGED
@@ -1,9 +1,10 @@
1
- import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
1
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import classNames from 'classnames';
3
- import React, { useMemo, useEffect, useState, useCallback, useContext, createContext, Fragment, useLayoutEffect, forwardRef, useId, useRef, useSyncExternalStore } from 'react';
3
+ import React, { useEffect, useState, useCallback, useMemo, useContext, createContext, useLayoutEffect, useSyncExternalStore, forwardRef, useId, useRef } from 'react';
4
4
  import { __rest } from 'tslib';
5
5
  import * as LucideIcons from 'lucide-react';
6
6
  import { createPortal } from 'react-dom';
7
+ import { AnimatePresence, motion } from 'framer-motion';
7
8
  import { fromEvent } from 'file-selector';
8
9
  import { SplideSlide, Splide } from '@splidejs/react-splide';
9
10
  import currency from 'currency.js';
@@ -22,60 +23,6 @@ import { initReactI18next } from 'react-i18next';
22
23
 
23
24
  const PREFIX_BS = 'bs-';
24
25
 
25
- function DIconBase({ icon, color, style, className, size, hasCircle = false, materialStyle = false, familyClass = 'material-symbols-outlined', strokeWidth = 2, dataAttributes, }) {
26
- // If materialStyle is true, use Material Design icons (legacy)
27
- const useMaterialIcons = materialStyle;
28
- // Get Lucide icon component
29
- const LucideIcon = useMemo(() => {
30
- if (useMaterialIcons)
31
- return null;
32
- // Try to find the icon in Lucide (expects PascalCase)
33
- const icons = LucideIcons;
34
- return icons[icon] || null;
35
- }, [icon, useMaterialIcons]);
36
- const colorStyle = useMemo(() => {
37
- if (color) {
38
- return { [`--${PREFIX_BS}icon-component-color`]: `var(--${PREFIX_BS}${color})` };
39
- }
40
- return {};
41
- }, [color]);
42
- const backgroundStyle = useMemo(() => {
43
- if (hasCircle) {
44
- if (color) {
45
- return { [`--${PREFIX_BS}icon-component-bg-color`]: `rgba(var(--${PREFIX_BS}${color}-rgb), 0.1)` };
46
- }
47
- return { [`--${PREFIX_BS}icon-component-bg-color`]: `rgba(var(--${PREFIX_BS}body-color-rgb), 0.1)` };
48
- }
49
- return {};
50
- }, [hasCircle, color]);
51
- const generateStyleVariables = 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]);
52
- const generateClasses = useMemo(() => (Object.assign(Object.assign({ 'd-icon': true }, useMaterialIcons && {
53
- [familyClass]: true,
54
- }), className && { [className]: true })), [
55
- className,
56
- useMaterialIcons,
57
- familyClass,
58
- ]);
59
- const iconSize = useMemo(() => {
60
- if (size) {
61
- const numSize = parseInt(size, 10);
62
- return !Number.isNaN(numSize) ? numSize : size;
63
- }
64
- return undefined;
65
- }, [size]);
66
- // Render Material Design icon (legacy support)
67
- if (useMaterialIcons) {
68
- return (jsx("i", Object.assign({ className: classNames(generateClasses), style: generateStyleVariables }, dataAttributes, { children: icon })));
69
- }
70
- // Render Lucide icon
71
- if (!LucideIcon) {
72
- // eslint-disable-next-line no-console
73
- console.warn(`Icon "${icon}" not found in Lucide. Make sure to use PascalCase names (e.g., "Home", "User", "Settings")`);
74
- return (jsx("span", Object.assign({ className: classNames(generateClasses), style: generateStyleVariables }, dataAttributes, { children: "?" })));
75
- }
76
- return (jsx("span", Object.assign({ className: classNames(generateClasses), style: generateStyleVariables }, dataAttributes, { children: jsx(LucideIcon, { size: iconSize || 24, strokeWidth: strokeWidth }) })));
77
- }
78
-
79
26
  function useDisableBodyScrollEffect(disable) {
80
27
  useEffect(() => {
81
28
  if (disable) {
@@ -232,7 +179,10 @@ function DPortalContextProvider({ portalName, children, availablePortals, }) {
232
179
  return (jsxs(DPortalContext.Provider, { value: value, children: [children, created && createPortal(
233
180
  // eslint-disable-next-line max-len
234
181
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
235
- jsx("div", { onClick: ({ target }) => handleClose(target), onKeyDown: () => { }, children: stack.map(({ Component, name, payload, }) => (jsxs(Fragment, { children: [jsx("div", { className: "backdrop fade show" }), jsx(Component, { name: name, payload: payload })] }, name))) }), document.getElementById(portalName))] }));
182
+ jsx("div", { onClick: ({ target }) => handleClose(target), onKeyDown: () => { }, children: jsx(AnimatePresence, { children: stack.flatMap(({ Component, name, payload, }) => [
183
+ jsx(motion.div, { className: "backdrop", initial: { opacity: 0 }, animate: { opacity: 0.5 }, exit: { opacity: 0, transition: { delay: 0.3 } }, transition: { duration: 0.15, ease: 'linear' } }, `${name}-backdrop`),
184
+ jsx(Component, { name: name, payload: payload }, name),
185
+ ]) }) }), document.getElementById(portalName))] }));
236
186
  }
237
187
  function useDPortalContext() {
238
188
  const context = useContext(DPortalContext);
@@ -328,6 +278,151 @@ function useDContext() {
328
278
  return context;
329
279
  }
330
280
 
281
+ function subscribeToMediaQuery(query, callback) {
282
+ const mediaQueryList = window.matchMedia(query);
283
+ mediaQueryList.addEventListener('change', callback);
284
+ return () => {
285
+ mediaQueryList.removeEventListener('change', callback);
286
+ };
287
+ }
288
+ function checkMediaQuery(query) {
289
+ return window.matchMedia(query).matches;
290
+ }
291
+
292
+ function useMediaQuery(mediaQuery, useListener = false) {
293
+ /* eslint-disable-next-line @typescript-eslint/no-unused-vars */
294
+ const noop = (_) => () => { };
295
+ return useSyncExternalStore(useListener ? (cb) => subscribeToMediaQuery(mediaQuery, cb) : noop, () => (mediaQuery ? checkMediaQuery(mediaQuery) : true), () => false);
296
+ }
297
+
298
+ function useMediaBreakpointUp(breakpoint, useListener = false) {
299
+ const { breakpoints } = useDContext();
300
+ const mediaQuery = useMemo(() => (`(min-width: ${breakpoints[breakpoint]})`), [breakpoint, breakpoints]);
301
+ return useMediaQuery(mediaQuery, useListener);
302
+ }
303
+ function useMediaBreakpointUpXs(useListener = false) {
304
+ return useMediaBreakpointUp('xs', useListener);
305
+ }
306
+ function useMediaBreakpointUpSm(useListener = false) {
307
+ return useMediaBreakpointUp('sm', useListener);
308
+ }
309
+ function useMediaBreakpointUpMd(useListener = false) {
310
+ return useMediaBreakpointUp('md', useListener);
311
+ }
312
+ function useMediaBreakpointUpLg(useListener = false) {
313
+ return useMediaBreakpointUp('lg', useListener);
314
+ }
315
+ function useMediaBreakpointUpXl(useListener = false) {
316
+ return useMediaBreakpointUp('xl', useListener);
317
+ }
318
+ function useMediaBreakpointUpXxl(useListener = false) {
319
+ return useMediaBreakpointUp('xxl', useListener);
320
+ }
321
+
322
+ /**
323
+ * React hook to resolve a responsive property value based on the current viewport breakpoint.
324
+ *
325
+ * Given a `ResponsiveProp` object, this hook returns the value for the highest matching breakpoint.
326
+ * If multiple breakpoints match, the value for the largest (highest) breakpoint is used.
327
+ * If no breakpoints match, `undefined` is returned.
328
+ *
329
+ * @param useListener - Whether to listen for breakpoint changes (default: false).
330
+ * @returns An object with a `responsivePropValue` function that takes a
331
+ * `ResponsiveProp` and returns the resolved value.
332
+ *
333
+ * Usage example:
334
+ * ```ts
335
+ * const { responsivePropValue } = useResponsiveProp();
336
+ * const value = responsivePropValue({ xs: "A", md: "B", xl: "C" });
337
+ * // value will be "C" if xl breakpoint is active, "B" if md is active, etc.
338
+ * ```
339
+ */
340
+ function useResponsiveProp(useListener = false) {
341
+ const bpXsUp = useMediaBreakpointUpXs(useListener);
342
+ const bpSmUp = useMediaBreakpointUpSm(useListener);
343
+ const bpMdUp = useMediaBreakpointUpMd(useListener);
344
+ const bpLgUp = useMediaBreakpointUpLg(useListener);
345
+ const bpXlUp = useMediaBreakpointUpXl(useListener);
346
+ const bpXxlUp = useMediaBreakpointUpXxl(useListener);
347
+ const responsivePropValue = useCallback((prop) => {
348
+ // Pick the highest matched breakpoint value that is defined in prop
349
+ if (prop.xxl !== undefined && bpXxlUp)
350
+ return prop.xxl;
351
+ if (prop.xl !== undefined && bpXlUp)
352
+ return prop.xl;
353
+ if (prop.lg !== undefined && bpLgUp)
354
+ return prop.lg;
355
+ if (prop.md !== undefined && bpMdUp)
356
+ return prop.md;
357
+ if (prop.sm !== undefined && bpSmUp)
358
+ return prop.sm;
359
+ if (prop.xs !== undefined && bpXsUp)
360
+ return prop.xs;
361
+ // Fallback: return undefined if no breakpoint matches
362
+ return undefined;
363
+ }, [bpSmUp, bpMdUp, bpLgUp, bpXlUp, bpXxlUp, bpXsUp]);
364
+ return { responsivePropValue };
365
+ }
366
+
367
+ function DIconBase({ icon, color, style, className, size, useListenerSize = false, hasCircle = false, materialStyle = false, familyClass, familyPrefix, strokeWidth = 2, dataAttributes, }) {
368
+ // If materialStyle is true, use Material Design icons (legacy)
369
+ const useMaterialIcons = materialStyle;
370
+ // Get Lucide icon component
371
+ const LucideIcon = useMemo(() => {
372
+ if (useMaterialIcons)
373
+ return null;
374
+ // Try to find the icon in Lucide (expects PascalCase)
375
+ const icons = LucideIcons;
376
+ return icons[icon] || null;
377
+ }, [icon, useMaterialIcons]);
378
+ const colorStyle = useMemo(() => {
379
+ if (color) {
380
+ return { [`--${PREFIX_BS}icon-component-color`]: `var(--${PREFIX_BS}${color})` };
381
+ }
382
+ return {};
383
+ }, [color]);
384
+ const backgroundStyle = useMemo(() => {
385
+ if (hasCircle) {
386
+ if (color) {
387
+ return { [`--${PREFIX_BS}icon-component-bg-color`]: `rgba(var(--${PREFIX_BS}${color}-rgb), 0.1)` };
388
+ }
389
+ return { [`--${PREFIX_BS}icon-component-bg-color`]: `rgba(var(--${PREFIX_BS}body-color-rgb), 0.1)` };
390
+ }
391
+ return {};
392
+ }, [hasCircle, color]);
393
+ const { responsivePropValue } = useResponsiveProp(useListenerSize);
394
+ const resolvedSize = useMemo(() => {
395
+ if (!size)
396
+ return undefined;
397
+ if (typeof size === 'string')
398
+ return size;
399
+ return responsivePropValue(size);
400
+ }, [responsivePropValue, size]);
401
+ const generateStyleVariables = useMemo(() => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, resolvedSize && { [`--${PREFIX_BS}icon-component-size`]: resolvedSize }), colorStyle), backgroundStyle), hasCircle && { [`--${PREFIX_BS}icon-component-padding`]: `calc(var(--${PREFIX_BS}icon-component-size, 24px) * 0.4)` }), style)), [resolvedSize, colorStyle, backgroundStyle, hasCircle, style]);
402
+ const generateClasses = useMemo(() => (Object.assign({ 'd-icon': true }, className && { [className]: true })), [className]);
403
+ const iconSize = useMemo(() => {
404
+ if (resolvedSize) {
405
+ const numSize = parseInt(resolvedSize, 10);
406
+ return !Number.isNaN(numSize) ? numSize : resolvedSize;
407
+ }
408
+ return undefined;
409
+ }, [resolvedSize]);
410
+ // Render Material Design icon (legacy support)
411
+ if (useMaterialIcons) {
412
+ return (jsx("i", Object.assign({ className: classNames(generateClasses, familyClass), style: generateStyleVariables }, dataAttributes, { children: icon })));
413
+ }
414
+ // Render Lucide icon
415
+ if (!LucideIcon) {
416
+ if (familyClass && familyPrefix) {
417
+ return (jsx("i", Object.assign({ className: classNames(generateClasses, familyClass, `${familyPrefix}${icon}`), style: generateStyleVariables }, dataAttributes)));
418
+ }
419
+ // eslint-disable-next-line no-console
420
+ console.warn(`Icon "${icon}" not found in Lucide. Make sure to use PascalCase names (e.g., "Home", "User", "Settings")`);
421
+ return (jsx("span", Object.assign({ className: classNames(generateClasses), style: generateStyleVariables }, dataAttributes, { children: "?" })));
422
+ }
423
+ return (jsx("span", Object.assign({ className: classNames(generateClasses), style: generateStyleVariables }, dataAttributes, { children: jsx(LucideIcon, { size: iconSize || 24, strokeWidth: strokeWidth }) })));
424
+ }
425
+
331
426
  function DIcon(_a) {
332
427
  var { familyClass: propFamilyClass, familyPrefix: propFamilyPrefix, materialStyle: propMaterialStyle } = _a, props = __rest(_a, ["familyClass", "familyPrefix", "materialStyle"]);
333
428
  const { icon: { familyClass, familyPrefix, materialStyle, }, } = useDContext();
@@ -395,7 +490,7 @@ function useProvidedRefOrCreate(providedRef) {
395
490
  }
396
491
 
397
492
  function DInput(_a, ref) {
398
- 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 = __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"]);
493
+ 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, readonly, onChange, onIconStartClick, onIconEndClick } = _a, inputProps = __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", "readonly", "onChange", "onIconStartClick", "onIconEndClick"]);
399
494
  const inputRef = useProvidedRefOrCreate(ref);
400
495
  const innerId = useId();
401
496
  const id = useMemo(() => idProp || innerId, [idProp, innerId]);
@@ -432,7 +527,7 @@ function DInput(_a, ref) {
432
527
  const inputComponent = useMemo(() => (jsx("input", Object.assign({ ref: inputRef, id: id, className: classNames('form-control', {
433
528
  'is-invalid': invalid,
434
529
  'is-valid': valid,
435
- }), disabled: disabled || loading, value: value, onChange: handleOnChange }, (floatingLabel || placeholder) && { placeholder: floatingLabel ? '' : placeholder }, ariaDescribedby && { 'aria-describedby': ariaDescribedby }, inputProps))), [
530
+ }), disabled: disabled || loading, readOnly: readonly, value: value, onChange: handleOnChange }, (floatingLabel || placeholder) && { placeholder: floatingLabel ? '' : placeholder }, ariaDescribedby && { 'aria-describedby': ariaDescribedby }, inputProps))), [
436
531
  ariaDescribedby,
437
532
  disabled,
438
533
  handleOnChange,
@@ -445,6 +540,7 @@ function DInput(_a, ref) {
445
540
  floatingLabel,
446
541
  valid,
447
542
  value,
543
+ readonly,
448
544
  ]);
449
545
  const labelComponent = useMemo(() => (jsx("label", { htmlFor: id, children: label })), [
450
546
  id,
@@ -859,14 +955,14 @@ function DBoxFile(_a) {
859
955
  const { iconMap: { upload } } = useDContext();
860
956
  const icon = useMemo(() => iconProp || upload, [iconProp, upload]);
861
957
  const { inputRef, rootRef, isDragValid, isDragInvalid, acceptAttr, files, handleFileSelect, handleDrop, handleDragEnter, handleDragLeave, handleClick, handleKeyDown, handleRemoveFile, openFileDialog, } = useDBoxFile(props);
862
- return (jsxs(Fragment$1, { children: [jsx("section", Object.assign({ className: classNames('d-box-file', {
958
+ return (jsxs(Fragment, { children: [jsx("section", Object.assign({ className: classNames('d-box-file', {
863
959
  'd-box-file-selected': files.length > 0,
864
960
  'd-box-file-disabled': props.disabled,
865
961
  'd-box-file-valid': isDragValid,
866
962
  'd-box-file-invalid': isDragInvalid,
867
- }, className), style: style }, dataAttributes, { children: jsxs("div", Object.assign({ className: "d-box-file-dropzone", ref: rootRef, onDragEnter: handleDragEnter, onDragOver: (e) => e.preventDefault(), onDragLeave: handleDragLeave, onDrop: handleDrop, onClick: handleClick, onKeyDown: handleKeyDown }, (!props.disabled && !props.noKeyboard ? { tabIndex: 0 } : {}), { role: "presentation", children: [jsx("input", { type: "file", multiple: props.multiple, style: { display: 'none' }, ref: inputRef, disabled: props.disabled, onChange: handleFileSelect, onClick: (e) => e.stopPropagation(), tabIndex: -1, accept: acceptAttr }), jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle }), jsx("div", { className: "d-box-content", children: typeof children === 'function'
963
+ }, className), style: style }, dataAttributes, { children: jsxs("div", Object.assign({ className: "d-box-file-dropzone", ref: rootRef, onDragEnter: handleDragEnter, onDragOver: (e) => e.preventDefault(), onDragLeave: handleDragLeave, onDrop: handleDrop, onClick: handleClick, onKeyDown: handleKeyDown }, (!props.disabled && !props.noKeyboard ? { tabIndex: 0 } : {}), { role: "presentation", children: [jsx("input", { type: "file", multiple: props.multiple, style: { display: 'none' }, ref: inputRef, disabled: props.disabled, onChange: handleFileSelect, onClick: (e) => e.stopPropagation(), tabIndex: -1, accept: acceptAttr }), icon && iconProp !== false && (jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })), jsx("div", { className: "d-box-content", children: typeof children === 'function'
868
964
  ? children(openFileDialog)
869
- : children })] })) })), !!files.length && (jsx("ul", { className: "d-box-files", children: files.map((file, index) => (jsx(ForwardedDInput, { value: file.name, iconStart: "paperclip", iconEnd: "trash", readOnly: true, onIconEndClick: () => handleRemoveFile(index) }, `${file.name} ${index}`))) }))] }));
965
+ : children || (jsx("p", { className: "text-center m-0", children: "Drag and drop some files here, or click to select files" })) })] })) })), !!files.length && (jsx("ul", { className: "d-box-files", children: files.map((file, index) => (jsx(ForwardedDInput, { value: file.name, iconStart: "Paperclip", iconEnd: "Trash", readOnly: true, onIconEndClick: () => handleRemoveFile(index) }, `${file.name} ${index}`))) }))] }));
870
966
  }
871
967
 
872
968
  const DButton = forwardRef((props, ref) => {
@@ -919,7 +1015,7 @@ const DButton = forwardRef((props, ref) => {
919
1015
  // eslint-disable-next-line react/button-has-type
920
1016
  type: type, className: classNames(classes, className), style: Object.assign(Object.assign({}, style), (loading && buttonWidth
921
1017
  ? { minWidth: `${buttonWidth}px` }
922
- : undefined)), disabled: isDisabled, "aria-label": ariaLabel, "aria-busy": loading, "aria-disabled": isDisabled, onClick: handleClick }, dataAttributes, rest, { children: [loading && (jsxs("span", { className: "btn-loading", children: [jsx("span", { className: "spinner-border spinner-border-sm", "aria-hidden": "true" }), loadingText && jsx("span", { role: "status", children: loadingText })] })), !loading && (jsxs(Fragment$1, { children: [iconStart && (jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix, materialStyle: iconStartMaterialStyle })), content, iconEnd && (jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix, materialStyle: iconEndMaterialStyle }))] }))] })));
1018
+ : undefined)), disabled: isDisabled, "aria-label": ariaLabel, "aria-busy": loading, "aria-disabled": isDisabled, onClick: handleClick }, dataAttributes, rest, { children: [loading && (jsxs("span", { className: "btn-loading", children: [jsx("span", { className: "spinner-border spinner-border-sm", "aria-hidden": "true" }), loadingText && jsx("span", { role: "status", children: loadingText })] })), !loading && (jsxs(Fragment, { children: [iconStart && (jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix, materialStyle: iconStartMaterialStyle })), content, iconEnd && (jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix, materialStyle: iconEndMaterialStyle }))] }))] })));
923
1019
  });
924
1020
  DButton.displayName = 'DButton';
925
1021
 
@@ -1257,7 +1353,7 @@ function DDatePickerHeaderSelector({ date, changeYear, changeMonth, decreaseMont
1257
1353
  if (pickerType === PickerType.Quarter || pickerType === PickerType.Month) {
1258
1354
  return (jsxs("div", { className: classNames(`react-datepicker__header-selector react-datepicker__header-${pickerType}-selector`, className), style: style, children: [jsx(DButtonIcon, { icon: iconPrev || chevronLeft, size: iconSize, variant: "link", onClick: decreaseYear, disabled: prevMonthButtonDisabled, ariaLabel: prevMonthAriaLabel, className: "header-button", style: { visibility: customHeaderCount === 0 ? 'visible' : 'hidden' } }), jsx("div", { className: "d-flex justify-content-center flex-grow-1", children: showHeaderSelectors ? (jsx(DSelect$1, { options: years, value: defaultYear, defaultValue: defaultYear, onChange: (year) => changeYear(Number(year === null || year === void 0 ? void 0 : year.value)), searchable: false })) : (jsx("p", { children: defaultYear === null || defaultYear === void 0 ? void 0 : defaultYear.label })) }), 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' } })] }));
1259
1355
  }
1260
- return (jsxs(Fragment$1, { children: [jsxs("div", { className: "datepicker-top-header", children: [showHeaderSelectors && (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) => (jsx("option", { value: year.value, children: year.label }, year.value))) })), jsx("h4", { className: "mb-0 fw-normal", children: format(monthDate, 'LLLL, dd', { locale }) })] }), jsxs("div", { className: classNames('react-datepicker__header-selector react-datepicker__header-day-selector', className), style: style, children: [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 ? (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" })) : (jsx("p", { children: `${defaultMonth.label} ${defaultYear === null || defaultYear === void 0 ? void 0 : defaultYear.label}` })), 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' } })] })] }));
1356
+ return (jsxs(Fragment, { children: [jsxs("div", { className: "datepicker-top-header", children: [showHeaderSelectors && (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" })), jsx("h4", { className: "mb-0 fw-normal", children: format(monthDate, 'LLLL, dd', { locale }) })] }), jsxs("div", { className: classNames('react-datepicker__header-selector react-datepicker__header-day-selector', className), style: style, children: [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 ? (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" })) : (jsx("p", { children: `${defaultMonth.label} ${defaultYear === null || defaultYear === void 0 ? void 0 : defaultYear.label}` })), 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' } })] })] }));
1261
1357
  }
1262
1358
 
1263
1359
  function DDatePicker(_a) {
@@ -1422,47 +1518,6 @@ function useItemSelection({ getItemIdentifier: getItemIdentifierProp, previousSe
1422
1518
  };
1423
1519
  }
1424
1520
 
1425
- function subscribeToMediaQuery(query, callback) {
1426
- const mediaQueryList = window.matchMedia(query);
1427
- mediaQueryList.addEventListener('change', callback);
1428
- return () => {
1429
- mediaQueryList.removeEventListener('change', callback);
1430
- };
1431
- }
1432
- function checkMediaQuery(query) {
1433
- return window.matchMedia(query).matches;
1434
- }
1435
-
1436
- function useMediaQuery(mediaQuery, useListener = false) {
1437
- /* eslint-disable-next-line @typescript-eslint/no-unused-vars */
1438
- const noop = (_) => () => { };
1439
- return useSyncExternalStore(useListener ? (cb) => subscribeToMediaQuery(mediaQuery, cb) : noop, () => (mediaQuery ? checkMediaQuery(mediaQuery) : true), () => false);
1440
- }
1441
-
1442
- function useMediaBreakpointUp(breakpoint, useListener = false) {
1443
- const { breakpoints } = useDContext();
1444
- const mediaQuery = useMemo(() => (`(min-width: ${breakpoints[breakpoint]})`), [breakpoint, breakpoints]);
1445
- return useMediaQuery(mediaQuery, useListener);
1446
- }
1447
- function useMediaBreakpointUpXs(useListener = false) {
1448
- return useMediaBreakpointUp('xs', useListener);
1449
- }
1450
- function useMediaBreakpointUpSm(useListener = false) {
1451
- return useMediaBreakpointUp('sm', useListener);
1452
- }
1453
- function useMediaBreakpointUpMd(useListener = false) {
1454
- return useMediaBreakpointUp('md', useListener);
1455
- }
1456
- function useMediaBreakpointUpLg(useListener = false) {
1457
- return useMediaBreakpointUp('lg', useListener);
1458
- }
1459
- function useMediaBreakpointUpXl(useListener = false) {
1460
- return useMediaBreakpointUp('xl', useListener);
1461
- }
1462
- function useMediaBreakpointUpXxl(useListener = false) {
1463
- return useMediaBreakpointUp('xxl', useListener);
1464
- }
1465
-
1466
1521
  function DInputCounter(_a, ref) {
1467
1522
  var { minValue, maxValue, value = minValue, invalid, iconStart: iconStartProp, iconEnd: iconEndProp, iconStartAriaLabel = 'decrease action', iconEndAriaLabel = 'increase action', style, onChange } = _a, props = __rest(_a, ["minValue", "maxValue", "value", "invalid", "iconStart", "iconEnd", "iconStartAriaLabel", "iconEndAriaLabel", "style", "onChange"]);
1468
1523
  const { handleOnWheel, } = useDisableInputWheel(ref);
@@ -1819,7 +1874,7 @@ function DInputRange(_a, ref) {
1819
1874
  if (!label) {
1820
1875
  return inputComponent;
1821
1876
  }
1822
- return (jsxs(Fragment$1, { children: [jsx("label", { className: "form-label", htmlFor: id, children: label }), inputComponent] }));
1877
+ return (jsxs(Fragment, { children: [jsx("label", { className: "form-label", htmlFor: id, children: label }), inputComponent] }));
1823
1878
  }
1824
1879
  const ForwardedDInputRange = forwardRef(DInputRange);
1825
1880
  ForwardedDInputRange.displayName = 'DInputRange';
@@ -1853,7 +1908,7 @@ function DListGroupItem({ as = 'li', action: actionProp, active, disabled, href,
1853
1908
  }
1854
1909
  return Object.assign(Object.assign({}, active && { 'aria-current': true }), disabled && { 'aria-disabled': true });
1855
1910
  }, [Tag, active, disabled]);
1856
- return (jsxs(Tag, Object.assign({ className: classNames(generateClasses, className), style: style }, Tag === 'a' && href && { href }, onClick && { onClick }, ariaAttributes, dataAttributes, Tag === 'button' && { type: 'button' }, { children: [iconStart && (jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix, materialStyle: iconStartMaterialStyle })), jsx("div", { className: "w-100", children: children }), iconEnd && (jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix, materialStyle: iconEndMaterialStyle, className: "ms-auto" }))] })));
1911
+ return (jsxs(Tag, Object.assign({ className: classNames(generateClasses, className), style: style }, Tag === 'a' && href && { href }, onClick && { onClick }, ariaAttributes, dataAttributes, Tag === 'button' && { type: 'button' }, { children: [iconStart && (jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix, materialStyle: iconStartMaterialStyle })), children, iconEnd && (jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix, materialStyle: iconEndMaterialStyle, className: "ms-auto" }))] })));
1857
1912
  }
1858
1913
 
1859
1914
  function DListGroup({ as = 'ul', numbered, flush, horizontal, children, className, style, dataAttributes, }) {
@@ -1883,7 +1938,7 @@ var DListGroup$1 = Object.assign(DListGroup, {
1883
1938
  function DModalHeader({ showCloseButton, onClose, children, className, style, iconFamilyClass, iconFamilyPrefix, icon: iconProp, materialStyle = false, }) {
1884
1939
  const { iconMap: { xLg, }, } = useDContext();
1885
1940
  const icon = useMemo(() => iconProp || xLg, [iconProp, xLg]);
1886
- return (jsxs(Fragment$1, { children: [jsxs("div", { className: classNames('modal-header', className), style: style, children: [jsx("div", { children: children }), showCloseButton && (jsx("button", { type: "button", className: "d-close align-self-center", "aria-label": "Close", onClick: onClose, children: jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: materialStyle }) }))] }), jsx("div", { className: "d-modal-separator" })] }));
1941
+ return (jsxs(Fragment, { children: [jsxs("div", { className: classNames('modal-header', className), style: style, children: [jsx("div", { children: children }), showCloseButton && (jsx("button", { type: "button", className: "d-close align-self-center", "aria-label": "Close", onClick: onClose, children: jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: materialStyle }) }))] }), jsx("div", { className: "d-modal-separator" })] }));
1887
1942
  }
1888
1943
 
1889
1944
  function DModalBody({ children, className, style, }) {
@@ -1895,10 +1950,14 @@ function DModalFooter({ className, style, actionPlacement, children, }) {
1895
1950
  'modal-footer': true,
1896
1951
  [`d-modal-action-${actionPlacement}`]: !!actionPlacement,
1897
1952
  }), [actionPlacement]);
1898
- return (jsxs(Fragment$1, { children: [jsx("div", { className: "d-modal-separator" }), jsx("div", { className: classNames(generateClasses, className), style: style, children: children })] }));
1953
+ return (jsxs(Fragment, { children: [jsx("div", { className: "d-modal-separator" }), jsx("div", { className: classNames(generateClasses, className), style: style, children: children })] }));
1899
1954
  }
1900
1955
 
1901
- function DModal({ name, className, style, staticBackdrop, scrollable, centered, fullScreen, fullScreenFrom, size, children, dataAttributes, }) {
1956
+ const defaultTransition$1 = {
1957
+ ease: 'easeInOut',
1958
+ duration: 0.3,
1959
+ };
1960
+ function DModal({ name, className, style, staticBackdrop, scrollable, centered, fullScreen, fullScreenFrom, size, transition, children, dataAttributes, }) {
1902
1961
  const fullScreenClass = useMemo(() => {
1903
1962
  if (fullScreen) {
1904
1963
  if (fullScreenFrom) {
@@ -1909,7 +1968,7 @@ function DModal({ name, className, style, staticBackdrop, scrollable, centered,
1909
1968
  return '';
1910
1969
  }, [fullScreenFrom, fullScreen]);
1911
1970
  const generateModalDialogClasses = useMemo(() => (Object.assign({ 'modal-dialog': true, 'modal-dialog-centered': !!centered, 'modal-dialog-scrollable': !!scrollable, [fullScreenClass]: !!fullScreen }, size && { [`modal-${size}`]: true })), [fullScreenClass, centered, fullScreen, scrollable, size]);
1912
- return (jsx("div", Object.assign({ className: classNames('modal portal fade show', className), id: name, tabIndex: -1, "aria-labelledby": `${name}Label`, "aria-hidden": "false", style: style }, staticBackdrop && ({
1971
+ return (jsx(motion.div, Object.assign({ className: classNames('modal portal show', className), id: name, tabIndex: -1, "aria-labelledby": `${name}Label`, "aria-hidden": "false", style: style, initial: { opacity: 0, scale: 0.95 }, animate: { opacity: 1, scale: 1 }, exit: { opacity: 0, scale: 0.95 }, transition: Object.assign(Object.assign({}, (transition !== null && transition !== void 0 ? transition : defaultTransition$1)), { delay: 0.15 }) }, staticBackdrop && ({
1913
1972
  [`data-${PREFIX_BS}backdrop`]: 'static',
1914
1973
  [`data-${PREFIX_BS}keyboard`]: 'false',
1915
1974
  }), dataAttributes, { children: jsx("div", { className: classNames(generateModalDialogClasses), children: jsx("div", { className: "modal-content", children: children }) }) })));
@@ -1923,7 +1982,7 @@ var DModal$1 = Object.assign(DModal, {
1923
1982
  function DOffcanvasHeader({ showCloseButton, onClose, children, className, style, iconFamilyClass, iconFamilyPrefix, icon: iconProp, materialStyle = false, }) {
1924
1983
  const { iconMap: { xLg, }, } = useDContext();
1925
1984
  const icon = useMemo(() => iconProp || xLg, [iconProp, xLg]);
1926
- return (jsxs(Fragment$1, { children: [jsxs("div", { className: classNames('offcanvas-header', className), style: style, children: [jsx("div", { children: children }), showCloseButton && (jsx("button", { type: "button", className: "d-close align-self-center", "aria-label": "Close", onClick: onClose, children: jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: materialStyle }) }))] }), jsx("div", { className: "d-offcanvas-separator" })] }));
1985
+ return (jsxs(Fragment, { children: [jsxs("div", { className: classNames('offcanvas-header', className), style: style, children: [jsx("div", { children: children }), showCloseButton && (jsx("button", { type: "button", className: "d-close align-self-center", "aria-label": "Close", onClick: onClose, children: jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: materialStyle }) }))] }), jsx("div", { className: "d-offcanvas-separator" })] }));
1927
1986
  }
1928
1987
 
1929
1988
  function DOffcanvasBody({ children, className, style, }) {
@@ -1935,13 +1994,39 @@ function DOffcanvasFooter({ actionPlacement, children, className, style, }) {
1935
1994
  'd-offcanvas-footer': true,
1936
1995
  [`d-offcanvas-action-${actionPlacement}`]: !!actionPlacement,
1937
1996
  }), [actionPlacement]);
1938
- return (jsxs(Fragment$1, { children: [jsx("div", { className: "d-offcanvas-separator" }), jsx("div", { className: classNames(generateClasses, className), style: style, children: children })] }));
1997
+ return (jsxs(Fragment, { children: [jsx("div", { className: "d-offcanvas-separator" }), jsx("div", { className: classNames(generateClasses, className), style: style, children: children })] }));
1939
1998
  }
1940
1999
 
1941
- function DOffcanvas({ name, className, style, staticBackdrop, scrollable, openFrom = 'end', children, dataAttributes, }) {
1942
- return (jsx("div", Object.assign({ className: classNames('offcanvas portal show', {
2000
+ const variants = {
2001
+ hidden: (openFrom) => {
2002
+ const properties = {};
2003
+ if (openFrom === 'start') {
2004
+ properties.x = '-100%';
2005
+ }
2006
+ if (openFrom === 'end') {
2007
+ properties.x = '100%';
2008
+ }
2009
+ if (openFrom === 'top') {
2010
+ properties.y = '-100%';
2011
+ }
2012
+ if (openFrom === 'bottom') {
2013
+ properties.y = '100%';
2014
+ }
2015
+ return properties;
2016
+ },
2017
+ visible: {
2018
+ x: 0,
2019
+ y: 0,
2020
+ },
2021
+ };
2022
+ const defaultTransition = {
2023
+ ease: 'easeInOut',
2024
+ duration: 0.3,
2025
+ };
2026
+ function DOffcanvas({ name, className, style, staticBackdrop, scrollable, openFrom = 'end', transition, children, dataAttributes, }) {
2027
+ return (jsx(motion.div, Object.assign({ className: classNames('offcanvas portal show', {
1943
2028
  [`offcanvas-${openFrom}`]: openFrom,
1944
- }, className), style: style, id: name, tabIndex: -1, "aria-labelledby": `${name}Label`, "aria-hidden": "false" }, staticBackdrop && ({
2029
+ }, className), style: Object.assign(Object.assign({}, style), { transition: 'none' }), id: name, tabIndex: -1, "aria-labelledby": `${name}Label`, "aria-hidden": "false", custom: openFrom, variants: variants, initial: "hidden", animate: "visible", exit: "hidden", transition: Object.assign(Object.assign({}, (transition !== null && transition !== void 0 ? transition : defaultTransition)), { delay: 0.15 }) }, staticBackdrop && ({
1945
2030
  [`data-${PREFIX_BS}backdrop`]: 'static',
1946
2031
  [`data-${PREFIX_BS}keyboard`]: 'false',
1947
2032
  }), scrollable && ({
@@ -2054,7 +2139,7 @@ function DStepper$1({ options, currentStep, className, style, }) {
2054
2139
  from 0deg,
2055
2140
  var(--${PREFIX_BS}step-progress-outter-fill-background-color) ${currentAngle}deg,
2056
2141
  var(--${PREFIX_BS}step-progress-outter-background-color) 0deg)`, [currentAngle]);
2057
- return (jsxs("div", { className: classNames('d-stepper', className), style: style, children: [jsx("div", { className: "d-step-bar", style: { background: progressStyle }, children: jsx("p", { className: "d-step-number", children: `${currentStep}/${options.length}` }) }), jsx("div", { className: "d-step-info", children: Object.keys(currentOption).length > 0 && (jsxs(Fragment$1, { children: [jsx("div", { className: "d-step-label", children: currentOption.label }), jsx("div", { className: "d-step-description", children: currentOption.description || '' })] })) })] }));
2142
+ return (jsxs("div", { className: classNames('d-stepper', className), style: style, children: [jsx("div", { className: "d-step-bar", style: { background: progressStyle }, children: jsx("p", { className: "d-step-number", children: `${currentStep}/${options.length}` }) }), jsx("div", { className: "d-step-info", children: Object.keys(currentOption).length > 0 && (jsxs(Fragment, { children: [jsx("div", { className: "d-step-label", children: currentOption.label }), jsx("div", { className: "d-step-description", children: currentOption.description || '' })] })) })] }));
2058
2143
  }
2059
2144
 
2060
2145
  function DStepper({ options, currentStep, iconSuccess, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle = false, vertical = false, breakpoint = 'lg', className, completed = false, style, dataAttributes, }) {
@@ -2096,7 +2181,7 @@ function DTooltip({ className, childrenClassName, style, offSet = ARROW_HEIGHT +
2096
2181
  role,
2097
2182
  ]);
2098
2183
  const generateClasses = useMemo(() => (Object.assign({ 'tooltip show': true, [`tooltip-${size}`]: !!size }, className && { [className]: true })), [size, className]);
2099
- return (jsxs(Fragment$1, { children: [jsx("div", Object.assign({ className: childrenClassName, ref: refs.setReference }, getReferenceProps(), { children: Component })), jsx(FloatingPortal, { children: isOpen && (jsxs("div", Object.assign({ className: classNames(generateClasses), ref: refs.setFloating, style: Object.assign(Object.assign({}, floatingStyles), style) }, getFloatingProps(), { children: [jsx(FloatingArrow, { ref: arrowRef, context: context, width: ARROW_WIDTH, height: ARROW_HEIGHT }), jsx("div", { className: "tooltip-inner", children: children })] }))) })] }));
2184
+ return (jsxs(Fragment, { children: [jsx("div", Object.assign({ className: childrenClassName, ref: refs.setReference }, getReferenceProps(), { children: Component })), jsx(FloatingPortal, { children: isOpen && (jsxs("div", Object.assign({ className: classNames(generateClasses), ref: refs.setFloating, style: Object.assign(Object.assign({}, floatingStyles), style) }, getFloatingProps(), { children: [jsx(FloatingArrow, { ref: arrowRef, context: context, width: ARROW_WIDTH, height: ARROW_HEIGHT }), jsx("div", { className: "tooltip-inner", children: children })] }))) })] }));
2100
2185
  }
2101
2186
 
2102
2187
  function DTimeline({ className, style, dataAttributes, items, }) {
@@ -2195,19 +2280,6 @@ function useDToast() {
2195
2280
  };
2196
2281
  }
2197
2282
 
2198
- function DTableHead({ className, style, field, label, value = '', onChange, }) {
2199
- const handleOnChange = useCallback(() => {
2200
- if (value === field) {
2201
- return onChange(`-${field}`);
2202
- }
2203
- if (value === `-${field}`) {
2204
- return onChange('');
2205
- }
2206
- return onChange(field);
2207
- }, [field, value, onChange]);
2208
- return (jsx("th", { style: style, className: classNames('d-table-head', className), children: jsxs("button", { type: "button", onClick: handleOnChange, children: [label, value && value.includes(field) && (jsx(DIcon, { icon: value === field ? 'arrow-up' : 'arrow-down' }))] }) }));
2209
- }
2210
-
2211
2283
  async function configureI8n(resources, _a = {}) {
2212
2284
  var { lng = 'en', fallbackLng = 'en' } = _a, config = __rest(_a, ["lng", "fallbackLng"]);
2213
2285
  return i18n
@@ -2515,5 +2587,5 @@ function DVoucher({ amount, amountDetails, icon = 'CircleCheckBig', color = 'suc
2515
2587
  }, children: jsxs("div", { children: [jsxs("div", { className: "d-voucher-header", children: [jsx(DIcon, { icon: icon, color: color }), jsxs("div", { className: "text-center", children: [jsx("h3", { className: "mb-2", children: title }), jsx("p", { className: "m-0", children: message })] })] }), amount && (jsxs("div", { className: "d-voucher-amount", children: [jsx("div", { className: classNames('text-center fw-bold fs-3', amountDetails ? 'mb-1' : 'm-0'), children: amount }), amountDetails] })), jsx("hr", { className: "my-4" }), children, jsx("hr", { className: "my-4" }), jsxs("div", { className: "d-voucher-footer", children: [jsx(DButton, { onClick: handleShare, iconStart: "Share2", text: shareText, variant: "outline", size: "sm" }), jsx(DButton, { onClick: handleDownload, iconStart: "Download", text: downloadText, variant: "outline", size: "sm" })] })] }) }));
2516
2588
  }
2517
2589
 
2518
- export { DAlert, DAvatar, DBadge, DBox, DBoxFile, DButton, DButtonIcon, DCard$1 as DCard, DCardBody, DCardFooter, DCardHeader, DCarousel$1 as DCarousel, DCarouselSlide, DChip, DCollapse, DContext, DContextProvider, DCreditCard, DCurrencyText, DDatePicker, DDropdown, DIcon, DIconBase, ForwardedDInput as DInput, DInputCheck, ForwardedDInputCounter as DInputCounter, ForwardedDInputCurrency as DInputCurrency, ForwardedDInputMask as DInputMask, ForwardedDInputPassword as DInputPassword, ForwardedDInputPhone as DInputPhone, DInputPin, ForwardedDInputRange as DInputRange, DInputSelect, DInputSwitch, DLayout$1 as DLayout, DLayoutPane, DListGroup$1 as DListGroup, DListGroupItem, DModal$1 as DModal, DModalBody, DModalFooter, DModalHeader, DOffcanvas$1 as DOffcanvas, DOffcanvasBody, DOffcanvasFooter, DOffcanvasHeader, DPaginator, DPasswordStrengthMeter, DPopover, DProgress, DSelect$1 as DSelect, DStepper, DStepper$2 as DStepperDesktop, DStepper$1 as DStepperMobile, DTabContent, DTableHead, DTabs$1 as DTabs, DTimeline, DToast$1 as DToast, DToastContainer, DTooltip, DVoucher, changeQueryString, checkMediaQuery, configureI8n as configureI18n, formatCurrency, getCssVariable, getQueryString, subscribeToMediaQuery, useDContext, useDPortalContext, useDToast, useDisableBodyScrollEffect, useDisableInputWheel, useFormatCurrency, useInputCurrency, useItemSelection, useMediaBreakpointUpLg, useMediaBreakpointUpMd, useMediaBreakpointUpSm, useMediaBreakpointUpXl, useMediaBreakpointUpXs, useMediaBreakpointUpXxl, useMediaQuery, usePortal, useProvidedRefOrCreate, useStackState, useTabContext, validatePhoneNumber };
2590
+ export { DAlert, DAvatar, DBadge, DBox, DBoxFile, DButton, DButtonIcon, DCard$1 as DCard, DCardBody, DCardFooter, DCardHeader, DCarousel$1 as DCarousel, DCarouselSlide, DChip, DCollapse, DContext, DContextProvider, DCreditCard, DCurrencyText, DDatePicker, DDropdown, DIcon, DIconBase, ForwardedDInput as DInput, DInputCheck, ForwardedDInputCounter as DInputCounter, ForwardedDInputCurrency as DInputCurrency, ForwardedDInputMask as DInputMask, ForwardedDInputPassword as DInputPassword, ForwardedDInputPhone as DInputPhone, DInputPin, ForwardedDInputRange as DInputRange, DInputSelect, DInputSwitch, DLayout$1 as DLayout, DLayoutPane, DListGroup$1 as DListGroup, DListGroupItem, DModal$1 as DModal, DModalBody, DModalFooter, DModalHeader, DOffcanvas$1 as DOffcanvas, DOffcanvasBody, DOffcanvasFooter, DOffcanvasHeader, DPaginator, DPasswordStrengthMeter, DPopover, DProgress, DSelect$1 as DSelect, DStepper, DStepper$2 as DStepperDesktop, DStepper$1 as DStepperMobile, DTabContent, DTabs$1 as DTabs, DTimeline, DToast$1 as DToast, DToastContainer, DTooltip, DVoucher, changeQueryString, checkMediaQuery, configureI8n as configureI18n, formatCurrency, getCssVariable, getQueryString, subscribeToMediaQuery, useDContext, useDPortalContext, useDToast, useDisableBodyScrollEffect, useDisableInputWheel, useFormatCurrency, useInputCurrency, useItemSelection, useMediaBreakpointUpLg, useMediaBreakpointUpMd, useMediaBreakpointUpSm, useMediaBreakpointUpXl, useMediaBreakpointUpXs, useMediaBreakpointUpXxl, useMediaQuery, usePortal, useProvidedRefOrCreate, useStackState, useTabContext, validatePhoneNumber };
2519
2591
  //# sourceMappingURL=index.esm.js.map