@teammodlr/ui-kit 2.1.8 → 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.
Files changed (153) hide show
  1. package/lib/components/avatargroup/symbol.d.ts +2 -2
  2. package/lib/components/breadcrumb/style/index.d.ts +1 -1
  3. package/lib/components/breadcrumb/symbol.d.ts +1 -1
  4. package/lib/components/buttongroup/symbol.d.ts +2 -2
  5. package/lib/components/colorpicker/ColorPicker.vue.d.ts +1 -1
  6. package/lib/components/dropdown/Dropdown.vue.d.ts +1 -1
  7. package/lib/components/dropdown/symbol.d.ts +1 -1
  8. package/lib/components/form/symbol.d.ts +1 -1
  9. package/lib/components/messageprovider/style/index.d.ts +1 -1
  10. package/lib/components/radiobuttongroup/symbol.d.ts +2 -2
  11. package/lib/components/tooltip/Tooltip.vue.d.ts +1 -1
  12. package/lib/components/tree/props.d.ts +4 -4
  13. package/lib/components/tree/types.d.ts +10 -10
  14. package/lib/composables/element.d.ts +1 -1
  15. package/lib/composables/useInteractive.d.ts +1 -1
  16. package/lib/composables/useMount.d.ts +1 -1
  17. package/lib/composables/usePopper.d.ts +2 -2
  18. package/lib/composables/useZIndex.d.ts +1 -1
  19. package/lib/index.cjs.js +9 -9
  20. package/lib/index.es.js +2297 -2276
  21. package/lib/install.d.ts +1 -1
  22. package/lib/nuxt.js +17 -15
  23. package/lib/nuxt.plugin.js +6 -6
  24. package/package.json +89 -79
  25. package/src/__storybook__/argTypes.ts +5 -13
  26. package/src/__storybook__/createStory.ts +10 -10
  27. package/src/call.ts +14 -14
  28. package/src/components/avatar/Avatar.vue +1 -1
  29. package/src/components/avatar/examples/index.stories.ts +4 -7
  30. package/src/components/avatar/style/Avatar.css.ts +17 -17
  31. package/src/components/avatargroup/examples/index.stories.ts +5 -10
  32. package/src/components/avatargroup/style/AvatarGroup.css.ts +9 -4
  33. package/src/components/avatargroup/symbol.ts +5 -5
  34. package/src/components/badge/examples/index.stories.ts +4 -6
  35. package/src/components/badge/style/Badge.css.ts +36 -36
  36. package/src/components/breadcrumb/examples/index.stories.ts +6 -10
  37. package/src/components/breadcrumb/style/Breadcrumb.css.ts +17 -17
  38. package/src/components/breadcrumb/style/index.ts +1 -1
  39. package/src/components/breadcrumb/symbol.ts +4 -3
  40. package/src/components/button/examples/index.stories.ts +4 -4
  41. package/src/components/button/style/Button.css.ts +143 -133
  42. package/src/components/buttongroup/examples/index.stories.ts +6 -12
  43. package/src/components/buttongroup/style/ButtonGroup.css.ts +13 -11
  44. package/src/components/buttongroup/symbol.ts +5 -4
  45. package/src/components/checkbox/Checkbox.vue +8 -8
  46. package/src/components/checkbox/examples/index.stories.ts +4 -9
  47. package/src/components/checkbox/examples/index.ts +0 -1
  48. package/src/components/checkbox/style/Checkbox.css.ts +31 -27
  49. package/src/components/checkbox/style/index.ts +1 -1
  50. package/src/components/colorpicker/examples/index.stories.ts +5 -10
  51. package/src/components/colorpicker/examples/index.ts +1 -1
  52. package/src/components/colorpicker/style/ColorPicker.css.ts +22 -14
  53. package/src/components/colorpicker/utils.ts +46 -28
  54. package/src/components/confirm/examples/index.stories.ts +5 -8
  55. package/src/components/confirm/props.ts +2 -2
  56. package/src/components/confirm/providerProps.ts +1 -2
  57. package/src/components/confirm/types.ts +15 -16
  58. package/src/components/confirm/useConfirm.ts +3 -1
  59. package/src/components/dialog/examples/index.stories.ts +5 -9
  60. package/src/components/dialog/style/Dialog.css.ts +38 -37
  61. package/src/components/dropdown/examples/index.stories.ts +3 -7
  62. package/src/components/dropdown/hooks.ts +20 -20
  63. package/src/components/dropdown/style/Dropdown.css.ts +24 -24
  64. package/src/components/dropdown/symbol.ts +3 -2
  65. package/src/components/form/Form.vue +1 -1
  66. package/src/components/form/examples/index.stories.ts +2 -4
  67. package/src/components/form/style/Form.css.ts +13 -8
  68. package/src/components/form/style/index.ts +2 -2
  69. package/src/components/form/symbol.ts +10 -5
  70. package/src/components/image/examples/index.stories.ts +5 -7
  71. package/src/components/input/Input.vue +8 -9
  72. package/src/components/input/examples/index.stories.ts +5 -7
  73. package/src/components/input/style/Input.css.ts +40 -43
  74. package/src/components/link/examples/index.stories.ts +4 -9
  75. package/src/components/messageprovider/examples/index.stories.ts +5 -8
  76. package/src/components/messageprovider/style/Message.css.ts +31 -31
  77. package/src/components/messageprovider/style/index.ts +1 -1
  78. package/src/components/messageprovider/types.ts +31 -22
  79. package/src/components/messageprovider/useMessage.ts +6 -4
  80. package/src/components/modal/examples/index.stories.ts +5 -10
  81. package/src/components/modal/style/Modal.css.ts +76 -73
  82. package/src/components/pagination/examples/index.stories.ts +5 -9
  83. package/src/components/pagination/examples/index.ts +1 -1
  84. package/src/components/pagination/style/Pagination.css.ts +41 -37
  85. package/src/components/radio/Radio.vue +7 -7
  86. package/src/components/radio/examples/index.stories.ts +4 -9
  87. package/src/components/radio/examples/index.ts +0 -1
  88. package/src/components/radio/style/Checkbox.css.ts +30 -31
  89. package/src/components/radio/style/index.ts +1 -1
  90. package/src/components/radiobutton/RadioButton.vue +3 -3
  91. package/src/components/radiobutton/style/RadioButton.css.ts +41 -36
  92. package/src/components/radiobuttongroup/examples/index.stories.ts +6 -10
  93. package/src/components/radiobuttongroup/examples/index.ts +0 -1
  94. package/src/components/radiobuttongroup/style/RadioButtonGroup.css.ts +14 -14
  95. package/src/components/radiobuttongroup/style/index.ts +1 -1
  96. package/src/components/radiobuttongroup/symbol.ts +8 -7
  97. package/src/components/renderer/examlpes/index.stories.ts +4 -8
  98. package/src/components/renderer/props.ts +2 -3
  99. package/src/components/renderer/renderer.ts +3 -3
  100. package/src/components/select/Select.vue +3 -4
  101. package/src/components/select/examples/index.stories.ts +4 -10
  102. package/src/components/select/style/Select.css.ts +62 -61
  103. package/src/components/skeleton/examples/index.stories.ts +5 -9
  104. package/src/components/skeleton/style/Skeleton.css.ts +16 -16
  105. package/src/components/skeleton/style/index.ts +2 -2
  106. package/src/components/slider/style/Slider.css.ts +12 -5
  107. package/src/components/switch/Switch.vue +4 -4
  108. package/src/components/switch/examples/index.stories.ts +4 -9
  109. package/src/components/switch/examples/index.ts +0 -1
  110. package/src/components/switch/style/Switch.css.ts +56 -57
  111. package/src/components/switch/style/index.ts +1 -1
  112. package/src/components/tab/examples/index.stories.ts +5 -11
  113. package/src/components/table/examples/index.stories.ts +6 -12
  114. package/src/components/table/style/Table.css.ts +22 -17
  115. package/src/components/table/style/index.ts +1 -1
  116. package/src/components/table/types/index.ts +1 -1
  117. package/src/components/tag/examples/index.stories.ts +4 -10
  118. package/src/components/tag/style/Tag.css.ts +14 -9
  119. package/src/components/textarea/Textarea.vue +7 -8
  120. package/src/components/textarea/examples/index.stories.ts +4 -8
  121. package/src/components/textarea/style/Textarea.css.ts +33 -33
  122. package/src/components/tooltip/examples/index.stories.ts +5 -10
  123. package/src/components/tooltip/examples/index.ts +2 -2
  124. package/src/components/tooltip/style/Tooltip.css.ts +24 -25
  125. package/src/components/transfer/examples/index.stories.ts +5 -9
  126. package/src/components/transfer/style/Transfer.css.ts +41 -40
  127. package/src/components/tree/examples/index.stories.ts +6 -10
  128. package/src/components/tree/props.ts +20 -18
  129. package/src/components/tree/style/Tree.css.ts +36 -31
  130. package/src/components/tree/types.ts +60 -62
  131. package/src/components/virtualscroll/examples/index.stories.ts +4 -8
  132. package/src/components/virtualscroll/style/VirtualScroll.css.ts +1 -2
  133. package/src/composables/element.ts +4 -4
  134. package/src/composables/useCachedUid.ts +7 -6
  135. package/src/composables/useEventListener.ts +11 -6
  136. package/src/composables/useInput.ts +63 -41
  137. package/src/composables/useInteractive.ts +10 -11
  138. package/src/composables/useMergedState.ts +7 -7
  139. package/src/composables/useMount.ts +11 -11
  140. package/src/composables/usePopper.ts +57 -36
  141. package/src/composables/useZIndex.ts +5 -5
  142. package/src/create.ts +10 -6
  143. package/src/examples/cards/cards.stories.ts +3 -3
  144. package/src/examples/modal/modal.stories.ts +3 -3
  145. package/src/exports/nuxt.js +17 -15
  146. package/src/exports/nuxt.plugin.js +6 -6
  147. package/src/index.ts +0 -2
  148. package/src/install.ts +5 -5
  149. package/src/shims-vue.d.ts +3 -3
  150. package/src/styles/theme.css.ts +51 -43
  151. package/src/styles/transitions.css.ts +26 -28
  152. package/src/types/props.ts +16 -2
  153. package/src/utils/injection.ts +3 -3
