react-asc 22.0.0 → 23.2.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/components/ExpansionPanel/ExpansionPanel.d.ts +1 -0
- package/components/FloatingActionButton/FloatingActionButton.d.ts +1 -0
- package/components/Typography/Typography.d.ts +3 -1
- package/hooks/index.d.ts +4 -3
- package/hooks/useMobileDetect.d.ts +3 -0
- package/index.es.js +79 -62
- package/index.js +78 -60
- package/package.json +1 -1
- package/react-asc.scss +5 -0
|
@@ -3,6 +3,7 @@ export interface IExpansionPanelProps {
|
|
|
3
3
|
header: ReactNode;
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
isExpanded?: boolean;
|
|
6
|
+
shadow?: boolean;
|
|
6
7
|
onChange?: (event: React.MouseEvent, isExpanded: boolean) => void;
|
|
7
8
|
}
|
|
8
9
|
export declare const ExpansionPanel: (props: IExpansionPanelProps) => JSX.Element;
|
|
@@ -7,6 +7,7 @@ export interface IFloatingActionButtonProps extends React.DetailedHTMLProps<Reac
|
|
|
7
7
|
fixed?: boolean;
|
|
8
8
|
isActive?: boolean;
|
|
9
9
|
disabled?: boolean;
|
|
10
|
+
position?: 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
|
|
10
11
|
onClick?: (e: React.MouseEvent) => void;
|
|
11
12
|
}
|
|
12
13
|
export declare const FloatingActionButton: (props: IFloatingActionButtonProps) => JSX.Element;
|
|
@@ -3,8 +3,10 @@ export interface IWrapperProps {
|
|
|
3
3
|
as?: string;
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
className?: string;
|
|
6
|
+
wrap?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export interface ITypographyProps extends React.ComponentProps<"span"> {
|
|
8
9
|
as?: string;
|
|
10
|
+
wrap?: boolean;
|
|
9
11
|
}
|
|
10
|
-
export declare const Typography: ({ children, as, ...rest }: ITypographyProps) => JSX.Element;
|
|
12
|
+
export declare const Typography: ({ children, as, wrap, ...rest }: ITypographyProps) => JSX.Element;
|
package/hooks/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export * from './useWindowSize';
|
|
2
|
-
export * from './useHover';
|
|
3
|
-
export * from './useConstructor';
|
|
4
1
|
export * from './useDebounce';
|
|
2
|
+
export * from './useConstructor';
|
|
5
3
|
export * from './useCssClasses';
|
|
4
|
+
export * from './useHover';
|
|
5
|
+
export * from './useMobileDetect';
|
|
6
|
+
export * from './useWindowSize';
|
package/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useRef, useEffect, useState, Fragment, Component, createRef, cloneElement, createContext, useContext } from 'react';
|
|
2
2
|
import { createPortal, render, unmountComponentAtNode } from 'react-dom';
|
|
3
3
|
import { createPopper } from '@popperjs/core';
|
|
4
4
|
|
|
@@ -224,23 +224,25 @@ const CircleSolidIcon = () => (React.createElement("svg", { "aria-hidden": "true
|
|
|
224
224
|
const ChevronLeftSolidIcon = () => (React.createElement("svg", { "aria-hidden": "true", focusable: "false", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512" },
|
|
225
225
|
React.createElement("path", { fill: "currentColor", d: "M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z" })));
|
|
226
226
|
|
|
227
|
-
function
|
|
228
|
-
const
|
|
229
|
-
width: 0,
|
|
230
|
-
height: 0,
|
|
231
|
-
});
|
|
227
|
+
function useDebounce(callback, timeout, deps) {
|
|
228
|
+
const timeoutId = useRef();
|
|
232
229
|
useEffect(() => {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
230
|
+
clearTimeout(timeoutId.current);
|
|
231
|
+
timeoutId.current = setTimeout(callback, timeout);
|
|
232
|
+
return () => clearTimeout(timeoutId.current);
|
|
233
|
+
}, deps);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
const useConstructor = (callBack) => {
|
|
237
|
+
const [hasBeenCalled, setHasBeenCalled] = useState(false);
|
|
238
|
+
if (hasBeenCalled)
|
|
239
|
+
return;
|
|
240
|
+
callBack();
|
|
241
|
+
setHasBeenCalled(true);
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
function useCssClasses(cssClasses) {
|
|
245
|
+
return [(cssClasses === null || cssClasses === void 0 ? void 0 : cssClasses.filter(css => css).join(' ')) || ''];
|
|
244
246
|
}
|
|
245
247
|
|
|
246
248
|
function useHover() {
|
|
@@ -265,26 +267,37 @@ function useHover() {
|
|
|
265
267
|
return [ref, value];
|
|
266
268
|
}
|
|
267
269
|
|
|
268
|
-
|
|
269
|
-
const [
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
setHasBeenCalled(true);
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
function useDebounce(callback, timeout, deps) {
|
|
277
|
-
const timeoutId = useRef();
|
|
270
|
+
function useWindowSize() {
|
|
271
|
+
const [windowSize, setWindowSize] = useState({
|
|
272
|
+
width: 0,
|
|
273
|
+
height: 0,
|
|
274
|
+
});
|
|
278
275
|
useEffect(() => {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
276
|
+
function handleResize() {
|
|
277
|
+
setWindowSize({
|
|
278
|
+
width: window.innerWidth,
|
|
279
|
+
height: window.innerHeight,
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
window.addEventListener("resize", handleResize);
|
|
283
|
+
handleResize();
|
|
284
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
285
|
+
}, []);
|
|
286
|
+
return windowSize;
|
|
283
287
|
}
|
|
284
288
|
|
|
285
|
-
function
|
|
286
|
-
const
|
|
287
|
-
|
|
289
|
+
function useMobileDetect() {
|
|
290
|
+
const [isMobile, setIsMobile] = useState(false);
|
|
291
|
+
const windowSize = useWindowSize();
|
|
292
|
+
const checkIsMobile = (height, width) => {
|
|
293
|
+
if (height > 0 && width > 0) {
|
|
294
|
+
setIsMobile(!(width >= 1024));
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
useEffect(() => {
|
|
298
|
+
windowSize && checkIsMobile(windowSize.height, windowSize.width);
|
|
299
|
+
}, [windowSize]);
|
|
300
|
+
return { isMobile };
|
|
288
301
|
}
|
|
289
302
|
|
|
290
303
|
var css_248z$X = ".Backdrop-module_backdrop__IRMoL {\n height: 100%;\n width: 100%;\n position: absolute;\n opacity: 0.5;\n z-index: 1040;\n top: 0;\n left: 0;\n background-color: #000; }\n .Backdrop-module_backdrop__IRMoL.Backdrop-module_isTransparent__F5nA5 {\n opacity: 0; }\n";
|
|
@@ -484,21 +497,22 @@ styleInject(css_248z$P);
|
|
|
484
497
|
|
|
485
498
|
const Badge = (props) => {
|
|
486
499
|
const { children, content, className, color = COLOR.primary } = props, rest = __rest(props, ["children", "content", "className", "color"]);
|
|
487
|
-
const
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
className
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
const getCssClassesBadge = () => {
|
|
494
|
-
const cssClasses = [];
|
|
495
|
-
cssClasses.push(styles$P.badge);
|
|
496
|
-
cssClasses.push(styles$P[color]);
|
|
497
|
-
return cssClasses.filter(css => css).join(' ');
|
|
498
|
-
};
|
|
499
|
-
return (React.createElement("div", Object.assign({ className: getCssClassesBadgeContainer() }, rest),
|
|
500
|
+
const [cssClassName] = useCssClasses([
|
|
501
|
+
styles$P.badge,
|
|
502
|
+
styles$P[color],
|
|
503
|
+
className
|
|
504
|
+
]);
|
|
505
|
+
return (React.createElement(BadgeContainer, null,
|
|
500
506
|
children,
|
|
501
|
-
React.createElement("span", { className:
|
|
507
|
+
React.createElement("span", Object.assign({ className: cssClassName }, rest), content)));
|
|
508
|
+
};
|
|
509
|
+
const BadgeContainer = (props) => {
|
|
510
|
+
const { children, className } = props, rest = __rest(props, ["children", "className"]);
|
|
511
|
+
const [cssClassName] = useCssClasses([
|
|
512
|
+
styles$P.badgeContainer,
|
|
513
|
+
className,
|
|
514
|
+
]);
|
|
515
|
+
return (React.createElement("div", Object.assign({ className: cssClassName }, rest), children));
|
|
502
516
|
};
|
|
503
517
|
|
|
504
518
|
var css_248z$O = ".Button-module_button__qeIer {\n text-transform: uppercase;\n flex-shrink: 0;\n background-color: transparent;\n display: inline-block;\n font-weight: 400;\n line-height: 1.5;\n text-align: center;\n text-decoration: none;\n vertical-align: middle;\n user-select: none;\n border: 1px solid transparent;\n padding: 0.375rem 0.75rem;\n transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out,\r box-shadow 0.15s ease-in-out;\n min-width: 64px;\n font-size: 0.875rem;\n border-radius: var(--borderRadius); }\n .Button-module_button__qeIer.Button-module_shadow__6N2nE {\n box-shadow: var(--shadow); }\n .Button-module_button__qeIer.Button-module_block__JIazf {\n width: 100%; }\n .Button-module_button__qeIer:hover:not(:disabled) {\n cursor: pointer; }\n .Button-module_button__qeIer:focus:not(:disabled) {\n border-color: #86b7fe;\n outline: 0;\n box-shadow: inset 0 1px 2px #00000013, 0 0 0 0.25rem #0d6efd40; }\n\n.Button-module_btnContained__16y5l.Button-module_primary__EUyOu {\n color: var(--primary-contrast-text);\n background-color: var(--primary); }\n .Button-module_btnContained__16y5l.Button-module_primary__EUyOu:hover:not(:disabled) {\n background-color: var(--primary-dark); }\n\n.Button-module_btnContained__16y5l.Button-module_accent__opVgQ {\n color: var(--accent-contrast-text);\n background-color: var(--accent); }\n .Button-module_btnContained__16y5l.Button-module_accent__opVgQ:hover:not(:disabled) {\n background-color: var(--accent-dark); }\n\n.Button-module_btnContained__16y5l.Button-module_secondary__zKoGk {\n color: var(--secondary-contrast-text);\n background-color: var(--secondary); }\n .Button-module_btnContained__16y5l.Button-module_secondary__zKoGk:hover:not(:disabled) {\n background-color: var(--secondary-dark); }\n\n.Button-module_btnContained__16y5l.Button-module_light__LXeZy {\n color: var(--light-contrast-text);\n background-color: var(--light); }\n .Button-module_btnContained__16y5l.Button-module_light__LXeZy:hover:not(:disabled) {\n background-color: var(--light-dark); }\n\n.Button-module_btnContained__16y5l.Button-module_dark__5oFOT {\n color: var(--dark-contrast-text);\n background-color: var(--dark); }\n .Button-module_btnContained__16y5l.Button-module_dark__5oFOT:hover:not(:disabled) {\n background-color: var(--dark-dark); }\n\n.Button-module_btnContained__16y5l:disabled {\n color: rgba(0, 0, 0, 0.26);\n box-shadow: none;\n background-color: rgba(0, 0, 0, 0.12); }\n .Button-module_btnContained__16y5l:disabled:hover {\n cursor: not-allowed; }\n\n.Button-module_btnText__N5Gys {\n box-shadow: none;\n text-decoration: none; }\n .Button-module_btnText__N5Gys.Button-module_primary__EUyOu {\n color: var(--primary); }\n .Button-module_btnText__N5Gys.Button-module_primary__EUyOu:hover:not(:disabled) {\n text-decoration: none;\n background: var(--primary-highlight); }\n .Button-module_btnText__N5Gys.Button-module_secondary__zKoGk {\n color: var(--secondary); }\n .Button-module_btnText__N5Gys.Button-module_secondary__zKoGk:hover:not(:disabled) {\n text-decoration: none;\n background: var(--secondary-highlight); }\n .Button-module_btnText__N5Gys.Button-module_accent__opVgQ {\n color: var(--accent); }\n .Button-module_btnText__N5Gys.Button-module_accent__opVgQ:hover:not(:disabled) {\n text-decoration: none;\n background: var(--accent-highlight); }\n .Button-module_btnText__N5Gys.Button-module_light__LXeZy {\n color: var(--light-contrast-text); }\n .Button-module_btnText__N5Gys.Button-module_light__LXeZy:hover:not(:disabled) {\n text-decoration: none;\n background: var(--light-highlight); }\n .Button-module_btnText__N5Gys.Button-module_dark__5oFOT {\n color: var(--dark); }\n .Button-module_btnText__N5Gys.Button-module_dark__5oFOT:hover:not(:disabled) {\n text-decoration: none;\n background: var(--dark-highlight); }\n\n.Button-module_btnOutline__CCFPI {\n box-shadow: none;\n text-decoration: none; }\n .Button-module_btnOutline__CCFPI.Button-module_primary__EUyOu {\n color: var(--primary);\n border-color: var(--primary); }\n .Button-module_btnOutline__CCFPI.Button-module_primary__EUyOu:hover:not(:disabled) {\n background: var(--primary-highlight); }\n .Button-module_btnOutline__CCFPI.Button-module_secondary__zKoGk {\n color: var(--secondary);\n border-color: var(--secondary); }\n .Button-module_btnOutline__CCFPI.Button-module_secondary__zKoGk:hover:not(:disabled) {\n background: var(--secondary-highlight); }\n .Button-module_btnOutline__CCFPI.Button-module_accent__opVgQ {\n color: var(--accent);\n border-color: var(--accent); }\n .Button-module_btnOutline__CCFPI.Button-module_accent__opVgQ:hover:not(:disabled) {\n background: var(--accent-highlight); }\n .Button-module_btnOutline__CCFPI.Button-module_light__LXeZy {\n color: var(--light-contrast-text);\n border-color: var(--light); }\n .Button-module_btnOutline__CCFPI.Button-module_light__LXeZy:hover:not(:disabled) {\n background: var(--light-highlight); }\n .Button-module_btnOutline__CCFPI.Button-module_dark__5oFOT {\n color: var(--dark);\n border-color: var(--dark); }\n .Button-module_btnOutline__CCFPI.Button-module_dark__5oFOT:hover:not(:disabled) {\n background: var(--dark-highlight); }\n .Button-module_btnOutline__CCFPI:disabled {\n color: rgba(0, 0, 0, 0.26);\n border: 1px solid rgba(0, 0, 0, 0.12); }\n\n.Button-module_startIcon__Eylwr {\n display: inherit;\n margin-left: -4px;\n margin-right: 8px; }\n .Button-module_startIcon__Eylwr svg {\n width: 18px;\n height: 18px; }\n\n.Button-module_endIcon__pCffL {\n display: inherit;\n margin-left: 8px; }\n .Button-module_endIcon__pCffL svg {\n width: 18px;\n height: 18px; }\n";
|
|
@@ -557,7 +571,7 @@ const ButtonGroup = (props) => {
|
|
|
557
571
|
return (React.createElement("div", Object.assign({ className: getCssClasses(), role: "group" }, rest), children));
|
|
558
572
|
};
|
|
559
573
|
|
|
560
|
-
var css_248z$M = ".Breadcrumb-module_breadcrumb__-pvAn {\n display: flex;\n flex-wrap: wrap;\n padding: 0;\n
|
|
574
|
+
var css_248z$M = ".Breadcrumb-module_breadcrumb__-pvAn {\n display: flex;\n flex-wrap: wrap;\n padding: 0;\n list-style: none;\n margin: 0; }\n";
|
|
561
575
|
var styles$M = {"breadcrumb":"Breadcrumb-module_breadcrumb__-pvAn"};
|
|
562
576
|
styleInject(css_248z$M);
|
|
563
577
|
|
|
@@ -1646,12 +1660,12 @@ const ExpansionPanelHeader = (props) => {
|
|
|
1646
1660
|
React.createElement(Icon, null, isExpanded ? React.createElement(ChevronUpSolidIcon, null) : React.createElement(ChevronDownSolidIcon, null)))));
|
|
1647
1661
|
};
|
|
1648
1662
|
|
|
1649
|
-
var css_248z$n = ".ExpansionPanel-module_expansionPanel__m1yQq {\n background-color: var(--white);\n
|
|
1650
|
-
var styles$n = {"expansionPanel":"ExpansionPanel-module_expansionPanel__m1yQq","isExpanded":"ExpansionPanel-module_isExpanded__TS1ph"};
|
|
1663
|
+
var css_248z$n = ".ExpansionPanel-module_expansionPanel__m1yQq {\n background-color: var(--white);\n transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; }\n .ExpansionPanel-module_expansionPanel__m1yQq.ExpansionPanel-module_shadow__zIjJ6 {\n box-shadow: var(--shadow); }\n .ExpansionPanel-module_expansionPanel__m1yQq:first-child {\n border-top-left-radius: 4px;\n border-top-right-radius: 4px; }\n .ExpansionPanel-module_expansionPanel__m1yQq:last-child {\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px; }\n .ExpansionPanel-module_expansionPanel__m1yQq.ExpansionPanel-module_isExpanded__TS1ph:first-child {\n margin-top: 0; }\n .ExpansionPanel-module_expansionPanel__m1yQq.ExpansionPanel-module_isExpanded__TS1ph:last-child {\n margin-bottom: 0; }\n";
|
|
1664
|
+
var styles$n = {"expansionPanel":"ExpansionPanel-module_expansionPanel__m1yQq","shadow":"ExpansionPanel-module_shadow__zIjJ6","isExpanded":"ExpansionPanel-module_isExpanded__TS1ph"};
|
|
1651
1665
|
styleInject(css_248z$n);
|
|
1652
1666
|
|
|
1653
1667
|
const ExpansionPanel = (props) => {
|
|
1654
|
-
const { header, children, isExpanded = false, onChange } = props;
|
|
1668
|
+
const { header, children, isExpanded = false, shadow, onChange } = props;
|
|
1655
1669
|
const [_isExpanded, setIsExpanded] = useState(false);
|
|
1656
1670
|
useEffect(() => {
|
|
1657
1671
|
setIsExpanded(isExpanded);
|
|
@@ -1662,6 +1676,7 @@ const ExpansionPanel = (props) => {
|
|
|
1662
1676
|
if (_isExpanded) {
|
|
1663
1677
|
cssClasses.push(styles$n.isExpanded);
|
|
1664
1678
|
}
|
|
1679
|
+
shadow && cssClasses.push(styles$n.shadow);
|
|
1665
1680
|
return cssClasses.filter(css => css).join(' ');
|
|
1666
1681
|
};
|
|
1667
1682
|
const handleClickHeader = (event) => {
|
|
@@ -1674,16 +1689,17 @@ const ExpansionPanel = (props) => {
|
|
|
1674
1689
|
React.createElement(ExpansionPanelContent, null, children)));
|
|
1675
1690
|
};
|
|
1676
1691
|
|
|
1677
|
-
var css_248z$m = ".FloatingActionButton-module_fab__Rw3kd {\n box-shadow: var(--shadow); }\n .FloatingActionButton-
|
|
1678
|
-
var styles$m = {"fab":"FloatingActionButton-module_fab__Rw3kd","fixed":"FloatingActionButton-module_fixed__XQOkG"};
|
|
1692
|
+
var css_248z$m = ".FloatingActionButton-module_fab__Rw3kd {\n box-shadow: var(--shadow); }\n\n.FloatingActionButton-module_fixed__XQOkG {\n position: fixed;\n z-index: 1000; }\n .FloatingActionButton-module_fixed__XQOkG.FloatingActionButton-module_leftTop__ZiHQN {\n top: 16px;\n left: 16px; }\n .FloatingActionButton-module_fixed__XQOkG.FloatingActionButton-module_leftBottom__210sl {\n bottom: 16px;\n left: 16px; }\n .FloatingActionButton-module_fixed__XQOkG.FloatingActionButton-module_rightTop__VUsvT {\n top: 64px;\n right: 16px; }\n .FloatingActionButton-module_fixed__XQOkG.FloatingActionButton-module_rightBottom__FaUFl {\n bottom: 16px;\n right: 16px; }\n";
|
|
1693
|
+
var styles$m = {"fab":"FloatingActionButton-module_fab__Rw3kd","fixed":"FloatingActionButton-module_fixed__XQOkG","leftTop":"FloatingActionButton-module_leftTop__ZiHQN","leftBottom":"FloatingActionButton-module_leftBottom__210sl","rightTop":"FloatingActionButton-module_rightTop__VUsvT","rightBottom":"FloatingActionButton-module_rightBottom__FaUFl"};
|
|
1679
1694
|
styleInject(css_248z$m);
|
|
1680
1695
|
|
|
1681
1696
|
const FloatingActionButton = (props) => {
|
|
1682
|
-
const { className, icon, color = COLOR.primary, fixed, size = SIZE.lg, isActive, disabled, onClick } = props;
|
|
1697
|
+
const { className, icon, color = COLOR.primary, fixed, position = 'rightBottom', size = SIZE.lg, isActive, disabled, onClick } = props;
|
|
1683
1698
|
const getCssClasses = () => {
|
|
1684
1699
|
const cssClasses = [];
|
|
1685
1700
|
cssClasses.push(styles$m.fab);
|
|
1686
|
-
fixed && cssClasses.push(styles$m
|
|
1701
|
+
fixed && cssClasses.push(styles$m.fixed);
|
|
1702
|
+
position && fixed && cssClasses.push(styles$m[position]);
|
|
1687
1703
|
className && cssClasses.push(className);
|
|
1688
1704
|
return cssClasses.filter(css => css).join(' ');
|
|
1689
1705
|
};
|
|
@@ -2285,24 +2301,25 @@ const Stepper = (props) => {
|
|
|
2285
2301
|
React.createElement(StepperActions, { className: "mt-3", isFirstStep: activeIndex === 0, isStepOptional: isStepOptional(activeIndex), isCompleted: isLastStep(), onBack: handleBack, onSkip: handleSkip, onNext: handleNext, onReset: handleReset }))));
|
|
2286
2302
|
};
|
|
2287
2303
|
|
|
2288
|
-
var css_248z$8 = ".Typography-module_typography__sw-td {\n
|
|
2289
|
-
var styles$8 = {"typography":"Typography-module_typography__sw-td"};
|
|
2304
|
+
var css_248z$8 = ".Typography-module_typography__sw-td {\n font-family: var(--fontFamily); }\n .Typography-module_typography__sw-td.Typography-module_wrap__W7G0R {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis; }\n\nh1 {\n font-size: calc(1.375rem + 1.5vw); }\n\nh2 {\n font-size: calc(1.325rem + 0.9vw); }\n\nh3 {\n font-size: calc(1.3rem + 0.6vw); }\n\nh4 {\n font-size: calc(1.275rem + 0.3vw); }\n\nh5 {\n font-size: 1.25rem; }\n\nh6 {\n font-size: 1rem; }\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-weight: 500 !important;\n margin-top: 0;\n margin-bottom: 0.5rem;\n line-height: 1.2; }\n";
|
|
2305
|
+
var styles$8 = {"typography":"Typography-module_typography__sw-td","wrap":"Typography-module_wrap__W7G0R"};
|
|
2290
2306
|
styleInject(css_248z$8);
|
|
2291
2307
|
|
|
2292
2308
|
const Wrapper = (props) => {
|
|
2293
|
-
const { as = 'span', children, className } = props, rest = __rest(props, ["as", "children", "className"]);
|
|
2309
|
+
const { as = 'span', wrap, children, className } = props, rest = __rest(props, ["as", "wrap", "children", "className"]);
|
|
2294
2310
|
const getCssClasses = () => {
|
|
2295
2311
|
const cssClasses = [];
|
|
2296
2312
|
cssClasses.push(styles$8.typography);
|
|
2297
2313
|
cssClasses.push(styles$8.as);
|
|
2314
|
+
wrap && cssClasses.push(styles$8.wrap);
|
|
2298
2315
|
className && cssClasses.push(className);
|
|
2299
2316
|
return cssClasses.filter(css => css).join(' ');
|
|
2300
2317
|
};
|
|
2301
2318
|
return React.createElement(as, Object.assign(Object.assign({}, rest), { className: getCssClasses() }), children);
|
|
2302
2319
|
};
|
|
2303
2320
|
const Typography = (_a) => {
|
|
2304
|
-
var { children, as = 'span' } = _a, rest = __rest(_a, ["children", "as"]);
|
|
2305
|
-
return (React.createElement(Wrapper, Object.assign({ as: as }, rest), children));
|
|
2321
|
+
var { children, as = 'span', wrap } = _a, rest = __rest(_a, ["children", "as", "wrap"]);
|
|
2322
|
+
return (React.createElement(Wrapper, Object.assign({ as: as, wrap: wrap }, rest), children));
|
|
2306
2323
|
};
|
|
2307
2324
|
|
|
2308
2325
|
var css_248z$7 = ".Step-module_stepWrapper__IQwq1 {\n display: flex;\n align-items: center;\n padding-left: 8px;\n padding-right: 8px;\n transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; }\n .Step-module_stepWrapper__IQwq1.Step-module_hasLabel__LZNvd:not(.Step-module_disabled__JnxUP):hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.04);\n border-radius: var(--borderRadius); }\n\n.Step-module_step__k42go {\n width: 40px;\n height: 40px;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; }\n .Step-module_step__k42go:not(.Step-module_hasLabel__LZNvd):not(.Step-module_disabled__JnxUP):hover {\n border-radius: 100%;\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.04); }\n .Step-module_step__k42go.Step-module_hasLabel__LZNvd svg {\n width: 18px !important;\n height: 18px !important; }\n\n.Step-module_stepIconCircle__hnxIV svg {\n width: 24px;\n height: 24px; }\n\n.Step-module_stepValue__B0-xv {\n position: absolute;\n color: var(--secondary-contrast-text); }\n .Step-module_stepValue__B0-xv .Step-module_isActive__3GGcl {\n color: var(--primary-contrast-text); }\n";
|
|
@@ -2716,4 +2733,4 @@ const TreeItem = (props) => {
|
|
|
2716
2733
|
children && _isExpanded ? React.createElement("ul", null, children) : null));
|
|
2717
2734
|
};
|
|
2718
2735
|
|
|
2719
|
-
export { Alert, AppBar, AppBarTitle, AutoComplete, Backdrop, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonGroup, COLOR, Card, CardBody, CardFooter, CardImage, CardSubtitle, CardText, CardTitle, CaretDownSolidIcon, CheckSolidIcon, CheckSquareRegularIcon, Checkbox, ChevronDownSolidIcon, ChevronLeftSolidIcon, ChevronRightSolidIcon, ChevronUpSolidIcon, Chip, CircleSolidIcon, Column, ConditionalWrapper, CssTransition, DATEMODE, DateSelect, DaySelect, Drawer, EmailValidator, ExpansionPanel, ExpansionPanelContent, ExpansionPanelHeader, FileInput, FloatingActionButton, Form, FormControl, FormError, FormGroup, FormHint, FormInput, FormLabel, GlobalModal, HomeSolidIcon, HourSelect, Icon, IconButton, IsEmptyValidator, IsEqualValidator, Link, List, ListItem, ListItemAction, ListItemAvatar, ListItemIcon, ListItemText, LoadingIndicator, LoadingIndicatorContainer, MODALBUTTONTYPE, MODALTYPE, Menu, MenuBody, MenuDivider, MenuItem, MenuToggle, MilliSecondSelect, MinuteSelect, Modal, ModalBody, ModalFooter, ModalHeader, MonthSelect, NumberSelect, POSITION, PlusSolidIcon, Row, SIZE, STATUS, SecondSelect, Select, Sidebar, Snackbar, SpeedDial, SpeedDialAction, SpeedDialIcon, SpinnerSolidIcon, SquareRegularIcon, Step, Stepper, StepperActions, TIMEMODE, Tab, TabPanel, Table, TableBody, TableCell, TableHead, TableRow, Tabs, Textarea, TimeSelect, TimesCircleSolidIcon, TimesSolidIcon, Tooltip, TreeItem, TreeView, Typography, VARIANT, YearSelect, loadingIndicatorService, modalService, snackbarService, useConstructor, useCssClasses, useDebounce, useHover, useWindowSize };
|
|
2736
|
+
export { Alert, AppBar, AppBarTitle, AutoComplete, Backdrop, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonGroup, COLOR, Card, CardBody, CardFooter, CardImage, CardSubtitle, CardText, CardTitle, CaretDownSolidIcon, CheckSolidIcon, CheckSquareRegularIcon, Checkbox, ChevronDownSolidIcon, ChevronLeftSolidIcon, ChevronRightSolidIcon, ChevronUpSolidIcon, Chip, CircleSolidIcon, Column, ConditionalWrapper, CssTransition, DATEMODE, DateSelect, DaySelect, Drawer, EmailValidator, ExpansionPanel, ExpansionPanelContent, ExpansionPanelHeader, FileInput, FloatingActionButton, Form, FormControl, FormError, FormGroup, FormHint, FormInput, FormLabel, GlobalModal, HomeSolidIcon, HourSelect, Icon, IconButton, IsEmptyValidator, IsEqualValidator, Link, List, ListItem, ListItemAction, ListItemAvatar, ListItemIcon, ListItemText, LoadingIndicator, LoadingIndicatorContainer, MODALBUTTONTYPE, MODALTYPE, Menu, MenuBody, MenuDivider, MenuItem, MenuToggle, MilliSecondSelect, MinuteSelect, Modal, ModalBody, ModalFooter, ModalHeader, MonthSelect, NumberSelect, POSITION, PlusSolidIcon, Row, SIZE, STATUS, SecondSelect, Select, Sidebar, Snackbar, SpeedDial, SpeedDialAction, SpeedDialIcon, SpinnerSolidIcon, SquareRegularIcon, Step, Stepper, StepperActions, TIMEMODE, Tab, TabPanel, Table, TableBody, TableCell, TableHead, TableRow, Tabs, Textarea, TimeSelect, TimesCircleSolidIcon, TimesSolidIcon, Tooltip, TreeItem, TreeView, Typography, VARIANT, YearSelect, loadingIndicatorService, modalService, snackbarService, useConstructor, useCssClasses, useDebounce, useHover, useMobileDetect, useWindowSize };
|
package/index.js
CHANGED
|
@@ -232,23 +232,25 @@ const CircleSolidIcon = () => (React__default["default"].createElement("svg", {
|
|
|
232
232
|
const ChevronLeftSolidIcon = () => (React__default["default"].createElement("svg", { "aria-hidden": "true", focusable: "false", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512" },
|
|
233
233
|
React__default["default"].createElement("path", { fill: "currentColor", d: "M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z" })));
|
|
234
234
|
|
|
235
|
-
function
|
|
236
|
-
const
|
|
237
|
-
width: 0,
|
|
238
|
-
height: 0,
|
|
239
|
-
});
|
|
235
|
+
function useDebounce(callback, timeout, deps) {
|
|
236
|
+
const timeoutId = React.useRef();
|
|
240
237
|
React.useEffect(() => {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
238
|
+
clearTimeout(timeoutId.current);
|
|
239
|
+
timeoutId.current = setTimeout(callback, timeout);
|
|
240
|
+
return () => clearTimeout(timeoutId.current);
|
|
241
|
+
}, deps);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
const useConstructor = (callBack) => {
|
|
245
|
+
const [hasBeenCalled, setHasBeenCalled] = React.useState(false);
|
|
246
|
+
if (hasBeenCalled)
|
|
247
|
+
return;
|
|
248
|
+
callBack();
|
|
249
|
+
setHasBeenCalled(true);
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
function useCssClasses(cssClasses) {
|
|
253
|
+
return [(cssClasses === null || cssClasses === void 0 ? void 0 : cssClasses.filter(css => css).join(' ')) || ''];
|
|
252
254
|
}
|
|
253
255
|
|
|
254
256
|
function useHover() {
|
|
@@ -273,26 +275,37 @@ function useHover() {
|
|
|
273
275
|
return [ref, value];
|
|
274
276
|
}
|
|
275
277
|
|
|
276
|
-
|
|
277
|
-
const [
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
setHasBeenCalled(true);
|
|
282
|
-
};
|
|
283
|
-
|
|
284
|
-
function useDebounce(callback, timeout, deps) {
|
|
285
|
-
const timeoutId = React.useRef();
|
|
278
|
+
function useWindowSize() {
|
|
279
|
+
const [windowSize, setWindowSize] = React.useState({
|
|
280
|
+
width: 0,
|
|
281
|
+
height: 0,
|
|
282
|
+
});
|
|
286
283
|
React.useEffect(() => {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
284
|
+
function handleResize() {
|
|
285
|
+
setWindowSize({
|
|
286
|
+
width: window.innerWidth,
|
|
287
|
+
height: window.innerHeight,
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
window.addEventListener("resize", handleResize);
|
|
291
|
+
handleResize();
|
|
292
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
293
|
+
}, []);
|
|
294
|
+
return windowSize;
|
|
291
295
|
}
|
|
292
296
|
|
|
293
|
-
function
|
|
294
|
-
const
|
|
295
|
-
|
|
297
|
+
function useMobileDetect() {
|
|
298
|
+
const [isMobile, setIsMobile] = React.useState(false);
|
|
299
|
+
const windowSize = useWindowSize();
|
|
300
|
+
const checkIsMobile = (height, width) => {
|
|
301
|
+
if (height > 0 && width > 0) {
|
|
302
|
+
setIsMobile(!(width >= 1024));
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
React.useEffect(() => {
|
|
306
|
+
windowSize && checkIsMobile(windowSize.height, windowSize.width);
|
|
307
|
+
}, [windowSize]);
|
|
308
|
+
return { isMobile };
|
|
296
309
|
}
|
|
297
310
|
|
|
298
311
|
var css_248z$X = ".Backdrop-module_backdrop__IRMoL {\n height: 100%;\n width: 100%;\n position: absolute;\n opacity: 0.5;\n z-index: 1040;\n top: 0;\n left: 0;\n background-color: #000; }\n .Backdrop-module_backdrop__IRMoL.Backdrop-module_isTransparent__F5nA5 {\n opacity: 0; }\n";
|
|
@@ -492,21 +505,22 @@ styleInject(css_248z$P);
|
|
|
492
505
|
|
|
493
506
|
const Badge = (props) => {
|
|
494
507
|
const { children, content, className, color = exports.COLOR.primary } = props, rest = __rest(props, ["children", "content", "className", "color"]);
|
|
495
|
-
const
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
className
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
const getCssClassesBadge = () => {
|
|
502
|
-
const cssClasses = [];
|
|
503
|
-
cssClasses.push(styles$P.badge);
|
|
504
|
-
cssClasses.push(styles$P[color]);
|
|
505
|
-
return cssClasses.filter(css => css).join(' ');
|
|
506
|
-
};
|
|
507
|
-
return (React__default["default"].createElement("div", Object.assign({ className: getCssClassesBadgeContainer() }, rest),
|
|
508
|
+
const [cssClassName] = useCssClasses([
|
|
509
|
+
styles$P.badge,
|
|
510
|
+
styles$P[color],
|
|
511
|
+
className
|
|
512
|
+
]);
|
|
513
|
+
return (React__default["default"].createElement(BadgeContainer, null,
|
|
508
514
|
children,
|
|
509
|
-
React__default["default"].createElement("span", { className:
|
|
515
|
+
React__default["default"].createElement("span", Object.assign({ className: cssClassName }, rest), content)));
|
|
516
|
+
};
|
|
517
|
+
const BadgeContainer = (props) => {
|
|
518
|
+
const { children, className } = props, rest = __rest(props, ["children", "className"]);
|
|
519
|
+
const [cssClassName] = useCssClasses([
|
|
520
|
+
styles$P.badgeContainer,
|
|
521
|
+
className,
|
|
522
|
+
]);
|
|
523
|
+
return (React__default["default"].createElement("div", Object.assign({ className: cssClassName }, rest), children));
|
|
510
524
|
};
|
|
511
525
|
|
|
512
526
|
var css_248z$O = ".Button-module_button__qeIer {\n text-transform: uppercase;\n flex-shrink: 0;\n background-color: transparent;\n display: inline-block;\n font-weight: 400;\n line-height: 1.5;\n text-align: center;\n text-decoration: none;\n vertical-align: middle;\n user-select: none;\n border: 1px solid transparent;\n padding: 0.375rem 0.75rem;\n transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out,\r box-shadow 0.15s ease-in-out;\n min-width: 64px;\n font-size: 0.875rem;\n border-radius: var(--borderRadius); }\n .Button-module_button__qeIer.Button-module_shadow__6N2nE {\n box-shadow: var(--shadow); }\n .Button-module_button__qeIer.Button-module_block__JIazf {\n width: 100%; }\n .Button-module_button__qeIer:hover:not(:disabled) {\n cursor: pointer; }\n .Button-module_button__qeIer:focus:not(:disabled) {\n border-color: #86b7fe;\n outline: 0;\n box-shadow: inset 0 1px 2px #00000013, 0 0 0 0.25rem #0d6efd40; }\n\n.Button-module_btnContained__16y5l.Button-module_primary__EUyOu {\n color: var(--primary-contrast-text);\n background-color: var(--primary); }\n .Button-module_btnContained__16y5l.Button-module_primary__EUyOu:hover:not(:disabled) {\n background-color: var(--primary-dark); }\n\n.Button-module_btnContained__16y5l.Button-module_accent__opVgQ {\n color: var(--accent-contrast-text);\n background-color: var(--accent); }\n .Button-module_btnContained__16y5l.Button-module_accent__opVgQ:hover:not(:disabled) {\n background-color: var(--accent-dark); }\n\n.Button-module_btnContained__16y5l.Button-module_secondary__zKoGk {\n color: var(--secondary-contrast-text);\n background-color: var(--secondary); }\n .Button-module_btnContained__16y5l.Button-module_secondary__zKoGk:hover:not(:disabled) {\n background-color: var(--secondary-dark); }\n\n.Button-module_btnContained__16y5l.Button-module_light__LXeZy {\n color: var(--light-contrast-text);\n background-color: var(--light); }\n .Button-module_btnContained__16y5l.Button-module_light__LXeZy:hover:not(:disabled) {\n background-color: var(--light-dark); }\n\n.Button-module_btnContained__16y5l.Button-module_dark__5oFOT {\n color: var(--dark-contrast-text);\n background-color: var(--dark); }\n .Button-module_btnContained__16y5l.Button-module_dark__5oFOT:hover:not(:disabled) {\n background-color: var(--dark-dark); }\n\n.Button-module_btnContained__16y5l:disabled {\n color: rgba(0, 0, 0, 0.26);\n box-shadow: none;\n background-color: rgba(0, 0, 0, 0.12); }\n .Button-module_btnContained__16y5l:disabled:hover {\n cursor: not-allowed; }\n\n.Button-module_btnText__N5Gys {\n box-shadow: none;\n text-decoration: none; }\n .Button-module_btnText__N5Gys.Button-module_primary__EUyOu {\n color: var(--primary); }\n .Button-module_btnText__N5Gys.Button-module_primary__EUyOu:hover:not(:disabled) {\n text-decoration: none;\n background: var(--primary-highlight); }\n .Button-module_btnText__N5Gys.Button-module_secondary__zKoGk {\n color: var(--secondary); }\n .Button-module_btnText__N5Gys.Button-module_secondary__zKoGk:hover:not(:disabled) {\n text-decoration: none;\n background: var(--secondary-highlight); }\n .Button-module_btnText__N5Gys.Button-module_accent__opVgQ {\n color: var(--accent); }\n .Button-module_btnText__N5Gys.Button-module_accent__opVgQ:hover:not(:disabled) {\n text-decoration: none;\n background: var(--accent-highlight); }\n .Button-module_btnText__N5Gys.Button-module_light__LXeZy {\n color: var(--light-contrast-text); }\n .Button-module_btnText__N5Gys.Button-module_light__LXeZy:hover:not(:disabled) {\n text-decoration: none;\n background: var(--light-highlight); }\n .Button-module_btnText__N5Gys.Button-module_dark__5oFOT {\n color: var(--dark); }\n .Button-module_btnText__N5Gys.Button-module_dark__5oFOT:hover:not(:disabled) {\n text-decoration: none;\n background: var(--dark-highlight); }\n\n.Button-module_btnOutline__CCFPI {\n box-shadow: none;\n text-decoration: none; }\n .Button-module_btnOutline__CCFPI.Button-module_primary__EUyOu {\n color: var(--primary);\n border-color: var(--primary); }\n .Button-module_btnOutline__CCFPI.Button-module_primary__EUyOu:hover:not(:disabled) {\n background: var(--primary-highlight); }\n .Button-module_btnOutline__CCFPI.Button-module_secondary__zKoGk {\n color: var(--secondary);\n border-color: var(--secondary); }\n .Button-module_btnOutline__CCFPI.Button-module_secondary__zKoGk:hover:not(:disabled) {\n background: var(--secondary-highlight); }\n .Button-module_btnOutline__CCFPI.Button-module_accent__opVgQ {\n color: var(--accent);\n border-color: var(--accent); }\n .Button-module_btnOutline__CCFPI.Button-module_accent__opVgQ:hover:not(:disabled) {\n background: var(--accent-highlight); }\n .Button-module_btnOutline__CCFPI.Button-module_light__LXeZy {\n color: var(--light-contrast-text);\n border-color: var(--light); }\n .Button-module_btnOutline__CCFPI.Button-module_light__LXeZy:hover:not(:disabled) {\n background: var(--light-highlight); }\n .Button-module_btnOutline__CCFPI.Button-module_dark__5oFOT {\n color: var(--dark);\n border-color: var(--dark); }\n .Button-module_btnOutline__CCFPI.Button-module_dark__5oFOT:hover:not(:disabled) {\n background: var(--dark-highlight); }\n .Button-module_btnOutline__CCFPI:disabled {\n color: rgba(0, 0, 0, 0.26);\n border: 1px solid rgba(0, 0, 0, 0.12); }\n\n.Button-module_startIcon__Eylwr {\n display: inherit;\n margin-left: -4px;\n margin-right: 8px; }\n .Button-module_startIcon__Eylwr svg {\n width: 18px;\n height: 18px; }\n\n.Button-module_endIcon__pCffL {\n display: inherit;\n margin-left: 8px; }\n .Button-module_endIcon__pCffL svg {\n width: 18px;\n height: 18px; }\n";
|
|
@@ -565,7 +579,7 @@ const ButtonGroup = (props) => {
|
|
|
565
579
|
return (React__default["default"].createElement("div", Object.assign({ className: getCssClasses(), role: "group" }, rest), children));
|
|
566
580
|
};
|
|
567
581
|
|
|
568
|
-
var css_248z$M = ".Breadcrumb-module_breadcrumb__-pvAn {\n display: flex;\n flex-wrap: wrap;\n padding: 0;\n
|
|
582
|
+
var css_248z$M = ".Breadcrumb-module_breadcrumb__-pvAn {\n display: flex;\n flex-wrap: wrap;\n padding: 0;\n list-style: none;\n margin: 0; }\n";
|
|
569
583
|
var styles$M = {"breadcrumb":"Breadcrumb-module_breadcrumb__-pvAn"};
|
|
570
584
|
styleInject(css_248z$M);
|
|
571
585
|
|
|
@@ -1654,12 +1668,12 @@ const ExpansionPanelHeader = (props) => {
|
|
|
1654
1668
|
React__default["default"].createElement(Icon, null, isExpanded ? React__default["default"].createElement(ChevronUpSolidIcon, null) : React__default["default"].createElement(ChevronDownSolidIcon, null)))));
|
|
1655
1669
|
};
|
|
1656
1670
|
|
|
1657
|
-
var css_248z$n = ".ExpansionPanel-module_expansionPanel__m1yQq {\n background-color: var(--white);\n
|
|
1658
|
-
var styles$n = {"expansionPanel":"ExpansionPanel-module_expansionPanel__m1yQq","isExpanded":"ExpansionPanel-module_isExpanded__TS1ph"};
|
|
1671
|
+
var css_248z$n = ".ExpansionPanel-module_expansionPanel__m1yQq {\n background-color: var(--white);\n transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; }\n .ExpansionPanel-module_expansionPanel__m1yQq.ExpansionPanel-module_shadow__zIjJ6 {\n box-shadow: var(--shadow); }\n .ExpansionPanel-module_expansionPanel__m1yQq:first-child {\n border-top-left-radius: 4px;\n border-top-right-radius: 4px; }\n .ExpansionPanel-module_expansionPanel__m1yQq:last-child {\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px; }\n .ExpansionPanel-module_expansionPanel__m1yQq.ExpansionPanel-module_isExpanded__TS1ph:first-child {\n margin-top: 0; }\n .ExpansionPanel-module_expansionPanel__m1yQq.ExpansionPanel-module_isExpanded__TS1ph:last-child {\n margin-bottom: 0; }\n";
|
|
1672
|
+
var styles$n = {"expansionPanel":"ExpansionPanel-module_expansionPanel__m1yQq","shadow":"ExpansionPanel-module_shadow__zIjJ6","isExpanded":"ExpansionPanel-module_isExpanded__TS1ph"};
|
|
1659
1673
|
styleInject(css_248z$n);
|
|
1660
1674
|
|
|
1661
1675
|
const ExpansionPanel = (props) => {
|
|
1662
|
-
const { header, children, isExpanded = false, onChange } = props;
|
|
1676
|
+
const { header, children, isExpanded = false, shadow, onChange } = props;
|
|
1663
1677
|
const [_isExpanded, setIsExpanded] = React.useState(false);
|
|
1664
1678
|
React.useEffect(() => {
|
|
1665
1679
|
setIsExpanded(isExpanded);
|
|
@@ -1670,6 +1684,7 @@ const ExpansionPanel = (props) => {
|
|
|
1670
1684
|
if (_isExpanded) {
|
|
1671
1685
|
cssClasses.push(styles$n.isExpanded);
|
|
1672
1686
|
}
|
|
1687
|
+
shadow && cssClasses.push(styles$n.shadow);
|
|
1673
1688
|
return cssClasses.filter(css => css).join(' ');
|
|
1674
1689
|
};
|
|
1675
1690
|
const handleClickHeader = (event) => {
|
|
@@ -1682,16 +1697,17 @@ const ExpansionPanel = (props) => {
|
|
|
1682
1697
|
React__default["default"].createElement(ExpansionPanelContent, null, children)));
|
|
1683
1698
|
};
|
|
1684
1699
|
|
|
1685
|
-
var css_248z$m = ".FloatingActionButton-module_fab__Rw3kd {\n box-shadow: var(--shadow); }\n .FloatingActionButton-
|
|
1686
|
-
var styles$m = {"fab":"FloatingActionButton-module_fab__Rw3kd","fixed":"FloatingActionButton-module_fixed__XQOkG"};
|
|
1700
|
+
var css_248z$m = ".FloatingActionButton-module_fab__Rw3kd {\n box-shadow: var(--shadow); }\n\n.FloatingActionButton-module_fixed__XQOkG {\n position: fixed;\n z-index: 1000; }\n .FloatingActionButton-module_fixed__XQOkG.FloatingActionButton-module_leftTop__ZiHQN {\n top: 16px;\n left: 16px; }\n .FloatingActionButton-module_fixed__XQOkG.FloatingActionButton-module_leftBottom__210sl {\n bottom: 16px;\n left: 16px; }\n .FloatingActionButton-module_fixed__XQOkG.FloatingActionButton-module_rightTop__VUsvT {\n top: 64px;\n right: 16px; }\n .FloatingActionButton-module_fixed__XQOkG.FloatingActionButton-module_rightBottom__FaUFl {\n bottom: 16px;\n right: 16px; }\n";
|
|
1701
|
+
var styles$m = {"fab":"FloatingActionButton-module_fab__Rw3kd","fixed":"FloatingActionButton-module_fixed__XQOkG","leftTop":"FloatingActionButton-module_leftTop__ZiHQN","leftBottom":"FloatingActionButton-module_leftBottom__210sl","rightTop":"FloatingActionButton-module_rightTop__VUsvT","rightBottom":"FloatingActionButton-module_rightBottom__FaUFl"};
|
|
1687
1702
|
styleInject(css_248z$m);
|
|
1688
1703
|
|
|
1689
1704
|
const FloatingActionButton = (props) => {
|
|
1690
|
-
const { className, icon, color = exports.COLOR.primary, fixed, size = exports.SIZE.lg, isActive, disabled, onClick } = props;
|
|
1705
|
+
const { className, icon, color = exports.COLOR.primary, fixed, position = 'rightBottom', size = exports.SIZE.lg, isActive, disabled, onClick } = props;
|
|
1691
1706
|
const getCssClasses = () => {
|
|
1692
1707
|
const cssClasses = [];
|
|
1693
1708
|
cssClasses.push(styles$m.fab);
|
|
1694
|
-
fixed && cssClasses.push(styles$m
|
|
1709
|
+
fixed && cssClasses.push(styles$m.fixed);
|
|
1710
|
+
position && fixed && cssClasses.push(styles$m[position]);
|
|
1695
1711
|
className && cssClasses.push(className);
|
|
1696
1712
|
return cssClasses.filter(css => css).join(' ');
|
|
1697
1713
|
};
|
|
@@ -2293,24 +2309,25 @@ const Stepper = (props) => {
|
|
|
2293
2309
|
React__default["default"].createElement(StepperActions, { className: "mt-3", isFirstStep: activeIndex === 0, isStepOptional: isStepOptional(activeIndex), isCompleted: isLastStep(), onBack: handleBack, onSkip: handleSkip, onNext: handleNext, onReset: handleReset }))));
|
|
2294
2310
|
};
|
|
2295
2311
|
|
|
2296
|
-
var css_248z$8 = ".Typography-module_typography__sw-td {\n
|
|
2297
|
-
var styles$8 = {"typography":"Typography-module_typography__sw-td"};
|
|
2312
|
+
var css_248z$8 = ".Typography-module_typography__sw-td {\n font-family: var(--fontFamily); }\n .Typography-module_typography__sw-td.Typography-module_wrap__W7G0R {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis; }\n\nh1 {\n font-size: calc(1.375rem + 1.5vw); }\n\nh2 {\n font-size: calc(1.325rem + 0.9vw); }\n\nh3 {\n font-size: calc(1.3rem + 0.6vw); }\n\nh4 {\n font-size: calc(1.275rem + 0.3vw); }\n\nh5 {\n font-size: 1.25rem; }\n\nh6 {\n font-size: 1rem; }\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-weight: 500 !important;\n margin-top: 0;\n margin-bottom: 0.5rem;\n line-height: 1.2; }\n";
|
|
2313
|
+
var styles$8 = {"typography":"Typography-module_typography__sw-td","wrap":"Typography-module_wrap__W7G0R"};
|
|
2298
2314
|
styleInject(css_248z$8);
|
|
2299
2315
|
|
|
2300
2316
|
const Wrapper = (props) => {
|
|
2301
|
-
const { as = 'span', children, className } = props, rest = __rest(props, ["as", "children", "className"]);
|
|
2317
|
+
const { as = 'span', wrap, children, className } = props, rest = __rest(props, ["as", "wrap", "children", "className"]);
|
|
2302
2318
|
const getCssClasses = () => {
|
|
2303
2319
|
const cssClasses = [];
|
|
2304
2320
|
cssClasses.push(styles$8.typography);
|
|
2305
2321
|
cssClasses.push(styles$8.as);
|
|
2322
|
+
wrap && cssClasses.push(styles$8.wrap);
|
|
2306
2323
|
className && cssClasses.push(className);
|
|
2307
2324
|
return cssClasses.filter(css => css).join(' ');
|
|
2308
2325
|
};
|
|
2309
2326
|
return React__default["default"].createElement(as, Object.assign(Object.assign({}, rest), { className: getCssClasses() }), children);
|
|
2310
2327
|
};
|
|
2311
2328
|
const Typography = (_a) => {
|
|
2312
|
-
var { children, as = 'span' } = _a, rest = __rest(_a, ["children", "as"]);
|
|
2313
|
-
return (React__default["default"].createElement(Wrapper, Object.assign({ as: as }, rest), children));
|
|
2329
|
+
var { children, as = 'span', wrap } = _a, rest = __rest(_a, ["children", "as", "wrap"]);
|
|
2330
|
+
return (React__default["default"].createElement(Wrapper, Object.assign({ as: as, wrap: wrap }, rest), children));
|
|
2314
2331
|
};
|
|
2315
2332
|
|
|
2316
2333
|
var css_248z$7 = ".Step-module_stepWrapper__IQwq1 {\n display: flex;\n align-items: center;\n padding-left: 8px;\n padding-right: 8px;\n transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; }\n .Step-module_stepWrapper__IQwq1.Step-module_hasLabel__LZNvd:not(.Step-module_disabled__JnxUP):hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.04);\n border-radius: var(--borderRadius); }\n\n.Step-module_step__k42go {\n width: 40px;\n height: 40px;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; }\n .Step-module_step__k42go:not(.Step-module_hasLabel__LZNvd):not(.Step-module_disabled__JnxUP):hover {\n border-radius: 100%;\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.04); }\n .Step-module_step__k42go.Step-module_hasLabel__LZNvd svg {\n width: 18px !important;\n height: 18px !important; }\n\n.Step-module_stepIconCircle__hnxIV svg {\n width: 24px;\n height: 24px; }\n\n.Step-module_stepValue__B0-xv {\n position: absolute;\n color: var(--secondary-contrast-text); }\n .Step-module_stepValue__B0-xv .Step-module_isActive__3GGcl {\n color: var(--primary-contrast-text); }\n";
|
|
@@ -2838,4 +2855,5 @@ exports.useConstructor = useConstructor;
|
|
|
2838
2855
|
exports.useCssClasses = useCssClasses;
|
|
2839
2856
|
exports.useDebounce = useDebounce;
|
|
2840
2857
|
exports.useHover = useHover;
|
|
2858
|
+
exports.useMobileDetect = useMobileDetect;
|
|
2841
2859
|
exports.useWindowSize = useWindowSize;
|
package/package.json
CHANGED