@teammodlr/ui-kit 2.1.41 → 2.1.43

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.
Files changed (268) hide show
  1. package/env.d.ts +1 -1
  2. package/lib/components/checkbox/Checkbox.vue.d.ts +1 -0
  3. package/lib/components/checkbox/style/Checkbox.css.d.ts +1 -0
  4. package/lib/index.cjs.js +8 -8
  5. package/lib/index.es.js +1352 -1342
  6. package/lib/nuxt.js +35 -35
  7. package/lib/nuxt.plugin.js +8 -8
  8. package/lib/style.css +1 -1
  9. package/package.json +89 -89
  10. package/src/__storybook__/argTypes.ts +53 -53
  11. package/src/__storybook__/createStory.ts +15 -15
  12. package/src/__storybook__/index.ts +2 -2
  13. package/src/call.ts +34 -34
  14. package/src/components/avatar/Avatar.vue +110 -110
  15. package/src/components/avatar/examples/basic.vue +6 -6
  16. package/src/components/avatar/examples/custom-size.vue +7 -7
  17. package/src/components/avatar/examples/index.ts +5 -5
  18. package/src/components/avatar/examples/sizes.vue +33 -33
  19. package/src/components/avatar/examples/slots.vue +8 -8
  20. package/src/components/avatar/examples/variants.vue +18 -18
  21. package/src/components/avatar/style/Avatar.css.ts +92 -92
  22. package/src/components/avatar/style/index.ts +1 -1
  23. package/src/components/avatargroup/AvatarGroup.vue +72 -72
  24. package/src/components/avatargroup/examples/basic.vue +37 -37
  25. package/src/components/avatargroup/examples/index.ts +1 -1
  26. package/src/components/avatargroup/style/AvatarGroup.css.ts +26 -26
  27. package/src/components/avatargroup/style/index.ts +1 -1
  28. package/src/components/avatargroup/symbol.ts +17 -17
  29. package/src/components/badge/Badge.vue +43 -43
  30. package/src/components/badge/examples/basic.vue +10 -10
  31. package/src/components/badge/examples/index.ts +1 -1
  32. package/src/components/badge/style/Badge.css.ts +135 -135
  33. package/src/components/badge/style/index.ts +1 -1
  34. package/src/components/breadcrumb/Breadcrumb.vue +54 -54
  35. package/src/components/breadcrumb/BreadcrumbItem.vue +72 -72
  36. package/src/components/breadcrumb/examples/basic.vue +7 -7
  37. package/src/components/breadcrumb/examples/index.ts +1 -1
  38. package/src/components/breadcrumb/style/Breadcrumb.css.ts +40 -40
  39. package/src/components/breadcrumb/style/index.ts +1 -1
  40. package/src/components/breadcrumb/symbol.ts +18 -18
  41. package/src/components/button/Button.vue +203 -203
  42. package/src/components/button/examples/basic.vue +3 -3
  43. package/src/components/button/examples/disabled.vue +3 -3
  44. package/src/components/button/examples/icon-left.vue +12 -12
  45. package/src/components/button/examples/icon.vue +9 -9
  46. package/src/components/button/examples/index.ts +9 -9
  47. package/src/components/button/examples/link.vue +3 -3
  48. package/src/components/button/examples/rounded.vue +7 -7
  49. package/src/components/button/examples/size.vue +7 -7
  50. package/src/components/button/examples/variants-secondary.vue +10 -10
  51. package/src/components/button/examples/variants.vue +10 -10
  52. package/src/components/button/style/Button.css.ts +695 -695
  53. package/src/components/button/style/index.ts +1 -1
  54. package/src/components/buttongroup/ButtonGroup.vue +36 -36
  55. package/src/components/buttongroup/examples/basic.vue +9 -9
  56. package/src/components/buttongroup/examples/icon-group.vue +21 -21
  57. package/src/components/buttongroup/examples/index.ts +2 -2
  58. package/src/components/buttongroup/style/ButtonGroup.css.ts +42 -42
  59. package/src/components/buttongroup/style/index.ts +1 -1
  60. package/src/components/buttongroup/symbol.ts +9 -9
  61. package/src/components/checkbox/Checkbox.vue +149 -145
  62. package/src/components/checkbox/examples/basic.vue +9 -9
  63. package/src/components/checkbox/examples/index.ts +2 -2
  64. package/src/components/checkbox/examples/slot.vue +14 -11
  65. package/src/components/checkbox/style/Checkbox.css.ts +178 -161
  66. package/src/components/checkbox/style/index.ts +1 -1
  67. package/src/components/colorpicker/ColorPicker.vue +333 -333
  68. package/src/components/colorpicker/examples/basic.vue +2 -2
  69. package/src/components/colorpicker/examples/index.ts +1 -1
  70. package/src/components/colorpicker/style/ColorPicker.css.ts +127 -127
  71. package/src/components/colorpicker/style/index.ts +1 -1
  72. package/src/components/colorpicker/utils.ts +206 -206
  73. package/src/components/confirm/Confirm.vue +65 -65
  74. package/src/components/confirm/ConfirmProvider.vue +83 -83
  75. package/src/components/confirm/examples/basic.vue +48 -48
  76. package/src/components/confirm/examples/index.ts +1 -1
  77. package/src/components/confirm/examples/wrapper.vue +9 -9
  78. package/src/components/confirm/props.ts +24 -24
  79. package/src/components/confirm/providerProps.ts +10 -10
  80. package/src/components/confirm/types.ts +33 -33
  81. package/src/components/confirm/useConfirm.ts +14 -14
  82. package/src/components/dialog/Dialog.vue +118 -118
  83. package/src/components/dialog/examples/basic.vue +16 -16
  84. package/src/components/dialog/examples/index.ts +1 -1
  85. package/src/components/dialog/style/Dialog.css.ts +100 -100
  86. package/src/components/dialog/style/index.ts +1 -1
  87. package/src/components/dropdown/Dropdown.vue +308 -308
  88. package/src/components/dropdown/DropdownHeading.vue +23 -23
  89. package/src/components/dropdown/DropdownItem.vue +151 -151
  90. package/src/components/dropdown/DropdownList.vue +20 -20
  91. package/src/components/dropdown/DropdownSeperator.vue +22 -22
  92. package/src/components/dropdown/DropdownWrapper.vue +18 -18
  93. package/src/components/dropdown/examples/basic.vue +119 -119
  94. package/src/components/dropdown/examples/context.vue +71 -71
  95. package/src/components/dropdown/examples/index.ts +3 -3
  96. package/src/components/dropdown/hooks.ts +30 -30
  97. package/src/components/dropdown/style/Dropdown.css.ts +158 -158
  98. package/src/components/dropdown/style/index.ts +1 -1
  99. package/src/components/dropdown/symbol.ts +9 -9
  100. package/src/components/form/Form.vue +153 -153
  101. package/src/components/form/examples/basic.vue +75 -75
  102. package/src/components/form/examples/index.ts +1 -1
  103. package/src/components/form/style/Form.css.ts +28 -28
  104. package/src/components/form/style/index.ts +2 -2
  105. package/src/components/form/symbol.ts +16 -16
  106. package/src/components/image/Image.vue +71 -71
  107. package/src/components/image/examples/basic.vue +5 -5
  108. package/src/components/image/examples/index.ts +1 -1
  109. package/src/components/index.ts +47 -47
  110. package/src/components/input/Input.vue +233 -233
  111. package/src/components/input/examples/basic.vue +21 -21
  112. package/src/components/input/examples/index.ts +6 -6
  113. package/src/components/input/examples/left-icon.vue +9 -9
  114. package/src/components/input/examples/prefix.vue +5 -5
  115. package/src/components/input/examples/right-icon.vue +9 -9
  116. package/src/components/input/examples/sizes.vue +9 -9
  117. package/src/components/input/examples/suffix.vue +7 -7
  118. package/src/components/input/style/Input.css.ts +294 -294
  119. package/src/components/input/style/index.ts +1 -1
  120. package/src/components/link/Link.vue +53 -53
  121. package/src/components/link/examples/basic.vue +3 -3
  122. package/src/components/link/examples/index.ts +1 -1
  123. package/src/components/messageprovider/Message.vue +135 -135
  124. package/src/components/messageprovider/MessageProvider.vue +156 -156
  125. package/src/components/messageprovider/examples/basic.vue +70 -70
  126. package/src/components/messageprovider/examples/index.ts +2 -2
  127. package/src/components/messageprovider/examples/update.vue +34 -34
  128. package/src/components/messageprovider/examples/wrapper.vue +9 -9
  129. package/src/components/messageprovider/style/Message.css.ts +111 -111
  130. package/src/components/messageprovider/style/index.ts +1 -1
  131. package/src/components/messageprovider/types.ts +56 -56
  132. package/src/components/messageprovider/useMessage.ts +14 -14
  133. package/src/components/modal/Modal.vue +310 -310
  134. package/src/components/modal/examples/basic.vue +80 -80
  135. package/src/components/modal/examples/index.ts +3 -3
  136. package/src/components/modal/examples/modal-form.vue +99 -99
  137. package/src/components/modal/examples/sidebar.vue +79 -79
  138. package/src/components/modal/style/Modal.css.ts +318 -318
  139. package/src/components/modal/style/index.ts +1 -1
  140. package/src/components/pagination/Pagination.vue +296 -296
  141. package/src/components/pagination/examples/basic.vue +17 -17
  142. package/src/components/pagination/examples/index.ts +1 -1
  143. package/src/components/pagination/style/Pagination.css.ts +93 -93
  144. package/src/components/pagination/style/index.ts +1 -1
  145. package/src/components/radio/Radio.vue +136 -136
  146. package/src/components/radio/examples/basic.vue +8 -8
  147. package/src/components/radio/examples/group.vue +15 -15
  148. package/src/components/radio/examples/index.ts +2 -2
  149. package/src/components/radio/style/Checkbox.css.ts +130 -130
  150. package/src/components/radio/style/index.ts +1 -1
  151. package/src/components/radiobutton/RadioButton.vue +131 -131
  152. package/src/components/radiobutton/style/RadioButton.css.ts +189 -189
  153. package/src/components/radiobutton/style/index.ts +1 -1
  154. package/src/components/radiobuttongroup/RadioButtonGroup.vue +74 -74
  155. package/src/components/radiobuttongroup/examples/basic.vue +16 -16
  156. package/src/components/radiobuttongroup/examples/index.ts +1 -1
  157. package/src/components/radiobuttongroup/style/RadioButtonGroup.css.ts +37 -37
  158. package/src/components/radiobuttongroup/style/index.ts +1 -1
  159. package/src/components/radiobuttongroup/symbol.ts +12 -12
  160. package/src/components/renderer/examlpes/basic.vue +23 -23
  161. package/src/components/renderer/examlpes/index.ts +1 -1
  162. package/src/components/renderer/props.ts +14 -14
  163. package/src/components/renderer/renderer.ts +16 -16
  164. package/src/components/select/Select.vue +781 -781
  165. package/src/components/select/examples/basic.vue +21 -21
  166. package/src/components/select/examples/index.ts +3 -3
  167. package/src/components/select/examples/multiple.vue +21 -21
  168. package/src/components/select/examples/searchable.vue +20 -20
  169. package/src/components/select/style/Select.css.ts +368 -368
  170. package/src/components/select/style/index.ts +1 -1
  171. package/src/components/skeleton/Skeleton.vue +55 -55
  172. package/src/components/skeleton/examples/basic.vue +3 -3
  173. package/src/components/skeleton/examples/index.ts +2 -2
  174. package/src/components/skeleton/examples/post.vue +8 -8
  175. package/src/components/skeleton/style/Skeleton.css.ts +72 -72
  176. package/src/components/skeleton/style/index.ts +2 -2
  177. package/src/components/slider/Slider.vue +76 -76
  178. package/src/components/slider/style/Slider.css.ts +50 -50
  179. package/src/components/slider/style/index.ts +1 -1
  180. package/src/components/switch/Switch.vue +132 -132
  181. package/src/components/switch/examples/basic.vue +9 -9
  182. package/src/components/switch/examples/index.ts +2 -2
  183. package/src/components/switch/examples/slot.vue +11 -11
  184. package/src/components/switch/style/Switch.css.ts +135 -135
  185. package/src/components/switch/style/index.ts +1 -1
  186. package/src/components/tab/Tab.css +113 -113
  187. package/src/components/tab/Tab.vue +98 -98
  188. package/src/components/tab/TabGroup.vue +90 -90
  189. package/src/components/tab/examples/basic.vue +19 -19
  190. package/src/components/tab/examples/index.ts +2 -2
  191. package/src/components/tab/examples/vertical.vue +19 -19
  192. package/src/components/table/Table.vue +198 -198
  193. package/src/components/table/TableBody.vue +13 -13
  194. package/src/components/table/TableCell.vue +13 -13
  195. package/src/components/table/TableHead.vue +46 -46
  196. package/src/components/table/TableHeadRow.vue +15 -15
  197. package/src/components/table/TableRow.vue +19 -19
  198. package/src/components/table/examples/basic.vue +61 -61
  199. package/src/components/table/examples/empty.vue +44 -44
  200. package/src/components/table/examples/index.ts +3 -3
  201. package/src/components/table/examples/selected.vue +68 -68
  202. package/src/components/table/style/Table.css.ts +62 -62
  203. package/src/components/table/style/index.ts +1 -1
  204. package/src/components/table/types/index.ts +6 -6
  205. package/src/components/tag/Tag.vue +72 -72
  206. package/src/components/tag/examples/basic.vue +5 -5
  207. package/src/components/tag/examples/index.ts +1 -1
  208. package/src/components/tag/style/Tag.css.ts +83 -83
  209. package/src/components/tag/style/index.ts +1 -1
  210. package/src/components/textarea/Textarea.vue +180 -180
  211. package/src/components/textarea/examples/basic.vue +8 -8
  212. package/src/components/textarea/examples/index.ts +1 -1
  213. package/src/components/textarea/style/Textarea.css.ts +191 -191
  214. package/src/components/textarea/style/index.ts +1 -1
  215. package/src/components/tooltip/Tooltip.vue +196 -196
  216. package/src/components/tooltip/examples/basic.vue +5 -5
  217. package/src/components/tooltip/examples/index.ts +2 -2
  218. package/src/components/tooltip/examples/placement.vue +9 -9
  219. package/src/components/tooltip/style/Tooltip.css.ts +90 -90
  220. package/src/components/tooltip/style/index.ts +1 -1
  221. package/src/components/transfer/Transfer.vue +145 -145
  222. package/src/components/transfer/examples/basic.vue +21 -21
  223. package/src/components/transfer/examples/index.ts +1 -1
  224. package/src/components/transfer/style/Transfer.css.ts +81 -81
  225. package/src/components/transfer/style/index.ts +1 -1
  226. package/src/components/tree/Tree.vue +138 -138
  227. package/src/components/tree/TreeNode.vue +109 -109
  228. package/src/components/tree/TreeNodeToggle.vue +48 -48
  229. package/src/components/tree/examples/basic.vue +458 -458
  230. package/src/components/tree/examples/index.ts +1 -1
  231. package/src/components/tree/props.ts +97 -97
  232. package/src/components/tree/style/Tree.css.ts +75 -75
  233. package/src/components/tree/style/index.ts +1 -1
  234. package/src/components/tree/types.ts +103 -103
  235. package/src/components/virtualscroll/VirtualScroll.css +13 -13
  236. package/src/components/virtualscroll/VirtualScroll.vue +166 -166
  237. package/src/components/virtualscroll/examples/basic.vue +31 -31
  238. package/src/components/virtualscroll/examples/index.ts +1 -1
  239. package/src/components/virtualscroll/style/VirtualScroll.css.ts +17 -17
  240. package/src/components/virtualscroll/style/index.ts +1 -1
  241. package/src/composables/element.ts +13 -13
  242. package/src/composables/index.ts +4 -4
  243. package/src/composables/useCachedUid.ts +49 -49
  244. package/src/composables/useEventListener.ts +19 -19
  245. package/src/composables/useInput.ts +151 -151
  246. package/src/composables/useInteractive.ts +19 -19
  247. package/src/composables/useIsServer.ts +7 -7
  248. package/src/composables/useMergedState.ts +18 -18
  249. package/src/composables/useMount.ts +43 -43
  250. package/src/composables/usePopper.ts +215 -215
  251. package/src/composables/useZIndex.ts +33 -33
  252. package/src/create.ts +38 -38
  253. package/src/css/components.css +16 -16
  254. package/src/css/index.css +4 -4
  255. package/src/css/transitions.css +40 -40
  256. package/src/css/variables.css +80 -80
  257. package/src/examples/cards/sidebar.vue +262 -262
  258. package/src/examples/modal/modal.vue +52 -52
  259. package/src/exports/nuxt.js +35 -35
  260. package/src/exports/nuxt.plugin.js +8 -8
  261. package/src/index.ts +5 -5
  262. package/src/install.ts +8 -8
  263. package/src/shims-vue.d.ts +6 -6
  264. package/src/styles/theme.css.ts +181 -181
  265. package/src/styles/transitions.css.ts +97 -97
  266. package/src/types/props.ts +19 -19
  267. package/src/utils/injection.ts +5 -5
  268. package/volar.d.ts +16 -16
