@dynamic-framework/ui-react 1.30.0 → 1.31.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 +86 -56
- package/dist/css/dynamic-ui-non-root.min.css +2 -2
- package/dist/css/dynamic-ui-root.css +7 -6
- package/dist/css/dynamic-ui-root.min.css +2 -2
- package/dist/css/dynamic-ui.css +92 -61
- package/dist/css/dynamic-ui.min.css +2 -2
- package/dist/index.esm.js +20 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +20 -8
- 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/DSkeleton/DSkeleton.d.ts +3 -0
- package/dist/types/components/DStepperDesktop/DStepperDesktop.d.ts +3 -1
- package/dist/types/components/index.d.ts +1 -0
- package/package.json +12 -5
- package/src/style/abstracts/variables/_+import.scss +1 -1
- package/src/style/abstracts/variables/_breadcrumb.scss +5 -0
- package/src/style/abstracts/variables/_forms.scss +3 -3
- 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/abstracts/variables/_tooltip.scss +4 -4
- package/src/style/base/_alert.scss +0 -2
- package/src/style/base/_form-check.scss +6 -2
- package/src/style/base/_label.scss +1 -0
- 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 +27 -7
- package/src/style/components/_d-stepper-mobile.scss +6 -6
- package/src/style/root/_root.scss +2 -1
- package/src/style/abstracts/variables/_box-shadow.scss +0 -6
package/dist/index.js
CHANGED
|
@@ -282,6 +282,13 @@ function DAlert({ theme = 'success', icon: iconProp, iconFamilyClass, iconFamily
|
|
|
282
282
|
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 }) }))] })));
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
+
function DAvatar({ id, size, image, title, className, style, dataAttributes, }) {
|
|
286
|
+
return (jsxRuntime.jsxs("div", Object.assign({ className: classNames({
|
|
287
|
+
avatar: true,
|
|
288
|
+
[`avatar-${size}`]: !!size,
|
|
289
|
+
}, className), style: style, id: id }, dataAttributes, { children: [image && jsxRuntime.jsx("img", { src: image, alt: "avatar", className: "avatar-img" }), title && jsxRuntime.jsx("span", { className: "avatar-title", children: title })] })));
|
|
290
|
+
}
|
|
291
|
+
|
|
285
292
|
function DBadge({ text, soft = false, theme = 'primary', id, rounded, className, style, iconStart, iconEnd, iconMaterialStyle, iconFamilyClass, iconFamilyPrefix, dataAttributes, }) {
|
|
286
293
|
const generateClasses = React.useMemo(() => ({
|
|
287
294
|
badge: true,
|
|
@@ -1174,7 +1181,7 @@ var DList$1 = Object.assign(DList, {
|
|
|
1174
1181
|
function DModalHeader({ showCloseButton, onClose, children, className, style, iconFamilyClass, iconFamilyPrefix, icon: iconProp, materialStyle = false, }) {
|
|
1175
1182
|
const { iconMap: { xLg, }, } = useDContext();
|
|
1176
1183
|
const icon = React.useMemo(() => iconProp || xLg, [iconProp, xLg]);
|
|
1177
|
-
return (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 align-self-center", "aria-label": "Close", onClick: onClose, children: jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: materialStyle }) }))] }));
|
|
1184
|
+
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 align-self-center", "aria-label": "Close", onClick: onClose, children: jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: materialStyle }) }))] }), jsxRuntime.jsx("div", { className: "d-modal-separator" })] }));
|
|
1178
1185
|
}
|
|
1179
1186
|
|
|
1180
1187
|
function DModalBody({ children, className, style, }) {
|
|
@@ -1211,7 +1218,7 @@ var DModal$1 = Object.assign(DModal, {
|
|
|
1211
1218
|
function DOffcanvasHeader({ showCloseButton, onClose, children, className, style, iconFamilyClass, iconFamilyPrefix, icon: iconProp, materialStyle = false, }) {
|
|
1212
1219
|
const { iconMap: { xLg, }, } = useDContext();
|
|
1213
1220
|
const icon = React.useMemo(() => iconProp || xLg, [iconProp, xLg]);
|
|
1214
|
-
return (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 align-self-center", "aria-label": "Close", onClick: onClose, children: jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: materialStyle }) }))] }));
|
|
1221
|
+
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 align-self-center", "aria-label": "Close", onClick: onClose, children: jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconFamilyClass, familyPrefix: iconFamilyPrefix, materialStyle: materialStyle }) }))] }), jsxRuntime.jsx("div", { className: "d-offcanvas-separator" })] }));
|
|
1215
1222
|
}
|
|
1216
1223
|
|
|
1217
1224
|
function DOffcanvasBody({ children, className, style, }) {
|
|
@@ -1219,7 +1226,7 @@ function DOffcanvasBody({ children, className, style, }) {
|
|
|
1219
1226
|
}
|
|
1220
1227
|
|
|
1221
1228
|
function DOffcanvasFooter({ footerActionPlacement = 'fill', children, className, style, }) {
|
|
1222
|
-
return (jsxRuntime.jsx("div", { className: classNames(`d-offcanvas-footer d-offcanvas-action-${footerActionPlacement}`, className), style: style, children: children }));
|
|
1229
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "d-offcanvas-separator" }), jsxRuntime.jsx("div", { className: classNames(`d-offcanvas-footer d-offcanvas-action-${footerActionPlacement}`, className), style: style, children: children })] }));
|
|
1223
1230
|
}
|
|
1224
1231
|
|
|
1225
1232
|
function DOffcanvas({ name, className, style, staticBackdrop, scrollable, openFrom = 'end', children, dataAttributes, }) {
|
|
@@ -1350,6 +1357,9 @@ function DQuickActionSwitch({ id: idProp, name, label, hint, checked, disabled,
|
|
|
1350
1357
|
return (jsxRuntime.jsxs("button", Object.assign({ className: classNames('d-quick-action-switch', className), type: "button", onClick: clickHandler, style: style }, dataAttributes, { children: [jsxRuntime.jsx("div", { className: "d-quick-action-switch-content", children: jsxRuntime.jsx(DInputSwitch, { id: id, name: name, disabled: disabled, checked: checked, readonly: true, label: label }) }), jsxRuntime.jsx("div", { className: "d-quick-action-switch-hint", children: hint })] })));
|
|
1351
1358
|
}
|
|
1352
1359
|
|
|
1360
|
+
/**
|
|
1361
|
+
* @deprecated Please use https://getbootstrap.com/docs/5.3/components/placeholders/ instead
|
|
1362
|
+
*/
|
|
1353
1363
|
function DSkeleton({ speed = 2, viewBox, backgroundColor, foregroundColor, children, }) {
|
|
1354
1364
|
const innerBackgroundColor = React.useMemo(() => {
|
|
1355
1365
|
if (backgroundColor) {
|
|
@@ -1368,7 +1378,7 @@ function DSkeleton({ speed = 2, viewBox, backgroundColor, foregroundColor, child
|
|
|
1368
1378
|
return (jsxRuntime.jsx(ContentLoader, { speed: speed, viewBox: viewBox, backgroundColor: innerBackgroundColor, foregroundColor: innerForegroundColor, children: children }));
|
|
1369
1379
|
}
|
|
1370
1380
|
|
|
1371
|
-
function DStepper$2({ options, currentStep, iconSuccess: iconSuccessProp, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle = false, vertical = false, completed, className, style, }) {
|
|
1381
|
+
function DStepper$2({ options, currentStep, iconSuccess: iconSuccessProp, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle = false, vertical = false, completed, alignStart = false, className, style, }) {
|
|
1372
1382
|
const { iconMap: { check, }, } = useDContext();
|
|
1373
1383
|
const icon = React.useMemo(() => iconSuccessProp || check, [check, iconSuccessProp]);
|
|
1374
1384
|
if (currentStep < 1 || currentStep > options.length) {
|
|
@@ -1377,13 +1387,14 @@ function DStepper$2({ options, currentStep, iconSuccess: iconSuccessProp, iconSu
|
|
|
1377
1387
|
return (jsxRuntime.jsx("div", { className: classNames({
|
|
1378
1388
|
'd-stepper-desktop': true,
|
|
1379
1389
|
'is-vertical': vertical,
|
|
1380
|
-
|
|
1390
|
+
'is-align-start': alignStart && !vertical,
|
|
1391
|
+
}, className), style: style, children: options.map(({ label, value, description }) => (jsxRuntime.jsxs("div", { className: "d-step", children: [jsxRuntime.jsx("div", { className: "d-step-value", children: jsxRuntime.jsx("div", { className: classNames({
|
|
1381
1392
|
'd-step-icon-container': true,
|
|
1382
1393
|
'd-step-check': value < currentStep || completed,
|
|
1383
1394
|
'd-step-current': value === currentStep && !completed,
|
|
1384
1395
|
}), children: value < currentStep || completed
|
|
1385
1396
|
? (jsxRuntime.jsx(DIcon, { icon: icon, familyClass: iconSuccessFamilyClass, familyPrefix: iconSuccessFamilyPrefix, materialStyle: iconSuccessMaterialStyle, className: "d-step-icon" }))
|
|
1386
|
-
: value }) }), jsxRuntime.jsx("div", { className: "d-step-label", children: label })] }, value))) }));
|
|
1397
|
+
: 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))) }));
|
|
1387
1398
|
}
|
|
1388
1399
|
|
|
1389
1400
|
function DStepper$1({ options, currentStep, className, style, }) {
|
|
@@ -1410,7 +1421,7 @@ function DStepper$1({ options, currentStep, className, style, }) {
|
|
|
1410
1421
|
};
|
|
1411
1422
|
}, [currentAngle, currentStep, options.length]);
|
|
1412
1423
|
const progressStyle = React.useMemo(() => `conic-gradient(
|
|
1413
|
-
from
|
|
1424
|
+
from 0deg,
|
|
1414
1425
|
var(--${PREFIX_BS}step-progress-outter-fill-background-color) ${currentAngle}deg,
|
|
1415
1426
|
var(--${PREFIX_BS}step-progress-outter-background-color) 0deg)`, [currentAngle]);
|
|
1416
1427
|
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 || '' })] })) })] }));
|
|
@@ -1423,7 +1434,7 @@ function DStepper({ options, currentStep, iconSuccess, iconSuccessFamilyClass, i
|
|
|
1423
1434
|
const ARROW_WIDTH = 8;
|
|
1424
1435
|
const ARROW_HEIGHT = 4;
|
|
1425
1436
|
const GAP = 2;
|
|
1426
|
-
function DTooltip({ className, childrenClassName, style, offSet = ARROW_HEIGHT + GAP, padding, withFocus = false, withClick = false, withHover = true, open = false, theme = '
|
|
1437
|
+
function DTooltip({ className, childrenClassName, style, offSet = ARROW_HEIGHT + GAP, padding, withFocus = false, withClick = false, withHover = true, open = false, theme = 'dark', placement = 'top', size, Component, children, }) {
|
|
1427
1438
|
const [isOpen, setIsOpen] = React.useState(open);
|
|
1428
1439
|
const arrowRef = React.useRef(null);
|
|
1429
1440
|
const { refs, context, floatingStyles, } = react.useFloating({
|
|
@@ -1578,6 +1589,7 @@ async function configureI8n(resources, _a = {}) {
|
|
|
1578
1589
|
}
|
|
1579
1590
|
|
|
1580
1591
|
exports.DAlert = DAlert;
|
|
1592
|
+
exports.DAvatar = DAvatar;
|
|
1581
1593
|
exports.DBadge = DBadge;
|
|
1582
1594
|
exports.DBoxFile = DBoxFile;
|
|
1583
1595
|
exports.DButton = DButton;
|