@dynamic-framework/ui-react 1.29.0 → 1.30.1
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.
- package/dist/css/dynamic-ui-non-root.css +67 -57
- package/dist/css/dynamic-ui-non-root.min.css +2 -2
- package/dist/css/dynamic-ui-root.css +27 -1
- package/dist/css/dynamic-ui-root.min.css +2 -2
- package/dist/css/dynamic-ui.css +93 -57
- package/dist/css/dynamic-ui.min.css +2 -2
- package/dist/index.esm.js +93 -81
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +93 -80
- package/dist/index.js.map +1 -1
- package/dist/js/cjs/enums.js +65 -0
- package/dist/js/cjs/popper-base.js +939 -0
- package/dist/js/cjs/popper-lite.js +1260 -0
- package/dist/js/cjs/popper.js +1819 -0
- package/dist/js/esm/createPopper.js +199 -0
- package/dist/js/esm/dom-utils/contains.js +23 -0
- package/dist/js/esm/dom-utils/getBoundingClientRect.js +41 -0
- package/dist/js/esm/dom-utils/getClippingRect.js +70 -0
- package/dist/js/esm/dom-utils/getCompositeRect.js +58 -0
- package/dist/js/esm/dom-utils/getComputedStyle.js +4 -0
- package/dist/js/esm/dom-utils/getDocumentElement.js +6 -0
- package/dist/js/esm/dom-utils/getDocumentRect.js +29 -0
- package/dist/js/esm/dom-utils/getHTMLElementScroll.js +6 -0
- package/dist/js/esm/dom-utils/getLayoutRect.js +25 -0
- package/dist/js/esm/dom-utils/getNodeName.js +3 -0
- package/dist/js/esm/dom-utils/getNodeScroll.js +11 -0
- package/dist/js/esm/dom-utils/getOffsetParent.js +69 -0
- package/dist/js/esm/dom-utils/getParentNode.js +19 -0
- package/dist/js/esm/dom-utils/getScrollParent.js +16 -0
- package/dist/js/esm/dom-utils/getViewportRect.js +31 -0
- package/dist/js/esm/dom-utils/getWindow.js +12 -0
- package/dist/js/esm/dom-utils/getWindowScroll.js +10 -0
- package/dist/js/esm/dom-utils/getWindowScrollBarX.js +13 -0
- package/dist/js/esm/dom-utils/instanceOf.js +23 -0
- package/dist/js/esm/dom-utils/isLayoutViewport.js +4 -0
- package/dist/js/esm/dom-utils/isScrollParent.js +10 -0
- package/dist/js/esm/dom-utils/isTableElement.js +4 -0
- package/dist/js/esm/dom-utils/listScrollParents.js +26 -0
- package/dist/js/esm/enums.js +31 -0
- package/dist/js/esm/index.js +8 -0
- package/dist/js/esm/modifiers/applyStyles.js +84 -0
- package/dist/js/esm/modifiers/arrow.js +90 -0
- package/dist/js/esm/modifiers/computeStyles.js +169 -0
- package/dist/js/esm/modifiers/eventListeners.js +49 -0
- package/dist/js/esm/modifiers/flip.js +147 -0
- package/dist/js/esm/modifiers/hide.js +61 -0
- package/dist/js/esm/modifiers/index.js +9 -0
- package/dist/js/esm/modifiers/offset.js +54 -0
- package/dist/js/esm/modifiers/popperOffsets.js +25 -0
- package/dist/js/esm/modifiers/preventOverflow.js +142 -0
- package/dist/js/esm/popper-base.js +3 -0
- package/dist/js/esm/popper-lite.js +11 -0
- package/dist/js/esm/popper.js +20 -0
- package/dist/js/esm/types.js +0 -0
- package/dist/js/esm/utils/computeAutoPlacement.js +43 -0
- package/dist/js/esm/utils/computeOffsets.js +70 -0
- package/dist/js/esm/utils/debounce.js +15 -0
- package/dist/js/esm/utils/detectOverflow.js +65 -0
- package/dist/js/esm/utils/expandToHashMap.js +6 -0
- package/dist/js/esm/utils/getAltAxis.js +3 -0
- package/dist/js/esm/utils/getAltLen.js +3 -0
- package/dist/js/esm/utils/getBasePlacement.js +4 -0
- package/dist/js/esm/utils/getFreshSideObject.js +8 -0
- package/dist/js/esm/utils/getMainAxisFromPlacement.js +3 -0
- package/dist/js/esm/utils/getOppositePlacement.js +11 -0
- package/dist/js/esm/utils/getOppositeVariationPlacement.js +9 -0
- package/dist/js/esm/utils/getVariation.js +3 -0
- package/dist/js/esm/utils/math.js +3 -0
- package/dist/js/esm/utils/mergeByName.js +14 -0
- package/dist/js/esm/utils/mergePaddingObject.js +4 -0
- package/dist/js/esm/utils/orderModifiers.js +44 -0
- package/dist/js/esm/utils/rectToClientRect.js +8 -0
- package/dist/js/esm/utils/uniqueBy.js +11 -0
- package/dist/js/esm/utils/userAgent.js +11 -0
- package/dist/js/esm/utils/within.js +8 -0
- package/dist/js/umd/enums.js +71 -0
- package/dist/js/umd/enums.min.js +6 -0
- package/dist/js/umd/popper-base.js +945 -0
- package/dist/js/umd/popper-base.min.js +6 -0
- package/dist/js/umd/popper-lite.js +1266 -0
- package/dist/js/umd/popper-lite.min.js +6 -0
- package/dist/js/umd/popper.js +1825 -0
- package/dist/js/umd/popper.min.js +6 -0
- package/dist/types/components/DAlert/DAlert.d.ts +1 -1
- package/dist/types/components/DAvatar/DAvatar.d.ts +1 -1
- package/dist/types/components/DBadge/DBadge.d.ts +1 -1
- package/dist/types/components/DBoxFile/DBoxFile.d.ts +1 -1
- package/dist/types/components/DButton/DButton.d.ts +1 -1
- package/dist/types/components/DButtonIcon/DButtonIcon.d.ts +1 -1
- package/dist/types/components/DCard/DCard.d.ts +1 -1
- package/dist/types/components/DChip/DChip.d.ts +1 -1
- package/dist/types/components/DCollapse/DCollapse.d.ts +1 -1
- package/dist/types/components/DCurrencyText/DCurrencyText.d.ts +1 -1
- package/dist/types/components/DDatePicker/DDatePicker.d.ts +1 -1
- package/dist/types/components/DIconBase/DIconBase.d.ts +1 -1
- package/dist/types/components/DInputCheck/DInputCheck.d.ts +3 -3
- package/dist/types/components/DInputPin/DInputPin.d.ts +1 -1
- package/dist/types/components/DInputSelect/DInputSelect.d.ts +1 -1
- package/dist/types/components/DInputSwitch/DInputSwitch.d.ts +1 -1
- package/dist/types/components/DList/DList.d.ts +1 -1
- package/dist/types/components/DModal/DModal.d.ts +1 -1
- package/dist/types/components/DOffcanvas/DOffcanvas.d.ts +1 -1
- package/dist/types/components/DPaginator/DPaginator.d.ts +2 -0
- package/dist/types/components/DPopover/DPopover.d.ts +1 -1
- package/dist/types/components/DProgress/DProgress.d.ts +1 -1
- package/dist/types/components/DQuickActionButton/DQuickActionButton.d.ts +1 -1
- package/dist/types/components/DQuickActionCheck/DQuickActionCheck.d.ts +1 -1
- package/dist/types/components/DQuickActionSelect/DQuickActionSelect.d.ts +1 -1
- package/dist/types/components/DQuickActionSwitch/DQuickActionSwitch.d.ts +1 -1
- package/dist/types/components/DSelect/DSelect.d.ts +1 -1
- package/dist/types/components/DSkeleton/DSkeleton.d.ts +3 -0
- package/dist/types/components/DStepper/DStepper.d.ts +1 -1
- package/dist/types/components/DTabs/DTabs.d.ts +1 -1
- package/dist/types/components/DToast/DToast.d.ts +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/interface.d.ts +2 -0
- package/package.json +9 -5
- package/src/style/abstracts/variables/_+import.scss +1 -0
- package/src/style/abstracts/variables/_accordion.scss +33 -12
- package/src/style/abstracts/variables/_breadcrumb.scss +5 -0
- package/src/style/abstracts/variables/_buttons.scss +2 -0
- package/src/style/abstracts/variables/_modals.scss +6 -6
- package/src/style/abstracts/variables/_offcanvas.scss +7 -4
- package/src/style/abstracts/variables/_pagination.scss +6 -4
- package/src/style/abstracts/variables/_progress.scss +3 -3
- package/src/style/base/_alert.scss +0 -2
- package/src/style/base/_badge.scss +1 -1
- package/src/style/base/_pagination.scss +11 -1
- package/src/style/components/_d-offcanvas.scss +10 -1
- package/src/style/components/_d-stepper-desktop.scss +2 -2
- package/src/style/root/_root.scss +27 -0
package/dist/index.esm.js
CHANGED
|
@@ -19,7 +19,7 @@ import { initReactI18next } from 'react-i18next';
|
|
|
19
19
|
|
|
20
20
|
const PREFIX_BS = 'bs-';
|
|
21
21
|
|
|
22
|
-
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-', }) {
|
|
22
|
+
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-', dataAttributes, }) {
|
|
23
23
|
const colorStyle = useMemo(() => {
|
|
24
24
|
if (color) {
|
|
25
25
|
return { [`--${PREFIX_BS}icon-component-color`]: color };
|
|
@@ -58,7 +58,7 @@ function DIconBase({ icon, theme, style, className, size = '1.5rem', loading = f
|
|
|
58
58
|
familyPrefix,
|
|
59
59
|
icon,
|
|
60
60
|
]);
|
|
61
|
-
return (jsx("i", { className: classNames(generateClasses), style: generateStyleVariables, children: materialStyle && icon }));
|
|
61
|
+
return (jsx("i", Object.assign({ className: classNames(generateClasses), style: generateStyleVariables }, dataAttributes, { children: materialStyle && icon })));
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
function useDisableBodyScrollEffect(disable) {
|
|
@@ -272,39 +272,46 @@ function DIcon(_a) {
|
|
|
272
272
|
return (jsx(DIconBase, Object.assign({ familyClass: propFamilyClass || familyClass, familyPrefix: propFamilyPrefix || familyPrefix, materialStyle: propMaterialStyle || materialStyle }, props)));
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
function DAlert({ theme = 'success', icon: iconProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle = false, iconClose: iconCloseProp, iconCloseFamilyClass, iconCloseFamilyPrefix, iconCloseMaterialStyle = false, showClose, onClose, children, id, className, style, }) {
|
|
275
|
+
function DAlert({ theme = 'success', icon: iconProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle = false, iconClose: iconCloseProp, iconCloseFamilyClass, iconCloseFamilyPrefix, iconCloseMaterialStyle = false, showClose, onClose, children, id, className, style, dataAttributes, }) {
|
|
276
276
|
const { iconMap: { alert, xLg, }, } = useDContext();
|
|
277
277
|
const icon = useMemo(() => iconProp || alert[theme], [alert, iconProp, theme]);
|
|
278
278
|
const iconClose = useMemo(() => (iconCloseProp || xLg), [iconCloseProp, xLg]);
|
|
279
279
|
const generateClasses = useMemo(() => (Object.assign({ alert: true, [`alert-${theme}`]: true, 'fade show': !!showClose }, className && { [className]: true })), [theme, showClose, className]);
|
|
280
|
-
return (jsxs("div", { className: classNames(generateClasses), style: style, role: "alert", id: id, children: [icon && (jsx(DIcon, { className: "alert-icon", icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })), jsx("div", { className: "alert-text", children: children }), showClose && (jsx("button", { type: "button", className: "d-close", "aria-label": "Close", onClick: onClose, children: jsx(DIcon, { icon: iconClose, familyClass: iconCloseFamilyClass, familyPrefix: iconCloseFamilyPrefix, materialStyle: iconCloseMaterialStyle }) }))] }));
|
|
280
|
+
return (jsxs("div", Object.assign({ className: classNames(generateClasses), style: style, role: "alert", id: id }, dataAttributes, { children: [icon && (jsx(DIcon, { className: "alert-icon", icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })), jsx("div", { className: "alert-text", children: children }), showClose && (jsx("button", { type: "button", className: "d-close", "aria-label": "Close", onClick: onClose, children: jsx(DIcon, { icon: iconClose, familyClass: iconCloseFamilyClass, familyPrefix: iconCloseFamilyPrefix, materialStyle: iconCloseMaterialStyle }) }))] })));
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
function
|
|
283
|
+
function DAvatar({ id, size, image, title, className, style, dataAttributes, }) {
|
|
284
|
+
return (jsxs("div", Object.assign({ className: classNames({
|
|
285
|
+
avatar: true,
|
|
286
|
+
[`avatar-${size}`]: !!size,
|
|
287
|
+
}, className), style: style, id: id }, dataAttributes, { children: [image && jsx("img", { src: image, alt: "avatar", className: "avatar-img" }), title && jsx("span", { className: "avatar-title", children: title })] })));
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
function DBadge({ text, soft = false, theme = 'primary', id, rounded, className, style, iconStart, iconEnd, iconMaterialStyle, iconFamilyClass, iconFamilyPrefix, dataAttributes, }) {
|
|
284
291
|
const generateClasses = useMemo(() => ({
|
|
285
292
|
badge: true,
|
|
286
293
|
[`badge-${theme}`]: !!theme && !soft,
|
|
287
294
|
[`badge-soft-${theme}`]: !!theme && soft,
|
|
288
295
|
'rounded-pill': !!rounded,
|
|
289
296
|
}), [rounded, soft, theme]);
|
|
290
|
-
return (jsxs("span", Object.assign({ className: classNames(generateClasses, className), style: style }, id && { id }, { children: [iconStart && (jsx(DIcon, { icon: iconStart, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })), jsx("span", { children: text }), iconEnd && (jsx(DIcon, { icon: iconEnd, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle }))] })));
|
|
297
|
+
return (jsxs("span", Object.assign({ className: classNames(generateClasses, className), style: style }, id && { id }, dataAttributes, { children: [iconStart && (jsx(DIcon, { icon: iconStart, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })), jsx("span", { children: text }), iconEnd && (jsx(DIcon, { icon: iconEnd, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle }))] })));
|
|
291
298
|
}
|
|
292
299
|
|
|
293
300
|
function DBoxFile(_a) {
|
|
294
|
-
var { icon: iconProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, disabled = false, children, className, style } = _a, dropzoneOptions = __rest(_a, ["icon", "iconFamilyClass", "iconFamilyPrefix", "iconMaterialStyle", "disabled", "children", "className", "style"]);
|
|
301
|
+
var { icon: iconProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, disabled = false, children, className, style, dataAttributes } = _a, dropzoneOptions = __rest(_a, ["icon", "iconFamilyClass", "iconFamilyPrefix", "iconMaterialStyle", "disabled", "children", "className", "style", "dataAttributes"]);
|
|
295
302
|
const { acceptedFiles, getRootProps, getInputProps, } = useDropzone(Object.assign({ disabled }, dropzoneOptions));
|
|
296
303
|
const { iconMap: { upload, }, } = useDContext();
|
|
297
304
|
const icon = useMemo(() => iconProp || upload, [iconProp, upload]);
|
|
298
|
-
return (jsxs("section", { className: classNames('d-box-file', {
|
|
305
|
+
return (jsxs("section", Object.assign({ className: classNames('d-box-file', {
|
|
299
306
|
'd-box-file-selected': !!acceptedFiles.length,
|
|
300
|
-
}, className), style: style, children: [jsxs("div", Object.assign({}, getRootProps({
|
|
307
|
+
}, className), style: style }, dataAttributes, { children: [jsxs("div", Object.assign({}, getRootProps({
|
|
301
308
|
className: classNames('d-box-file-dropzone', {
|
|
302
309
|
disabled,
|
|
303
310
|
}),
|
|
304
|
-
}), { children: [jsx("input", Object.assign({}, getInputProps())), jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle }), jsx("div", { className: "d-box-content", children: children })] })), !!acceptedFiles.length && (jsx("aside", { className: "d-box-files", children: acceptedFiles.map((file) => (jsx("div", { className: "d-box-files-text", children: `${file.name} - ${file.size} bytes` }, file.name))) }))] }));
|
|
311
|
+
}), { children: [jsx("input", Object.assign({}, getInputProps())), jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle }), jsx("div", { className: "d-box-content", children: children })] })), !!acceptedFiles.length && (jsx("aside", { className: "d-box-files", children: acceptedFiles.map((file) => (jsx("div", { className: "d-box-files-text", children: `${file.name} - ${file.size} bytes` }, file.name))) }))] })));
|
|
305
312
|
}
|
|
306
313
|
|
|
307
|
-
function DButton({ theme = 'primary', size, variant, state, text = '', ariaLabel, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartMaterialStyle, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndMaterialStyle, value, type = 'button', loading = false, loadingAriaLabel, disabled = false, stopPropagationEnabled = true, className, style, form, onClick, }) {
|
|
314
|
+
function DButton({ theme = 'primary', size, variant, state, text = '', ariaLabel, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartMaterialStyle, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndMaterialStyle, value, type = 'button', loading = false, loadingAriaLabel, disabled = false, stopPropagationEnabled = true, className, style, form, dataAttributes, onClick, }) {
|
|
308
315
|
const generateClasses = useMemo(() => {
|
|
309
316
|
const variantClass = variant
|
|
310
317
|
? `btn-${variant}-${theme}`
|
|
@@ -321,10 +328,10 @@ function DButton({ theme = 'primary', size, variant, state, text = '', ariaLabel
|
|
|
321
328
|
const newAriaLabel = useMemo(() => (loading
|
|
322
329
|
? (loadingAriaLabel || ariaLabel || text)
|
|
323
330
|
: (ariaLabel || text)), [loading, loadingAriaLabel, ariaLabel, text]);
|
|
324
|
-
return (jsxs("button", Object.assign({ className: classNames(generateClasses, className), style: style, type: type, disabled: isDisabled, onClick: clickHandler, "aria-label": newAriaLabel, form: form }, value && { value }, { children: [iconStart && (jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix, materialStyle: iconStartMaterialStyle })), (text && !loading) && (jsx("span", { children: text })), loading && (jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", children: jsx("span", { className: "visually-hidden", children: "Loading..." }) })), iconEnd && (jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix, materialStyle: iconEndMaterialStyle }))] })));
|
|
331
|
+
return (jsxs("button", Object.assign({ className: classNames(generateClasses, className), style: style, type: type, disabled: isDisabled, onClick: clickHandler, "aria-label": newAriaLabel, form: form }, dataAttributes, value && { value }, { children: [iconStart && (jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix, materialStyle: iconStartMaterialStyle })), (text && !loading) && (jsx("span", { children: text })), loading && (jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", children: jsx("span", { className: "visually-hidden", children: "Loading..." }) })), iconEnd && (jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix, materialStyle: iconEndMaterialStyle }))] })));
|
|
325
332
|
}
|
|
326
333
|
|
|
327
|
-
function DButtonIcon({ id, icon, size, className, variant, state, loadingAriaLabel, iconMaterialStyle, ariaLabel, theme = 'primary', type = 'button', loading = false, disabled = false, stopPropagationEnabled = true, style, iconFamilyClass, iconFamilyPrefix, onClick, }) {
|
|
334
|
+
function DButtonIcon({ id, icon, size, className, variant, state, loadingAriaLabel, iconMaterialStyle, ariaLabel, theme = 'primary', type = 'button', loading = false, disabled = false, stopPropagationEnabled = true, style, iconFamilyClass, iconFamilyPrefix, dataAttributes, onClick, }) {
|
|
328
335
|
const generateClasses = useMemo(() => {
|
|
329
336
|
const variantClass = variant
|
|
330
337
|
? `btn-${variant}-${theme}`
|
|
@@ -341,9 +348,9 @@ function DButtonIcon({ id, icon, size, className, variant, state, loadingAriaLab
|
|
|
341
348
|
const newAriaLabel = useMemo(() => (loading
|
|
342
349
|
? (loadingAriaLabel || ariaLabel)
|
|
343
350
|
: (ariaLabel)), [ariaLabel, loading, loadingAriaLabel]);
|
|
344
|
-
return (jsx("button", { className: classNames(generateClasses, className), style: style, type: type, disabled: isDisabled, onClick: clickHandler, "aria-label": newAriaLabel, id: id, children: loading
|
|
351
|
+
return (jsx("button", Object.assign({ className: classNames(generateClasses, className), style: style, type: type, disabled: isDisabled, onClick: clickHandler, "aria-label": newAriaLabel, id: id }, dataAttributes, { children: loading
|
|
345
352
|
? (jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", children: jsx("span", { className: "visually-hidden", children: "Loading..." }) }))
|
|
346
|
-
: (jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })) }));
|
|
353
|
+
: (jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })) })));
|
|
347
354
|
}
|
|
348
355
|
|
|
349
356
|
function DCardHeader({ className, style, children, }) {
|
|
@@ -358,8 +365,8 @@ function DCardFooter({ className, style, children, }) {
|
|
|
358
365
|
return (jsx("div", { className: classNames('card-footer', className), style: style, children: children }));
|
|
359
366
|
}
|
|
360
367
|
|
|
361
|
-
function DCard({ className, style, children, }) {
|
|
362
|
-
return (jsx("div", { style: style, className: classNames('card', className), children: children }));
|
|
368
|
+
function DCard({ className, style, children, dataAttributes, }) {
|
|
369
|
+
return (jsx("div", Object.assign({ style: style, className: classNames('card', className) }, dataAttributes, { children: children })));
|
|
363
370
|
}
|
|
364
371
|
var DCard$1 = Object.assign(DCard, {
|
|
365
372
|
Header: DCardHeader,
|
|
@@ -373,7 +380,7 @@ function DCarouselSlide(_a) {
|
|
|
373
380
|
}
|
|
374
381
|
|
|
375
382
|
function DCarousel(_a, ref) {
|
|
376
|
-
var { children, className, style, options } = _a, props = __rest(_a, ["children", "className", "style", "options"]);
|
|
383
|
+
var { children, className, style, options, dataAttributes } = _a, props = __rest(_a, ["children", "className", "style", "options", "dataAttributes"]);
|
|
377
384
|
return (jsx(Splide, Object.assign({ className: classNames('d-carousel', className), style: style, ref: ref, options: Object.assign(Object.assign({}, options), { classes: {
|
|
378
385
|
// Arrows
|
|
379
386
|
arrows: 'splide__arrows d-carousel-arrows',
|
|
@@ -383,7 +390,7 @@ function DCarousel(_a, ref) {
|
|
|
383
390
|
// Paginator
|
|
384
391
|
pagination: 'splide__pagination d-carousel-pagination',
|
|
385
392
|
page: 'splide__pagination__page d-carousel-pagination-page',
|
|
386
|
-
} }) }, props, { children: children })));
|
|
393
|
+
} }) }, dataAttributes, props, { children: children })));
|
|
387
394
|
}
|
|
388
395
|
const ForwardedDCarousel = forwardRef(DCarousel);
|
|
389
396
|
ForwardedDCarousel.displayName = 'DCarousel';
|
|
@@ -391,17 +398,17 @@ var DCarousel$1 = Object.assign(ForwardedDCarousel, {
|
|
|
391
398
|
Slide: DCarouselSlide,
|
|
392
399
|
});
|
|
393
400
|
|
|
394
|
-
function DChip({ theme = 'primary', text, icon, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, iconClose: iconCloseProp, iconCloseFamilyClass, iconCloseFamilyPrefix, iconCloseMaterialStyle, showClose = false, closeAriaLabel = 'close', className, style, onClose, }) {
|
|
401
|
+
function DChip({ theme = 'primary', text, icon, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, iconClose: iconCloseProp, iconCloseFamilyClass, iconCloseFamilyPrefix, iconCloseMaterialStyle, showClose = false, closeAriaLabel = 'close', className, style, dataAttributes, onClose, }) {
|
|
395
402
|
const generateClasses = useMemo(() => ({
|
|
396
403
|
'd-chip': true,
|
|
397
404
|
[`d-chip-${theme}`]: !!theme,
|
|
398
405
|
}), [theme]);
|
|
399
406
|
const { iconMap: { xLg, }, } = useDContext();
|
|
400
407
|
const iconClose = useMemo(() => iconCloseProp || xLg, [iconCloseProp, xLg]);
|
|
401
|
-
return (jsxs("span", { className: classNames(generateClasses, className), style: style, children: [icon && (jsx("div", { className: "d-chip-icon-container", children: jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle }) })), jsx("span", { children: text }), showClose && (jsx("button", { type: "button", className: "d-chip-icon-container", onClick: onClose, "aria-label": closeAriaLabel, children: jsx(DIcon, { icon: iconClose, familyClass: iconCloseFamilyClass, familyPrefix: iconCloseFamilyPrefix, materialStyle: iconCloseMaterialStyle }) }))] }));
|
|
408
|
+
return (jsxs("span", Object.assign({ className: classNames(generateClasses, className), style: style }, dataAttributes, { children: [icon && (jsx("div", { className: "d-chip-icon-container", children: jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle }) })), jsx("span", { children: text }), showClose && (jsx("button", { type: "button", className: "d-chip-icon-container", onClick: onClose, "aria-label": closeAriaLabel, children: jsx(DIcon, { icon: iconClose, familyClass: iconCloseFamilyClass, familyPrefix: iconCloseFamilyPrefix, materialStyle: iconCloseMaterialStyle }) }))] })));
|
|
402
409
|
}
|
|
403
410
|
|
|
404
|
-
function DCollapse({ id, className, style, Component, hasSeparator = false, defaultCollapsed = false, onChange, children, iconOpen: iconOpenProp, iconClose: iconCloseProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle = false, }) {
|
|
411
|
+
function DCollapse({ id, className, style, Component, hasSeparator = false, defaultCollapsed = false, onChange, children, iconOpen: iconOpenProp, iconClose: iconCloseProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle = false, dataAttributes, }) {
|
|
405
412
|
const [toggle, setToggle] = useState(defaultCollapsed);
|
|
406
413
|
const onChangeCollapse = () => setToggle((prev) => !prev);
|
|
407
414
|
const { iconMap: { chevronDown, chevronUp, }, } = useDContext();
|
|
@@ -418,9 +425,9 @@ function DCollapse({ id, className, style, Component, hasSeparator = false, defa
|
|
|
418
425
|
const generateStyles = useMemo(() => ({
|
|
419
426
|
[`--${PREFIX_BS}collapse-separator-display`]: hasSeparator ? 'block' : 'none',
|
|
420
427
|
}), [hasSeparator]);
|
|
421
|
-
return (jsxs("div", { id: id, className: classNames('collapse-container', className), style: style, children: [jsxs("button", { className: "collapse-button", type: "button", onClick: onChangeCollapse, children: [jsx("div", { className: "flex-grow-1", children: Component }), jsx(DIcon, { color: `var(--${PREFIX_BS}gray)`, size: `var(--${PREFIX_BS}fs-small)`, icon: toggle ? iconOpen : iconClose, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })] }), toggle && (jsx("div", { className: classNames({
|
|
428
|
+
return (jsxs("div", Object.assign({ id: id, className: classNames('collapse-container', className), style: style }, dataAttributes, { children: [jsxs("button", { className: "collapse-button", type: "button", onClick: onChangeCollapse, children: [jsx("div", { className: "flex-grow-1", children: Component }), jsx(DIcon, { color: `var(--${PREFIX_BS}gray)`, size: `var(--${PREFIX_BS}fs-small)`, icon: toggle ? iconOpen : iconClose, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })] }), toggle && (jsx("div", { className: classNames({
|
|
422
429
|
'collapse-body': true,
|
|
423
|
-
}), style: generateStyles, children: children }))] }));
|
|
430
|
+
}), style: generateStyles, children: children }))] })));
|
|
424
431
|
}
|
|
425
432
|
|
|
426
433
|
function formatCurrency(amount, options) {
|
|
@@ -437,9 +444,9 @@ function useFormatCurrency(...args) {
|
|
|
437
444
|
};
|
|
438
445
|
}
|
|
439
446
|
|
|
440
|
-
function DCurrencyText({ value, className, style, }) {
|
|
447
|
+
function DCurrencyText({ value, className, style, dataAttributes, }) {
|
|
441
448
|
const { values: [valueFormatted] } = useFormatCurrency(value);
|
|
442
|
-
return (jsx("span", { className: className, style: style, children: valueFormatted }));
|
|
449
|
+
return (jsx("span", Object.assign({ className: className, style: style }, dataAttributes, { children: valueFormatted })));
|
|
443
450
|
}
|
|
444
451
|
|
|
445
452
|
/* eslint-disable */
|
|
@@ -463,7 +470,7 @@ function useProvidedRefOrCreate(providedRef) {
|
|
|
463
470
|
}
|
|
464
471
|
|
|
465
472
|
function DInput(_a, ref) {
|
|
466
|
-
var { id: idProp, style, className, label = '', labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, labelIconMaterialStyle, disabled = false, loading = false, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, iconStart, iconStartDisabled, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconStartTabIndex, iconStartMaterialStyle, iconEnd, iconEndDisabled, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconEndTabIndex, iconEndMaterialStyle, invalidIcon: invalidIconProp, validIcon: validIconProp, hint, size, invalid = false, valid = false, floatingLabel = false, inputStart, inputEnd, value, placeholder = '', onChange, onIconStartClick, onIconEndClick } = _a, inputProps = __rest(_a, ["id", "style", "className", "label", "labelIcon", "labelIconFamilyClass", "labelIconFamilyPrefix", "labelIconMaterialStyle", "disabled", "loading", "iconFamilyClass", "iconFamilyPrefix", "iconMaterialStyle", "iconStart", "iconStartDisabled", "iconStartFamilyClass", "iconStartFamilyPrefix", "iconStartAriaLabel", "iconStartTabIndex", "iconStartMaterialStyle", "iconEnd", "iconEndDisabled", "iconEndFamilyClass", "iconEndFamilyPrefix", "iconEndAriaLabel", "iconEndTabIndex", "iconEndMaterialStyle", "invalidIcon", "validIcon", "hint", "size", "invalid", "valid", "floatingLabel", "inputStart", "inputEnd", "value", "placeholder", "onChange", "onIconStartClick", "onIconEndClick"]);
|
|
473
|
+
var { id: idProp, style, className, label = '', labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, labelIconMaterialStyle, disabled = false, loading = false, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, iconStart, iconStartDisabled, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconStartTabIndex, iconStartMaterialStyle, iconEnd, iconEndDisabled, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconEndTabIndex, iconEndMaterialStyle, invalidIcon: invalidIconProp, validIcon: validIconProp, hint, size, invalid = false, valid = false, floatingLabel = false, inputStart, inputEnd, value, placeholder = '', dataAttributes, onChange, onIconStartClick, onIconEndClick } = _a, inputProps = __rest(_a, ["id", "style", "className", "label", "labelIcon", "labelIconFamilyClass", "labelIconFamilyPrefix", "labelIconMaterialStyle", "disabled", "loading", "iconFamilyClass", "iconFamilyPrefix", "iconMaterialStyle", "iconStart", "iconStartDisabled", "iconStartFamilyClass", "iconStartFamilyPrefix", "iconStartAriaLabel", "iconStartTabIndex", "iconStartMaterialStyle", "iconEnd", "iconEndDisabled", "iconEndFamilyClass", "iconEndFamilyPrefix", "iconEndAriaLabel", "iconEndTabIndex", "iconEndMaterialStyle", "invalidIcon", "validIcon", "hint", "size", "invalid", "valid", "floatingLabel", "inputStart", "inputEnd", "value", "placeholder", "dataAttributes", "onChange", "onIconStartClick", "onIconEndClick"]);
|
|
467
474
|
const inputRef = useProvidedRefOrCreate(ref);
|
|
468
475
|
const innerId = useId();
|
|
469
476
|
const id = useMemo(() => idProp || innerId, [idProp, innerId]);
|
|
@@ -533,10 +540,10 @@ function DInput(_a, ref) {
|
|
|
533
540
|
const { iconMap: { input } } = useDContext();
|
|
534
541
|
const invalidIcon = useMemo(() => invalidIconProp || input.invalid, [input.invalid, invalidIconProp]);
|
|
535
542
|
const validIcon = useMemo(() => validIconProp || input.valid, [input.valid, validIconProp]);
|
|
536
|
-
return (jsxs("div", { className: className, style: style, children: [label && !floatingLabel && labelComponent, jsxs("div", { className: classNames({
|
|
543
|
+
return (jsxs("div", Object.assign({ className: className, style: style }, dataAttributes, { children: [label && !floatingLabel && labelComponent, jsxs("div", { className: classNames({
|
|
537
544
|
'input-group': true,
|
|
538
545
|
'has-validation': invalid || valid,
|
|
539
|
-
}), children: [!!inputStart && (jsx("div", { className: "input-group-text", id: `${id}InputStart`, children: inputStart })), iconStart && (jsx("button", { type: "button", className: "input-group-text", id: `${id}Start`, onClick: handleOnIconStartClick, disabled: disabled || loading || iconStartDisabled, "aria-label": iconStartAriaLabel, tabIndex: onIconStartClick ? iconStartTabIndex : -1, children: jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix, materialStyle: iconStartMaterialStyle }) })), dynamicComponent, ((invalid || valid) && !iconEnd && !loading) && (jsx("span", { className: "input-group-text", id: `${id}State`, children: jsx(DIcon, { className: "input-group-validation-icon", icon: invalid ? invalidIcon : validIcon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle }) })), (iconEnd && !loading) && (jsx("button", { type: "button", className: "input-group-text", id: `${id}End`, onClick: handleOnIconEndClick, disabled: disabled || loading || iconEndDisabled, "aria-label": iconEndAriaLabel, tabIndex: onIconEndClick ? iconEndTabIndex : -1, children: jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix, materialStyle: iconEndMaterialStyle }) })), loading && (jsx("div", { className: "input-group-text", id: `${id}Loading`, children: jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", children: jsx("span", { className: "visually-hidden", children: "Loading..." }) }) })), !!inputEnd && (jsx("div", { className: "input-group-text", id: `${id}InputEnd`, children: inputEnd }))] }), hint && (jsx("div", { className: "form-text", id: `${id}Hint`, children: hint }))] }));
|
|
546
|
+
}), children: [!!inputStart && (jsx("div", { className: "input-group-text", id: `${id}InputStart`, children: inputStart })), iconStart && (jsx("button", { type: "button", className: "input-group-text", id: `${id}Start`, onClick: handleOnIconStartClick, disabled: disabled || loading || iconStartDisabled, "aria-label": iconStartAriaLabel, tabIndex: onIconStartClick ? iconStartTabIndex : -1, children: jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix, materialStyle: iconStartMaterialStyle }) })), dynamicComponent, ((invalid || valid) && !iconEnd && !loading) && (jsx("span", { className: "input-group-text", id: `${id}State`, children: jsx(DIcon, { className: "input-group-validation-icon", icon: invalid ? invalidIcon : validIcon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle }) })), (iconEnd && !loading) && (jsx("button", { type: "button", className: "input-group-text", id: `${id}End`, onClick: handleOnIconEndClick, disabled: disabled || loading || iconEndDisabled, "aria-label": iconEndAriaLabel, tabIndex: onIconEndClick ? iconEndTabIndex : -1, children: jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix, materialStyle: iconEndMaterialStyle }) })), loading && (jsx("div", { className: "input-group-text", id: `${id}Loading`, children: jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", children: jsx("span", { className: "visually-hidden", children: "Loading..." }) }) })), !!inputEnd && (jsx("div", { className: "input-group-text", id: `${id}InputEnd`, children: inputEnd }))] }), hint && (jsx("div", { className: "form-text", id: `${id}Hint`, children: hint }))] })));
|
|
540
547
|
}
|
|
541
548
|
const ForwardedDInput = forwardRef(DInput);
|
|
542
549
|
ForwardedDInput.displayName = 'DInput';
|
|
@@ -557,7 +564,8 @@ const ForwardedDDatePickerInput = forwardRef(DDatePickerInput);
|
|
|
557
564
|
ForwardedDDatePickerInput.displayName = 'DDatePickerInput';
|
|
558
565
|
var DDatePickerInput$1 = ForwardedDDatePickerInput;
|
|
559
566
|
|
|
560
|
-
function DInputCheck(
|
|
567
|
+
function DInputCheck(_a) {
|
|
568
|
+
var { id: idProp, type, name, label, ariaLabel, checked = false, disabled = false, invalid = false, valid = false, indeterminate, value, onChange, className, style, dataAttributes } = _a, props = __rest(_a, ["id", "type", "name", "label", "ariaLabel", "checked", "disabled", "invalid", "valid", "indeterminate", "value", "onChange", "className", "style", "dataAttributes"]);
|
|
561
569
|
const innerRef = useRef(null);
|
|
562
570
|
const innerId = useId();
|
|
563
571
|
const id = useMemo(() => idProp || innerId, [idProp, innerId]);
|
|
@@ -574,14 +582,15 @@ function DInputCheck({ id: idProp, type, name, label, ariaLabel, checked = false
|
|
|
574
582
|
innerRef.current.checked = checked;
|
|
575
583
|
}
|
|
576
584
|
}, [checked]);
|
|
577
|
-
const inputComponent = useMemo(() => (jsx("input", { ref: innerRef, onChange: handleChange, className: classNames('form-check-input', {
|
|
585
|
+
const inputComponent = useMemo(() => (jsx("input", Object.assign({ ref: innerRef, onChange: handleChange, className: classNames('form-check-input', {
|
|
578
586
|
'is-invalid': invalid,
|
|
579
587
|
'is-valid': valid,
|
|
580
|
-
}, className), style: style, id: id, disabled: disabled, type: type, name: name, value: value, "aria-label": ariaLabel })), [
|
|
588
|
+
}, className), style: style, id: id, disabled: disabled, type: type, name: name, value: value, "aria-label": ariaLabel }, props))), [
|
|
581
589
|
ariaLabel,
|
|
582
590
|
className,
|
|
583
591
|
disabled,
|
|
584
592
|
valid,
|
|
593
|
+
props,
|
|
585
594
|
invalid,
|
|
586
595
|
handleChange,
|
|
587
596
|
id,
|
|
@@ -593,7 +602,7 @@ function DInputCheck({ id: idProp, type, name, label, ariaLabel, checked = false
|
|
|
593
602
|
if (!label) {
|
|
594
603
|
return inputComponent;
|
|
595
604
|
}
|
|
596
|
-
return (jsxs("div", { className: "form-check", children: [inputComponent, jsx("label", { className: "form-check-label", htmlFor: id, children: label })] }));
|
|
605
|
+
return (jsxs("div", Object.assign({ className: "form-check" }, dataAttributes, { children: [inputComponent, jsx("label", { className: "form-check-label", htmlFor: id, children: label })] })));
|
|
597
606
|
}
|
|
598
607
|
|
|
599
608
|
function DSelectOptionCheck(_a) {
|
|
@@ -665,7 +674,7 @@ function DSelectSingleValueEmojiText(_a) {
|
|
|
665
674
|
}
|
|
666
675
|
|
|
667
676
|
function DSelect(_a) {
|
|
668
|
-
var { id, className, style, label, labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, hint, iconFamilyClass, iconFamilyPrefix, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconStartTabIndex, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconEndTabIndex, invalid, valid, invalidIcon: invalidIconProp, validIcon: validIconProp, menuWithMaxContent = false, disabled, clearable, loading, rtl, searchable, multi, components, defaultValue, onIconStartClick, onIconEndClick } = _a, props = __rest(_a, ["id", "className", "style", "label", "labelIcon", "labelIconFamilyClass", "labelIconFamilyPrefix", "hint", "iconFamilyClass", "iconFamilyPrefix", "iconStart", "iconStartFamilyClass", "iconStartFamilyPrefix", "iconStartAriaLabel", "iconStartTabIndex", "iconEnd", "iconEndFamilyClass", "iconEndFamilyPrefix", "iconEndAriaLabel", "iconEndTabIndex", "invalid", "valid", "invalidIcon", "validIcon", "menuWithMaxContent", "disabled", "clearable", "loading", "rtl", "searchable", "multi", "components", "defaultValue", "onIconStartClick", "onIconEndClick"]);
|
|
677
|
+
var { id, className, style, label, labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, hint, iconFamilyClass, iconFamilyPrefix, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconStartTabIndex, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconEndTabIndex, invalid, valid, invalidIcon: invalidIconProp, validIcon: validIconProp, menuWithMaxContent = false, disabled, clearable, loading, rtl, searchable, multi, components, defaultValue, onIconStartClick, onIconEndClick, dataAttributes } = _a, props = __rest(_a, ["id", "className", "style", "label", "labelIcon", "labelIconFamilyClass", "labelIconFamilyPrefix", "hint", "iconFamilyClass", "iconFamilyPrefix", "iconStart", "iconStartFamilyClass", "iconStartFamilyPrefix", "iconStartAriaLabel", "iconStartTabIndex", "iconEnd", "iconEndFamilyClass", "iconEndFamilyPrefix", "iconEndAriaLabel", "iconEndTabIndex", "invalid", "valid", "invalidIcon", "validIcon", "menuWithMaxContent", "disabled", "clearable", "loading", "rtl", "searchable", "multi", "components", "defaultValue", "onIconStartClick", "onIconEndClick", "dataAttributes"]);
|
|
669
678
|
const handleOnIconStartClick = useCallback(() => {
|
|
670
679
|
onIconStartClick === null || onIconStartClick === void 0 ? void 0 : onIconStartClick(defaultValue);
|
|
671
680
|
}, [onIconStartClick, defaultValue]);
|
|
@@ -675,9 +684,9 @@ function DSelect(_a) {
|
|
|
675
684
|
const { iconMap: { input } } = useDContext();
|
|
676
685
|
const invalidIcon = useMemo(() => invalidIconProp || input.invalid, [input.invalid, invalidIconProp]);
|
|
677
686
|
const validIcon = useMemo(() => validIconProp || input.valid, [input.valid, validIconProp]);
|
|
678
|
-
return (jsxs("div", { className: classNames('d-select', className, {
|
|
687
|
+
return (jsxs("div", Object.assign({ className: classNames('d-select', className, {
|
|
679
688
|
disabled: disabled || loading,
|
|
680
|
-
}), style: style, children: [label && (jsxs("label", { htmlFor: id, children: [label, labelIcon && (jsx(DIcon, { icon: labelIcon, size: `var(--${PREFIX_BS}input-label-font-size)`, familyClass: labelIconFamilyClass, familyPrefix: labelIconFamilyPrefix }))] })), jsxs("div", { className: classNames({
|
|
689
|
+
}), style: style }, dataAttributes, { children: [label && (jsxs("label", { htmlFor: id, children: [label, labelIcon && (jsx(DIcon, { icon: labelIcon, size: `var(--${PREFIX_BS}input-label-font-size)`, familyClass: labelIconFamilyClass, familyPrefix: labelIconFamilyPrefix }))] })), jsxs("div", { className: classNames({
|
|
681
690
|
'input-group': true,
|
|
682
691
|
'has-validation': invalid,
|
|
683
692
|
disabled: disabled || loading,
|
|
@@ -688,7 +697,7 @@ function DSelect(_a) {
|
|
|
688
697
|
}, className: classNames('d-select-component', {
|
|
689
698
|
'is-invalid': invalid,
|
|
690
699
|
'is-valid': valid,
|
|
691
|
-
}), classNamePrefix: "d-select", isDisabled: disabled || loading, isClearable: clearable, isLoading: loading, isRtl: rtl, isSearchable: searchable, isMulti: multi, defaultValue: defaultValue, unstyled: true, components: Object.assign({ DropdownIndicator: DSelectDropdownIndicator, ClearIndicator: DSelectClearIndicator, MultiValueRemove: DSelectMultiValueRemove, LoadingIndicator: DSelectLoadingIndicator }, components) }, props)), ((invalid || valid) && !iconEnd && !loading) && (jsx("span", { className: "input-group-text", id: `${id}State`, children: jsx(DIcon, { className: "input-group-validation-icon", icon: invalid ? invalidIcon : validIcon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix }) })), (iconEnd && !loading) && (jsx("button", { type: "button", className: "input-group-text", id: `${id}End`, onClick: handleOnIconEndClick, disabled: disabled || loading, "aria-label": iconEndAriaLabel, tabIndex: iconEndTabIndex, children: iconEnd && (jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix })) }))] }), hint && (jsx("div", { className: "form-text", id: `${id}Hint`, children: hint }))] }));
|
|
700
|
+
}), classNamePrefix: "d-select", isDisabled: disabled || loading, isClearable: clearable, isLoading: loading, isRtl: rtl, isSearchable: searchable, isMulti: multi, defaultValue: defaultValue, unstyled: true, components: Object.assign({ DropdownIndicator: DSelectDropdownIndicator, ClearIndicator: DSelectClearIndicator, MultiValueRemove: DSelectMultiValueRemove, LoadingIndicator: DSelectLoadingIndicator }, components) }, props)), ((invalid || valid) && !iconEnd && !loading) && (jsx("span", { className: "input-group-text", id: `${id}State`, children: jsx(DIcon, { className: "input-group-validation-icon", icon: invalid ? invalidIcon : validIcon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix }) })), (iconEnd && !loading) && (jsx("button", { type: "button", className: "input-group-text", id: `${id}End`, onClick: handleOnIconEndClick, disabled: disabled || loading, "aria-label": iconEndAriaLabel, tabIndex: iconEndTabIndex, children: iconEnd && (jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix })) }))] }), hint && (jsx("div", { className: "form-text", id: `${id}Hint`, children: hint }))] })));
|
|
692
701
|
}
|
|
693
702
|
var DSelect$1 = Object.assign(DSelect, {
|
|
694
703
|
OptionCheck: DSelectOptionCheck,
|
|
@@ -723,7 +732,7 @@ function DDatePickerHeader({ date, changeYear, changeMonth, decreaseMonth, incre
|
|
|
723
732
|
}
|
|
724
733
|
|
|
725
734
|
function DDatePicker(_a) {
|
|
726
|
-
var { date, selectsRange = false, inputLabel, inputHint, inputAriaLabel, inputActionAriaLabel = 'open calendar', inputId = 'input-calendar', timeId = 'input-time', timeLabel, iconInput: iconInputProp, iconHeaderPrevMonth: iconHeaderPrevMonthProp, iconHeaderNextMonth: iconHeaderNextMonthProp, iconMaterialStyle: iconMaterialStyleProp, iconFamilyClass, iconFamilyPrefix, minYearSelect = 1900, maxYearSelect = 2100, iconHeaderSize = 'sm', headerPrevMonthAriaLabel = 'decrease month', headerNextMonthAriaLabel = 'increase month', headerButtonVariant = 'link', headerButtonTheme = 'dark', invalid = false, valid = false, renderCustomHeader: renderCustomHeaderProp, validIcon, invalidIcon, locale, className, formatWeekDay: formatWeekDayProp, style } = _a, props = __rest(_a, ["date", "selectsRange", "inputLabel", "inputHint", "inputAriaLabel", "inputActionAriaLabel", "inputId", "timeId", "timeLabel", "iconInput", "iconHeaderPrevMonth", "iconHeaderNextMonth", "iconMaterialStyle", "iconFamilyClass", "iconFamilyPrefix", "minYearSelect", "maxYearSelect", "iconHeaderSize", "headerPrevMonthAriaLabel", "headerNextMonthAriaLabel", "headerButtonVariant", "headerButtonTheme", "invalid", "valid", "renderCustomHeader", "validIcon", "invalidIcon", "locale", "className", "formatWeekDay", "style"]);
|
|
735
|
+
var { date, selectsRange = false, inputLabel, inputHint, inputAriaLabel, inputActionAriaLabel = 'open calendar', inputId = 'input-calendar', timeId = 'input-time', timeLabel, iconInput: iconInputProp, iconHeaderPrevMonth: iconHeaderPrevMonthProp, iconHeaderNextMonth: iconHeaderNextMonthProp, iconMaterialStyle: iconMaterialStyleProp, iconFamilyClass, iconFamilyPrefix, minYearSelect = 1900, maxYearSelect = 2100, iconHeaderSize = 'sm', headerPrevMonthAriaLabel = 'decrease month', headerNextMonthAriaLabel = 'increase month', headerButtonVariant = 'link', headerButtonTheme = 'dark', invalid = false, valid = false, renderCustomHeader: renderCustomHeaderProp, validIcon, invalidIcon, locale, className, formatWeekDay: formatWeekDayProp, style, dataAttributes } = _a, props = __rest(_a, ["date", "selectsRange", "inputLabel", "inputHint", "inputAriaLabel", "inputActionAriaLabel", "inputId", "timeId", "timeLabel", "iconInput", "iconHeaderPrevMonth", "iconHeaderNextMonth", "iconMaterialStyle", "iconFamilyClass", "iconFamilyPrefix", "minYearSelect", "maxYearSelect", "iconHeaderSize", "headerPrevMonthAriaLabel", "headerNextMonthAriaLabel", "headerButtonVariant", "headerButtonTheme", "invalid", "valid", "renderCustomHeader", "validIcon", "invalidIcon", "locale", "className", "formatWeekDay", "style", "dataAttributes"]);
|
|
727
736
|
const { iconMap: { calendar, chevronLeft, chevronRight, }, } = useDContext();
|
|
728
737
|
const selected = useMemo(() => (date ? parseISO(date) : null), [date]);
|
|
729
738
|
const iconInput = useMemo(() => iconInputProp || calendar, [calendar, iconInputProp]);
|
|
@@ -751,7 +760,7 @@ function DDatePicker(_a) {
|
|
|
751
760
|
|| (valid && !validIcon)
|
|
752
761
|
|| (invalid && !invalidIcon)) && {
|
|
753
762
|
iconEnd: iconInput,
|
|
754
|
-
}, { inputLabel: inputLabel, className: className, style: style, invalid: invalid, valid: valid, validIcon: validIcon, invalidIcon: invalidIcon, hint: inputHint }))), customTimeInput: (jsx(DDatePickerTime, { id: timeId, label: timeLabel })) }, locale && { locale }, props)));
|
|
763
|
+
}, { inputLabel: inputLabel, className: className, style: style, invalid: invalid, valid: valid, validIcon: validIcon, invalidIcon: invalidIcon, hint: inputHint }))), customTimeInput: (jsx(DDatePickerTime, { id: timeId, label: timeLabel })) }, locale && { locale }, dataAttributes, props)));
|
|
755
764
|
}
|
|
756
765
|
|
|
757
766
|
function DInputMask(props, ref) {
|
|
@@ -920,7 +929,7 @@ const ForwardedDInputPassword = forwardRef(DInputPassword);
|
|
|
920
929
|
ForwardedDInputPassword.displayName = 'DInputPassword';
|
|
921
930
|
var DInputPassword$1 = ForwardedDInputPassword;
|
|
922
931
|
|
|
923
|
-
function DInputPin({ id: idProp, label = '', labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, placeholder, type = 'text', disabled = false, loading = false, secret = false, iconFamilyClass, iconFamilyPrefix, characters = 4, invalidIcon: invalidIconProp, validIcon: validIconProp, innerInputMode = 'text', hint, invalid = false, valid = false, className, style, onChange, }) {
|
|
932
|
+
function DInputPin({ id: idProp, label = '', labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, placeholder, type = 'text', disabled = false, loading = false, secret = false, iconFamilyClass, iconFamilyPrefix, characters = 4, invalidIcon: invalidIconProp, validIcon: validIconProp, innerInputMode = 'text', hint, invalid = false, valid = false, className, style, dataAttributes, onChange, }) {
|
|
924
933
|
const innerId = useId();
|
|
925
934
|
const id = useMemo(() => idProp || innerId, [idProp, innerId]);
|
|
926
935
|
const [pattern, setPattern] = useState('');
|
|
@@ -990,14 +999,14 @@ function DInputPin({ id: idProp, label = '', labelIcon, labelIconFamilyClass, la
|
|
|
990
999
|
const { iconMap: { input } } = useDContext();
|
|
991
1000
|
const invalidIcon = useMemo(() => invalidIconProp || input.invalid, [input.invalid, invalidIconProp]);
|
|
992
1001
|
const validIcon = useMemo(() => validIconProp || input.valid, [input.valid, validIconProp]);
|
|
993
|
-
return (jsxs("div", { className: classNames('d-input-pin', className), style: style, children: [label && (jsxs("label", { htmlFor: "pinIndex0", children: [label, labelIcon && (jsx(DIcon, { icon: labelIcon, size: `var(--${PREFIX_BS}input-label-font-size)`, familyClass: labelIconFamilyClass, familyPrefix: labelIconFamilyPrefix }))] })), jsxs("div", { className: "d-input-pin-group", id: id, children: [Array.from({ length: characters }).map((_, index) => (jsx("input", Object.assign({ className: classNames({
|
|
1002
|
+
return (jsxs("div", Object.assign({ className: classNames('d-input-pin', className), style: style }, dataAttributes, { children: [label && (jsxs("label", { htmlFor: "pinIndex0", children: [label, labelIcon && (jsx(DIcon, { icon: labelIcon, size: `var(--${PREFIX_BS}input-label-font-size)`, familyClass: labelIconFamilyClass, familyPrefix: labelIconFamilyPrefix }))] })), jsxs("div", { className: "d-input-pin-group", id: id, children: [Array.from({ length: characters }).map((_, index) => (jsx("input", Object.assign({ className: classNames({
|
|
994
1003
|
'form-control': true,
|
|
995
1004
|
'is-invalid': invalid,
|
|
996
1005
|
'is-valid': valid,
|
|
997
|
-
}), value: activeInput[index], type: secret ? 'password' : type, "aria-describedby": `${id}State`, inputMode: innerInputMode, id: `pinIndex${index}`, name: `pin-${index}`, maxLength: 1, onInput: (event) => nextInput(event, index), onKeyDown: (event) => prevInput(event, index), onFocus: () => focusInput(index), onWheel: wheelInput, onClick: (event) => event.preventDefault(), onPaste: (event) => handlePaste(event), autoComplete: "off", placeholder: placeholder, disabled: disabled || loading, required: true }, type === 'number' && ({ min: 0, max: 9 })), index))), (invalid || valid) && !loading && (jsx("span", { className: "input-group-text", id: `${id}State`, children: jsx(DIcon, { className: "input-group-validation-icon", icon: invalid ? invalidIcon : validIcon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix }) })), loading && (jsx("div", { className: "input-group-text", children: jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", children: jsx("span", { className: "visually-hidden", children: "Loading..." }) }) }))] }), hint && (jsx("div", { className: "form-text", id: `${id}Hint`, children: hint }))] }));
|
|
1006
|
+
}), value: activeInput[index], type: secret ? 'password' : type, "aria-describedby": `${id}State`, inputMode: innerInputMode, id: `pinIndex${index}`, name: `pin-${index}`, maxLength: 1, onInput: (event) => nextInput(event, index), onKeyDown: (event) => prevInput(event, index), onFocus: () => focusInput(index), onWheel: wheelInput, onClick: (event) => event.preventDefault(), onPaste: (event) => handlePaste(event), autoComplete: "off", placeholder: placeholder, disabled: disabled || loading, required: true }, type === 'number' && ({ min: 0, max: 9 })), index))), (invalid || valid) && !loading && (jsx("span", { className: "input-group-text", id: `${id}State`, children: jsx(DIcon, { className: "input-group-validation-icon", icon: invalid ? invalidIcon : validIcon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix }) })), loading && (jsx("div", { className: "input-group-text", children: jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", children: jsx("span", { className: "visually-hidden", children: "Loading..." }) }) }))] }), hint && (jsx("div", { className: "form-text", id: `${id}Hint`, children: hint }))] })));
|
|
998
1007
|
}
|
|
999
1008
|
|
|
1000
|
-
function DInputSelect({ id: idProp, name, label = '', className, style, options = [], labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, disabled = false, loading = false, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, invalidIcon: invalidIconProp, validIcon: validIconProp, hint, value, size, floatingLabel = false, invalid = false, valid = false, valueExtractor, labelExtractor, onChange, onBlur, onIconStartClick, onIconEndClick, }) {
|
|
1009
|
+
function DInputSelect({ id: idProp, name, label = '', className, style, options = [], labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, disabled = false, loading = false, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, invalidIcon: invalidIconProp, validIcon: validIconProp, hint, value, size, floatingLabel = false, invalid = false, valid = false, dataAttributes, valueExtractor, labelExtractor, onChange, onBlur, onIconStartClick, onIconEndClick, }) {
|
|
1001
1010
|
const innerId = useId();
|
|
1002
1011
|
const id = useMemo(() => idProp || innerId, [idProp, innerId]);
|
|
1003
1012
|
const internalValueExtractor = useCallback((option) => {
|
|
@@ -1081,12 +1090,12 @@ function DInputSelect({ id: idProp, name, label = '', className, style, options
|
|
|
1081
1090
|
}
|
|
1082
1091
|
return selectComponent;
|
|
1083
1092
|
}, [floatingLabel, labelComponent, selectComponent]);
|
|
1084
|
-
return (jsxs("div", { className: className, style: style, children: [label && !floatingLabel && (labelComponent), jsxs("div", { className: classNames({
|
|
1093
|
+
return (jsxs("div", Object.assign({ className: className, style: style }, dataAttributes, { children: [label && !floatingLabel && (labelComponent), jsxs("div", { className: classNames({
|
|
1085
1094
|
'input-group': true,
|
|
1086
|
-
}), children: [iconStart && (jsx("button", { type: "button", className: "input-group-text", id: `${id}Start`, onClick: iconStartClickHandler, disabled: disabled || loading, "aria-label": iconStartAriaLabel, children: iconStart && (jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix })) })), dynamicComponent, ((invalid || valid) && !iconEnd && !loading) && (jsx("span", { className: "input-group-text", id: `${id}State`, children: jsx(DIcon, { className: "input-group-validation-icon", icon: invalid ? invalidIcon : validIcon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle }) })), iconEnd && !loading && (jsx("button", { type: "button", className: "input-group-text", id: `${id}End`, onClick: iconEndClickHandler, disabled: disabled || loading, "aria-label": iconEndAriaLabel, children: iconEnd && (jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix })) })), loading && (jsx("div", { className: "input-group-text form-control-icon loading", children: jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", children: jsx("span", { className: "visually-hidden", children: "Loading..." }) }) }))] }), hint && (jsx("div", { className: "form-text", id: `${id}Hint`, children: hint }))] }));
|
|
1095
|
+
}), children: [iconStart && (jsx("button", { type: "button", className: "input-group-text", id: `${id}Start`, onClick: iconStartClickHandler, disabled: disabled || loading, "aria-label": iconStartAriaLabel, children: iconStart && (jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix })) })), dynamicComponent, ((invalid || valid) && !iconEnd && !loading) && (jsx("span", { className: "input-group-text", id: `${id}State`, children: jsx(DIcon, { className: "input-group-validation-icon", icon: invalid ? invalidIcon : validIcon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle }) })), iconEnd && !loading && (jsx("button", { type: "button", className: "input-group-text", id: `${id}End`, onClick: iconEndClickHandler, disabled: disabled || loading, "aria-label": iconEndAriaLabel, children: iconEnd && (jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix })) })), loading && (jsx("div", { className: "input-group-text form-control-icon loading", children: jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", children: jsx("span", { className: "visually-hidden", children: "Loading..." }) }) }))] }), hint && (jsx("div", { className: "form-text", id: `${id}Hint`, children: hint }))] })));
|
|
1087
1096
|
}
|
|
1088
1097
|
|
|
1089
|
-
function DInputSwitch({ id: idProp, label, ariaLabel, name, checked, disabled, invalid = false, valid = false, readonly, className, style, onChange, }) {
|
|
1098
|
+
function DInputSwitch({ id: idProp, label, ariaLabel, name, checked, disabled, invalid = false, valid = false, readonly, className, style, dataAttributes, onChange, }) {
|
|
1090
1099
|
const innerId = useId();
|
|
1091
1100
|
const id = useMemo(() => idProp || innerId, [idProp, innerId]);
|
|
1092
1101
|
const [internalIsChecked, setInternalIsChecked] = useState(checked);
|
|
@@ -1098,10 +1107,10 @@ function DInputSwitch({ id: idProp, label, ariaLabel, name, checked, disabled, i
|
|
|
1098
1107
|
setInternalIsChecked(value);
|
|
1099
1108
|
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
|
1100
1109
|
}, [onChange]);
|
|
1101
|
-
return (jsxs("div", { className: "form-check form-switch", children: [jsx("input", { id: id, name: name, onChange: readonly ? () => false : changeHandler, className: classNames('form-check-input', {
|
|
1110
|
+
return (jsxs("div", Object.assign({ className: "form-check form-switch" }, dataAttributes, { children: [jsx("input", { id: id, name: name, onChange: readonly ? () => false : changeHandler, className: classNames('form-check-input', {
|
|
1102
1111
|
'is-invalid': invalid,
|
|
1103
1112
|
'is-valid': valid,
|
|
1104
|
-
}, className), style: style, type: "checkbox", role: "switch", checked: internalIsChecked, disabled: disabled, "aria-label": ariaLabel }), label && (jsx("label", { className: "form-check-label", htmlFor: id, children: label }))] }));
|
|
1113
|
+
}, className), style: style, type: "checkbox", role: "switch", checked: internalIsChecked, disabled: disabled, "aria-label": ariaLabel }), label && (jsx("label", { className: "form-check-label", htmlFor: id, children: label }))] })));
|
|
1105
1114
|
}
|
|
1106
1115
|
|
|
1107
1116
|
function DInputRange(_a, ref) {
|
|
@@ -1153,15 +1162,15 @@ function DListItem({ children, className, style, active = false, disabled = fals
|
|
|
1153
1162
|
}), style: style }, active && { 'aria-current': true }, { children: children })));
|
|
1154
1163
|
}
|
|
1155
1164
|
|
|
1156
|
-
function DList({ children, className, style, flush = false, numbered = false, horizontal = false, horizontalBreakpoint, }) {
|
|
1165
|
+
function DList({ children, className, style, flush = false, numbered = false, horizontal = false, horizontalBreakpoint, dataAttributes, }) {
|
|
1157
1166
|
if (flush && horizontal) {
|
|
1158
1167
|
throw new Error("Horizontal and Flush props don't work together");
|
|
1159
1168
|
}
|
|
1160
|
-
return (jsx("div", { className: classNames('list-group', {
|
|
1169
|
+
return (jsx("div", Object.assign({ className: classNames('list-group', {
|
|
1161
1170
|
'list-group-flush': flush && !horizontal,
|
|
1162
1171
|
'list-group-numbered': numbered,
|
|
1163
1172
|
'list-group-horizontal': horizontal && !horizontalBreakpoint,
|
|
1164
|
-
}, (horizontal && horizontalBreakpoint) && `list-group-horizontal-${horizontalBreakpoint}`, className), style: style, children: children }));
|
|
1173
|
+
}, (horizontal && horizontalBreakpoint) && `list-group-horizontal-${horizontalBreakpoint}`, className), style: style }, dataAttributes, { children: children })));
|
|
1165
1174
|
}
|
|
1166
1175
|
var DList$1 = Object.assign(DList, {
|
|
1167
1176
|
Item: DListItem,
|
|
@@ -1170,7 +1179,7 @@ var DList$1 = Object.assign(DList, {
|
|
|
1170
1179
|
function DModalHeader({ showCloseButton, onClose, children, className, style, iconFamilyClass, iconFamilyPrefix, icon: iconProp, materialStyle = false, }) {
|
|
1171
1180
|
const { iconMap: { xLg, }, } = useDContext();
|
|
1172
1181
|
const icon = useMemo(() => iconProp || xLg, [iconProp, xLg]);
|
|
1173
|
-
return (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 }) }))] }));
|
|
1182
|
+
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" })] }));
|
|
1174
1183
|
}
|
|
1175
1184
|
|
|
1176
1185
|
function DModalBody({ children, className, style, }) {
|
|
@@ -1181,7 +1190,7 @@ function DModalFooter({ className, style, actionPlacement = 'fill', children, })
|
|
|
1181
1190
|
return (jsxs(Fragment$1, { children: [jsx("div", { className: "d-modal-separator" }), jsx("div", { className: classNames(`modal-footer d-modal-action-${actionPlacement}`, className), style: style, children: children })] }));
|
|
1182
1191
|
}
|
|
1183
1192
|
|
|
1184
|
-
function DModal({ name, className, style, staticBackdrop, scrollable, centered, fullScreen, fullScreenFrom, size, children, }) {
|
|
1193
|
+
function DModal({ name, className, style, staticBackdrop, scrollable, centered, fullScreen, fullScreenFrom, size, children, dataAttributes, }) {
|
|
1185
1194
|
const fullScreenClass = useMemo(() => {
|
|
1186
1195
|
if (fullScreen) {
|
|
1187
1196
|
if (fullScreenFrom) {
|
|
@@ -1196,7 +1205,7 @@ function DModal({ name, className, style, staticBackdrop, scrollable, centered,
|
|
|
1196
1205
|
return (jsx("div", Object.assign({ className: classNames(generateClasses), id: name, tabIndex: -1, "aria-labelledby": `${name}Label`, "aria-hidden": "false", style: style }, staticBackdrop && ({
|
|
1197
1206
|
[`data-${PREFIX_BS}backdrop`]: 'static',
|
|
1198
1207
|
[`data-${PREFIX_BS}keyboard`]: 'false',
|
|
1199
|
-
}), { children: jsx("div", { className: classNames(generateModalDialogClasses), children: jsx("div", { className: "modal-content", children: children }) }) })));
|
|
1208
|
+
}), dataAttributes, { children: jsx("div", { className: classNames(generateModalDialogClasses), children: jsx("div", { className: "modal-content", children: children }) }) })));
|
|
1200
1209
|
}
|
|
1201
1210
|
var DModal$1 = Object.assign(DModal, {
|
|
1202
1211
|
Header: DModalHeader,
|
|
@@ -1207,7 +1216,7 @@ var DModal$1 = Object.assign(DModal, {
|
|
|
1207
1216
|
function DOffcanvasHeader({ showCloseButton, onClose, children, className, style, iconFamilyClass, iconFamilyPrefix, icon: iconProp, materialStyle = false, }) {
|
|
1208
1217
|
const { iconMap: { xLg, }, } = useDContext();
|
|
1209
1218
|
const icon = useMemo(() => iconProp || xLg, [iconProp, xLg]);
|
|
1210
|
-
return (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 }) }))] }));
|
|
1219
|
+
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" })] }));
|
|
1211
1220
|
}
|
|
1212
1221
|
|
|
1213
1222
|
function DOffcanvasBody({ children, className, style, }) {
|
|
@@ -1215,10 +1224,10 @@ function DOffcanvasBody({ children, className, style, }) {
|
|
|
1215
1224
|
}
|
|
1216
1225
|
|
|
1217
1226
|
function DOffcanvasFooter({ footerActionPlacement = 'fill', children, className, style, }) {
|
|
1218
|
-
return (jsx("div", { className: classNames(`d-offcanvas-footer d-offcanvas-action-${footerActionPlacement}`, className), style: style, children: children }));
|
|
1227
|
+
return (jsxs(Fragment$1, { children: [jsx("div", { className: "d-offcanvas-separator" }), jsx("div", { className: classNames(`d-offcanvas-footer d-offcanvas-action-${footerActionPlacement}`, className), style: style, children: children })] }));
|
|
1219
1228
|
}
|
|
1220
1229
|
|
|
1221
|
-
function DOffcanvas({ name, className, style, staticBackdrop, scrollable, openFrom = 'end', children, }) {
|
|
1230
|
+
function DOffcanvas({ name, className, style, staticBackdrop, scrollable, openFrom = 'end', children, dataAttributes, }) {
|
|
1222
1231
|
return (jsx("div", Object.assign({ className: classNames('offcanvas portal show', {
|
|
1223
1232
|
[`offcanvas-${openFrom}`]: openFrom,
|
|
1224
1233
|
}, className), style: style, id: name, tabIndex: -1, "aria-labelledby": `${name}Label`, "aria-hidden": "false" }, staticBackdrop && ({
|
|
@@ -1227,7 +1236,7 @@ function DOffcanvas({ name, className, style, staticBackdrop, scrollable, openFr
|
|
|
1227
1236
|
}), scrollable && ({
|
|
1228
1237
|
[`data-${PREFIX_BS}scroll`]: 'true',
|
|
1229
1238
|
[`data-${PREFIX_BS}keyboard`]: 'false',
|
|
1230
|
-
}), { children: children })));
|
|
1239
|
+
}), dataAttributes, { children: children })));
|
|
1231
1240
|
}
|
|
1232
1241
|
var DOffcanvas$1 = Object.assign(DOffcanvas, {
|
|
1233
1242
|
Header: DOffcanvasHeader,
|
|
@@ -1240,7 +1249,7 @@ function DPaginator(_a) {
|
|
|
1240
1249
|
return (jsx(ResponsivePagination, Object.assign({ extraClassName: className, nextLabel: nextLabel, previousLabel: previousLabel, renderNav: showArrows, current: page, onPageChange: onPageChange }, props)));
|
|
1241
1250
|
}
|
|
1242
1251
|
|
|
1243
|
-
function DPopover({ children, renderComponent, open, setOpen, adjustContentToRender = false, className, style, }) {
|
|
1252
|
+
function DPopover({ children, renderComponent, open, setOpen, adjustContentToRender = false, className, style, dataAttributes, }) {
|
|
1244
1253
|
const [isOpen, setIsOpen] = useState(false);
|
|
1245
1254
|
useEffect(() => {
|
|
1246
1255
|
setIsOpen(open);
|
|
@@ -1273,22 +1282,22 @@ function DPopover({ children, renderComponent, open, setOpen, adjustContentToRen
|
|
|
1273
1282
|
const generateStyleVariables = useMemo(() => (Object.assign(Object.assign({}, style), adjustContentToRender && {
|
|
1274
1283
|
[`--${PREFIX_BS}popover-component-min-width`]: 'auto',
|
|
1275
1284
|
})), [style, adjustContentToRender]);
|
|
1276
|
-
return (jsxs("div", { className: classNames('d-popover', className), style: generateStyleVariables, children: [jsx("div", Object.assign({ ref: refs.setReference }, getReferenceProps(), { children: renderComponent(isOpen) })), isOpen && (jsx(FloatingFocusManager, { context: context, modal: false, children: jsx("div", Object.assign({ className: classNames('d-popover-content', {
|
|
1285
|
+
return (jsxs("div", Object.assign({ className: classNames('d-popover', className), style: generateStyleVariables }, dataAttributes, { children: [jsx("div", Object.assign({ ref: refs.setReference }, getReferenceProps(), { children: renderComponent(isOpen) })), isOpen && (jsx(FloatingFocusManager, { context: context, modal: false, children: jsx("div", Object.assign({ className: classNames('d-popover-content', {
|
|
1277
1286
|
'w-100': adjustContentToRender,
|
|
1278
|
-
}), ref: refs.setFloating, style: floatingStyles, "aria-labelledby": headingId }, getFloatingProps(), { children: children })) }))] }));
|
|
1287
|
+
}), ref: refs.setFloating, style: floatingStyles, "aria-labelledby": headingId }, getFloatingProps(), { children: children })) }))] })));
|
|
1279
1288
|
}
|
|
1280
1289
|
|
|
1281
|
-
function DProgress({ className, style, currentValue, minValue = 0, maxValue = 100, hideCurrentValue = false, enableStripedAnimation = false, }) {
|
|
1290
|
+
function DProgress({ className, style, currentValue, minValue = 0, maxValue = 100, hideCurrentValue = false, enableStripedAnimation = false, dataAttributes, }) {
|
|
1282
1291
|
const percentage = useMemo(() => (Math.round((currentValue * 100) / maxValue)), [currentValue, maxValue]);
|
|
1283
1292
|
const formatProgress = useMemo(() => `${percentage}%`, [percentage]);
|
|
1284
1293
|
const generateClasses = useMemo(() => ({
|
|
1285
1294
|
'progress-bar': true,
|
|
1286
1295
|
'progress-bar-striped progress-bar-animated': enableStripedAnimation,
|
|
1287
1296
|
}), [enableStripedAnimation]);
|
|
1288
|
-
return (jsx("div", { className: classNames('progress', className), children: jsx("div", { className: classNames(generateClasses), role: "progressbar", "aria-label": "Progress bar", style: Object.assign({ width: formatProgress }, style), "aria-valuenow": currentValue, "aria-valuemin": minValue, "aria-valuemax": maxValue, children: !hideCurrentValue && formatProgress }) }));
|
|
1297
|
+
return (jsx("div", Object.assign({ className: classNames('progress', className) }, dataAttributes, { children: jsx("div", { className: classNames(generateClasses), role: "progressbar", "aria-label": "Progress bar", style: Object.assign({ width: formatProgress }, style), "aria-valuenow": currentValue, "aria-valuemin": minValue, "aria-valuemax": maxValue, children: !hideCurrentValue && formatProgress }) })));
|
|
1289
1298
|
}
|
|
1290
1299
|
|
|
1291
|
-
function DQuickActionButton({ line1, line2, className, actionLinkText, actionLinkTheme = 'secondary', actionIcon, secondaryActionIcon, secondaryActionAriaLabel, actionIconFamilyClass, actionIconFamilyPrefix, representativeImage, representativeIcon, representativeIconTheme = 'secondary', representativeIconHasCircle = false, representativeIconFamilyClass, representativeIconFamilyPrefix, onClick, onClickSecondary, style, }) {
|
|
1300
|
+
function DQuickActionButton({ line1, line2, className, actionLinkText, actionLinkTheme = 'secondary', actionIcon, secondaryActionIcon, secondaryActionAriaLabel, actionIconFamilyClass, actionIconFamilyPrefix, representativeImage, representativeIcon, representativeIconTheme = 'secondary', representativeIconHasCircle = false, representativeIconFamilyClass, representativeIconFamilyPrefix, onClick, onClickSecondary, style, dataAttributes, }) {
|
|
1292
1301
|
const globalClickHandler = useCallback(() => {
|
|
1293
1302
|
if (actionLinkText) {
|
|
1294
1303
|
return;
|
|
@@ -1305,22 +1314,22 @@ function DQuickActionButton({ line1, line2, className, actionLinkText, actionLin
|
|
|
1305
1314
|
onClickSecondary === null || onClickSecondary === void 0 ? void 0 : onClickSecondary();
|
|
1306
1315
|
}, [onClickSecondary]);
|
|
1307
1316
|
const Tag = useMemo(() => (actionLinkText ? 'div' : 'button'), [actionLinkText]);
|
|
1308
|
-
return (jsxs(Tag, { className: classNames('d-quick-action-button', className), onClick: !actionLinkText ? globalClickHandler : undefined, style: style, children: [representativeIcon && (jsx(DIcon, { className: "d-quick-action-button-representative-icon", size: representativeIconHasCircle
|
|
1317
|
+
return (jsxs(Tag, Object.assign({ className: classNames('d-quick-action-button', className), onClick: !actionLinkText ? globalClickHandler : undefined, style: style }, dataAttributes, { children: [representativeIcon && (jsx(DIcon, { className: "d-quick-action-button-representative-icon", size: representativeIconHasCircle
|
|
1309
1318
|
? `var(--${PREFIX_BS}quick-action-button-representative-icon-size)`
|
|
1310
|
-
: `var(--${PREFIX_BS}quick-action-button-representative-image-size)`, icon: representativeIcon, hasCircle: representativeIconHasCircle, theme: representativeIconTheme, familyClass: representativeIconFamilyClass, familyPrefix: representativeIconFamilyPrefix })), representativeImage && (jsx("img", { className: "d-quick-action-button-representative-image", src: representativeImage, alt: "" })), jsx("div", { className: "d-quick-action-button-content", children: jsxs("div", { className: "d-quick-action-button-text", children: [jsx("span", { className: "d-quick-action-button-line1", children: line1 }), jsx("small", { className: "d-quick-action-button-line2", children: line2 })] }) }), secondaryActionIcon && (jsx(DButton, { className: "d-quick-action-button-secondary-action-link", type: "button", variant: "link", iconStart: secondaryActionIcon, ariaLabel: secondaryActionAriaLabel, iconStartFamilyClass: actionIconFamilyClass, iconStartFamilyPrefix: actionIconFamilyPrefix, theme: actionLinkTheme, onClick: secondaryActionLinkClickHandler, stopPropagationEnabled: true })), actionLinkText && !actionIcon && (jsx(DButton, { className: "d-quick-action-button-action-link", type: "button", variant: "link", theme: actionLinkTheme, text: actionLinkText, onClick: actionLinkClickHandler, stopPropagationEnabled: true })), actionIcon && !actionLinkText && (jsx(DIcon, { className: "d-quick-action-button-action-icon", icon: actionIcon, size: `var(--${PREFIX_BS}quick-action-button-action-icon-size)`, familyClass: actionIconFamilyClass, familyPrefix: actionIconFamilyPrefix }))] }));
|
|
1319
|
+
: `var(--${PREFIX_BS}quick-action-button-representative-image-size)`, icon: representativeIcon, hasCircle: representativeIconHasCircle, theme: representativeIconTheme, familyClass: representativeIconFamilyClass, familyPrefix: representativeIconFamilyPrefix })), representativeImage && (jsx("img", { className: "d-quick-action-button-representative-image", src: representativeImage, alt: "" })), jsx("div", { className: "d-quick-action-button-content", children: jsxs("div", { className: "d-quick-action-button-text", children: [jsx("span", { className: "d-quick-action-button-line1", children: line1 }), jsx("small", { className: "d-quick-action-button-line2", children: line2 })] }) }), secondaryActionIcon && (jsx(DButton, { className: "d-quick-action-button-secondary-action-link", type: "button", variant: "link", iconStart: secondaryActionIcon, ariaLabel: secondaryActionAriaLabel, iconStartFamilyClass: actionIconFamilyClass, iconStartFamilyPrefix: actionIconFamilyPrefix, theme: actionLinkTheme, onClick: secondaryActionLinkClickHandler, stopPropagationEnabled: true })), actionLinkText && !actionIcon && (jsx(DButton, { className: "d-quick-action-button-action-link", type: "button", variant: "link", theme: actionLinkTheme, text: actionLinkText, onClick: actionLinkClickHandler, stopPropagationEnabled: true })), actionIcon && !actionLinkText && (jsx(DIcon, { className: "d-quick-action-button-action-icon", icon: actionIcon, size: `var(--${PREFIX_BS}quick-action-button-action-icon-size)`, familyClass: actionIconFamilyClass, familyPrefix: actionIconFamilyPrefix }))] })));
|
|
1311
1320
|
}
|
|
1312
1321
|
|
|
1313
|
-
function DQuickActionCheck({ id: idProp, name, value, line1, line2, line3, className, style, checked, onChange, }) {
|
|
1322
|
+
function DQuickActionCheck({ id: idProp, name, value, line1, line2, line3, className, style, checked, dataAttributes, onChange, }) {
|
|
1314
1323
|
const innerId = useId();
|
|
1315
1324
|
const id = useMemo(() => idProp || innerId, [idProp, innerId]);
|
|
1316
1325
|
const changeHandler = useCallback((event) => {
|
|
1317
1326
|
event.stopPropagation();
|
|
1318
1327
|
onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
|
1319
1328
|
}, [onChange]);
|
|
1320
|
-
return (jsxs("label", { className: classNames('d-quick-action-check', className), htmlFor: id, style: style, children: [jsx(DInputCheck, { id: id, type: "radio", name: name, value: value, checked: checked, onChange: changeHandler }), jsxs("div", { className: "d-quick-action-check-detail", children: [jsx("span", { className: "d-quick-action-check-line1", children: line1 }), jsx("span", { className: "d-quick-action-check-line2", children: line2 })] }), jsx("span", { className: "d-quick-action-check-line3", children: line3 })] }));
|
|
1329
|
+
return (jsxs("label", Object.assign({ className: classNames('d-quick-action-check', className), htmlFor: id, style: style }, dataAttributes, { children: [jsx(DInputCheck, { id: id, type: "radio", name: name, value: value, checked: checked, onChange: changeHandler }), jsxs("div", { className: "d-quick-action-check-detail", children: [jsx("span", { className: "d-quick-action-check-line1", children: line1 }), jsx("span", { className: "d-quick-action-check-line2", children: line2 })] }), jsx("span", { className: "d-quick-action-check-line3", children: line3 })] })));
|
|
1321
1330
|
}
|
|
1322
1331
|
|
|
1323
|
-
function DQuickActionSelect({ id: idProp, name, value, line1, line2, className, style, selected = false, onChange, }) {
|
|
1332
|
+
function DQuickActionSelect({ id: idProp, name, value, line1, line2, className, style, selected = false, dataAttributes, onChange, }) {
|
|
1324
1333
|
const innerRef = useRef(null);
|
|
1325
1334
|
const innerId = useId();
|
|
1326
1335
|
const id = useMemo(() => idProp || innerId, [idProp, innerId]);
|
|
@@ -1333,19 +1342,22 @@ function DQuickActionSelect({ id: idProp, name, value, line1, line2, className,
|
|
|
1333
1342
|
innerRef.current.checked = selected;
|
|
1334
1343
|
}
|
|
1335
1344
|
}, [selected]);
|
|
1336
|
-
return (jsxs("label", { className: classNames('d-quick-action-select', className), htmlFor: id, style: style, children: [jsx("input", { ref: innerRef, id: id, type: "radio", name: name, value: value, onChange: changeHandler }), jsx("span", { className: "d-quick-action-select-line1", children: line1 }), jsx("span", { className: "d-quick-action-select-line2", children: line2 })] }));
|
|
1345
|
+
return (jsxs("label", Object.assign({ className: classNames('d-quick-action-select', className), htmlFor: id, style: style }, dataAttributes, { children: [jsx("input", { ref: innerRef, id: id, type: "radio", name: name, value: value, onChange: changeHandler }), jsx("span", { className: "d-quick-action-select-line1", children: line1 }), jsx("span", { className: "d-quick-action-select-line2", children: line2 })] })));
|
|
1337
1346
|
}
|
|
1338
1347
|
|
|
1339
|
-
function DQuickActionSwitch({ id: idProp, name, label, hint, checked, disabled, className, style, onClick, }) {
|
|
1348
|
+
function DQuickActionSwitch({ id: idProp, name, label, hint, checked, disabled, className, style, dataAttributes, onClick, }) {
|
|
1340
1349
|
const innerId = useId();
|
|
1341
1350
|
const id = useMemo(() => idProp || innerId, [idProp, innerId]);
|
|
1342
1351
|
const clickHandler = useCallback((event) => {
|
|
1343
1352
|
event.stopPropagation();
|
|
1344
1353
|
onClick === null || onClick === void 0 ? void 0 : onClick(checked);
|
|
1345
1354
|
}, [checked, onClick]);
|
|
1346
|
-
return (jsxs("button", { className: classNames('d-quick-action-switch', className), type: "button", onClick: clickHandler, style: style, children: [jsx("div", { className: "d-quick-action-switch-content", children: jsx(DInputSwitch, { id: id, name: name, disabled: disabled, checked: checked, readonly: true, label: label }) }), jsx("div", { className: "d-quick-action-switch-hint", children: hint })] }));
|
|
1355
|
+
return (jsxs("button", Object.assign({ className: classNames('d-quick-action-switch', className), type: "button", onClick: clickHandler, style: style }, dataAttributes, { children: [jsx("div", { className: "d-quick-action-switch-content", children: jsx(DInputSwitch, { id: id, name: name, disabled: disabled, checked: checked, readonly: true, label: label }) }), jsx("div", { className: "d-quick-action-switch-hint", children: hint })] })));
|
|
1347
1356
|
}
|
|
1348
1357
|
|
|
1358
|
+
/**
|
|
1359
|
+
* @deprecated Please use https://getbootstrap.com/docs/5.3/components/placeholders/ instead
|
|
1360
|
+
*/
|
|
1349
1361
|
function DSkeleton({ speed = 2, viewBox, backgroundColor, foregroundColor, children, }) {
|
|
1350
1362
|
const innerBackgroundColor = useMemo(() => {
|
|
1351
1363
|
if (backgroundColor) {
|
|
@@ -1412,8 +1424,8 @@ function DStepper$1({ options, currentStep, className, style, }) {
|
|
|
1412
1424
|
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 || '' })] })) })] }));
|
|
1413
1425
|
}
|
|
1414
1426
|
|
|
1415
|
-
function DStepper({ options, currentStep, iconSuccess, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle = false, vertical = false, breakpoint = 'lg', className, completed = false, style, }) {
|
|
1416
|
-
return (jsxs("div", { className: className, style: style, children: [jsx("div", { className: `d-block d-${breakpoint}-none`, children: jsx(DStepper$1, { options: options, currentStep: currentStep }) }), jsx("div", { className: `d-none d-${breakpoint}-block`, children: jsx(DStepper$2, { options: options, currentStep: currentStep, vertical: vertical, iconSuccess: iconSuccess, iconSuccessFamilyClass: iconSuccessFamilyClass, iconSuccessFamilyPrefix: iconSuccessFamilyPrefix, iconSuccessMaterialStyle: iconSuccessMaterialStyle, completed: completed }) })] }));
|
|
1427
|
+
function DStepper({ options, currentStep, iconSuccess, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle = false, vertical = false, breakpoint = 'lg', className, completed = false, style, dataAttributes, }) {
|
|
1428
|
+
return (jsxs("div", Object.assign({ className: className, style: style }, dataAttributes, { children: [jsx("div", { className: `d-block d-${breakpoint}-none`, children: jsx(DStepper$1, { options: options, currentStep: currentStep }) }), jsx("div", { className: `d-none d-${breakpoint}-block`, children: jsx(DStepper$2, { options: options, currentStep: currentStep, vertical: vertical, iconSuccess: iconSuccess, iconSuccessFamilyClass: iconSuccessFamilyClass, iconSuccessFamilyPrefix: iconSuccessFamilyPrefix, iconSuccessMaterialStyle: iconSuccessMaterialStyle, completed: completed }) })] })));
|
|
1417
1429
|
}
|
|
1418
1430
|
|
|
1419
1431
|
const ARROW_WIDTH = 8;
|
|
@@ -1471,7 +1483,7 @@ function DTabContent({ tab, children, className, style, }) {
|
|
|
1471
1483
|
return (jsx("div", { className: classNames('tab-pane fade show active', className), id: `${tab}Pane`, role: "tabpanel", tabIndex: 0, "aria-labelledby": `${tab}Tab`, style: style, children: children }));
|
|
1472
1484
|
}
|
|
1473
1485
|
|
|
1474
|
-
function DTabs({ children, defaultSelected, onChange, options, className, classNameTab, style, vertical, variant = 'underline', }) {
|
|
1486
|
+
function DTabs({ children, defaultSelected, onChange, options, className, classNameTab, style, vertical, variant = 'underline', dataAttributes, }) {
|
|
1475
1487
|
const [selected, setSelected] = useState(defaultSelected);
|
|
1476
1488
|
const onSelect = useCallback((option) => {
|
|
1477
1489
|
if (option.tab) {
|
|
@@ -1487,12 +1499,12 @@ function DTabs({ children, defaultSelected, onChange, options, className, classN
|
|
|
1487
1499
|
isSelected,
|
|
1488
1500
|
}), [isSelected]);
|
|
1489
1501
|
const generateClasses = useMemo(() => (Object.assign({ nav: true, 'flex-column align-items-center': vertical && variant !== 'tabs', [`nav-${variant}`]: true }, className && { [className]: true })), [vertical, variant, className]);
|
|
1490
|
-
return (jsx(TabContext.Provider, { value: value, children: jsxs("div", { className: classNames({
|
|
1502
|
+
return (jsx(TabContext.Provider, { value: value, children: jsxs("div", Object.assign({ className: classNames({
|
|
1491
1503
|
'd-flex w-100': true,
|
|
1492
1504
|
'flex-column': !vertical || variant === 'tabs',
|
|
1493
|
-
}), style: style, children: [jsx("nav", { className: classNames(generateClasses), children: options.map((option) => (jsx("button", { id: `${option.tab}Tab`, className: classNames('nav-link', {
|
|
1505
|
+
}), style: style }, dataAttributes, { children: [jsx("nav", { className: classNames(generateClasses), children: options.map((option) => (jsx("button", { id: `${option.tab}Tab`, className: classNames('nav-link', {
|
|
1494
1506
|
active: option.tab === selected,
|
|
1495
|
-
}, classNameTab), type: "button", role: "tab", "aria-controls": `${option.tab}Pane`, "aria-selected": option.tab === selected, disabled: option.disabled, onClick: () => onSelect(option), children: option.label }, option.label))) }), jsx("div", { className: "tab-content w-100", children: children })] }) }));
|
|
1507
|
+
}, classNameTab), type: "button", role: "tab", "aria-controls": `${option.tab}Pane`, "aria-selected": option.tab === selected, disabled: option.disabled, onClick: () => onSelect(option), children: option.label }, option.label))) }), jsx("div", { className: "tab-content w-100", children: children })] })) }));
|
|
1496
1508
|
}
|
|
1497
1509
|
var DTabs$1 = Object.assign(DTabs, {
|
|
1498
1510
|
Tab: DTabContent,
|
|
@@ -1506,8 +1518,8 @@ function DToastBody({ children, className, style }) {
|
|
|
1506
1518
|
return (jsx("div", { className: classNames('toast-body', className), style: style, children: children }));
|
|
1507
1519
|
}
|
|
1508
1520
|
|
|
1509
|
-
function DToast({ children, className, style }) {
|
|
1510
|
-
return (jsx("div", { className: classNames('toast', className), role: "alert", "aria-live": "assertive", "aria-atomic": "true", style: style, children: children }));
|
|
1521
|
+
function DToast({ children, className, style, dataAttributes, }) {
|
|
1522
|
+
return (jsx("div", Object.assign({ className: classNames('toast', className), role: "alert", "aria-live": "assertive", "aria-atomic": "true", style: style }, dataAttributes, { children: children })));
|
|
1511
1523
|
}
|
|
1512
1524
|
var DToast$1 = Object.assign(DToast, {
|
|
1513
1525
|
Header: DToastHeader,
|
|
@@ -1573,5 +1585,5 @@ async function configureI8n(resources, _a = {}) {
|
|
|
1573
1585
|
.then((t) => t);
|
|
1574
1586
|
}
|
|
1575
1587
|
|
|
1576
|
-
export { DAlert, DBadge, DBoxFile, DButton, DButtonIcon, DCard$1 as DCard, DCardBody, DCardFooter, DCardHeader, DCarousel$1 as DCarousel, DCarouselSlide, DChip, DCollapse, DContext, DContextProvider, DCurrencyText, DDatePicker, DIcon, DIconBase, DInput$1 as DInput, DInputCheck, DInputCounter$1 as DInputCounter, DInputCurrency$1 as DInputCurrency, DInputCurrencyBase$1 as DInputCurrencyBase, DInputMask$1 as DInputMask, DInputPassword$1 as DInputPassword, DInputPin, DInputRange$1 as DInputRange, DInputSearch$1 as DInputSearch, DInputSelect, DInputSwitch, DList$1 as DList, DListItem, DModal$1 as DModal, DModalBody, DModalFooter, DModalHeader, DOffcanvas$1 as DOffcanvas, DOffcanvasBody, DOffcanvasFooter, DOffcanvasHeader, DPaginator, DPopover, DProgress, DQuickActionButton, DQuickActionCheck, DQuickActionSelect, DQuickActionSwitch, DSelect$1 as DSelect, DSkeleton, DStepper, DStepper$2 as DStepperDesktop, DStepper$1 as DStepperMobile, DTabContent, DTableHead, DTabs$1 as DTabs, DToast$1 as DToast, DToastContainer, DTooltip, configureI8n as configureI18n, formatCurrency, useDContext, useDPortalContext, useDToast, useDisableBodyScrollEffect, useDisableInputWheel, useFormatCurrency, useInputCurrency, usePortal, useProvidedRefOrCreate, useStackState, useTabContext };
|
|
1588
|
+
export { DAlert, DAvatar, DBadge, DBoxFile, DButton, DButtonIcon, DCard$1 as DCard, DCardBody, DCardFooter, DCardHeader, DCarousel$1 as DCarousel, DCarouselSlide, DChip, DCollapse, DContext, DContextProvider, DCurrencyText, DDatePicker, DIcon, DIconBase, DInput$1 as DInput, DInputCheck, DInputCounter$1 as DInputCounter, DInputCurrency$1 as DInputCurrency, DInputCurrencyBase$1 as DInputCurrencyBase, DInputMask$1 as DInputMask, DInputPassword$1 as DInputPassword, DInputPin, DInputRange$1 as DInputRange, DInputSearch$1 as DInputSearch, DInputSelect, DInputSwitch, DList$1 as DList, DListItem, DModal$1 as DModal, DModalBody, DModalFooter, DModalHeader, DOffcanvas$1 as DOffcanvas, DOffcanvasBody, DOffcanvasFooter, DOffcanvasHeader, DPaginator, DPopover, DProgress, DQuickActionButton, DQuickActionCheck, DQuickActionSelect, DQuickActionSwitch, DSelect$1 as DSelect, DSkeleton, DStepper, DStepper$2 as DStepperDesktop, DStepper$1 as DStepperMobile, DTabContent, DTableHead, DTabs$1 as DTabs, DToast$1 as DToast, DToastContainer, DTooltip, configureI8n as configureI18n, formatCurrency, useDContext, useDPortalContext, useDToast, useDisableBodyScrollEffect, useDisableInputWheel, useFormatCurrency, useInputCurrency, usePortal, useProvidedRefOrCreate, useStackState, useTabContext };
|
|
1577
1589
|
//# sourceMappingURL=index.esm.js.map
|