@ctlyst.id/internal-ui 2.0.0-canary.2 → 2.0.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/components/alert/__stories__/alert.stories.d.ts +14 -0
- package/dist/components/alert/components/alert-action.d.ts +6 -0
- package/dist/components/alert/components/alert-close.d.ts +6 -0
- package/dist/components/alert/components/alert-context.d.ts +29 -0
- package/dist/components/alert/components/alert-description.d.ts +3 -0
- package/dist/components/alert/components/alert-icon.d.ts +6 -0
- package/dist/components/alert/components/alert-title.d.ts +3 -0
- package/dist/components/alert/components/alert.d.ts +25 -0
- package/dist/components/alert/components/icons.d.ts +3 -0
- package/dist/components/alert/components/index.d.ts +14 -0
- package/dist/components/alert/index.d.ts +1 -0
- package/dist/components/{base/__stories__/button.stories.d.ts → badge/__stories__/badge.stories.d.ts} +1 -1
- package/dist/components/badge/components/badge.d.ts +11 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/button/__stories__/button.stories.d.ts +14 -0
- package/dist/components/button/components/button.d.ts +4 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/card/__stories__/card.stories.d.ts +11 -0
- package/dist/components/card/components/card.d.ts +8 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/checkbox/__stories__/checkbox-group.stories.d.ts +13 -0
- package/dist/components/checkbox/components/checkbox-group.d.ts +18 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/chips/__stories__/chips.stories.d.ts +12 -0
- package/dist/components/chips/components/chips.d.ts +19 -0
- package/dist/components/chips/index.d.ts +2 -0
- package/dist/components/field/components/field.d.ts +0 -1
- package/dist/components/field/index.d.ts +0 -2
- package/dist/components/form/__stories__/input.stories.d.ts +14 -0
- package/dist/components/form/components/input-addon.d.ts +7 -0
- package/dist/components/{field → form}/components/input-field.d.ts +4 -1
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/form/styles/input-field.d.ts +4 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/layouting/components/box.d.ts +4 -0
- package/dist/components/layouting/components/container.d.ts +4 -0
- package/dist/components/layouting/components/flex.d.ts +4 -0
- package/dist/components/layouting/components/grid.d.ts +4 -0
- package/dist/components/layouting/components/stack.d.ts +4 -0
- package/dist/components/layouting/components/wrap.d.ts +4 -0
- package/dist/components/layouting/index.d.ts +12 -0
- package/dist/components/radio/__stories__/radio-group.stories.d.ts +13 -0
- package/dist/components/radio/__stories__/radio.stories.d.ts +12 -0
- package/dist/components/radio/components/radio-group.d.ts +17 -0
- package/dist/components/radio/components/radio.d.ts +16 -0
- package/dist/components/radio/index.d.ts +4 -0
- package/dist/components/rating/__stories__/rating.stories.d.ts +10 -0
- package/dist/components/rating/components/rating.d.ts +6 -0
- package/dist/components/rating/index.d.ts +2 -0
- package/dist/components/switch/__stories__/switch.stories.d.ts +13 -0
- package/dist/components/switch/components/switch.d.ts +18 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/text/components/text.d.ts +4 -0
- package/dist/components/text/index.d.ts +2 -0
- package/dist/config/theme/components/alert.d.ts +79 -0
- package/dist/config/theme/components/card.d.ts +18 -0
- package/dist/config/theme/components/checkbox.d.ts +2 -1
- package/dist/config/theme/components/chips.d.ts +30 -0
- package/dist/config/theme/components/index.d.ts +3 -0
- package/dist/config/theme/components/input.d.ts +8 -21
- package/dist/config/theme/components/radio.d.ts +98 -2
- package/dist/config/theme/components/switch.d.ts +43 -9
- package/dist/config/theme/themeConfiguration.d.ts +4 -2
- package/dist/internal-ui.cjs.development.js +1057 -310
- package/dist/internal-ui.cjs.development.js.map +1 -1
- package/dist/internal-ui.cjs.production.min.js +9 -9
- package/dist/internal-ui.cjs.production.min.js.map +1 -1
- package/dist/internal-ui.esm.js +1058 -325
- package/dist/internal-ui.esm.js.map +1 -1
- package/dist/provider/components/provider.d.ts +0 -1
- package/package.json +12 -11
- package/dist/components/base/__stories__/input.stories.d.ts +0 -16
- package/dist/components/base/__stories__/radio.stories.d.ts +0 -15
@@ -15,15 +15,16 @@ var classnames = _interopDefault(require('classnames'));
|
|
15
15
|
var ReactDatePicker = _interopDefault(require('react-datepicker'));
|
16
16
|
var system = require('@chakra-ui/system');
|
17
17
|
var styled = _interopDefault(require('@emotion/styled'));
|
18
|
+
var internalIcon = require('@ctlyst.id/internal-icon');
|
18
19
|
var ReactSelect = _interopDefault(require('react-select'));
|
19
20
|
var reactSelectAsyncPaginate = require('react-select-async-paginate');
|
20
21
|
var ReactSelectAsyncCreatable = _interopDefault(require('react-select/async-creatable'));
|
21
22
|
var ReactSelectCreatable = _interopDefault(require('react-select/creatable'));
|
23
|
+
var sharedUtils = require('@chakra-ui/shared-utils');
|
22
24
|
var reactDropzone = require('react-dropzone');
|
23
|
-
var themeTools = require('@chakra-ui/theme-tools');
|
24
25
|
var anatomy = require('@chakra-ui/anatomy');
|
25
26
|
var styledSystem = require('@chakra-ui/styled-system');
|
26
|
-
require('@
|
27
|
+
var themeTools = require('@chakra-ui/theme-tools');
|
27
28
|
var axios = _interopDefault(require('axios'));
|
28
29
|
|
29
30
|
/* eslint-disable react-hooks/rules-of-hooks */
|
@@ -121,6 +122,57 @@ BreadCrumb.defaultProps = {
|
|
121
122
|
spacing: 2
|
122
123
|
};
|
123
124
|
|
125
|
+
const Loader = /*#__PURE__*/react.forwardRef((props, ref) => {
|
126
|
+
const styles = react.useStyleConfig('LoaderStyle', props);
|
127
|
+
return /*#__PURE__*/React__default.createElement(react.Box, {
|
128
|
+
ref: ref,
|
129
|
+
__css: styles
|
130
|
+
});
|
131
|
+
});
|
132
|
+
|
133
|
+
const Button = props => {
|
134
|
+
const {
|
135
|
+
children,
|
136
|
+
variant,
|
137
|
+
size,
|
138
|
+
...rest
|
139
|
+
} = props;
|
140
|
+
const getLoaderSize = () => {
|
141
|
+
if (size === 'lg') return 'md';
|
142
|
+
if (size === 'md') return 'sm';
|
143
|
+
return 'xs';
|
144
|
+
};
|
145
|
+
const getLoaderColor = () => {
|
146
|
+
if (variant === 'primary' || variant === 'danger') return 'white';
|
147
|
+
if (variant === 'outline-danger') return 'danger';
|
148
|
+
return 'primary';
|
149
|
+
};
|
150
|
+
return /*#__PURE__*/React__default.createElement(react.Button, Object.assign({
|
151
|
+
size: size,
|
152
|
+
variant: variant,
|
153
|
+
spinner: /*#__PURE__*/React__default.createElement(Loader, {
|
154
|
+
size: getLoaderSize(),
|
155
|
+
color: getLoaderColor()
|
156
|
+
})
|
157
|
+
}, rest), children);
|
158
|
+
};
|
159
|
+
|
160
|
+
const CardCustom = /*#__PURE__*/React.forwardRef(({
|
161
|
+
children,
|
162
|
+
...rest
|
163
|
+
}, ref) => {
|
164
|
+
const styles = react.useStyleConfig('Card', rest);
|
165
|
+
return /*#__PURE__*/React__default.createElement(react.Card, Object.assign({
|
166
|
+
__css: styles,
|
167
|
+
backgroundColor: "white.high",
|
168
|
+
ref: ref
|
169
|
+
}, rest), children);
|
170
|
+
});
|
171
|
+
CardCustom.defaultProps = {
|
172
|
+
withShadow: true,
|
173
|
+
isRounded: true
|
174
|
+
};
|
175
|
+
|
124
176
|
function CheckboxComponent({
|
125
177
|
isError = false,
|
126
178
|
helpText = '',
|
@@ -136,12 +188,10 @@ function CheckboxComponent({
|
|
136
188
|
variant: variant
|
137
189
|
}, rest, {
|
138
190
|
isDisabled: isDisabled
|
139
|
-
})
|
140
|
-
ml: "8px"
|
141
|
-
}, /*#__PURE__*/React__default.createElement(react.Text, {
|
191
|
+
}), children && /*#__PURE__*/React__default.createElement(react.Text, {
|
142
192
|
textStyle: "text.sm",
|
143
193
|
color: isDisabled ? 'black.low' : 'black.high'
|
144
|
-
}, children)))
|
194
|
+
}, children))), /*#__PURE__*/React__default.createElement(react.Box, {
|
145
195
|
mt: "5px",
|
146
196
|
ml: "24px"
|
147
197
|
}, isError ? /*#__PURE__*/React__default.createElement(react.Text, {
|
@@ -149,7 +199,7 @@ function CheckboxComponent({
|
|
149
199
|
color: "danger.500"
|
150
200
|
}, errorText) : /*#__PURE__*/React__default.createElement(react.Text, {
|
151
201
|
textStyle: "text.xs",
|
152
|
-
color:
|
202
|
+
color: "black.medium"
|
153
203
|
}, helpText)));
|
154
204
|
}
|
155
205
|
CheckboxComponent.defaultProps = {
|
@@ -158,6 +208,95 @@ CheckboxComponent.defaultProps = {
|
|
158
208
|
errorText: ''
|
159
209
|
};
|
160
210
|
|
211
|
+
/* eslint-disable no-nested-ternary */
|
212
|
+
const Field = props => {
|
213
|
+
const {
|
214
|
+
label,
|
215
|
+
isError,
|
216
|
+
errorMessage,
|
217
|
+
leftHelperText,
|
218
|
+
rightHelperText,
|
219
|
+
isRequired,
|
220
|
+
children,
|
221
|
+
isSuccess
|
222
|
+
} = props;
|
223
|
+
const getHelperColor = () => {
|
224
|
+
if (isError) return 'danger.500';
|
225
|
+
if (isSuccess) return 'success.500';
|
226
|
+
return 'black.medium';
|
227
|
+
};
|
228
|
+
const getJustifyContentHelper = () => {
|
229
|
+
if (rightHelperText && (!leftHelperText || isError && !errorMessage)) return 'flex-end';
|
230
|
+
return 'space-between';
|
231
|
+
};
|
232
|
+
const helperColor = getHelperColor();
|
233
|
+
const justifyHelper = getJustifyContentHelper();
|
234
|
+
return /*#__PURE__*/React__default.createElement(react.FormControl, {
|
235
|
+
isInvalid: isError
|
236
|
+
}, label && (typeof label === 'string' ? /*#__PURE__*/React__default.createElement(react.FormLabel, {
|
237
|
+
mb: 1,
|
238
|
+
fontSize: "text.sm",
|
239
|
+
requiredIndicator: undefined
|
240
|
+
}, isRequired && /*#__PURE__*/React__default.createElement(react.Box, {
|
241
|
+
as: "span",
|
242
|
+
color: "danger.500",
|
243
|
+
ml: 0,
|
244
|
+
mr: 1
|
245
|
+
}, "*"), label) : label), children, (isError && errorMessage || leftHelperText || rightHelperText) && /*#__PURE__*/React__default.createElement(react.Box, {
|
246
|
+
display: "flex",
|
247
|
+
width: "full",
|
248
|
+
justifyContent: justifyHelper
|
249
|
+
}, !isError ? leftHelperText && /*#__PURE__*/React__default.createElement(react.FormHelperText, {
|
250
|
+
fontSize: "text.xs",
|
251
|
+
color: helperColor,
|
252
|
+
mt: 1
|
253
|
+
}, leftHelperText) : typeof errorMessage === 'string' ? /*#__PURE__*/React__default.createElement(react.FormErrorMessage, {
|
254
|
+
fontSize: "text.xs",
|
255
|
+
color: "danger.500",
|
256
|
+
mt: 1
|
257
|
+
}, errorMessage) : errorMessage, rightHelperText && /*#__PURE__*/React__default.createElement(react.FormHelperText, {
|
258
|
+
fontSize: "text.xs",
|
259
|
+
color: helperColor,
|
260
|
+
mt: 1
|
261
|
+
}, rightHelperText)));
|
262
|
+
};
|
263
|
+
Field.defaultProps = {
|
264
|
+
label: '',
|
265
|
+
isError: false,
|
266
|
+
isSuccess: false,
|
267
|
+
errorMessage: undefined,
|
268
|
+
leftHelperText: undefined,
|
269
|
+
rightHelperText: undefined,
|
270
|
+
isRequired: false
|
271
|
+
};
|
272
|
+
|
273
|
+
function CheckboxGroupComponent(props) {
|
274
|
+
const {
|
275
|
+
children,
|
276
|
+
label,
|
277
|
+
helpText,
|
278
|
+
isError,
|
279
|
+
errorMessage,
|
280
|
+
...rest
|
281
|
+
} = props;
|
282
|
+
return /*#__PURE__*/React__default.createElement(Field, Object.assign({}, rest, {
|
283
|
+
label: label,
|
284
|
+
leftHelperText: helpText,
|
285
|
+
isError: isError,
|
286
|
+
errorMessage: errorMessage
|
287
|
+
}), /*#__PURE__*/React__default.createElement(react.Box, {
|
288
|
+
mt: "12px"
|
289
|
+
}, /*#__PURE__*/React__default.createElement(react.CheckboxGroup, Object.assign({}, rest), /*#__PURE__*/React__default.createElement(react.Stack, {
|
290
|
+
spacing: [1, '16px'],
|
291
|
+
direction: ['column', 'row']
|
292
|
+
}, children))));
|
293
|
+
}
|
294
|
+
CheckboxGroupComponent.defaultProps = {
|
295
|
+
helpText: '',
|
296
|
+
isError: false,
|
297
|
+
errorMessage: ''
|
298
|
+
};
|
299
|
+
|
161
300
|
const IndeterminateCheckbox = ({
|
162
301
|
indeterminate = false,
|
163
302
|
...rest
|
@@ -1754,69 +1893,60 @@ MultiDatePickerMonth.defaultProps = {
|
|
1754
1893
|
isError: false
|
1755
1894
|
};
|
1756
1895
|
|
1757
|
-
|
1758
|
-
const Field = props => {
|
1896
|
+
const getProperties = props => {
|
1759
1897
|
const {
|
1760
|
-
label,
|
1761
1898
|
isError,
|
1762
|
-
|
1763
|
-
|
1764
|
-
rightHelperText,
|
1765
|
-
isRequired,
|
1766
|
-
children,
|
1767
|
-
isSuccess,
|
1768
|
-
isDisabled
|
1899
|
+
isDisabled,
|
1900
|
+
isSuccess
|
1769
1901
|
} = props;
|
1770
|
-
|
1771
|
-
|
1772
|
-
|
1773
|
-
if (
|
1774
|
-
|
1902
|
+
let outlineColor = 'neutral.400';
|
1903
|
+
let focusColor = 'primary.500';
|
1904
|
+
if (isError || isDisabled || isSuccess) {
|
1905
|
+
if (isError) outlineColor = 'danger.500';else if (isSuccess) outlineColor = 'success.500';
|
1906
|
+
focusColor = outlineColor;
|
1907
|
+
}
|
1908
|
+
return {
|
1909
|
+
outlineColor,
|
1910
|
+
focusColor
|
1775
1911
|
};
|
1776
|
-
|
1777
|
-
|
1778
|
-
|
1912
|
+
};
|
1913
|
+
const getWrapperStyle = props => {
|
1914
|
+
const {
|
1915
|
+
outlineColor,
|
1916
|
+
focusColor
|
1917
|
+
} = getProperties(props);
|
1918
|
+
const style = {
|
1919
|
+
border: '1px solid',
|
1920
|
+
borderColor: outlineColor,
|
1921
|
+
borderRadius: 'md',
|
1922
|
+
transition: 'all 0.15s',
|
1923
|
+
boxShadow: 'none',
|
1924
|
+
_focusWithin: {
|
1925
|
+
borderColor: focusColor
|
1926
|
+
}
|
1779
1927
|
};
|
1780
|
-
|
1781
|
-
const justifyHelper = getJustifyContentHelper();
|
1782
|
-
return /*#__PURE__*/React__default.createElement(react.FormControl, {
|
1783
|
-
isInvalid: isError
|
1784
|
-
}, label && (typeof label === 'string' ? /*#__PURE__*/React__default.createElement(react.FormLabel, {
|
1785
|
-
mb: 1,
|
1786
|
-
fontSize: "text.sm",
|
1787
|
-
requiredIndicator: undefined
|
1788
|
-
}, isRequired && /*#__PURE__*/React__default.createElement(react.Box, {
|
1789
|
-
as: "span",
|
1790
|
-
color: "danger.500",
|
1791
|
-
ml: 0,
|
1792
|
-
mr: 1
|
1793
|
-
}, "*"), label) : label), children, (isError && errorMessage || leftHelperText || rightHelperText) && /*#__PURE__*/React__default.createElement(react.Box, {
|
1794
|
-
display: "flex",
|
1795
|
-
width: "full",
|
1796
|
-
justifyContent: justifyHelper
|
1797
|
-
}, !isError ? leftHelperText && /*#__PURE__*/React__default.createElement(react.FormHelperText, {
|
1798
|
-
fontSize: "text.xs",
|
1799
|
-
color: helperColor,
|
1800
|
-
mt: 1
|
1801
|
-
}, leftHelperText) : typeof errorMessage === 'string' ? /*#__PURE__*/React__default.createElement(react.FormErrorMessage, {
|
1802
|
-
fontSize: "text.xs",
|
1803
|
-
color: "danger.500",
|
1804
|
-
mt: 1
|
1805
|
-
}, errorMessage) : errorMessage, rightHelperText && /*#__PURE__*/React__default.createElement(react.FormHelperText, {
|
1806
|
-
fontSize: "text.xs",
|
1807
|
-
color: helperColor,
|
1808
|
-
mt: 1
|
1809
|
-
}, rightHelperText)));
|
1928
|
+
return react.defineStyle(style);
|
1810
1929
|
};
|
1811
|
-
|
1812
|
-
|
1813
|
-
|
1814
|
-
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1930
|
+
|
1931
|
+
const InputAddonLeft = ({
|
1932
|
+
children
|
1933
|
+
}) => {
|
1934
|
+
return /*#__PURE__*/React__default.createElement(react.Box, {
|
1935
|
+
borderLeftRadius: "md",
|
1936
|
+
backgroundColor: "neutral.200",
|
1937
|
+
px: 3,
|
1938
|
+
py: 2.5
|
1939
|
+
}, children);
|
1940
|
+
};
|
1941
|
+
const InputAddonRight = ({
|
1942
|
+
children
|
1943
|
+
}) => {
|
1944
|
+
return /*#__PURE__*/React__default.createElement(react.Box, {
|
1945
|
+
borderRightRadius: "md",
|
1946
|
+
backgroundColor: "neutral.200",
|
1947
|
+
px: 3,
|
1948
|
+
py: 2.5
|
1949
|
+
}, children);
|
1820
1950
|
};
|
1821
1951
|
|
1822
1952
|
const InputField = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
@@ -1836,40 +1966,99 @@ const InputField = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
1836
1966
|
errorMessage,
|
1837
1967
|
leftHelperText,
|
1838
1968
|
rightHelperText,
|
1969
|
+
withClear,
|
1970
|
+
onClear,
|
1971
|
+
isLoading,
|
1839
1972
|
...inputProps
|
1840
1973
|
} = props;
|
1974
|
+
const wrapperStyle = getWrapperStyle(props);
|
1975
|
+
const [isShowPassword, setIsShowPassword] = React.useState(false);
|
1976
|
+
const inputType = React.useMemo(() => {
|
1977
|
+
return type === 'password' && isShowPassword ? 'text' : type;
|
1978
|
+
}, [isShowPassword, type]);
|
1979
|
+
const fontSize = React.useMemo(() => {
|
1980
|
+
if (type === 'password') {
|
1981
|
+
if (!isShowPassword && value) return 'text.xl';
|
1982
|
+
}
|
1983
|
+
return 'text.sm';
|
1984
|
+
}, [isShowPassword, type, value]);
|
1985
|
+
const iconColor = React.useMemo(() => {
|
1986
|
+
return isDisabled ? 'black.low' : 'black.medium';
|
1987
|
+
}, [isDisabled]);
|
1841
1988
|
return /*#__PURE__*/React__default.createElement(Field, {
|
1842
1989
|
label: label,
|
1843
1990
|
isSuccess: isSuccess,
|
1844
|
-
isDisabled: isDisabled,
|
1845
1991
|
isError: isError,
|
1846
1992
|
errorMessage: errorMessage,
|
1847
1993
|
leftHelperText: leftHelperText,
|
1848
1994
|
rightHelperText: rightHelperText,
|
1849
1995
|
isRequired: isRequired
|
1996
|
+
}, /*#__PURE__*/React__default.createElement(react.Box, {
|
1997
|
+
__css: wrapperStyle
|
1850
1998
|
}, /*#__PURE__*/React__default.createElement(react.InputGroup, {
|
1851
|
-
size: size
|
1852
|
-
|
1999
|
+
size: size,
|
2000
|
+
borderRadius: "md",
|
2001
|
+
backgroundColor: isDisabled ? 'neutral.300' : 'white.high',
|
2002
|
+
cursor: isDisabled ? 'not-allowed' : 'default'
|
2003
|
+
}, addOnLeft && /*#__PURE__*/React__default.createElement(InputAddonLeft, null, addOnLeft), /*#__PURE__*/React__default.createElement(react.Input, Object.assign({
|
1853
2004
|
ref: ref,
|
1854
|
-
type:
|
1855
|
-
value: value
|
1856
|
-
|
2005
|
+
type: inputType,
|
2006
|
+
value: value,
|
2007
|
+
isDisabled: isDisabled,
|
2008
|
+
isSuccess: isSuccess
|
2009
|
+
}, inputProps, {
|
2010
|
+
fontSize: fontSize
|
2011
|
+
})), (withClear || isLoading || type === 'password') && /*#__PURE__*/React__default.createElement(react.Box, {
|
2012
|
+
"data-test-id": "Pg7ttgRey7InxE4qzTjW_",
|
2013
|
+
display: "flex",
|
2014
|
+
alignItems: "center",
|
2015
|
+
justifyContent: "center",
|
2016
|
+
width: "16px",
|
2017
|
+
mr: "10px"
|
2018
|
+
}, withClear && !isLoading && /*#__PURE__*/React__default.createElement(react.Box, {
|
2019
|
+
display: "flex",
|
2020
|
+
justifyContent: "center",
|
2021
|
+
onClick: !isDisabled ? onClear : undefined,
|
2022
|
+
cursor: isDisabled ? 'not-allowed' : 'pointer'
|
2023
|
+
}, /*#__PURE__*/React__default.createElement(internalIcon.Close, {
|
2024
|
+
size: 4,
|
2025
|
+
color: iconColor
|
2026
|
+
})), type === 'password' && !isShowPassword && !isLoading && /*#__PURE__*/React__default.createElement(react.Box, {
|
2027
|
+
"data-test-id": "q2Bj2G4FlamXyHuRKMZ1Q",
|
2028
|
+
onClick: () => {
|
2029
|
+
if (!isDisabled) setIsShowPassword(true);
|
2030
|
+
},
|
2031
|
+
cursor: isDisabled ? 'not-allowed' : 'pointer',
|
2032
|
+
display: "flex",
|
2033
|
+
justifyContent: "center"
|
2034
|
+
}, /*#__PURE__*/React__default.createElement(internalIcon.EyeOff, {
|
2035
|
+
size: 4,
|
2036
|
+
color: iconColor
|
2037
|
+
})), type === 'password' && isShowPassword && !isLoading && /*#__PURE__*/React__default.createElement(react.Box, {
|
2038
|
+
"data-test-id": "sfc2388bmeXBmdla45Ibk",
|
2039
|
+
onClick: () => {
|
2040
|
+
if (!isDisabled) setIsShowPassword(false);
|
2041
|
+
},
|
2042
|
+
cursor: isDisabled ? 'not-allowed' : 'pointer',
|
2043
|
+
display: "flex",
|
2044
|
+
justifyContent: "center"
|
2045
|
+
}, /*#__PURE__*/React__default.createElement(internalIcon.Eye, {
|
2046
|
+
size: 4,
|
2047
|
+
color: iconColor
|
2048
|
+
})), isLoading && /*#__PURE__*/React__default.createElement(Loader, {
|
2049
|
+
size: "sm"
|
2050
|
+
})), "(", addOnRight && /*#__PURE__*/React__default.createElement(InputAddonRight, null, addOnRight))));
|
1857
2051
|
});
|
1858
2052
|
InputField.defaultProps = {
|
1859
2053
|
addOnLeft: undefined,
|
1860
2054
|
addOnRight: undefined,
|
1861
2055
|
elementLeft: undefined,
|
1862
|
-
elementRight: undefined
|
2056
|
+
elementRight: undefined,
|
2057
|
+
withClear: undefined,
|
2058
|
+
isLoading: undefined,
|
2059
|
+
onClear: undefined
|
1863
2060
|
};
|
1864
2061
|
|
1865
|
-
const Loader = /*#__PURE__*/react.forwardRef((props, ref) => {
|
1866
|
-
const styles = react.useStyleConfig('LoaderStyle', props);
|
1867
|
-
return /*#__PURE__*/React__default.createElement(react.Box, {
|
1868
|
-
ref: ref,
|
1869
|
-
__css: styles
|
1870
|
-
});
|
1871
|
-
});
|
1872
|
-
|
1873
2062
|
const TextareaField = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
1874
2063
|
const {
|
1875
2064
|
value,
|
@@ -2480,6 +2669,68 @@ PaginationFilter.defaultProps = {
|
|
2480
2669
|
label: undefined
|
2481
2670
|
};
|
2482
2671
|
|
2672
|
+
function RadioComponent({
|
2673
|
+
isError = false,
|
2674
|
+
helpText = '',
|
2675
|
+
errorText = '',
|
2676
|
+
children,
|
2677
|
+
isDisabled,
|
2678
|
+
...rest
|
2679
|
+
}) {
|
2680
|
+
const variant = isError ? 'errors' : 'unstyled';
|
2681
|
+
return /*#__PURE__*/React__default.createElement(react.Box, null, /*#__PURE__*/React__default.createElement(react.Box, {
|
2682
|
+
display: "flex"
|
2683
|
+
}, /*#__PURE__*/React__default.createElement(react.Radio, Object.assign({
|
2684
|
+
variant: variant
|
2685
|
+
}, rest, {
|
2686
|
+
isDisabled: isDisabled
|
2687
|
+
}), children && /*#__PURE__*/React__default.createElement(react.Text, {
|
2688
|
+
textStyle: "text.sm",
|
2689
|
+
color: isDisabled ? 'black.low' : 'black.high'
|
2690
|
+
}, children))), /*#__PURE__*/React__default.createElement(react.Box, {
|
2691
|
+
mt: "5px",
|
2692
|
+
ml: "24px"
|
2693
|
+
}, isError ? /*#__PURE__*/React__default.createElement(react.Text, {
|
2694
|
+
textStyle: "text.xs",
|
2695
|
+
color: "danger.500"
|
2696
|
+
}, errorText) : /*#__PURE__*/React__default.createElement(react.Text, {
|
2697
|
+
textStyle: "text.xs",
|
2698
|
+
color: "black.medium"
|
2699
|
+
}, helpText)));
|
2700
|
+
}
|
2701
|
+
RadioComponent.defaultProps = {
|
2702
|
+
isError: false,
|
2703
|
+
helpText: '',
|
2704
|
+
errorText: ''
|
2705
|
+
};
|
2706
|
+
|
2707
|
+
function RadioGroupComponent(props) {
|
2708
|
+
const {
|
2709
|
+
children,
|
2710
|
+
label,
|
2711
|
+
helpText,
|
2712
|
+
isError,
|
2713
|
+
errorMessage,
|
2714
|
+
...rest
|
2715
|
+
} = props;
|
2716
|
+
return /*#__PURE__*/React__default.createElement(Field, Object.assign({}, rest, {
|
2717
|
+
label: label,
|
2718
|
+
leftHelperText: helpText,
|
2719
|
+
isError: isError,
|
2720
|
+
errorMessage: errorMessage
|
2721
|
+
}), /*#__PURE__*/React__default.createElement(react.Box, {
|
2722
|
+
mt: "12px"
|
2723
|
+
}, /*#__PURE__*/React__default.createElement(react.RadioGroup, Object.assign({}, rest), /*#__PURE__*/React__default.createElement(react.Stack, {
|
2724
|
+
spacing: [1, '16px'],
|
2725
|
+
direction: ['column', 'row']
|
2726
|
+
}, children))));
|
2727
|
+
}
|
2728
|
+
RadioGroupComponent.defaultProps = {
|
2729
|
+
helpText: '',
|
2730
|
+
isError: false,
|
2731
|
+
errorMessage: ''
|
2732
|
+
};
|
2733
|
+
|
2483
2734
|
const SelectWrapper = ({
|
2484
2735
|
children,
|
2485
2736
|
isError = false
|
@@ -2672,15 +2923,104 @@ function SelectCreatable({
|
|
2672
2923
|
})));
|
2673
2924
|
}
|
2674
2925
|
|
2675
|
-
|
2676
|
-
|
2677
|
-
|
2678
|
-
|
2679
|
-
|
2680
|
-
|
2681
|
-
|
2682
|
-
const styles = react.useMultiStyleConfig('
|
2683
|
-
|
2926
|
+
/**
|
2927
|
+
* The `Switch` component is used as an alternative for the checkbox component for switching between "enabled" and "disabled" states.
|
2928
|
+
*
|
2929
|
+
* @see Docs https://chakra-ui.com/docs/components/switch
|
2930
|
+
* @see WAI-ARIA https://www.w3.org/WAI/ARIA/apg/patterns/switch/
|
2931
|
+
*/
|
2932
|
+
const Switch = /*#__PURE__*/react.forwardRef(function Switch(props, ref) {
|
2933
|
+
const styles = react.useMultiStyleConfig('Switch', props);
|
2934
|
+
const {
|
2935
|
+
size = 'md'
|
2936
|
+
} = props;
|
2937
|
+
const {
|
2938
|
+
spacing = '0.5rem',
|
2939
|
+
children,
|
2940
|
+
...ownProps
|
2941
|
+
} = react.omitThemingProps(props);
|
2942
|
+
const {
|
2943
|
+
state,
|
2944
|
+
getInputProps,
|
2945
|
+
getCheckboxProps,
|
2946
|
+
getRootProps,
|
2947
|
+
getLabelProps
|
2948
|
+
} = react.useCheckbox(ownProps);
|
2949
|
+
const containerStyles = React.useMemo(() => ({
|
2950
|
+
display: 'inline-block',
|
2951
|
+
position: 'relative',
|
2952
|
+
verticalAlign: 'middle',
|
2953
|
+
lineHeight: 0,
|
2954
|
+
...styles.container
|
2955
|
+
}), [styles.container]);
|
2956
|
+
const trackStyles = React.useMemo(() => ({
|
2957
|
+
display: 'inline-flex',
|
2958
|
+
flexShrink: 0,
|
2959
|
+
justifyContent: 'flex-start',
|
2960
|
+
boxSizing: 'content-box',
|
2961
|
+
cursor: 'pointer',
|
2962
|
+
width: 200,
|
2963
|
+
...styles.track
|
2964
|
+
}), [styles.track]);
|
2965
|
+
const labelStyles = React.useMemo(() => ({
|
2966
|
+
userSelect: 'none',
|
2967
|
+
marginStart: spacing,
|
2968
|
+
...styles.label
|
2969
|
+
}), [spacing, styles.label]);
|
2970
|
+
const getIconSize = value => {
|
2971
|
+
const iconSize = {
|
2972
|
+
sm: 3,
|
2973
|
+
md: 4,
|
2974
|
+
lg: 5
|
2975
|
+
};
|
2976
|
+
return iconSize[value];
|
2977
|
+
};
|
2978
|
+
return /*#__PURE__*/React__default.createElement(react.chakra.label, Object.assign({}, getRootProps(), {
|
2979
|
+
display: "flex",
|
2980
|
+
alignItems: "center",
|
2981
|
+
className: sharedUtils.cx('chakra-switch', props.className),
|
2982
|
+
__css: containerStyles
|
2983
|
+
}), /*#__PURE__*/React__default.createElement("input", Object.assign({
|
2984
|
+
"data-test-id": "",
|
2985
|
+
className: "chakra-switch__input"
|
2986
|
+
}, getInputProps({}, ref))), /*#__PURE__*/React__default.createElement(react.chakra.span, Object.assign({}, getCheckboxProps(), {
|
2987
|
+
className: "chakra-switch__track",
|
2988
|
+
pos: "relative",
|
2989
|
+
__css: trackStyles
|
2990
|
+
}), /*#__PURE__*/React__default.createElement(react.Flex, {
|
2991
|
+
gap: 2,
|
2992
|
+
pos: "absolute",
|
2993
|
+
top: "50%",
|
2994
|
+
left: "50%",
|
2995
|
+
transform: "translate(-50%, -50%)"
|
2996
|
+
}, /*#__PURE__*/React__default.createElement(internalIcon.Check, {
|
2997
|
+
color: "white",
|
2998
|
+
size: getIconSize(size)
|
2999
|
+
}), /*#__PURE__*/React__default.createElement(internalIcon.Close, {
|
3000
|
+
color: state.isDisabled ? 'neutral.600' : 'neutral.900',
|
3001
|
+
size: getIconSize(size)
|
3002
|
+
})), /*#__PURE__*/React__default.createElement(react.chakra.span, {
|
3003
|
+
__css: styles.thumb,
|
3004
|
+
className: "chakra-switch__thumb",
|
3005
|
+
"data-checked": sharedUtils.dataAttr(state.isChecked),
|
3006
|
+
"data-hover": sharedUtils.dataAttr(state.isHovered)
|
3007
|
+
})), children && /*#__PURE__*/React__default.createElement(react.chakra.span, Object.assign({
|
3008
|
+
className: "chakra-switch__label",
|
3009
|
+
color: state.isDisabled ? 'black.low' : 'black.high'
|
3010
|
+
}, getLabelProps(), {
|
3011
|
+
__css: labelStyles
|
3012
|
+
}), children));
|
3013
|
+
});
|
3014
|
+
|
3015
|
+
const Tab = /*#__PURE__*/react.forwardRef((props, ref) => {
|
3016
|
+
var _props$leftAddon, _props$rightAddon;
|
3017
|
+
const tabProps = react.useTab({
|
3018
|
+
...props,
|
3019
|
+
ref
|
3020
|
+
});
|
3021
|
+
const isSelected = !!tabProps['aria-selected'];
|
3022
|
+
const styles = react.useMultiStyleConfig('Tabs', tabProps);
|
3023
|
+
return /*#__PURE__*/React.createElement(react.Button, Object.assign({
|
2684
3024
|
p: 3,
|
2685
3025
|
fontSize: "text.md",
|
2686
3026
|
_selected: {
|
@@ -2801,115 +3141,390 @@ Uploader.defaultProps = {
|
|
2801
3141
|
selected: false
|
2802
3142
|
};
|
2803
3143
|
|
3144
|
+
const {
|
3145
|
+
definePartsStyle,
|
3146
|
+
defineMultiStyleConfig
|
3147
|
+
} = /*#__PURE__*/styledSystem.createMultiStyleConfigHelpers(anatomy.alertAnatomy.keys);
|
3148
|
+
const $fg = /*#__PURE__*/styledSystem.cssVar('alert-fg');
|
3149
|
+
const $bg = /*#__PURE__*/styledSystem.cssVar('alert-bg');
|
3150
|
+
const baseStyle = /*#__PURE__*/definePartsStyle({
|
3151
|
+
container: {
|
3152
|
+
bg: $bg.reference,
|
3153
|
+
px: '4',
|
3154
|
+
py: '2',
|
3155
|
+
borderRadius: 'md'
|
3156
|
+
},
|
3157
|
+
title: {
|
3158
|
+
fontWeight: '400',
|
3159
|
+
lineHeight: '18px',
|
3160
|
+
marginEnd: '2'
|
3161
|
+
},
|
3162
|
+
description: {
|
3163
|
+
lineHeight: '6'
|
3164
|
+
},
|
3165
|
+
icon: {
|
3166
|
+
color: $fg.reference,
|
3167
|
+
flexShrink: 0,
|
3168
|
+
marginEnd: '3',
|
3169
|
+
w: '4',
|
3170
|
+
h: '4'
|
3171
|
+
},
|
3172
|
+
action: {
|
3173
|
+
'& +.chakra-alert__close': {
|
3174
|
+
ml: '3'
|
3175
|
+
}
|
3176
|
+
},
|
3177
|
+
close: {
|
3178
|
+
color: $fg.reference,
|
3179
|
+
w: '4',
|
3180
|
+
h: '4'
|
3181
|
+
},
|
3182
|
+
spinner: {
|
3183
|
+
color: $fg.reference,
|
3184
|
+
flexShrink: 0,
|
3185
|
+
marginEnd: '3',
|
3186
|
+
w: '5',
|
3187
|
+
h: '5'
|
3188
|
+
}
|
3189
|
+
});
|
3190
|
+
function getBg(props) {
|
3191
|
+
const {
|
3192
|
+
theme,
|
3193
|
+
colorScheme: c
|
3194
|
+
} = props;
|
3195
|
+
const darkBg = themeTools.transparentize(`${c}.200`, 0.16)(theme);
|
3196
|
+
return {
|
3197
|
+
light: `colors.${c}.50`,
|
3198
|
+
dark: darkBg
|
3199
|
+
};
|
3200
|
+
}
|
3201
|
+
const variantSubtle = /*#__PURE__*/definePartsStyle(props => {
|
3202
|
+
const {
|
3203
|
+
colorScheme: c
|
3204
|
+
} = props;
|
3205
|
+
const bg = getBg(props);
|
3206
|
+
return {
|
3207
|
+
container: {
|
3208
|
+
[$fg.variable]: `colors.${c}.700`,
|
3209
|
+
[$bg.variable]: bg.light,
|
3210
|
+
_dark: {
|
3211
|
+
[$fg.variable]: `colors.${c}.200`,
|
3212
|
+
[$bg.variable]: bg.dark
|
3213
|
+
},
|
3214
|
+
color: $fg.reference
|
3215
|
+
}
|
3216
|
+
};
|
3217
|
+
});
|
3218
|
+
const variantSolid = /*#__PURE__*/definePartsStyle(props => {
|
3219
|
+
const {
|
3220
|
+
colorScheme: c
|
3221
|
+
} = props;
|
3222
|
+
return {
|
3223
|
+
container: {
|
3224
|
+
[$fg.variable]: `colors.white.high`,
|
3225
|
+
[$bg.variable]: `colors.${c}.500`,
|
3226
|
+
_dark: {
|
3227
|
+
[$fg.variable]: `colors.gray.900`,
|
3228
|
+
[$bg.variable]: `colors.${c}.200`
|
3229
|
+
},
|
3230
|
+
color: $fg.reference
|
3231
|
+
}
|
3232
|
+
};
|
3233
|
+
});
|
3234
|
+
const variants = {
|
3235
|
+
subtle: variantSubtle,
|
3236
|
+
solid: variantSolid
|
3237
|
+
};
|
3238
|
+
const alertTheme = /*#__PURE__*/defineMultiStyleConfig({
|
3239
|
+
baseStyle,
|
3240
|
+
variants,
|
3241
|
+
defaultProps: {
|
3242
|
+
variant: 'subtle',
|
3243
|
+
colorScheme: 'info'
|
3244
|
+
}
|
3245
|
+
});
|
3246
|
+
|
2804
3247
|
// You can also use the more specific type for
|
2805
3248
|
// a single part component: ComponentSingleStyleConfig
|
2806
|
-
const Button = {
|
3249
|
+
const Button$1 = /*#__PURE__*/styledSystem.defineStyleConfig({
|
2807
3250
|
// The styles all button have in common
|
2808
3251
|
baseStyle: {
|
2809
3252
|
fontSize: 'body.1',
|
2810
3253
|
fontWeight: 'normal',
|
2811
|
-
lineHeight: '1.25',
|
2812
|
-
minW: 24,
|
2813
3254
|
px: 4,
|
2814
|
-
py: 2,
|
3255
|
+
py: 2.5,
|
2815
3256
|
borderRadius: 'md',
|
2816
3257
|
_disabled: {
|
2817
|
-
opacity:
|
3258
|
+
opacity: 1,
|
3259
|
+
bg: 'neutral.300',
|
3260
|
+
color: 'black.low'
|
2818
3261
|
},
|
2819
3262
|
_hover: {
|
2820
3263
|
_disabled: {
|
2821
|
-
|
3264
|
+
bg: 'neutral.300',
|
3265
|
+
color: 'black.low'
|
2822
3266
|
}
|
2823
|
-
},
|
2824
|
-
_active: {
|
2825
|
-
_disabled: {
|
2826
|
-
opacity: 0.3
|
2827
|
-
}
|
2828
|
-
},
|
2829
|
-
_loading: {
|
2830
|
-
opacity: 0.7
|
2831
3267
|
}
|
2832
3268
|
},
|
2833
3269
|
sizes: {
|
2834
|
-
lg: {
|
2835
|
-
|
2836
|
-
|
3270
|
+
lg: props => {
|
3271
|
+
const {
|
3272
|
+
variant
|
3273
|
+
} = props;
|
3274
|
+
const base = {
|
3275
|
+
fontSize: 'text.xl',
|
3276
|
+
h: 12,
|
3277
|
+
px: 4,
|
3278
|
+
py: 2.5
|
3279
|
+
};
|
3280
|
+
const icon = {
|
3281
|
+
h: 10,
|
3282
|
+
w: 10,
|
3283
|
+
p: 0
|
3284
|
+
};
|
3285
|
+
return variant === 'icon' ? icon : base;
|
2837
3286
|
},
|
2838
|
-
md: {
|
2839
|
-
|
2840
|
-
|
3287
|
+
md: props => {
|
3288
|
+
const {
|
3289
|
+
variant
|
3290
|
+
} = props;
|
3291
|
+
const base = {
|
3292
|
+
fontSize: 'text.md',
|
3293
|
+
h: 9,
|
3294
|
+
px: 3,
|
3295
|
+
py: '7px'
|
3296
|
+
};
|
3297
|
+
const icon = {
|
3298
|
+
h: 9,
|
3299
|
+
w: 9,
|
3300
|
+
p: 0
|
3301
|
+
};
|
3302
|
+
return variant === 'icon' ? icon : base;
|
2841
3303
|
},
|
2842
|
-
sm: {
|
2843
|
-
|
2844
|
-
|
3304
|
+
sm: props => {
|
3305
|
+
const {
|
3306
|
+
variant
|
3307
|
+
} = props;
|
3308
|
+
const base = {
|
3309
|
+
fontSize: 'text.xs',
|
3310
|
+
h: 6,
|
3311
|
+
px: 2,
|
3312
|
+
py: '5px'
|
3313
|
+
};
|
3314
|
+
const icon = {
|
3315
|
+
h: 6,
|
3316
|
+
w: 6,
|
3317
|
+
p: 0
|
3318
|
+
};
|
3319
|
+
return variant === 'icon' ? icon : base;
|
2845
3320
|
}
|
2846
3321
|
},
|
2847
|
-
// Two variants: outline and solid
|
2848
3322
|
variants: {
|
2849
|
-
|
2850
|
-
|
2851
|
-
|
3323
|
+
primary: props => {
|
3324
|
+
const {
|
3325
|
+
isLoading
|
3326
|
+
} = props;
|
3327
|
+
const basePrimary = {
|
3328
|
+
color: 'white.high',
|
3329
|
+
bg: 'primary.500',
|
3330
|
+
_hover: {
|
3331
|
+
bg: 'primary.600'
|
3332
|
+
},
|
3333
|
+
_active: {
|
3334
|
+
bg: 'primary.700'
|
3335
|
+
}
|
3336
|
+
};
|
3337
|
+
const disabledLoading = {
|
3338
|
+
_disabled: {
|
3339
|
+
bg: 'primary.500'
|
3340
|
+
},
|
3341
|
+
_hover: {
|
3342
|
+
_disabled: {
|
3343
|
+
bg: 'primary.500'
|
3344
|
+
}
|
3345
|
+
}
|
3346
|
+
};
|
3347
|
+
return isLoading ? disabledLoading : basePrimary;
|
3348
|
+
},
|
3349
|
+
secondary: props => {
|
3350
|
+
const {
|
3351
|
+
isLoading
|
3352
|
+
} = props;
|
3353
|
+
const baseSecondary = {
|
3354
|
+
color: 'primary.500',
|
3355
|
+
borderWidth: 1,
|
3356
|
+
borderStyle: 'inside',
|
3357
|
+
bg: 'white.high',
|
3358
|
+
borderColor: 'primary.500',
|
3359
|
+
_hover: {
|
3360
|
+
bg: 'primary.50'
|
3361
|
+
},
|
3362
|
+
_active: {
|
3363
|
+
bg: 'primary.100'
|
3364
|
+
},
|
3365
|
+
_disabled: {
|
3366
|
+
border: 0
|
3367
|
+
}
|
3368
|
+
};
|
3369
|
+
const disabledLoading = {
|
3370
|
+
...baseSecondary,
|
3371
|
+
_disabled: {
|
3372
|
+
bg: 'white.high'
|
3373
|
+
},
|
3374
|
+
_hover: {
|
3375
|
+
_disabled: {
|
3376
|
+
bg: 'white.high'
|
3377
|
+
}
|
3378
|
+
}
|
3379
|
+
};
|
3380
|
+
return isLoading ? disabledLoading : baseSecondary;
|
3381
|
+
},
|
3382
|
+
tertiary: props => {
|
3383
|
+
const {
|
3384
|
+
isLoading
|
3385
|
+
} = props;
|
3386
|
+
const baseTertiary = {
|
3387
|
+
color: 'primary.500',
|
3388
|
+
_hover: {
|
3389
|
+
bg: 'primary.50'
|
3390
|
+
},
|
3391
|
+
_active: {
|
3392
|
+
bg: 'primary.100'
|
3393
|
+
}
|
3394
|
+
};
|
3395
|
+
const disabledLoading = {
|
3396
|
+
...baseTertiary,
|
3397
|
+
_disabled: {
|
3398
|
+
bg: 'transparent'
|
3399
|
+
},
|
3400
|
+
_hover: {
|
3401
|
+
_disabled: {
|
3402
|
+
bg: 'transparent'
|
3403
|
+
}
|
3404
|
+
}
|
3405
|
+
};
|
3406
|
+
return isLoading ? disabledLoading : baseTertiary;
|
3407
|
+
},
|
3408
|
+
danger: props => {
|
3409
|
+
const {
|
3410
|
+
isLoading
|
3411
|
+
} = props;
|
3412
|
+
const baseDanger = {
|
3413
|
+
bg: 'danger.500',
|
3414
|
+
color: 'white.high',
|
3415
|
+
_hover: {
|
3416
|
+
bg: 'danger.600'
|
3417
|
+
},
|
3418
|
+
_active: {
|
3419
|
+
bg: 'danger.700'
|
3420
|
+
}
|
3421
|
+
};
|
3422
|
+
const disabledLoading = {
|
3423
|
+
...baseDanger,
|
3424
|
+
_disabled: {
|
3425
|
+
bg: 'danger.500'
|
3426
|
+
},
|
3427
|
+
_hover: {
|
3428
|
+
_disabled: {
|
3429
|
+
bg: 'danger.500'
|
3430
|
+
}
|
3431
|
+
}
|
3432
|
+
};
|
3433
|
+
return isLoading ? disabledLoading : baseDanger;
|
3434
|
+
},
|
3435
|
+
'outline-danger': props => {
|
3436
|
+
const {
|
3437
|
+
isLoading
|
3438
|
+
} = props;
|
3439
|
+
const baseSecondary = {
|
3440
|
+
color: 'danger.500',
|
3441
|
+
borderWidth: 1,
|
3442
|
+
borderStyle: 'inside',
|
3443
|
+
bg: 'white.high',
|
3444
|
+
borderColor: 'danger.500',
|
3445
|
+
_hover: {
|
3446
|
+
bg: 'danger.50'
|
3447
|
+
},
|
3448
|
+
_active: {
|
3449
|
+
bg: 'danger.100'
|
3450
|
+
},
|
3451
|
+
_disabled: {
|
3452
|
+
border: 0
|
3453
|
+
}
|
3454
|
+
};
|
3455
|
+
const disabledLoading = {
|
3456
|
+
...baseSecondary,
|
3457
|
+
_disabled: {
|
3458
|
+
bg: 'white.high'
|
3459
|
+
},
|
3460
|
+
_hover: {
|
3461
|
+
_disabled: {
|
3462
|
+
bg: 'white.high'
|
3463
|
+
}
|
3464
|
+
}
|
3465
|
+
};
|
3466
|
+
return isLoading ? disabledLoading : baseSecondary;
|
3467
|
+
},
|
3468
|
+
link: {
|
3469
|
+
bg: 'transparent',
|
3470
|
+
color: 'primary.500',
|
2852
3471
|
_disabled: {
|
2853
|
-
|
3472
|
+
opacity: '1',
|
3473
|
+
bg: 'transparent',
|
3474
|
+
color: 'black.medium'
|
2854
3475
|
},
|
2855
3476
|
_hover: {
|
2856
|
-
|
2857
|
-
|
2858
|
-
|
2859
|
-
|
2860
|
-
},
|
2861
|
-
_focus: {
|
2862
|
-
bg: 'primary.700'
|
3477
|
+
_disabled: {
|
3478
|
+
bg: 'transparent',
|
3479
|
+
color: 'black.medium'
|
3480
|
+
}
|
2863
3481
|
}
|
2864
3482
|
},
|
2865
|
-
|
2866
|
-
|
2867
|
-
|
2868
|
-
|
2869
|
-
|
2870
|
-
borderColor: themeTools.mode('primary.500', 'primary.500')(props),
|
2871
|
-
_hover: {
|
2872
|
-
bg: 'primary.50'
|
2873
|
-
},
|
3483
|
+
icon: {
|
3484
|
+
bg: 'neutral.50',
|
3485
|
+
minW: 0,
|
3486
|
+
borderColor: 'neutral.200',
|
3487
|
+
borderWidth: '1px',
|
2874
3488
|
_active: {
|
2875
|
-
bg: '
|
3489
|
+
bg: 'neutral.500',
|
3490
|
+
borderColor: 'neutral.50'
|
2876
3491
|
},
|
2877
|
-
_focus: {
|
2878
|
-
bg: 'primary.100'
|
2879
|
-
}
|
2880
|
-
}),
|
2881
|
-
'outline-danger': {
|
2882
|
-
color: 'danger.500',
|
2883
|
-
bg: 'white',
|
2884
|
-
borderStyle: 'inside',
|
2885
|
-
borderWidth: 1,
|
2886
|
-
borderColor: 'danger.500'
|
2887
|
-
},
|
2888
|
-
ghost: {
|
2889
|
-
color: 'primary.500',
|
2890
3492
|
_disabled: {
|
2891
|
-
bg: '
|
3493
|
+
bg: 'neutral.500',
|
3494
|
+
opacity: 0.3,
|
3495
|
+
borderColor: 'neutral.50'
|
3496
|
+
},
|
3497
|
+
_hover: {
|
3498
|
+
bg: 'neutral.400',
|
3499
|
+
_disabled: {
|
3500
|
+
bg: 'neutral.500',
|
3501
|
+
opacity: 0.3,
|
3502
|
+
borderColor: 'neutral.50'
|
3503
|
+
}
|
2892
3504
|
}
|
2893
|
-
},
|
2894
|
-
link: {
|
2895
|
-
bg: 'transparent',
|
2896
|
-
color: 'primary.500'
|
2897
3505
|
}
|
2898
3506
|
},
|
2899
|
-
// The default size and variant values
|
2900
3507
|
defaultProps: {
|
2901
3508
|
size: 'md',
|
2902
|
-
variant: '
|
2903
|
-
orientation: 'vertical',
|
3509
|
+
variant: 'primary',
|
2904
3510
|
colorScheme: 'primary'
|
2905
3511
|
}
|
2906
|
-
};
|
3512
|
+
});
|
3513
|
+
|
3514
|
+
const CardStyle = /*#__PURE__*/styledSystem.defineStyleConfig({
|
3515
|
+
baseStyle: props => {
|
3516
|
+
return {
|
3517
|
+
shadow: props.withShadow ? 'raised' : 'none',
|
3518
|
+
borderRadius: props.isRounded ? 'lg' : 'none'
|
3519
|
+
};
|
3520
|
+
}
|
3521
|
+
});
|
2907
3522
|
|
2908
3523
|
const {
|
2909
|
-
definePartsStyle,
|
2910
|
-
defineMultiStyleConfig
|
3524
|
+
definePartsStyle: definePartsStyle$1,
|
3525
|
+
defineMultiStyleConfig: defineMultiStyleConfig$1
|
2911
3526
|
} = /*#__PURE__*/react.createMultiStyleConfigHelpers(anatomy.checkboxAnatomy.keys);
|
2912
|
-
const baseStyle = /*#__PURE__*/definePartsStyle({
|
3527
|
+
const baseStyle$1 = /*#__PURE__*/definePartsStyle$1({
|
2913
3528
|
control: {
|
2914
3529
|
borderRadius: '4px',
|
2915
3530
|
width: '16px',
|
@@ -2933,7 +3548,7 @@ const baseStyle = /*#__PURE__*/definePartsStyle({
|
|
2933
3548
|
cursor: 'not-allowed'
|
2934
3549
|
}
|
2935
3550
|
});
|
2936
|
-
const errors = /*#__PURE__*/definePartsStyle({
|
3551
|
+
const errors = /*#__PURE__*/definePartsStyle$1({
|
2937
3552
|
control: {
|
2938
3553
|
borderColor: 'danger.500',
|
2939
3554
|
_checked: {
|
@@ -2953,7 +3568,7 @@ const errors = /*#__PURE__*/definePartsStyle({
|
|
2953
3568
|
fontSize: '12px'
|
2954
3569
|
}
|
2955
3570
|
});
|
2956
|
-
const unstyled = /*#__PURE__*/definePartsStyle({
|
3571
|
+
const unstyled = /*#__PURE__*/definePartsStyle$1({
|
2957
3572
|
control: {
|
2958
3573
|
borderColor: 'neutral.500',
|
2959
3574
|
_checked: {
|
@@ -2969,7 +3584,8 @@ const unstyled = /*#__PURE__*/definePartsStyle({
|
|
2969
3584
|
}
|
2970
3585
|
},
|
2971
3586
|
_disabled: {
|
2972
|
-
backgroundColor: 'neutral.500'
|
3587
|
+
backgroundColor: 'neutral.500',
|
3588
|
+
borderColor: 'neutral.500'
|
2973
3589
|
},
|
2974
3590
|
_indeterminate: {
|
2975
3591
|
borderColor: 'primary.500',
|
@@ -2980,48 +3596,109 @@ const unstyled = /*#__PURE__*/definePartsStyle({
|
|
2980
3596
|
fontSize: '12px'
|
2981
3597
|
}
|
2982
3598
|
});
|
2983
|
-
const variants = {
|
3599
|
+
const variants$1 = {
|
2984
3600
|
errors,
|
2985
3601
|
unstyled
|
2986
3602
|
};
|
2987
|
-
const Checkbox = /*#__PURE__*/defineMultiStyleConfig({
|
2988
|
-
baseStyle,
|
2989
|
-
variants,
|
3603
|
+
const Checkbox = /*#__PURE__*/defineMultiStyleConfig$1({
|
3604
|
+
baseStyle: baseStyle$1,
|
3605
|
+
variants: variants$1,
|
2990
3606
|
defaultProps: {
|
2991
|
-
variant: '
|
3607
|
+
variant: 'unstyled'
|
2992
3608
|
}
|
2993
3609
|
});
|
2994
3610
|
|
2995
|
-
const
|
3611
|
+
const Chips = /*#__PURE__*/styledSystem.defineStyleConfig({
|
3612
|
+
baseStyle: props => {
|
3613
|
+
const {
|
3614
|
+
isDisabled,
|
3615
|
+
isActive
|
3616
|
+
} = props;
|
3617
|
+
const defaultProps = {
|
3618
|
+
color: 'primary.500',
|
3619
|
+
fontSize: 'text.small',
|
3620
|
+
borderRadius: '24px',
|
3621
|
+
borderWidth: '1px',
|
3622
|
+
borderColor: 'primary.500',
|
3623
|
+
bg: 'white.high',
|
3624
|
+
paddingX: 3,
|
3625
|
+
paddingY: 1,
|
3626
|
+
cursor: 'default'
|
3627
|
+
};
|
3628
|
+
let chipsProps = {
|
3629
|
+
...defaultProps
|
3630
|
+
};
|
3631
|
+
if (isActive) {
|
3632
|
+
const isActiveProps = {
|
3633
|
+
bg: 'primary.500',
|
3634
|
+
color: 'white.high'
|
3635
|
+
};
|
3636
|
+
chipsProps = {
|
3637
|
+
...chipsProps,
|
3638
|
+
...isActiveProps
|
3639
|
+
};
|
3640
|
+
}
|
3641
|
+
if (isDisabled) {
|
3642
|
+
const isDisabledProps = {
|
3643
|
+
bg: 'neutral.200',
|
3644
|
+
color: 'black.low',
|
3645
|
+
borderColor: 'neutral.200',
|
3646
|
+
cursor: 'not-allowed'
|
3647
|
+
};
|
3648
|
+
chipsProps = {
|
3649
|
+
...chipsProps,
|
3650
|
+
...isDisabledProps
|
3651
|
+
};
|
3652
|
+
}
|
3653
|
+
return {
|
3654
|
+
...chipsProps
|
3655
|
+
};
|
3656
|
+
},
|
3657
|
+
sizes: {
|
3658
|
+
sm: {
|
3659
|
+
fontSize: '12px'
|
3660
|
+
},
|
3661
|
+
md: {
|
3662
|
+
fontSize: '14px'
|
3663
|
+
}
|
3664
|
+
},
|
3665
|
+
defaultProps: {
|
3666
|
+
size: 'sm'
|
3667
|
+
}
|
3668
|
+
});
|
3669
|
+
|
3670
|
+
const baseStyle$2 = /*#__PURE__*/styledSystem.defineStyle({
|
2996
3671
|
fontSize: 'field.sm',
|
2997
3672
|
marginEnd: 1,
|
2998
3673
|
mb: 1
|
2999
3674
|
});
|
3000
3675
|
const FormLabel = /*#__PURE__*/styledSystem.defineStyleConfig({
|
3001
|
-
baseStyle: baseStyle$
|
3676
|
+
baseStyle: baseStyle$2
|
3002
3677
|
});
|
3003
3678
|
|
3004
3679
|
const {
|
3005
|
-
definePartsStyle: definePartsStyle$
|
3006
|
-
defineMultiStyleConfig: defineMultiStyleConfig$
|
3680
|
+
definePartsStyle: definePartsStyle$2,
|
3681
|
+
defineMultiStyleConfig: defineMultiStyleConfig$2
|
3007
3682
|
} = /*#__PURE__*/styledSystem.createMultiStyleConfigHelpers(anatomy.inputAnatomy.keys);
|
3008
|
-
const baseStyle$
|
3683
|
+
const baseStyle$3 = /*#__PURE__*/definePartsStyle$2({
|
3009
3684
|
field: {
|
3010
3685
|
width: '100%',
|
3011
3686
|
minWidth: 0,
|
3012
3687
|
outline: 0,
|
3013
|
-
px: 2
|
3014
|
-
py: 2,
|
3688
|
+
px: 2,
|
3689
|
+
py: 2.5,
|
3690
|
+
paddingInlineStart: 2,
|
3691
|
+
paddingInlineEnd: 2,
|
3015
3692
|
position: 'relative',
|
3016
3693
|
appearance: 'none',
|
3017
|
-
transitionProperty: 'common',
|
3018
|
-
transitionDuration: 'normal',
|
3019
3694
|
color: 'black.high',
|
3020
3695
|
_disabled: {
|
3021
3696
|
bg: 'neutral.300',
|
3022
|
-
border:
|
3023
|
-
|
3024
|
-
|
3697
|
+
border: 0,
|
3698
|
+
cursor: 'not-allowed',
|
3699
|
+
opacity: 1,
|
3700
|
+
boxShadow: 'none',
|
3701
|
+
color: 'black.medium'
|
3025
3702
|
},
|
3026
3703
|
_placeholder: {
|
3027
3704
|
color: 'black.low'
|
@@ -3030,88 +3707,54 @@ const baseStyle$2 = /*#__PURE__*/definePartsStyle$1({
|
|
3030
3707
|
});
|
3031
3708
|
const size = {
|
3032
3709
|
lg: /*#__PURE__*/styledSystem.defineStyle({
|
3033
|
-
fontSize: '
|
3710
|
+
fontSize: 'text.lg',
|
3034
3711
|
h: 12,
|
3035
3712
|
borderRadius: 'md'
|
3036
3713
|
}),
|
3037
3714
|
md: /*#__PURE__*/styledSystem.defineStyle({
|
3038
|
-
fontSize: '
|
3715
|
+
fontSize: 'text.md',
|
3039
3716
|
h: 10,
|
3040
3717
|
borderRadius: 'md'
|
3041
3718
|
}),
|
3042
3719
|
sm: /*#__PURE__*/styledSystem.defineStyle({
|
3043
|
-
fontSize: '
|
3720
|
+
fontSize: 'text.sm',
|
3044
3721
|
h: 9.5,
|
3045
3722
|
borderRadius: 'md'
|
3046
3723
|
})
|
3047
3724
|
};
|
3048
3725
|
const sizes$1 = {
|
3049
|
-
lg: /*#__PURE__*/definePartsStyle$
|
3726
|
+
lg: /*#__PURE__*/definePartsStyle$2({
|
3050
3727
|
field: size.lg,
|
3051
3728
|
addon: size.lg
|
3052
3729
|
}),
|
3053
|
-
md: /*#__PURE__*/definePartsStyle$
|
3730
|
+
md: /*#__PURE__*/definePartsStyle$2({
|
3054
3731
|
field: size.md,
|
3055
3732
|
addon: size.md
|
3056
3733
|
}),
|
3057
|
-
sm: /*#__PURE__*/definePartsStyle$
|
3734
|
+
sm: /*#__PURE__*/definePartsStyle$2({
|
3058
3735
|
field: size.sm,
|
3059
3736
|
addon: size.sm
|
3060
3737
|
})
|
3061
3738
|
};
|
3062
|
-
|
3063
|
-
const {
|
3064
|
-
|
3065
|
-
|
3066
|
-
|
3067
|
-
|
3068
|
-
|
3069
|
-
|
3070
|
-
errorBorderColor: errorBorderColor || themeTools.mode('danger.500', 'danger.300')(props),
|
3071
|
-
readOnlyBorderColor: readOnlyBorderColor || themeTools.mode('.500', 'danger.300')(props)
|
3072
|
-
};
|
3073
|
-
}
|
3074
|
-
const outline = /*#__PURE__*/definePartsStyle$1(props => {
|
3075
|
-
const {
|
3076
|
-
theme
|
3077
|
-
} = props;
|
3078
|
-
const {
|
3079
|
-
focusBorderColor: fc,
|
3080
|
-
errorBorderColor: ec,
|
3081
|
-
readOnlyBorderColor: rc
|
3082
|
-
} = getDefaults(props);
|
3083
|
-
return {
|
3084
|
-
field: {
|
3085
|
-
border: '1px solid',
|
3086
|
-
borderColor: themeTools.mode('dark.200', 'inherit')(props),
|
3087
|
-
bg: themeTools.mode('white', 'inherit')(props),
|
3088
|
-
color: themeTools.mode('inherit', 'white')(props),
|
3089
|
-
_hover: {
|
3090
|
-
borderColor: themeTools.mode('gray.300', 'whiteAlpha.400')(props)
|
3091
|
-
},
|
3092
|
-
_readOnly: {
|
3093
|
-
userSelect: 'all',
|
3094
|
-
borderColor: themeTools.getColor(theme, rc),
|
3095
|
-
boxShadow: `0 0 0 0 ${themeTools.getColor(theme, rc)}`
|
3096
|
-
},
|
3097
|
-
_invalid: {
|
3098
|
-
borderColor: themeTools.getColor(theme, ec),
|
3099
|
-
boxShadow: `0 0 0 0 ${themeTools.getColor(theme, ec)}`
|
3100
|
-
},
|
3101
|
-
_focusVisible: {
|
3102
|
-
zIndex: 1,
|
3103
|
-
borderColor: themeTools.getColor(theme, fc),
|
3104
|
-
boxShadow: `0 0 0 0 ${themeTools.getColor(theme, fc)}`
|
3105
|
-
}
|
3739
|
+
const outline = /*#__PURE__*/definePartsStyle$2(props => {
|
3740
|
+
const field = {
|
3741
|
+
border: 0,
|
3742
|
+
outline: 0,
|
3743
|
+
bg: themeTools.mode('white', 'inherit')(props),
|
3744
|
+
color: themeTools.mode('inherit', 'white')(props),
|
3745
|
+
_invalid: {
|
3746
|
+
boxShadow: 'none'
|
3106
3747
|
},
|
3107
|
-
|
3108
|
-
|
3109
|
-
|
3110
|
-
bg: themeTools.mode('gray.100', 'whiteAlpha.300')(props)
|
3748
|
+
_focusVisible: {
|
3749
|
+
zIndex: 1,
|
3750
|
+
boxShadow: 'none'
|
3111
3751
|
}
|
3112
3752
|
};
|
3753
|
+
return {
|
3754
|
+
field
|
3755
|
+
};
|
3113
3756
|
});
|
3114
|
-
const unstyled$1 = /*#__PURE__*/definePartsStyle$
|
3757
|
+
const unstyled$1 = /*#__PURE__*/definePartsStyle$2({
|
3115
3758
|
field: {
|
3116
3759
|
bg: 'transparent',
|
3117
3760
|
px: '0',
|
@@ -3123,14 +3766,14 @@ const unstyled$1 = /*#__PURE__*/definePartsStyle$1({
|
|
3123
3766
|
height: 'auto'
|
3124
3767
|
}
|
3125
3768
|
});
|
3126
|
-
const variants$
|
3769
|
+
const variants$2 = {
|
3127
3770
|
outline,
|
3128
3771
|
unstyled: unstyled$1
|
3129
3772
|
};
|
3130
|
-
const Input = /*#__PURE__*/defineMultiStyleConfig$
|
3131
|
-
baseStyle: baseStyle$
|
3773
|
+
const Input = /*#__PURE__*/defineMultiStyleConfig$2({
|
3774
|
+
baseStyle: baseStyle$3,
|
3132
3775
|
sizes: sizes$1,
|
3133
|
-
variants: variants$
|
3776
|
+
variants: variants$2,
|
3134
3777
|
defaultProps: {
|
3135
3778
|
size: 'sm',
|
3136
3779
|
variant: 'outline'
|
@@ -3145,16 +3788,21 @@ const rotate = /*#__PURE__*/react$1.keyframes({
|
|
3145
3788
|
transform: 'rotate(360deg)'
|
3146
3789
|
}
|
3147
3790
|
});
|
3791
|
+
const getLoaderColor = color => {
|
3792
|
+
if (color === 'primary') return colors.primary[600];
|
3793
|
+
if (color === 'danger') return colors.danger[500];
|
3794
|
+
return colors.white.high;
|
3795
|
+
};
|
3148
3796
|
const LoaderStyle = /*#__PURE__*/styledSystem.defineStyleConfig({
|
3149
3797
|
baseStyle: props => {
|
3150
|
-
const colors
|
3798
|
+
const colors = getLoaderColor(props.color);
|
3151
3799
|
return {
|
3152
3800
|
borderRadius: '50%',
|
3153
3801
|
display: 'flex',
|
3154
3802
|
justifyContent: 'center',
|
3155
3803
|
alignItems: 'center',
|
3156
3804
|
animation: `${rotate} 1s linear infinite`,
|
3157
|
-
background: `conic-gradient(from 180deg at 50% 50%, ${colors
|
3805
|
+
background: `conic-gradient(from 180deg at 50% 50%, ${colors} 0deg, rgba(217, 217, 217, 0) 360deg);`,
|
3158
3806
|
':before': {
|
3159
3807
|
content: `''`,
|
3160
3808
|
display: 'block',
|
@@ -3163,7 +3811,7 @@ const LoaderStyle = /*#__PURE__*/styledSystem.defineStyleConfig({
|
|
3163
3811
|
height: '6px',
|
3164
3812
|
position: 'absolute',
|
3165
3813
|
bottom: 0,
|
3166
|
-
background: colors
|
3814
|
+
background: colors
|
3167
3815
|
}
|
3168
3816
|
};
|
3169
3817
|
},
|
@@ -3229,10 +3877,10 @@ const LoaderStyle = /*#__PURE__*/styledSystem.defineStyleConfig({
|
|
3229
3877
|
});
|
3230
3878
|
|
3231
3879
|
const {
|
3232
|
-
definePartsStyle: definePartsStyle$
|
3880
|
+
definePartsStyle: definePartsStyle$3
|
3233
3881
|
} = /*#__PURE__*/styledSystem.createMultiStyleConfigHelpers(anatomy.popoverAnatomy.keys);
|
3234
3882
|
const Popover = {
|
3235
|
-
baseStyle: props => definePartsStyle$
|
3883
|
+
baseStyle: props => definePartsStyle$3({
|
3236
3884
|
popper: {
|
3237
3885
|
background: themeTools.mode('white', 'inherit')(props)
|
3238
3886
|
}
|
@@ -3240,93 +3888,175 @@ const Popover = {
|
|
3240
3888
|
};
|
3241
3889
|
|
3242
3890
|
const {
|
3243
|
-
definePartsStyle: definePartsStyle$
|
3244
|
-
|
3245
|
-
|
3246
|
-
|
3247
|
-
|
3248
|
-
|
3249
|
-
|
3250
|
-
|
3251
|
-
|
3252
|
-
|
3891
|
+
definePartsStyle: definePartsStyle$4,
|
3892
|
+
defineMultiStyleConfig: defineMultiStyleConfig$3
|
3893
|
+
} = /*#__PURE__*/react.createMultiStyleConfigHelpers(anatomy.radioAnatomy.keys);
|
3894
|
+
const baseStyle$4 = /*#__PURE__*/definePartsStyle$4({
|
3895
|
+
control: {
|
3896
|
+
border: '1px solid',
|
3897
|
+
width: '16px',
|
3898
|
+
height: '16px'
|
3899
|
+
},
|
3900
|
+
label: {
|
3901
|
+
marginLeft: '8px',
|
3902
|
+
textStyle: 'text.sm',
|
3903
|
+
color: 'black.high',
|
3904
|
+
_disabled: {
|
3905
|
+
color: 'black.low'
|
3906
|
+
}
|
3907
|
+
}
|
3908
|
+
});
|
3909
|
+
const errors$1 = /*#__PURE__*/definePartsStyle$4({
|
3910
|
+
control: {
|
3911
|
+
borderColor: 'danger.500',
|
3912
|
+
_checked: {
|
3913
|
+
borderColor: 'danger.500',
|
3914
|
+
bg: 'white',
|
3915
|
+
_before: {
|
3916
|
+
h: '10px',
|
3917
|
+
w: '10px',
|
3918
|
+
bg: 'danger.500'
|
3919
|
+
},
|
3920
|
+
_hover: {
|
3921
|
+
borderColor: 'danger.500',
|
3922
|
+
bg: 'gray.200'
|
3923
|
+
},
|
3924
|
+
_disabled: {
|
3925
|
+
borderColor: 'danger.500',
|
3253
3926
|
bg: 'white',
|
3254
3927
|
_before: {
|
3255
|
-
h: '
|
3256
|
-
w: '
|
3257
|
-
bg: '
|
3258
|
-
},
|
3259
|
-
_hover: {
|
3260
|
-
borderColor: 'primary.500',
|
3261
|
-
bg: 'gray.200'
|
3928
|
+
h: '10px',
|
3929
|
+
w: '10px',
|
3930
|
+
bg: 'neutral.500'
|
3262
3931
|
}
|
3263
3932
|
}
|
3933
|
+
},
|
3934
|
+
_disabled: {
|
3935
|
+
borderColor: 'danger.500',
|
3936
|
+
bg: 'neutral.500'
|
3264
3937
|
}
|
3265
|
-
}
|
3266
|
-
|
3267
|
-
|
3268
|
-
|
3269
|
-
|
3270
|
-
|
3271
|
-
|
3272
|
-
|
3273
|
-
|
3274
|
-
|
3275
|
-
|
3276
|
-
|
3277
|
-
|
3278
|
-
|
3279
|
-
|
3280
|
-
h: '4'
|
3938
|
+
},
|
3939
|
+
label: {
|
3940
|
+
fontSize: '12px'
|
3941
|
+
}
|
3942
|
+
});
|
3943
|
+
const unstyled$2 = /*#__PURE__*/definePartsStyle$4({
|
3944
|
+
control: {
|
3945
|
+
borderColor: 'neutral.600',
|
3946
|
+
_checked: {
|
3947
|
+
borderColor: 'primary.500',
|
3948
|
+
bg: 'white',
|
3949
|
+
_before: {
|
3950
|
+
h: '10px',
|
3951
|
+
w: '10px',
|
3952
|
+
bg: 'primary.500'
|
3281
3953
|
},
|
3282
|
-
|
3283
|
-
|
3284
|
-
|
3285
|
-
}),
|
3286
|
-
lg: /*#__PURE__*/definePartsStyle$3({
|
3287
|
-
control: {
|
3288
|
-
w: '5',
|
3289
|
-
h: '5'
|
3954
|
+
_hover: {
|
3955
|
+
borderColor: 'primary.500',
|
3956
|
+
bg: 'gray.200'
|
3290
3957
|
},
|
3291
|
-
|
3292
|
-
|
3958
|
+
_disabled: {
|
3959
|
+
borderColor: 'neutral.500',
|
3960
|
+
bg: 'white',
|
3961
|
+
_before: {
|
3962
|
+
h: '10px',
|
3963
|
+
w: '10px',
|
3964
|
+
bg: 'neutral.500'
|
3965
|
+
}
|
3293
3966
|
}
|
3294
|
-
}
|
3967
|
+
},
|
3968
|
+
_disabled: {
|
3969
|
+
borderColor: 'neutral.500',
|
3970
|
+
bg: 'neutral.500'
|
3971
|
+
}
|
3295
3972
|
},
|
3296
|
-
|
3297
|
-
|
3298
|
-
// The default size and variant values
|
3299
|
-
defaultProps: {
|
3300
|
-
size: 'sm',
|
3301
|
-
variant: 'solid',
|
3302
|
-
orientation: 'vertical',
|
3303
|
-
colorScheme: 'primary'
|
3973
|
+
label: {
|
3974
|
+
fontSize: '12px'
|
3304
3975
|
}
|
3976
|
+
});
|
3977
|
+
const variants$3 = {
|
3978
|
+
errors: errors$1,
|
3979
|
+
unstyled: unstyled$2
|
3305
3980
|
};
|
3981
|
+
const Radio = /*#__PURE__*/defineMultiStyleConfig$3({
|
3982
|
+
baseStyle: baseStyle$4,
|
3983
|
+
variants: variants$3,
|
3984
|
+
defaultProps: {
|
3985
|
+
variant: 'unstyled'
|
3986
|
+
}
|
3987
|
+
});
|
3306
3988
|
|
3307
3989
|
const {
|
3308
|
-
|
3309
|
-
|
3310
|
-
} = /*#__PURE__*/
|
3311
|
-
const
|
3312
|
-
|
3990
|
+
defineMultiStyleConfig: defineMultiStyleConfig$4,
|
3991
|
+
definePartsStyle: definePartsStyle$5
|
3992
|
+
} = /*#__PURE__*/styledSystem.createMultiStyleConfigHelpers(anatomy.switchAnatomy.keys);
|
3993
|
+
const $width = /*#__PURE__*/themeTools.cssVar('switch-track-width');
|
3994
|
+
const $height = /*#__PURE__*/themeTools.cssVar('switch-track-height');
|
3995
|
+
const $diff = /*#__PURE__*/themeTools.cssVar('switch-track-diff');
|
3996
|
+
const diffValue = /*#__PURE__*/themeTools.calc.subtract($width, $height);
|
3997
|
+
const $translateX = /*#__PURE__*/themeTools.cssVar('switch-thumb-x');
|
3998
|
+
const baseStyleThumb = /*#__PURE__*/styledSystem.defineStyle({
|
3999
|
+
bg: 'white',
|
4000
|
+
transitionProperty: 'transform',
|
4001
|
+
transitionDuration: 'normal',
|
4002
|
+
borderRadius: 'inherit',
|
4003
|
+
width: [$height.reference],
|
4004
|
+
height: [$height.reference],
|
4005
|
+
_checked: {
|
4006
|
+
transform: `translateX(${$translateX.reference})`
|
4007
|
+
}
|
4008
|
+
});
|
4009
|
+
const baseStyle$5 = /*#__PURE__*/definePartsStyle$5(() => ({
|
3313
4010
|
container: {
|
3314
|
-
|
3315
|
-
|
3316
|
-
|
3317
|
-
|
4011
|
+
[$diff.variable]: diffValue,
|
4012
|
+
[$translateX.variable]: $diff.reference,
|
4013
|
+
_rtl: {
|
4014
|
+
[$translateX.variable]: themeTools.calc($diff).negate().toString()
|
4015
|
+
}
|
3318
4016
|
},
|
3319
4017
|
track: {
|
3320
4018
|
bg: 'neutral.400',
|
3321
4019
|
p: 1,
|
3322
4020
|
_checked: {
|
3323
|
-
bg: 'primary.500'
|
4021
|
+
bg: 'primary.500',
|
4022
|
+
_disabled: {
|
4023
|
+
bg: 'neutral.600'
|
4024
|
+
}
|
4025
|
+
},
|
4026
|
+
_disabled: {
|
4027
|
+
bg: 'neutral.500',
|
4028
|
+
opacity: '100%'
|
3324
4029
|
}
|
4030
|
+
},
|
4031
|
+
thumb: baseStyleThumb
|
4032
|
+
}));
|
4033
|
+
const sizes$2 = {
|
4034
|
+
sm: /*#__PURE__*/definePartsStyle$5({
|
4035
|
+
container: {
|
4036
|
+
[$width.variable]: '2.125rem',
|
4037
|
+
[$height.variable]: '1.063rem'
|
4038
|
+
}
|
4039
|
+
}),
|
4040
|
+
md: /*#__PURE__*/definePartsStyle$5({
|
4041
|
+
container: {
|
4042
|
+
[$width.variable]: '2.875rem',
|
4043
|
+
[$height.variable]: '1.5rem'
|
4044
|
+
}
|
4045
|
+
}),
|
4046
|
+
lg: /*#__PURE__*/definePartsStyle$5({
|
4047
|
+
container: {
|
4048
|
+
[$width.variable]: '3.625rem',
|
4049
|
+
[$height.variable]: '1.813rem'
|
4050
|
+
}
|
4051
|
+
})
|
4052
|
+
};
|
4053
|
+
const Switch$1 = /*#__PURE__*/defineMultiStyleConfig$4({
|
4054
|
+
baseStyle: baseStyle$5,
|
4055
|
+
sizes: sizes$2,
|
4056
|
+
defaultProps: {
|
4057
|
+
size: 'md'
|
3325
4058
|
}
|
3326
4059
|
});
|
3327
|
-
const Switch = /*#__PURE__*/defineMultiStyleConfig$2({
|
3328
|
-
baseStyle: baseStyle$3
|
3329
|
-
});
|
3330
4060
|
|
3331
4061
|
const getProps = props => {
|
3332
4062
|
const {
|
@@ -3367,7 +4097,7 @@ const outline$1 = /*#__PURE__*/react.defineStyle(props => {
|
|
3367
4097
|
outline: 'none',
|
3368
4098
|
_disabled: {
|
3369
4099
|
opacity: 1,
|
3370
|
-
color: 'black.
|
4100
|
+
color: 'black.medium',
|
3371
4101
|
background: 'neutral.300'
|
3372
4102
|
},
|
3373
4103
|
_placeholder: {
|
@@ -3411,14 +4141,17 @@ const Textarea = /*#__PURE__*/react.defineStyleConfig({
|
|
3411
4141
|
|
3412
4142
|
var components = {
|
3413
4143
|
__proto__: null,
|
3414
|
-
|
4144
|
+
Alert: alertTheme,
|
4145
|
+
Button: Button$1,
|
4146
|
+
Card: CardStyle,
|
3415
4147
|
Checkbox: Checkbox,
|
4148
|
+
Chips: Chips,
|
3416
4149
|
FormLabel: FormLabel,
|
3417
4150
|
Input: Input,
|
3418
4151
|
LoaderStyle: LoaderStyle,
|
3419
4152
|
Popover: Popover,
|
3420
4153
|
Radio: Radio,
|
3421
|
-
Switch: Switch,
|
4154
|
+
Switch: Switch$1,
|
3422
4155
|
Textarea: Textarea
|
3423
4156
|
};
|
3424
4157
|
|
@@ -3714,12 +4447,19 @@ Object.defineProperty(exports, 'useTabsStyles', {
|
|
3714
4447
|
return react.useTabsStyles;
|
3715
4448
|
}
|
3716
4449
|
});
|
4450
|
+
exports.Box = react.Box;
|
3717
4451
|
exports.BreadCrumb = BreadCrumb;
|
4452
|
+
exports.Button = Button;
|
4453
|
+
exports.Card = CardCustom;
|
3718
4454
|
exports.Checkbox = CheckboxComponent;
|
4455
|
+
exports.CheckboxGroup = CheckboxGroupComponent;
|
4456
|
+
exports.Container = react.Container;
|
3719
4457
|
exports.DataTable = DataTable;
|
3720
4458
|
exports.DatePickerMonth = DatePickerMonth;
|
3721
4459
|
exports.Datepicker = Datepicker;
|
3722
4460
|
exports.Field = Field;
|
4461
|
+
exports.Flex = react.Flex;
|
4462
|
+
exports.Grid = react.Grid;
|
3723
4463
|
exports.Header = Header;
|
3724
4464
|
exports.InputField = InputField;
|
3725
4465
|
exports.Loader = Loader;
|
@@ -3734,15 +4474,22 @@ exports.PaginationDetail = PaginationDetail;
|
|
3734
4474
|
exports.PaginationFilter = PaginationFilter;
|
3735
4475
|
exports.Provider = Provider;
|
3736
4476
|
exports.ProviderContext = ProviderContext;
|
4477
|
+
exports.Radio = RadioComponent;
|
4478
|
+
exports.RadioGroup = RadioGroupComponent;
|
3737
4479
|
exports.Select = Select;
|
3738
4480
|
exports.SelectAsync = SelectAsync;
|
3739
4481
|
exports.SelectAsyncCreatable = SelectAsyncCreatable;
|
3740
4482
|
exports.SelectCreatable = SelectCreatable;
|
4483
|
+
exports.Stack = react.Stack;
|
4484
|
+
exports.Switch = Switch;
|
3741
4485
|
exports.Tab = Tab;
|
3742
4486
|
exports.TabList = TabList;
|
3743
4487
|
exports.TabPanel = TabPanel;
|
4488
|
+
exports.Text = react.Text;
|
3744
4489
|
exports.TextareaField = TextareaField;
|
3745
4490
|
exports.Uploader = Uploader;
|
4491
|
+
exports.Wrap = react.Wrap;
|
4492
|
+
exports.foundations = foundations;
|
3746
4493
|
exports.theme = theme;
|
3747
4494
|
exports.useInternalUI = useInternalUI;
|
3748
4495
|
//# sourceMappingURL=internal-ui.cjs.development.js.map
|