@teammodlr/ui-kit 2.3.12 → 2.3.14

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 (278) hide show
  1. package/env.d.ts +1 -1
  2. package/lib/components/colorpicker/ColorPicker.vue.d.ts +11 -1
  3. package/lib/index.cjs.js +1 -1
  4. package/lib/index.es.js +291 -285
  5. package/lib/nuxt.js +35 -35
  6. package/lib/nuxt.plugin.js +8 -8
  7. package/package.json +1 -1
  8. package/src/__storybook__/argTypes.ts +53 -53
  9. package/src/__storybook__/createStory.ts +15 -15
  10. package/src/__storybook__/index.ts +2 -2
  11. package/src/components/avatar/Avatar.vue +110 -110
  12. package/src/components/avatar/examples/basic.vue +6 -6
  13. package/src/components/avatar/examples/custom-size.vue +7 -7
  14. package/src/components/avatar/examples/index.stories.ts +25 -25
  15. package/src/components/avatar/examples/index.ts +5 -5
  16. package/src/components/avatar/examples/sizes.vue +33 -33
  17. package/src/components/avatar/examples/slots.vue +8 -8
  18. package/src/components/avatar/examples/variants.vue +18 -18
  19. package/src/components/avatar/style/Avatar.css.ts +92 -92
  20. package/src/components/avatar/style/index.ts +1 -1
  21. package/src/components/avatargroup/AvatarGroup.vue +72 -72
  22. package/src/components/avatargroup/examples/basic.vue +37 -37
  23. package/src/components/avatargroup/examples/index.stories.ts +19 -19
  24. package/src/components/avatargroup/examples/index.ts +1 -1
  25. package/src/components/avatargroup/style/AvatarGroup.css.ts +26 -26
  26. package/src/components/avatargroup/style/index.ts +1 -1
  27. package/src/components/avatargroup/symbol.ts +17 -17
  28. package/src/components/badge/Badge.vue +43 -43
  29. package/src/components/badge/examples/basic.vue +10 -10
  30. package/src/components/badge/examples/index.stories.ts +19 -19
  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.stories.ts +16 -16
  38. package/src/components/breadcrumb/examples/index.ts +1 -1
  39. package/src/components/breadcrumb/style/Breadcrumb.css.ts +40 -40
  40. package/src/components/breadcrumb/style/index.ts +1 -1
  41. package/src/components/breadcrumb/symbol.ts +18 -18
  42. package/src/components/button/Button.vue +203 -203
  43. package/src/components/button/examples/basic.vue +3 -3
  44. package/src/components/button/examples/disabled.vue +3 -3
  45. package/src/components/button/examples/icon-left.vue +12 -12
  46. package/src/components/button/examples/icon.vue +9 -9
  47. package/src/components/button/examples/index.stories.ts +37 -37
  48. package/src/components/button/examples/index.ts +9 -9
  49. package/src/components/button/examples/link.vue +3 -3
  50. package/src/components/button/examples/rounded.vue +7 -7
  51. package/src/components/button/examples/size.vue +7 -7
  52. package/src/components/button/examples/variants-secondary.vue +10 -10
  53. package/src/components/button/examples/variants.vue +10 -10
  54. package/src/components/button/style/index.ts +1 -1
  55. package/src/components/buttongroup/ButtonGroup.vue +36 -36
  56. package/src/components/buttongroup/examples/basic.vue +9 -9
  57. package/src/components/buttongroup/examples/icon-group.vue +21 -21
  58. package/src/components/buttongroup/examples/index.stories.ts +17 -17
  59. package/src/components/buttongroup/examples/index.ts +2 -2
  60. package/src/components/buttongroup/style/ButtonGroup.css.ts +42 -42
  61. package/src/components/buttongroup/style/index.ts +1 -1
  62. package/src/components/buttongroup/symbol.ts +9 -9
  63. package/src/components/checkbox/Checkbox.vue +149 -149
  64. package/src/components/checkbox/examples/basic.vue +9 -9
  65. package/src/components/checkbox/examples/index.stories.ts +16 -16
  66. package/src/components/checkbox/examples/index.ts +2 -2
  67. package/src/components/checkbox/examples/slot.vue +14 -14
  68. package/src/components/checkbox/style/Checkbox.css.ts +178 -178
  69. package/src/components/checkbox/style/index.ts +1 -1
  70. package/src/components/colorpicker/ColorPicker.vue +15 -4
  71. package/src/components/colorpicker/examples/index.stories.ts +12 -12
  72. package/src/components/colorpicker/examples/index.ts +1 -1
  73. package/src/components/colorpicker/style/index.ts +1 -1
  74. package/src/components/configprovider/ConfigProvider.vue +38 -38
  75. package/src/components/configprovider/types.ts +3 -3
  76. package/src/components/confirm/Confirm.vue +65 -65
  77. package/src/components/confirm/examples/basic.vue +48 -48
  78. package/src/components/confirm/examples/index.stories.ts +26 -26
  79. package/src/components/confirm/examples/index.ts +1 -1
  80. package/src/components/confirm/examples/wrapper.vue +9 -9
  81. package/src/components/confirm/props.ts +24 -24
  82. package/src/components/confirm/providerProps.ts +10 -10
  83. package/src/components/confirm/types.ts +33 -33
  84. package/src/components/confirm/useConfirm.ts +14 -14
  85. package/src/components/dialog/examples/basic.vue +23 -23
  86. package/src/components/dialog/examples/index.stories.ts +14 -14
  87. package/src/components/dialog/examples/index.ts +1 -1
  88. package/src/components/dialog/style/index.ts +1 -1
  89. package/src/components/dialogprovider/examples/index.stories.ts +26 -26
  90. package/src/components/dropdown/DropdownList.vue +20 -20
  91. package/src/components/dropdown/examples/index.stories.ts +26 -26
  92. package/src/components/dropdown/examples/index.ts +3 -3
  93. package/src/components/dropdown/hooks.ts +30 -30
  94. package/src/components/dropdown/style/index.ts +1 -1
  95. package/src/components/dropdown/symbol.ts +9 -9
  96. package/src/components/form/Form.vue +153 -153
  97. package/src/components/form/examples/basic.vue +75 -75
  98. package/src/components/form/examples/index.stories.ts +23 -23
  99. package/src/components/form/examples/index.ts +1 -1
  100. package/src/components/form/style/Form.css.ts +28 -28
  101. package/src/components/form/style/index.ts +2 -2
  102. package/src/components/form/symbol.ts +16 -16
  103. package/src/components/image/Image.vue +71 -71
  104. package/src/components/image/examples/basic.vue +5 -5
  105. package/src/components/image/examples/index.stories.ts +10 -10
  106. package/src/components/image/examples/index.ts +1 -1
  107. package/src/components/input/Input.vue +233 -233
  108. package/src/components/input/examples/basic.vue +21 -21
  109. package/src/components/input/examples/index.stories.ts +26 -26
  110. package/src/components/input/examples/index.ts +6 -6
  111. package/src/components/input/examples/left-icon.vue +9 -9
  112. package/src/components/input/examples/prefix.vue +5 -5
  113. package/src/components/input/examples/right-icon.vue +9 -9
  114. package/src/components/input/examples/sizes.vue +9 -9
  115. package/src/components/input/examples/suffix.vue +7 -7
  116. package/src/components/input/style/Input.css.ts +294 -294
  117. package/src/components/input/style/index.ts +1 -1
  118. package/src/components/link/Link.vue +53 -53
  119. package/src/components/link/examples/basic.vue +3 -3
  120. package/src/components/link/examples/index.stories.ts +15 -15
  121. package/src/components/link/examples/index.ts +1 -1
  122. package/src/components/messageprovider/Message.vue +135 -135
  123. package/src/components/messageprovider/MessageProvider.vue +152 -152
  124. package/src/components/messageprovider/examples/basic.vue +70 -70
  125. package/src/components/messageprovider/examples/index.stories.ts +26 -26
  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.stories.ts +16 -16
  136. package/src/components/modal/examples/index.ts +3 -3
  137. package/src/components/modal/examples/modal-form.vue +99 -99
  138. package/src/components/modal/examples/sidebar.vue +79 -79
  139. package/src/components/modal/style/Modal.css.ts +318 -318
  140. package/src/components/modal/style/index.ts +1 -1
  141. package/src/components/pagination/Pagination.vue +296 -296
  142. package/src/components/pagination/examples/basic.vue +17 -17
  143. package/src/components/pagination/examples/index.stories.ts +11 -11
  144. package/src/components/pagination/examples/index.ts +1 -1
  145. package/src/components/pagination/style/Pagination.css.ts +93 -93
  146. package/src/components/pagination/style/index.ts +1 -1
  147. package/src/components/radio/Radio.vue +136 -136
  148. package/src/components/radio/examples/basic.vue +8 -8
  149. package/src/components/radio/examples/group.vue +15 -15
  150. package/src/components/radio/examples/index.stories.ts +16 -16
  151. package/src/components/radio/examples/index.ts +2 -2
  152. package/src/components/radio/style/Checkbox.css.ts +130 -130
  153. package/src/components/radio/style/index.ts +1 -1
  154. package/src/components/radiobutton/RadioButton.vue +131 -131
  155. package/src/components/radiobutton/style/RadioButton.css.ts +189 -189
  156. package/src/components/radiobutton/style/index.ts +1 -1
  157. package/src/components/radiobuttongroup/RadioButtonGroup.vue +74 -74
  158. package/src/components/radiobuttongroup/examples/basic.vue +16 -16
  159. package/src/components/radiobuttongroup/examples/index.stories.ts +18 -18
  160. package/src/components/radiobuttongroup/examples/index.ts +1 -1
  161. package/src/components/radiobuttongroup/style/RadioButtonGroup.css.ts +37 -37
  162. package/src/components/radiobuttongroup/style/index.ts +1 -1
  163. package/src/components/radiobuttongroup/symbol.ts +12 -12
  164. package/src/components/renderer/examlpes/basic.vue +23 -23
  165. package/src/components/renderer/examlpes/index.stories.ts +14 -14
  166. package/src/components/renderer/examlpes/index.ts +1 -1
  167. package/src/components/renderer/props.ts +14 -14
  168. package/src/components/renderer/renderer.ts +16 -16
  169. package/src/components/select/examples/basic.vue +26 -26
  170. package/src/components/select/examples/index.stories.ts +16 -16
  171. package/src/components/select/examples/index.ts +3 -3
  172. package/src/components/select/examples/multiple.vue +21 -21
  173. package/src/components/select/examples/searchable.vue +20 -20
  174. package/src/components/select/style/index.ts +1 -1
  175. package/src/components/select/types.ts +27 -27
  176. package/src/components/skeleton/Skeleton.vue +55 -55
  177. package/src/components/skeleton/examples/basic.vue +3 -3
  178. package/src/components/skeleton/examples/index.stories.ts +13 -13
  179. package/src/components/skeleton/examples/index.ts +2 -2
  180. package/src/components/skeleton/examples/post.vue +8 -8
  181. package/src/components/skeleton/style/Skeleton.css.ts +72 -72
  182. package/src/components/skeleton/style/index.ts +2 -2
  183. package/src/components/slider/style/Slider.css.ts +50 -50
  184. package/src/components/slider/style/index.ts +1 -1
  185. package/src/components/switch/Switch.vue +132 -132
  186. package/src/components/switch/examples/basic.vue +9 -9
  187. package/src/components/switch/examples/index.stories.ts +15 -15
  188. package/src/components/switch/examples/index.ts +2 -2
  189. package/src/components/switch/examples/slot.vue +11 -11
  190. package/src/components/switch/style/index.ts +1 -1
  191. package/src/components/tab/examples/basic.vue +23 -23
  192. package/src/components/tab/examples/index.ts +2 -2
  193. package/src/components/tab/examples/vertical.vue +19 -19
  194. package/src/components/table/Table.vue +198 -198
  195. package/src/components/table/TableBody.vue +13 -13
  196. package/src/components/table/TableCell.vue +13 -13
  197. package/src/components/table/TableHead.vue +46 -46
  198. package/src/components/table/TableHeadRow.vue +15 -15
  199. package/src/components/table/TableRow.vue +19 -19
  200. package/src/components/table/examples/basic.vue +61 -61
  201. package/src/components/table/examples/empty.vue +44 -44
  202. package/src/components/table/examples/index.stories.ts +17 -17
  203. package/src/components/table/examples/index.ts +3 -3
  204. package/src/components/table/examples/selected.vue +68 -68
  205. package/src/components/table/style/Table.css.ts +62 -62
  206. package/src/components/table/style/index.ts +1 -1
  207. package/src/components/table/types/index.ts +6 -6
  208. package/src/components/tag/Tag.vue +72 -72
  209. package/src/components/tag/examples/basic.vue +5 -5
  210. package/src/components/tag/examples/index.stories.ts +16 -16
  211. package/src/components/tag/examples/index.ts +1 -1
  212. package/src/components/tag/style/Tag.css.ts +83 -83
  213. package/src/components/tag/style/index.ts +1 -1
  214. package/src/components/textarea/Textarea.vue +180 -180
  215. package/src/components/textarea/examples/basic.vue +8 -8
  216. package/src/components/textarea/examples/index.stories.ts +14 -14
  217. package/src/components/textarea/examples/index.ts +1 -1
  218. package/src/components/textarea/style/Textarea.css.ts +191 -191
  219. package/src/components/textarea/style/index.ts +1 -1
  220. package/src/components/tooltip/examples/basic.vue +5 -5
  221. package/src/components/tooltip/examples/index.stories.ts +17 -17
  222. package/src/components/tooltip/examples/index.ts +2 -2
  223. package/src/components/tooltip/examples/placement.vue +9 -9
  224. package/src/components/tooltip/style/Tooltip.css.ts +90 -90
  225. package/src/components/tooltip/style/index.ts +1 -1
  226. package/src/components/transfer/Transfer.vue +145 -145
  227. package/src/components/transfer/examples/basic.vue +21 -21
  228. package/src/components/transfer/examples/index.stories.ts +12 -12
  229. package/src/components/transfer/examples/index.ts +1 -1
  230. package/src/components/transfer/style/Transfer.css.ts +81 -81
  231. package/src/components/transfer/style/index.ts +1 -1
  232. package/src/components/tree/Tree.vue +138 -138
  233. package/src/components/tree/TreeNode.vue +109 -109
  234. package/src/components/tree/TreeNodeToggle.vue +48 -48
  235. package/src/components/tree/examples/basic.vue +458 -458
  236. package/src/components/tree/examples/index.stories.ts +12 -12
  237. package/src/components/tree/examples/index.ts +1 -1
  238. package/src/components/tree/props.ts +97 -97
  239. package/src/components/tree/style/Tree.css.ts +75 -75
  240. package/src/components/tree/style/index.ts +1 -1
  241. package/src/components/tree/types.ts +103 -103
  242. package/src/components/virtualscroll/VirtualScroll.css +13 -13
  243. package/src/components/virtualscroll/VirtualScroll.vue +166 -166
  244. package/src/components/virtualscroll/examples/basic.vue +31 -31
  245. package/src/components/virtualscroll/examples/index.stories.ts +11 -11
  246. package/src/components/virtualscroll/examples/index.ts +1 -1
  247. package/src/components/virtualscroll/style/VirtualScroll.css.ts +17 -17
  248. package/src/components/virtualscroll/style/index.ts +1 -1
  249. package/src/composables/element.ts +13 -13
  250. package/src/composables/index.ts +5 -5
  251. package/src/composables/useCachedUid.ts +15 -15
  252. package/src/composables/useEventListener.ts +19 -19
  253. package/src/composables/useInput.ts +151 -151
  254. package/src/composables/useInteractive.ts +19 -19
  255. package/src/composables/useIsServer.ts +7 -7
  256. package/src/composables/useMergedState.ts +18 -18
  257. package/src/composables/useMount.ts +43 -43
  258. package/src/composables/usePopper.ts +215 -215
  259. package/src/composables/useZIndex.ts +33 -33
  260. package/src/create.ts +38 -38
  261. package/src/css/components.css +16 -16
  262. package/src/css/index.css +4 -4
  263. package/src/css/transitions.css +40 -40
  264. package/src/css/variables.css +80 -80
  265. package/src/examples/cards/cards.stories.ts +9 -9
  266. package/src/examples/cards/sidebar.vue +262 -262
  267. package/src/examples/modal/modal.stories.ts +9 -9
  268. package/src/examples/modal/modal.vue +52 -52
  269. package/src/exports/nuxt.js +35 -35
  270. package/src/exports/nuxt.plugin.js +8 -8
  271. package/src/index.ts +5 -5
  272. package/src/install.ts +8 -8
  273. package/src/shims-vue.d.ts +6 -6
  274. package/src/styles/theme.css.ts +181 -181
  275. package/src/types/props.ts +21 -21
  276. package/src/utils/call.ts +34 -34
  277. package/src/utils/injection.ts +45 -45
  278. package/volar.d.ts +16 -16
