@ctlyst.id/internal-ui 2.1.5 → 2.1.7
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/accordion/__stories__/accordion.stories.d.ts +9 -0
- package/dist/components/accordion/components/accordion-indicator.d.ts +1 -0
- package/dist/components/accordion/components/index.d.ts +2 -0
- package/dist/components/accordion/index.d.ts +1 -0
- package/dist/components/badge/__stories__/badge.stories.d.ts +8 -0
- package/dist/components/header/components/header.d.ts +1 -0
- package/dist/components/header/components/profile.d.ts +1 -0
- package/dist/components/toast/__stories__/toast.stories.d.ts +13 -0
- package/dist/components/toast/components/toast.d.ts +19 -0
- package/dist/components/toast/index.d.ts +1 -0
- package/dist/config/__stories__/globals.stories.d.ts +10 -0
- package/dist/config/theme/components/accordion.d.ts +53 -0
- package/dist/config/theme/components/alert.d.ts +2 -2
- package/dist/config/theme/components/index.d.ts +1 -0
- package/dist/config/theme/components/switch.d.ts +9 -0
- package/dist/internal-ui.cjs.development.js +220 -128
- package/dist/internal-ui.cjs.development.js.map +1 -1
- package/dist/internal-ui.cjs.production.min.js +5 -5
- package/dist/internal-ui.cjs.production.min.js.map +1 -1
- package/dist/internal-ui.esm.js +222 -130
- package/dist/internal-ui.esm.js.map +1 -1
- package/dist/provider/__stories__/provider.stories.d.ts +3 -0
- package/package.json +6 -4
@@ -28,6 +28,7 @@ var anatomy = require('@chakra-ui/anatomy');
|
|
28
28
|
var styledSystem = require('@chakra-ui/styled-system');
|
29
29
|
var themeTools = require('@chakra-ui/theme-tools');
|
30
30
|
var axios = _interopDefault(require('axios'));
|
31
|
+
var reactToastify = require('react-toastify');
|
31
32
|
|
32
33
|
/* eslint-disable react/require-default-props */
|
33
34
|
function CheckIcon() {
|
@@ -141,6 +142,9 @@ const Loader = /*#__PURE__*/react.forwardRef((props, ref) => {
|
|
141
142
|
__css: styles
|
142
143
|
});
|
143
144
|
});
|
145
|
+
Loader.defaultProps = {
|
146
|
+
size: 'md'
|
147
|
+
};
|
144
148
|
|
145
149
|
const Button = /*#__PURE__*/react.forwardRef((props, ref) => {
|
146
150
|
const {
|
@@ -269,9 +273,6 @@ const Badge = props => {
|
|
269
273
|
} = props;
|
270
274
|
return /*#__PURE__*/React__default.createElement(react.Badge, Object.assign({
|
271
275
|
borderRadius: pill ? 'xl' : 'sm',
|
272
|
-
variant: "primary-solid",
|
273
|
-
px: "2",
|
274
|
-
h: "4.5",
|
275
276
|
display: "inline-flex",
|
276
277
|
alignItems: "center",
|
277
278
|
justifyContent: "space-between",
|
@@ -1685,7 +1686,13 @@ const Datepicker = ({
|
|
1685
1686
|
"data-test-id": "bcpJJyCP0z_RIAGZXDU6s",
|
1686
1687
|
onClick: onClear,
|
1687
1688
|
cursor: "pointer"
|
1688
|
-
}))), !isError ? /*#__PURE__*/React__default.createElement(react.FormHelperText,
|
1689
|
+
}))), !isError ? /*#__PURE__*/React__default.createElement(react.FormHelperText, {
|
1690
|
+
fontSize: "text.xs",
|
1691
|
+
mt: 1
|
1692
|
+
}, helperText) : /*#__PURE__*/React__default.createElement(react.FormErrorMessage, {
|
1693
|
+
fontSize: "text.xs",
|
1694
|
+
mt: 1
|
1695
|
+
}, error));
|
1689
1696
|
};
|
1690
1697
|
Datepicker.defaultProps = {
|
1691
1698
|
id: undefined,
|
@@ -1984,6 +1991,7 @@ Logo.defaultProps = {
|
|
1984
1991
|
};
|
1985
1992
|
|
1986
1993
|
const Profile = ({
|
1994
|
+
color,
|
1987
1995
|
brandColor,
|
1988
1996
|
data,
|
1989
1997
|
onLogout
|
@@ -2007,17 +2015,19 @@ const Profile = ({
|
|
2007
2015
|
textDecor: 'none'
|
2008
2016
|
},
|
2009
2017
|
m: 0,
|
2010
|
-
onClick: onToggle
|
2018
|
+
onClick: onToggle,
|
2019
|
+
color: color
|
2011
2020
|
}, /*#__PURE__*/React.createElement(react.HStack, null, /*#__PURE__*/React.createElement(react.VStack, {
|
2012
2021
|
alignItems: "flex-end",
|
2013
2022
|
spacing: 0,
|
2014
2023
|
ml: "2",
|
2015
|
-
color:
|
2024
|
+
color: color
|
2016
2025
|
}, /*#__PURE__*/React.createElement(react.Text, {
|
2017
2026
|
textStyle: "text.xs",
|
2018
|
-
mb: 1
|
2019
|
-
|
2020
|
-
|
2027
|
+
mb: 1
|
2028
|
+
}, data === null || data === void 0 ? void 0 : data.email), /*#__PURE__*/React.createElement(react.Flex, {
|
2029
|
+
alignItems: "center"
|
2030
|
+
}, (data === null || data === void 0 ? void 0 : data.userRole) && /*#__PURE__*/React.createElement(react.Text, {
|
2021
2031
|
textStyle: "text.xs"
|
2022
2032
|
}, (data === null || data === void 0 ? void 0 : data.userRole) || 'user'), /*#__PURE__*/React.createElement(react.Box, {
|
2023
2033
|
h: "3",
|
@@ -2064,7 +2074,8 @@ const Profile = ({
|
|
2064
2074
|
Profile.defaultProps = {
|
2065
2075
|
brandColor: 'primary.500',
|
2066
2076
|
data: undefined,
|
2067
|
-
onLogout: undefined
|
2077
|
+
onLogout: undefined,
|
2078
|
+
color: undefined
|
2068
2079
|
};
|
2069
2080
|
|
2070
2081
|
const SwitchMode = () => {
|
@@ -2102,15 +2113,9 @@ const Version = ({
|
|
2102
2113
|
version,
|
2103
2114
|
environment,
|
2104
2115
|
onOpenModalRelease
|
2105
|
-
}) => /*#__PURE__*/React.createElement(React.Fragment, null, version && /*#__PURE__*/React.createElement(
|
2116
|
+
}) => /*#__PURE__*/React.createElement(React.Fragment, null, version && /*#__PURE__*/React.createElement(Badge, {
|
2106
2117
|
"data-test-id": "dzl3esjhCphobaaIXpiUE",
|
2107
2118
|
variant: "neutral-light",
|
2108
|
-
textStyle: "text.xs",
|
2109
|
-
py: 1,
|
2110
|
-
px: 2.5,
|
2111
|
-
fontWeight: "semibold",
|
2112
|
-
textTransform: "lowercase",
|
2113
|
-
borderRadius: "md",
|
2114
2119
|
onClick: onOpenModalRelease,
|
2115
2120
|
cursor: onOpenModalRelease ? 'pointer' : 'auto'
|
2116
2121
|
}, version), !hideEnv && environmentName(environment) !== null && version && /*#__PURE__*/React.createElement(react.Box, {
|
@@ -2135,32 +2140,36 @@ const Header = ({
|
|
2135
2140
|
onLogout,
|
2136
2141
|
onOpenModalRelease,
|
2137
2142
|
hideSwitchMode,
|
2138
|
-
mainLogo
|
2139
|
-
centerLogo
|
2143
|
+
mainLogo,
|
2144
|
+
centerLogo,
|
2140
2145
|
mainLogoSize,
|
2141
2146
|
centerLogoSize = 4,
|
2142
2147
|
hideEnv = false,
|
2143
2148
|
urlLogo,
|
2144
2149
|
children,
|
2150
|
+
profile,
|
2145
2151
|
...props
|
2146
|
-
}) => /*#__PURE__*/React.createElement(react.
|
2152
|
+
}) => /*#__PURE__*/React.createElement(react.Flex, Object.assign({
|
2147
2153
|
minH: 15,
|
2148
|
-
bg:
|
2154
|
+
bg: props.bg,
|
2155
|
+
bgColor: props.bgColor,
|
2149
2156
|
shadow: "raised",
|
2150
2157
|
px: 6,
|
2151
|
-
py: 3
|
2158
|
+
py: 3,
|
2159
|
+
alignItems: "center"
|
2152
2160
|
}, props), /*#__PURE__*/React.createElement(react.Flex, {
|
2161
|
+
h: "auto",
|
2153
2162
|
w: "full",
|
2154
2163
|
alignItems: "center",
|
2155
|
-
justifyContent:
|
2164
|
+
justifyContent: profile ? 'flex-end' : 'space-between',
|
2156
2165
|
pos: "relative"
|
2157
|
-
}, /*#__PURE__*/React.createElement(react.Flex, {
|
2166
|
+
}, mainLogo && /*#__PURE__*/React.createElement(react.Flex, {
|
2158
2167
|
alignItems: "center"
|
2159
2168
|
}, /*#__PURE__*/React.createElement(Logo, {
|
2160
2169
|
url: urlLogo,
|
2161
2170
|
imageUrl: mainLogo,
|
2162
2171
|
height: mainLogoSize
|
2163
|
-
}), children && children), /*#__PURE__*/React.createElement(react.HStack, {
|
2172
|
+
}), children && children), centerLogo && /*#__PURE__*/React.createElement(react.HStack, {
|
2164
2173
|
w: "fit-content",
|
2165
2174
|
spacing: 2,
|
2166
2175
|
alignItems: "center",
|
@@ -2176,9 +2185,10 @@ const Header = ({
|
|
2176
2185
|
version: data === null || data === void 0 ? void 0 : data.version,
|
2177
2186
|
environment: data === null || data === void 0 ? void 0 : data.environment,
|
2178
2187
|
onOpenModalRelease: onOpenModalRelease
|
2179
|
-
})), /*#__PURE__*/React.createElement(react.Flex, {
|
2188
|
+
})), profile || /*#__PURE__*/React.createElement(react.Flex, {
|
2180
2189
|
alignItems: "center"
|
2181
2190
|
}, !hideSwitchMode && /*#__PURE__*/React.createElement(SwitchMode, null), /*#__PURE__*/React.createElement(Profile, {
|
2191
|
+
color: props.color,
|
2182
2192
|
brandColor: brandColor,
|
2183
2193
|
data: data,
|
2184
2194
|
onLogout: onLogout
|
@@ -2194,7 +2204,8 @@ Header.defaultProps = {
|
|
2194
2204
|
centerLogo: undefined,
|
2195
2205
|
centerLogoSize: undefined,
|
2196
2206
|
hideEnv: false,
|
2197
|
-
urlLogo: undefined
|
2207
|
+
urlLogo: undefined,
|
2208
|
+
profile: undefined
|
2198
2209
|
};
|
2199
2210
|
|
2200
2211
|
const ModalBody = /*#__PURE__*/React__default.forwardRef(({
|
@@ -3267,7 +3278,7 @@ const Tab = /*#__PURE__*/react.forwardRef((props, ref) => {
|
|
3267
3278
|
p: 4,
|
3268
3279
|
fontSize: "text.md",
|
3269
3280
|
_selected: {
|
3270
|
-
borderColor: 'primary.
|
3281
|
+
borderColor: 'primary.500',
|
3271
3282
|
color: 'primary.500',
|
3272
3283
|
transform: 'translateY(-2px)',
|
3273
3284
|
_hover: {
|
@@ -3403,50 +3414,97 @@ Uploader.defaultProps = {
|
|
3403
3414
|
const {
|
3404
3415
|
definePartsStyle,
|
3405
3416
|
defineMultiStyleConfig
|
3406
|
-
} = /*#__PURE__*/styledSystem.createMultiStyleConfigHelpers(anatomy.
|
3407
|
-
const
|
3408
|
-
|
3409
|
-
|
3410
|
-
const
|
3411
|
-
|
3412
|
-
|
3413
|
-
|
3414
|
-
|
3415
|
-
|
3416
|
-
|
3417
|
-
|
3418
|
-
|
3419
|
-
textStyle: 'text.sm',
|
3420
|
-
marginEnd: '2'
|
3417
|
+
} = /*#__PURE__*/styledSystem.createMultiStyleConfigHelpers(anatomy.accordionAnatomy.keys);
|
3418
|
+
const baseStyleContainer = /*#__PURE__*/styledSystem.defineStyle({
|
3419
|
+
border: 'none'
|
3420
|
+
});
|
3421
|
+
const baseStyleButton = /*#__PURE__*/styledSystem.defineStyle({
|
3422
|
+
height: 14,
|
3423
|
+
transitionProperty: 'common',
|
3424
|
+
transitionDuration: 'normal',
|
3425
|
+
gap: 4,
|
3426
|
+
fontSize: 'text.md',
|
3427
|
+
bg: 'neutral.50',
|
3428
|
+
_focusVisible: {
|
3429
|
+
bg: 'neutral.100'
|
3421
3430
|
},
|
3422
|
-
|
3423
|
-
|
3431
|
+
_hover: {
|
3432
|
+
bg: 'neutral.100'
|
3424
3433
|
},
|
3425
|
-
|
3426
|
-
|
3427
|
-
|
3428
|
-
marginEnd: '3',
|
3429
|
-
w: '4',
|
3430
|
-
h: '4'
|
3434
|
+
_disabled: {
|
3435
|
+
opacity: 0.4,
|
3436
|
+
cursor: 'not-allowed'
|
3431
3437
|
},
|
3432
|
-
|
3433
|
-
|
3434
|
-
|
3435
|
-
|
3438
|
+
py: 2,
|
3439
|
+
px: 4,
|
3440
|
+
position: 'relative'
|
3441
|
+
});
|
3442
|
+
const baseStylePanel = /*#__PURE__*/styledSystem.defineStyle({
|
3443
|
+
pt: '2',
|
3444
|
+
px: '4',
|
3445
|
+
pb: '5'
|
3446
|
+
});
|
3447
|
+
const baseStyleIcon = /*#__PURE__*/styledSystem.defineStyle({
|
3448
|
+
fontSize: '1.25em'
|
3449
|
+
});
|
3450
|
+
const baseStyle = /*#__PURE__*/definePartsStyle({
|
3451
|
+
container: baseStyleContainer,
|
3452
|
+
button: baseStyleButton,
|
3453
|
+
panel: baseStylePanel,
|
3454
|
+
icon: baseStyleIcon
|
3455
|
+
});
|
3456
|
+
const accordionTheme = /*#__PURE__*/defineMultiStyleConfig({
|
3457
|
+
baseStyle
|
3458
|
+
});
|
3459
|
+
|
3460
|
+
const {
|
3461
|
+
definePartsStyle: definePartsStyle$1,
|
3462
|
+
defineMultiStyleConfig: defineMultiStyleConfig$1
|
3463
|
+
} = /*#__PURE__*/styledSystem.createMultiStyleConfigHelpers(anatomy.alertAnatomy.keys);
|
3464
|
+
const $fg = /*#__PURE__*/styledSystem.cssVar('alert-fg');
|
3465
|
+
const $bg = /*#__PURE__*/styledSystem.cssVar('alert-bg');
|
3466
|
+
const baseStyle$1 = /*#__PURE__*/definePartsStyle$1(props => {
|
3467
|
+
return {
|
3468
|
+
container: {
|
3469
|
+
bg: $bg.reference,
|
3470
|
+
px: '4',
|
3471
|
+
py: '2',
|
3472
|
+
borderRadius: 'sm'
|
3473
|
+
},
|
3474
|
+
title: {
|
3475
|
+
fontWeight: 'regular',
|
3476
|
+
textStyle: 'text.sm',
|
3477
|
+
marginEnd: '2'
|
3478
|
+
},
|
3479
|
+
description: {
|
3480
|
+
lineHeight: '6'
|
3481
|
+
},
|
3482
|
+
icon: {
|
3483
|
+
color: $fg.reference,
|
3484
|
+
flexShrink: 0,
|
3485
|
+
marginEnd: '3',
|
3486
|
+
w: '4',
|
3487
|
+
h: '4'
|
3488
|
+
},
|
3489
|
+
action: {
|
3490
|
+
color: props.colorScheme === 'neutral' && props.variant === 'light' ? 'primary.500' : 'inherit',
|
3491
|
+
'& +.chakra-alert__close': {
|
3492
|
+
ml: '3'
|
3493
|
+
}
|
3494
|
+
},
|
3495
|
+
close: {
|
3496
|
+
color: $fg.reference,
|
3497
|
+
w: '4',
|
3498
|
+
h: '4'
|
3499
|
+
},
|
3500
|
+
spinner: {
|
3501
|
+
color: $fg.reference,
|
3502
|
+
flexShrink: 0,
|
3503
|
+
marginEnd: '3',
|
3504
|
+
w: '5',
|
3505
|
+
h: '5'
|
3436
3506
|
}
|
3437
|
-
}
|
3438
|
-
close: {
|
3439
|
-
color: $fg.reference,
|
3440
|
-
w: '4',
|
3441
|
-
h: '4'
|
3442
|
-
},
|
3443
|
-
spinner: {
|
3444
|
-
color: $fg.reference,
|
3445
|
-
flexShrink: 0,
|
3446
|
-
marginEnd: '3',
|
3447
|
-
w: '5',
|
3448
|
-
h: '5'
|
3449
|
-
}
|
3507
|
+
};
|
3450
3508
|
});
|
3451
3509
|
function getBg(props) {
|
3452
3510
|
const {
|
@@ -3456,7 +3514,7 @@ function getBg(props) {
|
|
3456
3514
|
light: c === 'neutral' ? `colors.${c}.300` : `colors.${c}.50`
|
3457
3515
|
};
|
3458
3516
|
}
|
3459
|
-
const variantLight = /*#__PURE__*/definePartsStyle(props => {
|
3517
|
+
const variantLight = /*#__PURE__*/definePartsStyle$1(props => {
|
3460
3518
|
const {
|
3461
3519
|
colorScheme: c
|
3462
3520
|
} = props;
|
@@ -3469,7 +3527,7 @@ const variantLight = /*#__PURE__*/definePartsStyle(props => {
|
|
3469
3527
|
}
|
3470
3528
|
};
|
3471
3529
|
});
|
3472
|
-
const variantSolid = /*#__PURE__*/definePartsStyle(props => {
|
3530
|
+
const variantSolid = /*#__PURE__*/definePartsStyle$1(props => {
|
3473
3531
|
const {
|
3474
3532
|
colorScheme: c
|
3475
3533
|
} = props;
|
@@ -3484,8 +3542,8 @@ const variants = {
|
|
3484
3542
|
light: variantLight,
|
3485
3543
|
solid: variantSolid
|
3486
3544
|
};
|
3487
|
-
const alertTheme = /*#__PURE__*/defineMultiStyleConfig({
|
3488
|
-
baseStyle,
|
3545
|
+
const alertTheme = /*#__PURE__*/defineMultiStyleConfig$1({
|
3546
|
+
baseStyle: baseStyle$1,
|
3489
3547
|
variants,
|
3490
3548
|
defaultProps: {
|
3491
3549
|
variant: 'light',
|
@@ -3688,6 +3746,12 @@ const Button$1 = /*#__PURE__*/styledSystem.defineStyleConfig({
|
|
3688
3746
|
},
|
3689
3747
|
_disabled: {
|
3690
3748
|
border: 0
|
3749
|
+
},
|
3750
|
+
'.chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)': {
|
3751
|
+
marginEnd: '-1px'
|
3752
|
+
},
|
3753
|
+
'.chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)': {
|
3754
|
+
marginBottom: '-1px'
|
3691
3755
|
}
|
3692
3756
|
};
|
3693
3757
|
const disabledLoading = {
|
@@ -3845,10 +3909,10 @@ const CardStyle = /*#__PURE__*/styledSystem.defineStyleConfig({
|
|
3845
3909
|
});
|
3846
3910
|
|
3847
3911
|
const {
|
3848
|
-
definePartsStyle: definePartsStyle$
|
3849
|
-
defineMultiStyleConfig: defineMultiStyleConfig$
|
3912
|
+
definePartsStyle: definePartsStyle$2,
|
3913
|
+
defineMultiStyleConfig: defineMultiStyleConfig$2
|
3850
3914
|
} = /*#__PURE__*/react.createMultiStyleConfigHelpers(anatomy.checkboxAnatomy.keys);
|
3851
|
-
const baseStyle$
|
3915
|
+
const baseStyle$2 = /*#__PURE__*/definePartsStyle$2({
|
3852
3916
|
control: {
|
3853
3917
|
borderRadius: 'sm',
|
3854
3918
|
w: 4,
|
@@ -3870,7 +3934,7 @@ const baseStyle$1 = /*#__PURE__*/definePartsStyle$1({
|
|
3870
3934
|
cursor: 'not-allowed'
|
3871
3935
|
}
|
3872
3936
|
});
|
3873
|
-
const errors = /*#__PURE__*/definePartsStyle$
|
3937
|
+
const errors = /*#__PURE__*/definePartsStyle$2({
|
3874
3938
|
control: {
|
3875
3939
|
borderColor: 'danger.500',
|
3876
3940
|
_checked: {
|
@@ -3893,7 +3957,7 @@ const errors = /*#__PURE__*/definePartsStyle$1({
|
|
3893
3957
|
fontSize: '8px'
|
3894
3958
|
}
|
3895
3959
|
});
|
3896
|
-
const unstyled = /*#__PURE__*/definePartsStyle$
|
3960
|
+
const unstyled = /*#__PURE__*/definePartsStyle$2({
|
3897
3961
|
control: {
|
3898
3962
|
borderColor: 'neutral.600',
|
3899
3963
|
_checked: {
|
@@ -3937,8 +4001,8 @@ const variants$1 = {
|
|
3937
4001
|
errors,
|
3938
4002
|
unstyled
|
3939
4003
|
};
|
3940
|
-
const Checkbox = /*#__PURE__*/defineMultiStyleConfig$
|
3941
|
-
baseStyle: baseStyle$
|
4004
|
+
const Checkbox = /*#__PURE__*/defineMultiStyleConfig$2({
|
4005
|
+
baseStyle: baseStyle$2,
|
3942
4006
|
variants: variants$1,
|
3943
4007
|
defaultProps: {
|
3944
4008
|
variant: 'unstyled'
|
@@ -3986,7 +4050,10 @@ const Chips$1 = /*#__PURE__*/styledSystem.defineStyleConfig({
|
|
3986
4050
|
bg: 'neutral.200',
|
3987
4051
|
color: 'black.low',
|
3988
4052
|
borderColor: 'neutral.200',
|
3989
|
-
cursor: 'not-allowed'
|
4053
|
+
cursor: 'not-allowed',
|
4054
|
+
_hover: {
|
4055
|
+
bg: 'neutral.200'
|
4056
|
+
}
|
3990
4057
|
};
|
3991
4058
|
chipsProps = {
|
3992
4059
|
...chipsProps,
|
@@ -4011,21 +4078,21 @@ const Chips$1 = /*#__PURE__*/styledSystem.defineStyleConfig({
|
|
4011
4078
|
}
|
4012
4079
|
});
|
4013
4080
|
|
4014
|
-
const baseStyle$
|
4081
|
+
const baseStyle$3 = /*#__PURE__*/styledSystem.defineStyle({
|
4015
4082
|
fontSize: 'field.sm',
|
4016
4083
|
fontWeight: 'normal',
|
4017
4084
|
marginEnd: 1,
|
4018
4085
|
mb: 1
|
4019
4086
|
});
|
4020
4087
|
const FormLabel = /*#__PURE__*/styledSystem.defineStyleConfig({
|
4021
|
-
baseStyle: baseStyle$
|
4088
|
+
baseStyle: baseStyle$3
|
4022
4089
|
});
|
4023
4090
|
|
4024
4091
|
const {
|
4025
|
-
definePartsStyle: definePartsStyle$
|
4026
|
-
defineMultiStyleConfig: defineMultiStyleConfig$
|
4092
|
+
definePartsStyle: definePartsStyle$3,
|
4093
|
+
defineMultiStyleConfig: defineMultiStyleConfig$3
|
4027
4094
|
} = /*#__PURE__*/styledSystem.createMultiStyleConfigHelpers(anatomy.inputAnatomy.keys);
|
4028
|
-
const baseStyle$
|
4095
|
+
const baseStyle$4 = /*#__PURE__*/definePartsStyle$3({
|
4029
4096
|
field: {
|
4030
4097
|
width: '100%',
|
4031
4098
|
minWidth: 0,
|
@@ -4068,20 +4135,20 @@ const size = {
|
|
4068
4135
|
})
|
4069
4136
|
};
|
4070
4137
|
const sizes = {
|
4071
|
-
lg: /*#__PURE__*/definePartsStyle$
|
4138
|
+
lg: /*#__PURE__*/definePartsStyle$3({
|
4072
4139
|
field: size.lg,
|
4073
4140
|
addon: size.lg
|
4074
4141
|
}),
|
4075
|
-
md: /*#__PURE__*/definePartsStyle$
|
4142
|
+
md: /*#__PURE__*/definePartsStyle$3({
|
4076
4143
|
field: size.md,
|
4077
4144
|
addon: size.md
|
4078
4145
|
}),
|
4079
|
-
sm: /*#__PURE__*/definePartsStyle$
|
4146
|
+
sm: /*#__PURE__*/definePartsStyle$3({
|
4080
4147
|
field: size.sm,
|
4081
4148
|
addon: size.sm
|
4082
4149
|
})
|
4083
4150
|
};
|
4084
|
-
const outline = /*#__PURE__*/definePartsStyle$
|
4151
|
+
const outline = /*#__PURE__*/definePartsStyle$3(props => {
|
4085
4152
|
const field = {
|
4086
4153
|
border: 0,
|
4087
4154
|
outline: 0,
|
@@ -4099,7 +4166,7 @@ const outline = /*#__PURE__*/definePartsStyle$2(props => {
|
|
4099
4166
|
field
|
4100
4167
|
};
|
4101
4168
|
});
|
4102
|
-
const unstyled$1 = /*#__PURE__*/definePartsStyle$
|
4169
|
+
const unstyled$1 = /*#__PURE__*/definePartsStyle$3({
|
4103
4170
|
field: {
|
4104
4171
|
bg: 'transparent',
|
4105
4172
|
px: '0',
|
@@ -4115,8 +4182,8 @@ const variants$2 = {
|
|
4115
4182
|
outline,
|
4116
4183
|
unstyled: unstyled$1
|
4117
4184
|
};
|
4118
|
-
const Input = /*#__PURE__*/defineMultiStyleConfig$
|
4119
|
-
baseStyle: baseStyle$
|
4185
|
+
const Input = /*#__PURE__*/defineMultiStyleConfig$3({
|
4186
|
+
baseStyle: baseStyle$4,
|
4120
4187
|
sizes,
|
4121
4188
|
variants: variants$2,
|
4122
4189
|
defaultProps: {
|
@@ -4135,6 +4202,9 @@ const rotate = /*#__PURE__*/react$1.keyframes({
|
|
4135
4202
|
}
|
4136
4203
|
});
|
4137
4204
|
const getLoaderColor = color => {
|
4205
|
+
if (!color) {
|
4206
|
+
return 'var(--chakra-colors-white-high)';
|
4207
|
+
}
|
4138
4208
|
const colorValue = color.split('.');
|
4139
4209
|
let backgroundColor;
|
4140
4210
|
switch (colorValue.length) {
|
@@ -4237,10 +4307,10 @@ const LoaderStyle = /*#__PURE__*/styledSystem.defineStyleConfig({
|
|
4237
4307
|
});
|
4238
4308
|
|
4239
4309
|
const {
|
4240
|
-
definePartsStyle: definePartsStyle$
|
4310
|
+
definePartsStyle: definePartsStyle$4
|
4241
4311
|
} = /*#__PURE__*/styledSystem.createMultiStyleConfigHelpers(anatomy.popoverAnatomy.keys);
|
4242
4312
|
const Popover = {
|
4243
|
-
baseStyle: props => definePartsStyle$
|
4313
|
+
baseStyle: props => definePartsStyle$4({
|
4244
4314
|
popper: {
|
4245
4315
|
background: themeTools.mode('white', 'inherit')(props)
|
4246
4316
|
}
|
@@ -4248,10 +4318,10 @@ const Popover = {
|
|
4248
4318
|
};
|
4249
4319
|
|
4250
4320
|
const {
|
4251
|
-
definePartsStyle: definePartsStyle$
|
4252
|
-
defineMultiStyleConfig: defineMultiStyleConfig$
|
4321
|
+
definePartsStyle: definePartsStyle$5,
|
4322
|
+
defineMultiStyleConfig: defineMultiStyleConfig$4
|
4253
4323
|
} = /*#__PURE__*/react.createMultiStyleConfigHelpers(anatomy.radioAnatomy.keys);
|
4254
|
-
const baseStyle$
|
4324
|
+
const baseStyle$5 = /*#__PURE__*/definePartsStyle$5({
|
4255
4325
|
control: {
|
4256
4326
|
border: '1px solid',
|
4257
4327
|
width: '16px',
|
@@ -4267,7 +4337,7 @@ const baseStyle$4 = /*#__PURE__*/definePartsStyle$4({
|
|
4267
4337
|
}
|
4268
4338
|
}
|
4269
4339
|
});
|
4270
|
-
const errors$1 = /*#__PURE__*/definePartsStyle$
|
4340
|
+
const errors$1 = /*#__PURE__*/definePartsStyle$5({
|
4271
4341
|
control: {
|
4272
4342
|
borderColor: 'danger.500',
|
4273
4343
|
_checked: {
|
@@ -4302,7 +4372,7 @@ const errors$1 = /*#__PURE__*/definePartsStyle$4({
|
|
4302
4372
|
fontSize: '12px'
|
4303
4373
|
}
|
4304
4374
|
});
|
4305
|
-
const unstyled$2 = /*#__PURE__*/definePartsStyle$
|
4375
|
+
const unstyled$2 = /*#__PURE__*/definePartsStyle$5({
|
4306
4376
|
control: {
|
4307
4377
|
borderColor: 'neutral.600',
|
4308
4378
|
_checked: {
|
@@ -4341,8 +4411,8 @@ const variants$3 = {
|
|
4341
4411
|
errors: errors$1,
|
4342
4412
|
unstyled: unstyled$2
|
4343
4413
|
};
|
4344
|
-
const Radio = /*#__PURE__*/defineMultiStyleConfig$
|
4345
|
-
baseStyle: baseStyle$
|
4414
|
+
const Radio = /*#__PURE__*/defineMultiStyleConfig$4({
|
4415
|
+
baseStyle: baseStyle$5,
|
4346
4416
|
variants: variants$3,
|
4347
4417
|
defaultProps: {
|
4348
4418
|
variant: 'unstyled'
|
@@ -4350,8 +4420,8 @@ const Radio = /*#__PURE__*/defineMultiStyleConfig$3({
|
|
4350
4420
|
});
|
4351
4421
|
|
4352
4422
|
const {
|
4353
|
-
defineMultiStyleConfig: defineMultiStyleConfig$
|
4354
|
-
definePartsStyle: definePartsStyle$
|
4423
|
+
defineMultiStyleConfig: defineMultiStyleConfig$5,
|
4424
|
+
definePartsStyle: definePartsStyle$6
|
4355
4425
|
} = /*#__PURE__*/styledSystem.createMultiStyleConfigHelpers(anatomy.switchAnatomy.keys);
|
4356
4426
|
const $width = /*#__PURE__*/themeTools.cssVar('switch-track-width');
|
4357
4427
|
const $height = /*#__PURE__*/themeTools.cssVar('switch-track-height');
|
@@ -4369,7 +4439,7 @@ const baseStyleThumb = /*#__PURE__*/styledSystem.defineStyle({
|
|
4369
4439
|
transform: `translateX(${$translateX.reference})`
|
4370
4440
|
}
|
4371
4441
|
});
|
4372
|
-
const baseStyle$
|
4442
|
+
const baseStyle$6 = /*#__PURE__*/definePartsStyle$6(() => ({
|
4373
4443
|
container: {
|
4374
4444
|
[$diff.variable]: diffValue,
|
4375
4445
|
[$translateX.variable]: $diff.reference,
|
@@ -4394,27 +4464,39 @@ const baseStyle$5 = /*#__PURE__*/definePartsStyle$5(() => ({
|
|
4394
4464
|
thumb: baseStyleThumb
|
4395
4465
|
}));
|
4396
4466
|
const sizes$1 = {
|
4397
|
-
sm: /*#__PURE__*/definePartsStyle$
|
4467
|
+
sm: /*#__PURE__*/definePartsStyle$6({
|
4398
4468
|
container: {
|
4399
|
-
[$width.variable]: '
|
4400
|
-
[$height.variable]: '
|
4469
|
+
[$width.variable]: '1.875rem',
|
4470
|
+
[$height.variable]: '0.75rem'
|
4471
|
+
},
|
4472
|
+
thumb: {
|
4473
|
+
[$width.variable]: '0.75rem',
|
4474
|
+
[$height.variable]: '0.75rem'
|
4401
4475
|
}
|
4402
4476
|
}),
|
4403
|
-
md: /*#__PURE__*/definePartsStyle$
|
4477
|
+
md: /*#__PURE__*/definePartsStyle$6({
|
4404
4478
|
container: {
|
4405
|
-
[$width.variable]: '2.
|
4406
|
-
[$height.variable]: '
|
4479
|
+
[$width.variable]: '2.375rem',
|
4480
|
+
[$height.variable]: '1rem'
|
4481
|
+
},
|
4482
|
+
thumb: {
|
4483
|
+
[$width.variable]: '1rem',
|
4484
|
+
[$height.variable]: '1rem'
|
4407
4485
|
}
|
4408
4486
|
}),
|
4409
|
-
lg: /*#__PURE__*/definePartsStyle$
|
4487
|
+
lg: /*#__PURE__*/definePartsStyle$6({
|
4410
4488
|
container: {
|
4411
|
-
[$width.variable]: '3.
|
4412
|
-
[$height.variable]: '1.
|
4489
|
+
[$width.variable]: '3.25rem',
|
4490
|
+
[$height.variable]: '1.375rem'
|
4491
|
+
},
|
4492
|
+
thumb: {
|
4493
|
+
[$width.variable]: '1.375rem',
|
4494
|
+
[$height.variable]: '1.375rem'
|
4413
4495
|
}
|
4414
4496
|
})
|
4415
4497
|
};
|
4416
|
-
const Switch$1 = /*#__PURE__*/defineMultiStyleConfig$
|
4417
|
-
baseStyle: baseStyle$
|
4498
|
+
const Switch$1 = /*#__PURE__*/defineMultiStyleConfig$5({
|
4499
|
+
baseStyle: baseStyle$6,
|
4418
4500
|
sizes: sizes$1,
|
4419
4501
|
defaultProps: {
|
4420
4502
|
size: 'md'
|
@@ -4422,10 +4504,10 @@ const Switch$1 = /*#__PURE__*/defineMultiStyleConfig$4({
|
|
4422
4504
|
});
|
4423
4505
|
|
4424
4506
|
const {
|
4425
|
-
defineMultiStyleConfig: defineMultiStyleConfig$
|
4426
|
-
definePartsStyle: definePartsStyle$
|
4507
|
+
defineMultiStyleConfig: defineMultiStyleConfig$6,
|
4508
|
+
definePartsStyle: definePartsStyle$7
|
4427
4509
|
} = /*#__PURE__*/styledSystem.createMultiStyleConfigHelpers(anatomy.tableAnatomy.keys);
|
4428
|
-
const baseStyle$
|
4510
|
+
const baseStyle$7 = /*#__PURE__*/definePartsStyle$7({
|
4429
4511
|
table: {
|
4430
4512
|
fontVariantNumeric: 'lining-nums tabular-nums',
|
4431
4513
|
borderCollapse: 'collapse',
|
@@ -4458,7 +4540,7 @@ const numericStyles = /*#__PURE__*/styledSystem.defineStyle({
|
|
4458
4540
|
textAlign: 'end'
|
4459
4541
|
}
|
4460
4542
|
});
|
4461
|
-
const variantSimple = /*#__PURE__*/definePartsStyle$
|
4543
|
+
const variantSimple = /*#__PURE__*/definePartsStyle$7(props => {
|
4462
4544
|
const {
|
4463
4545
|
colorScheme: c
|
4464
4546
|
} = props;
|
@@ -4488,7 +4570,7 @@ const variantSimple = /*#__PURE__*/definePartsStyle$6(props => {
|
|
4488
4570
|
}
|
4489
4571
|
};
|
4490
4572
|
});
|
4491
|
-
const variantStripe = /*#__PURE__*/definePartsStyle$
|
4573
|
+
const variantStripe = /*#__PURE__*/definePartsStyle$7(props => {
|
4492
4574
|
const {
|
4493
4575
|
colorScheme: c
|
4494
4576
|
} = props;
|
@@ -4537,7 +4619,7 @@ const variants$4 = {
|
|
4537
4619
|
unstyled: /*#__PURE__*/styledSystem.defineStyle({})
|
4538
4620
|
};
|
4539
4621
|
const sizes$2 = {
|
4540
|
-
sm: /*#__PURE__*/definePartsStyle$
|
4622
|
+
sm: /*#__PURE__*/definePartsStyle$7({
|
4541
4623
|
th: {
|
4542
4624
|
px: '4',
|
4543
4625
|
py: '1',
|
@@ -4556,7 +4638,7 @@ const sizes$2 = {
|
|
4556
4638
|
fontSize: 'xs'
|
4557
4639
|
}
|
4558
4640
|
}),
|
4559
|
-
md: /*#__PURE__*/definePartsStyle$
|
4641
|
+
md: /*#__PURE__*/definePartsStyle$7({
|
4560
4642
|
th: {
|
4561
4643
|
px: '2',
|
4562
4644
|
py: '4',
|
@@ -4586,7 +4668,7 @@ const sizes$2 = {
|
|
4586
4668
|
fontSize: 'sm'
|
4587
4669
|
}
|
4588
4670
|
}),
|
4589
|
-
lg: /*#__PURE__*/definePartsStyle$
|
4671
|
+
lg: /*#__PURE__*/definePartsStyle$7({
|
4590
4672
|
th: {
|
4591
4673
|
px: '8',
|
4592
4674
|
py: '4',
|
@@ -4605,8 +4687,8 @@ const sizes$2 = {
|
|
4605
4687
|
}
|
4606
4688
|
})
|
4607
4689
|
};
|
4608
|
-
const tableTheme = /*#__PURE__*/defineMultiStyleConfig$
|
4609
|
-
baseStyle: baseStyle$
|
4690
|
+
const tableTheme = /*#__PURE__*/defineMultiStyleConfig$6({
|
4691
|
+
baseStyle: baseStyle$7,
|
4610
4692
|
variants: variants$4,
|
4611
4693
|
sizes: sizes$2,
|
4612
4694
|
defaultProps: {
|
@@ -4699,6 +4781,7 @@ const Textarea = /*#__PURE__*/react.defineStyleConfig({
|
|
4699
4781
|
|
4700
4782
|
var components = {
|
4701
4783
|
__proto__: null,
|
4784
|
+
Accordion: accordionTheme,
|
4702
4785
|
Alert: alertTheme,
|
4703
4786
|
Badge: Badge$1,
|
4704
4787
|
Button: Button$1,
|
@@ -4727,8 +4810,17 @@ const getTheme = foundations => {
|
|
4727
4810
|
},
|
4728
4811
|
styles: {
|
4729
4812
|
global: {
|
4730
|
-
'
|
4731
|
-
|
4813
|
+
'&::-webkit-scrollbar': {
|
4814
|
+
width: '10px',
|
4815
|
+
height: '10px'
|
4816
|
+
},
|
4817
|
+
'&::-webkit-scrollbar-track': {
|
4818
|
+
background: 'white'
|
4819
|
+
},
|
4820
|
+
'&::-webkit-scrollbar-thumb': {
|
4821
|
+
background: 'neutral.400',
|
4822
|
+
borderRadius: '24px',
|
4823
|
+
border: '2px solid white'
|
4732
4824
|
},
|
4733
4825
|
body: {
|
4734
4826
|
fontSize: 'text.sm',
|
@@ -4788,7 +4880,7 @@ const Provider = ({
|
|
4788
4880
|
}), []);
|
4789
4881
|
return /*#__PURE__*/React__default.createElement(ProviderContext.Provider, {
|
4790
4882
|
value: provider
|
4791
|
-
}, children);
|
4883
|
+
}, /*#__PURE__*/React__default.createElement(reactToastify.ToastContainer, null), children);
|
4792
4884
|
};
|
4793
4885
|
Provider.displayName = 'Provider';
|
4794
4886
|
|