@equinor/eds-core-react 0.32.3 → 0.33.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/eds-core-react.cjs +443 -372
- package/dist/esm/components/Accordion/AccordionHeader.js +13 -24
- package/dist/esm/components/Accordion/AccordionHeaderActions.js +3 -3
- package/dist/esm/components/Accordion/AccordionHeaderTitle.js +5 -5
- package/dist/esm/components/Accordion/AccordionPanel.js +3 -3
- package/dist/esm/components/Autocomplete/Autocomplete.js +35 -21
- package/dist/esm/components/Autocomplete/Option.js +14 -12
- package/dist/esm/components/Avatar/Avatar.js +6 -7
- package/dist/esm/components/Banner/Banner.js +3 -3
- package/dist/esm/components/Banner/BannerActions.js +3 -3
- package/dist/esm/components/Banner/BannerIcon.js +3 -3
- package/dist/esm/components/Breadcrumbs/Breadcrumb.js +1 -1
- package/dist/esm/components/Breadcrumbs/Breadcrumbs.js +4 -4
- package/dist/esm/components/Button/ButtonGroup/ButtonGroup.js +3 -3
- package/dist/esm/components/Card/Card.js +3 -3
- package/dist/esm/components/Card/CardActions.js +4 -4
- package/dist/esm/components/Card/CardMedia.js +3 -3
- package/dist/esm/components/Checkbox/Checkbox.js +3 -3
- package/dist/esm/components/Checkbox/Input.js +9 -9
- package/dist/esm/components/Chip/Chip.js +23 -23
- package/dist/esm/components/Chip/Icon.js +5 -5
- package/dist/esm/components/Dialog/Dialog.js +8 -10
- package/dist/esm/components/Dialog/DialogContent.js +3 -3
- package/dist/esm/components/Divider/Divider.js +9 -9
- package/dist/esm/components/Icon/Icon.js +21 -22
- package/dist/esm/components/Input/Input.js +20 -20
- package/dist/esm/components/InputWrapper/InputWrapper.js +2 -0
- package/dist/esm/components/Label/Label.js +3 -3
- package/dist/esm/components/Pagination/Pagination.js +4 -4
- package/dist/esm/components/Pagination/PaginationItem.js +4 -4
- package/dist/esm/components/Paper/Paper.js +2 -1
- package/dist/esm/components/Progress/Circular/CircularProgress.js +3 -3
- package/dist/esm/components/Progress/Star/StarProgress.js +5 -5
- package/dist/esm/components/Radio/Radio.js +12 -12
- package/dist/esm/components/Search/Search.js +4 -2
- package/dist/esm/components/SideBar/SideBarToggle.js +1 -0
- package/dist/esm/components/Slider/Slider.js +9 -9
- package/dist/esm/components/Snackbar/Snackbar.js +7 -7
- package/dist/esm/components/Switch/Switch.js +6 -6
- package/dist/esm/components/Switch/Switch.styles.js +1 -1
- package/dist/esm/components/Switch/SwitchDefault.js +6 -6
- package/dist/esm/components/Switch/SwitchSmall.js +3 -3
- package/dist/esm/components/Table/Caption.js +12 -8
- package/dist/esm/components/Table/HeaderCell/HeaderCell.js +9 -5
- package/dist/esm/components/Table/Row/Row.js +9 -13
- package/dist/esm/components/TableOfContents/TableOfContents.js +3 -4
- package/dist/esm/components/Tabs/Tab.js +7 -4
- package/dist/esm/components/Tabs/TabList.js +20 -19
- package/dist/esm/components/Tabs/TabPanels.js +7 -5
- package/dist/esm/components/TextField/TextField.js +2 -2
- package/dist/esm/components/Textarea/Textarea.js +1 -5
- package/dist/esm/components/TopBar/TopBar.js +3 -3
- package/dist/esm/components/Typography/Typography.js +11 -6
- package/dist/esm/node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/mergeWith.js +36 -0
- package/dist/esm/node_modules/.pnpm/ramda@0.29.0/node_modules/ramda/es/pickBy.js +36 -0
- package/dist/types/components/Autocomplete/Autocomplete.d.ts +2 -2
- package/dist/types/components/Autocomplete/Option.d.ts +4 -12
- package/dist/types/components/Chip/Icon.d.ts +8 -3
- package/dist/types/components/Icon/Icon.d.ts +1 -1
- package/dist/types/components/Icon/Icon.types.d.ts +1 -1
- package/dist/types/components/Pagination/PaginationItem.d.ts +1 -1
- package/dist/types/components/Paper/Paper.d.ts +2 -2
- package/dist/types/components/Progress/Circular/CircularProgress.d.ts +1 -1
- package/dist/types/components/Progress/Dots/DotProgress.d.ts +1 -1
- package/dist/types/components/Progress/Star/StarProgress.d.ts +1 -1
- package/dist/types/components/Switch/Switch.styles.d.ts +812 -5
- package/dist/types/components/Tabs/Tab.d.ts +4 -1
- package/dist/types/components/Tabs/TabPanels.d.ts +6 -2
- package/dist/types/components/Tabs/Tabs.context.d.ts +1 -1
- package/dist/types/components/Tabs/Tabs.d.ts +4 -4
- package/package.json +20 -20
|
@@ -11,11 +11,11 @@ import { useEds } from '../EdsProvider/eds.context.js';
|
|
|
11
11
|
|
|
12
12
|
var _excluded = ["disabled", "indeterminate", "style", "className"];
|
|
13
13
|
var StyledPath = styled.path.attrs(function (_ref) {
|
|
14
|
-
var icon = _ref
|
|
14
|
+
var $icon = _ref.$icon;
|
|
15
15
|
return {
|
|
16
16
|
fillRule: 'evenodd',
|
|
17
17
|
clipRule: 'evenodd',
|
|
18
|
-
d: icon.svgPathData
|
|
18
|
+
d: $icon.svgPathData
|
|
19
19
|
};
|
|
20
20
|
}).withConfig({
|
|
21
21
|
displayName: "Input__StyledPath",
|
|
@@ -32,8 +32,8 @@ var Input = styled.input.attrs(function (_ref2) {
|
|
|
32
32
|
componentId: "sc-rqj7qf-1"
|
|
33
33
|
})(["--scale:", ";appearance:none;width:100%;height:100%;margin:0;grid-area:input;transform:scale(var(--scale));cursor:", ";&:focus{outline:none;}&[data-focus-visible-added]:focus + svg{", "}&:focus-visible + svg{", "}&:not(:checked) ~ svg path[name='checked']{display:none;}&:not(:checked) ~ svg path[name='not-checked']{display:inline;}&:checked ~ svg path[name='not-checked']{display:none;}&:checked ~ svg path[name='checked']{display:inline;}"], function (_ref3) {
|
|
34
34
|
var theme = _ref3.theme,
|
|
35
|
-
iconSize = _ref3
|
|
36
|
-
return parseFloat(theme.clickbound.height) / iconSize;
|
|
35
|
+
$iconSize = _ref3.$iconSize;
|
|
36
|
+
return parseFloat(theme.clickbound.height) / $iconSize;
|
|
37
37
|
}, function (_ref4) {
|
|
38
38
|
var disabled = _ref4.disabled;
|
|
39
39
|
return disabled ? 'not-allowed' : 'pointer';
|
|
@@ -62,7 +62,7 @@ var Svg = styled.svg.attrs(function (_ref7) {
|
|
|
62
62
|
var InputWrapper = styled.span.withConfig({
|
|
63
63
|
displayName: "Input__InputWrapper",
|
|
64
64
|
componentId: "sc-rqj7qf-3"
|
|
65
|
-
})(["display:inline-grid;grid:[input] 1fr / [input] 1fr;position:relative;", " &::before{content:'';position:absolute;width:", ";aspect-ratio:1/1;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:100%;}@media (hover:hover) and (pointer:fine){> svg{z-index:1;}&:hover{&::before{background-color:", ";}}}"], function (_ref8) {
|
|
65
|
+
})(["display:inline-grid;grid:[input] 1fr / [input] 1fr;position:relative;isolation:isolate;", " &::before{content:'';position:absolute;width:", ";aspect-ratio:1/1;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:100%;}@media (hover:hover) and (pointer:fine){> svg{z-index:1;}&:hover{&::before{background-color:", ";}}}"], function (_ref8) {
|
|
66
66
|
var theme = _ref8.theme;
|
|
67
67
|
return spacingsTemplate(theme.spacings);
|
|
68
68
|
}, function (_ref9) {
|
|
@@ -99,7 +99,7 @@ var CheckboxInput = /*#__PURE__*/forwardRef(function CheckboxInput(_ref11, ref)
|
|
|
99
99
|
theme: token,
|
|
100
100
|
children: /*#__PURE__*/jsxs(InputWrapper, _objectSpread(_objectSpread({}, inputWrapperProps), {}, {
|
|
101
101
|
children: [/*#__PURE__*/jsx(Input, _objectSpread({
|
|
102
|
-
iconSize: iconSize
|
|
102
|
+
$iconSize: iconSize
|
|
103
103
|
}, inputProps)), indeterminate ? /*#__PURE__*/jsx(Svg, {
|
|
104
104
|
width: iconSize,
|
|
105
105
|
height: iconSize,
|
|
@@ -107,7 +107,7 @@ var CheckboxInput = /*#__PURE__*/forwardRef(function CheckboxInput(_ref11, ref)
|
|
|
107
107
|
fill: fill,
|
|
108
108
|
"aria-hidden": true,
|
|
109
109
|
children: /*#__PURE__*/jsx(StyledPath, {
|
|
110
|
-
icon: checkbox_indeterminate,
|
|
110
|
+
$icon: checkbox_indeterminate,
|
|
111
111
|
name: "indeterminate"
|
|
112
112
|
})
|
|
113
113
|
}) : /*#__PURE__*/jsxs(Svg, {
|
|
@@ -117,10 +117,10 @@ var CheckboxInput = /*#__PURE__*/forwardRef(function CheckboxInput(_ref11, ref)
|
|
|
117
117
|
fill: fill,
|
|
118
118
|
"aria-hidden": true,
|
|
119
119
|
children: [/*#__PURE__*/jsx(StyledPath, {
|
|
120
|
-
icon: checkbox$1,
|
|
120
|
+
$icon: checkbox$1,
|
|
121
121
|
name: "checked"
|
|
122
122
|
}), /*#__PURE__*/jsx(StyledPath, {
|
|
123
|
-
icon: checkbox_outline,
|
|
123
|
+
$icon: checkbox_outline,
|
|
124
124
|
name: "not-checked"
|
|
125
125
|
})]
|
|
126
126
|
})]
|
|
@@ -17,21 +17,21 @@ var background = enabled.background,
|
|
|
17
17
|
border = enabled.border,
|
|
18
18
|
states = enabled.states;
|
|
19
19
|
var StyledChips = styled.div.attrs(function (_ref) {
|
|
20
|
-
var clickable = _ref
|
|
21
|
-
deletable = _ref
|
|
20
|
+
var $clickable = _ref.$clickable,
|
|
21
|
+
$deletable = _ref.$deletable;
|
|
22
22
|
return {
|
|
23
|
-
tabIndex: clickable || deletable ? 0 : null,
|
|
24
|
-
role: clickable ? 'button' : null
|
|
23
|
+
tabIndex: $clickable || $deletable ? 0 : null,
|
|
24
|
+
role: $clickable ? 'button' : null
|
|
25
25
|
};
|
|
26
26
|
}).withConfig({
|
|
27
27
|
displayName: "Chip__StyledChips",
|
|
28
28
|
componentId: "sc-wzsllq-0"
|
|
29
|
-
})(["background:", ";height:", ";width:fit-content;display:grid;grid-gap:8px;grid-auto-flow:column;grid-auto-columns:max-content;align-items:center;svg{fill:", ";}
|
|
30
|
-
var clickable = _ref2
|
|
31
|
-
return clickable && css(["@media (hover:hover) and (pointer:fine){&:hover{cursor:pointer;}}"]);
|
|
29
|
+
})(["background:", ";height:", ";width:fit-content;display:grid;grid-gap:8px;grid-auto-flow:column;grid-auto-columns:max-content;align-items:center;svg{fill:", ";}&:focus{outline:none;}&[data-focus-visible-added]:focus{", "}&:focus-visible{", "}", " ", " ", " ", " ", " ", " ", " ", ""], background, height, typography.color, outlineTemplate(states.focus.outline), outlineTemplate(states.focus.outline), bordersTemplate(border), spacingsTemplate(spacings), typographyTemplate(typography), function (_ref2) {
|
|
30
|
+
var $clickable = _ref2.$clickable;
|
|
31
|
+
return $clickable && css(["@media (hover:hover) and (pointer:fine){&:hover{cursor:pointer;color:", ";svg{fill:", ";}}}"], states.hover.typography.color, states.hover.typography.color);
|
|
32
32
|
}, function (_ref3) {
|
|
33
|
-
var variant = _ref3
|
|
34
|
-
switch (variant) {
|
|
33
|
+
var $variant = _ref3.$variant;
|
|
34
|
+
switch ($variant) {
|
|
35
35
|
case 'active':
|
|
36
36
|
return css(["background:", ";"], states.active.background);
|
|
37
37
|
case 'error':
|
|
@@ -40,14 +40,14 @@ var StyledChips = styled.div.attrs(function (_ref) {
|
|
|
40
40
|
return '';
|
|
41
41
|
}
|
|
42
42
|
}, function (_ref4) {
|
|
43
|
-
var disabled = _ref4
|
|
44
|
-
return disabled && css(["cursor:not-allowed;background:", ";color:", ";svg{fill:", ";}@media (hover:hover) and (pointer:fine){&:hover{color:", ";cursor:not-allowed;svg{fill:", ";}}}"], background, states.disabled.typography.color, states.disabled.typography.color, states.disabled.typography.color, states.disabled.typography.color);
|
|
43
|
+
var $disabled = _ref4.$disabled;
|
|
44
|
+
return $disabled && css(["cursor:not-allowed;background:", ";color:", ";svg{fill:", ";}@media (hover:hover) and (pointer:fine){&:hover{color:", ";cursor:not-allowed;svg{fill:", ";}}}"], background, states.disabled.typography.color, states.disabled.typography.color, states.disabled.typography.color, states.disabled.typography.color);
|
|
45
45
|
}, function (_ref5) {
|
|
46
|
-
var deletable = _ref5
|
|
47
|
-
return deletable && css(["padding-right:4px;"]);
|
|
46
|
+
var $deletable = _ref5.$deletable;
|
|
47
|
+
return $deletable && css(["padding-right:4px;"]);
|
|
48
48
|
}, function (_ref6) {
|
|
49
|
-
var onlyChild = _ref6
|
|
50
|
-
return onlyChild ? css(["padding-left:8px;"]) : '';
|
|
49
|
+
var $onlyChild = _ref6.$onlyChild;
|
|
50
|
+
return $onlyChild ? css(["padding-left:8px;"]) : '';
|
|
51
51
|
});
|
|
52
52
|
var Chip = /*#__PURE__*/forwardRef(function Chip(_ref7, ref) {
|
|
53
53
|
var children = _ref7.children,
|
|
@@ -65,11 +65,11 @@ var Chip = /*#__PURE__*/forwardRef(function Chip(_ref7, ref) {
|
|
|
65
65
|
var onlyChild = typeof children === 'string';
|
|
66
66
|
var chipProps = _objectSpread(_objectSpread({}, other), {}, {
|
|
67
67
|
ref: ref,
|
|
68
|
-
disabled: disabled,
|
|
69
|
-
deletable: deletable,
|
|
70
|
-
clickable: clickable,
|
|
71
|
-
onlyChild: onlyChild,
|
|
72
|
-
variant: variant
|
|
68
|
+
$disabled: disabled,
|
|
69
|
+
$deletable: deletable,
|
|
70
|
+
$clickable: clickable,
|
|
71
|
+
$onlyChild: onlyChild,
|
|
72
|
+
$variant: variant
|
|
73
73
|
});
|
|
74
74
|
var handleKeyPress = function handleKeyPress(event) {
|
|
75
75
|
var _ref8 = event,
|
|
@@ -104,12 +104,12 @@ var Chip = /*#__PURE__*/forwardRef(function Chip(_ref7, ref) {
|
|
|
104
104
|
onClick: function onClick(event) {
|
|
105
105
|
return clickable && handleClick(event);
|
|
106
106
|
},
|
|
107
|
-
|
|
107
|
+
onKeyDown: handleKeyPress,
|
|
108
108
|
children: [resizedChildren, onDelete && /*#__PURE__*/jsx(Icon, {
|
|
109
109
|
name: "close",
|
|
110
110
|
title: "close",
|
|
111
|
-
disabled: disabled,
|
|
112
|
-
variant: variant,
|
|
111
|
+
$disabled: disabled,
|
|
112
|
+
$variant: variant,
|
|
113
113
|
onClick: onDeleteClick,
|
|
114
114
|
size: 16
|
|
115
115
|
})]
|
|
@@ -12,17 +12,17 @@ var enabled = enabled$1,
|
|
|
12
12
|
var Icon = styled(Icon$1).withConfig({
|
|
13
13
|
displayName: "Icon",
|
|
14
14
|
componentId: "sc-50ffvg-0"
|
|
15
|
-
})(["cursor:pointer;padding:1px;", "
|
|
16
|
-
var variant = _ref
|
|
17
|
-
switch (variant) {
|
|
15
|
+
})(["cursor:pointer;padding:1px;", " &:hover{", ";}", ""], bordersTemplate(enabled.entities.icon.border), function (_ref) {
|
|
16
|
+
var $variant = _ref.$variant;
|
|
17
|
+
switch ($variant) {
|
|
18
18
|
case 'error':
|
|
19
19
|
return css(["background:", ";svg{fill:", ";}"], error.entities.icon.background, error.entities.icon.typography.color);
|
|
20
20
|
default:
|
|
21
21
|
return css(["background:", ";svg{fill:", ";}"], enabled.entities.icon.states.hover.background, enabled.states.hover.typography.color);
|
|
22
22
|
}
|
|
23
23
|
}, function (_ref2) {
|
|
24
|
-
var disabled = _ref2
|
|
25
|
-
return disabled && css(["cursor:not-allowed;&:hover{background:transparent;}"]);
|
|
24
|
+
var $disabled = _ref2.$disabled;
|
|
25
|
+
return $disabled && css(["cursor:not-allowed;&:hover{background:transparent;}"]);
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
export { Icon };
|
|
@@ -11,7 +11,8 @@ import { useEds } from '../EdsProvider/eds.context.js';
|
|
|
11
11
|
var _excluded = ["children", "open", "onClose", "isDismissable", "dialogRef"];
|
|
12
12
|
var StyledDialog = styled(Paper).attrs({
|
|
13
13
|
'aria-labelledby': 'eds-dialog-title',
|
|
14
|
-
'aria-describedby': 'eds-dialog-customcontent'
|
|
14
|
+
'aria-describedby': 'eds-dialog-customcontent',
|
|
15
|
+
elevation: 'above_scrim'
|
|
15
16
|
}).withConfig({
|
|
16
17
|
displayName: "Dialog__StyledDialog",
|
|
17
18
|
componentId: "sc-1mewo3f-0"
|
|
@@ -44,13 +45,12 @@ var Dialog = /*#__PURE__*/forwardRef(function Dialog(_ref3, ref) {
|
|
|
44
45
|
return mergeRefs(localRef, dialogRef);
|
|
45
46
|
}, [localRef, dialogRef]);
|
|
46
47
|
useEffect(function () {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
localRef === null || localRef === void 0 ? void 0 : (_localRef$current2 = localRef.current) === null || _localRef$current2 === void 0 ? void 0 : _localRef$current2.showModal();
|
|
48
|
+
if (open) {
|
|
49
|
+
var _localRef$current;
|
|
50
|
+
localRef === null || localRef === void 0 ? void 0 : (_localRef$current = localRef.current) === null || _localRef$current === void 0 ? void 0 : _localRef$current.showModal();
|
|
51
51
|
} else {
|
|
52
|
-
var _localRef$
|
|
53
|
-
localRef === null || localRef === void 0 ? void 0 : (_localRef$
|
|
52
|
+
var _localRef$current2;
|
|
53
|
+
localRef === null || localRef === void 0 ? void 0 : (_localRef$current2 = localRef.current) === null || _localRef$current2 === void 0 ? void 0 : _localRef$current2.close();
|
|
54
54
|
}
|
|
55
55
|
}, [open]);
|
|
56
56
|
|
|
@@ -73,9 +73,7 @@ var Dialog = /*#__PURE__*/forwardRef(function Dialog(_ref3, ref) {
|
|
|
73
73
|
children: /*#__PURE__*/jsx(StyledNativeDialog, {
|
|
74
74
|
ref: combinedDialogRef,
|
|
75
75
|
onMouseDown: handleDismiss,
|
|
76
|
-
children: open && /*#__PURE__*/jsx(StyledDialog, _objectSpread(_objectSpread({
|
|
77
|
-
elevation: "above_scrim"
|
|
78
|
-
}, props), {}, {
|
|
76
|
+
children: open && /*#__PURE__*/jsx(StyledDialog, _objectSpread(_objectSpread({}, props), {}, {
|
|
79
77
|
ref: ref,
|
|
80
78
|
children: children
|
|
81
79
|
}))
|
|
@@ -12,8 +12,8 @@ var StyledDialogContent = styled.div.withConfig({
|
|
|
12
12
|
componentId: "sc-1tze18k-0"
|
|
13
13
|
})(function (_ref) {
|
|
14
14
|
var theme = _ref.theme,
|
|
15
|
-
scrollable = _ref
|
|
16
|
-
return css(["--content-spacing-top:", ";", " min-height:", ";align-self:stretch;justify-self:stretch;padding:0 ", " 0 ", ";&:first-child{padding-top:var(--content-spacing-top);}&:last-child{padding-bottom:", ";}", ""], theme.entities.children.spacings.top, typographyTemplate(theme.entities.content.typography), theme.entities.content.minHeight, theme.entities.children.spacings.right, theme.entities.children.spacings.left, theme.entities.children.spacings.bottom, scrollable && css(["&:not(:first-child){margin-top:calc(var(--content-spacing-top) * -1);}padding-top:var(--content-spacing-top);margin-bottom:calc(var(--content-spacing-top) * -1);padding-bottom:var(--content-spacing-top);min-height:initial;height:", ";overflow-y:auto;"], theme.entities.content.height));
|
|
15
|
+
$scrollable = _ref.$scrollable;
|
|
16
|
+
return css(["--content-spacing-top:", ";", " min-height:", ";align-self:stretch;justify-self:stretch;padding:0 ", " 0 ", ";&:first-child{padding-top:var(--content-spacing-top);}&:last-child{padding-bottom:", ";}", ""], theme.entities.children.spacings.top, typographyTemplate(theme.entities.content.typography), theme.entities.content.minHeight, theme.entities.children.spacings.right, theme.entities.children.spacings.left, theme.entities.children.spacings.bottom, $scrollable && css(["&:not(:first-child){margin-top:calc(var(--content-spacing-top) * -1);}padding-top:var(--content-spacing-top);margin-bottom:calc(var(--content-spacing-top) * -1);padding-bottom:var(--content-spacing-top);min-height:initial;height:", ";overflow-y:auto;"], theme.entities.content.height));
|
|
17
17
|
});
|
|
18
18
|
var StyledDivider = styled(Divider).withConfig({
|
|
19
19
|
displayName: "DialogContent__StyledDivider",
|
|
@@ -25,7 +25,7 @@ var DialogContent = /*#__PURE__*/forwardRef(function DialogContent(_ref2, ref) {
|
|
|
25
25
|
scrollable = _ref2$scrollable === void 0 ? false : _ref2$scrollable,
|
|
26
26
|
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
27
27
|
var props = _objectSpread({
|
|
28
|
-
scrollable: scrollable,
|
|
28
|
+
$scrollable: scrollable,
|
|
29
29
|
ref: ref
|
|
30
30
|
}, rest);
|
|
31
31
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
@@ -12,11 +12,11 @@ var StyledDivider = styled.hr.withConfig({
|
|
|
12
12
|
displayName: "Divider__StyledDivider",
|
|
13
13
|
componentId: "sc-1d8osde-0"
|
|
14
14
|
})(function (_ref) {
|
|
15
|
-
var backgroundColor = _ref
|
|
16
|
-
marginTop = _ref
|
|
17
|
-
marginBottom = _ref
|
|
18
|
-
dividerHeight = _ref
|
|
19
|
-
return css(["border:none;background-color:", ";margin-top:", ";margin-bottom:calc(", " - ", "px);height:", "px;"], backgroundColor, marginTop, marginBottom, dividerHeight, dividerHeight);
|
|
15
|
+
var $backgroundColor = _ref.$backgroundColor,
|
|
16
|
+
$marginTop = _ref.$marginTop,
|
|
17
|
+
$marginBottom = _ref.$marginBottom,
|
|
18
|
+
$dividerHeight = _ref.$dividerHeight;
|
|
19
|
+
return css(["border:none;background-color:", ";margin-top:", ";margin-bottom:calc(", " - ", "px);height:", "px;"], $backgroundColor, $marginTop, $marginBottom, $dividerHeight, $dividerHeight);
|
|
20
20
|
});
|
|
21
21
|
var Divider = /*#__PURE__*/forwardRef(function Divider(_ref2, ref) {
|
|
22
22
|
var _ref2$color = _ref2.color,
|
|
@@ -28,10 +28,10 @@ var Divider = /*#__PURE__*/forwardRef(function Divider(_ref2, ref) {
|
|
|
28
28
|
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
29
29
|
var colorValue = color === 'medium' ? 'mediumColor' : color;
|
|
30
30
|
var props = _objectSpread({
|
|
31
|
-
backgroundColor: divider[colorValue].background,
|
|
32
|
-
marginTop: Divider_tokens[variant].spacings.top,
|
|
33
|
-
marginBottom: Divider_tokens[variant].spacings.bottom,
|
|
34
|
-
dividerHeight: parseInt(size)
|
|
31
|
+
$backgroundColor: divider[colorValue].background,
|
|
32
|
+
$marginTop: Divider_tokens[variant].spacings.top,
|
|
33
|
+
$marginBottom: Divider_tokens[variant].spacings.bottom,
|
|
34
|
+
$dividerHeight: parseInt(size)
|
|
35
35
|
}, rest);
|
|
36
36
|
return /*#__PURE__*/jsx(StyledDivider, _objectSpread(_objectSpread({}, props), {}, {
|
|
37
37
|
ref: ref
|
|
@@ -6,33 +6,32 @@ import { get } from './library.js';
|
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
8
|
var _excluded = ["size", "color", "name", "rotation", "title", "data"];
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var StyledSvg = styled.svg.attrs(function (_ref2) {
|
|
14
|
-
var height = _ref2.height,
|
|
15
|
-
width = _ref2.width,
|
|
16
|
-
fill = _ref2.fill;
|
|
9
|
+
var StyledSvg = styled.svg.attrs(function (_ref) {
|
|
10
|
+
var $height = _ref.$height,
|
|
11
|
+
$width = _ref.$width,
|
|
12
|
+
fill = _ref.fill;
|
|
17
13
|
return {
|
|
18
14
|
name: null,
|
|
19
15
|
xmlns: 'http://www.w3.org/2000/svg',
|
|
20
|
-
height: "".concat(height, "px"),
|
|
21
|
-
width: "".concat(width, "px"),
|
|
16
|
+
height: "".concat($height, "px"),
|
|
17
|
+
width: "".concat($width, "px"),
|
|
22
18
|
fill: fill
|
|
23
19
|
};
|
|
24
20
|
}).withConfig({
|
|
25
21
|
displayName: "Icon__StyledSvg",
|
|
26
22
|
componentId: "sc-6evbi1-0"
|
|
27
|
-
})(["", ""],
|
|
23
|
+
})(["transform:", ";"], function (_ref2) {
|
|
24
|
+
var $rotation = _ref2.$rotation;
|
|
25
|
+
return $rotation ? "rotate(".concat($rotation, "deg)") : 'none';
|
|
26
|
+
});
|
|
28
27
|
var StyledPath = styled.path.attrs(function (_ref3) {
|
|
29
|
-
var height = _ref3
|
|
30
|
-
size = _ref3
|
|
28
|
+
var $height = _ref3.$height,
|
|
29
|
+
$size = _ref3.$size;
|
|
31
30
|
return {
|
|
32
31
|
size: null,
|
|
33
32
|
fillRule: 'evenodd',
|
|
34
33
|
clipRule: 'evenodd',
|
|
35
|
-
transform: size / height !== 1 ? "scale(".concat(size / height, ")") : null
|
|
34
|
+
transform: $size / $height !== 1 ? "scale(".concat($size / $height, ")") : null
|
|
36
35
|
};
|
|
37
36
|
}).withConfig({
|
|
38
37
|
displayName: "Icon__StyledPath",
|
|
@@ -75,21 +74,21 @@ var Icon = /*#__PURE__*/forwardRef(function Icon(_ref5, ref) {
|
|
|
75
74
|
if (typeof icon === 'undefined') {
|
|
76
75
|
throw Error("Icon \"".concat(name, "\" not found. Have you added it using Icon.add() or using data props?"));
|
|
77
76
|
}
|
|
78
|
-
var height = size ? size : parseInt(icon.width);
|
|
79
|
-
var width = size ? size : parseInt(icon.height);
|
|
77
|
+
var $height = size ? size : parseInt(icon.width);
|
|
78
|
+
var $width = size ? size : parseInt(icon.height);
|
|
80
79
|
var svgProps = {
|
|
81
|
-
height: height,
|
|
82
|
-
width: width,
|
|
80
|
+
$height: $height,
|
|
81
|
+
$width: $width,
|
|
83
82
|
fill: color,
|
|
84
|
-
viewBox: "0 0 ".concat(width, " ").concat(height),
|
|
85
|
-
rotation: rotation,
|
|
83
|
+
viewBox: "0 0 ".concat($width, " ").concat($height),
|
|
84
|
+
$rotation: rotation,
|
|
86
85
|
name: name,
|
|
87
86
|
'aria-hidden': true
|
|
88
87
|
};
|
|
89
88
|
var pathProps = {
|
|
90
89
|
d: icon.svgPathData,
|
|
91
|
-
height: icon.height ? icon.height : size,
|
|
92
|
-
size: size || icon.height
|
|
90
|
+
$height: icon.height ? parseInt(icon.height) : size,
|
|
91
|
+
$size: size || parseInt(icon.height)
|
|
93
92
|
};
|
|
94
93
|
|
|
95
94
|
// Accessibility
|
|
@@ -14,12 +14,12 @@ var Container = styled.div.withConfig({
|
|
|
14
14
|
componentId: "sc-1ykv024-0"
|
|
15
15
|
})(function (_ref) {
|
|
16
16
|
var _entities$adornment, _entities$adornment$s;
|
|
17
|
-
var token = _ref
|
|
17
|
+
var $token = _ref.$token,
|
|
18
18
|
disabled = _ref.disabled,
|
|
19
19
|
readOnly = _ref.readOnly;
|
|
20
|
-
var states = token.states,
|
|
21
|
-
entities = token.entities;
|
|
22
|
-
return css(["--eds-input-adornment-color:", ";--eds-input-color:", ";position:relative;height:", ";width:", ";display:flex;flex-direction:row;border:none;box-sizing:border-box;box-shadow:", ";background:var(--eds-input-background,", ");", " &:focus-within{--eds-input-adornment-color:", ";box-shadow:none;", "}", " ", " & > input{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}"], entities.adornment.typography.color, token.typography.color, token.height, token.width, token.boxShadow, token.background, outlineTemplate(token.outline), (_entities$adornment = entities.adornment) === null || _entities$adornment === void 0 ? void 0 : (_entities$adornment$s = _entities$adornment.states.focus) === null || _entities$adornment$s === void 0 ? void 0 : _entities$adornment$s.outline.color, outlineTemplate(states.focus.outline), disabled && css(["--eds-input-adornment-color:", ";--eds-input-color:", ";cursor:not-allowed;box-shadow:none;"], states.disabled.typography.color, states.disabled.typography.color), readOnly && css({
|
|
20
|
+
var states = $token.states,
|
|
21
|
+
entities = $token.entities;
|
|
22
|
+
return css(["--eds-input-adornment-color:", ";--eds-input-color:", ";position:relative;height:", ";width:", ";display:flex;flex-direction:row;border:none;box-sizing:border-box;box-shadow:", ";background:var(--eds-input-background,", ");", " &:focus-within{--eds-input-adornment-color:", ";box-shadow:none;", "}", " ", " & > input{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}"], entities.adornment.typography.color, $token.typography.color, $token.height, $token.width, $token.boxShadow, $token.background, outlineTemplate($token.outline), (_entities$adornment = entities.adornment) === null || _entities$adornment === void 0 ? void 0 : (_entities$adornment$s = _entities$adornment.states.focus) === null || _entities$adornment$s === void 0 ? void 0 : _entities$adornment$s.outline.color, outlineTemplate(states.focus.outline), disabled && css(["--eds-input-adornment-color:", ";--eds-input-color:", ";cursor:not-allowed;box-shadow:none;"], states.disabled.typography.color, states.disabled.typography.color), readOnly && css({
|
|
23
23
|
background: states.readOnly.background,
|
|
24
24
|
boxShadow: states.readOnly.boxShadow
|
|
25
25
|
}));
|
|
@@ -28,31 +28,31 @@ var StyledInput = styled.input.withConfig({
|
|
|
28
28
|
displayName: "Input__StyledInput",
|
|
29
29
|
componentId: "sc-1ykv024-1"
|
|
30
30
|
})(function (_ref2) {
|
|
31
|
-
var token = _ref2
|
|
32
|
-
paddingLeft = _ref2
|
|
33
|
-
paddingRight = _ref2
|
|
34
|
-
return css(["width:100%;border:none;background:transparent;", " ", " outline:none;padding-left:", ";padding-right:", ";&::placeholder{color:", ";}&:disabled{color:var(--eds-input-color);cursor:not-allowed;}"], spacingsTemplate(token.spacings), typographyMixin(token.typography), paddingLeft, paddingRight, token.entities.placeholder.typography.color);
|
|
31
|
+
var $token = _ref2.$token,
|
|
32
|
+
$paddingLeft = _ref2.$paddingLeft,
|
|
33
|
+
$paddingRight = _ref2.$paddingRight;
|
|
34
|
+
return css(["width:100%;border:none;background:transparent;", " ", " outline:none;padding-left:", ";padding-right:", ";&::placeholder{color:", ";}&:disabled{color:var(--eds-input-color);cursor:not-allowed;}"], spacingsTemplate($token.spacings), typographyMixin($token.typography), $paddingLeft, $paddingRight, $token.entities.placeholder.typography.color);
|
|
35
35
|
});
|
|
36
36
|
var Adornments = styled.div.withConfig({
|
|
37
37
|
displayName: "Input__Adornments",
|
|
38
38
|
componentId: "sc-1ykv024-2"
|
|
39
39
|
})(function (_ref3) {
|
|
40
|
-
var token = _ref3
|
|
41
|
-
return css(["position:absolute;top:", ";bottom:", ";display:flex;align-items:center;", " color:var(--eds-input-adornment-color);"], token.spacings.top, token.spacings.bottom, typographyMixin(token.entities.adornment.typography));
|
|
40
|
+
var $token = _ref3.$token;
|
|
41
|
+
return css(["position:absolute;top:", ";bottom:", ";display:flex;align-items:center;", " color:var(--eds-input-adornment-color);"], $token.spacings.top, $token.spacings.bottom, typographyMixin($token.entities.adornment.typography));
|
|
42
42
|
});
|
|
43
43
|
var LeftAdornments = styled(Adornments).withConfig({
|
|
44
44
|
displayName: "Input__LeftAdornments",
|
|
45
45
|
componentId: "sc-1ykv024-3"
|
|
46
46
|
})(function (_ref4) {
|
|
47
|
-
var token = _ref4
|
|
48
|
-
return css(["left:0;padding-left:", ";"], token.entities.adornment.spacings.left);
|
|
47
|
+
var $token = _ref4.$token;
|
|
48
|
+
return css(["left:0;padding-left:", ";"], $token.entities.adornment.spacings.left);
|
|
49
49
|
});
|
|
50
50
|
var RightAdornments = styled(Adornments).withConfig({
|
|
51
51
|
displayName: "Input__RightAdornments",
|
|
52
52
|
componentId: "sc-1ykv024-4"
|
|
53
53
|
})(function (_ref5) {
|
|
54
|
-
var token = _ref5
|
|
55
|
-
return css(["right:0;padding-right:", ";"], token.entities.adornment.spacings.right);
|
|
54
|
+
var $token = _ref5.$token;
|
|
55
|
+
return css(["right:0;padding-right:", ";"], $token.entities.adornment.spacings.right);
|
|
56
56
|
});
|
|
57
57
|
var Input = /*#__PURE__*/forwardRef(function Input(_ref6, ref) {
|
|
58
58
|
var variant = _ref6.variant,
|
|
@@ -99,7 +99,7 @@ var Input = /*#__PURE__*/forwardRef(function Input(_ref6, ref) {
|
|
|
99
99
|
type: type,
|
|
100
100
|
disabled: disabled,
|
|
101
101
|
readOnly: readOnly,
|
|
102
|
-
token: token,
|
|
102
|
+
$token: token,
|
|
103
103
|
style: {
|
|
104
104
|
resize: 'none'
|
|
105
105
|
}
|
|
@@ -109,15 +109,15 @@ var Input = /*#__PURE__*/forwardRef(function Input(_ref6, ref) {
|
|
|
109
109
|
readOnly: readOnly,
|
|
110
110
|
className: className,
|
|
111
111
|
style: style,
|
|
112
|
-
token: token
|
|
112
|
+
$token: token
|
|
113
113
|
};
|
|
114
114
|
var _leftAdornmentProps = _objectSpread(_objectSpread({}, leftAdornmentsProps), {}, {
|
|
115
115
|
ref: setLeftAdornmentsRef,
|
|
116
|
-
token: token
|
|
116
|
+
$token: token
|
|
117
117
|
});
|
|
118
118
|
var _rightAdornmentProps = _objectSpread(_objectSpread({}, rightAdornmentsProps), {}, {
|
|
119
119
|
ref: setRightAdornmentsRef,
|
|
120
|
-
token: token
|
|
120
|
+
$token: token
|
|
121
121
|
});
|
|
122
122
|
return (
|
|
123
123
|
/*#__PURE__*/
|
|
@@ -126,8 +126,8 @@ var Input = /*#__PURE__*/forwardRef(function Input(_ref6, ref) {
|
|
|
126
126
|
children: [leftAdornments ? /*#__PURE__*/jsx(LeftAdornments, _objectSpread(_objectSpread({}, _leftAdornmentProps), {}, {
|
|
127
127
|
children: leftAdornments
|
|
128
128
|
})) : null, /*#__PURE__*/jsx(StyledInput, _objectSpread({
|
|
129
|
-
paddingLeft: token.spacings.left,
|
|
130
|
-
paddingRight: token.spacings.right
|
|
129
|
+
$paddingLeft: token.spacings.left,
|
|
130
|
+
$paddingRight: token.spacings.right
|
|
131
131
|
}, inputProps)), rightAdornments ? /*#__PURE__*/jsx(RightAdornments, _objectSpread(_objectSpread({}, _rightAdornmentProps), {}, {
|
|
132
132
|
children: rightAdornments
|
|
133
133
|
})) : null]
|
|
@@ -22,6 +22,8 @@ var Label = styled(Label$1).withConfig({
|
|
|
22
22
|
displayName: "InputWrapper__Label",
|
|
23
23
|
componentId: "sc-v6o9z1-2"
|
|
24
24
|
})(["margin-left:8px;margin-right:8px;"]);
|
|
25
|
+
/* @TODO fix no-unused-prop-types disabled & readOnly */
|
|
26
|
+
|
|
25
27
|
/** InputWrapper is a internal skeleton component for structuring input elements */
|
|
26
28
|
var InputWrapper = /*#__PURE__*/forwardRef(function InputWrapper(_ref, ref) {
|
|
27
29
|
var children = _ref.children,
|
|
@@ -11,8 +11,8 @@ var LabelBase = styled.label.withConfig({
|
|
|
11
11
|
displayName: "Label__LabelBase",
|
|
12
12
|
componentId: "sc-1gi2bcn-0"
|
|
13
13
|
})(["display:flex;justify-content:space-between;position:relative;", " margin-left:", ";margin-right:", ";color:", ";"], typographyTemplate(label.typography), label.spacings.left, label.spacings.right, function (_ref) {
|
|
14
|
-
var disabledText = _ref
|
|
15
|
-
return disabledText ? label.states.disabled.typography.color : label.typography.color;
|
|
14
|
+
var $disabledText = _ref.$disabledText;
|
|
15
|
+
return $disabledText ? label.states.disabled.typography.color : label.typography.color;
|
|
16
16
|
});
|
|
17
17
|
var Text = styled.span.withConfig({
|
|
18
18
|
displayName: "Label__Text",
|
|
@@ -30,7 +30,7 @@ var Label = /*#__PURE__*/forwardRef(function Label(props, ref) {
|
|
|
30
30
|
/* @TODO: Other props spread has to be at the end for downshift to create the for attribute */
|
|
31
31
|
jsxs(LabelBase, _objectSpread(_objectSpread({
|
|
32
32
|
ref: ref,
|
|
33
|
-
disabledText: disabled
|
|
33
|
+
$disabledText: disabled
|
|
34
34
|
}, other), {}, {
|
|
35
35
|
children: [/*#__PURE__*/jsx(Text, {
|
|
36
36
|
children: label
|
|
@@ -24,8 +24,8 @@ var Navigation = styled.nav.withConfig({
|
|
|
24
24
|
displayName: "Pagination__Navigation",
|
|
25
25
|
componentId: "sc-13cpp3o-0"
|
|
26
26
|
})(["display:flex;justify-content:space-between;align-items:center;flex-wrap:nowrap;margin-left:", ";"], function (_ref) {
|
|
27
|
-
var withItemIndicator = _ref
|
|
28
|
-
return withItemIndicator ? pagination.spacings.left : 0;
|
|
27
|
+
var $withItemIndicator = _ref.$withItemIndicator;
|
|
28
|
+
return $withItemIndicator ? pagination.spacings.left : 0;
|
|
29
29
|
});
|
|
30
30
|
var OrderedList = styled.ol.withConfig({
|
|
31
31
|
displayName: "Pagination__OrderedList",
|
|
@@ -89,7 +89,7 @@ var Pagination = /*#__PURE__*/forwardRef(function Pagination(_ref2, ref) {
|
|
|
89
89
|
}, [itemsPerPage]);
|
|
90
90
|
var props = _objectSpread({
|
|
91
91
|
ref: ref,
|
|
92
|
-
withItemIndicator: withItemIndicator
|
|
92
|
+
$withItemIndicator: withItemIndicator
|
|
93
93
|
}, rest);
|
|
94
94
|
var pagination = /*#__PURE__*/jsx(Navigation, _objectSpread(_objectSpread({
|
|
95
95
|
"aria-label": "pagination"
|
|
@@ -118,7 +118,7 @@ var Pagination = /*#__PURE__*/forwardRef(function Pagination(_ref2, ref) {
|
|
|
118
118
|
children: /*#__PURE__*/jsx(PaginationItem, {
|
|
119
119
|
"aria-label": getAriaLabel(page, activePage),
|
|
120
120
|
"aria-current": activePage,
|
|
121
|
-
page: page,
|
|
121
|
+
$page: page,
|
|
122
122
|
selected: page === activePage,
|
|
123
123
|
onClick: function onClick(event) {
|
|
124
124
|
onPageChange(event, page);
|
|
@@ -5,15 +5,15 @@ import { Button } from '../Button/index.js';
|
|
|
5
5
|
import { pagination } from './Pagination.tokens.js';
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
|
-
var _excluded = ["page", "selected", "onClick"];
|
|
8
|
+
var _excluded = ["$page", "selected", "onClick"];
|
|
9
9
|
var PaginationItem = /*#__PURE__*/forwardRef(function PaginationItem(_ref, ref) {
|
|
10
|
-
var page = _ref
|
|
10
|
+
var $page = _ref.$page,
|
|
11
11
|
selected = _ref.selected,
|
|
12
12
|
onClick = _ref.onClick,
|
|
13
13
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
14
14
|
var props = _objectSpread({
|
|
15
15
|
ref: ref,
|
|
16
|
-
page: page,
|
|
16
|
+
$page: $page,
|
|
17
17
|
selected: selected
|
|
18
18
|
}, rest);
|
|
19
19
|
var background = selected ? pagination.entities.item.states.active.background : null;
|
|
@@ -24,7 +24,7 @@ var PaginationItem = /*#__PURE__*/forwardRef(function PaginationItem(_ref, ref)
|
|
|
24
24
|
variant: "ghost_icon",
|
|
25
25
|
onClick: onClick ? onClick : undefined
|
|
26
26
|
}, props), {}, {
|
|
27
|
-
children: page
|
|
27
|
+
children: $page
|
|
28
28
|
}));
|
|
29
29
|
});
|
|
30
30
|
|
|
@@ -15,7 +15,8 @@ var StyledPaper = styled.div.withConfig({
|
|
|
15
15
|
});
|
|
16
16
|
var Paper = /*#__PURE__*/forwardRef(function Paper(_ref2, ref) {
|
|
17
17
|
var _elevationToken$eleva;
|
|
18
|
-
var elevation
|
|
18
|
+
var _ref2$elevation = _ref2.elevation,
|
|
19
|
+
elevation$1 = _ref2$elevation === void 0 ? 'none' : _ref2$elevation,
|
|
19
20
|
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
20
21
|
var props = _objectSpread(_objectSpread({}, rest), {}, {
|
|
21
22
|
$elevation: (_elevationToken$eleva = elevation[elevation$1]) !== null && _elevationToken$eleva !== void 0 ? _elevationToken$eleva : 'none'
|
|
@@ -12,8 +12,8 @@ var Svg = styled.svg.withConfig({
|
|
|
12
12
|
displayName: "CircularProgress__Svg",
|
|
13
13
|
componentId: "sc-hib054-0"
|
|
14
14
|
})(["display:inline-block;", ";"], function (_ref) {
|
|
15
|
-
var variant = _ref
|
|
16
|
-
return variant === 'indeterminate' ? css(["animation:", " 1.4s linear infinite;"], indeterminate) : css(["transform:rotate(-90deg);"]);
|
|
15
|
+
var $variant = _ref.$variant;
|
|
16
|
+
return $variant === 'indeterminate' ? css(["animation:", " 1.4s linear infinite;"], indeterminate) : css(["transform:rotate(-90deg);"]);
|
|
17
17
|
});
|
|
18
18
|
var SrOnlyOutput = styled.output.withConfig({
|
|
19
19
|
displayName: "CircularProgress__SrOnlyOutput",
|
|
@@ -55,7 +55,7 @@ var CircularProgress = /*#__PURE__*/forwardRef(function CircularProgress(_ref2,
|
|
|
55
55
|
var trackStyle = {};
|
|
56
56
|
var props = _objectSpread(_objectSpread({}, rest), {}, {
|
|
57
57
|
ref: ref,
|
|
58
|
-
variant: variant
|
|
58
|
+
$variant: variant
|
|
59
59
|
});
|
|
60
60
|
var token = getToken(color);
|
|
61
61
|
var _useState = useState(0),
|
|
@@ -12,9 +12,9 @@ var Svg = styled.svg.withConfig({
|
|
|
12
12
|
displayName: "StarProgress__Svg",
|
|
13
13
|
componentId: "sc-c0byj9-0"
|
|
14
14
|
})(["fill:", ";", ""], token.background, function (_ref) {
|
|
15
|
-
var variant = _ref
|
|
16
|
-
progress = _ref
|
|
17
|
-
return variant === 'indeterminate' ? css(["path{&:nth-child(1){animation:", " 1.3s linear infinite;}&:nth-child(2){animation:", " 1.3s linear 0.3s infinite;}&:nth-child(3){animation:", " 1.3s linear 0.4s infinite;}&:nth-child(4){animation:", " 1.3s linear 0.6s infinite;}&:nth-child(5){animation:", " 1.3s linear 0.8s infinite;}&:nth-child(6){animation:", " 1.3s linear 1s infinite;}}"], indeterminate, indeterminate, indeterminate, indeterminate, indeterminate, indeterminate) : css(["path{animation:", " 1.3s linear;&:nth-child(6){animation-play-state:", ";}&:nth-child(5){animation-play-state:", ";}&:nth-child(4){animation-play-state:", ";}&:nth-child(3){animation-play-state:", ";}&:nth-child(2){animation-play-state:", ";}&:nth-child(1){animation-play-state:", ";}}"], determinate, progress > 90 ? 'running' : 'paused', progress > 80 ? 'running' : 'paused', progress > 60 ? 'running' : 'paused', progress > 40 ? 'running' : 'paused', progress > 20 ? 'running' : 'paused', progress <= 20 ? 'running' : 'paused');
|
|
15
|
+
var $variant = _ref.$variant,
|
|
16
|
+
$progress = _ref.$progress;
|
|
17
|
+
return $variant === 'indeterminate' ? css(["path{&:nth-child(1){animation:", " 1.3s linear infinite;}&:nth-child(2){animation:", " 1.3s linear 0.3s infinite;}&:nth-child(3){animation:", " 1.3s linear 0.4s infinite;}&:nth-child(4){animation:", " 1.3s linear 0.6s infinite;}&:nth-child(5){animation:", " 1.3s linear 0.8s infinite;}&:nth-child(6){animation:", " 1.3s linear 1s infinite;}}"], indeterminate, indeterminate, indeterminate, indeterminate, indeterminate, indeterminate) : css(["path{animation:", " 1.3s linear;&:nth-child(6){animation-play-state:", ";}&:nth-child(5){animation-play-state:", ";}&:nth-child(4){animation-play-state:", ";}&:nth-child(3){animation-play-state:", ";}&:nth-child(2){animation-play-state:", ";}&:nth-child(1){animation-play-state:", ";}}"], determinate, $progress > 90 ? 'running' : 'paused', $progress > 80 ? 'running' : 'paused', $progress > 60 ? 'running' : 'paused', $progress > 40 ? 'running' : 'paused', $progress > 20 ? 'running' : 'paused', $progress <= 20 ? 'running' : 'paused');
|
|
18
18
|
});
|
|
19
19
|
var StarProgress = /*#__PURE__*/forwardRef(function StarProgress(_ref2, ref) {
|
|
20
20
|
var _ref2$variant = _ref2.variant,
|
|
@@ -29,8 +29,8 @@ var StarProgress = /*#__PURE__*/forwardRef(function StarProgress(_ref2, ref) {
|
|
|
29
29
|
var width = size;
|
|
30
30
|
var props = _objectSpread(_objectSpread({}, rest), {}, {
|
|
31
31
|
ref: ref,
|
|
32
|
-
variant: variant,
|
|
33
|
-
progress: progress
|
|
32
|
+
$variant: variant,
|
|
33
|
+
$progress: progress
|
|
34
34
|
});
|
|
35
35
|
if (variant === 'determinate') {
|
|
36
36
|
if (value !== undefined) {
|