@toife/vue 3.1.6 → 3.2.2
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/README.md +1 -52
- package/dist/components/action/action.composable.d.ts +44 -0
- package/dist/components/action/action.vue.d.ts +16 -0
- package/dist/components/action/index.d.ts +2 -0
- package/dist/components/app/app.vue.d.ts +11 -0
- package/dist/components/app/index.d.ts +1 -0
- package/dist/components/avatar/avatar.vue.d.ts +8 -0
- package/dist/components/avatar/index.d.ts +1 -0
- package/dist/components/button/button.vue.d.ts +9 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/cable/cable.vue.d.ts +6 -0
- package/dist/components/cable/index.d.ts +1 -0
- package/dist/components/card/card/card.vue.d.ts +7 -0
- package/dist/components/card/card/index.d.ts +1 -0
- package/dist/components/card/card-body/card-body.vue.d.ts +2 -0
- package/dist/components/card/card-body/index.d.ts +1 -0
- package/dist/components/card/card-footer/card-footer.vue.d.ts +2 -0
- package/dist/components/card/card-footer/index.d.ts +1 -0
- package/dist/components/card/card-header/card-header.vue.d.ts +2 -0
- package/dist/components/card/card-header/index.d.ts +1 -0
- package/dist/components/card/index.d.ts +4 -0
- package/dist/components/checkbox/checkbox.vue.d.ts +18 -0
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/collapse/collapse.vue.d.ts +12 -0
- package/dist/components/collapse/index.d.ts +1 -0
- package/dist/components/container/container.vue.d.ts +2 -0
- package/dist/components/container/index.d.ts +1 -0
- package/dist/components/decision-modal/decision-modal.composable.d.ts +46 -0
- package/dist/components/decision-modal/decision-modal.vue.d.ts +16 -0
- package/dist/components/decision-modal/index.d.ts +2 -0
- package/dist/components/divider/divider.vue.d.ts +5 -0
- package/dist/components/divider/index.d.ts +1 -0
- package/dist/components/dropdown/dropdown.vue.d.ts +20 -0
- package/dist/components/dropdown/index.d.ts +1 -0
- package/dist/components/field/field.vue.d.ts +30 -0
- package/dist/components/field/index.d.ts +1 -0
- package/dist/components/form-group/form-group.vue.d.ts +5 -0
- package/dist/components/form-group/index.d.ts +1 -0
- package/dist/components/gesture-indicator/gesture-indicator.vue.d.ts +6 -0
- package/dist/components/gesture-indicator/index.d.ts +1 -0
- package/dist/components/image/image.vue.d.ts +3 -0
- package/dist/components/image/index.d.ts +1 -0
- package/dist/components/index.d.ts +32 -0
- package/dist/components/layout/flex/flex.vue.d.ts +5 -0
- package/dist/components/layout/flex/index.d.ts +1 -0
- package/dist/components/layout/flex-item/flex-item.vue.d.ts +5 -0
- package/dist/components/layout/flex-item/index.d.ts +1 -0
- package/dist/components/layout/grid/grid.vue.d.ts +5 -0
- package/dist/components/layout/grid/index.d.ts +1 -0
- package/dist/components/layout/grid-item/grid-item.vue.d.ts +5 -0
- package/dist/components/layout/grid-item/index.d.ts +1 -0
- package/dist/components/layout/index.d.ts +4 -0
- package/dist/components/modal/index.d.ts +1 -0
- package/dist/components/modal/modal.vue.d.ts +17 -0
- package/dist/components/page/index.d.ts +1 -0
- package/dist/components/page/page.vue.d.ts +2 -0
- package/dist/components/present/index.d.ts +2 -0
- package/dist/components/present/present.composable.d.ts +5 -0
- package/dist/components/present/present.vue.d.ts +18 -0
- package/dist/components/radio/index.d.ts +2 -0
- package/dist/components/radio/radio/index.d.ts +1 -0
- package/dist/components/radio/radio/radio.vue.d.ts +7 -0
- package/dist/components/radio/radio-group/index.d.ts +1 -0
- package/dist/components/radio/radio-group/radio-group.vue.d.ts +13 -0
- package/dist/components/refresher/index.d.ts +1 -0
- package/dist/components/refresher/refresher.vue.d.ts +12 -0
- package/dist/components/route/index.d.ts +5 -0
- package/dist/components/route/route-navigator/index.d.ts +1 -0
- package/dist/components/route/route-navigator/route-navigator.vue.d.ts +11 -0
- package/dist/components/route/route-outlet/index.d.ts +1 -0
- package/dist/components/route/route-outlet/route-outlet.vue.d.ts +5 -0
- package/dist/components/route/route-provider/index.d.ts +1 -0
- package/dist/components/route/route-provider/route-provider.vue.d.ts +3 -0
- package/dist/components/route/route-wrapper/index.d.ts +2 -0
- package/dist/components/route/route-wrapper/route-wrapper.composable.d.ts +6 -0
- package/dist/components/route/route-wrapper/route-wrapper.vue.d.ts +5 -0
- package/dist/components/route/route.util.d.ts +3 -0
- package/dist/components/segmented-field/index.d.ts +1 -0
- package/dist/components/segmented-field/segmented-field.vue.d.ts +28 -0
- package/dist/components/select/index.d.ts +1 -0
- package/dist/components/select/select.vue.d.ts +19 -0
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/skeleton/skeleton.vue.d.ts +6 -0
- package/dist/components/slide-range/index.d.ts +1 -0
- package/dist/components/slide-range/slide-range.vue.d.ts +18 -0
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/switch/switch.vue.d.ts +13 -0
- package/dist/components/tabs/index.d.ts +2 -0
- package/dist/components/tabs/tab/index.d.ts +1 -0
- package/dist/components/tabs/tab/tab.vue.d.ts +5 -0
- package/dist/components/tabs/tabs/index.d.ts +1 -0
- package/dist/components/tabs/tabs/tabs.vue.d.ts +14 -0
- package/dist/components/tag/index.d.ts +1 -0
- package/dist/components/tag/tag.vue.d.ts +6 -0
- package/dist/components/toast/index.d.ts +3 -0
- package/dist/components/toast/toast/index.d.ts +1 -0
- package/dist/components/toast/toast/toast.vue.d.ts +5 -0
- package/dist/components/toast/toast-content/index.d.ts +1 -0
- package/dist/components/toast/toast-content/toast-content.vue.d.ts +11 -0
- package/dist/components/toast/toast.composable.d.ts +22 -0
- package/dist/components/toolbar/index.d.ts +1 -0
- package/dist/components/toolbar/toolbar.vue.d.ts +7 -0
- package/dist/factory.d.ts +38 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.es.js +3498 -0
- package/dist/index.umd.js +1 -0
- package/dist/shared/provider-state.d.ts +5 -0
- package/dist/styles/action.css +1 -0
- package/dist/styles/app.css +1 -0
- package/dist/styles/avatar.css +1 -0
- package/dist/styles/button.css +1 -0
- package/dist/styles/cable.css +1 -0
- package/dist/styles/card-body.css +1 -0
- package/dist/styles/card-footer.css +1 -0
- package/dist/styles/card-header.css +1 -0
- package/dist/styles/card.css +1 -0
- package/dist/styles/checkbox.css +1 -0
- package/dist/styles/collapse.css +1 -0
- package/dist/styles/container.css +1 -0
- package/dist/styles/decision-modal.css +1 -0
- package/dist/styles/divider.css +1 -0
- package/dist/styles/dropdown.css +1 -0
- package/dist/styles/field.css +1 -0
- package/dist/styles/flex-item.css +1 -0
- package/dist/styles/flex.css +1 -0
- package/dist/styles/form-group.css +1 -0
- package/dist/styles/gesture-indicator.css +1 -0
- package/dist/styles/grid-item.css +1 -0
- package/dist/styles/grid.css +1 -0
- package/dist/styles/index.css +40 -0
- package/dist/styles/modal.css +1 -0
- package/dist/styles/page.css +1 -0
- package/dist/styles/present.css +1 -0
- package/dist/styles/radio-group.css +1 -0
- package/dist/styles/radio.css +1 -0
- package/dist/styles/refresher.css +1 -0
- package/dist/styles/route-navigator.css +1 -0
- package/dist/styles/segmented-field.css +1 -0
- package/dist/styles/select.css +1 -0
- package/dist/styles/skeleton.css +1 -0
- package/dist/styles/slide-range.css +1 -0
- package/dist/styles/switch.css +1 -0
- package/dist/styles/tab.css +1 -0
- package/dist/styles/tabs.css +1 -0
- package/dist/styles/tag.css +1 -0
- package/dist/styles/toast-content.css +1 -0
- package/dist/styles/toast.css +1 -0
- package/dist/styles/toolbar.css +1 -0
- package/dist/types.d.ts +4 -0
- package/package.json +23 -13
- package/src/components/action/action.composable.ts +0 -32
- package/src/components/action/action.html +0 -25
- package/src/components/action/action.scss +0 -106
- package/src/components/action/action.type.ts +0 -44
- package/src/components/action/action.vue +0 -72
- package/src/components/action/index.ts +0 -9
- package/src/components/app/app.constants.ts +0 -1
- package/src/components/app/app.html +0 -24
- package/src/components/app/app.scss +0 -27
- package/src/components/app/app.type.ts +0 -30
- package/src/components/app/app.vue +0 -46
- package/src/components/app/index.ts +0 -3
- package/src/components/avatar/avatar.html +0 -3
- package/src/components/avatar/avatar.scss +0 -45
- package/src/components/avatar/avatar.type.ts +0 -8
- package/src/components/avatar/avatar.vue +0 -44
- package/src/components/avatar/index.ts +0 -2
- package/src/components/button/button.html +0 -6
- package/src/components/button/button.scss +0 -124
- package/src/components/button/button.type.ts +0 -14
- package/src/components/button/button.vue +0 -61
- package/src/components/button/index.ts +0 -2
- package/src/components/cable/cable.constants.ts +0 -1
- package/src/components/cable/cable.html +0 -3
- package/src/components/cable/cable.scss +0 -37
- package/src/components/cable/cable.type.ts +0 -11
- package/src/components/cable/cable.vue +0 -33
- package/src/components/cable/index.ts +0 -3
- package/src/components/card/card/card.constants.ts +0 -1
- package/src/components/card/card/card.html +0 -3
- package/src/components/card/card/card.scss +0 -37
- package/src/components/card/card/card.type.ts +0 -14
- package/src/components/card/card/card.vue +0 -62
- package/src/components/card/card/index.ts +0 -3
- package/src/components/card/card-body/card-body.html +0 -3
- package/src/components/card/card-body/card-body.scss +0 -23
- package/src/components/card/card-body/card-body.vue +0 -9
- package/src/components/card/card-body/index.ts +0 -1
- package/src/components/card/card-footer/card-footer.html +0 -3
- package/src/components/card/card-footer/card-footer.scss +0 -32
- package/src/components/card/card-footer/card-footer.vue +0 -25
- package/src/components/card/card-footer/index.ts +0 -1
- package/src/components/card/card-header/card-header.html +0 -3
- package/src/components/card/card-header/card-header.scss +0 -32
- package/src/components/card/card-header/card-header.vue +0 -25
- package/src/components/card/card-header/index.ts +0 -1
- package/src/components/card/index.ts +0 -4
- package/src/components/checkbox/checkbox.html +0 -12
- package/src/components/checkbox/checkbox.scss +0 -150
- package/src/components/checkbox/checkbox.type.ts +0 -19
- package/src/components/checkbox/checkbox.vue +0 -80
- package/src/components/checkbox/index.ts +0 -2
- package/src/components/collapse/collapse.html +0 -16
- package/src/components/collapse/collapse.scss +0 -56
- package/src/components/collapse/collapse.type.ts +0 -11
- package/src/components/collapse/collapse.vue +0 -127
- package/src/components/collapse/index.ts +0 -2
- package/src/components/container/container.html +0 -1
- package/src/components/container/container.scss +0 -10
- package/src/components/container/container.vue +0 -10
- package/src/components/container/index.ts +0 -1
- package/src/components/decision-modal/decision-modal.composable.ts +0 -33
- package/src/components/decision-modal/decision-modal.html +0 -29
- package/src/components/decision-modal/decision-modal.scss +0 -144
- package/src/components/decision-modal/decision-modal.type.ts +0 -35
- package/src/components/decision-modal/decision-modal.vue +0 -96
- package/src/components/decision-modal/index.ts +0 -9
- package/src/components/divider/divider.html +0 -1
- package/src/components/divider/divider.scss +0 -29
- package/src/components/divider/divider.type.ts +0 -6
- package/src/components/divider/divider.vue +0 -31
- package/src/components/divider/index.ts +0 -2
- package/src/components/dropdown/dropdown.html +0 -6
- package/src/components/dropdown/dropdown.scss +0 -71
- package/src/components/dropdown/dropdown.type.ts +0 -22
- package/src/components/dropdown/dropdown.vue +0 -111
- package/src/components/dropdown/index.ts +0 -2
- package/src/components/field/field.html +0 -31
- package/src/components/field/field.scss +0 -184
- package/src/components/field/field.type.ts +0 -43
- package/src/components/field/field.vue +0 -123
- package/src/components/field/index.ts +0 -2
- package/src/components/form-group/form-group.html +0 -3
- package/src/components/form-group/form-group.scss +0 -91
- package/src/components/form-group/form-group.type.ts +0 -5
- package/src/components/form-group/form-group.vue +0 -21
- package/src/components/form-group/index.ts +0 -2
- package/src/components/gesture-indicator/gesture-indicator.html +0 -1
- package/src/components/gesture-indicator/gesture-indicator.scss +0 -47
- package/src/components/gesture-indicator/gesture-indicator.type.ts +0 -5
- package/src/components/gesture-indicator/gesture-indicator.vue +0 -31
- package/src/components/gesture-indicator/index.ts +0 -1
- package/src/components/image/image.html +0 -1
- package/src/components/image/image.type.ts +0 -5
- package/src/components/image/image.vue +0 -29
- package/src/components/image/index.ts +0 -2
- package/src/components/index.ts +0 -31
- package/src/components/layout/flex/flex.html +0 -1
- package/src/components/layout/flex/flex.scss +0 -57
- package/src/components/layout/flex/flex.type.ts +0 -15
- package/src/components/layout/flex/flex.vue +0 -34
- package/src/components/layout/flex/index.ts +0 -2
- package/src/components/layout/flex-item/flex-item.html +0 -1
- package/src/components/layout/flex-item/flex-item.scss +0 -48
- package/src/components/layout/flex-item/flex-item.type.ts +0 -11
- package/src/components/layout/flex-item/flex-item.vue +0 -27
- package/src/components/layout/flex-item/index.ts +0 -2
- package/src/components/layout/grid/grid.html +0 -1
- package/src/components/layout/grid/grid.scss +0 -51
- package/src/components/layout/grid/grid.type.ts +0 -12
- package/src/components/layout/grid/grid.vue +0 -32
- package/src/components/layout/grid/index.ts +0 -2
- package/src/components/layout/grid-item/grid-item.html +0 -1
- package/src/components/layout/grid-item/grid-item.scss +0 -49
- package/src/components/layout/grid-item/grid-item.type.ts +0 -14
- package/src/components/layout/grid-item/grid-item.vue +0 -27
- package/src/components/layout/grid-item/index.ts +0 -2
- package/src/components/layout/index.ts +0 -4
- package/src/components/modal/index.ts +0 -2
- package/src/components/modal/modal.html +0 -20
- package/src/components/modal/modal.scss +0 -80
- package/src/components/modal/modal.type.ts +0 -21
- package/src/components/modal/modal.vue +0 -251
- package/src/components/page/index.ts +0 -1
- package/src/components/page/page.html +0 -3
- package/src/components/page/page.scss +0 -17
- package/src/components/page/page.vue +0 -10
- package/src/components/present/index.ts +0 -3
- package/src/components/present/present.composable.ts +0 -22
- package/src/components/present/present.html +0 -9
- package/src/components/present/present.scss +0 -81
- package/src/components/present/present.type.ts +0 -26
- package/src/components/present/present.vue +0 -198
- package/src/components/radio/index.ts +0 -2
- package/src/components/radio/radio/index.ts +0 -2
- package/src/components/radio/radio/radio.html +0 -11
- package/src/components/radio/radio/radio.scss +0 -142
- package/src/components/radio/radio/radio.type.ts +0 -13
- package/src/components/radio/radio/radio.vue +0 -87
- package/src/components/radio/radio-group/index.ts +0 -7
- package/src/components/radio/radio-group/radio-group.constants.ts +0 -1
- package/src/components/radio/radio-group/radio-group.html +0 -3
- package/src/components/radio/radio-group/radio-group.scss +0 -16
- package/src/components/radio/radio-group/radio-group.type.ts +0 -28
- package/src/components/radio/radio-group/radio-group.vue +0 -57
- package/src/components/refresher/index.ts +0 -2
- package/src/components/refresher/refresher.html +0 -3
- package/src/components/refresher/refresher.scss +0 -18
- package/src/components/refresher/refresher.type.ts +0 -16
- package/src/components/refresher/refresher.vue +0 -123
- package/src/components/route/index.ts +0 -5
- package/src/components/route/route-navigator/index.ts +0 -2
- package/src/components/route/route-navigator/route-navigator.html +0 -19
- package/src/components/route/route-navigator/route-navigator.scss +0 -127
- package/src/components/route/route-navigator/route-navigator.type.ts +0 -36
- package/src/components/route/route-navigator/route-navigator.vue +0 -275
- package/src/components/route/route-outlet/index.ts +0 -1
- package/src/components/route/route-outlet/route-outlet.html +0 -1
- package/src/components/route/route-outlet/route-outlet.vue +0 -39
- package/src/components/route/route-provider/index.ts +0 -3
- package/src/components/route/route-provider/route-provider.constant.ts +0 -1
- package/src/components/route/route-provider/route-provider.html +0 -1
- package/src/components/route/route-provider/route-provider.type.ts +0 -10
- package/src/components/route/route-provider/route-provider.vue +0 -20
- package/src/components/route/route-wrapper/index.ts +0 -3
- package/src/components/route/route-wrapper/route-wrapper.composable.ts +0 -49
- package/src/components/route/route-wrapper/route-wrapper.html +0 -3
- package/src/components/route/route-wrapper/route-wrapper.type.ts +0 -3
- package/src/components/route/route-wrapper/route-wrapper.vue +0 -45
- package/src/components/route/route.type.ts +0 -7
- package/src/components/route/route.util.ts +0 -9
- package/src/components/segmented-field/index.ts +0 -7
- package/src/components/segmented-field/segmented-field.html +0 -17
- package/src/components/segmented-field/segmented-field.scss +0 -53
- package/src/components/segmented-field/segmented-field.type.ts +0 -29
- package/src/components/segmented-field/segmented-field.vue +0 -145
- package/src/components/select/index.ts +0 -2
- package/src/components/select/select.html +0 -29
- package/src/components/select/select.scss +0 -129
- package/src/components/select/select.type.ts +0 -45
- package/src/components/select/select.vue +0 -119
- package/src/components/skeleton/index.ts +0 -2
- package/src/components/skeleton/skeleton.html +0 -1
- package/src/components/skeleton/skeleton.scss +0 -52
- package/src/components/skeleton/skeleton.type.ts +0 -7
- package/src/components/skeleton/skeleton.vue +0 -38
- package/src/components/slide-range/index.ts +0 -2
- package/src/components/slide-range/slide-range.html +0 -19
- package/src/components/slide-range/slide-range.scss +0 -164
- package/src/components/slide-range/slide-range.type.ts +0 -16
- package/src/components/slide-range/slide-range.vue +0 -230
- package/src/components/switch/index.ts +0 -2
- package/src/components/switch/switch.html +0 -14
- package/src/components/switch/switch.scss +0 -128
- package/src/components/switch/switch.type.ts +0 -17
- package/src/components/switch/switch.vue +0 -97
- package/src/components/tabs/index.ts +0 -2
- package/src/components/tabs/tab/index.ts +0 -2
- package/src/components/tabs/tab/tab.html +0 -5
- package/src/components/tabs/tab/tab.scss +0 -13
- package/src/components/tabs/tab/tab.type.ts +0 -5
- package/src/components/tabs/tab/tab.vue +0 -40
- package/src/components/tabs/tabs/index.ts +0 -10
- package/src/components/tabs/tabs/tabs.constants.ts +0 -1
- package/src/components/tabs/tabs/tabs.html +0 -3
- package/src/components/tabs/tabs/tabs.scss +0 -337
- package/src/components/tabs/tabs/tabs.type.ts +0 -38
- package/src/components/tabs/tabs/tabs.vue +0 -177
- package/src/components/toast/index.ts +0 -4
- package/src/components/toast/toast/index.ts +0 -1
- package/src/components/toast/toast/toast.html +0 -9
- package/src/components/toast/toast/toast.scss +0 -61
- package/src/components/toast/toast/toast.vue +0 -34
- package/src/components/toast/toast-content/index.ts +0 -1
- package/src/components/toast/toast-content/toast-content.html +0 -1
- package/src/components/toast/toast-content/toast-content.scss +0 -42
- package/src/components/toast/toast-content/toast-content.vue +0 -53
- package/src/components/toast/toast.composable.ts +0 -22
- package/src/components/toast/toast.type.ts +0 -25
- package/src/components/toolbar/index.ts +0 -2
- package/src/components/toolbar/toolbar.html +0 -3
- package/src/components/toolbar/toolbar.scss +0 -64
- package/src/components/toolbar/toolbar.type.ts +0 -7
- package/src/components/toolbar/toolbar.vue +0 -41
- package/src/env.d.ts +0 -7
- package/src/factory.ts +0 -152
- package/src/index.ts +0 -4
- package/src/type.ts +0 -4
- package/src/utils/element.md +0 -33
- package/src/utils/element.ts +0 -22
- package/src/utils/events.md +0 -29
- package/src/utils/events.ts +0 -18
- package/src/utils/index.ts +0 -3
- package/src/utils/style/index.ts +0 -57
- package/src/utils/style.md +0 -49
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
@use "@toife/sass-layer" as sass;
|
|
2
|
-
|
|
3
|
-
// Class name
|
|
4
|
-
$button: sass.fn-naming-prefix("button");
|
|
5
|
-
$loader: sass.fn-naming-prefix("loader");
|
|
6
|
-
|
|
7
|
-
// Property name
|
|
8
|
-
$radius-ratio: sass.fn-naming-var("radius-ratio");
|
|
9
|
-
$radius-size: sass.fn-naming-var("radius-size");
|
|
10
|
-
$border-width: sass.fn-naming-var("stroke", "width");
|
|
11
|
-
$transition-duration: sass.fn-naming-var("duration");
|
|
12
|
-
$spacing-x: sass.fn-naming-var("spacing", "x");
|
|
13
|
-
$spacing-y: sass.fn-naming-var("spacing", "y");
|
|
14
|
-
|
|
15
|
-
$button-color: sass.fn-naming-var("button", "color");
|
|
16
|
-
$button-color-disabled: sass.fn-naming-var("button", "color", "disabled");
|
|
17
|
-
|
|
18
|
-
$button-border-color: sass.fn-naming-var("button", "border-color");
|
|
19
|
-
$button-border-color-hover: sass.fn-naming-var("button", "border-color", "hover");
|
|
20
|
-
$button-border-color-focus: sass.fn-naming-var("button", "border-color", "focus");
|
|
21
|
-
$button-border-color-active: sass.fn-naming-var("button", "border-color", "active");
|
|
22
|
-
$button-border-color-disabled: sass.fn-naming-var("button", "border-color", "disabled");
|
|
23
|
-
|
|
24
|
-
$button-background-color: sass.fn-naming-var("button", "background-color");
|
|
25
|
-
$button-background-color-hover: sass.fn-naming-var("button", "background-color", "hover");
|
|
26
|
-
$button-background-color-focus: sass.fn-naming-var("button", "background-color", "focus");
|
|
27
|
-
$button-background-color-active: sass.fn-naming-var("button", "background-color", "active");
|
|
28
|
-
$button-background-color-disabled: sass.fn-naming-var("button", "background-color", "disabled");
|
|
29
|
-
|
|
30
|
-
$button-box-shadow-color-focus: sass.fn-naming-var("button", "box-shadow-color", "focus");
|
|
31
|
-
|
|
32
|
-
$size-font-size: sass.fn-naming-var("font-size");
|
|
33
|
-
$size-control-block-size: sass.fn-naming-var("control-block-size");
|
|
34
|
-
$size-coefficient-x: sass.fn-naming-var("coefficient-x");
|
|
35
|
-
$size-coefficient-y: sass.fn-naming-var("coefficient-y");
|
|
36
|
-
$size-line-height: sass.fn-naming-var("line-height");
|
|
37
|
-
|
|
38
|
-
.#{$button} {
|
|
39
|
-
display: inline-flex;
|
|
40
|
-
justify-content: center;
|
|
41
|
-
align-items: center;
|
|
42
|
-
position: relative;
|
|
43
|
-
overflow: hidden;
|
|
44
|
-
color: rgba(#{$button-color});
|
|
45
|
-
background: rgba(#{$button-background-color});
|
|
46
|
-
border-color: rgba(#{$button-border-color});
|
|
47
|
-
border-style: solid;
|
|
48
|
-
border-width: #{$border-width};
|
|
49
|
-
white-space: nowrap;
|
|
50
|
-
border-radius: calc(min(#{$size-control-block-size}, #{$radius-size}) * #{$radius-ratio});
|
|
51
|
-
cursor: pointer;
|
|
52
|
-
transition:
|
|
53
|
-
color #{$transition-duration} ease,
|
|
54
|
-
background-color #{$transition-duration} ease,
|
|
55
|
-
border-color #{$transition-duration} ease,
|
|
56
|
-
border-radius #{$transition-duration} ease,
|
|
57
|
-
box-shadow #{$transition-duration} ease;
|
|
58
|
-
box-shadow: none;
|
|
59
|
-
|
|
60
|
-
padding: calc(#{$spacing-y} * #{$size-coefficient-y}) calc(#{$spacing-x} * #{$size-coefficient-x});
|
|
61
|
-
font-size: #{$size-font-size};
|
|
62
|
-
height: #{$size-control-block-size};
|
|
63
|
-
line-height: #{$size-line-height};
|
|
64
|
-
|
|
65
|
-
// Text variant
|
|
66
|
-
&.text {
|
|
67
|
-
background-color: transparent;
|
|
68
|
-
border-color: transparent;
|
|
69
|
-
color: rgba(#{$button-background-color});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// Fill variant
|
|
73
|
-
&.fill:hover {
|
|
74
|
-
border-color: rgba(#{$button-border-color-hover});
|
|
75
|
-
background-color: rgba(#{$button-background-color-hover});
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&.fill.focus,
|
|
79
|
-
&.fill:focus {
|
|
80
|
-
border-color: rgba(#{$button-border-color-focus});
|
|
81
|
-
background-color: rgba(#{$button-background-color-focus});
|
|
82
|
-
|
|
83
|
-
&.shadow {
|
|
84
|
-
box-shadow: 0 0 0 0.25rem rgba(#{$button-box-shadow-color-focus}, 0.25);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&.fill:active,
|
|
89
|
-
&.fill.active {
|
|
90
|
-
border-color: rgba(#{$button-border-color-active});
|
|
91
|
-
background-color: rgba(#{$button-background-color-active});
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&.fill:disabled,
|
|
95
|
-
&.fill.disabled {
|
|
96
|
-
border-color: rgba(#{$button-border-color-disabled});
|
|
97
|
-
background-color: rgba(#{$button-background-color-disabled});
|
|
98
|
-
color: rgba(#{$button-color-disabled});
|
|
99
|
-
cursor: not-allowed;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// Case is block, then display full width
|
|
103
|
-
&.block {
|
|
104
|
-
width: 100%;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// Style for loading icon
|
|
108
|
-
.#{$loader} {
|
|
109
|
-
position: absolute;
|
|
110
|
-
top: 0;
|
|
111
|
-
left: 0;
|
|
112
|
-
width: 100%;
|
|
113
|
-
height: 100%;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// Style for content of button
|
|
117
|
-
> span {
|
|
118
|
-
display: flex;
|
|
119
|
-
justify-content: center;
|
|
120
|
-
align-items: center;
|
|
121
|
-
font-size: inherit;
|
|
122
|
-
line-height: inherit;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// Type definitions
|
|
2
|
-
export type ButtonVariant = "fill" | "outline" | "text";
|
|
3
|
-
|
|
4
|
-
export type ButtonSize = string;
|
|
5
|
-
|
|
6
|
-
export type ButtonProps = {
|
|
7
|
-
role?: string;
|
|
8
|
-
size?: ButtonSize;
|
|
9
|
-
shape?: string;
|
|
10
|
-
block?: boolean;
|
|
11
|
-
loading?: boolean;
|
|
12
|
-
variant?: ButtonVariant;
|
|
13
|
-
shadow?: boolean;
|
|
14
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
<style lang="scss" src="./button.scss" scoped></style>
|
|
2
|
-
<template src="./button.html"></template>
|
|
3
|
-
<script lang="ts" setup>
|
|
4
|
-
import { computed, inject, ref } from "vue";
|
|
5
|
-
import { type ButtonProps } from "./button.type";
|
|
6
|
-
import { cssPrefix } from "../../utils";
|
|
7
|
-
import { type AppProviderState, APP_PROVIDER_STATE_KEY } from "../app";
|
|
8
|
-
|
|
9
|
-
// Component setup (props, emits, injects)
|
|
10
|
-
// ----------------------------------------------------------------------------
|
|
11
|
-
const props = withDefaults(defineProps<ButtonProps>(), {
|
|
12
|
-
size: "standard",
|
|
13
|
-
block: false,
|
|
14
|
-
loading: false,
|
|
15
|
-
variant: "fill",
|
|
16
|
-
shadow: undefined,
|
|
17
|
-
});
|
|
18
|
-
const appState = inject<AppProviderState>(APP_PROVIDER_STATE_KEY);
|
|
19
|
-
|
|
20
|
-
// Reactive state
|
|
21
|
-
// ----------------------------------------------------------------------------
|
|
22
|
-
const isFocused = ref(false);
|
|
23
|
-
|
|
24
|
-
// Computed properties
|
|
25
|
-
// ----------------------------------------------------------------------------
|
|
26
|
-
const buttonAttrs = computed(() => {
|
|
27
|
-
const shape = props.shape || appState?.shape.value || "";
|
|
28
|
-
const role = props.role || appState?.role.value || "";
|
|
29
|
-
const shadow = (props?.shadow !== undefined ? props.shadow : appState?.shadow.value) ?? false;
|
|
30
|
-
|
|
31
|
-
return {
|
|
32
|
-
class: [
|
|
33
|
-
cssPrefix(["layer", "button"]),
|
|
34
|
-
cssPrefix(["role", role]),
|
|
35
|
-
cssPrefix(["shape", shape]),
|
|
36
|
-
cssPrefix("button"),
|
|
37
|
-
cssPrefix(["size", props.size]),
|
|
38
|
-
props.variant,
|
|
39
|
-
{
|
|
40
|
-
block: props.block,
|
|
41
|
-
shadow,
|
|
42
|
-
focus: isFocused.value,
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
};
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
const loaderAttrs = {
|
|
49
|
-
class: [cssPrefix("loader")],
|
|
50
|
-
} as const;
|
|
51
|
-
|
|
52
|
-
// Methods
|
|
53
|
-
// ----------------------------------------------------------------------------
|
|
54
|
-
const onFocus = () => {
|
|
55
|
-
isFocused.value = true;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
const onBlur = () => {
|
|
59
|
-
isFocused.value = false;
|
|
60
|
-
};
|
|
61
|
-
</script>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const CABLE_PROVIDER_STATE_KEY = "cable-state";
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
@use "@toife/sass-layer" as sass;
|
|
2
|
-
|
|
3
|
-
// Class name
|
|
4
|
-
$cable: sass.fn-naming-prefix("cable");
|
|
5
|
-
|
|
6
|
-
.#{$cable} {
|
|
7
|
-
position: absolute;
|
|
8
|
-
z-index: 10;
|
|
9
|
-
|
|
10
|
-
&.bottom {
|
|
11
|
-
bottom: 0;
|
|
12
|
-
left: 0;
|
|
13
|
-
height: auto;
|
|
14
|
-
width: 100%;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
&.top {
|
|
18
|
-
left: 0;
|
|
19
|
-
top: 0;
|
|
20
|
-
height: auto;
|
|
21
|
-
width: 100%;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&.left {
|
|
25
|
-
left: 0;
|
|
26
|
-
top: 0;
|
|
27
|
-
height: 100%;
|
|
28
|
-
width: auto;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&.right {
|
|
32
|
-
right: 0;
|
|
33
|
-
top: 0;
|
|
34
|
-
height: 100%;
|
|
35
|
-
width: auto;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
<style lang="scss" src="./cable.scss" scoped></style>
|
|
2
|
-
<template src="./cable.html"></template>
|
|
3
|
-
<script lang="ts" setup>
|
|
4
|
-
import { computed, provide, toRefs } from "vue";
|
|
5
|
-
import { type CableProviderState, type CableProps } from "./cable.type";
|
|
6
|
-
import { cssPrefix } from "../../utils";
|
|
7
|
-
import { CABLE_PROVIDER_STATE_KEY } from "./cable.constants";
|
|
8
|
-
|
|
9
|
-
// Component setup (props, emits, injects)
|
|
10
|
-
// ----------------------------------------------------------------------------
|
|
11
|
-
const props = withDefaults(defineProps<CableProps>(), {
|
|
12
|
-
keyboard: false,
|
|
13
|
-
placement: "bottom",
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
// Reactive state
|
|
17
|
-
// ----------------------------------------------------------------------------
|
|
18
|
-
const { placement } = toRefs(props);
|
|
19
|
-
|
|
20
|
-
// Computed properties
|
|
21
|
-
// ----------------------------------------------------------------------------
|
|
22
|
-
const cableAttrs = computed(() => {
|
|
23
|
-
return {
|
|
24
|
-
class: [cssPrefix(["layer", "cable"]), cssPrefix("cable"), placement.value],
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
// Provide / expose (public API)
|
|
29
|
-
// ----------------------------------------------------------------------------
|
|
30
|
-
provide<CableProviderState>(CABLE_PROVIDER_STATE_KEY, {
|
|
31
|
-
placement,
|
|
32
|
-
});
|
|
33
|
-
</script>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const CARD_PROVIDER_STATE_KEY = "card-state";
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
@use "@toife/sass-layer" as sass;
|
|
2
|
-
|
|
3
|
-
// Class name
|
|
4
|
-
$card: sass.fn-naming-prefix("card");
|
|
5
|
-
|
|
6
|
-
// Property name - layer: card
|
|
7
|
-
$card-background-color: sass.fn-naming-var("card", "background-color");
|
|
8
|
-
$card-color: sass.fn-naming-var("card", "color");
|
|
9
|
-
|
|
10
|
-
$radius-ratio: sass.fn-naming-var("radius-ratio");
|
|
11
|
-
$radius-size: sass.fn-naming-var("radius-size");
|
|
12
|
-
$transition-duration: sass.fn-naming-var("duration");
|
|
13
|
-
$border-radius: calc(#{$radius-size} * #{$radius-ratio});
|
|
14
|
-
|
|
15
|
-
.#{$card} {
|
|
16
|
-
background-color: rgba(#{$card-background-color});
|
|
17
|
-
color: rgba(#{$card-color});
|
|
18
|
-
border-radius: #{$border-radius};
|
|
19
|
-
transition:
|
|
20
|
-
box-shadow #{$transition-duration} ease,
|
|
21
|
-
border-color #{$transition-duration} ease,
|
|
22
|
-
background-color #{$transition-duration} ease,
|
|
23
|
-
color #{$transition-duration} ease,
|
|
24
|
-
border-radius #{$transition-duration} ease;
|
|
25
|
-
|
|
26
|
-
> div {
|
|
27
|
-
&:first-child {
|
|
28
|
-
border-top-left-radius: #{$border-radius};
|
|
29
|
-
border-top-right-radius: #{$border-radius};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&:last-child {
|
|
33
|
-
border-bottom-left-radius: #{$border-radius};
|
|
34
|
-
border-bottom-right-radius: #{$border-radius};
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ComputedRef, Ref } from "vue";
|
|
2
|
-
|
|
3
|
-
// Type definitions
|
|
4
|
-
export type CardProps = {
|
|
5
|
-
role?: string;
|
|
6
|
-
shape?: string;
|
|
7
|
-
divider?: boolean;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export type CardProviderState = {
|
|
11
|
-
role: ComputedRef<string>;
|
|
12
|
-
shape: ComputedRef<string>;
|
|
13
|
-
divider: ComputedRef<boolean>;
|
|
14
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<style lang="scss" src="./card.scss"></style>
|
|
2
|
-
<template src="./card.html"></template>
|
|
3
|
-
<script lang="ts" setup>
|
|
4
|
-
import { computed, inject, provide } from "vue";
|
|
5
|
-
import { type CardProps, type CardProviderState } from "./card.type";
|
|
6
|
-
import { cssPrefix } from "../../../utils";
|
|
7
|
-
import { type AppProviderState, APP_PROVIDER_STATE_KEY } from "../../app";
|
|
8
|
-
import { CARD_PROVIDER_STATE_KEY } from "./card.constants";
|
|
9
|
-
|
|
10
|
-
// Component setup (props, emits, injects)
|
|
11
|
-
// ----------------------------------------------------------------------------
|
|
12
|
-
const props = withDefaults(defineProps<CardProps>(), {
|
|
13
|
-
divider: undefined,
|
|
14
|
-
shape: undefined,
|
|
15
|
-
role: undefined,
|
|
16
|
-
});
|
|
17
|
-
const appState = inject<AppProviderState>(APP_PROVIDER_STATE_KEY);
|
|
18
|
-
|
|
19
|
-
// Computed properties
|
|
20
|
-
// ----------------------------------------------------------------------------
|
|
21
|
-
const divider = computed(() => {
|
|
22
|
-
return (props?.divider !== undefined ? props.divider : appState?.divider.value) ?? false;
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
const shape = computed(() => {
|
|
26
|
-
return props?.shape || appState?.shape.value || "";
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
const role = computed(() => {
|
|
30
|
-
return props.role || appState?.role.value || "";
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
const cardAttrs = computed(() => {
|
|
34
|
-
return {
|
|
35
|
-
class: [
|
|
36
|
-
cssPrefix(["layer", "card"]),
|
|
37
|
-
cssPrefix(["role", role.value]),
|
|
38
|
-
cssPrefix(["shape", shape.value]),
|
|
39
|
-
cssPrefix("card"),
|
|
40
|
-
{
|
|
41
|
-
divider: divider.value,
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
};
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
const cardProviderState = computed(() => {
|
|
48
|
-
return {
|
|
49
|
-
role: role.value,
|
|
50
|
-
shape: shape.value,
|
|
51
|
-
divider: divider.value,
|
|
52
|
-
};
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
// Provide / expose (public API)
|
|
56
|
-
// ----------------------------------------------------------------------------
|
|
57
|
-
provide<CardProviderState>(CARD_PROVIDER_STATE_KEY, {
|
|
58
|
-
role,
|
|
59
|
-
shape,
|
|
60
|
-
divider,
|
|
61
|
-
});
|
|
62
|
-
</script>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
@use "@toife/sass-layer" as sass;
|
|
2
|
-
|
|
3
|
-
// Class name
|
|
4
|
-
$card-body: sass.fn-naming-prefix("card-body");
|
|
5
|
-
|
|
6
|
-
// Property name - layer: card
|
|
7
|
-
$card-background-color: sass.fn-naming-var("card", "background-color");
|
|
8
|
-
$card-color: sass.fn-naming-var("card", "color");
|
|
9
|
-
$padding-y: sass.fn-naming-var("spacing", "y");
|
|
10
|
-
$padding-x: sass.fn-naming-var("spacing", "x");
|
|
11
|
-
$transition-duration: sass.fn-naming-var("duration");
|
|
12
|
-
|
|
13
|
-
.#{$card-body} {
|
|
14
|
-
background-color: rgba(#{$card-background-color});
|
|
15
|
-
color: rgba(#{$card-color});
|
|
16
|
-
padding: calc(#{$padding-y} * 4) calc(#{$padding-x} * 4);
|
|
17
|
-
transition:
|
|
18
|
-
box-shadow #{$transition-duration} ease,
|
|
19
|
-
border-color #{$transition-duration} ease,
|
|
20
|
-
background-color #{$transition-duration} ease,
|
|
21
|
-
color #{$transition-duration} ease,
|
|
22
|
-
border-radius #{$transition-duration} ease;
|
|
23
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as CardBody } from "./card-body.vue";
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
@use "@toife/sass-layer" as sass;
|
|
2
|
-
|
|
3
|
-
// Class name
|
|
4
|
-
$card-footer: sass.fn-naming-prefix("card-footer");
|
|
5
|
-
|
|
6
|
-
// Property name - layer: card
|
|
7
|
-
$card-background-color: sass.fn-naming-var("card", "background-color");
|
|
8
|
-
$card-color: sass.fn-naming-var("card", "color");
|
|
9
|
-
$card-border-color: sass.fn-naming-var("card", "border-color");
|
|
10
|
-
|
|
11
|
-
$padding-y: sass.fn-naming-var("spacing", "y");
|
|
12
|
-
$padding-x: sass.fn-naming-var("spacing", "x");
|
|
13
|
-
$border-width: sass.fn-naming-var("stroke", "width");
|
|
14
|
-
$border: #{$border-width} solid transparent;
|
|
15
|
-
$transition-duration: sass.fn-naming-var("duration");
|
|
16
|
-
|
|
17
|
-
.#{$card-footer} {
|
|
18
|
-
background-color: rgba(#{$card-background-color});
|
|
19
|
-
color: rgba(#{$card-color});
|
|
20
|
-
padding: calc(#{$padding-y} * 4) calc(#{$padding-x} * 4);
|
|
21
|
-
border-top: #{$border};
|
|
22
|
-
transition:
|
|
23
|
-
box-shadow #{$transition-duration} ease,
|
|
24
|
-
border-color #{$transition-duration} ease,
|
|
25
|
-
background-color #{$transition-duration} ease,
|
|
26
|
-
color #{$transition-duration} ease,
|
|
27
|
-
border-radius #{$transition-duration} ease;
|
|
28
|
-
|
|
29
|
-
&.divider {
|
|
30
|
-
border-color: rgba(#{$card-border-color});
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<style lang="scss" src="./card-footer.scss"></style>
|
|
2
|
-
<template src="./card-footer.html"></template>
|
|
3
|
-
<script lang="ts" setup>
|
|
4
|
-
import { computed, inject } from "vue";
|
|
5
|
-
import { cssPrefix } from "../../../utils";
|
|
6
|
-
import { type CardProviderState, CARD_PROVIDER_STATE_KEY } from "../card";
|
|
7
|
-
|
|
8
|
-
// Component setup (props, emits, injects)
|
|
9
|
-
// ----------------------------------------------------------------------------
|
|
10
|
-
const cardProviderState = inject<CardProviderState>(CARD_PROVIDER_STATE_KEY);
|
|
11
|
-
|
|
12
|
-
// Computed properties
|
|
13
|
-
// ----------------------------------------------------------------------------
|
|
14
|
-
const cardFooterAttrs = computed(() => {
|
|
15
|
-
const divider = cardProviderState?.divider.value ?? false;
|
|
16
|
-
return {
|
|
17
|
-
class: [
|
|
18
|
-
cssPrefix("card-footer"),
|
|
19
|
-
{
|
|
20
|
-
divider,
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
};
|
|
24
|
-
});
|
|
25
|
-
</script>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as CardFooter } from "./card-footer.vue";
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
@use "@toife/sass-layer" as sass;
|
|
2
|
-
|
|
3
|
-
// Class name
|
|
4
|
-
$card-header: sass.fn-naming-prefix("card-header");
|
|
5
|
-
|
|
6
|
-
// Property name - layer: card
|
|
7
|
-
$card-background-color: sass.fn-naming-var("card", "background-color");
|
|
8
|
-
$card-color: sass.fn-naming-var("card", "color");
|
|
9
|
-
$card-border-color: sass.fn-naming-var("card", "border-color");
|
|
10
|
-
|
|
11
|
-
$padding-y: sass.fn-naming-var("spacing", "y");
|
|
12
|
-
$padding-x: sass.fn-naming-var("spacing", "x");
|
|
13
|
-
$border-width: sass.fn-naming-var("stroke", "width");
|
|
14
|
-
$border: #{$border-width} solid transparent;
|
|
15
|
-
$transition-duration: sass.fn-naming-var("duration");
|
|
16
|
-
|
|
17
|
-
.#{$card-header} {
|
|
18
|
-
background-color: rgba(#{$card-background-color});
|
|
19
|
-
color: rgba(#{$card-color});
|
|
20
|
-
padding: calc(#{$padding-y} * 4) calc(#{$padding-x} * 4);
|
|
21
|
-
border-bottom: #{$border};
|
|
22
|
-
transition:
|
|
23
|
-
box-shadow #{$transition-duration} ease,
|
|
24
|
-
border-color #{$transition-duration} ease,
|
|
25
|
-
background-color #{$transition-duration} ease,
|
|
26
|
-
color #{$transition-duration} ease,
|
|
27
|
-
border-radius #{$transition-duration} ease;
|
|
28
|
-
|
|
29
|
-
&.divider {
|
|
30
|
-
border-color: rgba(#{$card-border-color});
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<style lang="scss" src="./card-header.scss"></style>
|
|
2
|
-
<template src="./card-header.html"></template>
|
|
3
|
-
<script lang="ts" setup>
|
|
4
|
-
import { computed, inject } from "vue";
|
|
5
|
-
import { cssPrefix } from "../../../utils";
|
|
6
|
-
import { type CardProviderState, CARD_PROVIDER_STATE_KEY } from "../card";
|
|
7
|
-
|
|
8
|
-
// Component setup (props, emits, injects)
|
|
9
|
-
// ----------------------------------------------------------------------------
|
|
10
|
-
const cardProviderState = inject<CardProviderState>(CARD_PROVIDER_STATE_KEY);
|
|
11
|
-
|
|
12
|
-
// Computed properties
|
|
13
|
-
// ----------------------------------------------------------------------------
|
|
14
|
-
const cardHeaderAttrs = computed(() => {
|
|
15
|
-
const divider = cardProviderState?.divider.value ?? false;
|
|
16
|
-
return {
|
|
17
|
-
class: [
|
|
18
|
-
cssPrefix("card-header"),
|
|
19
|
-
{
|
|
20
|
-
divider,
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
};
|
|
24
|
-
});
|
|
25
|
-
</script>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as CardHeader } from "./card-header.vue";
|