@taiv/ui 1.10.3 → 1.10.4
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Dropdowns/Select/Select.tsx"],"names":[],"mappings":"AACA,OAAO,EAA2B,WAAW,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC3F,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACpC;AAED,eAAO,MAAM,MAAM,GAAI,2DAA+F,WAAW,
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Dropdowns/Select/Select.tsx"],"names":[],"mappings":"AACA,OAAO,EAA2B,WAAW,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC3F,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACpC;AAED,eAAO,MAAM,MAAM,GAAI,2DAA+F,WAAW,4CAqEhI,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Select as MantineSelect } from '@mantine/core';
|
|
3
|
-
import { neutral } from '../../../../constants/colors';
|
|
3
|
+
import { neutral, red } from '../../../../constants/colors';
|
|
4
4
|
import { fontBase } from '../../../../constants/font';
|
|
5
5
|
import { componentSizes } from '../shared/sizes';
|
|
6
6
|
export const Select = ({ size = 'md', width, fullWidth = false, placeholder = 'Select an option', styles, ...props }) => {
|
|
@@ -14,12 +14,18 @@ export const Select = ({ size = 'md', width, fullWidth = false, placeholder = 'S
|
|
|
14
14
|
paddingRight: selectedSize.inputPadding,
|
|
15
15
|
...fontBase,
|
|
16
16
|
fontSize: selectedSize.fontSize,
|
|
17
|
-
color: neutral[
|
|
17
|
+
color: neutral[200],
|
|
18
18
|
borderRadius: '8px',
|
|
19
|
-
border: `1px solid ${neutral[100]}`,
|
|
20
19
|
textOverflow: 'ellipsis',
|
|
21
20
|
overflow: 'hidden',
|
|
22
21
|
transition: 'all 200ms ease-in-out',
|
|
22
|
+
'&[data-invalid]': {
|
|
23
|
+
borderColor: red[200],
|
|
24
|
+
color: neutral[200],
|
|
25
|
+
'&::placeholder': {
|
|
26
|
+
color: red[200],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
23
29
|
},
|
|
24
30
|
label: {
|
|
25
31
|
...fontBase,
|
|
@@ -56,6 +62,11 @@ export const Select = ({ size = 'md', width, fullWidth = false, placeholder = 'S
|
|
|
56
62
|
rightSection: {
|
|
57
63
|
color: neutral[200],
|
|
58
64
|
},
|
|
65
|
+
error: {
|
|
66
|
+
...fontBase,
|
|
67
|
+
fontSize: `calc(${selectedSize.fontSize} - 0.05rem)`,
|
|
68
|
+
color: red[200]
|
|
69
|
+
},
|
|
59
70
|
...styles,
|
|
60
71
|
};
|
|
61
72
|
return _jsx(MantineSelect, { radius: "md", size: size, styles: style, placeholder: placeholder, maxDropdownHeight: selectedSize.dropdownHeight, ...props });
|