@teammodlr/ui-kit 2.1.7 → 2.1.9
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/lib/components/avatargroup/symbol.d.ts +2 -2
- package/lib/components/breadcrumb/style/index.d.ts +1 -1
- package/lib/components/breadcrumb/symbol.d.ts +1 -1
- package/lib/components/buttongroup/symbol.d.ts +2 -2
- package/lib/components/colorpicker/ColorPicker.vue.d.ts +1 -1
- package/lib/components/dropdown/Dropdown.vue.d.ts +1 -1
- package/lib/components/dropdown/symbol.d.ts +1 -1
- package/lib/components/form/symbol.d.ts +1 -1
- package/lib/components/messageprovider/style/index.d.ts +1 -1
- package/lib/components/radiobuttongroup/symbol.d.ts +2 -2
- package/lib/components/tooltip/Tooltip.vue.d.ts +1 -1
- package/lib/components/tree/TreeNode.vue.d.ts +2 -0
- package/lib/components/tree/TreeNodeToggle.vue.d.ts +7 -1
- package/lib/components/tree/props.d.ts +4 -4
- package/lib/components/tree/style/Tree.css.d.ts +7 -0
- package/lib/components/tree/style/index.d.ts +1 -0
- package/lib/components/tree/types.d.ts +11 -10
- package/lib/composables/element.d.ts +1 -1
- package/lib/composables/useInteractive.d.ts +1 -1
- package/lib/composables/useMount.d.ts +1 -1
- package/lib/composables/usePopper.d.ts +2 -2
- package/lib/composables/useZIndex.d.ts +1 -1
- package/lib/index.cjs.js +9 -9
- package/lib/index.es.js +2522 -2490
- package/lib/install.d.ts +1 -1
- package/lib/nuxt.js +17 -15
- package/lib/nuxt.plugin.js +6 -6
- package/lib/style.css +1 -1
- package/package.json +89 -79
- package/src/__storybook__/argTypes.ts +5 -13
- package/src/__storybook__/createStory.ts +10 -10
- package/src/call.ts +14 -14
- package/src/components/avatar/Avatar.vue +1 -1
- package/src/components/avatar/examples/index.stories.ts +4 -7
- package/src/components/avatar/style/Avatar.css.ts +17 -17
- package/src/components/avatargroup/examples/index.stories.ts +5 -10
- package/src/components/avatargroup/style/AvatarGroup.css.ts +9 -4
- package/src/components/avatargroup/symbol.ts +5 -5
- package/src/components/badge/examples/index.stories.ts +4 -6
- package/src/components/badge/style/Badge.css.ts +36 -36
- package/src/components/breadcrumb/examples/index.stories.ts +6 -10
- package/src/components/breadcrumb/style/Breadcrumb.css.ts +17 -17
- package/src/components/breadcrumb/style/index.ts +1 -1
- package/src/components/breadcrumb/symbol.ts +4 -3
- package/src/components/button/examples/index.stories.ts +4 -4
- package/src/components/button/style/Button.css.ts +143 -133
- package/src/components/buttongroup/examples/index.stories.ts +6 -12
- package/src/components/buttongroup/style/ButtonGroup.css.ts +13 -11
- package/src/components/buttongroup/symbol.ts +5 -4
- package/src/components/checkbox/Checkbox.vue +8 -8
- package/src/components/checkbox/examples/index.stories.ts +4 -9
- package/src/components/checkbox/examples/index.ts +0 -1
- package/src/components/checkbox/style/Checkbox.css.ts +31 -27
- package/src/components/checkbox/style/index.ts +1 -1
- package/src/components/colorpicker/examples/index.stories.ts +5 -10
- package/src/components/colorpicker/examples/index.ts +1 -1
- package/src/components/colorpicker/style/ColorPicker.css.ts +22 -14
- package/src/components/colorpicker/utils.ts +46 -28
- package/src/components/confirm/examples/index.stories.ts +5 -8
- package/src/components/confirm/props.ts +2 -2
- package/src/components/confirm/providerProps.ts +1 -2
- package/src/components/confirm/types.ts +15 -16
- package/src/components/confirm/useConfirm.ts +3 -1
- package/src/components/dialog/examples/index.stories.ts +5 -9
- package/src/components/dialog/style/Dialog.css.ts +38 -37
- package/src/components/dropdown/examples/index.stories.ts +3 -7
- package/src/components/dropdown/hooks.ts +20 -20
- package/src/components/dropdown/style/Dropdown.css.ts +24 -24
- package/src/components/dropdown/symbol.ts +3 -2
- package/src/components/form/Form.vue +1 -1
- package/src/components/form/examples/index.stories.ts +2 -4
- package/src/components/form/style/Form.css.ts +13 -8
- package/src/components/form/style/index.ts +2 -2
- package/src/components/form/symbol.ts +10 -5
- package/src/components/image/examples/index.stories.ts +5 -7
- package/src/components/input/Input.vue +8 -9
- package/src/components/input/examples/index.stories.ts +5 -7
- package/src/components/input/style/Input.css.ts +40 -43
- package/src/components/link/examples/index.stories.ts +4 -9
- package/src/components/messageprovider/examples/index.stories.ts +5 -8
- package/src/components/messageprovider/style/Message.css.ts +31 -31
- package/src/components/messageprovider/style/index.ts +1 -1
- package/src/components/messageprovider/types.ts +31 -22
- package/src/components/messageprovider/useMessage.ts +6 -4
- package/src/components/modal/examples/index.stories.ts +5 -10
- package/src/components/modal/style/Modal.css.ts +76 -73
- package/src/components/pagination/examples/index.stories.ts +5 -9
- package/src/components/pagination/examples/index.ts +1 -1
- package/src/components/pagination/style/Pagination.css.ts +41 -37
- package/src/components/radio/Radio.vue +7 -7
- package/src/components/radio/examples/index.stories.ts +4 -9
- package/src/components/radio/examples/index.ts +0 -1
- package/src/components/radio/style/Checkbox.css.ts +30 -31
- package/src/components/radio/style/index.ts +1 -1
- package/src/components/radiobutton/RadioButton.vue +3 -3
- package/src/components/radiobutton/style/RadioButton.css.ts +41 -36
- package/src/components/radiobuttongroup/examples/index.stories.ts +6 -10
- package/src/components/radiobuttongroup/examples/index.ts +0 -1
- package/src/components/radiobuttongroup/style/RadioButtonGroup.css.ts +14 -14
- package/src/components/radiobuttongroup/style/index.ts +1 -1
- package/src/components/radiobuttongroup/symbol.ts +8 -7
- package/src/components/renderer/examlpes/index.stories.ts +4 -8
- package/src/components/renderer/props.ts +2 -3
- package/src/components/renderer/renderer.ts +3 -3
- package/src/components/select/Select.vue +3 -4
- package/src/components/select/examples/index.stories.ts +4 -10
- package/src/components/select/style/Select.css.ts +62 -61
- package/src/components/skeleton/examples/index.stories.ts +5 -9
- package/src/components/skeleton/style/Skeleton.css.ts +16 -16
- package/src/components/skeleton/style/index.ts +2 -2
- package/src/components/slider/style/Slider.css.ts +12 -5
- package/src/components/switch/Switch.vue +4 -4
- package/src/components/switch/examples/index.stories.ts +4 -9
- package/src/components/switch/examples/index.ts +0 -1
- package/src/components/switch/style/Switch.css.ts +56 -57
- package/src/components/switch/style/index.ts +1 -1
- package/src/components/tab/examples/index.stories.ts +5 -11
- package/src/components/table/examples/index.stories.ts +6 -12
- package/src/components/table/style/Table.css.ts +22 -17
- package/src/components/table/style/index.ts +1 -1
- package/src/components/table/types/index.ts +1 -1
- package/src/components/tag/examples/index.stories.ts +4 -10
- package/src/components/tag/style/Tag.css.ts +14 -9
- package/src/components/textarea/Textarea.vue +7 -8
- package/src/components/textarea/examples/index.stories.ts +4 -8
- package/src/components/textarea/style/Textarea.css.ts +33 -33
- package/src/components/tooltip/examples/index.stories.ts +5 -10
- package/src/components/tooltip/examples/index.ts +2 -2
- package/src/components/tooltip/style/Tooltip.css.ts +24 -25
- package/src/components/transfer/examples/index.stories.ts +5 -9
- package/src/components/transfer/style/Transfer.css.ts +41 -40
- package/src/components/tree/Tree.vue +110 -109
- package/src/components/tree/TreeNode.vue +29 -23
- package/src/components/tree/TreeNodeToggle.vue +37 -25
- package/src/components/tree/examples/basic.vue +1 -1
- package/src/components/tree/examples/index.stories.ts +6 -10
- package/src/components/tree/props.ts +20 -18
- package/src/components/tree/style/Tree.css.ts +75 -0
- package/src/components/tree/style/index.ts +1 -0
- package/src/components/tree/types.ts +60 -61
- package/src/components/virtualscroll/examples/index.stories.ts +4 -8
- package/src/components/virtualscroll/style/VirtualScroll.css.ts +1 -2
- package/src/composables/element.ts +4 -4
- package/src/composables/useCachedUid.ts +7 -6
- package/src/composables/useEventListener.ts +11 -6
- package/src/composables/useInput.ts +63 -41
- package/src/composables/useInteractive.ts +10 -11
- package/src/composables/useMergedState.ts +7 -7
- package/src/composables/useMount.ts +11 -11
- package/src/composables/usePopper.ts +57 -36
- package/src/composables/useZIndex.ts +5 -5
- package/src/create.ts +10 -6
- package/src/examples/cards/cards.stories.ts +3 -3
- package/src/examples/modal/modal.stories.ts +3 -3
- package/src/exports/nuxt.js +17 -15
- package/src/exports/nuxt.plugin.js +6 -6
- package/src/index.ts +0 -2
- package/src/install.ts +5 -5
- package/src/shims-vue.d.ts +3 -3
- package/src/styles/theme.css.ts +51 -43
- package/src/styles/transitions.css.ts +26 -28
- package/src/types/props.ts +16 -2
- package/src/utils/injection.ts +3 -3
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
createVar,
|
|
3
|
+
globalKeyframes,
|
|
4
|
+
globalStyle,
|
|
5
|
+
style,
|
|
6
|
+
styleVariants
|
|
7
|
+
} from '@vanilla-extract/css';
|
|
8
|
+
import { themeVars } from '../../../styles/theme.css';
|
|
3
9
|
|
|
4
10
|
const sizes = {
|
|
5
11
|
xs: '22px',
|
|
6
12
|
sm: '28px',
|
|
7
13
|
md: '36px',
|
|
8
14
|
lg: '40px',
|
|
9
|
-
xl: '45px'
|
|
15
|
+
xl: '45px'
|
|
10
16
|
};
|
|
11
17
|
|
|
12
18
|
const borderRadiuses = {
|
|
@@ -14,7 +20,7 @@ const borderRadiuses = {
|
|
|
14
20
|
sm: '3px',
|
|
15
21
|
md: '4px',
|
|
16
22
|
lg: '6px',
|
|
17
|
-
xl: '8px'
|
|
23
|
+
xl: '8px'
|
|
18
24
|
};
|
|
19
25
|
|
|
20
26
|
const padding = {
|
|
@@ -22,8 +28,8 @@ const padding = {
|
|
|
22
28
|
sm: `0 ${themeVars.space[2]}`,
|
|
23
29
|
md: `0 ${themeVars.space[3]}`,
|
|
24
30
|
lg: `0 ${themeVars.space[3]}`,
|
|
25
|
-
xl: `0 ${themeVars.space[4]}
|
|
26
|
-
}
|
|
31
|
+
xl: `0 ${themeVars.space[4]}`
|
|
32
|
+
};
|
|
27
33
|
|
|
28
34
|
export const vars = {
|
|
29
35
|
height: createVar(),
|
|
@@ -32,15 +38,15 @@ export const vars = {
|
|
|
32
38
|
backgroundColor: createVar(),
|
|
33
39
|
borderColor: createVar(),
|
|
34
40
|
boxShadowColor: createVar(),
|
|
35
|
-
color: createVar()
|
|
36
|
-
}
|
|
41
|
+
color: createVar()
|
|
42
|
+
};
|
|
37
43
|
|
|
38
44
|
export const base = style({
|
|
39
45
|
alignItems: 'center',
|
|
40
46
|
boxSizing: 'border-box',
|
|
41
47
|
display: 'inline-flex',
|
|
42
48
|
fontSize: themeVars.fontSize.base,
|
|
43
|
-
fontWeight:
|
|
49
|
+
fontWeight: '500',
|
|
44
50
|
maxWidth: '100%',
|
|
45
51
|
width: 'auto',
|
|
46
52
|
position: 'relative',
|
|
@@ -53,7 +59,7 @@ export const base = style({
|
|
|
53
59
|
lineHeight: vars.height,
|
|
54
60
|
borderRadius: vars.radius,
|
|
55
61
|
padding: vars.padding,
|
|
56
|
-
zIndex:
|
|
62
|
+
zIndex: 'auto',
|
|
57
63
|
backgroundColor: vars.backgroundColor,
|
|
58
64
|
border: 0,
|
|
59
65
|
color: vars.color,
|
|
@@ -63,10 +69,10 @@ export const base = style({
|
|
|
63
69
|
border-color .25s ${themeVars.transition.default}`,
|
|
64
70
|
fontFamily: 'inherit',
|
|
65
71
|
':hover': {
|
|
66
|
-
cursor: 'pointer'
|
|
72
|
+
cursor: 'pointer'
|
|
67
73
|
},
|
|
68
74
|
':focus': {
|
|
69
|
-
outline: 'none'
|
|
75
|
+
outline: 'none'
|
|
70
76
|
}
|
|
71
77
|
});
|
|
72
78
|
|
|
@@ -76,18 +82,18 @@ export const variant = styleVariants({
|
|
|
76
82
|
[vars.backgroundColor]: themeVars.color.blue[500],
|
|
77
83
|
[vars.borderColor]: themeVars.color.blue[500],
|
|
78
84
|
[vars.boxShadowColor]: themeVars.color.blue[500],
|
|
79
|
-
[vars.color]: '#FFFFFF'
|
|
85
|
+
[vars.color]: '#FFFFFF'
|
|
80
86
|
},
|
|
81
87
|
':hover': {
|
|
82
88
|
vars: {
|
|
83
89
|
[vars.backgroundColor]: themeVars.color.blue[600],
|
|
84
|
-
[vars.borderColor]: themeVars.color.blue[600]
|
|
85
|
-
}
|
|
90
|
+
[vars.borderColor]: themeVars.color.blue[600]
|
|
91
|
+
}
|
|
86
92
|
},
|
|
87
93
|
':focus': {
|
|
88
94
|
vars: {
|
|
89
95
|
[vars.backgroundColor]: themeVars.color.blue[600],
|
|
90
|
-
[vars.borderColor]: themeVars.color.blue[600]
|
|
96
|
+
[vars.borderColor]: themeVars.color.blue[600]
|
|
91
97
|
}
|
|
92
98
|
}
|
|
93
99
|
},
|
|
@@ -96,18 +102,18 @@ export const variant = styleVariants({
|
|
|
96
102
|
[vars.backgroundColor]: themeVars.color.saxe[700],
|
|
97
103
|
[vars.borderColor]: themeVars.color.saxe[700],
|
|
98
104
|
[vars.boxShadowColor]: themeVars.color.saxe[700],
|
|
99
|
-
[vars.color]: '#FFFFFF'
|
|
105
|
+
[vars.color]: '#FFFFFF'
|
|
100
106
|
},
|
|
101
107
|
':hover': {
|
|
102
108
|
vars: {
|
|
103
109
|
[vars.backgroundColor]: themeVars.color.saxe[800],
|
|
104
|
-
[vars.borderColor]: themeVars.color.saxe[800]
|
|
105
|
-
}
|
|
110
|
+
[vars.borderColor]: themeVars.color.saxe[800]
|
|
111
|
+
}
|
|
106
112
|
},
|
|
107
113
|
':focus': {
|
|
108
114
|
vars: {
|
|
109
115
|
[vars.backgroundColor]: themeVars.color.saxe[900],
|
|
110
|
-
[vars.borderColor]: themeVars.color.saxe[900]
|
|
116
|
+
[vars.borderColor]: themeVars.color.saxe[900]
|
|
111
117
|
}
|
|
112
118
|
}
|
|
113
119
|
},
|
|
@@ -116,18 +122,18 @@ export const variant = styleVariants({
|
|
|
116
122
|
[vars.color]: themeVars.color.font.text,
|
|
117
123
|
[vars.backgroundColor]: 'white',
|
|
118
124
|
[vars.boxShadowColor]: themeVars.color.blue[500],
|
|
119
|
-
[vars.borderColor]: themeVars.color.gray[300]
|
|
125
|
+
[vars.borderColor]: themeVars.color.gray[300]
|
|
120
126
|
},
|
|
121
127
|
':hover': {
|
|
122
128
|
vars: {
|
|
123
129
|
[vars.color]: themeVars.color.blue[500],
|
|
124
130
|
[vars.borderColor]: themeVars.color.blue[500]
|
|
125
|
-
}
|
|
131
|
+
}
|
|
126
132
|
},
|
|
127
133
|
':focus': {
|
|
128
134
|
vars: {
|
|
129
135
|
[vars.color]: themeVars.color.blue[500],
|
|
130
|
-
[vars.borderColor]: themeVars.color.blue[500]
|
|
136
|
+
[vars.borderColor]: themeVars.color.blue[500]
|
|
131
137
|
}
|
|
132
138
|
}
|
|
133
139
|
},
|
|
@@ -136,14 +142,14 @@ export const variant = styleVariants({
|
|
|
136
142
|
[vars.color]: themeVars.color.font.default,
|
|
137
143
|
[vars.backgroundColor]: themeVars.color.gray[100],
|
|
138
144
|
[vars.boxShadowColor]: themeVars.color.blue[100],
|
|
139
|
-
[vars.borderColor]: themeVars.color.gray[300]
|
|
145
|
+
[vars.borderColor]: themeVars.color.gray[300]
|
|
140
146
|
},
|
|
141
147
|
':hover': {
|
|
142
148
|
vars: {
|
|
143
149
|
[vars.color]: themeVars.color.font.default,
|
|
144
150
|
[vars.backgroundColor]: themeVars.color.gray[250],
|
|
145
151
|
[vars.borderColor]: themeVars.color.gray[300]
|
|
146
|
-
}
|
|
152
|
+
}
|
|
147
153
|
},
|
|
148
154
|
':focus': {
|
|
149
155
|
vars: {
|
|
@@ -158,19 +164,19 @@ export const variant = styleVariants({
|
|
|
158
164
|
[vars.backgroundColor]: themeVars.color.green[500],
|
|
159
165
|
[vars.borderColor]: themeVars.color.green[500],
|
|
160
166
|
[vars.boxShadowColor]: themeVars.color.green[500],
|
|
161
|
-
[vars.color]: '#FFFFFF'
|
|
167
|
+
[vars.color]: '#FFFFFF'
|
|
162
168
|
},
|
|
163
169
|
':hover': {
|
|
164
170
|
vars: {
|
|
165
171
|
[vars.backgroundColor]: themeVars.color.green[600],
|
|
166
172
|
[vars.borderColor]: themeVars.color.green[600],
|
|
167
|
-
[vars.color]: '#FFFFFF'
|
|
168
|
-
}
|
|
173
|
+
[vars.color]: '#FFFFFF'
|
|
174
|
+
}
|
|
169
175
|
},
|
|
170
176
|
':focus': {
|
|
171
177
|
vars: {
|
|
172
178
|
[vars.borderColor]: themeVars.color.green[600],
|
|
173
|
-
[vars.backgroundColor]: themeVars.color.green[600]
|
|
179
|
+
[vars.backgroundColor]: themeVars.color.green[600]
|
|
174
180
|
}
|
|
175
181
|
}
|
|
176
182
|
},
|
|
@@ -179,19 +185,19 @@ export const variant = styleVariants({
|
|
|
179
185
|
[vars.backgroundColor]: themeVars.color.amber[400],
|
|
180
186
|
[vars.borderColor]: themeVars.color.amber[400],
|
|
181
187
|
[vars.boxShadowColor]: themeVars.color.amber[400],
|
|
182
|
-
[vars.color]: themeVars.color.gray[800]
|
|
188
|
+
[vars.color]: themeVars.color.gray[800]
|
|
183
189
|
},
|
|
184
190
|
':hover': {
|
|
185
191
|
vars: {
|
|
186
192
|
[vars.backgroundColor]: themeVars.color.amber[500],
|
|
187
193
|
[vars.borderColor]: themeVars.color.amber[500],
|
|
188
|
-
[vars.color]: themeVars.color.gray[900]
|
|
189
|
-
}
|
|
194
|
+
[vars.color]: themeVars.color.gray[900]
|
|
195
|
+
}
|
|
190
196
|
},
|
|
191
197
|
':focus': {
|
|
192
198
|
vars: {
|
|
193
199
|
[vars.borderColor]: themeVars.color.amber[500],
|
|
194
|
-
[vars.backgroundColor]: themeVars.color.amber[500]
|
|
200
|
+
[vars.backgroundColor]: themeVars.color.amber[500]
|
|
195
201
|
}
|
|
196
202
|
}
|
|
197
203
|
},
|
|
@@ -200,21 +206,21 @@ export const variant = styleVariants({
|
|
|
200
206
|
[vars.backgroundColor]: themeVars.color.red[500],
|
|
201
207
|
[vars.borderColor]: themeVars.color.red[500],
|
|
202
208
|
[vars.boxShadowColor]: themeVars.color.red[500],
|
|
203
|
-
[vars.color]: '#FFFFFF'
|
|
209
|
+
[vars.color]: '#FFFFFF'
|
|
204
210
|
},
|
|
205
211
|
':hover': {
|
|
206
212
|
vars: {
|
|
207
213
|
[vars.backgroundColor]: themeVars.color.red[600],
|
|
208
|
-
[vars.borderColor]: themeVars.color.red[600]
|
|
209
|
-
}
|
|
214
|
+
[vars.borderColor]: themeVars.color.red[600]
|
|
215
|
+
}
|
|
210
216
|
},
|
|
211
217
|
':focus': {
|
|
212
218
|
vars: {
|
|
213
219
|
[vars.borderColor]: themeVars.color.red[600],
|
|
214
|
-
[vars.backgroundColor]: themeVars.color.red[600]
|
|
220
|
+
[vars.backgroundColor]: themeVars.color.red[600]
|
|
215
221
|
}
|
|
216
222
|
}
|
|
217
|
-
}
|
|
223
|
+
}
|
|
218
224
|
});
|
|
219
225
|
|
|
220
226
|
export const secondary = styleVariants({
|
|
@@ -222,149 +228,149 @@ export const secondary = styleVariants({
|
|
|
222
228
|
vars: {
|
|
223
229
|
[vars.backgroundColor]: themeVars.color.blue[100],
|
|
224
230
|
[vars.borderColor]: themeVars.color.blue[100],
|
|
225
|
-
[vars.color]: themeVars.color.blue[500]
|
|
231
|
+
[vars.color]: themeVars.color.blue[500]
|
|
226
232
|
},
|
|
227
233
|
':hover': {
|
|
228
234
|
vars: {
|
|
229
235
|
[vars.backgroundColor]: themeVars.color.blue[200],
|
|
230
236
|
[vars.borderColor]: themeVars.color.blue[200],
|
|
231
|
-
[vars.color]: themeVars.color.blue[600]
|
|
232
|
-
}
|
|
237
|
+
[vars.color]: themeVars.color.blue[600]
|
|
238
|
+
}
|
|
233
239
|
},
|
|
234
240
|
':focus': {
|
|
235
241
|
vars: {
|
|
236
242
|
[vars.backgroundColor]: themeVars.color.blue[200],
|
|
237
243
|
[vars.borderColor]: themeVars.color.blue[200],
|
|
238
|
-
[vars.color]: themeVars.color.blue[600]
|
|
239
|
-
}
|
|
244
|
+
[vars.color]: themeVars.color.blue[600]
|
|
245
|
+
}
|
|
240
246
|
}
|
|
241
247
|
},
|
|
242
248
|
dark: {
|
|
243
249
|
vars: {
|
|
244
250
|
[vars.backgroundColor]: themeVars.color.saxe[100],
|
|
245
251
|
[vars.borderColor]: themeVars.color.saxe[100],
|
|
246
|
-
[vars.color]: themeVars.color.saxe[700]
|
|
252
|
+
[vars.color]: themeVars.color.saxe[700]
|
|
247
253
|
},
|
|
248
254
|
':hover': {
|
|
249
255
|
vars: {
|
|
250
256
|
[vars.backgroundColor]: themeVars.color.saxe[200],
|
|
251
257
|
[vars.borderColor]: themeVars.color.saxe[200],
|
|
252
|
-
[vars.color]: themeVars.color.saxe[800]
|
|
253
|
-
}
|
|
258
|
+
[vars.color]: themeVars.color.saxe[800]
|
|
259
|
+
}
|
|
254
260
|
},
|
|
255
261
|
':focus': {
|
|
256
262
|
vars: {
|
|
257
263
|
[vars.backgroundColor]: themeVars.color.saxe[200],
|
|
258
264
|
[vars.borderColor]: themeVars.color.saxe[200],
|
|
259
|
-
[vars.color]: themeVars.color.saxe[800]
|
|
260
|
-
}
|
|
265
|
+
[vars.color]: themeVars.color.saxe[800]
|
|
266
|
+
}
|
|
261
267
|
}
|
|
262
268
|
},
|
|
263
269
|
default: {
|
|
264
270
|
vars: {
|
|
265
271
|
[vars.backgroundColor]: themeVars.color.gray[100],
|
|
266
272
|
[vars.borderColor]: themeVars.color.gray[100],
|
|
267
|
-
[vars.color]: themeVars.color.gray[500]
|
|
273
|
+
[vars.color]: themeVars.color.gray[500]
|
|
268
274
|
},
|
|
269
275
|
':hover': {
|
|
270
276
|
vars: {
|
|
271
277
|
[vars.backgroundColor]: themeVars.color.gray[200],
|
|
272
278
|
[vars.borderColor]: themeVars.color.gray[200],
|
|
273
|
-
[vars.color]: themeVars.color.gray[600]
|
|
274
|
-
}
|
|
279
|
+
[vars.color]: themeVars.color.gray[600]
|
|
280
|
+
}
|
|
275
281
|
},
|
|
276
282
|
':focus': {
|
|
277
283
|
vars: {
|
|
278
284
|
[vars.backgroundColor]: themeVars.color.gray[200],
|
|
279
285
|
[vars.borderColor]: themeVars.color.gray[200],
|
|
280
|
-
[vars.color]: themeVars.color.gray[600]
|
|
281
|
-
}
|
|
286
|
+
[vars.color]: themeVars.color.gray[600]
|
|
287
|
+
}
|
|
282
288
|
}
|
|
283
289
|
},
|
|
284
290
|
tertiary: {
|
|
285
291
|
vars: {
|
|
286
292
|
[vars.backgroundColor]: themeVars.color.gray[100],
|
|
287
293
|
[vars.borderColor]: themeVars.color.gray[100],
|
|
288
|
-
[vars.color]: themeVars.color.gray[400]
|
|
294
|
+
[vars.color]: themeVars.color.gray[400]
|
|
289
295
|
},
|
|
290
296
|
':hover': {
|
|
291
297
|
vars: {
|
|
292
298
|
[vars.backgroundColor]: themeVars.color.gray[200],
|
|
293
299
|
[vars.borderColor]: themeVars.color.gray[200],
|
|
294
|
-
[vars.color]: themeVars.color.gray[500]
|
|
295
|
-
}
|
|
300
|
+
[vars.color]: themeVars.color.gray[500]
|
|
301
|
+
}
|
|
296
302
|
},
|
|
297
303
|
':focus': {
|
|
298
304
|
vars: {
|
|
299
305
|
[vars.backgroundColor]: themeVars.color.gray[200],
|
|
300
306
|
[vars.borderColor]: themeVars.color.gray[200],
|
|
301
|
-
[vars.color]: themeVars.color.gray[500]
|
|
302
|
-
}
|
|
307
|
+
[vars.color]: themeVars.color.gray[500]
|
|
308
|
+
}
|
|
303
309
|
}
|
|
304
310
|
},
|
|
305
311
|
success: {
|
|
306
312
|
vars: {
|
|
307
313
|
[vars.backgroundColor]: themeVars.color.green[100],
|
|
308
314
|
[vars.borderColor]: themeVars.color.green[100],
|
|
309
|
-
[vars.color]: themeVars.color.green[600]
|
|
315
|
+
[vars.color]: themeVars.color.green[600]
|
|
310
316
|
},
|
|
311
317
|
':hover': {
|
|
312
318
|
vars: {
|
|
313
319
|
[vars.backgroundColor]: themeVars.color.green[200],
|
|
314
320
|
[vars.borderColor]: themeVars.color.green[200],
|
|
315
|
-
[vars.color]: themeVars.color.green[700]
|
|
316
|
-
}
|
|
321
|
+
[vars.color]: themeVars.color.green[700]
|
|
322
|
+
}
|
|
317
323
|
},
|
|
318
324
|
':focus': {
|
|
319
325
|
vars: {
|
|
320
326
|
[vars.backgroundColor]: themeVars.color.green[200],
|
|
321
327
|
[vars.borderColor]: themeVars.color.green[200],
|
|
322
|
-
[vars.color]: themeVars.color.green[700]
|
|
323
|
-
}
|
|
328
|
+
[vars.color]: themeVars.color.green[700]
|
|
329
|
+
}
|
|
324
330
|
}
|
|
325
331
|
},
|
|
326
332
|
warning: {
|
|
327
333
|
vars: {
|
|
328
334
|
[vars.backgroundColor]: themeVars.color.amber[100],
|
|
329
335
|
[vars.borderColor]: themeVars.color.amber[100],
|
|
330
|
-
[vars.color]: themeVars.color.amber[600]
|
|
336
|
+
[vars.color]: themeVars.color.amber[600]
|
|
331
337
|
},
|
|
332
338
|
':hover': {
|
|
333
339
|
vars: {
|
|
334
340
|
[vars.backgroundColor]: themeVars.color.amber[200],
|
|
335
341
|
[vars.borderColor]: themeVars.color.amber[200],
|
|
336
|
-
[vars.color]: themeVars.color.amber[700]
|
|
337
|
-
}
|
|
342
|
+
[vars.color]: themeVars.color.amber[700]
|
|
343
|
+
}
|
|
338
344
|
},
|
|
339
345
|
':focus': {
|
|
340
346
|
vars: {
|
|
341
347
|
[vars.backgroundColor]: themeVars.color.amber[200],
|
|
342
348
|
[vars.borderColor]: themeVars.color.amber[200],
|
|
343
|
-
[vars.color]: themeVars.color.amber[700]
|
|
344
|
-
}
|
|
349
|
+
[vars.color]: themeVars.color.amber[700]
|
|
350
|
+
}
|
|
345
351
|
}
|
|
346
352
|
},
|
|
347
353
|
error: {
|
|
348
354
|
vars: {
|
|
349
355
|
[vars.backgroundColor]: themeVars.color.red[100],
|
|
350
356
|
[vars.borderColor]: themeVars.color.red[100],
|
|
351
|
-
[vars.color]: themeVars.color.red[500]
|
|
357
|
+
[vars.color]: themeVars.color.red[500]
|
|
352
358
|
},
|
|
353
359
|
':hover': {
|
|
354
360
|
vars: {
|
|
355
361
|
[vars.backgroundColor]: themeVars.color.red[200],
|
|
356
362
|
[vars.borderColor]: themeVars.color.red[200],
|
|
357
|
-
[vars.color]: themeVars.color.red[600]
|
|
358
|
-
}
|
|
363
|
+
[vars.color]: themeVars.color.red[600]
|
|
364
|
+
}
|
|
359
365
|
},
|
|
360
366
|
':focus': {
|
|
361
367
|
vars: {
|
|
362
368
|
[vars.backgroundColor]: themeVars.color.red[200],
|
|
363
369
|
[vars.borderColor]: themeVars.color.red[200],
|
|
364
|
-
[vars.color]: themeVars.color.red[600]
|
|
365
|
-
}
|
|
370
|
+
[vars.color]: themeVars.color.red[600]
|
|
371
|
+
}
|
|
366
372
|
}
|
|
367
|
-
}
|
|
373
|
+
}
|
|
368
374
|
});
|
|
369
375
|
|
|
370
376
|
export const link = styleVariants({
|
|
@@ -372,107 +378,107 @@ export const link = styleVariants({
|
|
|
372
378
|
vars: {
|
|
373
379
|
[vars.backgroundColor]: 'transparent',
|
|
374
380
|
[vars.borderColor]: 'transparent',
|
|
375
|
-
[vars.color]: themeVars.color.blue[500]
|
|
381
|
+
[vars.color]: themeVars.color.blue[500]
|
|
376
382
|
},
|
|
377
383
|
':hover': {
|
|
378
384
|
vars: {
|
|
379
385
|
[vars.backgroundColor]: 'transparent',
|
|
380
386
|
[vars.borderColor]: 'transparent',
|
|
381
|
-
[vars.color]: themeVars.color.blue[600]
|
|
387
|
+
[vars.color]: themeVars.color.blue[600]
|
|
382
388
|
},
|
|
383
|
-
textDecoration: 'underline'
|
|
389
|
+
textDecoration: 'underline'
|
|
384
390
|
}
|
|
385
391
|
},
|
|
386
392
|
dark: {
|
|
387
393
|
vars: {
|
|
388
394
|
[vars.backgroundColor]: 'transparent',
|
|
389
395
|
[vars.borderColor]: 'transparent',
|
|
390
|
-
[vars.color]: themeVars.color.saxe[800]
|
|
396
|
+
[vars.color]: themeVars.color.saxe[800]
|
|
391
397
|
},
|
|
392
398
|
':hover': {
|
|
393
399
|
vars: {
|
|
394
400
|
[vars.backgroundColor]: 'transparent',
|
|
395
401
|
[vars.borderColor]: 'transparent',
|
|
396
|
-
[vars.color]: themeVars.color.saxe[900]
|
|
402
|
+
[vars.color]: themeVars.color.saxe[900]
|
|
397
403
|
},
|
|
398
|
-
textDecoration: 'underline'
|
|
404
|
+
textDecoration: 'underline'
|
|
399
405
|
}
|
|
400
406
|
},
|
|
401
407
|
default: {
|
|
402
408
|
vars: {
|
|
403
409
|
[vars.backgroundColor]: 'transparent',
|
|
404
410
|
[vars.borderColor]: 'transparent',
|
|
405
|
-
[vars.color]: themeVars.color.gray[500]
|
|
411
|
+
[vars.color]: themeVars.color.gray[500]
|
|
406
412
|
},
|
|
407
413
|
':hover': {
|
|
408
414
|
vars: {
|
|
409
415
|
[vars.backgroundColor]: 'transparent',
|
|
410
416
|
[vars.borderColor]: 'transparent',
|
|
411
|
-
[vars.color]: themeVars.color.gray[600]
|
|
417
|
+
[vars.color]: themeVars.color.gray[600]
|
|
412
418
|
},
|
|
413
|
-
textDecoration: 'underline'
|
|
414
|
-
}
|
|
419
|
+
textDecoration: 'underline'
|
|
420
|
+
}
|
|
415
421
|
},
|
|
416
422
|
tertiary: {
|
|
417
423
|
vars: {
|
|
418
424
|
[vars.backgroundColor]: 'transparent',
|
|
419
425
|
[vars.borderColor]: 'transparent',
|
|
420
|
-
[vars.color]: themeVars.color.gray[400]
|
|
426
|
+
[vars.color]: themeVars.color.gray[400]
|
|
421
427
|
},
|
|
422
428
|
':hover': {
|
|
423
429
|
vars: {
|
|
424
430
|
[vars.backgroundColor]: 'transparent',
|
|
425
431
|
[vars.borderColor]: 'transparent',
|
|
426
|
-
[vars.color]: themeVars.color.gray[500]
|
|
432
|
+
[vars.color]: themeVars.color.gray[500]
|
|
427
433
|
},
|
|
428
|
-
textDecoration: 'underline'
|
|
429
|
-
}
|
|
434
|
+
textDecoration: 'underline'
|
|
435
|
+
}
|
|
430
436
|
},
|
|
431
437
|
success: {
|
|
432
438
|
vars: {
|
|
433
439
|
[vars.backgroundColor]: 'transparent',
|
|
434
440
|
[vars.borderColor]: 'transparent',
|
|
435
|
-
[vars.color]: themeVars.color.green[500]
|
|
441
|
+
[vars.color]: themeVars.color.green[500]
|
|
436
442
|
},
|
|
437
443
|
':hover': {
|
|
438
444
|
vars: {
|
|
439
445
|
[vars.backgroundColor]: 'transparent',
|
|
440
446
|
[vars.borderColor]: 'transparent',
|
|
441
|
-
[vars.color]: themeVars.color.green[600]
|
|
447
|
+
[vars.color]: themeVars.color.green[600]
|
|
442
448
|
},
|
|
443
|
-
textDecoration: 'underline'
|
|
449
|
+
textDecoration: 'underline'
|
|
444
450
|
}
|
|
445
451
|
},
|
|
446
452
|
warning: {
|
|
447
453
|
vars: {
|
|
448
454
|
[vars.backgroundColor]: 'transparent',
|
|
449
455
|
[vars.borderColor]: 'transparent',
|
|
450
|
-
[vars.color]: themeVars.color.amber[600]
|
|
456
|
+
[vars.color]: themeVars.color.amber[600]
|
|
451
457
|
},
|
|
452
458
|
':hover': {
|
|
453
459
|
vars: {
|
|
454
460
|
[vars.backgroundColor]: 'transparent',
|
|
455
461
|
[vars.borderColor]: 'transparent',
|
|
456
|
-
[vars.color]: themeVars.color.amber[700]
|
|
462
|
+
[vars.color]: themeVars.color.amber[700]
|
|
457
463
|
},
|
|
458
|
-
textDecoration: 'underline'
|
|
464
|
+
textDecoration: 'underline'
|
|
459
465
|
}
|
|
460
466
|
},
|
|
461
467
|
error: {
|
|
462
468
|
vars: {
|
|
463
469
|
[vars.backgroundColor]: 'transparent',
|
|
464
470
|
[vars.borderColor]: 'transparent',
|
|
465
|
-
[vars.color]: themeVars.color.red[500]
|
|
471
|
+
[vars.color]: themeVars.color.red[500]
|
|
466
472
|
},
|
|
467
473
|
':hover': {
|
|
468
474
|
vars: {
|
|
469
475
|
[vars.backgroundColor]: 'transparent',
|
|
470
476
|
[vars.borderColor]: 'transparent',
|
|
471
|
-
[vars.color]: themeVars.color.red[600]
|
|
477
|
+
[vars.color]: themeVars.color.red[600]
|
|
472
478
|
},
|
|
473
|
-
textDecoration: 'underline'
|
|
479
|
+
textDecoration: 'underline'
|
|
474
480
|
}
|
|
475
|
-
}
|
|
481
|
+
}
|
|
476
482
|
});
|
|
477
483
|
|
|
478
484
|
export const size = styleVariants({
|
|
@@ -480,41 +486,41 @@ export const size = styleVariants({
|
|
|
480
486
|
vars: {
|
|
481
487
|
[vars.height]: sizes.xs,
|
|
482
488
|
[vars.radius]: borderRadiuses.xs,
|
|
483
|
-
[vars.padding]: padding.xs
|
|
489
|
+
[vars.padding]: padding.xs
|
|
484
490
|
},
|
|
485
|
-
fontSize: themeVars.fontSize.small
|
|
491
|
+
fontSize: themeVars.fontSize.small
|
|
486
492
|
},
|
|
487
493
|
sm: {
|
|
488
494
|
vars: {
|
|
489
495
|
[vars.height]: sizes.sm,
|
|
490
496
|
[vars.radius]: borderRadiuses.sm,
|
|
491
|
-
[vars.padding]: padding.sm
|
|
497
|
+
[vars.padding]: padding.sm
|
|
492
498
|
},
|
|
493
|
-
fontSize: themeVars.fontSize.small
|
|
499
|
+
fontSize: themeVars.fontSize.small
|
|
494
500
|
},
|
|
495
501
|
md: {
|
|
496
502
|
vars: {
|
|
497
503
|
[vars.height]: sizes.md,
|
|
498
504
|
[vars.radius]: borderRadiuses.md,
|
|
499
|
-
[vars.padding]: padding.md
|
|
500
|
-
}
|
|
505
|
+
[vars.padding]: padding.md
|
|
506
|
+
}
|
|
501
507
|
},
|
|
502
508
|
lg: {
|
|
503
509
|
vars: {
|
|
504
510
|
[vars.height]: sizes.lg,
|
|
505
511
|
[vars.radius]: borderRadiuses.lg,
|
|
506
|
-
[vars.padding]: padding.lg
|
|
512
|
+
[vars.padding]: padding.lg
|
|
507
513
|
},
|
|
508
|
-
fontSize: themeVars.fontSize.large
|
|
514
|
+
fontSize: themeVars.fontSize.large
|
|
509
515
|
},
|
|
510
516
|
xl: {
|
|
511
517
|
vars: {
|
|
512
518
|
[vars.height]: sizes.xl,
|
|
513
519
|
[vars.radius]: borderRadiuses.xl,
|
|
514
|
-
[vars.padding]: padding.xl
|
|
520
|
+
[vars.padding]: padding.xl
|
|
515
521
|
},
|
|
516
|
-
fontSize: themeVars.fontSize.large
|
|
517
|
-
}
|
|
522
|
+
fontSize: themeVars.fontSize.large
|
|
523
|
+
}
|
|
518
524
|
});
|
|
519
525
|
|
|
520
526
|
const baseBorder = style({
|
|
@@ -525,13 +531,13 @@ const baseBorder = style({
|
|
|
525
531
|
right: 0,
|
|
526
532
|
pointerEvents: 'none',
|
|
527
533
|
borderRadius: 'inherit',
|
|
528
|
-
transition: 'border-color 0.2s ease-in-out'
|
|
534
|
+
transition: 'border-color 0.2s ease-in-out'
|
|
529
535
|
});
|
|
530
536
|
|
|
531
537
|
export const border = style([
|
|
532
538
|
baseBorder,
|
|
533
539
|
{
|
|
534
|
-
border: `1px solid ${vars.borderColor}
|
|
540
|
+
border: `1px solid ${vars.borderColor}`
|
|
535
541
|
}
|
|
536
542
|
]);
|
|
537
543
|
|
|
@@ -544,11 +550,11 @@ export const borderState = style([
|
|
|
544
550
|
]);
|
|
545
551
|
|
|
546
552
|
globalStyle(`${base}:hover ${border}, ${base}:focus ${border}`, {
|
|
547
|
-
borderColor:
|
|
553
|
+
borderColor: 'transparent'
|
|
548
554
|
});
|
|
549
555
|
|
|
550
556
|
globalStyle(`${base}:hover ${borderState}, ${base}:focus ${borderState}`, {
|
|
551
|
-
borderColor: vars.borderColor
|
|
557
|
+
borderColor: vars.borderColor
|
|
552
558
|
});
|
|
553
559
|
|
|
554
560
|
export const wave = style({
|
|
@@ -562,16 +568,17 @@ export const wave = style({
|
|
|
562
568
|
animationIterationCount: 1,
|
|
563
569
|
animationDuration: '0.5s',
|
|
564
570
|
zIndex: 1,
|
|
565
|
-
animationTimingFunction:
|
|
571
|
+
animationTimingFunction:
|
|
572
|
+
'cubic-bezier(0.4, 0, 0.15, 1), cubic-bezier(0.4, 0, 0.4, 1)'
|
|
566
573
|
});
|
|
567
574
|
|
|
568
575
|
const buttonWaveGrow = 'button-wave-grow';
|
|
569
576
|
|
|
570
577
|
globalKeyframes(buttonWaveGrow, {
|
|
571
|
-
|
|
578
|
+
from: {
|
|
572
579
|
boxShadow: `0 0 0.5px 0 ${vars.boxShadowColor}`
|
|
573
580
|
},
|
|
574
|
-
|
|
581
|
+
to: {
|
|
575
582
|
boxShadow: `0 0 0.5px 4.4px ${vars.boxShadowColor}`
|
|
576
583
|
}
|
|
577
584
|
});
|
|
@@ -592,7 +599,7 @@ globalKeyframes(buttonWaveOpacity, {
|
|
|
592
599
|
|
|
593
600
|
export const waveActive = style({
|
|
594
601
|
zIndex: 1,
|
|
595
|
-
animationName: `${buttonWaveGrow}, ${buttonWaveOpacity}
|
|
602
|
+
animationName: `${buttonWaveGrow}, ${buttonWaveOpacity}`
|
|
596
603
|
});
|
|
597
604
|
|
|
598
605
|
export const iconButton = style({
|
|
@@ -604,7 +611,7 @@ export const iconButton = style({
|
|
|
604
611
|
userSelect: 'none',
|
|
605
612
|
padding: 'initial',
|
|
606
613
|
height: vars.height,
|
|
607
|
-
width: vars.height
|
|
614
|
+
width: vars.height
|
|
608
615
|
});
|
|
609
616
|
|
|
610
617
|
export const icon = style({
|
|
@@ -624,45 +631,48 @@ globalStyle(`${icon} > svg`, {
|
|
|
624
631
|
verticalAlign: 'middle'
|
|
625
632
|
});
|
|
626
633
|
|
|
627
|
-
export const iconLeft = style([
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
634
|
+
export const iconLeft = style([
|
|
635
|
+
icon,
|
|
636
|
+
{
|
|
637
|
+
marginRight: themeVars.space[2],
|
|
638
|
+
position: 'relative'
|
|
639
|
+
}
|
|
640
|
+
]);
|
|
631
641
|
|
|
632
642
|
export const iconRight = style({
|
|
633
|
-
marginLeft: themeVars.space[2]
|
|
643
|
+
marginLeft: themeVars.space[2]
|
|
634
644
|
});
|
|
635
645
|
|
|
636
646
|
export const rounded = style({
|
|
637
|
-
borderRadius: '9999px'
|
|
647
|
+
borderRadius: '9999px'
|
|
638
648
|
});
|
|
639
649
|
|
|
640
650
|
export const block = style({
|
|
641
651
|
display: 'flex',
|
|
642
|
-
width: '100%'
|
|
652
|
+
width: '100%'
|
|
643
653
|
});
|
|
644
654
|
|
|
645
655
|
const spinAround = 'spin-around';
|
|
646
656
|
|
|
647
657
|
globalKeyframes(spinAround, {
|
|
648
658
|
'0%': {
|
|
649
|
-
transform:
|
|
659
|
+
transform: 'rotate(0deg)'
|
|
650
660
|
},
|
|
651
661
|
'100%': {
|
|
652
|
-
transform:
|
|
662
|
+
transform: 'rotate(360deg)'
|
|
653
663
|
}
|
|
654
664
|
});
|
|
655
665
|
|
|
656
666
|
export const loading = style({
|
|
657
667
|
pointerEvents: 'none',
|
|
658
|
-
color:
|
|
668
|
+
color: 'transparent',
|
|
659
669
|
userSelect: 'none',
|
|
660
670
|
opacity: 0.75,
|
|
661
671
|
selectors: {
|
|
662
672
|
[`&:after`]: {
|
|
663
|
-
transition:
|
|
664
|
-
position:
|
|
665
|
-
animationIterationCount:
|
|
673
|
+
transition: 'all 0.2s ease-in-out',
|
|
674
|
+
position: 'absolute',
|
|
675
|
+
animationIterationCount: 'infinite',
|
|
666
676
|
animationDuration: '0.75s',
|
|
667
677
|
animationTimingFunction: 'cubic-bezier(0.8, 0.5, 0.4, 0)',
|
|
668
678
|
animationName: spinAround,
|
|
@@ -670,10 +680,10 @@ export const loading = style({
|
|
|
670
680
|
borderColor: `transparent transparent ${vars.color} ${vars.color}`,
|
|
671
681
|
borderStyle: `solid`,
|
|
672
682
|
borderWidth: `2px`,
|
|
673
|
-
content:
|
|
683
|
+
content: '',
|
|
674
684
|
display: `block`,
|
|
675
685
|
height: `1em`,
|
|
676
|
-
width: `1em
|
|
686
|
+
width: `1em`
|
|
677
687
|
}
|
|
678
688
|
}
|
|
679
689
|
});
|