@dynamic-framework/ui-react 1.17.0 → 1.18.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-non-root.css +69 -76
- package/dist/css/dynamic-ui-non-root.min.css +2 -2
- package/dist/css/dynamic-ui-root.css +10 -7
- package/dist/css/dynamic-ui-root.min.css +2 -2
- package/dist/css/dynamic-ui.css +78 -82
- package/dist/css/dynamic-ui.min.css +2 -2
- package/dist/index.esm.js +2 -12
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -12
- package/dist/index.js.map +1 -1
- package/dist/types/components/DButton/DButton.d.ts +1 -1
- package/package.json +2 -2
- package/src/style/abstracts/_mixins.scss +1 -1
- package/src/style/abstracts/variables/_badges.scss +1 -1
- package/src/style/abstracts/variables/_body.scss +1 -1
- package/src/style/abstracts/variables/_border.scss +5 -5
- package/src/style/abstracts/variables/_buttons.scss +3 -3
- package/src/style/base/_button.scss +0 -5
- package/src/style/components/_d-stepper-mobile.scss +1 -0
- package/src/style/root/_root.scss +4 -0
package/dist/index.esm.js
CHANGED
|
@@ -315,23 +315,13 @@ function DBoxFile(_a) {
|
|
|
315
315
|
}), { 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))) }))] }));
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
function DButton({ theme = 'primary', size, variant, state, text = '', ariaLabel, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartMaterialStyle, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndMaterialStyle, value, type = 'button',
|
|
318
|
+
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, }) {
|
|
319
319
|
const generateClasses = useMemo(() => {
|
|
320
320
|
const variantClass = variant
|
|
321
321
|
? `btn-${variant}-${theme}`
|
|
322
322
|
: `btn-${theme}`;
|
|
323
323
|
return Object.assign(Object.assign(Object.assign({ btn: true, [variantClass]: true }, size && { [`btn-${size}`]: true }), (state && state !== 'disabled') && { [state]: true }), { loading });
|
|
324
324
|
}, [variant, theme, size, state, loading]);
|
|
325
|
-
const generateStyleVariables = useMemo(() => {
|
|
326
|
-
if (pill) {
|
|
327
|
-
return {
|
|
328
|
-
[`--${PREFIX_BS}btn-component-border-radius`]: `var(--${PREFIX_BS}border-radius-pill)`,
|
|
329
|
-
[`--${PREFIX_BS}btn-component-lg-border-radius`]: `var(--${PREFIX_BS}border-radius-pill)`,
|
|
330
|
-
[`--${PREFIX_BS}btn-component-sm-border-radius`]: `var(--${PREFIX_BS}border-radius-pill)`,
|
|
331
|
-
};
|
|
332
|
-
}
|
|
333
|
-
return {};
|
|
334
|
-
}, [pill]);
|
|
335
325
|
const clickHandler = useCallback((event) => {
|
|
336
326
|
if (stopPropagationEnabled) {
|
|
337
327
|
event.stopPropagation();
|
|
@@ -342,7 +332,7 @@ function DButton({ theme = 'primary', size, variant, state, text = '', ariaLabel
|
|
|
342
332
|
const newAriaLabel = useMemo(() => (loading
|
|
343
333
|
? (loadingAriaLabel || ariaLabel || text)
|
|
344
334
|
: (ariaLabel || text)), [loading, loadingAriaLabel, ariaLabel, text]);
|
|
345
|
-
return (jsxs("button", Object.assign({ className: classNames(generateClasses, className), style:
|
|
335
|
+
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 }))] })));
|
|
346
336
|
}
|
|
347
337
|
|
|
348
338
|
function DCardHeader({ className, style, children, }) {
|