@@ -1,318 +1,318 @@
1
- import {
2
- createVar,
3
- globalKeyframes,
4
- style,
5
- styleVariants
6
- } from '@vanilla-extract/css';
7
- import { themeVars } from '../../../styles/theme.css';
8
-
9
- const sizes = {
10
- xs: '300px',
11
- sm: '400px',
12
- md: '640px',
13
- lg: '800px',
14
- xl: '1140px'
15
- };
16
-
17
- export const vars = {
18
- maxWidth: createVar(),
19
- backgroundColor: createVar(),
20
- borderColor: createVar(),
21
- initialLeft: createVar(),
22
- initialTop: createVar()
23
- };
24
-
25
- export const size = styleVariants({
26
- xs: {
27
- vars: {
28
- [vars.maxWidth]: sizes.xs
29
- }
30
- },
31
- sm: {
32
- vars: {
33
- [vars.maxWidth]: sizes.sm
34
- }
35
- },
36
- md: {
37
- vars: {
38
- [vars.maxWidth]: sizes.md
39
- }
40
- },
41
- lg: {
42
- vars: {
43
- [vars.maxWidth]: sizes.lg
44
- }
45
- },
46
- xl: {
47
- vars: {
48
- [vars.maxWidth]: sizes.xl
49
- }
50
- }
51
- });
52
-
53
- export const wrapper = style({
54
- position: 'fixed',
55
- top: 0,
56
- insetInlineEnd: 0,
57
- bottom: 0,
58
- insetInlineStart: 0,
59
- overflow: 'auto',
60
- outline: 0
61
- });
62
-
63
- export const mask = style({
64
- position: 'fixed',
65
- top: 0,
66
- insetInlineEnd: 0,
67
- bottom: 0,
68
- insetInlineStart: 0,
69
- height: '100%',
70
- backgroundColor: 'hsla(0,0%,45.1%,0.7)'
71
- });
72
-
73
- export const modal = style({
74
- margin: `0 auto`,
75
- padding: 0,
76
- boxSizing: 'border-box',
77
- position: 'relative',
78
- width: 'auto',
79
- top: 100,
80
- paddingBottom: '24px',
81
- maxWidth: `calc(100vw - 32px)`,
82
- pointerEvents: 'none'
83
- });
84
-
85
- export const centeredWrapper = style({
86
- textAlign: 'center',
87
- '::before': {
88
- display: 'inline-block',
89
- width: 0,
90
- height: '100%',
91
- verticalAlign: 'middle',
92
- content: '""'
93
- }
94
- });
95
-
96
- export const centeredModal = style({
97
- top: 0,
98
- display: 'inline-block',
99
- paddingBottom: 0,
100
- textAlign: 'start',
101
- verticalAlign: 'middle'
102
- });
103
-
104
- export const container = style({
105
- backgroundColor: '#fff',
106
- width: '100%',
107
- maxWidth: vars.maxWidth,
108
- borderRadius: themeVars.rounded.medium,
109
- boxShadow:
110
- '0 1px 2px -2px rgba(0, 0, 0, 0.08), 0 3px 6px 0 rgba(0, 0, 0, 0.06), 0 5px 12px 4px rgba(0, 0, 0, 0.04)',
111
- border: `1px solid rgba(0, 0, 0, 0.45)`,
112
- display: 'flex',
113
- flexDirection: 'column',
114
- position: 'relative',
115
- gap: themeVars.space[2],
116
- pointerEvents: 'auto'
117
- });
118
-
119
- export const hasSidebar = style({
120
- flexDirection: 'row'
121
- });
122
-
123
- export const header = style({
124
- display: 'flex',
125
- justifyContent: 'space-between',
126
- alignItems: 'flex-start',
127
- padding: `${themeVars.space[4]} ${themeVars.space[4]} 0 ${themeVars.space[4]}`,
128
- flexShrink: '0'
129
- });
130
-
131
- export const title = style({
132
- margin: 0,
133
- fontSize: `${themeVars.fontSize.xlarge}`,
134
- fontWeight: '500',
135
- display: 'flex',
136
- alignItems: 'center',
137
- color: themeVars.color.font.default
138
- });
139
-
140
- export const close = style([
141
- {
142
- outline: `none ${themeVars.color.gray[300]}`,
143
- display: 'inline-block',
144
- position: 'absolute',
145
- top: themeVars.space[3],
146
- right: themeVars.space[3],
147
- width: '1.5rem',
148
- height: '1.5rem',
149
- backgroundColor: 'transparent',
150
- border: 'none',
151
- padding: 0,
152
- cursor: 'pointer',
153
- transition: 'all 0.2s',
154
- borderRadius: themeVars.rounded.full,
155
- marginLeft: themeVars.space[2],
156
- ':hover': {
157
- backgroundColor: themeVars.color.gray[150]
158
- },
159
- ':focus': {
160
- backgroundColor: themeVars.color.gray[150]
161
- },
162
- '::before': {
163
- content: '""',
164
- position: 'absolute',
165
- top: '50%',
166
- left: '50%',
167
- transform: 'translate(-50%, -50%) rotate(45deg)',
168
- width: '0.8rem',
169
- height: '2px',
170
- backgroundColor: themeVars.color.gray[500],
171
- transformOrigin: 'center',
172
- transition: 'all 0.2s'
173
- },
174
- '::after': {
175
- content: '""',
176
- position: 'absolute',
177
- top: '50%',
178
- left: '50%',
179
- transform: 'translate(-50%, -50%) rotate(-45deg)',
180
- width: '0.8rem',
181
- height: '2px',
182
- backgroundColor: themeVars.color.gray[500],
183
- transformOrigin: 'center',
184
- transition: 'all 0.2s'
185
- }
186
- }
187
- ]);
188
-
189
- export const body = style({
190
- padding: `${themeVars.space[4]}`,
191
- display: 'flex',
192
- flexDirection: 'column',
193
- flexGrow: '1',
194
- color: themeVars.color.font.text
195
- });
196
-
197
- export const footer = style({
198
- display: 'flex',
199
- width: '100%',
200
- alignItems: 'center',
201
- padding: `0 ${themeVars.space[4]} ${themeVars.space[4]} ${themeVars.space[4]}`
202
- });
203
-
204
- const fadeOutBackgroundAnimation = 'fade-out-background-animation';
205
- globalKeyframes(fadeOutBackgroundAnimation, {
206
- from: {
207
- opacity: 1
208
- },
209
- to: {
210
- opacity: 0
211
- }
212
- });
213
-
214
- const fadeInBackgroundAnimation = 'fade-in-background-animation';
215
- globalKeyframes(fadeInBackgroundAnimation, {
216
- from: {
217
- opacity: 0
218
- },
219
- to: {
220
- opacity: 1
221
- }
222
- });
223
-
224
- const fadeOutAnimation = 'fade-out-animation';
225
- globalKeyframes(fadeOutAnimation, {
226
- from: {
227
- opacity: 1,
228
- transform: 'scale(1)'
229
- },
230
- to: {
231
- opacity: 0,
232
- transform: 'scale(0.8)'
233
- }
234
- });
235
-
236
- const fadeInAnimation = 'fade-in-animation';
237
- globalKeyframes(fadeInAnimation, {
238
- '0%': {
239
- opacity: 0,
240
- transform: 'scale(0.5)',
241
- left: vars.initialLeft,
242
- top: vars.initialTop
243
- },
244
- '70%': {
245
- opacity: 1,
246
- transform: 'scale(1.03)',
247
- left: 0,
248
- top: 0
249
- },
250
- '100%': {
251
- opacity: 1,
252
- transform: 'scale(1)'
253
- }
254
- });
255
-
256
- const fadeInAnimationNoBounce = 'fade-in-animation-no-bounce';
257
- globalKeyframes(fadeInAnimationNoBounce, {
258
- '0%': {
259
- opacity: 0,
260
- transform: 'scale(0.5)',
261
- left: vars.initialLeft,
262
- top: vars.initialTop
263
- },
264
- '60%': {
265
- opacity: 1
266
- },
267
- '100%': {
268
- opacity: 1,
269
- transform: 'scale(1)',
270
- left: 0,
271
- top: 0
272
- }
273
- });
274
-
275
- export const fadeEnterNoBounce = style({
276
- animationName: fadeInAnimationNoBounce,
277
- animationDuration: '0.2s',
278
- animationTimingFunction: 'ease-in-out',
279
- transition: 'transform 0.3s ease-out'
280
- });
281
-
282
- export const fadeEnter = style({
283
- animationName: fadeInAnimation,
284
- animationDuration: '0.25s',
285
- animationTimingFunction: 'ease-in-out',
286
- transition: themeVars.transition.default
287
- });
288
-
289
- export const fadeLeave = style({
290
- animationName: fadeOutAnimation,
291
- animationDuration: '0.2s',
292
- animationTimingFunction: 'ease-in-out'
293
- });
294
-
295
- export const fadeBackgroundEnter = style({
296
- animationName: fadeInBackgroundAnimation,
297
- animationDuration: '0.1s',
298
- animationTimingFunction: 'ease-in-out'
299
- });
300
-
301
- export const fadeBackgroundLeave = style({
302
- animationName: fadeOutBackgroundAnimation,
303
- animationDuration: '0.2s',
304
- animationTimingFunction: 'ease-in-out'
305
- });
306
-
307
- export const fadeEnterFrom = style({});
308
-
309
- export const sidebar = style({
310
- borderRadius: `0 ${themeVars.rounded.medium} ${themeVars.rounded.medium} 0`
311
- });
312
-
313
- export const content = style({
314
- flex: 1,
315
- width: '100%',
316
- display: 'flex',
317
- flexDirection: 'column'
318
- });
1
+ import {
2
+ createVar,
3
+ globalKeyframes,
4
+ style,
5
+ styleVariants
6
+ } from '@vanilla-extract/css';
7
+ import { themeVars } from '../../../styles/theme.css';
8
+
9
+ const sizes = {
10
+ xs: '300px',
11
+ sm: '400px',
12
+ md: '640px',
13
+ lg: '800px',
14
+ xl: '1140px'
15
+ };
16
+
17
+ export const vars = {
18
+ maxWidth: createVar(),
19
+ backgroundColor: createVar(),
20
+ borderColor: createVar(),
21
+ initialLeft: createVar(),
22
+ initialTop: createVar()
23
+ };
24
+
25
+ export const size = styleVariants({
26
+ xs: {
27
+ vars: {
28
+ [vars.maxWidth]: sizes.xs
29
+ }
30
+ },
31
+ sm: {
32
+ vars: {
33
+ [vars.maxWidth]: sizes.sm
34
+ }
35
+ },
36
+ md: {
37
+ vars: {
38
+ [vars.maxWidth]: sizes.md
39
+ }
40
+ },
41
+ lg: {
42
+ vars: {
43
+ [vars.maxWidth]: sizes.lg
44
+ }
45
+ },
46
+ xl: {
47
+ vars: {
48
+ [vars.maxWidth]: sizes.xl
49
+ }
50
+ }
51
+ });
52
+
53
+ export const wrapper = style({
54
+ position: 'fixed',
55
+ top: 0,
56
+ insetInlineEnd: 0,
57
+ bottom: 0,
58
+ insetInlineStart: 0,
59
+ overflow: 'auto',
60
+ outline: 0
61
+ });
62
+
63
+ export const mask = style({
64
+ position: 'fixed',
65
+ top: 0,
66
+ insetInlineEnd: 0,
67
+ bottom: 0,
68
+ insetInlineStart: 0,
69
+ height: '100%',
70
+ backgroundColor: 'hsla(0,0%,45.1%,0.7)'
71
+ });
72
+
73
+ export const modal = style({
74
+ margin: `0 auto`,
75
+ padding: 0,
76
+ boxSizing: 'border-box',
77
+ position: 'relative',
78
+ width: 'auto',
79
+ top: 100,
80
+ paddingBottom: '24px',
81
+ maxWidth: `calc(100vw - 32px)`,
82
+ pointerEvents: 'none'
83
+ });
84
+
85
+ export const centeredWrapper = style({
86
+ textAlign: 'center',
87
+ '::before': {
88
+ display: 'inline-block',
89
+ width: 0,
90
+ height: '100%',
91
+ verticalAlign: 'middle',
92
+ content: '""'
93
+ }
94
+ });
95
+
96
+ export const centeredModal = style({
97
+ top: 0,
98
+ display: 'inline-block',
99
+ paddingBottom: 0,
100
+ textAlign: 'start',
101
+ verticalAlign: 'middle'
102
+ });
103
+
104
+ export const container = style({
105
+ backgroundColor: '#fff',
106
+ width: '100%',
107
+ maxWidth: vars.maxWidth,
108
+ borderRadius: themeVars.rounded.medium,
109
+ boxShadow:
110
+ '0 1px 2px -2px rgba(0, 0, 0, 0.08), 0 3px 6px 0 rgba(0, 0, 0, 0.06), 0 5px 12px 4px rgba(0, 0, 0, 0.04)',
111
+ border: `1px solid rgba(0, 0, 0, 0.45)`,
112
+ display: 'flex',
113
+ flexDirection: 'column',
114
+ position: 'relative',
115
+ gap: themeVars.space[2],
116
+ pointerEvents: 'auto'
117
+ });
118
+
119
+ export const hasSidebar = style({
120
+ flexDirection: 'row'
121
+ });
122
+
123
+ export const header = style({
124
+ display: 'flex',
125
+ justifyContent: 'space-between',
126
+ alignItems: 'flex-start',
127
+ padding: `${themeVars.space[4]} ${themeVars.space[4]} 0 ${themeVars.space[4]}`,
128
+ flexShrink: '0'
129
+ });
130
+
131
+ export const title = style({
132
+ margin: 0,
133
+ fontSize: `${themeVars.fontSize.xlarge}`,
134
+ fontWeight: '500',
135
+ display: 'flex',
136
+ alignItems: 'center',
137
+ color: themeVars.color.font.default
138
+ });
139
+
140
+ export const close = style([
141
+ {
142
+ outline: `none ${themeVars.color.gray[300]}`,
143
+ display: 'inline-block',
144
+ position: 'absolute',
145
+ top: themeVars.space[3],
146
+ right: themeVars.space[3],
147
+ width: '1.5rem',
148
+ height: '1.5rem',
149
+ backgroundColor: 'transparent',
150
+ border: 'none',
151
+ padding: 0,
152
+ cursor: 'pointer',
153
+ transition: 'all 0.2s',
154
+ borderRadius: themeVars.rounded.full,
155
+ marginLeft: themeVars.space[2],
156
+ ':hover': {
157
+ backgroundColor: themeVars.color.gray[150]
158
+ },
159
+ ':focus': {
160
+ backgroundColor: themeVars.color.gray[150]
161
+ },
162
+ '::before': {
163
+ content: '""',
164
+ position: 'absolute',
165
+ top: '50%',
166
+ left: '50%',
167
+ transform: 'translate(-50%, -50%) rotate(45deg)',
168
+ width: '0.8rem',
169
+ height: '2px',
170
+ backgroundColor: themeVars.color.gray[500],
171
+ transformOrigin: 'center',
172
+ transition: 'all 0.2s'
173
+ },
174
+ '::after': {
175
+ content: '""',
176
+ position: 'absolute',
177
+ top: '50%',
178
+ left: '50%',
179
+ transform: 'translate(-50%, -50%) rotate(-45deg)',
180
+ width: '0.8rem',
181
+ height: '2px',
182
+ backgroundColor: themeVars.color.gray[500],
183
+ transformOrigin: 'center',
184
+ transition: 'all 0.2s'
185
+ }
186
+ }
187
+ ]);
188
+
189
+ export const body = style({
190
+ padding: `${themeVars.space[4]}`,
191
+ display: 'flex',
192
+ flexDirection: 'column',
193
+ flexGrow: '1',
194
+ color: themeVars.color.font.text
195
+ });
196
+
197
+ export const footer = style({
198
+ display: 'flex',
199
+ width: '100%',
200
+ alignItems: 'center',
201
+ padding: `0 ${themeVars.space[4]} ${themeVars.space[4]} ${themeVars.space[4]}`
202
+ });
203
+
204
+ const fadeOutBackgroundAnimation = 'fade-out-background-animation';
205
+ globalKeyframes(fadeOutBackgroundAnimation, {
206
+ from: {
207
+ opacity: 1
208
+ },
209
+ to: {
210
+ opacity: 0
211
+ }
212
+ });
213
+
214
+ const fadeInBackgroundAnimation = 'fade-in-background-animation';
215
+ globalKeyframes(fadeInBackgroundAnimation, {
216
+ from: {
217
+ opacity: 0
218
+ },
219
+ to: {
220
+ opacity: 1
221
+ }
222
+ });
223
+
224
+ const fadeOutAnimation = 'fade-out-animation';
225
+ globalKeyframes(fadeOutAnimation, {
226
+ from: {
227
+ opacity: 1,
228
+ transform: 'scale(1)'
229
+ },
230
+ to: {
231
+ opacity: 0,
232
+ transform: 'scale(0.8)'
233
+ }
234
+ });
235
+
236
+ const fadeInAnimation = 'fade-in-animation';
237
+ globalKeyframes(fadeInAnimation, {
238
+ '0%': {
239
+ opacity: 0,
240
+ transform: 'scale(0.5)',
241
+ left: vars.initialLeft,
242
+ top: vars.initialTop
243
+ },
244
+ '70%': {
245
+ opacity: 1,
246
+ transform: 'scale(1.03)',
247
+ left: 0,
248
+ top: 0
249
+ },
250
+ '100%': {
251
+ opacity: 1,
252
+ transform: 'scale(1)'
253
+ }
254
+ });
255
+
256
+ const fadeInAnimationNoBounce = 'fade-in-animation-no-bounce';
257
+ globalKeyframes(fadeInAnimationNoBounce, {
258
+ '0%': {
259
+ opacity: 0,
260
+ transform: 'scale(0.5)',
261
+ left: vars.initialLeft,
262
+ top: vars.initialTop
263
+ },
264
+ '60%': {
265
+ opacity: 1
266
+ },
267
+ '100%': {
268
+ opacity: 1,
269
+ transform: 'scale(1)',
270
+ left: 0,
271
+ top: 0
272
+ }
273
+ });
274
+
275
+ export const fadeEnterNoBounce = style({
276
+ animationName: fadeInAnimationNoBounce,
277
+ animationDuration: '0.2s',
278
+ animationTimingFunction: 'ease-in-out',
279
+ transition: 'transform 0.3s ease-out'
280
+ });
281
+
282
+ export const fadeEnter = style({
283
+ animationName: fadeInAnimation,
284
+ animationDuration: '0.25s',
285
+ animationTimingFunction: 'ease-in-out',
286
+ transition: themeVars.transition.default
287
+ });
288
+
289
+ export const fadeLeave = style({
290
+ animationName: fadeOutAnimation,
291
+ animationDuration: '0.2s',
292
+ animationTimingFunction: 'ease-in-out'
293
+ });
294
+
295
+ export const fadeBackgroundEnter = style({
296
+ animationName: fadeInBackgroundAnimation,
297
+ animationDuration: '0.1s',
298
+ animationTimingFunction: 'ease-in-out'
299
+ });
300
+
301
+ export const fadeBackgroundLeave = style({
302
+ animationName: fadeOutBackgroundAnimation,
303
+ animationDuration: '0.2s',
304
+ animationTimingFunction: 'ease-in-out'
305
+ });
306
+
307
+ export const fadeEnterFrom = style({});
308
+
309
+ export const sidebar = style({
310
+ borderRadius: `0 ${themeVars.rounded.medium} ${themeVars.rounded.medium} 0`
311
+ });
312
+
313
+ export const content = style({
314
+ flex: 1,
315
+ width: '100%',
316
+ display: 'flex',
317
+ flexDirection: 'column'
318
+ });
@@ -1 +1 @@
1
- export * from './Modal.css';
1
+ export * from './Modal.css';