@@ -1,12 +1,17 @@
1
- import {createVar, globalKeyframes, style, styleVariants} from "@vanilla-extract/css";
2
- import {themeVars} from "../../../styles/theme.css";
1
+ import {
2
+ createVar,
3
+ globalKeyframes,
4
+ style,
5
+ styleVariants
6
+ } from '@vanilla-extract/css';
7
+ import { themeVars } from '../../../styles/theme.css';
3
8
 
4
9
  const sizes = {
5
10
  xs: '300px',
6
11
  sm: '400px',
7
12
  md: '640px',
8
13
  lg: '800px',
9
- xl: '1140px',
14
+ xl: '1140px'
10
15
  };
11
16
 
12
17
  export const vars = {
@@ -14,77 +19,77 @@ export const vars = {
14
19
  backgroundColor: createVar(),
15
20
  borderColor: createVar(),
16
21
  initialLeft: createVar(),
17
- initialTop: createVar(),
18
- }
22
+ initialTop: createVar()
23
+ };
19
24
 
20
25
  export const size = styleVariants({
21
26
  xs: {
22
27
  vars: {
23
- [vars.maxWidth]: sizes.xs,
24
- },
28
+ [vars.maxWidth]: sizes.xs
29
+ }
25
30
  },
26
31
  sm: {
27
32
  vars: {
28
- [vars.maxWidth]: sizes.sm,
29
- },
33
+ [vars.maxWidth]: sizes.sm
34
+ }
30
35
  },
