@ctlyst.id/internal-ui 1.0.4-canary.5 → 1.0.4-canary.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/select/components/utils.d.ts +1 -1
- package/dist/internal-ui.cjs.development.js +8 -9
- package/dist/internal-ui.cjs.development.js.map +1 -1
- package/dist/internal-ui.cjs.production.min.js +2 -2
- package/dist/internal-ui.cjs.production.min.js.map +1 -1
- package/dist/internal-ui.esm.js +8 -9
- package/dist/internal-ui.esm.js.map +1 -1
- package/package.json +2 -2
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { ColorMode } from '@chakra-ui/system';
|
2
2
|
import type { GroupBase, StylesConfig, Theme } from 'react-select';
|
3
|
-
export declare function selectStyles<OptionType = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<OptionType> = GroupBase<OptionType>>(colorMode: ColorMode,
|
3
|
+
export declare function selectStyles<OptionType = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<OptionType> = GroupBase<OptionType>>(colorMode: ColorMode, _isError: boolean): StylesConfig<OptionType, IsMulti, Group> | undefined;
|
4
4
|
export declare const themeSelect: (theme: Theme) => {
|
5
5
|
colors: {
|
6
6
|
primary: string;
|
@@ -2373,7 +2373,7 @@ const SelectWrapper = ({
|
|
2373
2373
|
return /*#__PURE__*/React__default.createElement(react.Box, {
|
2374
2374
|
css: react$1.css`
|
2375
2375
|
.react-select__control {
|
2376
|
-
border-color: ${isError ? colors.danger['500'] : colors.neutral['
|
2376
|
+
border-color: ${isError ? colors.danger['500'] : colors.neutral['500']} !important;
|
2377
2377
|
}
|
2378
2378
|
|
2379
2379
|
.react-select__control:hover {
|
@@ -2392,8 +2392,7 @@ const selectStyle = {
|
|
2392
2392
|
lineHeight: styleMd.lineHeight,
|
2393
2393
|
letterSpacing: 0
|
2394
2394
|
};
|
2395
|
-
function selectStyles(colorMode,
|
2396
|
-
const boxShadowStyle = isError ? `0 0 0 1px ${colors.danger['500']}` : `0 0 0 1px ${colors.primary['500']}`;
|
2395
|
+
function selectStyles(colorMode, _isError) {
|
2397
2396
|
return {
|
2398
2397
|
control: (base, state) => colorMode === 'dark' ? {
|
2399
2398
|
...base,
|
@@ -2401,11 +2400,11 @@ function selectStyles(colorMode, isError) {
|
|
2401
2400
|
background: 'transparent',
|
2402
2401
|
color: colors.primary['300'],
|
2403
2402
|
borderColor: colors.secondary['500'],
|
2404
|
-
boxShadow: state.isFocused ?
|
2403
|
+
boxShadow: state.isFocused ? 'none' : `inherit`
|
2405
2404
|
} : {
|
2406
2405
|
...base,
|
2407
2406
|
...selectStyle,
|
2408
|
-
boxShadow: state.isFocused ?
|
2407
|
+
boxShadow: state.isFocused ? 'none' : colors.neutral['500']
|
2409
2408
|
},
|
2410
2409
|
option: (base, {
|
2411
2410
|
isSelected
|
@@ -2490,7 +2489,7 @@ function Select({
|
|
2490
2489
|
classNamePrefix: "react-select"
|
2491
2490
|
}, rest, {
|
2492
2491
|
styles: {
|
2493
|
-
...selectStyles(colorMode
|
2492
|
+
...selectStyles(colorMode)
|
2494
2493
|
},
|
2495
2494
|
theme: themeSelect
|
2496
2495
|
})));
|
@@ -2510,7 +2509,7 @@ function SelectAsync({
|
|
2510
2509
|
classNamePrefix: "react-select"
|
2511
2510
|
}, rest, {
|
2512
2511
|
styles: {
|
2513
|
-
...selectStyles(colorMode
|
2512
|
+
...selectStyles(colorMode),
|
2514
2513
|
...styles
|
2515
2514
|
},
|
2516
2515
|
theme: themeSelect
|
@@ -2531,7 +2530,7 @@ function SelectAsyncCreatable({
|
|
2531
2530
|
classNamePrefix: "react-select"
|
2532
2531
|
}, rest, {
|
2533
2532
|
styles: {
|
2534
|
-
...selectStyles(colorMode
|
2533
|
+
...selectStyles(colorMode),
|
2535
2534
|
...styles
|
2536
2535
|
},
|
2537
2536
|
theme: themeSelect
|
@@ -2552,7 +2551,7 @@ function SelectCreatable({
|
|
2552
2551
|
classNamePrefix: "react-select"
|
2553
2552
|
}, rest, {
|
2554
2553
|
styles: {
|
2555
|
-
...selectStyles(colorMode
|
2554
|
+
...selectStyles(colorMode),
|
2556
2555
|
...styles
|
2557
2556
|
},
|
2558
2557
|
theme: themeSelect
|