shared-design-system 1.11.0 → 1.12.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/src/components/Avatar.d.ts +2 -1
- package/dist/src/components/Avatar.js +39 -21
- package/dist/src/components/Avatar.js.map +1 -1
- package/dist/src/components/Badge.d.ts +3 -2
- package/dist/src/components/Badge.js +51 -25
- package/dist/src/components/Badge.js.map +1 -1
- package/dist/src/components/Card.d.ts +4 -1
- package/dist/src/components/Card.js +43 -18
- package/dist/src/components/Card.js.map +1 -1
- package/dist/src/components/DatePicker.js +55 -8
- package/dist/src/components/DatePicker.js.map +1 -1
- package/dist/src/components/Divider.d.ts +2 -0
- package/dist/src/components/Divider.js +20 -12
- package/dist/src/components/Divider.js.map +1 -1
- package/dist/src/components/InputComponents.d.ts +2 -4
- package/dist/src/components/InputComponents.js +89 -132
- package/dist/src/components/InputComponents.js.map +1 -1
- package/dist/src/components/MultiSelect.d.ts +14 -0
- package/dist/src/components/MultiSelect.js +142 -0
- package/dist/src/components/MultiSelect.js.map +1 -0
- package/dist/src/components/ReadOnlyField.d.ts +2 -1
- package/dist/src/components/ReadOnlyField.js +20 -13
- package/dist/src/components/ReadOnlyField.js.map +1 -1
- package/dist/src/components/Select.d.ts +19 -0
- package/dist/src/components/Select.js +110 -0
- package/dist/src/components/Select.js.map +1 -0
- package/dist/src/components/Stack.d.ts +2 -0
- package/dist/src/components/Stack.js +18 -5
- package/dist/src/components/Stack.js.map +1 -1
- package/dist/src/components/Tag.d.ts +3 -2
- package/dist/src/components/Tag.js +22 -22
- package/dist/src/components/Tag.js.map +1 -1
- package/dist/src/components/Typography.d.ts +2 -2
- package/dist/src/components/Typography.js +16 -8
- package/dist/src/components/Typography.js.map +1 -1
- package/dist/src/index.d.ts +6 -2
- package/dist/src/index.js +3 -1
- package/dist/src/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,167 +1,124 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { tokens } from '../tokens';
|
|
4
|
-
const
|
|
5
|
-
display: 'block',
|
|
6
|
-
fontSize: tokens.font.xs,
|
|
7
|
-
fontWeight: tokens.font.weightMedium,
|
|
8
|
-
color: tokens.color.textMuted,
|
|
9
|
-
marginBottom: tokens.spacing[1],
|
|
10
|
-
};
|
|
11
|
-
const filterLabelStyle = {
|
|
4
|
+
const floatingLabelStyle = {
|
|
12
5
|
position: 'absolute',
|
|
13
6
|
top: '-10px',
|
|
14
|
-
left: '
|
|
7
|
+
left: '14px',
|
|
15
8
|
backgroundColor: 'white',
|
|
16
9
|
padding: '0 6px',
|
|
17
|
-
fontSize: '
|
|
18
|
-
fontWeight: tokens.font.
|
|
10
|
+
fontSize: '10px',
|
|
11
|
+
fontWeight: tokens.font.weightBold,
|
|
19
12
|
color: tokens.color.slate400,
|
|
20
13
|
textTransform: 'uppercase',
|
|
21
|
-
letterSpacing: '0.
|
|
14
|
+
letterSpacing: '0.1em',
|
|
22
15
|
zIndex: 1,
|
|
16
|
+
transition: tokens.transition.fast,
|
|
23
17
|
};
|
|
24
|
-
const
|
|
18
|
+
const inputContainerStyle = (isFocused, hasError) => ({
|
|
19
|
+
position: 'relative',
|
|
25
20
|
width: '100%',
|
|
26
|
-
padding: `${tokens.spacing[3]} ${tokens.spacing[4]}`,
|
|
27
|
-
fontSize: tokens.font.sm,
|
|
28
|
-
borderRadius: tokens.radius.md,
|
|
29
|
-
border: `1px solid ${tokens.color.slate200}`,
|
|
30
21
|
backgroundColor: tokens.color.white,
|
|
31
|
-
color: tokens.color.
|
|
32
|
-
|
|
22
|
+
border: `1px solid ${hasError ? tokens.color.danger : (isFocused ? tokens.color.borderFocus : tokens.color.slate200)}`,
|
|
23
|
+
borderRadius: tokens.radius.lg,
|
|
24
|
+
padding: '12px 16px',
|
|
33
25
|
transition: tokens.transition.fast,
|
|
26
|
+
boxShadow: isFocused ? '0 0 0 3px rgba(245, 158, 11, 0.1)' : tokens.shadow.sm,
|
|
27
|
+
});
|
|
28
|
+
const inputFieldBaseStyle = {
|
|
29
|
+
width: '100%',
|
|
30
|
+
border: 'none',
|
|
31
|
+
outline: 'none',
|
|
32
|
+
backgroundColor: 'transparent',
|
|
33
|
+
fontSize: tokens.font.sm,
|
|
34
34
|
fontFamily: tokens.font.family,
|
|
35
|
-
fontWeight: tokens.font.
|
|
36
|
-
|
|
35
|
+
fontWeight: tokens.font.weightSemibold,
|
|
36
|
+
color: tokens.color.slate800,
|
|
37
|
+
padding: '4px 0 0 0',
|
|
37
38
|
};
|
|
38
|
-
export const Input = ({ label, required, error,
|
|
39
|
+
export const Input = ({ label, required, error, className = '', style = {}, onFocus, onBlur, leadingIcon, ...props }) => {
|
|
39
40
|
const [isFocused, setIsFocused] = React.useState(false);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
alignItems: 'center',
|
|
46
|
-
...(isFilter && {
|
|
47
|
-
border: `1px solid ${isFocused ? tokens.color.borderFocus : tokens.color.slate200}`,
|
|
48
|
-
borderRadius: tokens.radius.md,
|
|
49
|
-
padding: '8px 12px',
|
|
50
|
-
backgroundColor: tokens.color.white,
|
|
51
|
-
transition: tokens.transition.fast,
|
|
52
|
-
boxShadow: tokens.shadow.sm,
|
|
53
|
-
})
|
|
54
|
-
};
|
|
55
|
-
const fieldStyle = {
|
|
56
|
-
...inputBaseStyle,
|
|
57
|
-
...(leadingIcon && { paddingLeft: tokens.spacing[10] }),
|
|
58
|
-
...(isFilter && {
|
|
59
|
-
border: 'none',
|
|
60
|
-
padding: '4px 0 0 0',
|
|
61
|
-
backgroundColor: 'transparent',
|
|
62
|
-
boxShadow: 'none',
|
|
63
|
-
}),
|
|
64
|
-
...(isFocused && !isFilter && {
|
|
65
|
-
borderColor: tokens.color.borderFocus,
|
|
66
|
-
boxShadow: `0 0 0 3px ${tokens.color.borderFocus}22`,
|
|
67
|
-
}),
|
|
68
|
-
...(error && { borderColor: tokens.color.danger }),
|
|
69
|
-
...style
|
|
70
|
-
};
|
|
71
|
-
return (_jsxs("div", { className: className, style: { width: '100%', position: 'relative' }, children: [label && !isFilter && (_jsxs("label", { style: labelStyle, children: [label, " ", required && _jsx("span", { style: { color: tokens.color.danger }, children: "*" })] })), _jsxs("div", { style: containerStyle, children: [label && isFilter && (_jsx("label", { style: { ...filterLabelStyle, color: isFocused ? tokens.color.borderFocus : tokens.color.slate400 }, children: label })), leadingIcon && (_jsx("div", { style: {
|
|
41
|
+
return (_jsxs("div", { className: className, style: { width: '100%', position: 'relative', ...style }, children: [label && (_jsxs("label", { style: {
|
|
42
|
+
...floatingLabelStyle,
|
|
43
|
+
color: isFocused ? tokens.color.borderFocus : (error ? tokens.color.danger : tokens.color.slate400),
|
|
44
|
+
left: leadingIcon ? '40px' : '14px'
|
|
45
|
+
}, children: [label, " ", required && _jsx("span", { style: { color: tokens.color.danger }, children: "*" })] })), _jsxs("div", { style: inputContainerStyle(isFocused, !!error), children: [leadingIcon && (_jsx("div", { style: {
|
|
72
46
|
position: 'absolute',
|
|
73
|
-
left:
|
|
74
|
-
|
|
47
|
+
left: '16px',
|
|
48
|
+
top: '50%',
|
|
49
|
+
transform: 'translateY(-50%)',
|
|
50
|
+
color: isFocused ? tokens.color.primary : tokens.color.slate300,
|
|
75
51
|
display: 'flex',
|
|
76
52
|
alignItems: 'center',
|
|
77
53
|
zIndex: 1,
|
|
78
54
|
pointerEvents: 'none',
|
|
79
|
-
|
|
55
|
+
marginTop: '2px'
|
|
56
|
+
}, children: leadingIcon })), _jsx("input", { style: {
|
|
57
|
+
...inputFieldBaseStyle,
|
|
58
|
+
...(leadingIcon && { paddingLeft: '28px' }),
|
|
59
|
+
}, onFocus: (e) => {
|
|
80
60
|
setIsFocused(true);
|
|
81
61
|
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
82
62
|
}, onBlur: (e) => {
|
|
83
63
|
setIsFocused(false);
|
|
84
64
|
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
85
|
-
}, ...props })] }), error && _jsx("p", { style: { fontSize: '11px', color: tokens.color.danger, marginTop: '
|
|
65
|
+
}, ...props })] }), error && _jsx("p", { style: { fontSize: '11px', color: tokens.color.danger, marginTop: '6px', fontWeight: tokens.font.weightMedium }, children: error })] }));
|
|
86
66
|
};
|
|
87
67
|
export const Textarea = ({ label, required, error, className = '', style = {}, onFocus, onBlur, ...props }) => {
|
|
88
68
|
const [isFocused, setIsFocused] = React.useState(false);
|
|
89
|
-
return (_jsxs("div", { className: className, style: { width: '100%'
|
|
90
|
-
...
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
})
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
setIsFocused(false);
|
|
104
|
-
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
105
|
-
}, ...props }), error && _jsx("p", { style: { fontSize: '11px', color: tokens.color.danger, marginTop: '4px' }, children: error })] }));
|
|
69
|
+
return (_jsxs("div", { className: className, style: { width: '100%', position: 'relative', ...style }, children: [label && (_jsxs("label", { style: {
|
|
70
|
+
...floatingLabelStyle,
|
|
71
|
+
color: isFocused ? tokens.color.borderFocus : (error ? tokens.color.danger : tokens.color.slate400)
|
|
72
|
+
}, children: [label, " ", required && _jsx("span", { style: { color: tokens.color.danger }, children: "*" })] })), _jsx("div", { style: inputContainerStyle(isFocused, !!error), children: _jsx("textarea", { style: {
|
|
73
|
+
...inputFieldBaseStyle,
|
|
74
|
+
minHeight: '100px',
|
|
75
|
+
resize: 'none',
|
|
76
|
+
}, onFocus: (e) => {
|
|
77
|
+
setIsFocused(true);
|
|
78
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
79
|
+
}, onBlur: (e) => {
|
|
80
|
+
setIsFocused(false);
|
|
81
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
82
|
+
}, ...props }) }), error && _jsx("p", { style: { fontSize: '11px', color: tokens.color.danger, marginTop: '6px', fontWeight: tokens.font.weightMedium }, children: error })] }));
|
|
106
83
|
};
|
|
107
|
-
export const
|
|
84
|
+
export const NativeSelect = ({ label, required, children, error, className = '', style = {}, onFocus, onBlur, leadingIcon, ...props }) => {
|
|
108
85
|
const [isFocused, setIsFocused] = React.useState(false);
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
alignItems: 'center',
|
|
146
|
-
zIndex: 1,
|
|
147
|
-
pointerEvents: 'none'
|
|
148
|
-
}, children: leadingIcon })), _jsx("select", { style: fieldStyle, onFocus: (e) => {
|
|
149
|
-
setIsFocused(true);
|
|
150
|
-
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
151
|
-
}, onBlur: (e) => {
|
|
152
|
-
setIsFocused(false);
|
|
153
|
-
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
154
|
-
}, ...props, children: children }), _jsx("div", { style: {
|
|
155
|
-
position: 'absolute',
|
|
156
|
-
right: isFilter ? '0' : tokens.spacing[3],
|
|
157
|
-
top: '50%',
|
|
158
|
-
transform: 'translateY(-50%)',
|
|
159
|
-
pointerEvents: 'none',
|
|
160
|
-
color: isFocused ? tokens.color.primary : tokens.color.slate400,
|
|
161
|
-
display: 'flex',
|
|
162
|
-
alignItems: 'center',
|
|
163
|
-
marginTop: isFilter ? '2px' : '0'
|
|
164
|
-
}, children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: _jsx("polyline", { points: "6 9 12 15 18 9" }) }) })] })] }), error && _jsx("p", { style: { fontSize: '11px', color: tokens.color.danger, marginTop: '4px' }, children: error })] }));
|
|
86
|
+
return (_jsxs("div", { className: className, style: { width: '100%', position: 'relative', ...style }, children: [label && (_jsxs("label", { style: {
|
|
87
|
+
...floatingLabelStyle,
|
|
88
|
+
color: isFocused ? tokens.color.borderFocus : (error ? tokens.color.danger : tokens.color.slate400),
|
|
89
|
+
left: leadingIcon ? '40px' : '14px'
|
|
90
|
+
}, children: [label, " ", required && _jsx("span", { style: { color: tokens.color.danger }, children: "*" })] })), _jsx("div", { style: inputContainerStyle(isFocused, !!error), children: _jsxs("div", { style: { position: 'relative', display: 'flex', alignItems: 'center' }, children: [leadingIcon && (_jsx("div", { style: {
|
|
91
|
+
position: 'absolute',
|
|
92
|
+
left: '0',
|
|
93
|
+
color: isFocused ? tokens.color.primary : tokens.color.slate300,
|
|
94
|
+
display: 'flex',
|
|
95
|
+
alignItems: 'center',
|
|
96
|
+
zIndex: 1,
|
|
97
|
+
pointerEvents: 'none',
|
|
98
|
+
marginTop: '2px'
|
|
99
|
+
}, children: leadingIcon })), _jsx("select", { style: {
|
|
100
|
+
...inputFieldBaseStyle,
|
|
101
|
+
appearance: 'none',
|
|
102
|
+
paddingRight: '32px',
|
|
103
|
+
...(leadingIcon && { paddingLeft: '28px' }),
|
|
104
|
+
cursor: 'pointer',
|
|
105
|
+
}, onFocus: (e) => {
|
|
106
|
+
setIsFocused(true);
|
|
107
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
108
|
+
}, onBlur: (e) => {
|
|
109
|
+
setIsFocused(false);
|
|
110
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
111
|
+
}, ...props, children: children }), _jsx("div", { style: {
|
|
112
|
+
position: 'absolute',
|
|
113
|
+
right: '0',
|
|
114
|
+
top: '50%',
|
|
115
|
+
transform: 'translateY(-50%)',
|
|
116
|
+
pointerEvents: 'none',
|
|
117
|
+
color: isFocused ? tokens.color.borderFocus : tokens.color.slate300,
|
|
118
|
+
display: 'flex',
|
|
119
|
+
alignItems: 'center',
|
|
120
|
+
marginTop: '2px'
|
|
121
|
+
}, children: _jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: _jsx("polyline", { points: "6 9 12 15 18 9" }) }) })] }) }), error && _jsx("p", { style: { fontSize: '11px', color: tokens.color.danger, marginTop: '6px', fontWeight: tokens.font.weightMedium }, children: error })] }));
|
|
165
122
|
};
|
|
166
123
|
export const Checkbox = ({ label, checked, className = '', style = {}, ...props }) => {
|
|
167
124
|
return (_jsxs("label", { className: className, style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputComponents.js","sourceRoot":"","sources":["../../../src/components/InputComponents.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,MAAM,
|
|
1
|
+
{"version":3,"file":"InputComponents.js","sourceRoot":"","sources":["../../../src/components/InputComponents.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,MAAM,kBAAkB,GAAwB;IAC9C,QAAQ,EAAE,UAAU;IACpB,GAAG,EAAE,OAAO;IACZ,IAAI,EAAE,MAAM;IACZ,eAAe,EAAE,OAAO;IACxB,OAAO,EAAE,OAAO;IACh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Q,EAAE;4BAC7E,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa;4BAC/D,MAAM,EAAE,SAAS;4BACjB,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,IAAI;4BAClC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,aAAa,MAAM,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,MAAM;yBACpE,KACG,KAAK,GACT,EACD,OAAO,IAAI,CACV,cAAK,KAAK,EAAE;4BACV,QAAQ,EAAE,UAAU;4BACpB,IAAI,EAAE,KAAK;4BACX,GAAG,EAAE,KAAK;4BACV,KAAK,EAAE,MAAM;4BACb,MAAM,EAAE,MAAM;4BACd,KAAK,EAAE,OAAO;4BACd,aAAa,EAAE,MAAM;yBACtB,EAAE,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,GAAG,EAAC,aAAa,EAAC,OAAO,EAAC,cAAc,EAAC,OAAO,YACnH,mBAAU,MAAM,EAAC,gBAAgB,GAAY,GACzC,CACP,IACG,EACL,KAAK,IACA,CACT,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MultiSelectProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
required?: boolean;
|
|
5
|
+
options: string[];
|
|
6
|
+
selectedValues: string[];
|
|
7
|
+
onChange: (values: string[]) => void;
|
|
8
|
+
onAddNew?: (value: string) => void;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
error?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const MultiSelect: React.FC<MultiSelectProps>;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useRef, useEffect } from 'react';
|
|
3
|
+
import { tokens } from '../tokens';
|
|
4
|
+
const floatingLabelStyle = {
|
|
5
|
+
position: 'absolute',
|
|
6
|
+
top: '-10px',
|
|
7
|
+
left: '14px',
|
|
8
|
+
backgroundColor: 'white',
|
|
9
|
+
padding: '0 6px',
|
|
10
|
+
fontSize: '10px',
|
|
11
|
+
fontWeight: tokens.font.weightBold,
|
|
12
|
+
color: tokens.color.slate400,
|
|
13
|
+
textTransform: 'uppercase',
|
|
14
|
+
letterSpacing: '0.1em',
|
|
15
|
+
zIndex: 10,
|
|
16
|
+
transition: tokens.transition.fast,
|
|
17
|
+
};
|
|
18
|
+
export const MultiSelect = ({ label, required, options, selectedValues, onChange, onAddNew, placeholder = 'Chọn...', className = '', style = {}, error }) => {
|
|
19
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
20
|
+
const [searchValue, setSearchValue] = useState('');
|
|
21
|
+
const containerRef = useRef(null);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
const handleClickOutside = (event) => {
|
|
24
|
+
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
25
|
+
setIsOpen(false);
|
|
26
|
+
setSearchValue('');
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
30
|
+
return () => document.removeEventListener('mousedown', handleClickOutside);
|
|
31
|
+
}, []);
|
|
32
|
+
const handleToggleValue = (value) => {
|
|
33
|
+
if (selectedValues.includes(value)) {
|
|
34
|
+
onChange(selectedValues.filter(v => v !== value));
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
onChange([...selectedValues, value]);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const handleAddValue = () => {
|
|
41
|
+
if (!searchValue.trim())
|
|
42
|
+
return;
|
|
43
|
+
if (onAddNew) {
|
|
44
|
+
onAddNew(searchValue.trim());
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
if (!options.includes(searchValue.trim())) {
|
|
48
|
+
// Fallback if onAddNew is not provided, we just add it to selection if it's not there
|
|
49
|
+
handleToggleValue(searchValue.trim());
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
setSearchValue('');
|
|
53
|
+
};
|
|
54
|
+
const filteredOptions = options.filter(opt => opt.toLowerCase().includes(searchValue.toLowerCase()));
|
|
55
|
+
return (_jsxs("div", { ref: containerRef, className: className, style: { position: 'relative', width: '100%', ...style }, children: [label && (_jsxs("label", { style: {
|
|
56
|
+
...floatingLabelStyle,
|
|
57
|
+
color: isOpen ? tokens.color.borderFocus : (error ? tokens.color.danger : tokens.color.slate400)
|
|
58
|
+
}, children: [label, " ", required && _jsx("span", { style: { color: tokens.color.danger }, children: "*" })] })), _jsxs("div", { onClick: () => setIsOpen(!isOpen), style: {
|
|
59
|
+
minHeight: '46px',
|
|
60
|
+
padding: '10px 14px',
|
|
61
|
+
backgroundColor: tokens.color.white,
|
|
62
|
+
border: `1px solid ${error ? tokens.color.danger : (isOpen ? tokens.color.borderFocus : tokens.color.slate200)}`,
|
|
63
|
+
borderRadius: tokens.radius.lg,
|
|
64
|
+
display: 'flex',
|
|
65
|
+
flexWrap: 'wrap',
|
|
66
|
+
gap: '6px',
|
|
67
|
+
alignItems: 'center',
|
|
68
|
+
cursor: 'pointer',
|
|
69
|
+
transition: tokens.transition.fast,
|
|
70
|
+
boxShadow: isOpen ? '0 0 0 3px rgba(245, 158, 11, 0.1)' : tokens.shadow.sm,
|
|
71
|
+
}, children: [selectedValues.length > 0 ? (selectedValues.map(val => (_jsxs("span", { style: {
|
|
72
|
+
display: 'inline-flex',
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
gap: '6px',
|
|
75
|
+
padding: '2px 8px',
|
|
76
|
+
backgroundColor: tokens.color.slate100,
|
|
77
|
+
color: tokens.color.slate700,
|
|
78
|
+
borderRadius: '6px',
|
|
79
|
+
fontSize: '11px',
|
|
80
|
+
fontWeight: tokens.font.weightBold,
|
|
81
|
+
border: `1px solid ${tokens.color.slate200}`,
|
|
82
|
+
}, onClick: (e) => {
|
|
83
|
+
e.stopPropagation();
|
|
84
|
+
handleToggleValue(val);
|
|
85
|
+
}, children: [val, _jsxs("svg", { style: { width: '12px', height: '12px', opacity: 0.6 }, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), _jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })] })] }, val)))) : (_jsx("span", { style: { color: tokens.color.slate400, fontSize: tokens.font.sm, fontWeight: tokens.font.weightMedium }, children: placeholder })), _jsx("div", { style: { marginLeft: 'auto', color: tokens.color.slate300 }, children: _jsx("svg", { style: { width: '16px', height: '16px', transition: tokens.transition.fast, transform: isOpen ? 'rotate(180deg)' : 'none' }, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: _jsx("polyline", { points: "6 9 12 15 18 9" }) }) })] }), isOpen && (_jsxs("div", { style: {
|
|
86
|
+
position: 'absolute',
|
|
87
|
+
top: '100%',
|
|
88
|
+
left: 0,
|
|
89
|
+
right: 0,
|
|
90
|
+
marginTop: '8px',
|
|
91
|
+
backgroundColor: tokens.color.white,
|
|
92
|
+
borderRadius: tokens.radius.xl,
|
|
93
|
+
boxShadow: tokens.shadow.xl,
|
|
94
|
+
border: `1px solid ${tokens.color.slate100}`,
|
|
95
|
+
zIndex: 1000,
|
|
96
|
+
overflow: 'hidden',
|
|
97
|
+
animation: 'reveal 0.2s ease-out'
|
|
98
|
+
}, children: [_jsxs("div", { style: { padding: '12px', borderBottom: `1px solid ${tokens.color.slate100}`, display: 'flex', gap: '8px' }, children: [_jsx("input", { type: "text", autoFocus: true, value: searchValue, onChange: (e) => setSearchValue(e.target.value), placeholder: "T\u00ECm ho\u1EB7c th\u00EAm m\u1EDBi...", style: {
|
|
99
|
+
flex: 1,
|
|
100
|
+
padding: '8px 12px',
|
|
101
|
+
fontSize: '12px',
|
|
102
|
+
backgroundColor: tokens.color.slate50,
|
|
103
|
+
border: 'none',
|
|
104
|
+
borderRadius: '12px',
|
|
105
|
+
outline: 'none',
|
|
106
|
+
}, onKeyDown: (e) => {
|
|
107
|
+
if (e.key === 'Enter') {
|
|
108
|
+
e.preventDefault();
|
|
109
|
+
handleAddValue();
|
|
110
|
+
}
|
|
111
|
+
} }), searchValue && !options.includes(searchValue) && (_jsx("button", { type: "button", onClick: handleAddValue, style: {
|
|
112
|
+
padding: '0 16px',
|
|
113
|
+
backgroundColor: tokens.color.warning,
|
|
114
|
+
color: 'white',
|
|
115
|
+
fontSize: '10px',
|
|
116
|
+
fontWeight: tokens.font.weightBold,
|
|
117
|
+
borderRadius: '12px',
|
|
118
|
+
border: 'none',
|
|
119
|
+
cursor: 'pointer'
|
|
120
|
+
}, children: "TH\u00CAM" }))] }), _jsx("div", { style: { maxHeight: '240px', overflowY: 'auto', padding: '4px' }, children: filteredOptions.length > 0 ? (filteredOptions.map(opt => {
|
|
121
|
+
const isSelected = selectedValues.includes(opt);
|
|
122
|
+
return (_jsxs("div", { onClick: () => handleToggleValue(opt), style: {
|
|
123
|
+
padding: '10px 16px',
|
|
124
|
+
fontSize: '13px',
|
|
125
|
+
cursor: 'pointer',
|
|
126
|
+
display: 'flex',
|
|
127
|
+
alignItems: 'center',
|
|
128
|
+
justifyContent: 'space-between',
|
|
129
|
+
borderRadius: '10px',
|
|
130
|
+
backgroundColor: isSelected ? 'transparent' : 'transparent',
|
|
131
|
+
transition: tokens.transition.fast,
|
|
132
|
+
fontWeight: isSelected ? tokens.font.weightBold : tokens.font.weightMedium,
|
|
133
|
+
color: isSelected ? tokens.color.slate800 : tokens.color.slate600,
|
|
134
|
+
}, onMouseEnter: (e) => e.currentTarget.style.backgroundColor = tokens.color.slate50, onMouseLeave: (e) => e.currentTarget.style.backgroundColor = 'transparent', children: [opt, isSelected && (_jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: tokens.color.success, strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: _jsx("polyline", { points: "20 6 9 17 4 12" }) }))] }, opt));
|
|
135
|
+
})) : (_jsx("div", { style: { padding: '20px', textAlign: 'center', color: tokens.color.slate400, fontSize: '11px', fontStyle: 'italic' }, children: "Kh\u00F4ng t\u00ECm th\u1EA5y k\u1EBFt qu\u1EA3 ph\u00F9 h\u1EE3p" })) })] })), error && _jsx("p", { style: { fontSize: '11px', color: tokens.color.danger, marginTop: '6px', fontWeight: tokens.font.weightMedium }, children: error }), _jsx("style", { children: `
|
|
136
|
+
@keyframes reveal {
|
|
137
|
+
from { opacity: 0; transform: translateY(-8px); }
|
|
138
|
+
to { opacity: 1; transform: translateY(0); }
|
|
139
|
+
}
|
|
140
|
+
` })] }));
|
|
141
|
+
};
|
|
142
|
+
//# sourceMappingURL=MultiSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiSelect.js","sourceRoot":"","sources":["../../../src/components/MultiSelect.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,MAAM,kBAAkB,GAAwB;IAC9C,QAAQ,EAAE,UAAU;IACpB,GAAG,EAAE,OAAO;IACZ,IAAI,EAAE,MAAM;IACZ,eAAe,EAAE,OAAO;IACxB,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU;IAClC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ;IAC5B,aAAa,EAAE,WAAW;IAC1B,aAAa,EAAE,OAAO;IACtB,MAAM,EAAE,EAAE;IACV,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,IAAI;CACnC,C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,0BAAQ;;;;;OAKP,GAAS,IACN,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface ReadOnlyFieldProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
label: string;
|
|
4
|
-
value?:
|
|
4
|
+
value?: React.ReactNode;
|
|
5
|
+
icon?: React.ReactNode;
|
|
5
6
|
}
|
|
6
7
|
export declare const ReadOnlyField: React.FC<ReadOnlyFieldProps>;
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { tokens } from '../tokens';
|
|
3
|
-
export const ReadOnlyField = ({ label, value, className = '', style = {} }) => (_jsxs("div", { style: {
|
|
4
|
-
|
|
3
|
+
export const ReadOnlyField = ({ label, value, icon, className = '', style = {} }) => (_jsxs("div", { style: { position: 'relative', width: '100%', ...style }, className: className, children: [_jsx("label", { style: {
|
|
4
|
+
position: 'absolute',
|
|
5
|
+
top: '-10px',
|
|
6
|
+
left: '14px',
|
|
7
|
+
backgroundColor: tokens.color.white,
|
|
8
|
+
padding: '0 6px',
|
|
9
|
+
fontSize: '10px',
|
|
5
10
|
fontWeight: tokens.font.weightBold,
|
|
6
|
-
color: tokens.color.
|
|
11
|
+
color: tokens.color.slate400,
|
|
7
12
|
textTransform: 'uppercase',
|
|
8
|
-
letterSpacing: '0.
|
|
9
|
-
|
|
13
|
+
letterSpacing: '0.1em',
|
|
14
|
+
zIndex: 1,
|
|
15
|
+
}, children: label }), _jsxs("div", { style: {
|
|
10
16
|
fontSize: tokens.font.sm,
|
|
11
17
|
fontWeight: tokens.font.weightSemibold,
|
|
12
|
-
color: tokens.color.
|
|
13
|
-
backgroundColor: tokens.color.
|
|
14
|
-
padding:
|
|
15
|
-
borderRadius: tokens.radius.
|
|
16
|
-
border: `1px solid ${tokens.color.
|
|
17
|
-
minHeight: '
|
|
18
|
+
color: tokens.color.slate800,
|
|
19
|
+
backgroundColor: tokens.color.slate50,
|
|
20
|
+
padding: '14px 16px',
|
|
21
|
+
borderRadius: tokens.radius.lg,
|
|
22
|
+
border: `1px solid ${tokens.color.slate200}`,
|
|
23
|
+
minHeight: '46px',
|
|
18
24
|
display: 'flex',
|
|
19
|
-
alignItems: 'center'
|
|
20
|
-
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
gap: tokens.spacing[3]
|
|
27
|
+
}, children: [icon && _jsx("div", { style: { color: tokens.color.slate400 }, children: icon }), _jsx("div", { style: { flex: 1 }, children: value || _jsx("span", { style: { opacity: 0.4 }, children: "\u2014" }) })] })] }));
|
|
21
28
|
//# sourceMappingURL=ReadOnlyField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadOnlyField.js","sourceRoot":"","sources":["../../../src/components/ReadOnlyField.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"ReadOnlyField.js","sourceRoot":"","sources":["../../../src/components/ReadOnlyField.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAQnC,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CACjH,eAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,aACjF,gBAAO,KAAK,EAAE;gBACZ,QAAQ,EAAE,UAAU;gBACpB,GAAG,EAAE,OAAO;gBACZ,IAAI,EAAE,MAAM;gBACZ,eAAe,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK;gBACnC,OAAO,EAAE,OAAO;gBAChB,QAAQ,EAAE,MAAM;gBAChB,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU;gBAClC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ;gBAC5B,aAAa,EAAE,WAAW;gBAC1B,aAAa,EAAE,OAAO;gBACtB,MAAM,EAAE,CAAC;aACV,YACE,KAAK,GACA,EACR,eAAK,KAAK,EAAE;gBACV,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE;gBACxB,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,cAAc;gBACtC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ;gBAC5B,eAAe,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO;gBACrC,OAAO,EAAE,WAAW;gBACpB,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE;gBAC9B,MAAM,EAAE,aAAa,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE;gBAC5C,SAAS,EAAE,MAAM;gBACjB,OAAO,EAAE,MAAM;gBACf,UAAU,EAAE,QAAQ;gBACpB,GAAG,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;aACvB,aACE,IAAI,IAAI,cAAK,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,YAAG,IAAI,GAAO,EACnE,cAAK,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,YAAG,KAAK,IAAI,eAAM,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,uBAAU,GAAO,IAC7E,IACF,CACP,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SelectOption {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
export interface SelectProps {
|
|
7
|
+
label?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
options: (string | SelectOption)[];
|
|
10
|
+
value?: string;
|
|
11
|
+
onChange?: (value: string) => void;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
error?: string;
|
|
16
|
+
leadingIcon?: React.ReactNode;
|
|
17
|
+
searchable?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const Select: React.FC<SelectProps>;
|