@dynamic-framework/ui-react 1.36.1 → 1.36.3
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 +81 -12
- package/dist/css/dynamic-ui-non-root.min.css +2 -2
- package/dist/css/dynamic-ui-root.css +1 -1
- package/dist/css/dynamic-ui-root.min.css +1 -1
- package/dist/css/dynamic-ui.css +81 -12
- package/dist/css/dynamic-ui.min.css +2 -2
- package/dist/index.esm.js +15 -15
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +49 -49
- package/dist/index.js.map +1 -1
- package/dist/js/bootstrap.bundle.js +3 -6
- package/dist/js/bootstrap.bundle.min.js +2 -2
- package/dist/js/bootstrap.esm.js +3 -6
- package/dist/js/bootstrap.esm.min.js +2 -2
- package/dist/js/bootstrap.js +3 -6
- package/dist/js/bootstrap.min.js +2 -2
- package/package.json +17 -15
- package/src/style/abstracts/variables/_forms.scss +2 -2
- package/src/style/abstracts/variables/_z-index.scss +24 -0
- package/src/style/components/_d-icon.scss +1 -1
- package/src/style/components/_d-select.scss +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -458,7 +458,7 @@ function DInput(_a, ref) {
|
|
|
458
458
|
[`input-group-${size}`]: !!size,
|
|
459
459
|
'input-group': true,
|
|
460
460
|
'has-validation': invalid || valid,
|
|
461
|
-
}), 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, (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 }))] })));
|
|
461
|
+
}), 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, (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", "data-testid": "loading-spinner", 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 }))] })));
|
|
462
462
|
}
|
|
463
463
|
const ForwardedDInput = forwardRef(DInput);
|
|
464
464
|
ForwardedDInput.displayName = 'DInput';
|
|
@@ -962,24 +962,24 @@ function DChip({ theme = 'primary', text, icon, iconFamilyClass, iconFamilyPrefi
|
|
|
962
962
|
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 }) }))] })));
|
|
963
963
|
}
|
|
964
964
|
|
|
965
|
-
function DCollapse({ id, className, style, Component, hasSeparator = false, defaultCollapsed =
|
|
966
|
-
const [
|
|
967
|
-
const onChangeCollapse = () =>
|
|
965
|
+
function DCollapse({ id, className, style, Component, hasSeparator = false, defaultCollapsed = true, onChange, children, iconOpen: iconOpenProp, iconClose: iconCloseProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle = false, dataAttributes, }) {
|
|
966
|
+
const [collapsed, setCollapsed] = useState(defaultCollapsed);
|
|
967
|
+
const onChangeCollapse = () => {
|
|
968
|
+
setCollapsed((prev) => {
|
|
969
|
+
const next = !prev;
|
|
970
|
+
if (onChange) {
|
|
971
|
+
onChange(next);
|
|
972
|
+
}
|
|
973
|
+
return next;
|
|
974
|
+
});
|
|
975
|
+
};
|
|
968
976
|
const { iconMap: { chevronDown, chevronUp, }, } = useDContext();
|
|
969
|
-
const iconOpen = useMemo(() => iconOpenProp ||
|
|
970
|
-
const iconClose = useMemo(() => iconCloseProp ||
|
|
971
|
-
useEffect(() => {
|
|
972
|
-
if (onChange) {
|
|
973
|
-
onChange(toggle);
|
|
974
|
-
}
|
|
975
|
-
}, [toggle, onChange]);
|
|
976
|
-
useEffect(() => {
|
|
977
|
-
setToggle(defaultCollapsed);
|
|
978
|
-
}, [defaultCollapsed]);
|
|
977
|
+
const iconOpen = useMemo(() => iconOpenProp || chevronDown, [chevronDown, iconOpenProp]);
|
|
978
|
+
const iconClose = useMemo(() => iconCloseProp || chevronUp, [chevronUp, iconCloseProp]);
|
|
979
979
|
const generateStyles = useMemo(() => ({
|
|
980
980
|
[`--${PREFIX_BS}collapse-separator-display`]: hasSeparator ? 'block' : 'none',
|
|
981
981
|
}), [hasSeparator]);
|
|
982
|
-
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:
|
|
982
|
+
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: collapsed ? iconOpen : iconClose, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: iconMaterialStyle })] }), !collapsed && (jsx("div", { className: classNames({
|
|
983
983
|
'collapse-body': true,
|
|
984
984
|
}), style: generateStyles, children: children }))] })));
|
|
985
985
|
}
|