@teammodlr/ui-kit 2.0.20 → 2.0.22

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 (182) hide show
  1. package/lib/__storybook__/argTypes.d.ts +40 -40
  2. package/lib/__storybook__/createStory.d.ts +8 -8
  3. package/lib/__storybook__/index.d.ts +2 -2
  4. package/lib/components/avatar/Avatar.vue.d.ts +56 -56
  5. package/lib/components/avatar/style/Avatar.css.d.ts +9 -9
  6. package/lib/components/avatar/style/index.d.ts +1 -1
  7. package/lib/components/avatargroup/AvatarGroup.vue.d.ts +49 -49
  8. package/lib/components/avatargroup/style/AvatarGroup.css.d.ts +2 -2
  9. package/lib/components/avatargroup/style/index.d.ts +1 -1
  10. package/lib/components/avatargroup/symbol.d.ts +13 -13
  11. package/lib/components/badge/Badge.vue.d.ts +30 -30
  12. package/lib/components/badge/style/Badge.css.d.ts +4 -4
  13. package/lib/components/badge/style/index.d.ts +1 -1
  14. package/lib/components/breadcrumb/Breadcrumb.vue.d.ts +34 -34
  15. package/lib/components/breadcrumb/BreadcrumbItem.vue.d.ts +29 -29
  16. package/lib/components/breadcrumb/style/Breadcrumb.css.d.ts +4 -4
  17. package/lib/components/breadcrumb/style/index.d.ts +1 -1
  18. package/lib/components/breadcrumb/symbol.d.ts +13 -13
  19. package/lib/components/button/Button.vue.d.ts +141 -141
  20. package/lib/components/button/style/Button.css.d.ts +25 -25
  21. package/lib/components/button/style/index.d.ts +1 -1
  22. package/lib/components/buttongroup/ButtonGroup.vue.d.ts +18 -18
  23. package/lib/components/buttongroup/style/ButtonGroup.css.d.ts +2 -2
  24. package/lib/components/buttongroup/style/index.d.ts +1 -1
  25. package/lib/components/buttongroup/symbol.d.ts +6 -6
  26. package/lib/components/checkbox/Checkbox.vue.d.ts +94 -94
  27. package/lib/components/checkbox/style/Checkbox.css.d.ts +16 -16
  28. package/lib/components/checkbox/style/index.d.ts +1 -1
  29. package/lib/components/colorpicker/ColorPicker.vue.d.ts +77 -77
  30. package/lib/components/colorpicker/style/ColorPicker.css.d.ts +10 -10
  31. package/lib/components/colorpicker/style/index.d.ts +1 -1
  32. package/lib/components/colorpicker/utils.d.ts +16 -16
  33. package/lib/components/dropdown/Dropdown.vue.d.ts +122 -115
  34. package/lib/components/dropdown/DropdownItem.vue.d.ts +78 -78
  35. package/lib/components/dropdown/DropdownList.vue.d.ts +5 -5
  36. package/lib/components/dropdown/DropdownSeperator.vue.d.ts +4 -4
  37. package/lib/components/dropdown/DropdownWrapper.vue.d.ts +2 -2
  38. package/lib/components/dropdown/hooks.d.ts +2 -2
  39. package/lib/components/dropdown/style/Dropdown.css.d.ts +6 -6
  40. package/lib/components/dropdown/style/index.d.ts +1 -1
  41. package/lib/components/dropdown/symbol.d.ts +6 -6
  42. package/lib/components/form/Form.vue.d.ts +75 -75
  43. package/lib/components/form/style/Form.css.d.ts +4 -4
  44. package/lib/components/form/style/index.d.ts +2 -2
  45. package/lib/components/form/symbol.d.ts +9 -9
  46. package/lib/components/image/Image.vue.d.ts +50 -50
  47. package/lib/components/index.d.ts +40 -39
  48. package/lib/components/input/Input.vue.d.ts +142 -142
  49. package/lib/components/input/style/Input.css.d.ts +23 -23
  50. package/lib/components/input/style/index.d.ts +1 -1
  51. package/lib/components/link/Link.vue.d.ts +51 -51
  52. package/lib/components/messageprovider/Message.vue.d.ts +73 -73
  53. package/lib/components/messageprovider/MessageProvider.vue.d.ts +52 -52
  54. package/lib/components/messageprovider/style/Message.css.d.ts +12 -12
  55. package/lib/components/messageprovider/style/index.d.ts +1 -1
  56. package/lib/components/messageprovider/types.d.ts +29 -29
  57. package/lib/components/messageprovider/useMessage.d.ts +2 -2
  58. package/lib/components/modal/Modal.vue.d.ts +52 -52
  59. package/lib/components/modal/style/Modal.css.d.ts +21 -21
  60. package/lib/components/modal/style/index.d.ts +1 -1
  61. package/lib/components/pagination/Pagination.vue.d.ts +75 -75
  62. package/lib/components/pagination/style/Pagination.css.d.ts +10 -10
  63. package/lib/components/pagination/style/index.d.ts +1 -1
  64. package/lib/components/radio/Radio.vue.d.ts +85 -85
  65. package/lib/components/radio/style/Checkbox.css.d.ts +16 -16
  66. package/lib/components/radio/style/index.d.ts +1 -1
  67. package/lib/components/radiobutton/RadioButton.vue.d.ts +98 -98
  68. package/lib/components/radiobutton/style/RadioButton.css.d.ts +14 -14
  69. package/lib/components/radiobutton/style/index.d.ts +1 -1
  70. package/lib/components/radiobuttongroup/RadioButtonGroup.vue.d.ts +48 -48
  71. package/lib/components/radiobuttongroup/style/RadioButtonGroup.css.d.ts +3 -3
  72. package/lib/components/radiobuttongroup/style/index.d.ts +1 -1
  73. package/lib/components/radiobuttongroup/symbol.d.ts +9 -9
  74. package/lib/components/select/Select.vue.d.ts +194 -194
  75. package/lib/components/select/style/Select.css.d.ts +31 -31
  76. package/lib/components/select/style/index.d.ts +1 -1
  77. package/lib/components/skeleton/Skeleton.vue.d.ts +33 -33
  78. package/lib/components/skeleton/style/Skeleton.css.d.ts +8 -8
  79. package/lib/components/skeleton/style/index.d.ts +2 -2
  80. package/lib/components/slider/Slider.vue.d.ts +32 -32
  81. package/lib/components/slider/style/Slider.css.d.ts +4 -4
  82. package/lib/components/slider/style/index.d.ts +1 -1
  83. package/lib/components/tab/Tab.vue.d.ts +41 -41
  84. package/lib/components/tab/TabGroup.vue.d.ts +43 -43
  85. package/lib/components/table/Table.vue.d.ts +62 -62
  86. package/lib/components/table/TableBody.vue.d.ts +2 -2
  87. package/lib/components/table/TableCell.vue.d.ts +2 -2
  88. package/lib/components/table/TableHead.vue.d.ts +30 -30
  89. package/lib/components/table/TableHeadRow.vue.d.ts +2 -2
  90. package/lib/components/table/TableRow.vue.d.ts +2 -2
  91. package/lib/components/table/style/Table.css.d.ts +4 -4
  92. package/lib/components/table/style/index.d.ts +1 -1
  93. package/lib/components/table/types/index.d.ts +6 -6
  94. package/lib/components/tag/Tag.vue.d.ts +44 -44
  95. package/lib/components/tag/style/Tag.css.d.ts +11 -11
  96. package/lib/components/tag/style/index.d.ts +1 -1
  97. package/lib/components/textarea/TextArea.vue.d.ts +137 -0
  98. package/lib/components/textarea/style/TextArea.css.d.ts +19 -0
  99. package/lib/components/textarea/style/index.d.ts +1 -0
  100. package/lib/components/tooltip/Tooltip.vue.d.ts +71 -71
  101. package/lib/components/tooltip/style/Tooltip.css.d.ts +10 -10
  102. package/lib/components/tooltip/style/index.d.ts +1 -1
  103. package/lib/components/transfer/Transfer.vue.d.ts +67 -67
  104. package/lib/components/transfer/style/Transfer.css.d.ts +7 -7
  105. package/lib/components/transfer/style/index.d.ts +1 -1
  106. package/lib/components/virtualscroll/VirtualScroll.vue.d.ts +73 -73
  107. package/lib/components/virtualscroll/style/VirtualScroll.css.d.ts +1 -1
  108. package/lib/components/virtualscroll/style/index.d.ts +1 -1
  109. package/lib/composables/element.d.ts +2 -2
  110. package/lib/composables/index.d.ts +3 -3
  111. package/lib/composables/useCachedUid.d.ts +13 -13
  112. package/lib/composables/useEventListener.d.ts +1 -1
  113. package/lib/composables/useInput.d.ts +36 -36
  114. package/lib/composables/useInteractive.d.ts +15 -15
  115. package/lib/composables/useIsServer.d.ts +1 -1
  116. package/lib/composables/useMount.d.ts +13 -13
  117. package/lib/composables/usePopper.d.ts +31 -31
  118. package/lib/composables/useZIndex.d.ts +8 -8
  119. package/lib/create.d.ts +9 -9
  120. package/lib/index.cjs.js +4 -4
  121. package/lib/index.d.ts +5 -5
  122. package/lib/index.es.js +2271 -2108
  123. package/lib/install.d.ts +4 -4
  124. package/lib/style.css +1 -1
  125. package/lib/styles/theme.css.d.ts +167 -167
  126. package/lib/styles/typography.css.d.ts +22 -22
  127. package/lib/types/props.d.ts +3 -3
  128. package/package.json +1 -1
  129. package/src/components/avatargroup/AvatarGroup.vue +71 -71
  130. package/src/components/avatargroup/symbol.ts +16 -16
  131. package/src/components/breadcrumb/BreadcrumbItem.vue +72 -72
  132. package/src/components/breadcrumb/style/Breadcrumb.css.ts +39 -39
  133. package/src/components/breadcrumb/symbol.ts +16 -16
  134. package/src/components/button/Button.vue +203 -203
  135. package/src/components/buttongroup/ButtonGroup.vue +36 -36
  136. package/src/components/buttongroup/symbol.ts +7 -7
  137. package/src/components/colorpicker/ColorPicker.vue +2 -2
  138. package/src/components/dropdown/Dropdown.vue +10 -5
  139. package/src/components/dropdown/DropdownItem.vue +134 -134
  140. package/src/components/dropdown/DropdownSeperator.vue +22 -22
  141. package/src/components/dropdown/symbol.ts +7 -7
  142. package/src/components/form/style/Form.css.ts +22 -22
  143. package/src/components/form/style/index.ts +1 -1
  144. package/src/components/form/symbol.ts +10 -10
  145. package/src/components/index.ts +2 -1
  146. package/src/components/modal/examples/index.ts +2 -2
  147. package/src/components/pagination/Pagination.vue +229 -229
  148. package/src/components/pagination/examples/basic.vue +17 -17
  149. package/src/components/pagination/examples/index.stories.ts +14 -14
  150. package/src/components/pagination/style/Pagination.css.ts +87 -87
  151. package/src/components/pagination/style/index.ts +1 -1
  152. package/src/components/radiobutton/RadioButton.vue +131 -131
  153. package/src/components/radiobutton/style/RadioButton.css.ts +183 -183
  154. package/src/components/radiobutton/style/index.ts +1 -1
  155. package/src/components/radiobuttongroup/RadioButtonGroup.vue +74 -74
  156. package/src/components/radiobuttongroup/style/RadioButtonGroup.css.ts +36 -36
  157. package/src/components/radiobuttongroup/symbol.ts +10 -10
  158. package/src/components/skeleton/Skeleton.vue +55 -55
  159. package/src/components/skeleton/style/Skeleton.css.ts +56 -56
  160. package/src/components/skeleton/style/index.ts +1 -1
  161. package/src/components/table/style/Table.css.ts +80 -80
  162. package/src/components/textarea/TextArea.css +173 -0
  163. package/src/components/textarea/TextArea.vue +181 -0
  164. package/src/components/textarea/examples/basic.vue +8 -0
  165. package/src/components/textarea/examples/index.stories.ts +18 -0
  166. package/src/components/textarea/examples/index.ts +1 -0
  167. package/src/components/textarea/style/TextArea.css.ts +190 -0
  168. package/src/components/textarea/style/index.ts +1 -0
  169. package/src/components/tooltip/style/Tooltip.css.ts +91 -91
  170. package/src/components/tooltip/style/index.ts +1 -1
  171. package/src/components/transfer/Transfer.vue +143 -143
  172. package/src/components/transfer/examples/basic.vue +20 -20
  173. package/src/components/transfer/examples/index.stories.ts +15 -15
  174. package/src/components/transfer/examples/index.ts +1 -1
  175. package/src/components/transfer/style/Transfer.css.ts +67 -67
  176. package/src/components/transfer/style/index.ts +1 -1
  177. package/src/composables/index.ts +2 -2
  178. package/src/composables/useInteractive.ts +19 -19
  179. package/src/composables/useZIndex.ts +30 -30
  180. package/src/examples/cards/cards.stories.ts +9 -9
  181. package/src/examples/cards/sidebar.vue +262 -262
  182. package/src/styles/theme.css.ts +170 -170
