@teamturing/react-kit 1.1.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/LICENSE +21 -0
- package/README.md +5 -0
- package/dist/core/Chip/index.d.ts +25 -0
- package/dist/core/GradientText/index.d.ts +287 -0
- package/dist/core/Grid/index.d.ts +25 -0
- package/dist/core/IconButton/index.d.ts +53 -0
- package/dist/core/IconToggleButton/index.d.ts +28 -0
- package/dist/core/ItemList/index.d.ts +10 -0
- package/dist/core/Space/index.d.ts +8 -0
- package/dist/core/Spinner/index.d.ts +487 -0
- package/dist/core/Stack/index.d.ts +19 -0
- package/dist/core/StyledIcon/index.d.ts +10 -0
- package/dist/core/Text/index.d.ts +10 -0
- package/dist/core/View/index.d.ts +8 -0
- package/dist/core/_UnstyledButton.d.ts +6 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +4010 -0
- package/dist/utils/forcePixelValue.d.ts +6 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/isArray.d.ts +1 -0
- package/dist/utils/isNullable.d.ts +1 -0
- package/dist/utils/styled-system/index.d.ts +31 -0
- package/esm/_virtual/_commonjsHelpers.js +5 -0
- package/esm/_virtual/_rollupPluginBabelHelpers.js +16 -0
- package/esm/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js +12 -0
- package/esm/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +9 -0
- package/esm/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +51 -0
- package/esm/node_modules/@styled-system/background/dist/index.esm.js +16 -0
- package/esm/node_modules/@styled-system/border/dist/index.esm.js +131 -0
- package/esm/node_modules/@styled-system/color/dist/index.esm.js +17 -0
- package/esm/node_modules/@styled-system/core/dist/index.esm.js +178 -0
- package/esm/node_modules/@styled-system/css/dist/index.esm.js +209 -0
- package/esm/node_modules/@styled-system/flexbox/dist/index.esm.js +21 -0
- package/esm/node_modules/@styled-system/grid/dist/index.esm.js +34 -0
- package/esm/node_modules/@styled-system/layout/dist/index.esm.js +47 -0
- package/esm/node_modules/@styled-system/position/dist/index.esm.js +35 -0
- package/esm/node_modules/@styled-system/shadow/dist/index.esm.js +14 -0
- package/esm/node_modules/@styled-system/space/dist/index.esm.js +121 -0
- package/esm/node_modules/@styled-system/typography/dist/index.esm.js +33 -0
- package/esm/node_modules/@styled-system/variant/dist/index.esm.js +40 -0
- package/esm/node_modules/object-assign/index.js +83 -0
- package/esm/node_modules/styled-components/dist/styled-components.esm.js +657 -0
- package/esm/node_modules/styled-system/dist/index.esm.js +77 -0
- package/esm/node_modules/stylis/src/Enum.js +11 -0
- package/esm/node_modules/stylis/src/Middleware.js +85 -0
- package/esm/node_modules/stylis/src/Parser.js +187 -0
- package/esm/node_modules/stylis/src/Prefixer.js +197 -0
- package/esm/node_modules/stylis/src/Serializer.js +39 -0
- package/esm/node_modules/stylis/src/Tokenizer.js +242 -0
- package/esm/node_modules/stylis/src/Utility.js +128 -0
- package/esm/node_modules/tslib/tslib.es6.js +44 -0
- package/esm/packages/icons/src/ProgressGradient.js +41 -0
- package/esm/packages/react-kit/src/core/Chip/index.js +179 -0
- package/esm/packages/react-kit/src/core/GradientText/index.js +13 -0
- package/esm/packages/react-kit/src/core/Grid/index.js +106 -0
- package/esm/packages/react-kit/src/core/IconButton/index.js +212 -0
- package/esm/packages/react-kit/src/core/IconToggleButton/index.js +105 -0
- package/esm/packages/react-kit/src/core/ItemList/index.js +11 -0
- package/esm/packages/react-kit/src/core/Space/index.js +12 -0
- package/esm/packages/react-kit/src/core/Spinner/index.js +23 -0
- package/esm/packages/react-kit/src/core/Stack/index.js +57 -0
- package/esm/packages/react-kit/src/core/StyledIcon/index.js +20 -0
- package/esm/packages/react-kit/src/core/Text/index.js +49 -0
- package/esm/packages/react-kit/src/core/View/index.js +18 -0
- package/esm/packages/react-kit/src/core/_UnstyledButton.js +14 -0
- package/esm/packages/react-kit/src/index.js +12 -0
- package/esm/packages/react-kit/src/utils/forcePixelValue.js +8 -0
- package/esm/packages/react-kit/src/utils/isArray.js +3 -0
- package/esm/packages/react-kit/src/utils/isNullable.js +3 -0
- package/esm/packages/react-kit/src/utils/styled-system/index.js +27 -0
- package/esm/packages/token-studio/src/foundation/palette/index.js +90 -0
- package/esm/packages/token-studio/src/foundation/rounding/index.js +13 -0
- package/esm/packages/token-studio/src/foundation/spacing/index.js +56 -0
- package/esm/packages/token-studio/src/foundation/typography/fontSize/index.js +18 -0
- package/esm/packages/token-studio/src/foundation/typography/fontWeight/index.js +13 -0
- package/esm/packages/token-studio/src/foundation/typography/lineHeight/index.js +6 -0
- package/esm/packages/token-studio/src/token/color/index.js +140 -0
- package/esm/packages/token-studio/src/token/radii/index.js +15 -0
- package/esm/packages/token-studio/src/token/space/index.js +55 -0
- package/esm/packages/token-studio/src/token/typography/fontSizes.js +17 -0
- package/esm/packages/token-studio/src/token/typography/fontWeights.js +9 -0
- package/esm/packages/token-studio/src/token/typography/index.js +133 -0
- package/esm/packages/token-studio/src/token/typography/lineHeights.js +8 -0
- package/package.json +59 -0
- package/src/index.ts +12 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { assign, append, charat, strlen, trim, from, substr } from './Utility.js';
|
|
2
|
+
|
|
3
|
+
var line = 1;
|
|
4
|
+
var column = 1;
|
|
5
|
+
var length = 0;
|
|
6
|
+
var position = 0;
|
|
7
|
+
var character = 0;
|
|
8
|
+
var characters = '';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @param {string} value
|
|
12
|
+
* @param {object | null} root
|
|
13
|
+
* @param {object | null} parent
|
|
14
|
+
* @param {string} type
|
|
15
|
+
* @param {string[] | string} props
|
|
16
|
+
* @param {object[] | string} children
|
|
17
|
+
* @param {object[]} siblings
|
|
18
|
+
* @param {number} length
|
|
19
|
+
*/
|
|
20
|
+
function node(value, root, parent, type, props, children, length, siblings) {
|
|
21
|
+
return {
|
|
22
|
+
value: value,
|
|
23
|
+
root: root,
|
|
24
|
+
parent: parent,
|
|
25
|
+
type: type,
|
|
26
|
+
props: props,
|
|
27
|
+
children: children,
|
|
28
|
+
line: line,
|
|
29
|
+
column: column,
|
|
30
|
+
length: length,
|
|
31
|
+
return: '',
|
|
32
|
+
siblings: siblings
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @param {object} root
|
|
38
|
+
* @param {object} props
|
|
39
|
+
* @return {object}
|
|
40
|
+
*/
|
|
41
|
+
function copy(root, props) {
|
|
42
|
+
return assign(node('', null, null, '', null, null, 0, root.siblings), root, {
|
|
43
|
+
length: -root.length
|
|
44
|
+
}, props);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @param {object} root
|
|
49
|
+
*/
|
|
50
|
+
function lift(root) {
|
|
51
|
+
while (root.root) root = copy(root.root, {
|
|
52
|
+
children: [root]
|
|
53
|
+
});
|
|
54
|
+
append(root, root.siblings);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @return {number}
|
|
59
|
+
*/
|
|
60
|
+
function char() {
|
|
61
|
+
return character;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @return {number}
|
|
66
|
+
*/
|
|
67
|
+
function prev() {
|
|
68
|
+
character = position > 0 ? charat(characters, --position) : 0;
|
|
69
|
+
if (column--, character === 10) column = 1, line--;
|
|
70
|
+
return character;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @return {number}
|
|
75
|
+
*/
|
|
76
|
+
function next() {
|
|
77
|
+
character = position < length ? charat(characters, position++) : 0;
|
|
78
|
+
if (column++, character === 10) column = 1, line++;
|
|
79
|
+
return character;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @return {number}
|
|
84
|
+
*/
|
|
85
|
+
function peek() {
|
|
86
|
+
return charat(characters, position);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @return {number}
|
|
91
|
+
*/
|
|
92
|
+
function caret() {
|
|
93
|
+
return position;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @param {number} begin
|
|
98
|
+
* @param {number} end
|
|
99
|
+
* @return {string}
|
|
100
|
+
*/
|
|
101
|
+
function slice(begin, end) {
|
|
102
|
+
return substr(characters, begin, end);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @param {number} type
|
|
107
|
+
* @return {number}
|
|
108
|
+
*/
|
|
109
|
+
function token(type) {
|
|
110
|
+
switch (type) {
|
|
111
|
+
// \0 \t \n \r \s whitespace token
|
|
112
|
+
case 0:
|
|
113
|
+
case 9:
|
|
114
|
+
case 10:
|
|
115
|
+
case 13:
|
|
116
|
+
case 32:
|
|
117
|
+
return 5;
|
|
118
|
+
// ! + , / > @ ~ isolate token
|
|
119
|
+
case 33:
|
|
120
|
+
case 43:
|
|
121
|
+
case 44:
|
|
122
|
+
case 47:
|
|
123
|
+
case 62:
|
|
124
|
+
case 64:
|
|
125
|
+
case 126:
|
|
126
|
+
// ; { } breakpoint token
|
|
127
|
+
case 59:
|
|
128
|
+
case 123:
|
|
129
|
+
case 125:
|
|
130
|
+
return 4;
|
|
131
|
+
// : accompanied token
|
|
132
|
+
case 58:
|
|
133
|
+
return 3;
|
|
134
|
+
// " ' ( [ opening delimit token
|
|
135
|
+
case 34:
|
|
136
|
+
case 39:
|
|
137
|
+
case 40:
|
|
138
|
+
case 91:
|
|
139
|
+
return 2;
|
|
140
|
+
// ) ] closing delimit token
|
|
141
|
+
case 41:
|
|
142
|
+
case 93:
|
|
143
|
+
return 1;
|
|
144
|
+
}
|
|
145
|
+
return 0;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @param {string} value
|
|
150
|
+
* @return {any[]}
|
|
151
|
+
*/
|
|
152
|
+
function alloc(value) {
|
|
153
|
+
return line = column = 1, length = strlen(characters = value), position = 0, [];
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* @param {any} value
|
|
158
|
+
* @return {any}
|
|
159
|
+
*/
|
|
160
|
+
function dealloc(value) {
|
|
161
|
+
return characters = '', value;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @param {number} type
|
|
166
|
+
* @return {string}
|
|
167
|
+
*/
|
|
168
|
+
function delimit(type) {
|
|
169
|
+
return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* @param {number} type
|
|
174
|
+
* @return {string}
|
|
175
|
+
*/
|
|
176
|
+
function whitespace(type) {
|
|
177
|
+
while (character = peek()) if (character < 33) next();else break;
|
|
178
|
+
return token(type) > 2 || token(character) > 3 ? '' : ' ';
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @param {number} index
|
|
183
|
+
* @param {number} count
|
|
184
|
+
* @return {string}
|
|
185
|
+
*/
|
|
186
|
+
function escaping(index, count) {
|
|
187
|
+
while (--count && next())
|
|
188
|
+
// not 0-9 A-F a-f
|
|
189
|
+
if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97) break;
|
|
190
|
+
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* @param {number} type
|
|
195
|
+
* @return {number}
|
|
196
|
+
*/
|
|
197
|
+
function delimiter(type) {
|
|
198
|
+
while (next()) switch (character) {
|
|
199
|
+
// ] ) " '
|
|
200
|
+
case type:
|
|
201
|
+
return position;
|
|
202
|
+
// " '
|
|
203
|
+
case 34:
|
|
204
|
+
case 39:
|
|
205
|
+
if (type !== 34 && type !== 39) delimiter(character);
|
|
206
|
+
break;
|
|
207
|
+
// (
|
|
208
|
+
case 40:
|
|
209
|
+
if (type === 41) delimiter(type);
|
|
210
|
+
break;
|
|
211
|
+
// \
|
|
212
|
+
case 92:
|
|
213
|
+
next();
|
|
214
|
+
break;
|
|
215
|
+
}
|
|
216
|
+
return position;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* @param {number} type
|
|
221
|
+
* @param {number} index
|
|
222
|
+
* @return {number}
|
|
223
|
+
*/
|
|
224
|
+
function commenter(type, index) {
|
|
225
|
+
while (next())
|
|
226
|
+
// //
|
|
227
|
+
if (type + character === 47 + 10) break;
|
|
228
|
+
// /*
|
|
229
|
+
else if (type + character === 42 + 42 && peek() === 47) break;
|
|
230
|
+
return '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next());
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* @param {number} index
|
|
235
|
+
* @return {string}
|
|
236
|
+
*/
|
|
237
|
+
function identifier(index) {
|
|
238
|
+
while (!token(peek())) next();
|
|
239
|
+
return slice(index, position);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export { alloc, caret, char, character, characters, column, commenter, copy, dealloc, delimit, delimiter, escaping, identifier, length, lift, line, next, node, peek, position, prev, slice, token, whitespace };
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {number}
|
|
3
|
+
* @return {number}
|
|
4
|
+
*/
|
|
5
|
+
var abs = Math.abs;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @param {number}
|
|
9
|
+
* @return {string}
|
|
10
|
+
*/
|
|
11
|
+
var from = String.fromCharCode;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @param {object}
|
|
15
|
+
* @return {object}
|
|
16
|
+
*/
|
|
17
|
+
var assign = Object.assign;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @param {string} value
|
|
21
|
+
* @param {number} length
|
|
22
|
+
* @return {number}
|
|
23
|
+
*/
|
|
24
|
+
function hash(value, length) {
|
|
25
|
+
return charat(value, 0) ^ 45 ? (((length << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @param {string} value
|
|
30
|
+
* @return {string}
|
|
31
|
+
*/
|
|
32
|
+
function trim(value) {
|
|
33
|
+
return value.trim();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @param {string} value
|
|
38
|
+
* @param {RegExp} pattern
|
|
39
|
+
* @return {string?}
|
|
40
|
+
*/
|
|
41
|
+
function match(value, pattern) {
|
|
42
|
+
return (value = pattern.exec(value)) ? value[0] : value;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @param {string} value
|
|
47
|
+
* @param {(string|RegExp)} pattern
|
|
48
|
+
* @param {string} replacement
|
|
49
|
+
* @return {string}
|
|
50
|
+
*/
|
|
51
|
+
function replace(value, pattern, replacement) {
|
|
52
|
+
return value.replace(pattern, replacement);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @param {string} value
|
|
57
|
+
* @param {string} search
|
|
58
|
+
* @return {number}
|
|
59
|
+
*/
|
|
60
|
+
function indexof(value, search) {
|
|
61
|
+
return value.indexOf(search);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @param {string} value
|
|
66
|
+
* @param {number} index
|
|
67
|
+
* @return {number}
|
|
68
|
+
*/
|
|
69
|
+
function charat(value, index) {
|
|
70
|
+
return value.charCodeAt(index) | 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @param {string} value
|
|
75
|
+
* @param {number} begin
|
|
76
|
+
* @param {number} end
|
|
77
|
+
* @return {string}
|
|
78
|
+
*/
|
|
79
|
+
function substr(value, begin, end) {
|
|
80
|
+
return value.slice(begin, end);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @param {string} value
|
|
85
|
+
* @return {number}
|
|
86
|
+
*/
|
|
87
|
+
function strlen(value) {
|
|
88
|
+
return value.length;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @param {any[]} value
|
|
93
|
+
* @return {number}
|
|
94
|
+
*/
|
|
95
|
+
function sizeof(value) {
|
|
96
|
+
return value.length;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @param {any} value
|
|
101
|
+
* @param {any[]} array
|
|
102
|
+
* @return {any}
|
|
103
|
+
*/
|
|
104
|
+
function append(value, array) {
|
|
105
|
+
return array.push(value), value;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @param {string[]} array
|
|
110
|
+
* @param {function} callback
|
|
111
|
+
* @return {string}
|
|
112
|
+
*/
|
|
113
|
+
function combine(array, callback) {
|
|
114
|
+
return array.map(callback).join('');
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @param {string[]} array
|
|
119
|
+
* @param {RegExp} pattern
|
|
120
|
+
* @return {string[]}
|
|
121
|
+
*/
|
|
122
|
+
function filter(array, pattern) {
|
|
123
|
+
return array.filter(function (value) {
|
|
124
|
+
return !match(value, pattern);
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export { abs, append, assign, charat, combine, filter, from, hash, indexof, match, replace, sizeof, strlen, substr, trim };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var __assign = function() {
|
|
19
|
+
__assign = Object.assign || function __assign(t) {
|
|
20
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
21
|
+
s = arguments[i];
|
|
22
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
function __spreadArray(to, from, pack) {
|
|
30
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
31
|
+
if (ar || !(i in from)) {
|
|
32
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
33
|
+
ar[i] = from[i];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
40
|
+
var e = new Error(message);
|
|
41
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export { __assign, __spreadArray };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
const SvgProgressGradient = props => /*#__PURE__*/React.createElement("svg", _extends({
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: "1em",
|
|
7
|
+
height: "1em",
|
|
8
|
+
fill: "none",
|
|
9
|
+
viewBox: "0 0 24 24"
|
|
10
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
11
|
+
fill: "currentColor",
|
|
12
|
+
fillRule: "evenodd",
|
|
13
|
+
d: "M12 1.4a1.1 1.1 0 0 0-1.1 1.1v3.042a1.1 1.1 0 0 0 2.2 0V2.5A1.101 1.101 0 0 0 12 1.4Z",
|
|
14
|
+
clipRule: "evenodd"
|
|
15
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
16
|
+
fill: "currentColor",
|
|
17
|
+
fillRule: "evenodd",
|
|
18
|
+
d: "M6.656 8.211a1.097 1.097 0 0 0 1.556 0 1.101 1.101 0 0 0 0-1.556L6.06 4.505A1.101 1.101 0 0 0 4.505 6.06l2.15 2.151h.001Z",
|
|
19
|
+
clipRule: "evenodd",
|
|
20
|
+
opacity: 0.16
|
|
21
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
22
|
+
fill: "currentColor",
|
|
23
|
+
fillRule: "evenodd",
|
|
24
|
+
d: "M6.642 12a1.1 1.1 0 0 0-1.1-1.1H2.5a1.1 1.1 0 0 0 0 2.2h3.042a1.1 1.1 0 0 0 1.1-1.1Z",
|
|
25
|
+
clipRule: "evenodd",
|
|
26
|
+
opacity: 0.32
|
|
27
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
28
|
+
fill: "currentColor",
|
|
29
|
+
fillRule: "evenodd",
|
|
30
|
+
d: "m6.656 15.789-2.151 2.15a1.101 1.101 0 0 0 1.556 1.556l2.15-2.15a1.101 1.101 0 0 0-1.555-1.556ZM12 17.358a1.1 1.1 0 0 0-1.1 1.1V21.5a1.1 1.1 0 0 0 2.2 0v-3.042a1.1 1.1 0 0 0-1.1-1.1Z",
|
|
31
|
+
clipRule: "evenodd",
|
|
32
|
+
opacity: 0.56
|
|
33
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
34
|
+
fill: "currentColor",
|
|
35
|
+
fillRule: "evenodd",
|
|
36
|
+
d: "M17.344 15.789a1.1 1.1 0 0 0-1.556 1.556l2.151 2.15a1.098 1.098 0 0 0 1.878-.778 1.1 1.1 0 0 0-.322-.778l-2.15-2.15h-.001ZM21.5 10.9h-3.042a1.1 1.1 0 0 0 0 2.2H21.5a1.1 1.1 0 0 0 0-2.2ZM16.566 8.534c.281 0 .563-.107.778-.322l2.151-2.151a1.1 1.1 0 0 0-1.556-1.556l-2.15 2.15a1.1 1.1 0 0 0 .777 1.879Z",
|
|
37
|
+
clipRule: "evenodd",
|
|
38
|
+
opacity: 0.72
|
|
39
|
+
}));
|
|
40
|
+
|
|
41
|
+
export { SvgProgressGradient as default };
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import color from '../../../../token-studio/src/token/color/index.js';
|
|
2
|
+
import radii from '../../../../token-studio/src/token/radii/index.js';
|
|
3
|
+
import typography from '../../../../token-studio/src/token/typography/index.js';
|
|
4
|
+
import Qe from '../../../../../node_modules/styled-components/dist/styled-components.esm.js';
|
|
5
|
+
import '../../../../../node_modules/styled-system/dist/index.esm.js';
|
|
6
|
+
import { sx } from '../../utils/styled-system/index.js';
|
|
7
|
+
import { variant } from '../../../../../node_modules/@styled-system/variant/dist/index.esm.js';
|
|
8
|
+
|
|
9
|
+
const Chip = ({
|
|
10
|
+
children,
|
|
11
|
+
size = 'm',
|
|
12
|
+
variant = 'primary',
|
|
13
|
+
leadingIcon: LeadingIcon,
|
|
14
|
+
trailingIcon: TrailingIcon,
|
|
15
|
+
sx
|
|
16
|
+
}) => /*#__PURE__*/React.createElement(BaseChip, {
|
|
17
|
+
sx: sx,
|
|
18
|
+
size: size,
|
|
19
|
+
variant: variant,
|
|
20
|
+
leadingIcon: LeadingIcon,
|
|
21
|
+
trailingIcon: TrailingIcon
|
|
22
|
+
}, LeadingIcon ? /*#__PURE__*/React.createElement(LeadingIcon, null) : null, children, TrailingIcon ? /*#__PURE__*/React.createElement(TrailingIcon, null) : null);
|
|
23
|
+
const BaseChip = Qe.span({
|
|
24
|
+
position: 'relative',
|
|
25
|
+
width: 'fit-content',
|
|
26
|
+
borderRadius: radii.full,
|
|
27
|
+
outline: 'none',
|
|
28
|
+
display: 'flex',
|
|
29
|
+
flexDirection: 'row',
|
|
30
|
+
alignItems: 'center'
|
|
31
|
+
}, ({
|
|
32
|
+
leadingIcon,
|
|
33
|
+
trailingIcon
|
|
34
|
+
}) => variant({
|
|
35
|
+
prop: 'size',
|
|
36
|
+
variants: {
|
|
37
|
+
l: {
|
|
38
|
+
'pl': leadingIcon ? 2 : 3,
|
|
39
|
+
'pr': trailingIcon ? 2 : 3,
|
|
40
|
+
'py': 1,
|
|
41
|
+
'fontSize': typography['s'].fontSize,
|
|
42
|
+
'fontWeight': typography['s'].fontWeight,
|
|
43
|
+
'lineHeight': typography['s'].lineHeight,
|
|
44
|
+
'columnGap': 1,
|
|
45
|
+
'& svg': {
|
|
46
|
+
width: 16,
|
|
47
|
+
height: 16
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
m: {
|
|
51
|
+
'pl': leadingIcon ? 2 : 3,
|
|
52
|
+
'pr': trailingIcon ? 2 : 3,
|
|
53
|
+
'py': 1,
|
|
54
|
+
'fontSize': typography['xs'].fontSize,
|
|
55
|
+
'fontWeight': typography['xs'].fontWeight,
|
|
56
|
+
'lineHeight': typography['xs'].lineHeight,
|
|
57
|
+
'columnGap': 0.5,
|
|
58
|
+
'& svg': {
|
|
59
|
+
width: 16,
|
|
60
|
+
height: 16
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
s: {
|
|
64
|
+
'pl': !leadingIcon && trailingIcon ? 3 : 2,
|
|
65
|
+
'pr': leadingIcon && !trailingIcon ? 3 : 2,
|
|
66
|
+
'py': 0.5,
|
|
67
|
+
'fontSize': typography['xxs'].fontSize,
|
|
68
|
+
'fontWeight': typography['xxs'].fontWeight,
|
|
69
|
+
'lineHeight': typography['xxs'].lineHeight,
|
|
70
|
+
'columnGap': 0.5,
|
|
71
|
+
'& svg': {
|
|
72
|
+
width: 12,
|
|
73
|
+
height: 12
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}), variant({
|
|
78
|
+
prop: 'variant',
|
|
79
|
+
variants: {
|
|
80
|
+
'primary': {
|
|
81
|
+
'backgroundColor': color['bg/primary'],
|
|
82
|
+
'color': color['text/inverse'],
|
|
83
|
+
'& svg': {
|
|
84
|
+
color: color['icon/inverse']
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
'secondary': {
|
|
88
|
+
'backgroundColor': color['bg/secondary'],
|
|
89
|
+
'color': color['text/primary'],
|
|
90
|
+
'& svg': {
|
|
91
|
+
color: color['icon/primary']
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
'outlined-primary': {
|
|
95
|
+
'backgroundColor': color['bg/neutral/subtler'],
|
|
96
|
+
'color': color['text/primary'],
|
|
97
|
+
'& svg': {
|
|
98
|
+
color: color['icon/primary']
|
|
99
|
+
},
|
|
100
|
+
':after': {
|
|
101
|
+
content: '""',
|
|
102
|
+
position: 'absolute',
|
|
103
|
+
top: 0,
|
|
104
|
+
right: 0,
|
|
105
|
+
bottom: 0,
|
|
106
|
+
left: 0,
|
|
107
|
+
borderWidth: 1,
|
|
108
|
+
borderStyle: 'solid',
|
|
109
|
+
borderColor: color['border/primary'],
|
|
110
|
+
borderRadius: radii.full,
|
|
111
|
+
boxSizing: 'border-box'
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
'outlined-neutral': {
|
|
115
|
+
'backgroundColor': color['bg/neutral/subtler'],
|
|
116
|
+
'color': color['text/neutral/subtle'],
|
|
117
|
+
'& svg': {
|
|
118
|
+
color: color['icon/neutral/bolder']
|
|
119
|
+
},
|
|
120
|
+
':after': {
|
|
121
|
+
content: '""',
|
|
122
|
+
position: 'absolute',
|
|
123
|
+
top: 0,
|
|
124
|
+
right: 0,
|
|
125
|
+
bottom: 0,
|
|
126
|
+
left: 0,
|
|
127
|
+
borderWidth: 1,
|
|
128
|
+
borderStyle: 'solid',
|
|
129
|
+
borderColor: color['border/neutral/bolder'],
|
|
130
|
+
borderRadius: radii.full,
|
|
131
|
+
boxSizing: 'border-box'
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
'neutral': {
|
|
135
|
+
'backgroundColor': color['bg/neutral'],
|
|
136
|
+
'color': color['text/neutral/subtle'],
|
|
137
|
+
'& svg': {
|
|
138
|
+
color: color['icon/neutral/bolder']
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
'red': {
|
|
142
|
+
'backgroundColor': color['bg/accent/red/subtlest'],
|
|
143
|
+
'color': color['text/accent/red'],
|
|
144
|
+
'& svg': {
|
|
145
|
+
color: color['icon/accent/red']
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
'red-accent': {
|
|
149
|
+
'backgroundColor': color['bg/accent/red'],
|
|
150
|
+
'color': color['text/inverse'],
|
|
151
|
+
'& svg': {
|
|
152
|
+
color: color['icon/inverse']
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
'yellow': {
|
|
156
|
+
'backgroundColor': color['bg/accent/yellow/subtlest'],
|
|
157
|
+
'color': color['text/accent/yellow'],
|
|
158
|
+
'& svg': {
|
|
159
|
+
color: color['icon/accent/yellow']
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
'green': {
|
|
163
|
+
'backgroundColor': color['bg/accent/green/subtlest'],
|
|
164
|
+
'color': color['text/accent/green'],
|
|
165
|
+
'& svg': {
|
|
166
|
+
color: color['icon/accent/green']
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
'dim': {
|
|
170
|
+
'backgroundColor': color['dim'],
|
|
171
|
+
'color': color['text/inverse'],
|
|
172
|
+
'& svg': {
|
|
173
|
+
color: color['icon/inverse']
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}), sx);
|
|
178
|
+
|
|
179
|
+
export { Chip as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Qe from '../../../../../node_modules/styled-components/dist/styled-components.esm.js';
|
|
2
|
+
import Text from '../Text/index.js';
|
|
3
|
+
|
|
4
|
+
const GradientText = Qe(Text)`
|
|
5
|
+
background: ${({
|
|
6
|
+
theme
|
|
7
|
+
}) => `linear-gradient(${theme.gradients['text/accent']})`};
|
|
8
|
+
background-clip: text;
|
|
9
|
+
-webkit-background-clip: text;
|
|
10
|
+
-webkit-text-fill-color: transparent;
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
export { GradientText as default };
|