31
36
  md: {
32
37
  vars: {
33
- [vars.maxWidth]: sizes.md,
34
- },
38
+ [vars.maxWidth]: sizes.md
39
+ }
35
40
  },
36
41
  lg: {
37
42
  vars: {
38
- [vars.maxWidth]: sizes.lg,
39
- },
43
+ [vars.maxWidth]: sizes.lg
44
+ }
40
45
  },
41
46
  xl: {
42
47
  vars: {
43
- [vars.maxWidth]: sizes.xl,
44
- },
45
- },
48
+ [vars.maxWidth]: sizes.xl
49
+ }
50
+ }
46
51
  });
47
52
 
48
-
49
53
  export const background = style({
50
54
  zIndex: 100,
51
55
  backgroundColor: 'hsla(0,0%,45.1%,0.7)',
52
- position: "fixed",
56
+ position: 'fixed',
53
57
  top: 0,
54
58
  bottom: 0,
55
59
  left: 0,
56
60
  right: 0,
57
- display: "flex",
58
- justifyContent: "center",
59
- alignItems: "center",
61
+ display: 'flex',
62
+ justifyContent: 'center',
63
+ alignItems: 'center'
60
64
  });
61
65
 
62
66
  export const container = style({
63
- backgroundColor: "#fff",
64
- width: "100%",
67
+ backgroundColor: '#fff',
68
+ width: '100%',
65
69
  maxWidth: vars.maxWidth,
66
70
  borderRadius: themeVars.rounded.medium,
67
- boxShadow: "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)",
71
+ boxShadow:
72
+ '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)',
68
73
  border: `1px solid rgba(0, 0, 0, 0.45)`,
69
- display: "flex",
70
- flexDirection: "column",
71
- position: "relative",
74
+ display: 'flex',
75
+ flexDirection: 'column',
76
+ position: 'relative'
72
77
  });
