@ctlyst.id/internal-ui 2.1.4 → 2.1.5
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/components/loader/components/loader.d.ts +2 -2
- package/dist/internal-ui.cjs.development.js +19 -5
- package/dist/internal-ui.cjs.development.js.map +1 -1
- package/dist/internal-ui.cjs.production.min.js +1 -1
- package/dist/internal-ui.cjs.production.min.js.map +1 -1
- package/dist/internal-ui.esm.js +19 -5
- package/dist/internal-ui.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/internal-ui.esm.js
CHANGED
@@ -4119,6 +4119,7 @@ const Input = /*#__PURE__*/defineMultiStyleConfig$2({
|
|
4119
4119
|
}
|
4120
4120
|
});
|
4121
4121
|
|
4122
|
+
/* eslint-disable prefer-destructuring */
|
4122
4123
|
const rotate = /*#__PURE__*/keyframes({
|
4123
4124
|
'0%': {
|
4124
4125
|
transform: 'rotate(0deg)'
|
@@ -4128,10 +4129,23 @@ const rotate = /*#__PURE__*/keyframes({
|
|
4128
4129
|
}
|
4129
4130
|
});
|
4130
4131
|
const getLoaderColor = color => {
|
4131
|
-
|
4132
|
-
|
4133
|
-
|
4134
|
-
|
4132
|
+
const colorValue = color.split('.');
|
4133
|
+
let backgroundColor;
|
4134
|
+
switch (colorValue.length) {
|
4135
|
+
case 1:
|
4136
|
+
backgroundColor = colorValue[0];
|
4137
|
+
break;
|
4138
|
+
case 2:
|
4139
|
+
backgroundColor = `var(--chakra-colors-${colorValue[0]}-${colorValue[1]})`;
|
4140
|
+
break;
|
4141
|
+
default:
|
4142
|
+
backgroundColor = 'var(--chakra-colors-white-high)';
|
4143
|
+
break;
|
4144
|
+
}
|
4145
|
+
if (color === 'primary') return 'var(--chakra-colors-primary-600)';
|
4146
|
+
if (color === 'danger') return 'var(--chakra-colors-danger-500)';
|
4147
|
+
if (color === 'warning') return 'var(--chakra-colors-warning-700)';
|
4148
|
+
return backgroundColor;
|
4135
4149
|
};
|
4136
4150
|
const LoaderStyle = /*#__PURE__*/defineStyleConfig({
|
4137
4151
|
baseStyle: props => {
|
@@ -4142,7 +4156,7 @@ const LoaderStyle = /*#__PURE__*/defineStyleConfig({
|
|
4142
4156
|
justifyContent: 'center',
|
4143
4157
|
alignItems: 'center',
|
4144
4158
|
animation: `${rotate} 1s linear infinite`,
|
4145
|
-
background: `conic-gradient(from 180deg at 50% 50%,
|
4159
|
+
background: `conic-gradient(from 180deg at 50% 50%, ${colors} 0deg, rgba(217, 217, 217, 0) 360deg);`,
|
4146
4160
|
':before': {
|
4147
4161
|
content: `''`,
|
4148
4162
|
display: 'block',
|