@teammodlr/ui-kit 2.0.25 → 2.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/env.d.ts +1 -1
- package/lib/__storybook__/argTypes.d.ts +40 -40
- package/lib/__storybook__/createStory.d.ts +8 -8
- package/lib/__storybook__/index.d.ts +2 -2
- package/lib/components/avatar/Avatar.vue.d.ts +56 -56
- package/lib/components/avatar/style/Avatar.css.d.ts +9 -9
- package/lib/components/avatar/style/index.d.ts +1 -1
- package/lib/components/avatargroup/AvatarGroup.vue.d.ts +49 -49
- package/lib/components/avatargroup/style/AvatarGroup.css.d.ts +2 -2
- package/lib/components/avatargroup/style/index.d.ts +1 -1
- package/lib/components/avatargroup/symbol.d.ts +13 -13
- package/lib/components/badge/Badge.vue.d.ts +30 -30
- package/lib/components/badge/style/Badge.css.d.ts +4 -4
- package/lib/components/badge/style/index.d.ts +1 -1
- package/lib/components/breadcrumb/Breadcrumb.vue.d.ts +34 -34
- package/lib/components/breadcrumb/BreadcrumbItem.vue.d.ts +29 -29
- package/lib/components/breadcrumb/style/Breadcrumb.css.d.ts +4 -4
- package/lib/components/breadcrumb/style/index.d.ts +1 -1
- package/lib/components/breadcrumb/symbol.d.ts +13 -13
- package/lib/components/button/Button.vue.d.ts +141 -141
- package/lib/components/button/style/Button.css.d.ts +25 -25
- package/lib/components/button/style/index.d.ts +1 -1
- package/lib/components/buttongroup/ButtonGroup.vue.d.ts +18 -18
- package/lib/components/buttongroup/style/ButtonGroup.css.d.ts +2 -2
- package/lib/components/buttongroup/style/index.d.ts +1 -1
- package/lib/components/buttongroup/symbol.d.ts +6 -6
- package/lib/components/checkbox/Checkbox.vue.d.ts +94 -94
- package/lib/components/checkbox/style/Checkbox.css.d.ts +16 -16
- package/lib/components/checkbox/style/index.d.ts +1 -1
- package/lib/components/colorpicker/ColorPicker.vue.d.ts +77 -77
- package/lib/components/colorpicker/style/ColorPicker.css.d.ts +10 -10
- package/lib/components/colorpicker/style/index.d.ts +1 -1
- package/lib/components/colorpicker/utils.d.ts +16 -16
- package/lib/components/dropdown/Dropdown.vue.d.ts +122 -122
- package/lib/components/dropdown/DropdownItem.vue.d.ts +78 -78
- package/lib/components/dropdown/DropdownList.vue.d.ts +5 -5
- package/lib/components/dropdown/DropdownSeperator.vue.d.ts +4 -4
- package/lib/components/dropdown/DropdownWrapper.vue.d.ts +2 -2
- package/lib/components/dropdown/hooks.d.ts +2 -2
- package/lib/components/dropdown/style/Dropdown.css.d.ts +6 -6
- package/lib/components/dropdown/style/index.d.ts +1 -1
- package/lib/components/dropdown/symbol.d.ts +6 -6
- package/lib/components/form/Form.vue.d.ts +75 -75
- package/lib/components/form/style/Form.css.d.ts +4 -4
- package/lib/components/form/style/index.d.ts +2 -2
- package/lib/components/form/symbol.d.ts +9 -9
- package/lib/components/image/Image.vue.d.ts +50 -50
- package/lib/components/index.d.ts +41 -40
- package/lib/components/input/Input.vue.d.ts +142 -142
- package/lib/components/input/style/Input.css.d.ts +23 -23
- package/lib/components/input/style/index.d.ts +1 -1
- package/lib/components/link/Link.vue.d.ts +51 -51
- package/lib/components/messageprovider/Message.vue.d.ts +73 -73
- package/lib/components/messageprovider/MessageProvider.vue.d.ts +52 -52
- package/lib/components/messageprovider/style/Message.css.d.ts +12 -12
- package/lib/components/messageprovider/style/index.d.ts +1 -1
- package/lib/components/messageprovider/types.d.ts +29 -29
- package/lib/components/messageprovider/useMessage.d.ts +2 -2
- package/lib/components/modal/Modal.vue.d.ts +52 -52
- package/lib/components/modal/style/Modal.css.d.ts +21 -21
- package/lib/components/modal/style/index.d.ts +1 -1
- package/lib/components/pagination/Pagination.vue.d.ts +84 -84
- package/lib/components/pagination/style/Pagination.css.d.ts +10 -10
- package/lib/components/pagination/style/index.d.ts +1 -1
- package/lib/components/radio/Radio.vue.d.ts +85 -85
- package/lib/components/radio/style/Checkbox.css.d.ts +16 -16
- package/lib/components/radio/style/index.d.ts +1 -1
- package/lib/components/radiobutton/RadioButton.vue.d.ts +98 -98
- package/lib/components/radiobutton/style/RadioButton.css.d.ts +14 -14
- package/lib/components/radiobutton/style/index.d.ts +1 -1
- package/lib/components/radiobuttongroup/RadioButtonGroup.vue.d.ts +48 -48
- package/lib/components/radiobuttongroup/style/RadioButtonGroup.css.d.ts +3 -3
- package/lib/components/radiobuttongroup/style/index.d.ts +1 -1
- package/lib/components/radiobuttongroup/symbol.d.ts +9 -9
- package/lib/components/select/Select.vue.d.ts +194 -194
- package/lib/components/select/style/Select.css.d.ts +31 -31
- package/lib/components/select/style/index.d.ts +1 -1
- package/lib/components/skeleton/Skeleton.vue.d.ts +33 -33
- package/lib/components/skeleton/style/Skeleton.css.d.ts +8 -8
- package/lib/components/skeleton/style/index.d.ts +2 -2
- package/lib/components/slider/Slider.vue.d.ts +32 -32
- package/lib/components/slider/style/Slider.css.d.ts +4 -4
- package/lib/components/slider/style/index.d.ts +1 -1
- package/lib/components/tab/Tab.vue.d.ts +41 -41
- package/lib/components/tab/TabGroup.vue.d.ts +43 -43
- package/lib/components/table/Table.vue.d.ts +62 -62
- package/lib/components/table/TableBody.vue.d.ts +2 -2
- package/lib/components/table/TableCell.vue.d.ts +2 -2
- package/lib/components/table/TableHead.vue.d.ts +30 -30
- package/lib/components/table/TableHeadRow.vue.d.ts +2 -2
- package/lib/components/table/TableRow.vue.d.ts +2 -2
- package/lib/components/table/style/Table.css.d.ts +4 -4
- package/lib/components/table/style/index.d.ts +1 -1
- package/lib/components/table/types/index.d.ts +6 -6
- package/lib/components/tag/Tag.vue.d.ts +44 -44
- package/lib/components/tag/style/Tag.css.d.ts +11 -11
- package/lib/components/tag/style/index.d.ts +1 -1
- package/lib/components/textarea/TextArea.vue.d.ts +137 -137
- package/lib/components/textarea/style/TextArea.css.d.ts +19 -19
- package/lib/components/textarea/style/index.d.ts +1 -1
- package/lib/components/toggle/Toggle.vue.d.ts +85 -0
- package/lib/components/toggle/style/Toggle.css.d.ts +7 -0
- package/lib/components/toggle/style/index.d.ts +1 -0
- package/lib/components/tooltip/Tooltip.vue.d.ts +71 -71
- package/lib/components/tooltip/style/Tooltip.css.d.ts +10 -10
- package/lib/components/tooltip/style/index.d.ts +1 -1
- package/lib/components/transfer/Transfer.vue.d.ts +67 -67
- package/lib/components/transfer/style/Transfer.css.d.ts +7 -7
- package/lib/components/transfer/style/index.d.ts +1 -1
- package/lib/components/virtualscroll/VirtualScroll.vue.d.ts +73 -73
- package/lib/components/virtualscroll/style/VirtualScroll.css.d.ts +1 -1
- package/lib/components/virtualscroll/style/index.d.ts +1 -1
- package/lib/composables/element.d.ts +2 -2
- package/lib/composables/index.d.ts +3 -3
- package/lib/composables/useCachedUid.d.ts +13 -13
- package/lib/composables/useEventListener.d.ts +1 -1
- package/lib/composables/useInput.d.ts +36 -36
- package/lib/composables/useInteractive.d.ts +15 -15
- package/lib/composables/useIsServer.d.ts +1 -1
- package/lib/composables/useMount.d.ts +13 -13
- package/lib/composables/usePopper.d.ts +31 -31
- package/lib/composables/useZIndex.d.ts +8 -8
- package/lib/create.d.ts +9 -9
- package/lib/index.cjs.js +4 -4
- package/lib/index.d.ts +5 -5
- package/lib/index.es.js +1896 -1778
- package/lib/install.d.ts +4 -4
- package/lib/nuxt.js +33 -33
- package/lib/nuxt.plugin.js +8 -8
- package/lib/style.css +1 -1
- package/lib/styles/theme.css.d.ts +167 -167
- package/lib/styles/typography.css.d.ts +22 -22
- package/lib/types/props.d.ts +3 -3
- package/package.json +1 -1
- package/src/__storybook__/argTypes.ts +61 -61
- package/src/__storybook__/createStory.ts +15 -15
- package/src/__storybook__/index.ts +2 -2
- package/src/components/avatar/Avatar.vue +109 -109
- package/src/components/avatar/examples/basic.vue +6 -6
- package/src/components/avatar/examples/custom-size.vue +7 -7
- package/src/components/avatar/examples/index.stories.ts +28 -28
- package/src/components/avatar/examples/index.ts +5 -5
- package/src/components/avatar/examples/sizes.vue +33 -33
- package/src/components/avatar/examples/slots.vue +7 -7
- package/src/components/avatar/examples/variants.vue +18 -18
- package/src/components/avatar/style/Avatar.css.ts +92 -92
- package/src/components/avatar/style/index.ts +1 -1
- package/src/components/avatargroup/AvatarGroup.css +8 -8
- package/src/components/avatargroup/AvatarGroup.vue +71 -71
- package/src/components/avatargroup/examples/basic.vue +37 -37
- package/src/components/avatargroup/examples/index.stories.ts +24 -24
- package/src/components/avatargroup/examples/index.ts +1 -1
- package/src/components/avatargroup/style/AvatarGroup.css.ts +21 -21
- package/src/components/avatargroup/style/index.ts +1 -1
- package/src/components/avatargroup/symbol.ts +16 -16
- package/src/components/badge/Badge.css +128 -128
- package/src/components/badge/Badge.vue +43 -43
- package/src/components/badge/examples/basic.vue +10 -10
- package/src/components/badge/examples/index.stories.ts +21 -21
- package/src/components/badge/examples/index.ts +1 -1
- package/src/components/badge/style/Badge.css.ts +135 -135
- package/src/components/badge/style/index.ts +1 -1
- package/src/components/breadcrumb/Breadcrumb.css +46 -46
- package/src/components/breadcrumb/Breadcrumb.vue +58 -58
- package/src/components/breadcrumb/BreadcrumbItem.vue +72 -72
- package/src/components/breadcrumb/examples/basic.vue +7 -7
- package/src/components/breadcrumb/examples/index.stories.ts +20 -20
- package/src/components/breadcrumb/examples/index.ts +1 -1
- package/src/components/breadcrumb/style/Breadcrumb.css.ts +39 -39
- package/src/components/breadcrumb/symbol.ts +16 -16
- package/src/components/button/Button-old.css +378 -378
- package/src/components/button/Button.vue +203 -203
- package/src/components/button/examples/basic.vue +3 -3
- package/src/components/button/examples/disabled.vue +3 -3
- package/src/components/button/examples/icon-left.vue +12 -12
- package/src/components/button/examples/icon.vue +9 -9
- package/src/components/button/examples/index.stories.ts +35 -35
- package/src/components/button/examples/index.ts +8 -8
- package/src/components/button/examples/rounded.vue +7 -7
- package/src/components/button/examples/size.vue +7 -7
- package/src/components/button/examples/variants-secondary.vue +10 -10
- package/src/components/button/examples/variants.vue +10 -10
- package/src/components/button/style/Button.css.ts +677 -677
- package/src/components/button/style/index.ts +1 -1
- package/src/components/buttongroup/ButtonGroup.vue +36 -36
- package/src/components/buttongroup/examples/basic.vue +9 -9
- package/src/components/buttongroup/examples/icon-group.vue +21 -21
- package/src/components/buttongroup/examples/index.stories.ts +22 -22
- package/src/components/buttongroup/examples/index.ts +2 -2
- package/src/components/buttongroup/style/ButtonGroup.css.ts +39 -39
- package/src/components/buttongroup/style/index.ts +1 -1
- package/src/components/buttongroup/symbol.ts +7 -7
- package/src/components/checkbox/Checkbox.css +185 -185
- package/src/components/checkbox/Checkbox.vue +156 -156
- package/src/components/checkbox/examples/basic.vue +9 -9
- package/src/components/checkbox/examples/index.stories.ts +21 -21
- package/src/components/checkbox/examples/index.ts +3 -3
- package/src/components/checkbox/examples/slot.vue +11 -11
- package/src/components/checkbox/style/Checkbox.css.ts +140 -140
- package/src/components/checkbox/style/index.ts +1 -1
- package/src/components/colorpicker/ColorPicker.vue +324 -324
- package/src/components/colorpicker/examples/basic.vue +2 -2
- package/src/components/colorpicker/examples/index.stories.ts +17 -17
- package/src/components/colorpicker/style/ColorPicker.css.ts +116 -116
- package/src/components/colorpicker/style/index.ts +1 -1
- package/src/components/colorpicker/utils.ts +187 -187
- package/src/components/dropdown/Dropdown.vue +263 -263
- package/src/components/dropdown/DropdownItem.vue +134 -134
- package/src/components/dropdown/DropdownList.vue +20 -20
- package/src/components/dropdown/DropdownSeperator.vue +22 -22
- package/src/components/dropdown/DropdownWrapper.vue +18 -18
- package/src/components/dropdown/examples/basic.vue +73 -73
- package/src/components/dropdown/examples/context.vue +71 -71
- package/src/components/dropdown/examples/index.stories.ts +28 -28
- package/src/components/dropdown/examples/index.ts +3 -3
- package/src/components/dropdown/hooks.ts +30 -30
- package/src/components/dropdown/style/Dropdown.css.ts +54 -54
- package/src/components/dropdown/style/index.ts +1 -1
- package/src/components/dropdown/symbol.ts +7 -7
- package/src/components/form/Form.vue +153 -153
- package/src/components/form/examples/basic.vue +75 -75
- package/src/components/form/examples/index.stories.ts +25 -25
- package/src/components/form/examples/index.ts +1 -1
- package/src/components/form/style/Form.css.ts +22 -22
- package/src/components/form/style/index.ts +1 -1
- package/src/components/form/symbol.ts +10 -10
- package/src/components/image/Image.vue +71 -71
- package/src/components/image/examples/basic.vue +5 -5
- package/src/components/image/examples/index.stories.ts +12 -12
- package/src/components/image/examples/index.ts +1 -1
- package/src/components/index.ts +40 -39
- package/src/components/input/Input.css +173 -173
- package/src/components/input/Input.vue +218 -218
- package/src/components/input/examples/basic.vue +8 -8
- package/src/components/input/examples/index.stories.ts +24 -24
- package/src/components/input/examples/index.ts +4 -4
- package/src/components/input/examples/prefix.vue +9 -9
- package/src/components/input/examples/sizes.vue +9 -9
- package/src/components/input/examples/suffix.vue +9 -9
- package/src/components/input/style/Input.css.ts +221 -221
- package/src/components/input/style/index.ts +1 -1
- package/src/components/link/Link.css +147 -147
- package/src/components/link/Link.vue +53 -53
- package/src/components/link/examples/basic.vue +3 -3
- package/src/components/link/examples/index.stories.ts +20 -20
- package/src/components/link/examples/index.ts +1 -1
- package/src/components/messageprovider/Message.vue +123 -123
- package/src/components/messageprovider/MessageProvider.css +23 -23
- package/src/components/messageprovider/MessageProvider.vue +144 -144
- package/src/components/messageprovider/examples/basic.vue +70 -70
- package/src/components/messageprovider/examples/index.stories.ts +29 -29
- package/src/components/messageprovider/examples/index.ts +2 -2
- package/src/components/messageprovider/examples/update.vue +34 -34
- package/src/components/messageprovider/examples/wrapper.vue +9 -9
- package/src/components/messageprovider/style/Message.css.ts +109 -109
- package/src/components/messageprovider/style/index.ts +1 -1
- package/src/components/messageprovider/types.ts +47 -47
- package/src/components/messageprovider/useMessage.ts +12 -12
- package/src/components/modal/Modal.vue +125 -125
- package/src/components/modal/examples/basic.vue +40 -40
- package/src/components/modal/examples/index.stories.ts +20 -20
- package/src/components/modal/examples/index.ts +2 -2
- package/src/components/modal/examples/modal-form.vue +99 -99
- package/src/components/modal/style/Modal.css.ts +257 -257
- package/src/components/modal/style/index.ts +1 -1
- package/src/components/pagination/Pagination.vue +237 -237
- package/src/components/pagination/examples/basic.vue +17 -17
- package/src/components/pagination/examples/index.stories.ts +14 -14
- package/src/components/pagination/style/Pagination.css.ts +87 -87
- package/src/components/pagination/style/index.ts +1 -1
- package/src/components/radio/Checkbox.css +185 -185
- package/src/components/radio/Radio.vue +137 -137
- package/src/components/radio/examples/basic.vue +9 -9
- package/src/components/radio/examples/index.stories.ts +19 -19
- package/src/components/radio/examples/index.ts +2 -2
- package/src/components/radio/style/Checkbox.css.ts +131 -131
- package/src/components/radio/style/index.ts +1 -1
- package/src/components/radiobutton/RadioButton.vue +131 -131
- package/src/components/radiobutton/style/RadioButton.css.ts +183 -183
- package/src/components/radiobutton/style/index.ts +1 -1
- package/src/components/radiobuttongroup/RadioButtonGroup.vue +74 -74
- package/src/components/radiobuttongroup/examples/basic.vue +16 -16
- package/src/components/radiobuttongroup/examples/index.stories.ts +22 -22
- package/src/components/radiobuttongroup/examples/index.ts +2 -2
- package/src/components/radiobuttongroup/style/RadioButtonGroup.css.ts +36 -36
- package/src/components/radiobuttongroup/symbol.ts +10 -10
- package/src/components/select/Select.vue +569 -569
- package/src/components/select/examples/basic.vue +20 -20
- package/src/components/select/examples/index.stories.ts +22 -22
- package/src/components/select/examples/index.ts +3 -3
- package/src/components/select/examples/multiple.vue +21 -21
- package/src/components/select/examples/searchable.vue +20 -20
- package/src/components/select/style/Select.css.ts +261 -261
- package/src/components/select/style/index.ts +1 -1
- package/src/components/skeleton/Skeleton.css +73 -73
- package/src/components/skeleton/Skeleton.vue +55 -55
- package/src/components/skeleton/examples/basic.vue +3 -3
- package/src/components/skeleton/examples/index.stories.ts +17 -17
- package/src/components/skeleton/examples/index.ts +2 -2
- package/src/components/skeleton/examples/post.vue +8 -8
- package/src/components/skeleton/style/Skeleton.css.ts +56 -56
- package/src/components/skeleton/style/index.ts +1 -1
- package/src/components/slider/Slider.vue +76 -76
- package/src/components/slider/style/Slider.css.ts +42 -42
- package/src/components/slider/style/index.ts +1 -1
- package/src/components/tab/Tab.css +113 -113
- package/src/components/tab/Tab.vue +98 -98
- package/src/components/tab/TabGroup.vue +90 -90
- package/src/components/tab/examples/basic.vue +19 -19
- package/src/components/tab/examples/index.stories.ts +25 -25
- package/src/components/tab/examples/index.ts +2 -2
- package/src/components/tab/examples/vertical.vue +19 -19
- package/src/components/table/Table.vue +119 -119
- package/src/components/table/TableBody.vue +13 -13
- package/src/components/table/TableCell.vue +13 -13
- package/src/components/table/TableHead.vue +46 -46
- package/src/components/table/TableHeadRow.vue +15 -15
- package/src/components/table/TableRow.vue +13 -13
- package/src/components/table/examples/basic.vue +55 -55
- package/src/components/table/examples/empty.vue +44 -44
- package/src/components/table/examples/index.stories.ts +20 -20
- package/src/components/table/examples/index.ts +2 -2
- package/src/components/table/style/Table.css.ts +80 -80
- package/src/components/table/types/index.ts +6 -6
- package/src/components/tag/Tag.vue +66 -66
- package/src/components/tag/examples/basic.vue +5 -5
- package/src/components/tag/examples/index.stories.ts +22 -22
- package/src/components/tag/examples/index.ts +1 -1
- package/src/components/tag/style/Tag.css.ts +79 -79
- package/src/components/tag/style/index.ts +1 -1
- package/src/components/textarea/TextArea.css +173 -173
- package/src/components/textarea/TextArea.vue +181 -181
- package/src/components/textarea/examples/basic.vue +8 -8
- package/src/components/textarea/examples/index.stories.ts +18 -18
- package/src/components/textarea/style/TextArea.css.ts +189 -189
- package/src/components/textarea/style/index.ts +1 -1
- package/src/components/toggle/Toggle.vue +132 -0
- package/src/components/toggle/examples/basic.vue +9 -0
- package/src/components/toggle/examples/index.stories.ts +20 -0
- package/src/components/toggle/examples/index.ts +3 -0
- package/src/components/toggle/examples/slot.vue +11 -0
- package/src/components/toggle/style/Toggle.css.ts +136 -0
- package/src/components/toggle/style/index.ts +1 -0
- package/src/components/tooltip/Tooltip.css +43 -43
- package/src/components/tooltip/Tooltip.vue +118 -118
- package/src/components/tooltip/examples/basic.vue +5 -5
- package/src/components/tooltip/examples/index.stories.ts +22 -22
- package/src/components/tooltip/examples/index.ts +2 -2
- package/src/components/tooltip/examples/placement.vue +9 -9
- package/src/components/tooltip/style/Tooltip.css.ts +91 -91
- package/src/components/tooltip/style/index.ts +1 -1
- package/src/components/transfer/Transfer.vue +143 -143
- package/src/components/transfer/examples/basic.vue +20 -20
- package/src/components/transfer/examples/index.stories.ts +15 -15
- package/src/components/transfer/examples/index.ts +1 -1
- package/src/components/transfer/style/Transfer.css.ts +67 -67
- package/src/components/transfer/style/index.ts +1 -1
- package/src/components/virtualscroll/VirtualScroll.css +13 -13
- package/src/components/virtualscroll/VirtualScroll.vue +166 -166
- package/src/components/virtualscroll/examples/basic.vue +31 -31
- package/src/components/virtualscroll/examples/index.stories.ts +15 -15
- package/src/components/virtualscroll/examples/index.ts +1 -1
- package/src/components/virtualscroll/style/VirtualScroll.css.ts +18 -18
- package/src/components/virtualscroll/style/index.ts +1 -1
- package/src/composables/element.ts +13 -13
- package/src/composables/index.ts +2 -2
- package/src/composables/useCachedUid.ts +48 -48
- package/src/composables/useEventListener.ts +14 -14
- package/src/composables/useInput.ts +129 -129
- package/src/composables/useInteractive.ts +19 -19
- package/src/composables/useIsServer.ts +7 -7
- package/src/composables/useMount.ts +43 -43
- package/src/composables/usePopper.ts +194 -194
- package/src/composables/useZIndex.ts +30 -30
- package/src/create.ts +34 -34
- package/src/css/components.css +16 -15
- package/src/css/index.css +4 -4
- package/src/css/transitions.css +40 -40
- package/src/css/variables.css +80 -80
- package/src/examples/cards/cards.stories.ts +9 -9
- package/src/examples/cards/sidebar.vue +262 -262
- package/src/exports/nuxt.js +33 -33
- package/src/exports/nuxt.plugin.js +8 -8
- package/src/index.ts +7 -7
- package/src/install.ts +8 -8
- package/src/shims-vue.d.ts +6 -6
- package/src/styles/theme.css.ts +170 -170
- package/src/styles/typography.css.ts +91 -91
- package/src/types/props.ts +5 -5
- package/volar.d.ts +16 -16
|
@@ -1,109 +1,109 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span
|
|
3
|
-
:class="classes"
|
|
4
|
-
ref="avatar"
|
|
5
|
-
>
|
|
6
|
-
<MImage
|
|
7
|
-
:class="imageClass"
|
|
8
|
-
v-if="(src || srcSet) && imageExists"
|
|
9
|
-
:src="src"
|
|
10
|
-
:alt="src"
|
|
11
|
-
:srcset="srcSet"
|
|
12
|
-
@error="handleImageLoadError"
|
|
13
|
-
/>
|
|
14
|
-
<slot v-else />
|
|
15
|
-
</span>
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<script lang="ts">
|
|
19
|
-
import type {PropType} from 'vue';
|
|
20
|
-
import {computed, defineComponent, inject, onMounted, ref} from 'vue';
|
|
21
|
-
import MImage from '../image/Image.vue';
|
|
22
|
-
import * as style from "./style";
|
|
23
|
-
import type {Size} from "../../types/props";
|
|
24
|
-
import {AVATAR_GROUP_STATE} from "../avatargroup/symbol";
|
|
25
|
-
|
|
26
|
-
export default defineComponent({
|
|
27
|
-
name: "MAvatar",
|
|
28
|
-
components: {
|
|
29
|
-
MImage,
|
|
30
|
-
},
|
|
31
|
-
props: {
|
|
32
|
-
src: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: ""
|
|
35
|
-
},
|
|
36
|
-
srcSet: {
|
|
37
|
-
type: String,
|
|
38
|
-
default: ""
|
|
39
|
-
},
|
|
40
|
-
size: {
|
|
41
|
-
type: String as PropType<Size>,
|
|
42
|
-
default: 'md'
|
|
43
|
-
},
|
|
44
|
-
rounded: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
default: false
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
emits: {
|
|
50
|
-
error: (e: Event) => true
|
|
51
|
-
},
|
|
52
|
-
setup(props, { emit }) {
|
|
53
|
-
const avatarGroup = inject(AVATAR_GROUP_STATE, undefined);
|
|
54
|
-
const avatar = ref<HTMLElement | null>(null);
|
|
55
|
-
const imageExists = ref(true);
|
|
56
|
-
const sizeValue = ref<Size>('md');
|
|
57
|
-
|
|
58
|
-
const groupSize = computed(() => {
|
|
59
|
-
return avatarGroup?.size
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
const groupRounded = computed(() => {
|
|
63
|
-
return avatarGroup?.rounded
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
const inGroup = computed(() => {
|
|
67
|
-
return !!avatarGroup
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
const size = computed<Size>(() => {
|
|
71
|
-
return groupSize.value || props.size
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
const rounded = computed(() => {
|
|
75
|
-
return groupRounded.value || props.rounded
|
|
76
|
-
})
|
|
77
|
-
|
|
78
|
-
const classes = computed(() => {
|
|
79
|
-
return [
|
|
80
|
-
style.base,
|
|
81
|
-
[style.size[size.value]],
|
|
82
|
-
{
|
|
83
|
-
[style.outline]: inGroup.value,
|
|
84
|
-
[style.rounded]: rounded.value,
|
|
85
|
-
}
|
|
86
|
-
]
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
const handleImageLoadError = (e: Event) => {
|
|
90
|
-
imageExists.value = false;
|
|
91
|
-
emit('error', e);
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
onMounted(() => {
|
|
95
|
-
sizeValue.value = groupSize.value || props.size;
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
return {
|
|
99
|
-
avatar,
|
|
100
|
-
avatarGroup,
|
|
101
|
-
classes,
|
|
102
|
-
imageExists,
|
|
103
|
-
imageClass: style.image,
|
|
104
|
-
|
|
105
|
-
handleImageLoadError
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
})
|
|
109
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<span
|
|
3
|
+
:class="classes"
|
|
4
|
+
ref="avatar"
|
|
5
|
+
>
|
|
6
|
+
<MImage
|
|
7
|
+
:class="imageClass"
|
|
8
|
+
v-if="(src || srcSet) && imageExists"
|
|
9
|
+
:src="src"
|
|
10
|
+
:alt="src"
|
|
11
|
+
:srcset="srcSet"
|
|
12
|
+
@error="handleImageLoadError"
|
|
13
|
+
/>
|
|
14
|
+
<slot v-else />
|
|
15
|
+
</span>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script lang="ts">
|
|
19
|
+
import type {PropType} from 'vue';
|
|
20
|
+
import {computed, defineComponent, inject, onMounted, ref} from 'vue';
|
|
21
|
+
import MImage from '../image/Image.vue';
|
|
22
|
+
import * as style from "./style";
|
|
23
|
+
import type {Size} from "../../types/props";
|
|
24
|
+
import {AVATAR_GROUP_STATE} from "../avatargroup/symbol";
|
|
25
|
+
|
|
26
|
+
export default defineComponent({
|
|
27
|
+
name: "MAvatar",
|
|
28
|
+
components: {
|
|
29
|
+
MImage,
|
|
30
|
+
},
|
|
31
|
+
props: {
|
|
32
|
+
src: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: ""
|
|
35
|
+
},
|
|
36
|
+
srcSet: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: ""
|
|
39
|
+
},
|
|
40
|
+
size: {
|
|
41
|
+
type: String as PropType<Size>,
|
|
42
|
+
default: 'md'
|
|
43
|
+
},
|
|
44
|
+
rounded: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
emits: {
|
|
50
|
+
error: (e: Event) => true
|
|
51
|
+
},
|
|
52
|
+
setup(props, { emit }) {
|
|
53
|
+
const avatarGroup = inject(AVATAR_GROUP_STATE, undefined);
|
|
54
|
+
const avatar = ref<HTMLElement | null>(null);
|
|
55
|
+
const imageExists = ref(true);
|
|
56
|
+
const sizeValue = ref<Size>('md');
|
|
57
|
+
|
|
58
|
+
const groupSize = computed(() => {
|
|
59
|
+
return avatarGroup?.size
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
const groupRounded = computed(() => {
|
|
63
|
+
return avatarGroup?.rounded
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const inGroup = computed(() => {
|
|
67
|
+
return !!avatarGroup
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
const size = computed<Size>(() => {
|
|
71
|
+
return groupSize.value || props.size
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const rounded = computed(() => {
|
|
75
|
+
return groupRounded.value || props.rounded
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
const classes = computed(() => {
|
|
79
|
+
return [
|
|
80
|
+
style.base,
|
|
81
|
+
[style.size[size.value]],
|
|
82
|
+
{
|
|
83
|
+
[style.outline]: inGroup.value,
|
|
84
|
+
[style.rounded]: rounded.value,
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
const handleImageLoadError = (e: Event) => {
|
|
90
|
+
imageExists.value = false;
|
|
91
|
+
emit('error', e);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
onMounted(() => {
|
|
95
|
+
sizeValue.value = groupSize.value || props.size;
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
return {
|
|
99
|
+
avatar,
|
|
100
|
+
avatarGroup,
|
|
101
|
+
classes,
|
|
102
|
+
imageExists,
|
|
103
|
+
imageClass: style.image,
|
|
104
|
+
|
|
105
|
+
handleImageLoadError
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
})
|
|
109
|
+
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<MAvatar
|
|
3
|
-
src="https://cdn.discordapp.com/avatars/314170125915783180/9f71af5f78d3188a0c92800c94112496.webp"
|
|
4
|
-
variant="rounded"
|
|
5
|
-
/>
|
|
6
|
-
</template>
|
|
1
|
+
<template>
|
|
2
|
+
<MAvatar
|
|
3
|
+
src="https://cdn.discordapp.com/avatars/314170125915783180/9f71af5f78d3188a0c92800c94112496.webp"
|
|
4
|
+
variant="rounded"
|
|
5
|
+
/>
|
|
6
|
+
</template>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<MAvatar
|
|
3
|
-
src="https://cdn.discordapp.com/avatars/314170125915783180/9f71af5f78d3188a0c92800c94112496.webp"
|
|
4
|
-
variant="rounded"
|
|
5
|
-
size="100px"
|
|
6
|
-
/>
|
|
7
|
-
</template>
|
|
1
|
+
<template>
|
|
2
|
+
<MAvatar
|
|
3
|
+
src="https://cdn.discordapp.com/avatars/314170125915783180/9f71af5f78d3188a0c92800c94112496.webp"
|
|
4
|
+
variant="rounded"
|
|
5
|
+
size="100px"
|
|
6
|
+
/>
|
|
7
|
+
</template>
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import MAvatar from "../Avatar.vue";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
MAvatarBasic,
|
|
5
|
-
MAvatarSize,
|
|
6
|
-
MAvatarCustomSize,
|
|
7
|
-
MAvatarVariant,
|
|
8
|
-
MAvatarSlot
|
|
9
|
-
} from "./index";
|
|
10
|
-
|
|
11
|
-
import {
|
|
12
|
-
colorArgType,
|
|
13
|
-
createStory, sizeArgType
|
|
14
|
-
} from "../../../__storybook__";
|
|
15
|
-
|
|
16
|
-
export default {
|
|
17
|
-
component: MAvatar,
|
|
18
|
-
title: 'Components/Avatar',
|
|
19
|
-
argTypes: {
|
|
20
|
-
...sizeArgType()
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export const Basic = createStory(MAvatarBasic);
|
|
25
|
-
export const Sizes = createStory(MAvatarSize);
|
|
26
|
-
export const CustomSize = createStory(MAvatarCustomSize);
|
|
27
|
-
export const Variants = createStory(MAvatarVariant);
|
|
28
|
-
export const Slots = createStory(MAvatarSlot);
|
|
1
|
+
import MAvatar from "../Avatar.vue";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
MAvatarBasic,
|
|
5
|
+
MAvatarSize,
|
|
6
|
+
MAvatarCustomSize,
|
|
7
|
+
MAvatarVariant,
|
|
8
|
+
MAvatarSlot
|
|
9
|
+
} from "./index";
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
colorArgType,
|
|
13
|
+
createStory, sizeArgType
|
|
14
|
+
} from "../../../__storybook__";
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
component: MAvatar,
|
|
18
|
+
title: 'Components/Avatar',
|
|
19
|
+
argTypes: {
|
|
20
|
+
...sizeArgType()
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const Basic = createStory(MAvatarBasic);
|
|
25
|
+
export const Sizes = createStory(MAvatarSize);
|
|
26
|
+
export const CustomSize = createStory(MAvatarCustomSize);
|
|
27
|
+
export const Variants = createStory(MAvatarVariant);
|
|
28
|
+
export const Slots = createStory(MAvatarSlot);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default as MAvatarBasic } from './basic.vue';
|
|
2
|
-
export { default as MAvatarSize } from './sizes.vue';
|
|
3
|
-
export { default as MAvatarCustomSize } from './custom-size.vue';
|
|
4
|
-
export { default as MAvatarVariant } from './variants.vue';
|
|
5
|
-
export { default as MAvatarSlot } from './slots.vue';
|
|
1
|
+
export { default as MAvatarBasic } from './basic.vue';
|
|
2
|
+
export { default as MAvatarSize } from './sizes.vue';
|
|
3
|
+
export { default as MAvatarCustomSize } from './custom-size.vue';
|
|
4
|
+
export { default as MAvatarVariant } from './variants.vue';
|
|
5
|
+
export { default as MAvatarSlot } from './slots.vue';
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<MAvatar
|
|
4
|
-
src="https://cdn.discordapp.com/avatars/314170125915783180/9f71af5f78d3188a0c92800c94112496.webp"
|
|
5
|
-
variant="rounded"
|
|
6
|
-
size="xs"
|
|
7
|
-
/><br /><br />
|
|
8
|
-
|
|
9
|
-
<MAvatar
|
|
10
|
-
src="https://cdn.discordapp.com/avatars/314170125915783180/9f71af5f78d3188a0c92800c94112496.webp"
|
|
11
|
-
variant="rounded"
|
|
12
|
-
size="sm"
|
|
13
|
-
/><br /><br />
|
|
14
|
-
|
|
15
|
-
<MAvatar
|
|
16
|
-
src="https://cdn.discordapp.com/avatars/314170125915783180/9f71af5f78d3188a0c92800c94112496.webp"
|
|
17
|
-
variant="rounded"
|
|
18
|
-
size="md"
|
|
19
|
-
/><br /><br />
|
|
20
|
-
|
|
21
|
-
<MAvatar
|
|
22
|
-
src="https://cdn.discordapp.com/avatars/314170125915783180/9f71af5f78d3188a0c92800c94112496.webp"
|
|
23
|
-
variant="rounded"
|
|
24
|
-
size="lg"
|
|
25
|
-
/><br /><br />
|
|
26
|
-
|
|
27
|
-
<MAvatar
|
|
28
|
-
src="https://cdn.discordapp.com/avatars/314170125915783180/9f71af5f78d3188a0c92800c94112496.webp"
|
|
29
|
-
variant="rounded"
|
|
30
|
-
size="xl"
|
|
31
|
-
/><br /><br />
|
|
32
|
-
</div>
|
|
33
|
-
</template>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<MAvatar
|
|
4
|
+
src="https://cdn.discordapp.com/avatars/314170125915783180/9f71af5f78d3188a0c92800c94112496.webp"
|
|
5
|
+
variant="rounded"
|
|
6
|
+
size="xs"
|
|
7
|
+
/><br /><br />
|
|
8
|
+
|
|
9
|
+
<MAvatar
|
|
10
|
+
src="https://cdn.discordapp.com/avatars/314170125915783180/9f71af5f78d3188a0c92800c94112496.webp"
|
|
11
|
+
variant="rounded"
|
|
12
|
+
size="sm"
|
|
13
|
+
/><br /><br />
|
|
14
|
+
|
|
15
|
+
<MAvatar
|
|
16
|
+
src="https://cdn.discordapp.com/avatars/314170125915783180/9f71af5f78d3188a0c92800c94112496.webp"
|
|
17
|
+
variant="rounded"
|
|
18
|
+
size="md"
|
|
19
|
+
/><br /><br />
|
|
20
|
+
|
|
21
|
+
<MAvatar
|
|
22
|
+
src="https://cdn.discordapp.com/avatars/314170125915783180/9f71af5f78d3188a0c92800c94112496.webp"
|
|
23
|
+
variant="rounded"
|
|
24
|
+
size="lg"
|
|
25
|
+
/><br /><br />
|
|
26
|
+
|
|
27
|
+
<MAvatar
|
|
28
|
+
src="https://cdn.discordapp.com/avatars/314170125915783180/9f71af5f78d3188a0c92800c94112496.webp"
|
|
29
|
+
variant="rounded"
|
|
30
|
+
size="xl"
|
|
31
|
+
/><br /><br />
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<MAvatar
|
|
3
|
-
variant="rounded"
|
|
4
|
-
>
|
|
5
|
-
BV
|
|
6
|
-
</MAvatar>
|
|
7
|
-
</template>
|
|
1
|
+
<template>
|
|
2
|
+
<MAvatar
|
|
3
|
+
variant="rounded"
|
|
4
|
+
>
|
|
5
|
+
BV
|
|
6
|
+
</MAvatar>
|
|
7
|
+
</template>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<MAvatar
|
|
4
|
-
src="https://cdn.discordapp.com/avatars/314170125915783180/9f71af5f78d3188a0c92800c94112496.webp"
|
|
5
|
-
variant="square"
|
|
6
|
-
/><br /><br />
|
|
7
|
-
|
|
8
|
-
<MAvatar
|
|
9
|
-
src="https://cdn.discordapp.com/avatars/314170125915783180/9f71af5f78d3188a0c92800c94112496.webp"
|
|
10
|
-
variant="rounded"
|
|
11
|
-
/><br /><br />
|
|
12
|
-
|
|
13
|
-
<MAvatar
|
|
14
|
-
src="https://cdn.discordapp.com/avatars/314170125915783180/9f71af5f78d3188a0c92800c94112496.webp"
|
|
15
|
-
variant="circle"
|
|
16
|
-
/><br /><br />
|
|
17
|
-
</div>
|
|
18
|
-
</template>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<MAvatar
|
|
4
|
+
src="https://cdn.discordapp.com/avatars/314170125915783180/9f71af5f78d3188a0c92800c94112496.webp"
|
|
5
|
+
variant="square"
|
|
6
|
+
/><br /><br />
|
|
7
|
+
|
|
8
|
+
<MAvatar
|
|
9
|
+
src="https://cdn.discordapp.com/avatars/314170125915783180/9f71af5f78d3188a0c92800c94112496.webp"
|
|
10
|
+
variant="rounded"
|
|
11
|
+
/><br /><br />
|
|
12
|
+
|
|
13
|
+
<MAvatar
|
|
14
|
+
src="https://cdn.discordapp.com/avatars/314170125915783180/9f71af5f78d3188a0c92800c94112496.webp"
|
|
15
|
+
variant="circle"
|
|
16
|
+
/><br /><br />
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
import { createVar, style, styleVariants } from "@vanilla-extract/css";
|
|
2
|
-
import { themeVars } from "../../../styles/theme.css";
|
|
3
|
-
|
|
4
|
-
const sizes = {
|
|
5
|
-
xs: '16px',
|
|
6
|
-
sm: '24px',
|
|
7
|
-
md: '32px',
|
|
8
|
-
lg: '40px',
|
|
9
|
-
xl: '96px',
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const borderRadiuses = {
|
|
13
|
-
xs: '2px',
|
|
14
|
-
sm: '3px',
|
|
15
|
-
md: '4px',
|
|
16
|
-
lg: '6px',
|
|
17
|
-
xl: '8px',
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const vars = {
|
|
21
|
-
size: createVar(),
|
|
22
|
-
radius: createVar(),
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const base = style({
|
|
26
|
-
width: vars.size,
|
|
27
|
-
height: vars.size,
|
|
28
|
-
borderRadius: vars.radius,
|
|
29
|
-
backgroundColor: themeVars.color.gray[300],
|
|
30
|
-
boxSizing: 'content-box',
|
|
31
|
-
cursor: 'inherit',
|
|
32
|
-
display: 'flex',
|
|
33
|
-
flexDirection: 'column',
|
|
34
|
-
justifyContent: 'center',
|
|
35
|
-
outline: 'none',
|
|
36
|
-
overflow: 'hidden',
|
|
37
|
-
position: 'static',
|
|
38
|
-
border: 0,
|
|
39
|
-
padding: themeVars.space[0],
|
|
40
|
-
margin: themeVars.space[1],
|
|
41
|
-
color: themeVars.color.gray[500],
|
|
42
|
-
fontSize: themeVars.fontSize.small,
|
|
43
|
-
alignItems: 'center'
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
export const size = styleVariants({
|
|
47
|
-
xs: {
|
|
48
|
-
vars: {
|
|
49
|
-
[vars.size]: sizes.xs,
|
|
50
|
-
[vars.radius]: borderRadiuses.xs,
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
sm: {
|
|
54
|
-
vars: {
|
|
55
|
-
[vars.size]: sizes.sm,
|
|
56
|
-
[vars.radius]: borderRadiuses.sm,
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
md: {
|
|
60
|
-
vars: {
|
|
61
|
-
[vars.size]: sizes.md,
|
|
62
|
-
[vars.radius]: borderRadiuses.md,
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
lg: {
|
|
66
|
-
vars: {
|
|
67
|
-
[vars.size]: sizes.lg,
|
|
68
|
-
[vars.radius]: borderRadiuses.lg,
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
xl: {
|
|
72
|
-
vars: {
|
|
73
|
-
[vars.size]: sizes.xl,
|
|
74
|
-
[vars.radius]: borderRadiuses.xl,
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
export const image = style({
|
|
80
|
-
display: 'flex',
|
|
81
|
-
width: '100%',
|
|
82
|
-
height: '100%',
|
|
83
|
-
flex: '1 1 100%'
|
|
84
|
-
})
|
|
85
|
-
|
|
86
|
-
export const rounded = style({
|
|
87
|
-
borderRadius: '9999px',
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
export const outline = style({
|
|
91
|
-
boxShadow: '0 0 0 2px #FFF'
|
|
92
|
-
});
|
|
1
|
+
import { createVar, style, styleVariants } from "@vanilla-extract/css";
|
|
2
|
+
import { themeVars } from "../../../styles/theme.css";
|
|
3
|
+
|
|
4
|
+
const sizes = {
|
|
5
|
+
xs: '16px',
|
|
6
|
+
sm: '24px',
|
|
7
|
+
md: '32px',
|
|
8
|
+
lg: '40px',
|
|
9
|
+
xl: '96px',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const borderRadiuses = {
|
|
13
|
+
xs: '2px',
|
|
14
|
+
sm: '3px',
|
|
15
|
+
md: '4px',
|
|
16
|
+
lg: '6px',
|
|
17
|
+
xl: '8px',
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const vars = {
|
|
21
|
+
size: createVar(),
|
|
22
|
+
radius: createVar(),
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const base = style({
|
|
26
|
+
width: vars.size,
|
|
27
|
+
height: vars.size,
|
|
28
|
+
borderRadius: vars.radius,
|
|
29
|
+
backgroundColor: themeVars.color.gray[300],
|
|
30
|
+
boxSizing: 'content-box',
|
|
31
|
+
cursor: 'inherit',
|
|
32
|
+
display: 'flex',
|
|
33
|
+
flexDirection: 'column',
|
|
34
|
+
justifyContent: 'center',
|
|
35
|
+
outline: 'none',
|
|
36
|
+
overflow: 'hidden',
|
|
37
|
+
position: 'static',
|
|
38
|
+
border: 0,
|
|
39
|
+
padding: themeVars.space[0],
|
|
40
|
+
margin: themeVars.space[1],
|
|
41
|
+
color: themeVars.color.gray[500],
|
|
42
|
+
fontSize: themeVars.fontSize.small,
|
|
43
|
+
alignItems: 'center'
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export const size = styleVariants({
|
|
47
|
+
xs: {
|
|
48
|
+
vars: {
|
|
49
|
+
[vars.size]: sizes.xs,
|
|
50
|
+
[vars.radius]: borderRadiuses.xs,
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
sm: {
|
|
54
|
+
vars: {
|
|
55
|
+
[vars.size]: sizes.sm,
|
|
56
|
+
[vars.radius]: borderRadiuses.sm,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
md: {
|
|
60
|
+
vars: {
|
|
61
|
+
[vars.size]: sizes.md,
|
|
62
|
+
[vars.radius]: borderRadiuses.md,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
lg: {
|
|
66
|
+
vars: {
|
|
67
|
+
[vars.size]: sizes.lg,
|
|
68
|
+
[vars.radius]: borderRadiuses.lg,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
xl: {
|
|
72
|
+
vars: {
|
|
73
|
+
[vars.size]: sizes.xl,
|
|
74
|
+
[vars.radius]: borderRadiuses.xl,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
export const image = style({
|
|
80
|
+
display: 'flex',
|
|
81
|
+
width: '100%',
|
|
82
|
+
height: '100%',
|
|
83
|
+
flex: '1 1 100%'
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
export const rounded = style({
|
|
87
|
+
borderRadius: '9999px',
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
export const outline = style({
|
|
91
|
+
boxShadow: '0 0 0 2px #FFF'
|
|
92
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './Avatar.css';
|
|
1
|
+
export * from './Avatar.css';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
.m-avatar-group .m-avatar:not(:last-child) {
|
|
2
|
-
margin-right: calc(0px - 10px);
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
.m-avatar-group .m-avatar {
|
|
7
|
-
border: 2px solid var(--white);
|
|
8
|
-
}
|
|
1
|
+
.m-avatar-group .m-avatar:not(:last-child) {
|
|
2
|
+
margin-right: calc(0px - 10px);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
.m-avatar-group .m-avatar {
|
|
7
|
+
border: 2px solid var(--white);
|
|
8
|
+
}
|