73
78
 
74
79
  export const header = style({
75
- display: "flex",
76
- justifyContent: "space-between",
77
- alignItems: "flex-start",
80
+ display: 'flex',
81
+ justifyContent: 'space-between',
82
+ alignItems: 'flex-start',
78
83
  padding: `${themeVars.space[4]} ${themeVars.space[4]} 0 ${themeVars.space[4]}`,
79
- flexShrink: "0",
84
+ flexShrink: '0'
80
85
  });
81
86
 
82
87
  export const title = style({
83
88
  margin: 0,
84
89
  fontSize: `${themeVars.fontSize.xlarge}`,
85
- fontWeight: "500",
86
- display: "flex",
87
- alignItems: "center",
90
+ fontWeight: '500',
91
+ display: 'flex',
92
+ alignItems: 'center',
88
93
  color: themeVars.color.font.default
89
94
  });
90
95
 
@@ -103,7 +108,7 @@ export const close = style([
103
108
  borderRadius: themeVars.rounded.full,
104
109
  marginLeft: themeVars.space[2],
105
110
  ':hover': {
106
- backgroundColor: themeVars.color.gray[150],
111
+ backgroundColor: themeVars.color.gray[150]
107
112
  },
108
113
  ':focus': {
109
114
  backgroundColor: themeVars.color.gray[150]
@@ -130,59 +135,59 @@ export const close = style([
130
135
  height: '2px',
131
136
  backgroundColor: themeVars.color.gray[500],
132
137
  transformOrigin: 'center',
133
- transition: 'all 0.2s',
138
+ transition: 'all 0.2s'
134
139
  }
135
140
  }
136
141
  ]);
137
142
 
138
143
  export const body = style({
139
144
  padding: `${themeVars.space[4]}`,
140
- display: "flex",
141
- flexDirection: "column",
142
- flexGrow: "1",
145
+ display: 'flex',
146
+ flexDirection: 'column',
147
+ flexGrow: '1',
143
148
  color: themeVars.color.font.text
144
149
  });
145
150
 
146
151
  export const footer = style({
147
- display: "flex",
148
- width: "100%",
149
- alignItems: "center",
150
- padding: `0 ${themeVars.space[4]} ${themeVars.space[4]} ${themeVars.space[4]}`,
152
+ display: 'flex',
153
+ width: '100%',
154
+ alignItems: 'center',
155
+ padding: `0 ${themeVars.space[4]} ${themeVars.space[4]} ${themeVars.space[4]}`
151
156
  });
152
157
 
153
- const fadeOutBackgroundAnimation = "fade-out-background-animation";
158
+ const fadeOutBackgroundAnimation = 'fade-out-background-animation';
154
159
  globalKeyframes(fadeOutBackgroundAnimation, {
155
- 'from': {
156
- opacity: 1,
160
+ from: {
161
+ opacity: 1
157
162
  },
158
- 'to': {
159
- opacity: 0,
163
+ to: {
164
+ opacity: 0
160
165
  }
161
166
  });
162
167
 
163
- const fadeInBackgroundAnimation = "fade-in-background-animation";
168
+ const fadeInBackgroundAnimation = 'fade-in-background-animation';
164
169
  globalKeyframes(fadeInBackgroundAnimation, {
165
- 'from': {
166
- opacity: 0,
170
+ from: {
171
+ opacity: 0
167
172
  },
168
- 'to': {
169
- opacity: 1,
173
+ to: {
174
+ opacity: 1
170
175
  }
171
176
  });
172
177
 
173
- const fadeOutAnimation = "fade-out-animation";
178
+ const fadeOutAnimation = 'fade-out-animation';
174
179
  globalKeyframes(fadeOutAnimation, {
175
- 'from': {
180
+ from: {
176
181
  opacity: 1,
177
182
  transform: 'scale(1)'
178
183
  },
179
- 'to': {
184
+ to: {
180
185
  opacity: 0,
181
186
  transform: 'scale(0.8)'
182
187
  }
183
188
  });
184
189
 
185
- const fadeInAnimation = "fade-in-animation";
190
+ const fadeInAnimation = 'fade-in-animation';
186
191
  globalKeyframes(fadeInAnimation, {
187
192
  '0%': {
188
193
  opacity: 0,
@@ -198,11 +203,11 @@ globalKeyframes(fadeInAnimation, {
198
203
  },
199
204
  '100%': {
200
205
  opacity: 1,
201
- transform: 'scale(1)',
206
+ transform: 'scale(1)'
202
207
  }
203
208
  });
204
209
 
205
- const fadeInAnimationNoBounce = "fade-in-animation-no-bounce";
210
+ const fadeInAnimationNoBounce = 'fade-in-animation-no-bounce';
206
211
  globalKeyframes(fadeInAnimationNoBounce, {
207
212
  '0%': {
208
213
  opacity: 0,
@@ -211,7 +216,7 @@ globalKeyframes(fadeInAnimationNoBounce, {
211
216
  top: vars.initialTop
212
217
  },
213
218
  '60%': {
214
- opacity: 1,
219
+ opacity: 1
215
220
  },
216
221
  '100%': {
217
222
  opacity: 1,
@@ -225,34 +230,32 @@ export const fadeEnterNoBounce = style({
225
230
  animationName: fadeInAnimationNoBounce,
226
231
  animationDuration: '0.2s',
227
232
  animationTimingFunction: 'ease-in-out',
228
- transition: "transform 0.3s ease-out",
229
- })
233
+ transition: 'transform 0.3s ease-out'
234
+ });
230
235
 
231
236
  export const fadeEnter = style({
232
237
  animationName: fadeInAnimation,
233
238
  animationDuration: '0.25s',
234
239
  animationTimingFunction: 'ease-in-out',
235
- transition: themeVars.transition.default,
236
- })
240
+ transition: themeVars.transition.default
241
+ });
237
242
 
238
243
  export const fadeLeave = style({
239
244
  animationName: fadeOutAnimation,
240
245
  animationDuration: '0.2s',
241
- animationTimingFunction: 'ease-in-out',
242
- })
246
+ animationTimingFunction: 'ease-in-out'
247
+ });
243
248
 
244
249
  export const fadeBackgroundEnter = style({
245
250
  animationName: fadeInBackgroundAnimation,
246
251
  animationDuration: '0.1s',
247
- animationTimingFunction: 'ease-in-out',
248
- })
252
+ animationTimingFunction: 'ease-in-out'
253
+ });
249
254
 
250
255
  export const fadeBackgroundLeave = style({
251
256
  animationName: fadeOutBackgroundAnimation,
252
257
  animationDuration: '0.2s',
253
- animationTimingFunction: 'ease-in-out',
254
- })
255
-
256
- export const fadeEnterFrom = style({
257
-
258
+ animationTimingFunction: 'ease-in-out'
258
259
  });
260
+
261
+ export const fadeEnterFrom = style({});
@@ -1,15 +1,11 @@
1
- import MPagination from "../Pagination.vue";
2
- import {
3
- MPaginationBasic
4
- } from "./index";
1
+ import MPagination from '../Pagination.vue';
2
+ import { MPaginationBasic } from './index';
5
3
 
6
- import {
7
- createStory
8
- } from "../../../__storybook__";
4
+ import { createStory } from '../../../__storybook__';
9
5
 
10
6
  export default {
11
7
  component: MPagination,
12
8
  title: 'Components/Pagination'
13
- }
9
+ };
14
10
 
15
- export const Basic = createStory(MPaginationBasic)
11
+ export const Basic = createStory(MPaginationBasic);
@@ -1 +1 @@
1
- export { default as MPaginationBasic } from './basic.vue';
1
+ export { default as MPaginationBasic } from './basic.vue';
@@ -1,64 +1,69 @@
1
- import {createVar, globalKeyframes, style, styleVariants} from "@vanilla-extract/css";
2
- import {themeVars} from "../../../styles/theme.css";
1
+ import {
2
+ createVar,
3
+ globalKeyframes,
4
+ style,
5
+ styleVariants
6
+ } from '@vanilla-extract/css';
7
+ import { themeVars } from '../../../styles/theme.css';
3
8
 
4
9
  const sizes = {
5
10
  xs: '300px',
6
11
  sm: '400px',
7
12
  md: '640px',
8
13
  lg: '800px',
9
- xl: '1140px',
14
+ xl: '1140px'
10
15
  };
11
16
 
12
17
  export const vars = {
13
18
  backgroundColor: createVar(),
14
- color: createVar(),
15
- }
19
+ color: createVar()
20
+ };
16
21
 
17
22
  export const pagination = style({
18
- display: "inline-flex",
19
- alignItems: "center",
23
+ display: 'inline-flex',
24
+ alignItems: 'center',
20
25
  fontSize: themeVars.fontSize.small,
21
- boxSizing: "border-box"
26
+ boxSizing: 'border-box'
22
27
  });
23
28
 
24
29
  export const buttons = style({
25
- display: "inline-flex",
26
- alignItems: "center",
30
+ display: 'inline-flex',
31
+ alignItems: 'center',
27
32
  fontSize: themeVars.fontSize.small,
28
- boxSizing: "border-box",
29
- gap: themeVars.space["2.5"]
33
+ boxSizing: 'border-box',
34
+ gap: themeVars.space['2.5']
30
35
  });
31
36
 
32
37
  export const pages = style({
33
- display: "inline-flex",
34
- alignItems: "center",
38
+ display: 'inline-flex',
39
+ alignItems: 'center',
35
40
  margin: 0,
36
- gap: themeVars.space["1"]
41
+ gap: themeVars.space['1']
37
42
  });
38
43
 
39
44
  export const page = style({
40
45
  vars: {
41
- [vars.backgroundColor]: "transparent",
42
- [vars.color]: themeVars.color.gray["700"]
46
+ [vars.backgroundColor]: 'transparent',
47
+ [vars.color]: themeVars.color.gray['700']
43
48
  },
44
- height: "28px",
45
- width: "28px",
49
+ height: '28px',
50
+ width: '28px',
46
51
  borderRadius: themeVars.rounded.default,
47
- outline: "none",
48
- border: "none",
52
+ outline: 'none',
53
+ border: 'none',
49
54
  fontSize: 'inherit',
50
- padding: `0px ${themeVars.space["2"]}`,
51
- display: "flex",
52
- alignItems: "center",
53
- justifyContent: "center",
55
+ padding: `0px ${themeVars.space['2']}`,
56
+ display: 'flex',
57
+ alignItems: 'center',
58
+ justifyContent: 'center',
54
59
  lineHeight: 1,
55
60
  color: vars.color,
56
61
  backgroundColor: vars.backgroundColor,
57
- cursor: "pointer",
62
+ cursor: 'pointer',
58
63
  selectors: {
59
64
  '&:hover': {
60
65
  vars: {
61
- [vars.backgroundColor]: themeVars.color.gray["150"],
66
+ [vars.backgroundColor]: themeVars.color.gray['150']
62
67
  }
63
68
  }
64
69
  }
@@ -66,23 +71,22 @@ export const page = style({
66
71
 
67
72
  export const active = style({
68
73
  vars: {
69
- [vars.backgroundColor]: themeVars.color.blue["600"],
70
- [vars.color]: "#FFF"
74
+ [vars.backgroundColor]: themeVars.color.blue['600'],
75
+ [vars.color]: '#FFF'
71
76
  },
72
77
  selectors: {
73
78
  '&:hover': {
74
79
  vars: {
75
- [vars.backgroundColor]: themeVars.color.blue["700"],
80
+ [vars.backgroundColor]: themeVars.color.blue['700']
76
81
  }
77
82
  }
78
83
  }
79
84
  });
80
85
 
81
86
  export const svg = style({
82
- height: "calc(1em + 2px)",
83
- width: "calc(1em + 2px)",
84
- display: "inline-block",
85
- fontSize: "inherit",
86
- userSelect: "none",
87
-
88
- });
87
+ height: 'calc(1em + 2px)',
88
+ width: 'calc(1em + 2px)',
89
+ display: 'inline-block',
90
+ fontSize: 'inherit',
91
+ userSelect: 'none'
92
+ });
@@ -28,11 +28,11 @@
28
28
  </template>
29
29
 
30
30
  <script lang="ts">
31
- import type { PropType } from 'vue';
32
- import { computed, defineComponent, defineExpose, ref, toRef } from 'vue';
33
- import { useInput } from '../../composables/useInput';
34
- import { useInteractive } from "../../composables/useInteractive";
35
- import type { Size } from '../../types/props';
31
+ import type {PropType} from 'vue';
32
+ import {computed, defineComponent, ref, toRef} from 'vue';
33
+ import {useInput} from '../../composables/useInput';
34
+ import {useInteractive} from "../../composables/useInteractive";
35
+ import type {Size} from '../../types/props';
36
36
  import * as style from './style';
37
37
 
38
38
  export default defineComponent({
@@ -61,7 +61,7 @@ export default defineComponent({
61
61
  default: null
62
62
  }
63
63
  },
64
- setup(props, {slots, emit}) {
64
+ setup(props, {slots, emit, expose}) {
65
65
  const radioRef = ref<HTMLElement | null>(null);
66
66
 
67
67
  const {focus, blur} = useInteractive(radioRef);
@@ -106,7 +106,7 @@ export default defineComponent({
106
106
  return formError.value || props.error;
107
107
  });
108
108
 
109
- defineExpose({
109
+ expose({
110
110
  focus,
111
111
  blur,
112
112
  })
@@ -1,12 +1,7 @@
1
- import MRadio from "../Radio.vue";
2
- import {
3
- MRadioBasic,
4
- MRadioGroup,
5
- } from "./index";
1
+ import MRadio from '../Radio.vue';
2
+ import { MRadioBasic, MRadioGroup } from './index';
6
3
 
7
- import {
8
- createStory, sizeArgType, colorArgType
9
- } from "../../../__storybook__";
4
+ import { createStory, sizeArgType, colorArgType } from '../../../__storybook__';
10
5
 
11
6
  export default {
12
7
  component: MRadio,
@@ -15,7 +10,7 @@ export default {
15
10
  ...sizeArgType(),
16
11
  ...colorArgType()
17
12
  }
18
- }
13
+ };
19
14
 
20
15
  export const Basic = createStory(MRadioBasic);
21
16
  export const Group = createStory(MRadioGroup);
@@ -1,3 +1,2 @@
1
1
  export { default as MRadioBasic } from './basic.vue';
2
2
  export { default as MRadioGroup } from './group.vue';
3
-
@@ -1,12 +1,12 @@
1
- import {createVar, style, styleVariants} from "@vanilla-extract/css";
2
- import {themeVars} from "../../../styles/theme.css";
1
+ import { createVar, style, styleVariants } from '@vanilla-extract/css';
2
+ import { themeVars } from '../../../styles/theme.css';
3
3
 
4
4
  const sizes = {
5
5
  xs: '16px',
6
6
  sm: '18px',
7
7
  md: '20px',
8
8
  lg: '22px',
9
- xl: '24px',
9
+ xl: '24px'
10
10
  };
11
11
 
12
12
  export const vars = {
@@ -15,30 +15,30 @@ export const vars = {
15
15
  backgroundColor: createVar(),
16
16
  borderColor: createVar(),
17
17
  color: createVar()
18
- }
18
+ };
19
19
 
20
20
  export const base = style({
21
- position: "relative",
22
- display: "inline-flex",
23
- alignItems: "center",
24
- cursor: "pointer",
25
- gap: themeVars.space['1.5'],
21
+ position: 'relative',
22
+ display: 'inline-flex',
23
+ alignItems: 'center',
24
+ cursor: 'pointer',
25
+ gap: themeVars.space['1.5']
26
26
  });
27
27
 
28
28
  export const input = style({
29
29
  position: 'absolute',
30
30
  opacity: 0,
31
- cursor: "pointer"
31
+ cursor: 'pointer'
32
32
  });
33
33
 
34
34
  export const checkmark = style({
35
- position: "absolute",
35
+ position: 'absolute',
36
36
  width: `calc(${vars.height} - 2px)`,
37
37
  height: `calc(${vars.height} - 2px)`,
38
- top: "50%",
39
- left: "50%",
40
- transform: "translate(-50%, -50%)",
41
- color: "white",
38
+ top: '50%',
39
+ left: '50%',
40
+ transform: 'translate(-50%, -50%)',
41
+ color: 'white'
42
42
  });
43
43
 
44
44
  export const checkbox = style({
@@ -47,9 +47,9 @@ export const checkbox = style({
47
47
  [vars.radius]: themeVars.rounded.full,
48
48
  [vars.backgroundColor]: 'white',
49
49
  [vars.borderColor]: themeVars.color.gray[300],
50
- [vars.color]: themeVars.color.gray[600],
50
+ [vars.color]: themeVars.color.gray[600]
51
51
  },
52
- position: "relative",
52
+ position: 'relative',
53
53
  width: vars.height,
54
54
  height: vars.height,
55
55
  borderRadius: vars.radius,
@@ -63,7 +63,7 @@ export const checkbox = style({
63
63
  export const checked = style({
64
64
  vars: {
65
65
  [vars.borderColor]: themeVars.color.blue[500],
66
- [vars.backgroundColor]: themeVars.color.blue[500],
66
+ [vars.backgroundColor]: themeVars.color.blue[500]
67
67
  },
68
68
  selectors: {
69
69
  ['&:after']: {
@@ -75,31 +75,31 @@ export const checked = style({
75
75
  width: `calc(${vars.height} - 10px)`,
76
76
  height: `calc(${vars.height} - 10px)`,
77
77
  borderRadius: themeVars.rounded.full,
78
- backgroundColor: "#FFF"
78
+ backgroundColor: '#FFF'
79
79
  }
80
80
  }
81
81
  });
82
82
 
83
83
  export const disabled = style({
84
84
  opacity: 0.5,
85
- cursor: 'not-allowed',
85
+ cursor: 'not-allowed'
86
86
  });
87
87
 
88
88
  export const indeterminate = style({
89
89
  vars: {
90
90
  [vars.borderColor]: themeVars.color.blue[500],
91
- [vars.backgroundColor]: themeVars.color.blue[500],
91
+ [vars.backgroundColor]: themeVars.color.blue[500]
92
92
  }
93
93
  });
94
94
 
95
95
  export const label = style({
96
96
  marginLeft: themeVars.space['0.5'],
97
- fontWeight: "500",
97
+ fontWeight: '500',
98
98
  display: 'inline-block',
99
99
  fontSize: themeVars.fontSize.base,
100
100
  wordBreak: 'break-word',
101
- cursor: 'pointer',
102
- })
101
+ cursor: 'pointer'
102
+ });
103
103
 
104
104
  export const size = styleVariants({
105
105
  xs: {
@@ -115,17 +115,16 @@ export const size = styleVariants({
115
115
  md: {
116
116
  vars: {
117
117
  [vars.height]: sizes.md
118
- },
118
+ }
119
119
  },
120
120
  lg: {
121
121
  vars: {
122
- [vars.height]: sizes.lg,
123
- },
122
+ [vars.height]: sizes.lg
123
+ }
124
124
  },
125
125
  xl: {
126
126
  vars: {
127
- [vars.height]: sizes.xl,
128
- },
129
- },
127
+ [vars.height]: sizes.xl
128
+ }
129
+ }
130
130
  });
131
-
@@ -1 +1 @@
1
- export * from './Checkbox.css'
1
+ export * from './Checkbox.css';
@@ -9,7 +9,7 @@
9
9
 
10
10
  <script lang="ts">
11
11
  import type {PropType} from "vue";
12
- import {computed, defineComponent, inject, ref,defineExpose } from "vue";
12
+ import {computed, defineComponent, inject, ref } from "vue";
13
13
  import type {Size} from "../../types/props";
14
14
  import * as style from "./style";
15
15
  import {useInteractive} from "../../composables/useInteractive";
@@ -48,7 +48,7 @@ export default defineComponent({
48
48
  }
49
49
  },
50
50
  emits: ['update:modelValue'],
51
- setup(props, {emit}) {
51
+ setup(props, {emit, expose}) {
52
52
  const radioRef = ref<HTMLElement | null>(null);
53
53
  const parentState = inject(RADIO_BUTTON_GROUP_STATE, null);
54
54
  const value = computed(() => {
@@ -110,7 +110,7 @@ export default defineComponent({
110
110
  props.onClick(e);
111
111
  };
112
112
 
113
- defineExpose({
113
+ expose({
114
114
  focus,
115
115
  blur,
116
116
  })