@@ -1,184 +1,184 @@
1
- import {createVar, globalStyle, style, styleVariants} from "@vanilla-extract/css";
2
- import {themeVars} from "../../../styles/theme.css";
3
-
4
- const sizes = {
5
- xs: '22px',
6
- sm: '28px',
7
- md: '36px',
8
- lg: '40px',
9
- xl: '45px',
10
- };
11
-
12
- const borderRadiuses = {
13
- xs: '2px',
14
- sm: '3px',
15
- md: '4px',
16
- lg: '6px',
17
- xl: '8px',
18
- };
19
-
20
- const padding = {
21
- xs: `0 ${themeVars.space[1]}`,
22
- sm: `0 ${themeVars.space[2]}`,
23
- md: `0 ${themeVars.space[3]}`,
24
- lg: `0 ${themeVars.space[3]}`,
25
- xl: `0 ${themeVars.space[4]}`,
26
- }
27
-
28
- export const vars = {
29
- height: createVar(),
30
- radius: createVar(),
31
- padding: createVar(),
32
- backgroundColor: createVar(),
33
- borderColor: createVar(),
34
- boxShadowColor: createVar(),
35
- color: createVar(),
36
- }
37
-
38
- export const base = style({
39
- vars: {
40
- [vars.borderColor]: "transparent",
41
- },
42
- alignItems: 'center',
43
- boxSizing: 'border-box',
44
- display: 'inline-flex',
45
- fontSize: themeVars.fontSize.base,
46
- fontWeight: "500",
47
- maxWidth: '100%',
48
- width: 'auto',
49
- position: 'relative',
50
- textAlign: 'center',
51
- textDecoration: 'none',
52
- verticalAlign: 'middle',
53
- whiteSpace: 'nowrap',
54
- justifyContent: 'center',
55
- height: vars.height,
56
- lineHeight: vars.height,
57
- borderRadius: vars.radius,
58
- padding: vars.padding,
59
- zIndex: "auto",
60
- backgroundColor: vars.backgroundColor,
61
- border: `1px solid ${vars.borderColor}`,
62
- color: vars.color,
63
- transition: `color .3s ${themeVars.transition.default},
64
- background-color .3s ${themeVars.transition.default},
65
- box-shadow .3s ${themeVars.transition.default},
66
- border-color .3s ${themeVars.transition.default}`,
67
- fontFamily: 'inherit',
68
- ':hover': {
69
- cursor: 'pointer',
70
- },
71
- ':focus': {
72
- outline: 'none',
73
- }
74
- });
75
-
76
- export const variant = styleVariants({
77
- active: {
78
- vars: {
79
- [vars.backgroundColor]: "white",
80
- [vars.color]: themeVars.color.blue[500],
81
- [vars.boxShadowColor]: themeVars.color.gray[900],
82
- [vars.borderColor]: themeVars.color.gray[200],
83
- },
84
- boxShadow: `0 .5px 0px 4px rgba(0, 0, 0, 0.01)`,
85
- ':hover': {
86
- vars: {
87
- [vars.color]: themeVars.color.blue[600],
88
- },
89
- },
90
- ':focus': {
91
- vars: {
92
- [vars.color]: themeVars.color.blue[500],
93
- }
94
- }
95
- },
96
- default: {
97
- vars: {
98
- [vars.color]: themeVars.color.gray[400],
99
- [vars.backgroundColor]: 'transparent',
100
- [vars.boxShadowColor]: themeVars.color.blue[500],
101
- [vars.borderColor]: "transparent",
102
- },
103
- ':hover': {
104
- vars: {
105
- [vars.color]: themeVars.color.blue[400],
106
- },
107
- },
108
- ':focus': {
109
- vars: {
110
- [vars.color]: themeVars.color.blue[400],
111
- }
112
- }
113
- }
114
- });
115
-
116
- export const size = styleVariants({
117
- xs: {
118
- vars: {
119
- [vars.height]: sizes.xs,
120
- [vars.radius]: borderRadiuses.xs,
121
- [vars.padding]: padding.xs,
122
- },
123
- fontSize: themeVars.fontSize.small,
124
- },
125
- sm: {
126
- vars: {
127
- [vars.height]: sizes.sm,
128
- [vars.radius]: borderRadiuses.sm,
129
- [vars.padding]: padding.sm,
130
- },
131
- fontSize: themeVars.fontSize.small,
132
- },
133
- md: {
134
- vars: {
135
- [vars.height]: sizes.md,
136
- [vars.radius]: borderRadiuses.md,
137
- [vars.padding]: padding.md,
138
- },
139
- },
140
- lg: {
141
- vars: {
142
- [vars.height]: sizes.lg,
143
- [vars.radius]: borderRadiuses.lg,
144
- [vars.padding]: padding.lg,
145
- },
146
- fontSize: themeVars.fontSize.large,
147
- },
148
- xl: {
149
- vars: {
150
- [vars.height]: sizes.xl,
151
- [vars.radius]: borderRadiuses.xl,
152
- [vars.padding]: padding.xl,
153
- },
154
- fontSize: themeVars.fontSize.large,
155
- },
156
- });
157
-
158
- export const icon = style({
159
- display: 'flex',
160
- flexGrow: 0,
161
- flexShrink: 0,
162
- fontSize: 0,
163
- lineHeight: 0,
164
- userSelect: 'none'
165
- });
166
-
167
- globalStyle(`${icon} > svg`, {
168
- overflow: 'hidden',
169
- pointerEvents: 'none',
170
- maxWidth: '100%',
171
- maxHeight: '100%',
172
- verticalAlign: 'middle'
173
- });
174
-
175
- export const radio = style({
176
- pointerEvents: "none",
177
- position: "absolute",
178
- border: 0,
179
- left: 0,
180
- right: 0,
181
- top: 0,
182
- bottom: 0,
183
- opacity: 0
1
+ import {createVar, globalStyle, style, styleVariants} from "@vanilla-extract/css";
2
+ import {themeVars} from "../../../styles/theme.css";
3
+
4
+ const sizes = {
5
+ xs: '22px',
6
+ sm: '28px',
7
+ md: '36px',
8
+ lg: '40px',
9
+ xl: '45px',
10
+ };
11
+
12
+ const borderRadiuses = {
13
+ xs: '2px',
14
+ sm: '3px',
15
+ md: '4px',
16
+ lg: '6px',
17
+ xl: '8px',
18
+ };
19
+
20
+ const padding = {
21
+ xs: `0 ${themeVars.space[1]}`,
22
+ sm: `0 ${themeVars.space[2]}`,
23
+ md: `0 ${themeVars.space[3]}`,
24
+ lg: `0 ${themeVars.space[3]}`,
25
+ xl: `0 ${themeVars.space[4]}`,
26
+ }
27
+
28
+ export const vars = {
29
+ height: createVar(),
30
+ radius: createVar(),
31
+ padding: createVar(),
32
+ backgroundColor: createVar(),
33
+ borderColor: createVar(),
34
+ boxShadowColor: createVar(),
35
+ color: createVar(),
36
+ }
37
+
38
+ export const base = style({
39
+ vars: {
40
+ [vars.borderColor]: "transparent",
41
+ },
42
+ alignItems: 'center',
43
+ boxSizing: 'border-box',
44
+ display: 'inline-flex',
45
+ fontSize: themeVars.fontSize.base,
46
+ fontWeight: "500",
47
+ maxWidth: '100%',
48
+ width: 'auto',
49
+ position: 'relative',
50
+ textAlign: 'center',
51
+ textDecoration: 'none',
52
+ verticalAlign: 'middle',
53
+ whiteSpace: 'nowrap',
54
+ justifyContent: 'center',
55
+ height: vars.height,
56
+ lineHeight: vars.height,
57
+ borderRadius: vars.radius,
58
+ padding: vars.padding,
59
+ zIndex: "auto",
60
+ backgroundColor: vars.backgroundColor,
61
+ border: `1px solid ${vars.borderColor}`,
62
+ color: vars.color,
63
+ transition: `color .3s ${themeVars.transition.default},
64
+ background-color .3s ${themeVars.transition.default},
65
+ box-shadow .3s ${themeVars.transition.default},
66
+ border-color .3s ${themeVars.transition.default}`,
67
+ fontFamily: 'inherit',
68
+ ':hover': {
69
+ cursor: 'pointer',
70
+ },
71
+ ':focus': {
72
+ outline: 'none',
73
+ }
74
+ });
75
+
76
+ export const variant = styleVariants({
77
+ active: {
78
+ vars: {
79
+ [vars.backgroundColor]: "white",
80
+ [vars.color]: themeVars.color.blue[500],
81
+ [vars.boxShadowColor]: themeVars.color.gray[900],
82
+ [vars.borderColor]: themeVars.color.gray[200],
83
+ },
84
+ boxShadow: `0 .5px 0px 4px rgba(0, 0, 0, 0.01)`,
85
+ ':hover': {
86
+ vars: {
87
+ [vars.color]: themeVars.color.blue[600],
88
+ },
89
+ },
90
+ ':focus': {
91
+ vars: {
92
+ [vars.color]: themeVars.color.blue[500],
93
+ }
94
+ }
95
+ },
96
+ default: {
97
+ vars: {
98
+ [vars.color]: themeVars.color.gray[400],
99
+ [vars.backgroundColor]: 'transparent',
100
+ [vars.boxShadowColor]: themeVars.color.blue[500],
101
+ [vars.borderColor]: "transparent",
102
+ },
103
+ ':hover': {
104
+ vars: {
105
+ [vars.color]: themeVars.color.blue[400],
106
+ },
107
+ },
108
+ ':focus': {
109
+ vars: {
110
+ [vars.color]: themeVars.color.blue[400],
111
+ }
112
+ }
113
+ }
114
+ });
115
+
116
+ export const size = styleVariants({
117
+ xs: {
118
+ vars: {
119
+ [vars.height]: sizes.xs,
120
+ [vars.radius]: borderRadiuses.xs,
121
+ [vars.padding]: padding.xs,
122
+ },
123
+ fontSize: themeVars.fontSize.small,
124
+ },
125
+ sm: {
126
+ vars: {
127
+ [vars.height]: sizes.sm,
128
+ [vars.radius]: borderRadiuses.sm,
129
+ [vars.padding]: padding.sm,
130
+ },
131
+ fontSize: themeVars.fontSize.small,
132
+ },
133
+ md: {
134
+ vars: {
135
+ [vars.height]: sizes.md,
136
+ [vars.radius]: borderRadiuses.md,
137
+ [vars.padding]: padding.md,
138
+ },
139
+ },
140
+ lg: {
141
+ vars: {
142
+ [vars.height]: sizes.lg,
143
+ [vars.radius]: borderRadiuses.lg,
144
+ [vars.padding]: padding.lg,
145
+ },
146
+ fontSize: themeVars.fontSize.large,
147
+ },
148
+ xl: {
149
+ vars: {
150
+ [vars.height]: sizes.xl,
151
+ [vars.radius]: borderRadiuses.xl,
152
+ [vars.padding]: padding.xl,
153
+ },
154
+ fontSize: themeVars.fontSize.large,
155
+ },
156
+ });
157
+
158
+ export const icon = style({
159
+ display: 'flex',
160
+ flexGrow: 0,
161
+ flexShrink: 0,
162
+ fontSize: 0,
163
+ lineHeight: 0,
164
+ userSelect: 'none'
165
+ });
166
+
167
+ globalStyle(`${icon} > svg`, {
168
+ overflow: 'hidden',
169
+ pointerEvents: 'none',
170
+ maxWidth: '100%',
171
+ maxHeight: '100%',
172
+ verticalAlign: 'middle'
173
+ });
174
+
175
+ export const radio = style({
176
+ pointerEvents: "none",
177
+ position: "absolute",
178
+ border: 0,
179
+ left: 0,
180
+ right: 0,
181
+ top: 0,
182
+ bottom: 0,
183
+ opacity: 0
184
184
  })
@@ -1 +1 @@
1
- export * from './RadioButton.css';
1
+ export * from './RadioButton.css';
@@ -1,75 +1,75 @@
1
- <template>
2
- <div
3
- :class="computedClasses"
4
- >
5
- <slot/>
6
- </div>
7
- </template>
8
-
9
- <script lang="ts">
10
- import {computed, defineComponent, type PropType, provide, reactive, toRef} from "vue";
11
- import type {Size} from '../../types/props';
12
- import * as style from "./style";
13
- import type {RadioButtonGroupState} from "./symbol";
14
- import {RADIO_BUTTON_GROUP_STATE} from "./symbol";
15
-
16
- export default defineComponent({
17
- name: "MRadioButtonGroup",
18
- props: {
19
- modelValue: {
20
- type: [String, Number],
21
- default: ""
22
- },
23
- size: {
24
- type: String as PropType<Size>,
25
- default: 'md'
26
- },
27
- name: {
28
- type: String,
29
- required: true
30
- },
31
- block: {
32
- type: Boolean,
33
- default: false
34
- }
35
- },
36
- emits: ['update:modelValue'],
37
- setup(props, {emit}) {
38
-
39
- function doUpdateValue (value: string | number) {
40
- emit('update:modelValue', value)
41
- }
42
-
43
- const selectedValue = computed({
44
- get() {
45
- return props.modelValue;
46
- },
47
- set(value) {
48
- doUpdateValue(value);
49
- }
50
- });
51
-
52
- const state: RadioButtonGroupState = reactive({
53
- size: toRef(props, 'size'),
54
- name: toRef(props, 'name'),
55
- modelValue: selectedValue,
56
- doUpdateValue
57
- });
58
-
59
- provide(RADIO_BUTTON_GROUP_STATE, state);
60
-
61
- const computedClasses = computed(() => {
62
- return [
63
- style.base,
64
- {
65
- [style.block]: props.block
66
- }
67
- ]
68
- })
69
-
70
- return {
71
- computedClasses
72
- }
73
- }
74
- });
1
+ <template>
2
+ <div
3
+ :class="computedClasses"
4
+ >
5
+ <slot/>
6
+ </div>
7
+ </template>
8
+
9
+ <script lang="ts">
10
+ import {computed, defineComponent, type PropType, provide, reactive, toRef} from "vue";
11
+ import type {Size} from '../../types/props';
12
+ import * as style from "./style";
13
+ import type {RadioButtonGroupState} from "./symbol";
14
+ import {RADIO_BUTTON_GROUP_STATE} from "./symbol";
15
+
16
+ export default defineComponent({
17
+ name: "MRadioButtonGroup",
18
+ props: {
19
+ modelValue: {
20
+ type: [String, Number],
21
+ default: ""
22
+ },
23
+ size: {
24
+ type: String as PropType<Size>,
25
+ default: 'md'
26
+ },
27
+ name: {
28
+ type: String,
29
+ required: true
30
+ },
31
+ block: {
32
+ type: Boolean,
33
+ default: false
34
+ }
35
+ },
36
+ emits: ['update:modelValue'],
37
+ setup(props, {emit}) {
38
+
39
+ function doUpdateValue (value: string | number) {
40
+ emit('update:modelValue', value)
41
+ }
42
+
43
+ const selectedValue = computed({
44
+ get() {
45
+ return props.modelValue;
46
+ },
47
+ set(value) {
48
+ doUpdateValue(value);
49
+ }
50
+ });
51
+
52
+ const state: RadioButtonGroupState = reactive({
53
+ size: toRef(props, 'size'),
54
+ name: toRef(props, 'name'),
55
+ modelValue: selectedValue,
56
+ doUpdateValue
57
+ });
58
+
59
+ provide(RADIO_BUTTON_GROUP_STATE, state);
60
+
61
+ const computedClasses = computed(() => {
62
+ return [
63
+ style.base,
64
+ {
65
+ [style.block]: props.block
66
+ }
67
+ ]
68
+ })
69
+
70
+ return {
71
+ computedClasses
72
+ }
73
+ }
74
+ });
75
75
  </script>
@@ -1,37 +1,37 @@
1
- import {createVar, globalStyle, style} from "@vanilla-extract/css";
2
- import {base as button} from "../../radiobutton/style/RadioButton.css";
3
- import {themeVars} from "../../../styles/theme.css";
4
-
5
- const vars = {
6
- padding: createVar(),
7
- borderRadius: createVar(),
8
- gap: createVar()
9
- }
10
-
11
- export const base = style({
12
- vars: {
13
- [vars.padding]: themeVars.space[1],
14
- [vars.borderRadius]: themeVars.rounded.default,
15
- [vars.gap]: themeVars.space[1],
16
- },
17
- display: "inline-flex",
18
- position: "relative",
19
- flexWrap: "nowrap",
20
- backgroundColor: themeVars.color.gray[100],
21
- padding: vars.padding,
22
- borderRadius: vars.borderRadius,
23
- gap: vars.gap,
24
- });
25
-
26
- export const vertical = style({
27
- flexDirection: "column",
28
- });
29
-
30
- export const block = style({
31
- display: "flex",
32
- alignItems: "stretch",
33
- });
34
-
35
- globalStyle(`${base}${block} > ${button}`, {
36
- flex: 1,
1
+ import {createVar, globalStyle, style} from "@vanilla-extract/css";
2
+ import {base as button} from "../../radiobutton/style/RadioButton.css";
3
+ import {themeVars} from "../../../styles/theme.css";
4
+
5
+ const vars = {
6
+ padding: createVar(),
7
+ borderRadius: createVar(),
8
+ gap: createVar()
9
+ }
10
+
11
+ export const base = style({
12
+ vars: {
13
+ [vars.padding]: themeVars.space[1],
14
+ [vars.borderRadius]: themeVars.rounded.default,
15
+ [vars.gap]: themeVars.space[1],
16
+ },
17
+ display: "inline-flex",
18
+ position: "relative",
19
+ flexWrap: "nowrap",
20
+ backgroundColor: themeVars.color.gray[100],
21
+ padding: vars.padding,
22
+ borderRadius: vars.borderRadius,
23
+ gap: vars.gap,
24
+ });
25
+
26
+ export const vertical = style({
27
+ flexDirection: "column",
28
+ });
29
+
30
+ export const block = style({
31
+ display: "flex",
32
+ alignItems: "stretch",
33
+ });
34
+
35
+ globalStyle(`${base}${block} > ${button}`, {
36
+ flex: 1,
37
37
  });
@@ -1,11 +1,11 @@
1
- import type {InjectionKey} from "vue";
2
- import type {Size} from "../../types/props";
3
-
4
- export interface RadioButtonGroupState {
5
- size: Size,
6
- name: string,
7
- modelValue: string | number,
8
- doUpdateValue: (value: string | number) => void
9
- }
10
-
1
+ import type {InjectionKey} from "vue";
2
+ import type {Size} from "../../types/props";
3
+
4
+ export interface RadioButtonGroupState {
5
+ size: Size,
6
+ name: string,
7
+ modelValue: string | number,
8
+ doUpdateValue: (value: string | number) => void
9
+ }
10
+
11
11
  export const RADIO_BUTTON_GROUP_STATE: InjectionKey<RadioButtonGroupState> = Symbol('RADIO_BUTTON_GROUP_STATE');