@dynamic-framework/ui-react 1.12.1 → 1.14.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 (29) hide show
  1. package/dist/css/dynamic-ui-non-root.css +51 -27
  2. package/dist/css/dynamic-ui-non-root.min.css +1 -1
  3. package/dist/css/dynamic-ui-root.css +1 -1
  4. package/dist/css/dynamic-ui-root.min.css +1 -1
  5. package/dist/css/dynamic-ui.css +52 -28
  6. package/dist/css/dynamic-ui.min.css +1 -1
  7. package/dist/index.esm.js +174 -166
  8. package/dist/index.esm.js.map +1 -1
  9. package/dist/index.js +174 -166
  10. package/dist/index.js.map +1 -1
  11. package/dist/types/components/DCurrencyText/DCurrencyText.d.ts +0 -1
  12. package/dist/types/components/DIcon/DIcon.d.ts +4 -15
  13. package/dist/types/components/DIconBase/DIconBase.d.ts +17 -0
  14. package/dist/types/components/DIconBase/index.d.ts +2 -0
  15. package/dist/types/components/DMonthPicker/DMonthPicker.d.ts +1 -1
  16. package/dist/types/components/index.d.ts +1 -1
  17. package/dist/types/components/interface.d.ts +2 -0
  18. package/dist/types/contexts/DContext.d.ts +15 -6
  19. package/package.json +2 -2
  20. package/src/style/abstracts/variables/_+import.scss +1 -1
  21. package/src/style/abstracts/variables/_forms.scss +3 -2
  22. package/src/style/abstracts/variables/_navs.scss +1 -1
  23. package/src/style/abstracts/variables/_quick-action-check.scss +1 -1
  24. package/src/style/components/_d-datepicker.scss +18 -5
  25. package/src/style/components/_d-icon.scss +4 -2
  26. package/src/style/components/_d-input.scss +18 -10
  27. package/src/style/components/_d-tabs.scss +5 -0
  28. package/dist/types/components/DListItemMovement/DListItemMovement.d.ts +0 -10
  29. package/dist/types/components/DListItemMovement/index.d.ts +0 -2
package/dist/index.js CHANGED
@@ -60,10 +60,10 @@ const ALERT_TYPE_ICON = {
60
60
  secondary: 'info-circle',
61
61
  };
62
62
 
