react-asc 23.1.0 → 23.3.1
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/CssTransition/CssTransition.d.ts +1 -1
- package/components/Typography/Typography.d.ts +3 -1
- package/hooks/index.d.ts +1 -0
- package/hooks/useOnDestroy.d.ts +1 -0
- package/index.es.js +43 -24
- package/index.js +43 -23
- package/package.json +1 -1
|
@@ -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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useOnDestroy: (callBack: () => void) => void;
|
package/index.es.js
CHANGED
|
@@ -242,8 +242,7 @@ const useConstructor = (callBack) => {
|
|
|
242
242
|
};
|
|
243
243
|
|
|
244
244
|
function useCssClasses(cssClasses) {
|
|
245
|
-
|
|
246
|
-
return [cssClassName];
|
|
245
|
+
return [(cssClasses === null || cssClasses === void 0 ? void 0 : cssClasses.filter(css => css).join(' ')) || ''];
|
|
247
246
|
}
|
|
248
247
|
|
|
249
248
|
function useHover() {
|
|
@@ -301,6 +300,14 @@ function useMobileDetect() {
|
|
|
301
300
|
return { isMobile };
|
|
302
301
|
}
|
|
303
302
|
|
|
303
|
+
const useOnDestroy = (callBack) => {
|
|
304
|
+
useEffect(() => {
|
|
305
|
+
return () => {
|
|
306
|
+
callBack();
|
|
307
|
+
};
|
|
308
|
+
}, []);
|
|
309
|
+
};
|
|
310
|
+
|
|
304
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";
|
|
305
312
|
var styles$X = {"backdrop":"Backdrop-module_backdrop__IRMoL","isTransparent":"Backdrop-module_isTransparent__F5nA5"};
|
|
306
313
|
styleInject(css_248z$X);
|
|
@@ -498,21 +505,22 @@ styleInject(css_248z$P);
|
|
|
498
505
|
|
|
499
506
|
const Badge = (props) => {
|
|
500
507
|
const { children, content, className, color = COLOR.primary } = props, rest = __rest(props, ["children", "content", "className", "color"]);
|
|
501
|
-
const
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
className
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
const getCssClassesBadge = () => {
|
|
508
|
-
const cssClasses = [];
|
|
509
|
-
cssClasses.push(styles$P.badge);
|
|
510
|
-
cssClasses.push(styles$P[color]);
|
|
511
|
-
return cssClasses.filter(css => css).join(' ');
|
|
512
|
-
};
|
|
513
|
-
return (React.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.createElement(BadgeContainer, null,
|
|
514
514
|
children,
|
|
515
|
-
React.createElement("span", { className:
|
|
515
|
+
React.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.createElement("div", Object.assign({ className: cssClassName }, rest), children));
|
|
516
524
|
};
|
|
517
525
|
|
|
518
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";
|
|
@@ -792,14 +800,22 @@ const Chip = (props) => {
|
|
|
792
800
|
|
|
793
801
|
const CssTransition = (props) => {
|
|
794
802
|
const { className, children, show } = props;
|
|
803
|
+
const [isInit, setIsInit] = useState(false);
|
|
804
|
+
const [isRenderChild, setIsRenderChild] = useState(undefined);
|
|
795
805
|
const [isShow, setIsShow] = useState(undefined);
|
|
796
806
|
const [cssState, setCssState] = useState({
|
|
797
807
|
hidden: true
|
|
798
808
|
});
|
|
799
809
|
const transitionConainter = useRef(null);
|
|
800
810
|
useEffect(() => {
|
|
801
|
-
if (show !== undefined) {
|
|
811
|
+
if (isInit && show !== undefined) {
|
|
802
812
|
setIsShow(show);
|
|
813
|
+
if (show === true) {
|
|
814
|
+
setIsRenderChild(true);
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
if (!isInit) {
|
|
818
|
+
setIsInit(true);
|
|
803
819
|
}
|
|
804
820
|
}, [show]);
|
|
805
821
|
const nextFrame = () => {
|
|
@@ -834,6 +850,7 @@ const CssTransition = (props) => {
|
|
|
834
850
|
setCssState({ leave: true, leaveEnd: true });
|
|
835
851
|
await afterTransition(transitionConainter.current);
|
|
836
852
|
setCssState({ hidden: true });
|
|
853
|
+
setIsRenderChild(false);
|
|
837
854
|
}
|
|
838
855
|
};
|
|
839
856
|
useEffect(() => {
|
|
@@ -852,7 +869,8 @@ const CssTransition = (props) => {
|
|
|
852
869
|
(cssState === null || cssState === void 0 ? void 0 : cssState.leaveEnd) && cssClasses.push(`${className}-leave-end`);
|
|
853
870
|
return cssClasses.filter((css) => css).join(" ");
|
|
854
871
|
};
|
|
855
|
-
return (React.createElement(
|
|
872
|
+
return (React.createElement(React.Fragment, null, isRenderChild &&
|
|
873
|
+
React.createElement("div", { ref: transitionConainter, className: getCssClasses() }, children)));
|
|
856
874
|
};
|
|
857
875
|
|
|
858
876
|
var css_248z$B = ".Column-module_column__fcTgl {\n flex: 1 0 0%; }\n\n@media (max-width: 575.98px) {\n .Column-module_column__fcTgl {\n flex: 1; } }\n";
|
|
@@ -2301,24 +2319,25 @@ const Stepper = (props) => {
|
|
|
2301
2319
|
React.createElement(StepperActions, { className: "mt-3", isFirstStep: activeIndex === 0, isStepOptional: isStepOptional(activeIndex), isCompleted: isLastStep(), onBack: handleBack, onSkip: handleSkip, onNext: handleNext, onReset: handleReset }))));
|
|
2302
2320
|
};
|
|
2303
2321
|
|
|
2304
|
-
var css_248z$8 = ".Typography-module_typography__sw-td {\n font-family: var(--fontFamily)
|
|
2305
|
-
var styles$8 = {"typography":"Typography-module_typography__sw-td"};
|
|
2322
|
+
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";
|
|
2323
|
+
var styles$8 = {"typography":"Typography-module_typography__sw-td","wrap":"Typography-module_wrap__W7G0R"};
|
|
2306
2324
|
styleInject(css_248z$8);
|
|
2307
2325
|
|
|
2308
2326
|
const Wrapper = (props) => {
|
|
2309
|
-
const { as = 'span', children, className } = props, rest = __rest(props, ["as", "children", "className"]);
|
|
2327
|
+
const { as = 'span', wrap, children, className } = props, rest = __rest(props, ["as", "wrap", "children", "className"]);
|
|
2310
2328
|
const getCssClasses = () => {
|
|
2311
2329
|
const cssClasses = [];
|
|
2312
2330
|
cssClasses.push(styles$8.typography);
|
|
2313
2331
|
cssClasses.push(styles$8.as);
|
|
2332
|
+
wrap && cssClasses.push(styles$8.wrap);
|
|
2314
2333
|
className && cssClasses.push(className);
|
|
2315
2334
|
return cssClasses.filter(css => css).join(' ');
|
|
2316
2335
|
};
|
|
2317
2336
|
return React.createElement(as, Object.assign(Object.assign({}, rest), { className: getCssClasses() }), children);
|
|
2318
2337
|
};
|
|
2319
2338
|
const Typography = (_a) => {
|
|
2320
|
-
var { children, as = 'span' } = _a, rest = __rest(_a, ["children", "as"]);
|
|
2321
|
-
return (React.createElement(Wrapper, Object.assign({ as: as }, rest), children));
|
|
2339
|
+
var { children, as = 'span', wrap } = _a, rest = __rest(_a, ["children", "as", "wrap"]);
|
|
2340
|
+
return (React.createElement(Wrapper, Object.assign({ as: as, wrap: wrap }, rest), children));
|
|
2322
2341
|
};
|
|
2323
2342
|
|
|
2324
2343
|
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";
|
|
@@ -2732,4 +2751,4 @@ const TreeItem = (props) => {
|
|
|
2732
2751
|
children && _isExpanded ? React.createElement("ul", null, children) : null));
|
|
2733
2752
|
};
|
|
2734
2753
|
|
|
2735
|
-
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 };
|
|
2754
|
+
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, useOnDestroy, useWindowSize };
|
package/index.js
CHANGED
|
@@ -250,8 +250,7 @@ const useConstructor = (callBack) => {
|
|
|
250
250
|
};
|
|
251
251
|
|
|
252
252
|
function useCssClasses(cssClasses) {
|
|
253
|
-
|
|
254
|
-
return [cssClassName];
|
|
253
|
+
return [(cssClasses === null || cssClasses === void 0 ? void 0 : cssClasses.filter(css => css).join(' ')) || ''];
|
|
255
254
|
}
|
|
256
255
|
|
|
257
256
|
function useHover() {
|
|
@@ -309,6 +308,14 @@ function useMobileDetect() {
|
|
|
309
308
|
return { isMobile };
|
|
310
309
|
}
|
|
311
310
|
|
|
311
|
+
const useOnDestroy = (callBack) => {
|
|
312
|
+
React.useEffect(() => {
|
|
313
|
+
return () => {
|
|
314
|
+
callBack();
|
|
315
|
+
};
|
|
316
|
+
}, []);
|
|
317
|
+
};
|
|
318
|
+
|
|
312
319
|
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";
|
|
313
320
|
var styles$X = {"backdrop":"Backdrop-module_backdrop__IRMoL","isTransparent":"Backdrop-module_isTransparent__F5nA5"};
|
|
314
321
|
styleInject(css_248z$X);
|
|
@@ -506,21 +513,22 @@ styleInject(css_248z$P);
|
|
|
506
513
|
|
|
507
514
|
const Badge = (props) => {
|
|
508
515
|
const { children, content, className, color = exports.COLOR.primary } = props, rest = __rest(props, ["children", "content", "className", "color"]);
|
|
509
|
-
const
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
className
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
const getCssClassesBadge = () => {
|
|
516
|
-
const cssClasses = [];
|
|
517
|
-
cssClasses.push(styles$P.badge);
|
|
518
|
-
cssClasses.push(styles$P[color]);
|
|
519
|
-
return cssClasses.filter(css => css).join(' ');
|
|
520
|
-
};
|
|
521
|
-
return (React__default["default"].createElement("div", Object.assign({ className: getCssClassesBadgeContainer() }, rest),
|
|
516
|
+
const [cssClassName] = useCssClasses([
|
|
517
|
+
styles$P.badge,
|
|
518
|
+
styles$P[color],
|
|
519
|
+
className
|
|
520
|
+
]);
|
|
521
|
+
return (React__default["default"].createElement(BadgeContainer, null,
|
|
522
522
|
children,
|
|
523
|
-
React__default["default"].createElement("span", { className:
|
|
523
|
+
React__default["default"].createElement("span", Object.assign({ className: cssClassName }, rest), content)));
|
|
524
|
+
};
|
|
525
|
+
const BadgeContainer = (props) => {
|
|
526
|
+
const { children, className } = props, rest = __rest(props, ["children", "className"]);
|
|
527
|
+
const [cssClassName] = useCssClasses([
|
|
528
|
+
styles$P.badgeContainer,
|
|
529
|
+
className,
|
|
530
|
+
]);
|
|
531
|
+
return (React__default["default"].createElement("div", Object.assign({ className: cssClassName }, rest), children));
|
|
524
532
|
};
|
|
525
533
|
|
|
526
534
|
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";
|
|
@@ -800,14 +808,22 @@ const Chip = (props) => {
|
|
|
800
808
|
|
|
801
809
|
const CssTransition = (props) => {
|
|
802
810
|
const { className, children, show } = props;
|
|
811
|
+
const [isInit, setIsInit] = React.useState(false);
|
|
812
|
+
const [isRenderChild, setIsRenderChild] = React.useState(undefined);
|
|
803
813
|
const [isShow, setIsShow] = React.useState(undefined);
|
|
804
814
|
const [cssState, setCssState] = React.useState({
|
|
805
815
|
hidden: true
|
|
806
816
|
});
|
|
807
817
|
const transitionConainter = React.useRef(null);
|
|
808
818
|
React.useEffect(() => {
|
|
809
|
-
if (show !== undefined) {
|
|
819
|
+
if (isInit && show !== undefined) {
|
|
810
820
|
setIsShow(show);
|
|
821
|
+
if (show === true) {
|
|
822
|
+
setIsRenderChild(true);
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
if (!isInit) {
|
|
826
|
+
setIsInit(true);
|
|
811
827
|
}
|
|
812
828
|
}, [show]);
|
|
813
829
|
const nextFrame = () => {
|
|
@@ -842,6 +858,7 @@ const CssTransition = (props) => {
|
|
|
842
858
|
setCssState({ leave: true, leaveEnd: true });
|
|
843
859
|
await afterTransition(transitionConainter.current);
|
|
844
860
|
setCssState({ hidden: true });
|
|
861
|
+
setIsRenderChild(false);
|
|
845
862
|
}
|
|
846
863
|
};
|
|
847
864
|
React.useEffect(() => {
|
|
@@ -860,7 +877,8 @@ const CssTransition = (props) => {
|
|
|
860
877
|
(cssState === null || cssState === void 0 ? void 0 : cssState.leaveEnd) && cssClasses.push(`${className}-leave-end`);
|
|
861
878
|
return cssClasses.filter((css) => css).join(" ");
|
|
862
879
|
};
|
|
863
|
-
return (React__default["default"].createElement("
|
|
880
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null, isRenderChild &&
|
|
881
|
+
React__default["default"].createElement("div", { ref: transitionConainter, className: getCssClasses() }, children)));
|
|
864
882
|
};
|
|
865
883
|
|
|
866
884
|
var css_248z$B = ".Column-module_column__fcTgl {\n flex: 1 0 0%; }\n\n@media (max-width: 575.98px) {\n .Column-module_column__fcTgl {\n flex: 1; } }\n";
|
|
@@ -2309,24 +2327,25 @@ const Stepper = (props) => {
|
|
|
2309
2327
|
React__default["default"].createElement(StepperActions, { className: "mt-3", isFirstStep: activeIndex === 0, isStepOptional: isStepOptional(activeIndex), isCompleted: isLastStep(), onBack: handleBack, onSkip: handleSkip, onNext: handleNext, onReset: handleReset }))));
|
|
2310
2328
|
};
|
|
2311
2329
|
|
|
2312
|
-
var css_248z$8 = ".Typography-module_typography__sw-td {\n font-family: var(--fontFamily)
|
|
2313
|
-
var styles$8 = {"typography":"Typography-module_typography__sw-td"};
|
|
2330
|
+
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";
|
|
2331
|
+
var styles$8 = {"typography":"Typography-module_typography__sw-td","wrap":"Typography-module_wrap__W7G0R"};
|
|
2314
2332
|
styleInject(css_248z$8);
|
|
2315
2333
|
|
|
2316
2334
|
const Wrapper = (props) => {
|
|
2317
|
-
const { as = 'span', children, className } = props, rest = __rest(props, ["as", "children", "className"]);
|
|
2335
|
+
const { as = 'span', wrap, children, className } = props, rest = __rest(props, ["as", "wrap", "children", "className"]);
|
|
2318
2336
|
const getCssClasses = () => {
|
|
2319
2337
|
const cssClasses = [];
|
|
2320
2338
|
cssClasses.push(styles$8.typography);
|
|
2321
2339
|
cssClasses.push(styles$8.as);
|
|
2340
|
+
wrap && cssClasses.push(styles$8.wrap);
|
|
2322
2341
|
className && cssClasses.push(className);
|
|
2323
2342
|
return cssClasses.filter(css => css).join(' ');
|
|
2324
2343
|
};
|
|
2325
2344
|
return React__default["default"].createElement(as, Object.assign(Object.assign({}, rest), { className: getCssClasses() }), children);
|
|
2326
2345
|
};
|
|
2327
2346
|
const Typography = (_a) => {
|
|
2328
|
-
var { children, as = 'span' } = _a, rest = __rest(_a, ["children", "as"]);
|
|
2329
|
-
return (React__default["default"].createElement(Wrapper, Object.assign({ as: as }, rest), children));
|
|
2347
|
+
var { children, as = 'span', wrap } = _a, rest = __rest(_a, ["children", "as", "wrap"]);
|
|
2348
|
+
return (React__default["default"].createElement(Wrapper, Object.assign({ as: as, wrap: wrap }, rest), children));
|
|
2330
2349
|
};
|
|
2331
2350
|
|
|
2332
2351
|
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";
|
|
@@ -2855,4 +2874,5 @@ exports.useCssClasses = useCssClasses;
|
|
|
2855
2874
|
exports.useDebounce = useDebounce;
|
|
2856
2875
|
exports.useHover = useHover;
|
|
2857
2876
|
exports.useMobileDetect = useMobileDetect;
|
|
2877
|
+
exports.useOnDestroy = useOnDestroy;
|
|
2858
2878
|
exports.useWindowSize = useWindowSize;
|