@@ -1,368 +1,368 @@
1
- import {
2
- createVar,
3
- globalStyle,
4
- style,
5
- styleVariants
6
- } from '@vanilla-extract/css';
7
- import { themeVars } from '../../../styles/theme.css';
8
-
9
- const sizes = {
10
- xs: '26px',
11
- sm: '30px',
12
- md: '38px',
13
- lg: '42px',
14
- xl: '48px'
15
- };
16
-
17
- const borderRadiuses = {
18
- xs: '2px',
19
- sm: '3px',
20
- md: '4px',
21
- lg: '6px',
22
- xl: '8px'
23
- };
24
-
25
- export const vars = {
26
- height: createVar(),
27
- radius: createVar(),
28
- paddingX: createVar(),
29
- paddingY: createVar(),
30
- borderColor: createVar(),
31
- backgroundColor: createVar(),
32
- color: createVar(),
33
- cursor: createVar(),
34
- optionColor: createVar(),
35
- optionBackgroundColor: createVar()
36
- };
37
-
38
- export const wrapper = style({
39
- position: 'relative',
40
- outline: 'none'
41
- });
42
-
43
- export const base = style({
44
- vars: {
45
- [vars.height]: sizes.md,
46
- [vars.radius]: borderRadiuses.md,
47
- [vars.paddingX]: themeVars.space[2],
48
- [vars.paddingY]: themeVars.space[0],
49
- [vars.borderColor]: themeVars.color.gray[300],
50
- [vars.color]: themeVars.color.gray[900],
51
- [vars.backgroundColor]: '#FFFFFF',
52
- [vars.cursor]: 'text'
53
- },
54
- minHeight: vars.height,
55
- width: '100%',
56
- borderRadius: vars.radius,
57
- borderWidth: 1,
58
- borderStyle: 'solid',
59
- borderColor: vars.borderColor,
60
- padding: `${vars.paddingY} ${vars.paddingX}`,
61
- fontSize: themeVars.fontSize.base,
62
- display: 'block',
63
- textAlign: 'left',
64
- appearance: 'none',
65
- lineHeight: vars.height,
66
- boxSizing: 'border-box',
67
- resize: 'none',
68
- cursor: 'pointer',
69
- boxShadow: 'none',
70
- backgroundColor: vars.backgroundColor,
71
- transition: `color .3s ${themeVars.transition.default},
72
- background-color .3s ${themeVars.transition.default},
73
- box-shadow .3s ${themeVars.transition.default},
74
- border-color .3s ${themeVars.transition.default}`,
75
- ':hover': {
76
- vars: {
77
- [vars.borderColor]: themeVars.color.blue[400]
78
- }
79
- },
80
- ':focus': {
81
- vars: {
82
- [vars.borderColor]: themeVars.color.blue[500]
83
- },
84
- outline: 'none',
85
- boxShadow: `0 0 0 2px ${themeVars.color.blue[200]}`
86
- }
87
- });
88
-
89
- export const selectedTags = style({
90
- display: 'flex',
91
- flexWrap: 'wrap',
92
- alignItems: 'center',
93
- gap: themeVars.space[1],
94
- paddingTop: themeVars.space[1.5],
95
- paddingBottom: themeVars.space[1.5]
96
- });
97
-
98
- export const block = style({
99
- width: '100%'
100
- });
101
-
102
- export const disabled = style({
103
- vars: {
104
- [vars.borderColor]: themeVars.color.gray[200],
105
- [vars.color]: themeVars.color.gray[500],
106
- [vars.backgroundColor]: themeVars.color.gray[50],
107
- [vars.cursor]: 'not-allowed'
108
- },
109
- ':focus': {
110
- boxShadow: 'none'
111
- },
112
- ':hover': {
113
- cursor: 'not-allowed'
114
- }
115
- });
116
-
117
- export const label = style({
118
- fontWeight: '500',
119
- display: 'inline-block',
120
- fontSize: themeVars.fontSize.base,
121
- wordBreak: 'break-word',
122
- cursor: 'pointer',
123
- marginBottom: themeVars.space[1]
124
- });
125
-
126
- export const description = style({
127
- display: 'block',
128
- textDecoration: 'none',
129
- fontSize: themeVars.fontSize.base,
130
- color: themeVars.color.gray[600],
131
- lineHeight: themeVars.fontSize.large,
132
- wordBreak: 'break-word',
133
- marginBottom: themeVars.space[1.5]
134
- });
135
-
136
- export const errorMessage = style({
137
- display: 'block',
138
- textDecoration: 'none',
139
- fontSize: themeVars.fontSize.base,
140
- color: themeVars.color.red[600],
141
- wordBreak: 'break-word',
142
- marginTop: themeVars.space[1.5]
143
- });
144
-
145
- export const error = style({
146
- vars: {
147
- [vars.borderColor]: themeVars.color.red[500]
148
- },
149
- ':hover': {
150
- vars: {
151
- [vars.borderColor]: themeVars.color.red[500]
152
- }
153
- },
154
- ':focus': {
155
- boxShadow: `0 0 0 2px ${themeVars.color.red[200]}`,
156
- vars: {
157
- [vars.borderColor]: themeVars.color.red[500]
158
- }
159
- }
160
- });
161
-
162
- export const focused = style({
163
- vars: {
164
- [vars.borderColor]: themeVars.color.blue[500]
165
- },
166
- boxShadow: `0 0 0 2px ${themeVars.color.blue[200]}`
167
- });
168
-
169
- export const rightIcon = style({
170
- pointerEvents: 'none',
171
- position: 'absolute',
172
- zIndex: 1,
173
- right: 0,
174
- top: 0,
175
- bottom: 0,
176
- display: 'flex',
177
- alignItems: 'center',
178
- justifyContent: 'center',
179
- width: '2.25rem',
180
- color: themeVars.color.gray[400]
181
- });
182
-
183
- export const hasRightIcon = style({
184
- paddingRight: '2.25rem'
185
- });
186
-
187
- export const menu = style({
188
- backgroundColor: '#FFFFFF',
189
- borderRadius: '4px',
190
- zIndex: 4000,
191
- border: `1px solid ${themeVars.color.gray[200]}`,
192
- boxShadow: themeVars.shadow.md,
193
- maxHeight: '230px',
194
- overflowY: 'auto'
195
- });
196
-
197
- export const placeholder = style({
198
- userSelect: 'none',
199
- color: themeVars.color.gray[500]
200
- });
201
-
202
- export const search = style({
203
- // padding: `${themeVars.space[1]} ${themeVars.space[1]} 0`,
204
- backgroundColor: '#FFFFFF',
205
- position: 'sticky',
206
- top: 0,
207
- zIndex: 1,
208
- borderBottom: `1px solid ${themeVars.color.gray[200]}`,
209
- display: 'flex'
210
- });
211
-
212
- export const searchInput = style({
213
- padding: `${themeVars.space[2.5]} ${themeVars.space[2.5]}`,
214
- border: 'none',
215
- outline: 'none',
216
- width: '100%',
217
- fontSize: themeVars.fontSize.base,
218
- color: themeVars.color.gray[800],
219
- flexShrink: 1
220
- });
221
-
222
- export const options = style({
223
- padding: themeVars.space[1],
224
- display: 'flex',
225
- flexDirection: 'column',
226
- gap: themeVars.space[0.5]
227
- });
228
-
229
- export const option = style({
230
- vars: {
231
- [vars.optionColor]: themeVars.color.gray[800],
232
- [vars.optionBackgroundColor]: '#FFFFFF'
233
- },
234
- position: 'relative',
235
- display: 'flex',
236
- alignItems: 'center',
237
- cursor: 'pointer',
238
- minHeight: '36px',
239
- fontSize: themeVars.fontSize.base,
240
- paddingBlock: themeVars.space['1.5'],
241
- paddingInline: themeVars.space['3'],
242
- gap: themeVars.space[2],
243
- color: vars.optionColor,
244
- transition: 'background-color 0.05s ease-in-out',
245
- backgroundColor: vars.optionBackgroundColor,
246
- borderRadius: borderRadiuses.md,
247
- userSelect: 'none',
248
- ':hover': {
249
- vars: {
250
- [vars.optionColor]: themeVars.color.gray[800],
251
- [vars.optionBackgroundColor]: themeVars.color.gray[100]
252
- }
253
- }
254
- });
255
-
256
- export const optionFocused = style({
257
- vars: {
258
- [vars.optionColor]: themeVars.color.gray[800],
259
- [vars.optionBackgroundColor]: themeVars.color.gray[100]
260
- },
261
- ':hover': {
262
- vars: {
263
- [vars.optionColor]: themeVars.color.gray[800],
264
- [vars.optionBackgroundColor]: themeVars.color.gray[100]
265
- }
266
- }
267
- });
268
-
269
- export const optionSelected = style({
270
- // vars: {
271
- // [vars.optionColor]: themeVars.color.blue[50],
272
- // [vars.optionBackgroundColor]: themeVars.color.blue[500],
273
- // },
274
- // ':hover': {
275
- // vars: {
276
- // [vars.optionColor]: themeVars.color.blue[50],
277
- // [vars.optionBackgroundColor]: themeVars.color.blue[600],
278
- // },
279
- // }
280
- });
281
-
282
- export const optionLabel = style({});
283
-
284
- export const checkAll = style({
285
- display: 'flex',
286
- alignItems: 'center',
287
- justifyContent: 'center',
288
- width: themeVars.space[5],
289
- margin: `0 ${themeVars.space[2]}`,
290
- flexShrink: 0,
291
- flex: 1
292
- });
293
-
294
- export const checkAllButton = style({
295
- flexShrink: 0,
296
- alignItems: 'center',
297
- cursor: 'pointer',
298
- justifyContent: 'center',
299
- marginLeft: themeVars.space[2.5],
300
- width: themeVars.space[6],
301
- height: themeVars.space[6],
302
- borderRadius: borderRadiuses.md,
303
- color: themeVars.color.blue[500],
304
- border: `2px solid ${themeVars.color.gray[200]}`,
305
- padding: 0,
306
- background: 'none',
307
- outline: 'none',
308
- ':hover': {
309
- borderColor: themeVars.color.gray[300]
310
- }
311
- });
312
-
313
- export const checkAllButtonActive = style({
314
- border: `1px solid ${themeVars.color.blue[500]}`,
315
- background: themeVars.color.blue[500],
316
- color: 'white',
317
- ':hover': {
318
- borderColor: themeVars.color.blue[600],
319
- background: themeVars.color.blue[600]
320
- }
321
- });
322
-
323
- globalStyle(`${checkAllButtonActive} > svg`, {
324
- position: 'relative',
325
- top: '1px',
326
- width: themeVars.space[4],
327
- height: themeVars.space[4],
328
- color: 'white',
329
- verticalAlign: 'top'
330
- });
331
-
332
- export const optionIcon = style({
333
- display: 'flex',
334
- alignItems: 'center',
335
- justifyContent: 'center',
336
- width: themeVars.space[5],
337
- marginLeft: '-2px'
338
- });
339
-
340
- globalStyle(`${optionIcon} > svg`, {
341
- position: 'relative',
342
- top: '1px',
343
- width: themeVars.space[5],
344
- height: themeVars.space[5],
345
- color: themeVars.color.blue[500]
346
- });
347
-
348
- export const noResults = style({
349
- padding: `${themeVars.space[2]} 0`,
350
- display: 'flex',
351
- // flexDirection: 'column',
352
- alignItems: 'center',
353
- textAlign: 'center',
354
- justifyContent: 'center',
355
- gap: themeVars.space[0.5],
356
- width: '100%',
357
- color: themeVars.color.gray[500],
358
- fontSize: themeVars.fontSize.small
359
- });
360
-
361
- export const clearable = style({
362
- width: themeVars.space[4],
363
- height: themeVars.space[4],
364
- position: 'absolute',
365
- right: themeVars.space[2],
366
- top: '0',
367
- display: 'flex'
368
- });
1
+ import {
2
+ createVar,
3
+ globalStyle,
4
+ style,
5
+ styleVariants
6
+ } from '@vanilla-extract/css';
7
+ import { themeVars } from '../../../styles/theme.css';
8
+
9
+ const sizes = {
10
+ xs: '26px',
11
+ sm: '30px',
12
+ md: '38px',
13
+ lg: '42px',
14
+ xl: '48px'
15
+ };
16
+
17
+ const borderRadiuses = {
18
+ xs: '2px',
19
+ sm: '3px',
20
+ md: '4px',
21
+ lg: '6px',
22
+ xl: '8px'
23
+ };
24
+
25
+ export const vars = {
26
+ height: createVar(),
27
+ radius: createVar(),
28
+ paddingX: createVar(),
29
+ paddingY: createVar(),
30
+ borderColor: createVar(),
31
+ backgroundColor: createVar(),
32
+ color: createVar(),
33
+ cursor: createVar(),
34
+ optionColor: createVar(),
35
+ optionBackgroundColor: createVar()
36
+ };
37
+
38
+ export const wrapper = style({
39
+ position: 'relative',
40
+ outline: 'none'
41
+ });
42
+
43
+ export const base = style({
44
+ vars: {
45
+ [vars.height]: sizes.md,
46
+ [vars.radius]: borderRadiuses.md,
47
+ [vars.paddingX]: themeVars.space[2],
48
+ [vars.paddingY]: themeVars.space[0],
49
+ [vars.borderColor]: themeVars.color.gray[300],
50
+ [vars.color]: themeVars.color.gray[900],
51
+ [vars.backgroundColor]: '#FFFFFF',
52
+ [vars.cursor]: 'text'
53
+ },
54
+ minHeight: vars.height,
55
+ width: '100%',
56
+ borderRadius: vars.radius,
57
+ borderWidth: 1,
58
+ borderStyle: 'solid',
59
+ borderColor: vars.borderColor,
60
+ padding: `${vars.paddingY} ${vars.paddingX}`,
61
+ fontSize: themeVars.fontSize.base,
62
+ display: 'block',
63
+ textAlign: 'left',
64
+ appearance: 'none',
65
+ lineHeight: vars.height,
66
+ boxSizing: 'border-box',
67
+ resize: 'none',
68
+ cursor: 'pointer',
69
+ boxShadow: 'none',
70
+ backgroundColor: vars.backgroundColor,
71
+ transition: `color .3s ${themeVars.transition.default},
72
+ background-color .3s ${themeVars.transition.default},
73
+ box-shadow .3s ${themeVars.transition.default},
74
+ border-color .3s ${themeVars.transition.default}`,
75
+ ':hover': {
76
+ vars: {
77
+ [vars.borderColor]: themeVars.color.blue[400]
78
+ }
79
+ },
80
+ ':focus': {
81
+ vars: {
82
+ [vars.borderColor]: themeVars.color.blue[500]
83
+ },
84
+ outline: 'none',
85
+ boxShadow: `0 0 0 2px ${themeVars.color.blue[200]}`
86
+ }
87
+ });
88
+
89
+ export const selectedTags = style({
90
+ display: 'flex',
91
+ flexWrap: 'wrap',
92
+ alignItems: 'center',
93
+ gap: themeVars.space[1],
94
+ paddingTop: themeVars.space[1.5],
95
+ paddingBottom: themeVars.space[1.5]
96
+ });
97
+
98
+ export const block = style({
99
+ width: '100%'
100
+ });
101
+
102
+ export const disabled = style({
103
+ vars: {
104
+ [vars.borderColor]: themeVars.color.gray[200],
105
+ [vars.color]: themeVars.color.gray[500],
106
+ [vars.backgroundColor]: themeVars.color.gray[50],
107
+ [vars.cursor]: 'not-allowed'
108
+ },
109
+ ':focus': {
110
+ boxShadow: 'none'
111
+ },
112
+ ':hover': {
113
+ cursor: 'not-allowed'
114
+ }
115
+ });
116
+
117
+ export const label = style({
118
+ fontWeight: '500',
119
+ display: 'inline-block',
120
+ fontSize: themeVars.fontSize.base,
121
+ wordBreak: 'break-word',
122
+ cursor: 'pointer',
123
+ marginBottom: themeVars.space[1]
124
+ });
125
+
126
+ export const description = style({
127
+ display: 'block',
128
+ textDecoration: 'none',
129
+ fontSize: themeVars.fontSize.base,
130
+ color: themeVars.color.gray[600],
131
+ lineHeight: themeVars.fontSize.large,
132
+ wordBreak: 'break-word',
133
+ marginBottom: themeVars.space[1.5]
134
+ });
135
+
136
+ export const errorMessage = style({
137
+ display: 'block',
138
+ textDecoration: 'none',
139
+ fontSize: themeVars.fontSize.base,
140
+ color: themeVars.color.red[600],
141
+ wordBreak: 'break-word',
142
+ marginTop: themeVars.space[1.5]
143
+ });
144
+
145
+ export const error = style({
146
+ vars: {
147
+ [vars.borderColor]: themeVars.color.red[500]
148
+ },
149
+ ':hover': {
150
+ vars: {
151
+ [vars.borderColor]: themeVars.color.red[500]
152
+ }
153
+ },
154
+ ':focus': {
155
+ boxShadow: `0 0 0 2px ${themeVars.color.red[200]}`,
156
+ vars: {
157
+ [vars.borderColor]: themeVars.color.red[500]
158
+ }
159
+ }
160
+ });
161
+
162
+ export const focused = style({
163
+ vars: {
164
+ [vars.borderColor]: themeVars.color.blue[500]
165
+ },
166
+ boxShadow: `0 0 0 2px ${themeVars.color.blue[200]}`
167
+ });
168
+
169
+ export const rightIcon = style({
170
+ pointerEvents: 'none',
171
+ position: 'absolute',
172
+ zIndex: 1,
173
+ right: 0,
174
+ top: 0,
175
+ bottom: 0,
176
+ display: 'flex',
177
+ alignItems: 'center',
178
+ justifyContent: 'center',
179
+ width: '2.25rem',
180
+ color: themeVars.color.gray[400]
181
+ });
182
+
183
+ export const hasRightIcon = style({
184
+ paddingRight: '2.25rem'
185
+ });
186
+
187
+ export const menu = style({
188
+ backgroundColor: '#FFFFFF',
189
+ borderRadius: '4px',
190
+ zIndex: 4000,
191
+ border: `1px solid ${themeVars.color.gray[200]}`,
192
+ boxShadow: themeVars.shadow.md,
193
+ maxHeight: '230px',
194
+ overflowY: 'auto'
195
+ });
196
+
197
+ export const placeholder = style({
198
+ userSelect: 'none',
199
+ color: themeVars.color.gray[500]
200
+ });
201
+
202
+ export const search = style({
203
+ // padding: `${themeVars.space[1]} ${themeVars.space[1]} 0`,
204
+ backgroundColor: '#FFFFFF',
205
+ position: 'sticky',
206
+ top: 0,
207
+ zIndex: 1,
208
+ borderBottom: `1px solid ${themeVars.color.gray[200]}`,
209
+ display: 'flex'
210
+ });
211
+
212
+ export const searchInput = style({
213
+ padding: `${themeVars.space[2.5]} ${themeVars.space[2.5]}`,
214
+ border: 'none',
215
+ outline: 'none',
216
+ width: '100%',
217
+ fontSize: themeVars.fontSize.base,
218
+ color: themeVars.color.gray[800],
219
+ flexShrink: 1
220
+ });
221
+
222
+ export const options = style({
223
+ padding: themeVars.space[1],
224
+ display: 'flex',
225
+ flexDirection: 'column',
226
+ gap: themeVars.space[0.5]
227
+ });
228
+
229
+ export const option = style({
230
+ vars: {
231
+ [vars.optionColor]: themeVars.color.gray[800],
232
+ [vars.optionBackgroundColor]: '#FFFFFF'
233
+ },
234
+ position: 'relative',
235
+ display: 'flex',
236
+ alignItems: 'center',
237
+ cursor: 'pointer',
238
+ minHeight: '36px',
239
+ fontSize: themeVars.fontSize.base,
240
+ paddingBlock: themeVars.space['1.5'],
241
+ paddingInline: themeVars.space['3'],
242
+ gap: themeVars.space[2],
243
+ color: vars.optionColor,
244
+ transition: 'background-color 0.05s ease-in-out',
245
+ backgroundColor: vars.optionBackgroundColor,
246
+ borderRadius: borderRadiuses.md,
247
+ userSelect: 'none',
248
+ ':hover': {
249
+ vars: {
250
+ [vars.optionColor]: themeVars.color.gray[800],
251
+ [vars.optionBackgroundColor]: themeVars.color.gray[100]
252
+ }
253
+ }
254
+ });
255
+
256
+ export const optionFocused = style({
257
+ vars: {
258
+ [vars.optionColor]: themeVars.color.gray[800],
259
+ [vars.optionBackgroundColor]: themeVars.color.gray[100]
260
+ },
261
+ ':hover': {
262
+ vars: {
263
+ [vars.optionColor]: themeVars.color.gray[800],
264
+ [vars.optionBackgroundColor]: themeVars.color.gray[100]
265
+ }
266
+ }
267
+ });
268
+
269
+ export const optionSelected = style({
270
+ // vars: {
271
+ // [vars.optionColor]: themeVars.color.blue[50],
272
+ // [vars.optionBackgroundColor]: themeVars.color.blue[500],
273
+ // },
274
+ // ':hover': {
275
+ // vars: {
276
+ // [vars.optionColor]: themeVars.color.blue[50],
277
+ // [vars.optionBackgroundColor]: themeVars.color.blue[600],
278
+ // },
279
+ // }
280
+ });
281
+
282
+ export const optionLabel = style({});
283
+
284
+ export const checkAll = style({
285
+ display: 'flex',
286
+ alignItems: 'center',
287
+ justifyContent: 'center',
288
+ width: themeVars.space[5],
289
+ margin: `0 ${themeVars.space[2]}`,
290
+ flexShrink: 0,
291
+ flex: 1
292
+ });
293
+
294
+ export const checkAllButton = style({
295
+ flexShrink: 0,
296
+ alignItems: 'center',
297
+ cursor: 'pointer',
298
+ justifyContent: 'center',
299
+ marginLeft: themeVars.space[2.5],
300
+ width: themeVars.space[6],
301
+ height: themeVars.space[6],
302
+ borderRadius: borderRadiuses.md,
303
+ color: themeVars.color.blue[500],
304
+ border: `2px solid ${themeVars.color.gray[200]}`,
305
+ padding: 0,
306
+ background: 'none',
307
+ outline: 'none',
308
+ ':hover': {
309
+ borderColor: themeVars.color.gray[300]
310
+ }
311
+ });
312
+
313
+ export const checkAllButtonActive = style({
314
+ border: `1px solid ${themeVars.color.blue[500]}`,
315
+ background: themeVars.color.blue[500],
316
+ color: 'white',
317
+ ':hover': {
318
+ borderColor: themeVars.color.blue[600],
319
+ background: themeVars.color.blue[600]
320
+ }
321
+ });
322
+
323
+ globalStyle(`${checkAllButtonActive} > svg`, {
324
+ position: 'relative',
325
+ top: '1px',
326
+ width: themeVars.space[4],
327
+ height: themeVars.space[4],
328
+ color: 'white',
329
+ verticalAlign: 'top'
330
+ });
331
+
332
+ export const optionIcon = style({
333
+ display: 'flex',
334
+ alignItems: 'center',
335
+ justifyContent: 'center',
336
+ width: themeVars.space[5],
337
+ marginLeft: '-2px'
338
+ });
339
+
340
+ globalStyle(`${optionIcon} > svg`, {
341
+ position: 'relative',
342
+ top: '1px',
343
+ width: themeVars.space[5],
344
+ height: themeVars.space[5],
345
+ color: themeVars.color.blue[500]
346
+ });
347
+
348
+ export const noResults = style({
349
+ padding: `${themeVars.space[2]} 0`,
350
+ display: 'flex',
351
+ // flexDirection: 'column',
352
+ alignItems: 'center',
353
+ textAlign: 'center',
354
+ justifyContent: 'center',
355
+ gap: themeVars.space[0.5],
356
+ width: '100%',
357
+ color: themeVars.color.gray[500],
358
+ fontSize: themeVars.fontSize.small
359
+ });
360
+
361
+ export const clearable = style({
362
+ width: themeVars.space[4],
363
+ height: themeVars.space[4],
364
+ position: 'absolute',
365
+ right: themeVars.space[2],
366
+ top: '0',
367
+ display: 'flex'
368
+ });