63
- function DIcon({ icon, theme, style, className, size = '1.5rem', loading = false, loadingDuration = 1.8, hasCircle = false, circleSize = `calc(var(--${PREFIX_BS}icon-component-size) * 1)`, color, backgroundColor, familyClass = 'bi', familyPrefix = 'bi-', }) {
63
+ function DIconBase({ icon, theme, style, className, size = '1.5rem', loading = false, loadingDuration = 1.8, hasCircle = false, circleSize = `calc(var(--${PREFIX_BS}icon-component-size) * 1)`, color, backgroundColor, materialStyle = false, familyClass = 'bi', familyPrefix = 'bi-', }) {
64
64
  const colorStyle = React.useMemo(() => {
65
65
  if (color) {
66
- return { [`--${PREFIX_BS}component-color`]: color };
66
+ return { [`--${PREFIX_BS}icon-component-color`]: color };
67
67
  }
68
68
  if (theme) {
69
69
  return { [`--${PREFIX_BS}icon-component-color`]: `var(--${PREFIX_BS}${theme})` };
@@ -89,139 +89,17 @@ function DIcon({ icon, theme, style, className, size = '1.5rem', loading = false
89
89
  return { [`--${PREFIX_BS}icon-component-padding`]: '0' };
90
90
  }, [circleSize, hasCircle]);
91
91
  const generateStyleVariables = React.useMemo(() => (Object.assign(Object.assign(Object.assign(Object.assign({ [`--${PREFIX_BS}icon-component-size`]: size, [`--${PREFIX_BS}icon-component-loading-duration`]: `${loadingDuration}s` }, colorStyle), backgroundStyle), circleSizeStyle), style)), [size, loadingDuration, colorStyle, backgroundStyle, circleSizeStyle, style]);
92
- const generateClasses = React.useMemo(() => (Object.assign({ 'd-icon': true, [familyClass]: true, [`${familyPrefix}${icon}`]: true, 'd-icon-loading': loading }, className && { [className]: true })), [familyClass, familyPrefix, icon, className, loading]);
93
- return (jsxRuntime.jsx("i", { className: classNames(generateClasses), style: generateStyleVariables }));
94
- }
95
-
96
- function DSummaryCard({ title, description, icon, iconSize, iconTheme, Summary, }) {
97
- return (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("h6", { className: "fw-bold fs-6", children: title }), jsxRuntime.jsx("p", { className: "fs-8", children: description }), jsxRuntime.jsxs("div", { className: "bg-white rounded p-4 d-flex gap-3 shadow-sm text-gray-700 fs-8", children: [jsxRuntime.jsx(DIcon, { icon: icon, theme: iconTheme, size: iconSize }), Summary] })] }));
98
- }
99
-
100
- function DAlert({ type = 'success', icon, iconFamilyClass, iconFamilyPrefix, showIcon = true, soft = false, showClose, onClose, children, id, className, style, }) {
101
- const generateClasses = React.useMemo(() => (Object.assign({ alert: true, [`alert-${type}`]: true, 'fade show': !!showClose, 'alert-soft': soft }, className && { [className]: true })), [type, showClose, soft, className]);
102
- const getIcon = React.useMemo(() => icon || ALERT_TYPE_ICON[type] || '', [icon, type]);
103
- const generateStyleVariables = React.useMemo(() => (Object.assign(Object.assign({}, style), { [`--${PREFIX_BS}alert-component-separator-opacity`]: '0.3' })), [style]);
104
- return (jsxRuntime.jsxs("div", { className: classNames(generateClasses), style: generateStyleVariables, role: "alert", id: id, children: [(showIcon || icon) && (jsxRuntime.jsx(DIcon, Object.assign({ className: "alert-icon", icon: getIcon }, iconFamilyClass && { familyClass: iconFamilyClass }, iconFamilyPrefix && { familyPrefix: iconFamilyPrefix }))), jsxRuntime.jsx("div", { className: "alert-text", children: children }), showClose && (jsxRuntime.jsx("div", { className: "alert-separator" })), showClose && (jsxRuntime.jsx("button", { type: "button", className: "btn-close", "aria-label": "Close", onClick: onClose, children: jsxRuntime.jsx(DIcon, { className: "alert-close-icon", icon: "x-lg", familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix }) }))] }));
105
- }
106
-
107
- function DBoxFile(_a) {
108
- var { icon = 'cloud-upload', iconFamilyClass, iconFamilyPrefix, disabled = false, children, className, style } = _a, dropzoneOptions = tslib.__rest(_a, ["icon", "iconFamilyClass", "iconFamilyPrefix", "disabled", "children", "className", "style"]);
109
- const { acceptedFiles, getRootProps, getInputProps, } = reactDropzone.useDropzone(Object.assign({ disabled }, dropzoneOptions));
110
- return (jsxRuntime.jsxs("section", { className: classNames('d-box-file', {
111
- 'd-box-file-selected': !!acceptedFiles.length,
112
- }, className), style: style, children: [jsxRuntime.jsxs("div", Object.assign({}, getRootProps({
113
- className: classNames('d-box-file-dropzone', {
114
- disabled,
115
- }),
116
- }), { children: [jsxRuntime.jsx("input", Object.assign({}, getInputProps())), jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix }), jsxRuntime.jsx("div", { className: "d-box-content", children: children })] })), !!acceptedFiles.length && (jsxRuntime.jsx("aside", { className: "d-box-files", children: acceptedFiles.map((file) => (jsxRuntime.jsx("div", { className: "d-box-files-text", children: `${file.name} - ${file.size} bytes` }, file.name))) }))] }));
117
- }
118
-
119
- function DButton({ theme = 'primary', size, variant, state, text = '', ariaLabel, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, value, type = 'button', pill = false, loading = false, loadingAriaLabel, disabled = false, stopPropagationEnabled = true, className, form, onClick, }) {
120
- const generateClasses = React.useMemo(() => {
121
- const variantClass = variant
122
- ? `btn-${variant}-${theme}`
123
- : `btn-${theme}`;
124
- return Object.assign(Object.assign(Object.assign({ btn: true, [variantClass]: true }, size && { [`btn-${size}`]: true }), (state && state !== 'disabled') && { [state]: true }), { loading });
125
- }, [variant, theme, size, state, loading]);
126
- const generateStyleVariables = React.useMemo(() => {
127
- if (pill) {
128
- return {
129
- [`--${PREFIX_BS}btn-component-border-radius`]: `var(--${PREFIX_BS}border-radius-pill)`,
130
- [`--${PREFIX_BS}btn-component-lg-border-radius`]: `var(--${PREFIX_BS}border-radius-pill)`,
131
- [`--${PREFIX_BS}btn-component-sm-border-radius`]: `var(--${PREFIX_BS}border-radius-pill)`,
132
- };
133
- }
134
- return {};
135
- }, [pill]);
136
- const clickHandler = React.useCallback((event) => {
137
- if (stopPropagationEnabled) {
138
- event.stopPropagation();
139
- }
140
- onClick === null || onClick === void 0 ? void 0 : onClick(event);
141
- }, [stopPropagationEnabled, onClick]);
142
- const isDisabled = React.useMemo(() => (state === 'disabled' || loading || disabled), [state, loading, disabled]);
143
- const newAriaLabel = React.useMemo(() => (loading
144
- ? (loadingAriaLabel || ariaLabel || text)
145
- : (ariaLabel || text)), [loading, loadingAriaLabel, ariaLabel, text]);
146
- return (jsxRuntime.jsxs("button", Object.assign({ className: classNames(generateClasses, className), style: generateStyleVariables, type: type, disabled: isDisabled, onClick: clickHandler, "aria-label": newAriaLabel, form: form }, value && { value }, { children: [iconStart && (jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix })), (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 }))] })));
147
- }
148
-
149
- function DCardHeader({ className, style, children, }) {
150
- return (jsxRuntime.jsx("div", { className: classNames('card-header', className), style: style, children: children }));
151
- }
152
-
153
- function DCardBody({ className, style, children, }) {
154
- return (jsxRuntime.jsx("div", { className: classNames('card-body', className), style: style, children: children }));
155
- }
156
-
157
- function DCardFooter({ className, style, children, }) {
158
- return (jsxRuntime.jsx("div", { className: classNames('card-footer', className), style: style, children: children }));
159
- }
160
-
161
- function DCard({ className, style, children, }) {
162
- return (jsxRuntime.jsx("div", { style: style, className: classNames('card', className), children: children }));
163
- }
164
- var DCard$1 = Object.assign(DCard, {
165
- Header: DCardHeader,
166
- Body: DCardBody,
167
- Footer: DCardFooter,
168
- });
169
-
170
- function DCardAccount({ className, style, icon, theme, name, number, balance, balanceText, onClick, actionText, }) {
171
- return (jsxRuntime.jsx(DCard$1, { className: classNames('d-card-account', className), style: style, children: jsxRuntime.jsxs(DCard$1.Body, { children: [jsxRuntime.jsxs("div", { className: "d-flex gap-3 align-items-center", children: [jsxRuntime.jsx(DIcon, { icon: icon, hasCircle: true, theme: theme, size: "1.5rem" }), jsxRuntime.jsxs("div", { className: "d-block flex-grow-1", children: [jsxRuntime.jsx("p", { className: "text-gray-700", children: name }), jsxRuntime.jsx("small", { className: "text-gray-500", children: number })] })] }), jsxRuntime.jsxs("div", { className: "d-block", children: [jsxRuntime.jsx("p", { className: "fw-bold fs-6 text-body", children: balance }), jsxRuntime.jsx("small", { className: "text-gray-700", children: balanceText })] }), jsxRuntime.jsx("div", { className: "d-flex justify-content-end", children: jsxRuntime.jsx(DButton, { text: actionText, variant: "link", size: "sm", theme: "secondary", iconEnd: "chevron-right", onClick: onClick }) })] }) }));
172
- }
173
-
174
- function DCarouselSlide(_a) {
175
- var { className } = _a, props = tslib.__rest(_a, ["className"]);
176
- return (jsxRuntime.jsx(reactSplide.SplideSlide, Object.assign({ className: classNames('d-carousel-slide', className) }, props)));
177
- }
178
-
179
- function DCarousel(_a) {
180
- var { children, className, style, options } = _a, props = tslib.__rest(_a, ["children", "className", "style", "options"]);
181
- return (jsxRuntime.jsx(reactSplide.Splide, Object.assign({ className: classNames('d-carousel', className), style: style, options: Object.assign(Object.assign({}, options), { classes: {
182
- // Arrows
183
- arrows: 'splide__arrows d-carousel-arrows',
184
- arrow: 'splide__arrow d-carousel-arrow',
185
- prev: 'splide__arrow--prev d-carousel-arrow-prev',
186
- next: 'splide__arrow--next d-carousel-arrow-next',
187
- // Paginator
188
- pagination: 'splide__pagination d-carousel-pagination',
189
- page: 'splide__pagination__page d-carousel-pagination-page',
190
- } }) }, props, { children: children })));
191
- }
192
- var DCarousel$1 = Object.assign(DCarousel, {
193
- Slide: DCarouselSlide,
194
- });
195
-
196
- function DChip({ theme = 'primary', text, icon, iconFamilyClass, iconFamilyPrefix, showClose = false, closeAriaLabel = 'close', className, style, onClose, }) {
197
- const generateClasses = React.useMemo(() => ({
198
- 'd-chip': true,
199
- [`d-chip-${theme}`]: !!theme,
200
- }), [theme]);
201
- return (jsxRuntime.jsxs("span", { className: classNames(generateClasses, className), style: style, children: [icon && (jsxRuntime.jsx("div", { className: "d-chip-icon-container", children: jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix }) })), jsxRuntime.jsx("span", { children: text }), showClose && (jsxRuntime.jsx("button", { type: "button", className: "d-chip-icon-container", onClick: onClose, "aria-label": closeAriaLabel, children: jsxRuntime.jsx(DIcon, { icon: "x-lg" }) }))] }));
202
- }
203
-
204
- function DCollapse({ id, className, style, Component, hasSeparator = false, defaultCollapsed = false, onChange, children, }) {
205
- const [toggle, setToggle] = React.useState(defaultCollapsed);
206
- const onChangeCollapse = () => setToggle((prev) => !prev);
207
- React.useEffect(() => {
208
- if (onChange) {
209
- onChange(toggle);
210
- }
211
- }, [toggle, onChange]);
212
- React.useEffect(() => {
213
- setToggle(defaultCollapsed);
214
- }, [defaultCollapsed]);
215
- const generateStyles = React.useMemo(() => ({
216
- [`--${PREFIX_BS}collapse-separator-display`]: hasSeparator ? 'block' : 'none',
217
- }), [hasSeparator]);
218
- return (jsxRuntime.jsxs("div", { id: id, className: classNames('collapse-container', className), style: style, children: [jsxRuntime.jsxs("button", { className: "collapse-button", type: "button", onClick: onChangeCollapse, children: [jsxRuntime.jsx("div", { className: "flex-grow-1", children: Component }), jsxRuntime.jsx(DIcon, { color: `var(--${PREFIX_BS}gray)`, size: `var(--${PREFIX_BS}ref-fs-small)`, icon: toggle ? 'chevron-up' : 'chevron-down' })] }), toggle && (jsxRuntime.jsx("div", { className: classNames({
219
- 'collapse-body': true,
220
- }), style: generateStyles, children: children }))] }));
221
- }
222
-
223
- function DCollapseIconText({ children, icon, iconSize = '1.5rem', iconTheme = 'primary', title, iconFamilyClass, iconFamilyPrefix, className, style, }) {
224
- return (jsxRuntime.jsx(DCollapse, { defaultCollapsed: true, className: classNames('d-collapse-icon-text', className), style: style, Component: (jsxRuntime.jsxs("div", { className: "d-collapse-icon-text-header", children: [jsxRuntime.jsx(DIcon, { icon: icon, size: iconSize, theme: iconTheme, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, hasCircle: true }), jsxRuntime.jsx("span", { className: "d-collapse-icon-text-title", children: title })] })), children: children }));
92
+ const generateClasses = React.useMemo(() => (Object.assign(Object.assign({ 'd-icon': true, [familyClass]: true, 'd-icon-loading': loading }, !materialStyle && {
93
+ [`${familyPrefix}${icon}`]: true,
94
+ }), className && { [className]: true })), [
95
+ familyClass,
96
+ loading,
97
+ className,
98
+ materialStyle,
99
+ familyPrefix,
100
+ icon,
101
+ ]);
102
+ return (jsxRuntime.jsx("i", { className: classNames(generateClasses), style: generateStyleVariables, children: materialStyle && icon }));
225
103
  }
