@dynamic-framework/ui-react 2.8.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/dynamic-ui.css +5 -22
- package/dist/css/dynamic-ui.min.css +2 -2
- package/dist/index.esm.js +178 -35
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +179 -34
- package/dist/index.js.map +1 -1
- package/dist/types/components/DInputCheck/DInputCheck.d.ts +1 -0
- package/dist/types/components/DInputSwitch/DInputSwitch.d.ts +2 -1
- package/dist/types/components/DModal/components/DModalHeader.d.ts +5 -1
- package/dist/types/components/DOffcanvas/components/DOffcanvasHeader.d.ts +5 -1
- package/dist/types/components/DTooltip/DTooltip.d.ts +38 -3
- package/dist/types/utils/buildUrl.d.ts +32 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/sanitizeHref.d.ts +37 -0
- package/dist/types/utils/tests/buildUrl.spec.d.ts +1 -0
- package/dist/types/utils/tests/sanitizeHref.spec.d.ts +1 -0
- package/package.json +9 -6
- package/src/style/_shame.scss +1 -5
- package/src/style/abstracts/variables/_+import.scss +1 -0
- package/src/style/abstracts/variables/_box.scss +7 -0
- package/src/style/abstracts/variables/_forms.scss +1 -3
- package/src/style/abstracts/variables/_shadow.scss +12 -1
- package/src/style/base/_+import.scss +0 -1
- package/src/style/base/_form-check.scss +4 -2
- package/src/style/components/_d-box.scss +5 -5
- package/src/style/base/_form-text.scss +0 -12
package/dist/index.js
CHANGED
|
@@ -583,12 +583,12 @@ function DIcon(_a) {
|
|
|
583
583
|
return (jsxRuntime.jsx(DIconBase, Object.assign({ icon: resolvedIcon, familyClass: propFamilyClass !== null && propFamilyClass !== void 0 ? propFamilyClass : familyClass, familyPrefix: propFamilyPrefix !== null && propFamilyPrefix !== void 0 ? propFamilyPrefix : familyPrefix, materialStyle: propMaterialStyle !== null && propMaterialStyle !== void 0 ? propMaterialStyle : materialStyle }, props)));
|
|
584
584
|
}
|
|
585
585
|
|
|
586
|
-
function DAlert({ color = 'success', icon: iconProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle
|
|
587
|
-
const { iconMap: { alert, xLg, }, } = useDContext();
|
|
586
|
+
function DAlert({ color = 'success', icon: iconProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, iconClose: iconCloseProp, iconCloseFamilyClass, iconCloseFamilyPrefix, iconCloseMaterialStyle, showClose, onClose, children, id, className, style, dataAttributes, }) {
|
|
587
|
+
const { icon: { materialStyle, familyClass, familyPrefix, }, iconMap: { alert, xLg, }, } = useDContext();
|
|
588
588
|
const icon = React.useMemo(() => iconProp || alert[color], [alert, iconProp, color]);
|
|
589
589
|
const iconClose = React.useMemo(() => (iconCloseProp || xLg), [iconCloseProp, xLg]);
|
|
590
590
|
const generateClasses = React.useMemo(() => (Object.assign({ alert: true, [`alert-${color}`]: true, 'fade show': !!showClose }, className && { [className]: true })), [color, showClose, className]);
|
|
591
|
-
return (jsxRuntime.jsxs("div", Object.assign({ className: classNames(generateClasses), style: style, role: "alert", id: id }, dataAttributes, { children: [icon && (jsxRuntime.jsx(DIcon, { className: "alert-icon", icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })), jsxRuntime.jsx("div", { className: "alert-text", children: children }), showClose && (jsxRuntime.jsx("button", { type: "button", className: "d-close", "aria-label": "Close", onClick: onClose, children: jsxRuntime.jsx(DIcon, { icon: iconClose, familyClass: iconCloseFamilyClass, familyPrefix: iconCloseFamilyPrefix, materialStyle: iconCloseMaterialStyle }) }))] })));
|
|
591
|
+
return (jsxRuntime.jsxs("div", Object.assign({ className: classNames(generateClasses), style: style, role: "alert", id: id }, dataAttributes, { children: [icon && (jsxRuntime.jsx(DIcon, { className: "alert-icon", icon: icon, familyClass: iconFamilyClass !== null && iconFamilyClass !== void 0 ? iconFamilyClass : familyClass, familyPrefix: iconFamilyPrefix !== null && iconFamilyPrefix !== void 0 ? iconFamilyPrefix : familyPrefix, materialStyle: iconMaterialStyle !== null && iconMaterialStyle !== void 0 ? iconMaterialStyle : materialStyle })), jsxRuntime.jsx("div", { className: "alert-text", children: children }), showClose && (jsxRuntime.jsx("button", { type: "button", className: "d-close", "aria-label": "Close", onClick: onClose, children: jsxRuntime.jsx(DIcon, { icon: iconClose, familyClass: iconCloseFamilyClass !== null && iconCloseFamilyClass !== void 0 ? iconCloseFamilyClass : familyClass, familyPrefix: iconCloseFamilyPrefix !== null && iconCloseFamilyPrefix !== void 0 ? iconCloseFamilyPrefix : familyPrefix, materialStyle: iconCloseMaterialStyle !== null && iconCloseMaterialStyle !== void 0 ? iconCloseMaterialStyle : materialStyle }) }))] })));
|
|
592
592
|
}
|
|
593
593
|
|
|
594
594
|
function DAvatar({ id, size, image, name: nameProp, useNameAsInitials = false, className, style, dataAttributes, }) {
|
|
@@ -610,6 +610,7 @@ function DAvatar({ id, size, image, name: nameProp, useNameAsInitials = false, c
|
|
|
610
610
|
|
|
611
611
|
function DBadge(props) {
|
|
612
612
|
const { text, soft = false, color = 'primary', id, rounded, className, size, style, iconStart, iconEnd, iconMaterialStyle, iconFamilyClass, iconFamilyPrefix, dataAttributes, } = props;
|
|
613
|
+
const { icon: { familyClass, familyPrefix, materialStyle, }, } = useDContext();
|
|
613
614
|
// Responsive size resolution using useResponsiveProp
|
|
614
615
|
const { responsivePropValue } = useResponsiveProp(true);
|
|
615
616
|
const resolvedSize = React.useMemo(() => {
|
|
@@ -626,7 +627,7 @@ function DBadge(props) {
|
|
|
626
627
|
'rounded-pill': !!rounded,
|
|
627
628
|
[`badge-${resolvedSize}`]: !!resolvedSize,
|
|
628
629
|
}), [rounded, soft, color, resolvedSize]);
|
|
629
|
-
return (jsxRuntime.jsxs("span", Object.assign({ className: classNames(generateClasses, className), style: style }, id && { id }, dataAttributes, { children: [iconStart && (jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })), jsxRuntime.jsx("span", { children: text }), iconEnd && (jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle }))] })));
|
|
630
|
+
return (jsxRuntime.jsxs("span", Object.assign({ className: classNames(generateClasses, className), style: style }, id && { id }, dataAttributes, { children: [iconStart && (jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconFamilyClass !== null && iconFamilyClass !== void 0 ? iconFamilyClass : familyClass, familyPrefix: iconFamilyPrefix !== null && iconFamilyPrefix !== void 0 ? iconFamilyPrefix : familyPrefix, materialStyle: iconMaterialStyle !== null && iconMaterialStyle !== void 0 ? iconMaterialStyle : materialStyle })), jsxRuntime.jsx("span", { children: text }), iconEnd && (jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconFamilyClass !== null && iconFamilyClass !== void 0 ? iconFamilyClass : familyClass, familyPrefix: iconFamilyPrefix !== null && iconFamilyPrefix !== void 0 ? iconFamilyPrefix : familyPrefix, materialStyle: iconMaterialStyle !== null && iconMaterialStyle !== void 0 ? iconMaterialStyle : materialStyle }))] })));
|
|
630
631
|
}
|
|
631
632
|
|
|
632
633
|
function DBox({ className, style, children, dataAttributes, }) {
|
|
@@ -658,6 +659,7 @@ function DInput(_a, ref) {
|
|
|
658
659
|
const inputRef = useProvidedRefOrCreate(ref);
|
|
659
660
|
const innerId = React.useId();
|
|
660
661
|
const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
|
|
662
|
+
const { icon: { familyClass, familyPrefix, materialStyle, }, } = useDContext();
|
|
661
663
|
const handleOnChange = React.useCallback((event) => {
|
|
662
664
|
onChange === null || onChange === void 0 ? void 0 : onChange(event.currentTarget.value);
|
|
663
665
|
}, [onChange]);
|
|
@@ -720,7 +722,7 @@ function DInput(_a, ref) {
|
|
|
720
722
|
[`input-group-${size}`]: !!size,
|
|
721
723
|
'input-group': true,
|
|
722
724
|
'has-validation': invalid || valid,
|
|
723
|
-
}), children: [!!inputStart && (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}InputStart`, children: inputStart })), iconStart && (onIconStartClick ? (jsxRuntime.jsx("button", { type: "button", className: "input-group-text", id: `${id}Start`, onClick: handleOnIconStartClick, disabled: disabled || loading || iconStartDisabled, "aria-label": iconStartAriaLabel || (typeof iconStart === 'string' ? iconStart : 'start icon'), tabIndex: iconStartTabIndex, children: jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix, materialStyle: iconStartMaterialStyle }) })) : (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}Start`, "aria-hidden": "true", tabIndex: -1, children: jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix, materialStyle: iconStartMaterialStyle }) }))), dynamicComponent, (iconEnd && !loading) && (onIconEndClick ? (jsxRuntime.jsx("button", { type: "button", className: "input-group-text", id: `${id}End`, onClick: handleOnIconEndClick, disabled: disabled || loading || iconEndDisabled, "aria-label": iconEndAriaLabel || (typeof iconEnd === 'string' ? iconEnd : 'end icon'), tabIndex: iconEndTabIndex, children: jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix, materialStyle: iconEndMaterialStyle }) })) : (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}End`, "aria-hidden": "true", tabIndex: -1, children: jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix, materialStyle: iconEndMaterialStyle }) }))), loading && (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}Loading`, children: jsxRuntime.jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", "data-testid": "loading-spinner", children: jsxRuntime.jsx("span", { className: "visually-hidden", children: "Loading..." }) }) })), !!inputEnd && (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}InputEnd`, children: inputEnd }))] }), hint && (jsxRuntime.jsx("div", { className: "form-text", id: `${id}Hint`, children: hint }))] })));
|
|
725
|
+
}), children: [!!inputStart && (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}InputStart`, children: inputStart })), iconStart && (onIconStartClick ? (jsxRuntime.jsx("button", { type: "button", className: "input-group-text", id: `${id}Start`, onClick: handleOnIconStartClick, disabled: disabled || loading || iconStartDisabled, "aria-label": iconStartAriaLabel || (typeof iconStart === 'string' ? iconStart : 'start icon'), tabIndex: iconStartTabIndex, children: jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass !== null && iconStartFamilyClass !== void 0 ? iconStartFamilyClass : familyClass, familyPrefix: iconStartFamilyPrefix !== null && iconStartFamilyPrefix !== void 0 ? iconStartFamilyPrefix : familyPrefix, materialStyle: iconStartMaterialStyle !== null && iconStartMaterialStyle !== void 0 ? iconStartMaterialStyle : materialStyle }) })) : (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}Start`, "aria-hidden": "true", tabIndex: -1, children: jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass !== null && iconStartFamilyClass !== void 0 ? iconStartFamilyClass : familyClass, familyPrefix: iconStartFamilyPrefix !== null && iconStartFamilyPrefix !== void 0 ? iconStartFamilyPrefix : familyPrefix, materialStyle: iconStartMaterialStyle !== null && iconStartMaterialStyle !== void 0 ? iconStartMaterialStyle : materialStyle }) }))), dynamicComponent, (iconEnd && !loading) && (onIconEndClick ? (jsxRuntime.jsx("button", { type: "button", className: "input-group-text", id: `${id}End`, onClick: handleOnIconEndClick, disabled: disabled || loading || iconEndDisabled, "aria-label": iconEndAriaLabel || (typeof iconEnd === 'string' ? iconEnd : 'end icon'), tabIndex: iconEndTabIndex, children: jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass !== null && iconEndFamilyClass !== void 0 ? iconEndFamilyClass : familyClass, familyPrefix: iconEndFamilyPrefix !== null && iconEndFamilyPrefix !== void 0 ? iconEndFamilyPrefix : familyPrefix, materialStyle: iconEndMaterialStyle !== null && iconEndMaterialStyle !== void 0 ? iconEndMaterialStyle : materialStyle }) })) : (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}End`, "aria-hidden": "true", tabIndex: -1, children: jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass !== null && iconEndFamilyClass !== void 0 ? iconEndFamilyClass : familyClass, familyPrefix: iconEndFamilyPrefix !== null && iconEndFamilyPrefix !== void 0 ? iconEndFamilyPrefix : familyPrefix, materialStyle: iconEndMaterialStyle !== null && iconEndMaterialStyle !== void 0 ? iconEndMaterialStyle : materialStyle }) }))), loading && (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}Loading`, children: jsxRuntime.jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", "data-testid": "loading-spinner", children: jsxRuntime.jsx("span", { className: "visually-hidden", children: "Loading..." }) }) })), !!inputEnd && (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}InputEnd`, children: inputEnd }))] }), hint && (jsxRuntime.jsx("div", { className: "form-text", id: `${id}Hint`, children: hint }))] })));
|
|
724
726
|
}
|
|
725
727
|
const ForwardedDInput = React.forwardRef(DInput);
|
|
726
728
|
ForwardedDInput.displayName = 'DInput';
|
|
@@ -1116,7 +1118,7 @@ function useDBoxFile(props) {
|
|
|
1116
1118
|
|
|
1117
1119
|
function DBoxFile(_a) {
|
|
1118
1120
|
var { icon: iconProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, children, className, style, dataAttributes } = _a, props = tslib.__rest(_a, ["icon", "iconFamilyClass", "iconFamilyPrefix", "iconMaterialStyle", "children", "className", "style", "dataAttributes"]);
|
|
1119
|
-
const { iconMap: { upload } } = useDContext();
|
|
1121
|
+
const { icon: { familyClass, familyPrefix, materialStyle, }, iconMap: { upload }, } = useDContext();
|
|
1120
1122
|
const icon = React.useMemo(() => iconProp || upload, [iconProp, upload]);
|
|
1121
1123
|
const { inputRef, rootRef, isDragValid, isDragInvalid, acceptAttr, files, handleFileSelect, handleDrop, handleDragEnter, handleDragLeave, handleClick, handleKeyDown, handleRemoveFile, openFileDialog, } = useDBoxFile(props);
|
|
1122
1124
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("section", Object.assign({ className: classNames('d-box-file', {
|
|
@@ -1124,13 +1126,14 @@ function DBoxFile(_a) {
|
|
|
1124
1126
|
'd-box-file-disabled': props.disabled,
|
|
1125
1127
|
'd-box-file-valid': isDragValid,
|
|
1126
1128
|
'd-box-file-invalid': isDragInvalid,
|
|
1127
|
-
}, className), style: style }, dataAttributes, { children: jsxRuntime.jsxs("div", Object.assign({ className: "d-box-file-dropzone", ref: rootRef, onDragEnter: handleDragEnter, onDragOver: (e) => e.preventDefault(), onDragLeave: handleDragLeave, onDrop: handleDrop, onClick: handleClick, onKeyDown: handleKeyDown }, (!props.disabled && !props.noKeyboard ? { tabIndex: 0 } : {}), { role: "presentation", children: [jsxRuntime.jsx("input", { type: "file", multiple: props.multiple, style: { display: 'none' }, ref: inputRef, disabled: props.disabled, onChange: handleFileSelect, onClick: (e) => e.stopPropagation(), tabIndex: -1, accept: acceptAttr }), icon && iconProp !== false && (jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })), jsxRuntime.jsx("div", { className: "d-box-content", children: typeof children === 'function'
|
|
1129
|
+
}, className), style: style }, dataAttributes, { children: jsxRuntime.jsxs("div", Object.assign({ className: "d-box-file-dropzone", ref: rootRef, onDragEnter: handleDragEnter, onDragOver: (e) => e.preventDefault(), onDragLeave: handleDragLeave, onDrop: handleDrop, onClick: handleClick, onKeyDown: handleKeyDown }, (!props.disabled && !props.noKeyboard ? { tabIndex: 0 } : {}), { role: "presentation", children: [jsxRuntime.jsx("input", { type: "file", multiple: props.multiple, style: { display: 'none' }, ref: inputRef, disabled: props.disabled, onChange: handleFileSelect, onClick: (e) => e.stopPropagation(), tabIndex: -1, accept: acceptAttr }), icon && iconProp !== false && (jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass !== null && iconFamilyClass !== void 0 ? iconFamilyClass : familyClass, familyPrefix: iconFamilyPrefix !== null && iconFamilyPrefix !== void 0 ? iconFamilyPrefix : familyPrefix, materialStyle: iconMaterialStyle !== null && iconMaterialStyle !== void 0 ? iconMaterialStyle : materialStyle })), jsxRuntime.jsx("div", { className: "d-box-content", children: typeof children === 'function'
|
|
1128
1130
|
? children(openFileDialog)
|
|
1129
1131
|
: children || (jsxRuntime.jsx("p", { className: "d-box-file-empty-text", children: "Drag and drop some files here, or click to select files" })) })] })) })), !!files.length && (jsxRuntime.jsx("ul", { className: "d-box-files", children: files.map((file, index) => (jsxRuntime.jsx(ForwardedDInput, { value: file.name, iconStart: "Paperclip", iconEnd: "Trash", readOnly: true, onIconEndClick: () => handleRemoveFile(index) }, `${file.name} ${index}`))) }))] }));
|
|
1130
1132
|
}
|
|
1131
1133
|
|
|
1132
1134
|
const DButton = React.forwardRef((props, ref) => {
|
|
1133
1135
|
const { color = 'primary', size, variant = 'solid', text, children, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartMaterialStyle, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndMaterialStyle, loading = false, loadingText, loadingAriaLabel, disabled = false, className, style, dataAttributes, onClick, type = 'button', target, rel, href, 'aria-label': ariaLabelProp } = props, rest = tslib.__rest(props, ["color", "size", "variant", "text", "children", "iconStart", "iconStartFamilyClass", "iconStartFamilyPrefix", "iconStartMaterialStyle", "iconEnd", "iconEndFamilyClass", "iconEndFamilyPrefix", "iconEndMaterialStyle", "loading", "loadingText", "loadingAriaLabel", "disabled", "className", "style", "dataAttributes", "onClick", "type", "target", "rel", "href", 'aria-label']);
|
|
1136
|
+
const { icon: { familyClass, familyPrefix, materialStyle, }, } = useDContext();
|
|
1134
1137
|
// Responsive size resolution using useResponsiveProp
|
|
1135
1138
|
const { responsivePropValue } = useResponsiveProp(true);
|
|
1136
1139
|
const resolvedSize = React.useMemo(() => {
|
|
@@ -1184,7 +1187,7 @@ const DButton = React.forwardRef((props, ref) => {
|
|
|
1184
1187
|
ref.current = node;
|
|
1185
1188
|
}, className: classNames(classes, className), style: Object.assign(Object.assign({}, style), (loading && buttonWidth
|
|
1186
1189
|
? { minWidth: `${buttonWidth}px` }
|
|
1187
|
-
: undefined)), "aria-label": ariaLabel, "aria-busy": loading, "aria-disabled": isDisabled, onClick: handleClick }, dataAttributes, { children: [loading && (jsxRuntime.jsxs("span", { className: "btn-loading", children: [jsxRuntime.jsx("span", { className: "spinner-border spinner-border-sm", "aria-hidden": "true" }), loadingText && jsxRuntime.jsx("span", { role: "status", children: loadingText })] })), !loading && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [iconStart && (jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix, materialStyle: iconStartMaterialStyle })), content, iconEnd && (jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix, materialStyle: iconEndMaterialStyle }))] }))] })));
|
|
1190
|
+
: undefined)), "aria-label": ariaLabel, "aria-busy": loading, "aria-disabled": isDisabled, onClick: handleClick }, dataAttributes, { children: [loading && (jsxRuntime.jsxs("span", { className: "btn-loading", children: [jsxRuntime.jsx("span", { className: "spinner-border spinner-border-sm", "aria-hidden": "true" }), loadingText && jsxRuntime.jsx("span", { role: "status", children: loadingText })] })), !loading && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [iconStart && (jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass !== null && iconStartFamilyClass !== void 0 ? iconStartFamilyClass : familyClass, familyPrefix: iconStartFamilyPrefix !== null && iconStartFamilyPrefix !== void 0 ? iconStartFamilyPrefix : familyPrefix, materialStyle: iconStartMaterialStyle !== null && iconStartMaterialStyle !== void 0 ? iconStartMaterialStyle : materialStyle })), content, iconEnd && (jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass !== null && iconEndFamilyClass !== void 0 ? iconEndFamilyClass : familyClass, familyPrefix: iconEndFamilyPrefix !== null && iconEndFamilyPrefix !== void 0 ? iconEndFamilyPrefix : familyPrefix, materialStyle: iconEndMaterialStyle !== null && iconEndMaterialStyle !== void 0 ? iconEndMaterialStyle : materialStyle }))] }))] })));
|
|
1188
1191
|
}
|
|
1189
1192
|
return (jsxRuntime.jsxs("button", Object.assign({ ref: (node) => {
|
|
1190
1193
|
buttonRef.current = node;
|
|
@@ -1198,12 +1201,13 @@ const DButton = React.forwardRef((props, ref) => {
|
|
|
1198
1201
|
// eslint-disable-next-line react/button-has-type
|
|
1199
1202
|
type: type, className: classNames(classes, className), style: Object.assign(Object.assign({}, style), (loading && buttonWidth
|
|
1200
1203
|
? { minWidth: `${buttonWidth}px` }
|
|
1201
|
-
: undefined)), disabled: isDisabled, "aria-label": ariaLabel, "aria-busy": loading, "aria-disabled": isDisabled, onClick: handleClick }, dataAttributes, rest, { children: [loading && (jsxRuntime.jsxs("span", { className: "btn-loading", children: [jsxRuntime.jsx("span", { className: "spinner-border spinner-border-sm", "aria-hidden": "true" }), loadingText && jsxRuntime.jsx("span", { role: "status", children: loadingText })] })), !loading && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [iconStart && (jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix, materialStyle: iconStartMaterialStyle })), content, iconEnd && (jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix, materialStyle: iconEndMaterialStyle }))] }))] })));
|
|
1204
|
+
: undefined)), disabled: isDisabled, "aria-label": ariaLabel, "aria-busy": loading, "aria-disabled": isDisabled, onClick: handleClick }, dataAttributes, rest, { children: [loading && (jsxRuntime.jsxs("span", { className: "btn-loading", children: [jsxRuntime.jsx("span", { className: "spinner-border spinner-border-sm", "aria-hidden": "true" }), loadingText && jsxRuntime.jsx("span", { role: "status", children: loadingText })] })), !loading && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [iconStart && (jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass !== null && iconStartFamilyClass !== void 0 ? iconStartFamilyClass : familyClass, familyPrefix: iconStartFamilyPrefix !== null && iconStartFamilyPrefix !== void 0 ? iconStartFamilyPrefix : familyPrefix, materialStyle: iconStartMaterialStyle !== null && iconStartMaterialStyle !== void 0 ? iconStartMaterialStyle : materialStyle })), content, iconEnd && (jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass !== null && iconEndFamilyClass !== void 0 ? iconEndFamilyClass : familyClass, familyPrefix: iconEndFamilyPrefix !== null && iconEndFamilyPrefix !== void 0 ? iconEndFamilyPrefix : familyPrefix, materialStyle: iconEndMaterialStyle !== null && iconEndMaterialStyle !== void 0 ? iconEndMaterialStyle : materialStyle }))] }))] })));
|
|
1202
1205
|
});
|
|
1203
1206
|
DButton.displayName = 'DButton';
|
|
1204
1207
|
|
|
1205
1208
|
function DButtonIcon(_a) {
|
|
1206
1209
|
var { id, icon, size, className, variant, state, loadingAriaLabel, iconMaterialStyle, disabled = false, color = 'primary', loading = false, href, target, rel, stopPropagationEnabled = true, style, iconFamilyClass, iconFamilyPrefix, dataAttributes, onClick, 'aria-label': ariaLabelProp } = _a, rest = tslib.__rest(_a, ["id", "icon", "size", "className", "variant", "state", "loadingAriaLabel", "iconMaterialStyle", "disabled", "color", "loading", "href", "target", "rel", "stopPropagationEnabled", "style", "iconFamilyClass", "iconFamilyPrefix", "dataAttributes", "onClick", 'aria-label']);
|
|
1210
|
+
const { icon: { familyClass, familyPrefix, materialStyle, }, } = useDContext();
|
|
1207
1211
|
const generateClasses = React.useMemo(() => {
|
|
1208
1212
|
const variantClass = !variant || variant === 'solid'
|
|
1209
1213
|
? `btn-${color}`
|
|
@@ -1227,11 +1231,11 @@ function DButtonIcon(_a) {
|
|
|
1227
1231
|
if (href) {
|
|
1228
1232
|
return (jsxRuntime.jsx("a", Object.assign({ id: id, href: href, target: target, rel: rel, className: classNames(generateClasses, className), style: style, onClick: clickHandler, "aria-label": ariaLabel, "aria-disabled": isDisabled }, dataAttributes, { children: loading
|
|
1229
1233
|
? (jsxRuntime.jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", children: jsxRuntime.jsx("span", { className: "visually-hidden", children: "Loading..." }) }))
|
|
1230
|
-
: (jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })) })));
|
|
1234
|
+
: (jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass !== null && iconFamilyClass !== void 0 ? iconFamilyClass : familyClass, familyPrefix: iconFamilyPrefix !== null && iconFamilyPrefix !== void 0 ? iconFamilyPrefix : familyPrefix, materialStyle: iconMaterialStyle !== null && iconMaterialStyle !== void 0 ? iconMaterialStyle : materialStyle })) })));
|
|
1231
1235
|
}
|
|
1232
1236
|
return (jsxRuntime.jsx("button", Object.assign({ className: classNames(generateClasses, className), style: style, disabled: state === 'disabled' || loading, onClick: clickHandler, "aria-label": ariaLabel }, dataAttributes, rest, { children: loading
|
|
1233
1237
|
? (jsxRuntime.jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", children: jsxRuntime.jsx("span", { className: "visually-hidden", children: "Loading..." }) }))
|
|
1234
|
-
: (jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })) })));
|
|
1238
|
+
: (jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass !== null && iconFamilyClass !== void 0 ? iconFamilyClass : familyClass, familyPrefix: iconFamilyPrefix !== null && iconFamilyPrefix !== void 0 ? iconFamilyPrefix : familyPrefix, materialStyle: iconMaterialStyle !== null && iconMaterialStyle !== void 0 ? iconMaterialStyle : materialStyle })) })));
|
|
1235
1239
|
}
|
|
1236
1240
|
|
|
1237
1241
|
function DCardHeader({ className, style, children, }) {
|
|
@@ -1294,12 +1298,12 @@ function DChip({ color = 'primary', text, icon, iconFamilyClass, iconFamilyPrefi
|
|
|
1294
1298
|
'd-chip': true,
|
|
1295
1299
|
[`d-chip-${color}`]: !!color,
|
|
1296
1300
|
}), [color]);
|
|
1297
|
-
const { iconMap: { xLg, }, } = useDContext();
|
|
1301
|
+
const { icon: { familyClass, familyPrefix, materialStyle, }, iconMap: { xLg, }, } = useDContext();
|
|
1298
1302
|
const iconClose = React.useMemo(() => iconCloseProp || xLg, [iconCloseProp, xLg]);
|
|
1299
|
-
return (jsxRuntime.jsxs("span", Object.assign({ className: classNames(generateClasses, className), style: style }, dataAttributes, { children: [icon && (jsxRuntime.jsx("div", { className: "d-chip-icon-container", children: jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle }) })), jsxRuntime.jsx("span", { children: text }), showClose && (jsxRuntime.jsx("button", { type: "button", className: "d-chip-icon-container", onClick: onClose, "aria-label": closeAriaLabel, children: jsxRuntime.jsx(DIcon, { icon: iconClose, familyClass: iconCloseFamilyClass, familyPrefix: iconCloseFamilyPrefix, materialStyle: iconCloseMaterialStyle }) }))] })));
|
|
1303
|
+
return (jsxRuntime.jsxs("span", Object.assign({ className: classNames(generateClasses, className), style: style }, dataAttributes, { children: [icon && (jsxRuntime.jsx("div", { className: "d-chip-icon-container", children: jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass !== null && iconFamilyClass !== void 0 ? iconFamilyClass : familyClass, familyPrefix: iconFamilyPrefix !== null && iconFamilyPrefix !== void 0 ? iconFamilyPrefix : familyPrefix, materialStyle: iconMaterialStyle !== null && iconMaterialStyle !== void 0 ? iconMaterialStyle : materialStyle }) })), jsxRuntime.jsx("span", { children: text }), showClose && (jsxRuntime.jsx("button", { type: "button", className: "d-chip-icon-container", onClick: onClose, "aria-label": closeAriaLabel, children: jsxRuntime.jsx(DIcon, { icon: iconClose, familyClass: iconCloseFamilyClass !== null && iconCloseFamilyClass !== void 0 ? iconCloseFamilyClass : familyClass, familyPrefix: iconCloseFamilyPrefix !== null && iconCloseFamilyPrefix !== void 0 ? iconCloseFamilyPrefix : familyPrefix, materialStyle: iconCloseMaterialStyle !== null && iconCloseMaterialStyle !== void 0 ? iconCloseMaterialStyle : materialStyle }) }))] })));
|
|
1300
1304
|
}
|
|
1301
1305
|
|
|
1302
|
-
function DCollapse({ id, className, style, Component, defaultCollapsed = true, onChange, children, iconOpen: iconOpenProp, iconClose: iconCloseProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle
|
|
1306
|
+
function DCollapse({ id, className, style, Component, defaultCollapsed = true, onChange, children, iconOpen: iconOpenProp, iconClose: iconCloseProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, dataAttributes, }) {
|
|
1303
1307
|
const [collapsed, setCollapsed] = React.useState(defaultCollapsed);
|
|
1304
1308
|
const onChangeCollapse = () => {
|
|
1305
1309
|
setCollapsed((prev) => {
|
|
@@ -1313,10 +1317,10 @@ function DCollapse({ id, className, style, Component, defaultCollapsed = true, o
|
|
|
1313
1317
|
React.useEffect(() => {
|
|
1314
1318
|
setCollapsed(defaultCollapsed);
|
|
1315
1319
|
}, [defaultCollapsed]);
|
|
1316
|
-
const { iconMap: { chevronDown, chevronUp, }, } = useDContext();
|
|
1320
|
+
const { icon: { familyClass, familyPrefix, materialStyle, }, iconMap: { chevronDown, chevronUp, }, } = useDContext();
|
|
1317
1321
|
const iconOpen = React.useMemo(() => iconOpenProp || chevronDown, [chevronDown, iconOpenProp]);
|
|
1318
1322
|
const iconClose = React.useMemo(() => iconCloseProp || chevronUp, [chevronUp, iconCloseProp]);
|
|
1319
|
-
return (jsxRuntime.jsxs("div", Object.assign({ id: id, className: classNames('collapse-container', className), style: style }, dataAttributes, { children: [jsxRuntime.jsxs("button", { className: "collapse-button", type: "button", onClick: onChangeCollapse, children: [jsxRuntime.jsx("div", { className: "flex-grow-1", children: Component }), jsxRuntime.jsx(DIcon, { color: "primary", size: "1.25rem", icon: collapsed ? iconOpen : iconClose, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })] }), jsxRuntime.jsx("div", { className: classNames('collapse-body-wrapper', {
|
|
1323
|
+
return (jsxRuntime.jsxs("div", Object.assign({ id: id, className: classNames('collapse-container', className), style: style }, dataAttributes, { children: [jsxRuntime.jsxs("button", { className: "collapse-button", type: "button", onClick: onChangeCollapse, children: [jsxRuntime.jsx("div", { className: "flex-grow-1", children: Component }), jsxRuntime.jsx(DIcon, { className: "collapse-icon", color: "primary", size: "1.25rem", icon: collapsed ? iconOpen : iconClose, familyClass: iconFamilyClass !== null && iconFamilyClass !== void 0 ? iconFamilyClass : familyClass, familyPrefix: iconFamilyPrefix !== null && iconFamilyPrefix !== void 0 ? iconFamilyPrefix : familyPrefix, materialStyle: iconMaterialStyle !== null && iconMaterialStyle !== void 0 ? iconMaterialStyle : materialStyle })] }), jsxRuntime.jsx("div", { className: classNames('collapse-body-wrapper', {
|
|
1320
1324
|
show: !collapsed,
|
|
1321
1325
|
}), children: jsxRuntime.jsx("div", { className: "collapse-body", children: children }) })] })));
|
|
1322
1326
|
}
|
|
@@ -2107,9 +2111,9 @@ function DInputCheck(_a) {
|
|
|
2107
2111
|
]);
|
|
2108
2112
|
React.useEffect(() => {
|
|
2109
2113
|
if (innerRef.current) {
|
|
2110
|
-
innerRef.current.indeterminate = Boolean(indeterminate);
|
|
2114
|
+
innerRef.current.indeterminate = type === 'checkbox' && Boolean(indeterminate);
|
|
2111
2115
|
}
|
|
2112
|
-
}, [indeterminate]);
|
|
2116
|
+
}, [indeterminate, type]);
|
|
2113
2117
|
React.useEffect(() => {
|
|
2114
2118
|
if (innerRef.current) {
|
|
2115
2119
|
innerRef.current.checked = checked;
|
|
@@ -2302,10 +2306,18 @@ function DInputSelect({ id: idProp, name, label = '', className, style, options
|
|
|
2302
2306
|
}), children: [iconStart && (jsxRuntime.jsx("button", { type: "button", className: "input-group-text", id: `${id}Start`, onClick: iconStartClickHandler, disabled: disabled || loading, "aria-label": iconStartAriaLabel, children: iconStart && (jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix })) })), dynamicComponent, iconEnd && !loading && (jsxRuntime.jsx("button", { type: "button", className: "input-group-text", id: `${id}End`, onClick: iconEndClickHandler, disabled: disabled || loading, "aria-label": iconEndAriaLabel, children: iconEnd && (jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix })) })), loading && (jsxRuntime.jsx("div", { className: "input-group-text form-control-icon loading", children: jsxRuntime.jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", children: jsxRuntime.jsx("span", { className: "visually-hidden", children: "Loading..." }) }) }))] }), hint && (jsxRuntime.jsx("div", { className: "form-text", id: `${id}Hint`, children: hint }))] })));
|
|
2303
2307
|
}
|
|
2304
2308
|
|
|
2305
|
-
function DInputSwitch({ id: idProp, label, ariaLabel, name, checked, disabled, invalid = false, valid = false, readonly, className, style, dataAttributes, inputClassName, onChange, }) {
|
|
2309
|
+
function DInputSwitch({ id: idProp, label, ariaLabel, name, checked, disabled, invalid = false, valid = false, hint, readonly, className, style, dataAttributes, inputClassName, onChange, }) {
|
|
2306
2310
|
const innerId = React.useId();
|
|
2307
2311
|
const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
|
|
2308
2312
|
const [internalIsChecked, setInternalIsChecked] = React.useState(checked);
|
|
2313
|
+
const ariaDescribedby = React.useMemo(() => ([
|
|
2314
|
+
!!hint && `${id}Hint`,
|
|
2315
|
+
]
|
|
2316
|
+
.filter(Boolean)
|
|
2317
|
+
.join(' ')), [
|
|
2318
|
+
id,
|
|
2319
|
+
hint,
|
|
2320
|
+
]);
|
|
2309
2321
|
React.useEffect(() => {
|
|
2310
2322
|
setInternalIsChecked(checked);
|
|
2311
2323
|
}, [checked]);
|
|
@@ -2314,10 +2326,10 @@ function DInputSwitch({ id: idProp, label, ariaLabel, name, checked, disabled, i
|
|
|
2314
2326
|
setInternalIsChecked(value);
|
|
2315
2327
|
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
|
2316
2328
|
}, [onChange]);
|
|
2317
|
-
return (jsxRuntime.jsxs("div", Object.assign({ className: classNames('form-check form-switch', className) }, dataAttributes, { children: [jsxRuntime.jsx("input", { id: id, name: name, onChange: readonly ? () => false : changeHandler, className: classNames('form-check-input', {
|
|
2329
|
+
return (jsxRuntime.jsxs("div", Object.assign({ className: classNames('form-check form-switch', className) }, dataAttributes, { children: [jsxRuntime.jsx("input", Object.assign({ id: id, name: name, onChange: readonly ? () => false : changeHandler, className: classNames('form-check-input', {
|
|
2318
2330
|
'is-invalid': invalid,
|
|
2319
2331
|
'is-valid': valid,
|
|
2320
|
-
}, inputClassName), style: style, type: "checkbox", role: "switch", checked: internalIsChecked, disabled: disabled, "aria-label": ariaLabel }), label && (jsxRuntime.jsx("label", { className: "form-check-label", htmlFor: id, children: label }))] })));
|
|
2332
|
+
}, inputClassName), style: style, type: "checkbox", role: "switch", checked: internalIsChecked, disabled: disabled, "aria-label": ariaLabel }, ariaDescribedby && { 'aria-describedby': ariaDescribedby })), label && (jsxRuntime.jsx("label", { className: "form-check-label", htmlFor: id, children: label })), hint && (jsxRuntime.jsx("div", { className: "form-text", id: `${id}Hint`, children: hint }))] })));
|
|
2321
2333
|
}
|
|
2322
2334
|
|
|
2323
2335
|
function DInputRange(_a, ref) {
|
|
@@ -2358,6 +2370,7 @@ const ForwardedDInputRange = React.forwardRef(DInputRange);
|
|
|
2358
2370
|
ForwardedDInputRange.displayName = 'DInputRange';
|
|
2359
2371
|
|
|
2360
2372
|
function DListGroupItem({ as = 'li', action: actionProp, active, disabled, href, onClick, color, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartMaterialStyle, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndMaterialStyle, children, className, style, dataAttributes, }) {
|
|
2373
|
+
const { icon: { familyClass, familyPrefix, materialStyle, }, } = useDContext();
|
|
2361
2374
|
const Tag = React.useMemo(() => {
|
|
2362
2375
|
if (href) {
|
|
2363
2376
|
return 'a';
|
|
@@ -2386,7 +2399,7 @@ function DListGroupItem({ as = 'li', action: actionProp, active, disabled, href,
|
|
|
2386
2399
|
}
|
|
2387
2400
|
return Object.assign(Object.assign({}, active && { 'aria-current': true }), disabled && { 'aria-disabled': true });
|
|
2388
2401
|
}, [Tag, active, disabled]);
|
|
2389
|
-
return (jsxRuntime.jsxs(Tag, Object.assign({ className: classNames(generateClasses, className), style: style }, Tag === 'a' && href && { href }, onClick && { onClick }, ariaAttributes, dataAttributes, Tag === 'button' && { type: 'button' }, { children: [iconStart && (jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass, familyPrefix: iconStartFamilyPrefix, materialStyle: iconStartMaterialStyle })), children, iconEnd && (jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix, materialStyle: iconEndMaterialStyle, className: "ms-auto" }))] })));
|
|
2402
|
+
return (jsxRuntime.jsxs(Tag, Object.assign({ className: classNames(generateClasses, className), style: style }, Tag === 'a' && href && { href }, onClick && { onClick }, ariaAttributes, dataAttributes, Tag === 'button' && { type: 'button' }, { children: [iconStart && (jsxRuntime.jsx(DIcon, { icon: iconStart, familyClass: iconStartFamilyClass !== null && iconStartFamilyClass !== void 0 ? iconStartFamilyClass : familyClass, familyPrefix: iconStartFamilyPrefix !== null && iconStartFamilyPrefix !== void 0 ? iconStartFamilyPrefix : familyPrefix, materialStyle: iconStartMaterialStyle !== null && iconStartMaterialStyle !== void 0 ? iconStartMaterialStyle : materialStyle })), children, iconEnd && (jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass !== null && iconEndFamilyClass !== void 0 ? iconEndFamilyClass : familyClass, familyPrefix: iconEndFamilyPrefix !== null && iconEndFamilyPrefix !== void 0 ? iconEndFamilyPrefix : familyPrefix, materialStyle: iconEndMaterialStyle !== null && iconEndMaterialStyle !== void 0 ? iconEndMaterialStyle : materialStyle, className: "ms-auto" }))] })));
|
|
2390
2403
|
}
|
|
2391
2404
|
|
|
2392
2405
|
function DListGroup$1({ as = 'ul', numbered, flush, horizontal, children, className, style, dataAttributes, }) {
|
|
@@ -2413,10 +2426,11 @@ var DListGroup = Object.assign(DListGroup$1, {
|
|
|
2413
2426
|
Item: DListGroupItem,
|
|
2414
2427
|
});
|
|
2415
2428
|
|
|
2416
|
-
function DModalHeader({ showCloseButton, onClose, children, className, style, iconFamilyClass, iconFamilyPrefix, icon: iconProp, materialStyle
|
|
2417
|
-
|
|
2429
|
+
function DModalHeader({ showCloseButton, onClose, children, className, style, iconFamilyClass, iconFamilyPrefix, icon: iconProp, iconMaterialStyle, materialStyle: materialStyleProp, }) {
|
|
2430
|
+
var _a;
|
|
2431
|
+
const { icon: { familyClass, familyPrefix, materialStyle, }, iconMap: { xLg, }, } = useDContext();
|
|
2418
2432
|
const icon = React.useMemo(() => iconProp || xLg, [iconProp, xLg]);
|
|
2419
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: classNames('modal-header', className), style: style, children: [jsxRuntime.jsx("div", { children: children }), showCloseButton && (jsxRuntime.jsx("button", { type: "button", className: "d-close", "aria-label": "Close", onClick: onClose, children: jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: materialStyle }) }))] }), jsxRuntime.jsx("div", { className: "d-modal-separator" })] }));
|
|
2433
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: classNames('modal-header', className), style: style, children: [jsxRuntime.jsx("div", { children: children }), showCloseButton && (jsxRuntime.jsx("button", { type: "button", className: "d-close", "aria-label": "Close", onClick: onClose, children: jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass !== null && iconFamilyClass !== void 0 ? iconFamilyClass : familyClass, familyPrefix: iconFamilyPrefix !== null && iconFamilyPrefix !== void 0 ? iconFamilyPrefix : familyPrefix, materialStyle: (_a = iconMaterialStyle !== null && iconMaterialStyle !== void 0 ? iconMaterialStyle : materialStyleProp) !== null && _a !== void 0 ? _a : materialStyle }) }))] }), jsxRuntime.jsx("div", { className: "d-modal-separator" })] }));
|
|
2420
2434
|
}
|
|
2421
2435
|
|
|
2422
2436
|
function DModalBody({ children, className, style, }) {
|
|
@@ -2457,10 +2471,11 @@ var DModal = Object.assign(DModal$1, {
|
|
|
2457
2471
|
Footer: DModalFooter,
|
|
2458
2472
|
});
|
|
2459
2473
|
|
|
2460
|
-
function DOffcanvasHeader({ showCloseButton, onClose, children, className, style, iconFamilyClass, iconFamilyPrefix, icon: iconProp, materialStyle
|
|
2461
|
-
|
|
2474
|
+
function DOffcanvasHeader({ showCloseButton, onClose, children, className, style, iconFamilyClass, iconFamilyPrefix, icon: iconProp, iconMaterialStyle, materialStyle: materialStyleProp, }) {
|
|
2475
|
+
var _a;
|
|
2476
|
+
const { icon: { familyClass, familyPrefix, materialStyle, }, iconMap: { xLg, }, } = useDContext();
|
|
2462
2477
|
const icon = React.useMemo(() => iconProp || xLg, [iconProp, xLg]);
|
|
2463
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: classNames('offcanvas-header', className), style: style, children: [jsxRuntime.jsx("div", { children: children }), showCloseButton && (jsxRuntime.jsx("button", { type: "button", className: "d-close", "aria-label": "Close", onClick: onClose, children: jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: materialStyle }) }))] }), jsxRuntime.jsx("div", { className: "d-offcanvas-separator" })] }));
|
|
2478
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: classNames('offcanvas-header', className), style: style, children: [jsxRuntime.jsx("div", { children: children }), showCloseButton && (jsxRuntime.jsx("button", { type: "button", className: "d-close", "aria-label": "Close", onClick: onClose, children: jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass !== null && iconFamilyClass !== void 0 ? iconFamilyClass : familyClass, familyPrefix: iconFamilyPrefix !== null && iconFamilyPrefix !== void 0 ? iconFamilyPrefix : familyPrefix, materialStyle: (_a = iconMaterialStyle !== null && iconMaterialStyle !== void 0 ? iconMaterialStyle : materialStyleProp) !== null && _a !== void 0 ? _a : materialStyle }) }))] }), jsxRuntime.jsx("div", { className: "d-offcanvas-separator" })] }));
|
|
2464
2479
|
}
|
|
2465
2480
|
|
|
2466
2481
|
function DOffcanvasBody({ children, className, style, }) {
|
|
@@ -2601,8 +2616,8 @@ function DProgress({ className, style, currentValue, minValue = 0, maxValue = 10
|
|
|
2601
2616
|
return (jsxRuntime.jsx("div", Object.assign({ className: classNames('progress', className), style: Object.assign({ height }, style) }, dataAttributes, { children: jsxRuntime.jsx("div", { className: classNames(generateClasses), role: "progressbar", "aria-label": "Progress bar", style: { width: formatProgress }, "aria-valuenow": currentValue, "aria-valuemin": minValue, "aria-valuemax": maxValue, children: !hideCurrentValue && formatProgress }) })));
|
|
2602
2617
|
}
|
|
2603
2618
|
|
|
2604
|
-
function DStepper$2({ options, currentStep, iconSuccess: iconSuccessProp, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle
|
|
2605
|
-
const { iconMap: { check, }, } = useDContext();
|
|
2619
|
+
function DStepper$2({ options, currentStep, iconSuccess: iconSuccessProp, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle, vertical = false, completed, alignStart = false, className, style, }) {
|
|
2620
|
+
const { icon: { familyClass, familyPrefix, materialStyle, }, iconMap: { check, }, } = useDContext();
|
|
2606
2621
|
const icon = React.useMemo(() => iconSuccessProp || check, [check, iconSuccessProp]);
|
|
2607
2622
|
if (currentStep < 1 || currentStep > options.length) {
|
|
2608
2623
|
throw new Error('Current step should be in the range from 1 to options length');
|
|
@@ -2617,7 +2632,7 @@ function DStepper$2({ options, currentStep, iconSuccess: iconSuccessProp, iconSu
|
|
|
2617
2632
|
}), children: [jsxRuntime.jsx("div", { className: "d-step-value", children: jsxRuntime.jsxs("div", { className: classNames({
|
|
2618
2633
|
'd-step-icon-container': true,
|
|
2619
2634
|
'd-step-check': value < currentStep || completed,
|
|
2620
|
-
}), children: [((value < currentStep) || completed) && (jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconSuccessFamilyClass, familyPrefix: iconSuccessFamilyPrefix, materialStyle: iconSuccessMaterialStyle, className: "d-step-icon" })), value] }) }), jsxRuntime.jsxs("div", { className: "d-step-text-container", children: [jsxRuntime.jsx("div", { className: "d-step-label", children: label }), description && (jsxRuntime.jsx("div", { className: "d-step-description", children: description }))] })] }, value))) }));
|
|
2635
|
+
}), children: [((value < currentStep) || completed) && (jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconSuccessFamilyClass !== null && iconSuccessFamilyClass !== void 0 ? iconSuccessFamilyClass : familyClass, familyPrefix: iconSuccessFamilyPrefix !== null && iconSuccessFamilyPrefix !== void 0 ? iconSuccessFamilyPrefix : familyPrefix, materialStyle: iconSuccessMaterialStyle !== null && iconSuccessMaterialStyle !== void 0 ? iconSuccessMaterialStyle : materialStyle, className: "d-step-icon" })), value] }) }), jsxRuntime.jsxs("div", { className: "d-step-text-container", children: [jsxRuntime.jsx("div", { className: "d-step-label", children: label }), description && (jsxRuntime.jsx("div", { className: "d-step-description", children: description }))] })] }, value))) }));
|
|
2621
2636
|
}
|
|
2622
2637
|
|
|
2623
2638
|
function DStepper$1({ options, currentStep, className, style, }) {
|
|
@@ -2650,13 +2665,20 @@ function DStepper$1({ options, currentStep, className, style, }) {
|
|
|
2650
2665
|
return (jsxRuntime.jsxs("div", { className: classNames('d-stepper', className), style: style, children: [jsxRuntime.jsx("div", { className: "d-step-bar", style: { background: progressStyle }, children: jsxRuntime.jsx("p", { className: "d-step-number", children: `${currentStep}/${options.length}` }) }), jsxRuntime.jsx("div", { className: "d-step-info", children: Object.keys(currentOption).length > 0 && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "d-step-label", children: currentOption.label }), jsxRuntime.jsx("div", { className: "d-step-description", children: currentOption.description || '' })] })) })] }));
|
|
2651
2666
|
}
|
|
2652
2667
|
|
|
2653
|
-
function DStepper({ options, currentStep, iconSuccess, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle
|
|
2654
|
-
|
|
2668
|
+
function DStepper({ options, currentStep, iconSuccess, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle, vertical = false, breakpoint = 'lg', className, completed = false, style, dataAttributes, }) {
|
|
2669
|
+
const { icon: { familyClass, familyPrefix, materialStyle, }, } = useDContext();
|
|
2670
|
+
return (jsxRuntime.jsxs("div", Object.assign({ className: className, style: style }, dataAttributes, { children: [jsxRuntime.jsx("div", { className: classNames('d-stepper-mobile', `d-block d-${breakpoint}-none`), children: jsxRuntime.jsx(DStepper$1, { options: options, currentStep: currentStep }) }), jsxRuntime.jsx("div", { className: classNames('d-stepper-desktop', `d-none d-${breakpoint}-block`), children: jsxRuntime.jsx(DStepper$2, { options: options, currentStep: currentStep, vertical: vertical, iconSuccess: iconSuccess, iconSuccessFamilyClass: iconSuccessFamilyClass !== null && iconSuccessFamilyClass !== void 0 ? iconSuccessFamilyClass : familyClass, iconSuccessFamilyPrefix: iconSuccessFamilyPrefix !== null && iconSuccessFamilyPrefix !== void 0 ? iconSuccessFamilyPrefix : familyPrefix, iconSuccessMaterialStyle: iconSuccessMaterialStyle !== null && iconSuccessMaterialStyle !== void 0 ? iconSuccessMaterialStyle : materialStyle, completed: completed }) })] })));
|
|
2655
2671
|
}
|
|
2656
2672
|
|
|
2657
2673
|
const ARROW_WIDTH = 8;
|
|
2658
2674
|
const ARROW_HEIGHT = 4;
|
|
2659
2675
|
const GAP$1 = 2;
|
|
2676
|
+
/**
|
|
2677
|
+
* Tooltip is an abstraction component that wraps any element (`Component`) and displays
|
|
2678
|
+
* floating contextual content (`children`) positioned relative to it using Floating UI.
|
|
2679
|
+
* Use it to add short, non-critical hints or descriptions triggered by hover, focus, or
|
|
2680
|
+
* click, without altering the surrounding layout.
|
|
2681
|
+
*/
|
|
2660
2682
|
function DTooltip({ className, childrenClassName, style, offSet = ARROW_HEIGHT + GAP$1, padding, withFocus = false, withClick = false, withHover = true, open = false, placement = 'top', size, Component, children, }) {
|
|
2661
2683
|
const [isOpen, setIsOpen] = React.useState(open);
|
|
2662
2684
|
const arrowRef = React.useRef(null);
|
|
@@ -2939,11 +2961,132 @@ function validatePhoneNumber(phone) {
|
|
|
2939
2961
|
}
|
|
2940
2962
|
}
|
|
2941
2963
|
|
|
2964
|
+
const SAFE_SCHEMES = new Set(['http:', 'https:', 'mailto:', 'tel:']);
|
|
2965
|
+
/**
|
|
2966
|
+
* Characters the URL parser drops before resolving a URL, so they cannot be used to hide a
|
|
2967
|
+
* scheme-relative prefix or a dangerous scheme (e.g. `/<TAB>/evil.com`, `java<TAB>script:`).
|
|
2968
|
+
*/
|
|
2969
|
+
const IGNORED_CHARS$1 = /[\t\n\r]/g;
|
|
2970
|
+
/**
|
|
2971
|
+
* Two leading separators in any combination. Browsers treat a leading `\` exactly like a
|
|
2972
|
+
* leading `/`, so `//`, `/\`, `\/` and `\\` all resolve to a scheme-relative URL.
|
|
2973
|
+
*/
|
|
2974
|
+
const SCHEME_RELATIVE = /^[/\\]{2}/;
|
|
2975
|
+
const LEADING_SEPARATOR = /^[/\\]/;
|
|
2976
|
+
/**
|
|
2977
|
+
* Validates a `href` value and returns it only if it is safe to render as a link,
|
|
2978
|
+
* preventing XSS through unsafe URL schemes and scheme-relative URLs.
|
|
2979
|
+
*
|
|
2980
|
+
* Before validating, the value is trimmed and every tab, line feed and carriage return is
|
|
2981
|
+
* removed, because the URL parser ignores those characters too and they would otherwise
|
|
2982
|
+
* hide an unsafe value from the checks below.
|
|
2983
|
+
*
|
|
2984
|
+
* A `href` is considered safe when it is either:
|
|
2985
|
+
* - An absolute path starting with a single separator (e.g. `/accounts/42`). A leading `\`
|
|
2986
|
+
* is normalized to `/` in the returned value, since that is how the browser resolves it.
|
|
2987
|
+
* - A URL using one of the allowed schemes: `http:`, `https:`, `mailto:`, `tel:`.
|
|
2988
|
+
*
|
|
2989
|
+
* A `href` is rejected (returns `undefined`) when it is:
|
|
2990
|
+
* - Empty or made only of whitespace/ignored characters (`''`, `' '`).
|
|
2991
|
+
* - Scheme-relative (starts with two separators, e.g. `//evil.com`, `/\evil.com`,
|
|
2992
|
+
* `/<TAB>/evil.com`), since the browser would resolve it using the current protocol and it
|
|
2993
|
+
* can be used to redirect to an attacker-controlled host.
|
|
2994
|
+
* - Using a disallowed/dangerous scheme, such as `javascript:` or `data:`
|
|
2995
|
+
* (e.g. `javascript:alert(1)`, `data:text/html,<script>...</script>`).
|
|
2996
|
+
* - Not parseable as an absolute URL and not an absolute path, such as bare fragments
|
|
2997
|
+
* (`#anchor`) or scheme-less relative paths (`relative/path`). These cannot be validated
|
|
2998
|
+
* against `SAFE_SCHEMES`, so they are rejected rather than assumed safe.
|
|
2999
|
+
*
|
|
3000
|
+
* @param href - The raw URL or path to validate, typically coming from user input,
|
|
3001
|
+
* a CMS, or an external API.
|
|
3002
|
+
* @returns The sanitized `href` when safe, `undefined` otherwise.
|
|
3003
|
+
*
|
|
3004
|
+
* @example
|
|
3005
|
+
* sanitizeHref('/accounts/42'); // '/accounts/42'
|
|
3006
|
+
* sanitizeHref('https://example.com'); // 'https://example.com'
|
|
3007
|
+
* sanitizeHref('mailto:test@example.com'); // 'mailto:test@example.com'
|
|
3008
|
+
* sanitizeHref('//evil.com'); // undefined
|
|
3009
|
+
* sanitizeHref('/\\evil.com'); // undefined
|
|
3010
|
+
* sanitizeHref('javascript:alert(1)'); // undefined
|
|
3011
|
+
*/
|
|
3012
|
+
function sanitizeHref(href) {
|
|
3013
|
+
const normalized = href.trim().replace(IGNORED_CHARS$1, '');
|
|
3014
|
+
if (!normalized)
|
|
3015
|
+
return undefined;
|
|
3016
|
+
if (SCHEME_RELATIVE.test(normalized))
|
|
3017
|
+
return undefined;
|
|
3018
|
+
if (LEADING_SEPARATOR.test(normalized))
|
|
3019
|
+
return `/${normalized.slice(1)}`;
|
|
3020
|
+
try {
|
|
3021
|
+
const { protocol } = new URL(normalized);
|
|
3022
|
+
return SAFE_SCHEMES.has(protocol) ? normalized : undefined;
|
|
3023
|
+
}
|
|
3024
|
+
catch (_a) {
|
|
3025
|
+
return undefined;
|
|
3026
|
+
}
|
|
3027
|
+
}
|
|
3028
|
+
|
|
3029
|
+
/**
|
|
3030
|
+
* Characters the URL parser drops before resolving a URL, so they cannot be used to hide a
|
|
3031
|
+
* scheme-relative prefix (e.g. `/<TAB>/evil.com`).
|
|
3032
|
+
*/
|
|
3033
|
+
const IGNORED_CHARS = /[\t\n\r]/g;
|
|
3034
|
+
/**
|
|
3035
|
+
* Leading separators. Browsers treat a leading `\` exactly like a leading `/`, so both have
|
|
3036
|
+
* to be stripped to prevent scheme-relative URLs (`//evil.com`, `/\evil.com`, `\\evil.com`).
|
|
3037
|
+
*/
|
|
3038
|
+
const LEADING_SEPARATORS = /^[/\\]+/;
|
|
3039
|
+
/**
|
|
3040
|
+
* Builds an internal URL from a `path` and a set of query `params`, normalizing leading
|
|
3041
|
+
* separators to prevent scheme-relative URLs (e.g. `//accounts` and `/\accounts` both become
|
|
3042
|
+
* `/accounts`).
|
|
3043
|
+
*
|
|
3044
|
+
* The `path` is trimmed and every tab, line feed and carriage return is removed before
|
|
3045
|
+
* building the result, because the URL parser ignores those characters too and they would
|
|
3046
|
+
* otherwise hide a scheme-relative prefix (`/<TAB>/evil.com` resolves to `//evil.com`).
|
|
3047
|
+
*
|
|
3048
|
+
* Handles the special case where `path` is the literal string `'#'`, which happens when
|
|
3049
|
+
* a Liquid template variable used as a link target is left unconfigured; in that case the
|
|
3050
|
+
* params are ignored and `'#'` is returned as-is instead of building a broken URL.
|
|
3051
|
+
*
|
|
3052
|
+
* @param path - The path to build the URL from. Leading separators are stripped before
|
|
3053
|
+
* building the result (`/accounts`, `//accounts` and `\accounts` are all treated as `accounts`).
|
|
3054
|
+
* @param params - Key/value pairs serialized as the query string.
|
|
3055
|
+
* @returns The resulting URL:
|
|
3056
|
+
* - `'#'` when `path` normalizes to `'#'` (`'#'`, `'/#'`), ignoring the params.
|
|
3057
|
+
* - `'/'` when `path` is empty and there are no params.
|
|
3058
|
+
* - `'/?<query>'` when `path` is empty and there are params.
|
|
3059
|
+
* - `'<path>'` or `'<path>?<query>'` when `path` starts with `#`, since a fragment must not be
|
|
3060
|
+
* prefixed with `/` (it would navigate away from the current document).
|
|
3061
|
+
* - `'/<path>'` or `'/<path>?<query>'` otherwise.
|
|
3062
|
+
*
|
|
3063
|
+
* @example
|
|
3064
|
+
* buildUrl('accounts', { account_id: '42' }); // '/accounts?account_id=42'
|
|
3065
|
+
* buildUrl('//accounts', {}); // '/accounts'
|
|
3066
|
+
* buildUrl('#', { account_id: '42' }); // '#'
|
|
3067
|
+
* buildUrl('#accounts', { account_id: '42' }); // '#accounts?account_id=42'
|
|
3068
|
+
* buildUrl('', { tab: 'movimientos' }); // '/?tab=movimientos'
|
|
3069
|
+
*/
|
|
3070
|
+
function buildUrl(path, params) {
|
|
3071
|
+
const normalizedPath = path
|
|
3072
|
+
.trim()
|
|
3073
|
+
.replace(IGNORED_CHARS, '')
|
|
3074
|
+
.replace(LEADING_SEPARATORS, '');
|
|
3075
|
+
if (normalizedPath === '#')
|
|
3076
|
+
return '#';
|
|
3077
|
+
const query = new URLSearchParams(Object.entries(params).map(([key, value]) => [key, String(value)])).toString();
|
|
3078
|
+
if (normalizedPath === '')
|
|
3079
|
+
return query ? `/?${query}` : '/';
|
|
3080
|
+
const prefix = normalizedPath.startsWith('#') ? '' : '/';
|
|
3081
|
+
return `${prefix}${normalizedPath}${query ? `?${query}` : ''}`;
|
|
3082
|
+
}
|
|
3083
|
+
|
|
2942
3084
|
function DInputPhone(_a, ref) {
|
|
2943
3085
|
var { id: idProp, style, className, label = '', disabled = false, loading = false, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, iconEnd, iconEndDisabled, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconEndTabIndex, iconEndMaterialStyle, hint, size, invalid = false, valid = false, floatingLabel = false, inputEnd, value, placeholder = '', dataAttributes, onChange, onIconEndClick, countrySelectorProps, filteredCountries, defaultCountry = 'cl' } = _a, inputProps = tslib.__rest(_a, ["id", "style", "className", "label", "disabled", "loading", "iconFamilyClass", "iconFamilyPrefix", "iconMaterialStyle", "iconEnd", "iconEndDisabled", "iconEndFamilyClass", "iconEndFamilyPrefix", "iconEndAriaLabel", "iconEndTabIndex", "iconEndMaterialStyle", "hint", "size", "invalid", "valid", "floatingLabel", "inputEnd", "value", "placeholder", "dataAttributes", "onChange", "onIconEndClick", "countrySelectorProps", "filteredCountries", "defaultCountry"]);
|
|
2944
3086
|
const innerRef = useProvidedRefOrCreate(ref);
|
|
2945
3087
|
const innerId = React.useId();
|
|
2946
3088
|
const id = React.useMemo(() => idProp || innerId, [idProp, innerId]);
|
|
3089
|
+
const { icon: { familyClass, familyPrefix, materialStyle, }, } = useDContext();
|
|
2947
3090
|
const handleOnIconEndClick = React.useCallback(() => {
|
|
2948
3091
|
onIconEndClick === null || onIconEndClick === void 0 ? void 0 : onIconEndClick(value);
|
|
2949
3092
|
}, [onIconEndClick, value]);
|
|
@@ -3017,7 +3160,7 @@ function DInputPhone(_a, ref) {
|
|
|
3017
3160
|
[`input-group-${size}`]: !!size,
|
|
3018
3161
|
'input-group': true,
|
|
3019
3162
|
'has-validation': invalid || valid,
|
|
3020
|
-
}), children: [jsxRuntime.jsx(reactInternationalPhone.CountrySelector, Object.assign({}, countrySelectorProps, { selectedCountry: country.iso2, onSelect: ({ iso2 }) => setCountry(iso2), countries: countries, disabled: disabled || loading, className: classNames('input-group-text', countrySelectorProps === null || countrySelectorProps === void 0 ? void 0 : countrySelectorProps.className) })), dynamicComponent, (iconEnd && !loading) && (jsxRuntime.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: jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass, familyPrefix: iconEndFamilyPrefix, materialStyle: iconEndMaterialStyle }) })), loading && (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}Loading`, children: jsxRuntime.jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", children: jsxRuntime.jsx("span", { className: "visually-hidden", children: "Loading..." }) }) })), !!inputEnd && (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}InputEnd`, children: inputEnd }))] }), hint && (jsxRuntime.jsx("div", { className: "form-text", id: `${id}Hint`, children: hint }))] })));
|
|
3163
|
+
}), children: [jsxRuntime.jsx(reactInternationalPhone.CountrySelector, Object.assign({}, countrySelectorProps, { selectedCountry: country.iso2, onSelect: ({ iso2 }) => setCountry(iso2), countries: countries, disabled: disabled || loading, className: classNames('input-group-text', countrySelectorProps === null || countrySelectorProps === void 0 ? void 0 : countrySelectorProps.className) })), dynamicComponent, (iconEnd && !loading) && (jsxRuntime.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: jsxRuntime.jsx(DIcon, { icon: iconEnd, familyClass: iconEndFamilyClass !== null && iconEndFamilyClass !== void 0 ? iconEndFamilyClass : familyClass, familyPrefix: iconEndFamilyPrefix !== null && iconEndFamilyPrefix !== void 0 ? iconEndFamilyPrefix : familyPrefix, materialStyle: iconEndMaterialStyle !== null && iconEndMaterialStyle !== void 0 ? iconEndMaterialStyle : materialStyle }) })), loading && (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}Loading`, children: jsxRuntime.jsx("span", { className: "spinner-border spinner-border-sm", role: "status", "aria-hidden": "true", children: jsxRuntime.jsx("span", { className: "visually-hidden", children: "Loading..." }) }) })), !!inputEnd && (jsxRuntime.jsx("div", { className: "input-group-text", id: `${id}InputEnd`, children: inputEnd }))] }), hint && (jsxRuntime.jsx("div", { className: "form-text", id: `${id}Hint`, children: hint }))] })));
|
|
3021
3164
|
}
|
|
3022
3165
|
const ForwardedDInputPhone = React.forwardRef(DInputPhone);
|
|
3023
3166
|
ForwardedDInputPhone.displayName = 'DInputPhone';
|
|
@@ -3696,12 +3839,14 @@ exports.DVoucher = DVoucher;
|
|
|
3696
3839
|
exports.EmptyState = EmptyState;
|
|
3697
3840
|
exports.ErrorState = ErrorState;
|
|
3698
3841
|
exports.LoadingState = LoadingState;
|
|
3842
|
+
exports.buildUrl = buildUrl;
|
|
3699
3843
|
exports.changeQueryString = changeQueryString;
|
|
3700
3844
|
exports.checkMediaQuery = checkMediaQuery;
|
|
3701
3845
|
exports.configureI18n = configureI8n;
|
|
3702
3846
|
exports.formatCurrency = formatCurrency;
|
|
3703
3847
|
exports.getCssVariable = getCssVariable;
|
|
3704
3848
|
exports.getQueryString = getQueryString;
|
|
3849
|
+
exports.sanitizeHref = sanitizeHref;
|
|
3705
3850
|
exports.subscribeToMediaQuery = subscribeToMediaQuery;
|
|
3706
3851
|
exports.useConfirmModal = useConfirmModal;
|
|
3707
3852
|
exports.useCountdown = useCountdown;
|