226
104
 
227
105
  const defaultState = {
@@ -232,13 +110,21 @@ const defaultState = {
232
110
  separator: ',',
233
111
  decimal: '.',
234
112
  },
113
+ icon: {
114
+ familyClass: 'bi',
115
+ familyPrefix: 'bi-',
116
+ materialStyle: false,
117
+ },
118
+ setContext: () => { },
235
119
  };
236
120
  const DContext = React.createContext(defaultState);
237
- function DContextProvider({ language = defaultState.language, currency = defaultState.currency, children, }) {
238
- const value = React.useMemo(() => ({
121
+ function DContextProvider({ language = defaultState.language, currency = defaultState.currency, icon = defaultState.icon, children, }) {
122
+ const [internalContext, setInternalContext,] = React.useState({
239
123
  language,
240
124
  currency,
241
- }), [language, currency]);
125
+ icon,
126
+ });
127
+ const value = React.useMemo(() => (Object.assign(Object.assign({}, internalContext), { setContext: (newValue) => setInternalContext(newValue) })), [internalContext]);
242
128
  return (jsxRuntime.jsx(DContext.Provider, { value: value, children: children }));
243
129
  }
244
130
  function useDContext() {
@@ -399,6 +285,143 @@ function useDOffcanvasContext() {
399
285
  return context;
400
286
  }
401
287
 
288
+ function DIcon(_a) {
289
+ var { familyClass: propFamilyClass, familyPrefix: propFamilyPrefix, materialStyle: propMaterialStyle } = _a, props = tslib.__rest(_a, ["familyClass", "familyPrefix", "materialStyle"]);
290
+ const { icon: { familyClass, familyPrefix, materialStyle, }, } = useDContext();
291
+ return (jsxRuntime.jsx(DIconBase, Object.assign({ familyClass: propFamilyClass || familyClass, familyPrefix: propFamilyPrefix || familyPrefix, materialStyle: propMaterialStyle || materialStyle }, props)));
292
+ }
293
+
294
+ function DSummaryCard({ title, description, icon, iconSize, iconTheme, Summary, }) {
295
+ return (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("h6", { className: "fw-bold fs-6", children: title }), jsxRuntime.jsx("p", { className: "fs-8", children: description }), jsxRuntime.jsxs("div", { className: "bg-white rounded p-4 d-flex gap-3 shadow-sm text-gray-700 fs-8", children: [jsxRuntime.jsx(DIcon, { icon: icon, theme: iconTheme, size: iconSize }), Summary] })] }));
296
+ }
297
+
298
+ function DAlert({ type = 'success', icon, iconFamilyClass, iconFamilyPrefix, showIcon = true, soft = false, showClose, onClose, children, id, className, style, }) {
299
+ const generateClasses = React.useMemo(() => (Object.assign({ alert: true, [`alert-${type}`]: true, 'fade show': !!showClose, 'alert-soft': soft }, className && { [className]: true })), [type, showClose, soft, className]);
300
+ const getIcon = React.useMemo(() => icon || ALERT_TYPE_ICON[type] || '', [icon, type]);
301
+ const generateStyleVariables = React.useMemo(() => (Object.assign(Object.assign({}, style), { [`--${PREFIX_BS}alert-component-separator-opacity`]: '0.3' })), [style]);
302
+ return (jsxRuntime.jsxs("div", { className: classNames(generateClasses), style: generateStyleVariables, role: "alert", id: id, children: [(showIcon || icon) && (jsxRuntime.jsx(DIcon, Object.assign({ className: "alert-icon", icon: getIcon }, iconFamilyClass && { familyClass: iconFamilyClass }, iconFamilyPrefix && { familyPrefix: iconFamilyPrefix }))), jsxRuntime.jsx("div", { className: "alert-text", children: children }), showClose && (jsxRuntime.jsx("div", { className: "alert-separator" })), showClose && (jsxRuntime.jsx("button", { type: "button", className: "btn-close", "aria-label": "Close", onClick: onClose, children: jsxRuntime.jsx(DIcon, { className: "alert-close-icon", icon: "x-lg", familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix }) }))] }));
303
+ }
304
+
305
+ function DBoxFile(_a) {
306
+ var { icon = 'cloud-upload', iconFamilyClass, iconFamilyPrefix, disabled = false, children, className, style } = _a, dropzoneOptions = tslib.__rest(_a, ["icon", "iconFamilyClass", "iconFamilyPrefix", "disabled", "children", "className", "style"]);
307
+ const { acceptedFiles, getRootProps, getInputProps, } = reactDropzone.useDropzone(Object.assign({ disabled }, dropzoneOptions));
308
+ return (jsxRuntime.jsxs("section", { className: classNames('d-box-file', {
309
+ 'd-box-file-selected': !!acceptedFiles.length,
310
+ }, className), style: style, children: [jsxRuntime.jsxs("div", Object.assign({}, getRootProps({
311
+ className: classNames('d-box-file-dropzone', {
312
+ disabled,
313
+ }),
314
+ }), { children: [jsxRuntime.jsx("input", Object.assign({}, getInputProps())), jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix }), jsxRuntime.jsx("div", { className: "d-box-content", children: children })] })), !!acceptedFiles.length && (jsxRuntime.jsx("aside", { className: "d-box-files", children: acceptedFiles.map((file) => (jsxRuntime.jsx("div", { className: "d-box-files-text", children: `${file.name} - ${file.size} bytes` }, file.name))) }))] }));
315
+ }
316
+
317
+ function DButton({ theme = 'primary', size, variant, state, text = '', ariaLabel, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, value, type = 'button', pill = false, loading = false, loadingAriaLabel, disabled = false, stopPropagationEnabled = true, className, form, onClick, }) {
318
+ const generateClasses = React.useMemo(() => {
319
+ const variantClass = variant
320
+ ? `btn-${variant}-${theme}`
321
+ : `btn-${theme}`;
322
+ return Object.assign(Object.assign(Object.assign({ btn: true, [variantClass]: true }, size && { [`btn-${size}`]: true }), (state && state !== 'disabled') && { [state]: true }), { loading });
323
+ }, [variant, theme, size, state, loading]);
324
+ const generateStyleVariables = React.useMemo(() => {
325
+ if (pill) {
326
+ return {
327
+ [`--${PREFIX_BS}btn-component-border-radius`]: `var(--${PREFIX_BS}border-radius-pill)`,
328
+ [`--${PREFIX_BS}btn-component-lg-border-radius`]: `var(--${PREFIX_BS}border-radius-pill)`,
329
+ [`--${PREFIX_BS}btn-component-sm-border-radius`]: `var(--${PREFIX_BS}border-radius-pill)`,
330
+ };
331
+ }
332
+ return {};
333
+ }, [pill]);
334
+ const clickHandler = React.useCallback((event) => {
335
+ if (stopPropagationEnabled) {
336
+ event.stopPropagation();
337
+ }
338
+ onClick === null || onClick === void 0 ? void 0 : onClick(event);
339
+ }, [stopPropagationEnabled, onClick]);
340
+ const isDisabled = React.useMemo(() => (state === 'disabled' || loading || disabled), [state, loading, disabled]);
341
+ const newAriaLabel = React.useMemo(() => (loading
342
+ ? (loadingAriaLabel || ariaLabel || text)
343
+ : (ariaLabel || text)), [loading, loadingAriaLabel, ariaLabel, text]);
344
+ return (jsxRuntime.jsxs("button", Object.assign({ className: classNames(generateClasses, className), style: generateStyleVariables, type: type, disabled: isDisabled, onClick: clickHandler, "aria-label": newAriaLabel, form: form }, value && { value }, { children: [iconStart && (jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix })), (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 }))] })));
345
+ }
346
+
347
+ function DCardHeader({ className, style, children, }) {
348
+ return (jsxRuntime.jsx("div", { className: classNames('card-header', className), style: style, children: children }));
349
+ }
350
+
351
+ function DCardBody({ className, style, children, }) {
352
+ return (jsxRuntime.jsx("div", { className: classNames('card-body', className), style: style, children: children }));
353
+ }
354
+
355
+ function DCardFooter({ className, style, children, }) {
356
+ return (jsxRuntime.jsx("div", { className: classNames('card-footer', className), style: style, children: children }));
357
+ }
358
+
359
+ function DCard({ className, style, children, }) {
360
+ return (jsxRuntime.jsx("div", { style: style, className: classNames('card', className), children: children }));
361
+ }
362
+ var DCard$1 = Object.assign(DCard, {
363
+ Header: DCardHeader,
364
+ Body: DCardBody,
365
+ Footer: DCardFooter,
366
+ });
367
+
368
+ function DCardAccount({ className, style, icon, theme, name, number, balance, balanceText, onClick, actionText, }) {
369
+ return (jsxRuntime.jsx(DCard$1, { className: classNames('d-card-account', className), style: style, children: jsxRuntime.jsxs(DCard$1.Body, { children: [jsxRuntime.jsxs("div", { className: "d-flex gap-3 align-items-center", children: [jsxRuntime.jsx(DIcon, { icon: icon, hasCircle: true, theme: theme, size: "1.5rem" }), jsxRuntime.jsxs("div", { className: "d-block flex-grow-1", children: [jsxRuntime.jsx("p", { className: "text-gray-700", children: name }), jsxRuntime.jsx("small", { className: "text-gray-500", children: number })] })] }), jsxRuntime.jsxs("div", { className: "d-block", children: [jsxRuntime.jsx("p", { className: "fw-bold fs-6 text-body", children: balance }), jsxRuntime.jsx("small", { className: "text-gray-700", children: balanceText })] }), jsxRuntime.jsx("div", { className: "d-flex justify-content-end", children: jsxRuntime.jsx(DButton, { text: actionText, variant: "link", size: "sm", theme: "secondary", iconEnd: "chevron-right", onClick: onClick }) })] }) }));
370
+ }
371
+
372
+ function DCarouselSlide(_a) {
373
+ var { className } = _a, props = tslib.__rest(_a, ["className"]);
374
+ return (jsxRuntime.jsx(reactSplide.SplideSlide, Object.assign({ className: classNames('d-carousel-slide', className) }, props)));
375
+ }
376
+
377
+ function DCarousel(_a) {
378
+ var { children, className, style, options } = _a, props = tslib.__rest(_a, ["children", "className", "style", "options"]);
379
+ return (jsxRuntime.jsx(reactSplide.Splide, Object.assign({ className: classNames('d-carousel', className), style: style, options: Object.assign(Object.assign({}, options), { classes: {
380
+ // Arrows
381
+ arrows: 'splide__arrows d-carousel-arrows',
382
+ arrow: 'splide__arrow d-carousel-arrow',
383
+ prev: 'splide__arrow--prev d-carousel-arrow-prev',
384
+ next: 'splide__arrow--next d-carousel-arrow-next',
385
+ // Paginator
386
+ pagination: 'splide__pagination d-carousel-pagination',
387
+ page: 'splide__pagination__page d-carousel-pagination-page',
388
+ } }) }, props, { children: children })));
389
+ }
390
+ var DCarousel$1 = Object.assign(DCarousel, {
391
+ Slide: DCarouselSlide,
392
+ });
393
+
394
+ function DChip({ theme = 'primary', text, icon, iconFamilyClass, iconFamilyPrefix, showClose = false, closeAriaLabel = 'close', className, style, onClose, }) {
395
+ const generateClasses = React.useMemo(() => ({
396
+ 'd-chip': true,
397
+ [`d-chip-${theme}`]: !!theme,
398
+ }), [theme]);
399
+ return (jsxRuntime.jsxs("span", { className: classNames(generateClasses, className), style: style, children: [icon && (jsxRuntime.jsx("div", { className: "d-chip-icon-container", children: jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix }) })), jsxRuntime.jsx("span", { children: text }), showClose && (jsxRuntime.jsx("button", { type: "button", className: "d-chip-icon-container", onClick: onClose, "aria-label": closeAriaLabel, children: jsxRuntime.jsx(DIcon, { icon: "x-lg" }) }))] }));
400
+ }
401
+
402
+ function DCollapse({ id, className, style, Component, hasSeparator = false, defaultCollapsed = false, onChange, children, }) {
403
+ const [toggle, setToggle] = React.useState(defaultCollapsed);
404
+ const onChangeCollapse = () => setToggle((prev) => !prev);
405
+ React.useEffect(() => {
406
+ if (onChange) {
407
+ onChange(toggle);
408
+ }
409
+ }, [toggle, onChange]);
410
+ React.useEffect(() => {
411
+ setToggle(defaultCollapsed);
412
+ }, [defaultCollapsed]);
413
+ const generateStyles = React.useMemo(() => ({
414
+ [`--${PREFIX_BS}collapse-separator-display`]: hasSeparator ? 'block' : 'none',
415
+ }), [hasSeparator]);
416
+ return (jsxRuntime.jsxs("div", { id: id, className: classNames('collapse-container', className), style: style, children: [jsxRuntime.jsxs("button", { className: "collapse-button", type: "button", onClick: onChangeCollapse, children: [jsxRuntime.jsx("div", { className: "flex-grow-1", children: Component }), jsxRuntime.jsx(DIcon, { color: `var(--${PREFIX_BS}gray)`, size: `var(--${PREFIX_BS}ref-fs-small)`, icon: toggle ? 'chevron-up' : 'chevron-down' })] }), toggle && (jsxRuntime.jsx("div", { className: classNames({
417
+ 'collapse-body': true,
418
+ }), style: generateStyles, children: children }))] }));
419
+ }
420
+
421
+ function DCollapseIconText({ children, icon, iconSize = '1.5rem', iconTheme = 'primary', title, iconFamilyClass, iconFamilyPrefix, className, style, }) {
422
+ return (jsxRuntime.jsx(DCollapse, { defaultCollapsed: true, className: classNames('d-collapse-icon-text', className), style: style, Component: (jsxRuntime.jsxs("div", { className: "d-collapse-icon-text-header", children: [jsxRuntime.jsx(DIcon, { icon: icon, size: iconSize, theme: iconTheme, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, hasCircle: true }), jsxRuntime.jsx("span", { className: "d-collapse-icon-text-title", children: title })] })), children: children }));
423
+ }
424
+
402
425
  function formatCurrency(amount, options) {
403
426
  return currency(amount, options).format();
404
427
  }
@@ -439,7 +462,7 @@ function useProvidedRefOrCreate(providedRef) {
439
462
  }
440
463
 
441
464
  function DInput(_a, ref) {
442
- var { id, style, className, label = '', labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, disabled = false, readOnly = false, loading = false, iconFamilyClass, iconFamilyPrefix, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconStartTabIndex, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconEndTabIndex, hint, invalid = false, valid = false, floatingLabel = false, inputStart, value, placeholder = '', onChange, onIconStartClick, onIconEndClick } = _a, inputProps = tslib.__rest(_a, ["id", "style", "className", "label", "labelIcon", "labelIconFamilyClass", "labelIconFamilyPrefix", "disabled", "readOnly", "loading", "iconFamilyClass", "iconFamilyPrefix", "iconStart", "iconStartFamilyClass", "iconStartFamilyPrefix", "iconStartAriaLabel", "iconStartTabIndex", "iconEnd", "iconEndFamilyClass", "iconEndFamilyPrefix", "iconEndAriaLabel", "iconEndTabIndex", "hint", "invalid", "valid", "floatingLabel", "inputStart", "value", "placeholder", "onChange", "onIconStartClick", "onIconEndClick"]);
465
+ var { id, style, className, label = '', labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, disabled = false, readOnly = false, loading = false, iconFamilyClass, iconFamilyPrefix, iconStart, iconStartDisabled, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconStartTabIndex, iconEnd, iconEndDisabled, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconEndTabIndex, hint, invalid = false, valid = false, floatingLabel = false, inputStart, value, placeholder = '', onChange, onIconStartClick, onIconEndClick } = _a, inputProps = tslib.__rest(_a, ["id", "style", "className", "label", "labelIcon", "labelIconFamilyClass", "labelIconFamilyPrefix", "disabled", "readOnly", "loading", "iconFamilyClass", "iconFamilyPrefix", "iconStart", "iconStartDisabled", "iconStartFamilyClass", "iconStartFamilyPrefix", "iconStartAriaLabel", "iconStartTabIndex", "iconEnd", "iconEndDisabled", "iconEndFamilyClass", "iconEndFamilyPrefix", "iconEndAriaLabel", "iconEndTabIndex", "hint", "invalid", "valid", "floatingLabel", "inputStart", "value", "placeholder", "onChange", "onIconStartClick", "onIconEndClick"]);
443
466
  const inputRef = useProvidedRefOrCreate(ref);
444
467
  const handleOnChange = React.useCallback((event) => {
445
468
  onChange === null || onChange === void 0 ? void 0 : onChange(event.currentTarget.value);
@@ -492,7 +515,7 @@ function DInput(_a, ref) {
492
515
  'input-group': true,
493
516
  'has-validation': invalid,
494
517
  disabled: disabled || loading,
495
- }), children: [!!inputStart && (jsxRuntime.jsx("div", { className: "input-group-text", children: inputStart })), iconStart && (jsxRuntime.jsx("button", { type: "button", className: "input-group-text", id: `${id}Start`, onClick: handleOnIconStartClick, disabled: disabled || loading, "aria-label": iconStartAriaLabel, tabIndex: iconStartTabIndex, children: iconStart && (jsxRuntime.jsx(DIcon, { className: "d-input-icon", 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: "d-input-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, { className: "d-input-icon", icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix })) })), loading && (jsxRuntime.jsx("div", { className: "input-group-text d-input-icon", 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 }))] })] }));
518
+ }), children: [!!inputStart && (jsxRuntime.jsx("div", { className: "input-group-text", children: inputStart })), iconStart && (jsxRuntime.jsx("button", { type: "button", className: "input-group-text", id: `${id}Start`, onClick: handleOnIconStartClick, disabled: disabled || loading || iconStartDisabled, "aria-label": iconStartAriaLabel, tabIndex: iconStartTabIndex, children: jsxRuntime.jsx(DIcon, { className: "d-input-icon", 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: "d-input-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 || iconEndDisabled, "aria-label": iconEndAriaLabel, tabIndex: iconEndTabIndex, children: jsxRuntime.jsx(DIcon, { className: "d-input-icon", icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix }) })), loading && (jsxRuntime.jsx("div", { className: "input-group-text d-input-icon", 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 }))] })] }));
496
519
  }
497
520
  const ForwardedDInput = React.forwardRef(DInput);
498
521
  ForwardedDInput.displayName = 'DInput';
@@ -514,10 +537,10 @@ ForwardedDDatePickerInput.displayName = 'DDatePickerInput';
514
537
  var DDatePickerInput$1 = ForwardedDDatePickerInput;
515
538
 
516
539
  function DMonthPicker(_a) {
517
- var { onChangeDate, date, locale, className, headerPrevYearAriaLabel = 'decrease year', headerNextYearAriaLabel = 'increase year' } = _a, props = tslib.__rest(_a, ["onChangeDate", "date", "locale", "className", "headerPrevYearAriaLabel", "headerNextYearAriaLabel"]);
540
+ var { onChangeDate, date, locale, className, calendarClassName, headerPrevYearAriaLabel = 'decrease year', headerNextYearAriaLabel = 'increase year' } = _a, props = tslib.__rest(_a, ["onChangeDate", "date", "locale", "className", "calendarClassName", "headerPrevYearAriaLabel", "headerNextYearAriaLabel"]);
518
541
  const selected = React.useMemo(() => dateFns.parseISO(date), [date]);
519
542
  const dateFormatted = React.useMemo(() => (dateFns.format(new Date(date), 'MMMM yyyy', { locale })), [date, locale]);
520
- return (jsxRuntime.jsx(DatePicker, Object.assign({ showMonthYearPicker: true, selected: selected, calendarClassName: classNames('d-month-picker', className), onChange: onChangeDate }, locale && { locale }, { customInput: (jsxRuntime.jsx("p", { className: "fw-bold text-capitalize", children: dateFormatted })), renderCustomHeader: ({ monthDate, decreaseYear, increaseYear, prevYearButtonDisabled, nextYearButtonDisabled, }) => (jsxRuntime.jsxs("div", { className: "d-flex align-items-center justify-content-between gap-4 fs-6 bg-dark", children: [jsxRuntime.jsx(DButton, { iconStart: "chevron-left", size: "sm", variant: "link", theme: "light", onClick: decreaseYear, disabled: prevYearButtonDisabled, ariaLabel: headerPrevYearAriaLabel }), jsxRuntime.jsx("p", { className: "fs-6 fw-bold", children: monthDate.getFullYear() }), jsxRuntime.jsx(DButton, { iconStart: "chevron-right", size: "sm", variant: "link", theme: "light", onClick: increaseYear, disabled: nextYearButtonDisabled, ariaLabel: headerNextYearAriaLabel })] })) }, props)));
543
+ return (jsxRuntime.jsx(DatePicker, Object.assign({ showMonthYearPicker: true, selected: selected, className: className, calendarClassName: classNames('d-month-picker', calendarClassName), onChange: onChangeDate }, locale && { locale }, { customInput: (jsxRuntime.jsx("p", { className: "fw-bold text-capitalize", children: dateFormatted })), renderCustomHeader: ({ monthDate, decreaseYear, increaseYear, prevYearButtonDisabled, nextYearButtonDisabled, }) => (jsxRuntime.jsxs("div", { className: "d-flex align-items-center justify-content-between gap-4 fs-6 bg-dark", children: [jsxRuntime.jsx(DButton, { iconStart: "chevron-left", size: "sm", variant: "link", theme: "light", onClick: decreaseYear, disabled: prevYearButtonDisabled, ariaLabel: headerPrevYearAriaLabel }), jsxRuntime.jsx("p", { className: "fs-6 fw-bold", children: monthDate.getFullYear() }), jsxRuntime.jsx(DButton, { iconStart: "chevron-right", size: "sm", variant: "link", theme: "light", onClick: increaseYear, disabled: nextYearButtonDisabled, ariaLabel: headerNextYearAriaLabel })] })) }, props)));
521
544
  }
522
545
 
523
546
  function DDatePickerHeader({ monthDate, changeMonth, changeYear, decreaseMonth, increaseMonth, prevMonthButtonDisabled, nextMonthButtonDisabled, withMonthSelector, prevMonthIcon, nextMonthIcon, prevMonthAriaLabel = 'decrease month', nextMonthAriaLabel = 'increase month', iconSize, buttonVariant, buttonTheme, locale, style, className, }) {
@@ -527,7 +550,7 @@ function DDatePickerHeader({ monthDate, changeMonth, changeYear, decreaseMonth,
527
550
  changeYear(dateFns.getYear(value));
528
551
  }
529
552
  }, [changeMonth, changeYear]);
530
- return (jsxRuntime.jsxs("div", { className: classNames('d-flex align-items-center justify-content-between d-datepicker-header', className), style: style, children: [jsxRuntime.jsx(DButton, { iconStart: prevMonthIcon, size: iconSize, variant: buttonVariant, theme: buttonTheme, onClick: decreaseMonth, disabled: prevMonthButtonDisabled, ariaLabel: prevMonthAriaLabel }), jsxRuntime.jsx(DMonthPicker, Object.assign({}, !withMonthSelector && { readOnly: true }, { date: monthDate.toISOString(), onChangeDate: onChangeDate }, locale && { locale })), jsxRuntime.jsx(DButton, { iconStart: nextMonthIcon, size: iconSize, variant: buttonVariant, theme: buttonTheme, onClick: increaseMonth, disabled: nextMonthButtonDisabled, ariaLabel: nextMonthAriaLabel })] }));
553
+ return (jsxRuntime.jsxs("div", { className: classNames('d-flex align-items-center justify-content-between d-datepicker-header', className), style: style, children: [jsxRuntime.jsx(DButton, { iconStart: prevMonthIcon, size: iconSize, variant: buttonVariant, theme: buttonTheme, onClick: decreaseMonth, disabled: prevMonthButtonDisabled, ariaLabel: prevMonthAriaLabel }), jsxRuntime.jsx(DMonthPicker, Object.assign({}, !withMonthSelector && { readOnly: true }, withMonthSelector && { className: 'cursor-pointer' }, { date: monthDate.toISOString(), onChangeDate: onChangeDate }, locale && { locale })), jsxRuntime.jsx(DButton, { iconStart: nextMonthIcon, size: iconSize, variant: buttonVariant, theme: buttonTheme, onClick: increaseMonth, disabled: nextMonthButtonDisabled, ariaLabel: nextMonthAriaLabel })] }));
531
554
  }
532
555
 
533
556
  function DDatePicker(_a) {
@@ -579,7 +602,11 @@ function DInputCounter(_a, ref) {
579
602
  React.useEffect(() => {
580
603
  setInternalIsInvalid(!(internalValue >= minValue && internalValue <= maxValue));
581
604
  }, [internalValue, minValue, maxValue]);
582
- return (jsxRuntime.jsx(DInput$1, Object.assign({ ref: inputRef, value: valueString, style: generateStyleVariables, iconStart: iconStart, iconEnd: iconEnd, invalid: internalIsInvalid || invalid, type: "number", onChange: handleOnChange, onIconStartClick: handleOnIconStartClick, onIconEndClick: handleOnIconEndClick, iconStartAriaLabel: iconStartAriaLabel, iconEndAriaLabel: iconEndAriaLabel }, props)));
605
+ return (jsxRuntime.jsx(DInput$1, Object.assign({ ref: inputRef, value: valueString, style: generateStyleVariables, iconStart: iconStart, iconEnd: iconEnd, invalid: internalIsInvalid || invalid, type: "number", onChange: handleOnChange, onIconStartClick: handleOnIconStartClick, onIconEndClick: handleOnIconEndClick, iconStartAriaLabel: iconStartAriaLabel, iconEndAriaLabel: iconEndAriaLabel }, internalValue === minValue && {
606
+ iconStartDisabled: true,
607
+ }, internalValue === maxValue && {
608
+ iconEndDisabled: true,
609
+ }, props)));
583
610
  }
584
611
  const ForwardedDInputCounter = React.forwardRef(DInputCounter);
585
612
  ForwardedDInputCounter.displayName = 'DInputCounter';
@@ -654,7 +681,7 @@ function useInputCurrency(currencyOptions, value, onFocus, onChange, onBlur, ref
654
681
  }
655
682
 
656
683
  function DInputCurrencyBase(_a, ref) {
657
- var { value, minValue, maxValue, currencyOptions, currencyCode, invalid, onFocus, onBlur, onChange } = _a, inputProps = tslib.__rest(_a, ["value", "minValue", "maxValue", "currencyOptions", "currencyCode", "invalid", "onFocus", "onBlur", "onChange"]);
684
+ var { value, minValue, maxValue, currencyOptions, currencyCode, onFocus, onBlur, onChange } = _a, inputProps = tslib.__rest(_a, ["value", "minValue", "maxValue", "currencyOptions", "currencyCode", "onFocus", "onBlur", "onChange"]);
658
685
  const { inputRef, innerValue, innerType, handleOnFocus, handleOnChange, handleOnBlur, handleOnWheel, generateStyleVariables, generateSymbolStyleVariables, } = useInputCurrency(currencyOptions, value, onFocus, onChange, onBlur, ref);
659
686
  return (jsxRuntime.jsx(DInput$1, Object.assign({ ref: inputRef, value: innerValue, onChange: handleOnChange, style: generateStyleVariables, inputMode: "decimal", pattern: "^[0-9]", type: innerType, onFocus: handleOnFocus, onBlur: handleOnBlur, onWheel: handleOnWheel, inputStart: (jsxRuntime.jsx("span", { slot: "input-start", style: generateSymbolStyleVariables, children: currencyCode || currencyOptions.symbol })) }, inputProps)));
660
687
  }
@@ -663,7 +690,7 @@ ForwardedDInputCurrencyBase$1.displayName = 'DInputCurrencyBase';
663
690
  var DInputCurrencyBase$1 = ForwardedDInputCurrencyBase$1;
664
691
 
665
692
  function DInputCurrency(_a, ref) {
666
- var { value, minValue, maxValue, currencyCode, invalid, onFocus, onBlur, onChange } = _a, props = tslib.__rest(_a, ["value", "minValue", "maxValue", "currencyCode", "invalid", "onFocus", "onBlur", "onChange"]);
693
+ var { value, minValue, maxValue, currencyCode, onFocus, onBlur, onChange } = _a, props = tslib.__rest(_a, ["value", "minValue", "maxValue", "currencyCode", "onFocus", "onBlur", "onChange"]);
667
694
  const { currency: currencyOptions } = useDContext();
668
695
  const { inputRef, innerValue, innerType, handleOnFocus, handleOnChange, handleOnBlur, handleOnWheel, generateStyleVariables, generateSymbolStyleVariables, } = useInputCurrency(currencyOptions, value, onFocus, onChange, onBlur, ref);
669
696
  return (jsxRuntime.jsx(DInput$1, Object.assign({ ref: inputRef, value: innerValue, onChange: handleOnChange, style: generateStyleVariables, inputMode: "decimal", pattern: "^[0-9]", type: innerType, onFocus: handleOnFocus, onBlur: handleOnBlur, onWheel: handleOnWheel, inputStart: (jsxRuntime.jsx("span", { slot: "input-start", style: generateSymbolStyleVariables, children: currencyCode || currencyOptions.symbol })) }, props)));
@@ -876,25 +903,6 @@ var DList$1 = Object.assign(DList, {
876
903
  Item: DListItem,
877
904
  });
878
905
 
879
- function DListItemMovement(_a) {
880
- var { description, date, amount, className, style } = _a, props = tslib.__rest(_a, ["description", "date", "amount", "className", "style"]);
881
- const { format } = useFormatCurrency();
882
- const value = React.useMemo(() => {
883
- const valueFormatted = format(amount);
884
- if (amount > 0) {
885
- return {
886
- theme: 'text-success',
887
- valueFormatted,
888
- };
889
- }
890
- return {
891
- theme: 'text-danger',
892
- valueFormatted,
893
- };
894
- }, [format, amount]);
895
- return (jsxRuntime.jsx(DListItem, Object.assign({}, props, { children: jsxRuntime.jsxs("div", { className: classNames('d-flex justify-content-between align-items-center p-3 gap-3', className), style: style, children: [jsxRuntime.jsxs("div", { className: "d-flex flex-column gap-1", children: [jsxRuntime.jsx("span", { className: "fs-6", children: description }), jsxRuntime.jsx("span", { className: "small text-gray-700", children: date })] }), jsxRuntime.jsx("span", { className: classNames('fs-6', value.theme), children: value.valueFormatted })] }) })));
896
- }
897
-
898
906
  function DModalHeader({ showCloseButton, onClose, children, className, style, }) {
899
907
  return (jsxRuntime.jsxs("div", { className: classNames('modal-header', className), style: style, children: [jsxRuntime.jsx("div", { className: "d-modal-slot", children: children }), showCloseButton && (jsxRuntime.jsx("button", { type: "button", className: "d-modal-close", "aria-label": "Close", onClick: onClose, children: jsxRuntime.jsx(DIcon, { icon: "x-lg" }) }))] }));
900
908
  }
@@ -1263,6 +1271,7 @@ exports.DContextProvider = DContextProvider;
1263
1271
  exports.DCurrencyText = DCurrencyText;
1264
1272
  exports.DDatePicker = DDatePicker;
1265
1273
  exports.DIcon = DIcon;
1274
+ exports.DIconBase = DIconBase;
1266
1275
  exports.DInput = DInput$1;
1267
1276
  exports.DInputCheck = DInputCheck;
1268
1277
  exports.DInputCounter = DInputCounter$1;
@@ -1276,7 +1285,6 @@ exports.DInputSelect = DInputSelect;
1276
1285
  exports.DInputSwitch = DInputSwitch;
1277
1286
  exports.DList = DList$1;
1278
1287
  exports.DListItem = DListItem;
1279
- exports.DListItemMovement = DListItemMovement;
1280
1288
  exports.DModal = DModal$1;
1281
1289
  exports.DModalBody = DModalBody;
1282
1290
  exports.DModalContext = DModalContext;