@for-the-people-initiative/design-system 1.3.1
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 +80 -0
- package/dist/css/theme-dark.css +7 -0
- package/dist/css/tokens.css +2315 -0
- package/dist/scss/_tokens.scss +2521 -0
- package/dist/ts/tokens.ts +2441 -0
- package/package.json +80 -0
- package/src/components/Accordion/Accordion.scss +118 -0
- package/src/components/Accordion/Accordion.vue +105 -0
- package/src/components/Accordion/AccordionTab.vue +79 -0
- package/src/components/Alert/Alert.scss +109 -0
- package/src/components/Alert/Alert.vue +79 -0
- package/src/components/AppBar/AppBar.scss +73 -0
- package/src/components/AppBar/AppBar.vue +49 -0
- package/src/components/AtmosphericBackground/AtmosphericBackground.vue +198 -0
- package/src/components/AutoComplete/AutoComplete.scss +282 -0
- package/src/components/AutoComplete/AutoComplete.vue +398 -0
- package/src/components/Avatar/Avatar.scss +191 -0
- package/src/components/Avatar/Avatar.vue +44 -0
- package/src/components/Badge/Badge.scss +84 -0
- package/src/components/Badge/Badge.vue +41 -0
- package/src/components/BlockUI/BlockUI.scss +85 -0
- package/src/components/BlockUI/BlockUI.vue +90 -0
- package/src/components/Breadcrumb/Breadcrumb.scss +84 -0
- package/src/components/Breadcrumb/Breadcrumb.vue +141 -0
- package/src/components/Button/Button.scss +254 -0
- package/src/components/Button/Button.vue +68 -0
- package/src/components/CTA/CTA.scss +92 -0
- package/src/components/CTA/CTA.vue +33 -0
- package/src/components/Calendar/Calendar.scss +330 -0
- package/src/components/Calendar/Calendar.vue +455 -0
- package/src/components/Card/Card.scss +66 -0
- package/src/components/Card/Card.vue +48 -0
- package/src/components/Carousel/Carousel.scss +121 -0
- package/src/components/Carousel/Carousel.vue +191 -0
- package/src/components/Chart/Chart.scss +109 -0
- package/src/components/Chart/Chart.vue +209 -0
- package/src/components/Checkbox/Checkbox.scss +148 -0
- package/src/components/Checkbox/Checkbox.vue +75 -0
- package/src/components/Chip/Chip.scss +83 -0
- package/src/components/Chip/Chip.vue +73 -0
- package/src/components/ColorPicker/ColorPicker.scss +244 -0
- package/src/components/ColorPicker/ColorPicker.vue +411 -0
- package/src/components/Column/Column.scss +87 -0
- package/src/components/Column/Column.vue +45 -0
- package/src/components/ColumnGroup/ColumnGroup.scss +41 -0
- package/src/components/ColumnGroup/ColumnGroup.vue +27 -0
- package/src/components/ColumnGroup/ColumnGroupRow.vue +18 -0
- package/src/components/CommandPalette/CommandPalette.scss +143 -0
- package/src/components/CommandPalette/CommandPalette.vue +165 -0
- package/src/components/ConfirmDialog/ConfirmDialog.scss +177 -0
- package/src/components/ConfirmDialog/ConfirmDialog.vue +162 -0
- package/src/components/ConfirmPopup/ConfirmPopup.scss +180 -0
- package/src/components/ConfirmPopup/ConfirmPopup.vue +185 -0
- package/src/components/ContextMenu/ContextMenu.scss +171 -0
- package/src/components/ContextMenu/ContextMenu.vue +383 -0
- package/src/components/DataTable/DataTable.scss +162 -0
- package/src/components/DataTable/DataTable.vue +225 -0
- package/src/components/DataView/DataView.scss +149 -0
- package/src/components/DataView/DataView.vue +172 -0
- package/src/components/DatePicker/DatePicker.scss +71 -0
- package/src/components/DatePicker/DatePicker.vue +121 -0
- package/src/components/Dialog/Dialog.scss +161 -0
- package/src/components/Dialog/Dialog.vue +245 -0
- package/src/components/Divider/Divider.scss +147 -0
- package/src/components/Divider/Divider.vue +49 -0
- package/src/components/Dock/Dock.scss +221 -0
- package/src/components/Dock/Dock.vue +107 -0
- package/src/components/Drawer/Drawer.scss +220 -0
- package/src/components/Drawer/Drawer.vue +137 -0
- package/src/components/Dropdown/Dropdown.scss +218 -0
- package/src/components/Dropdown/Dropdown.vue +313 -0
- package/src/components/Editor/Editor.scss +156 -0
- package/src/components/Editor/Editor.vue +253 -0
- package/src/components/FAQ/FAQ.scss +24 -0
- package/src/components/FAQ/FAQ.vue +28 -0
- package/src/components/FeatureGrid/FeatureGrid.scss +92 -0
- package/src/components/FeatureGrid/FeatureGrid.vue +39 -0
- package/src/components/FieldSet/FieldSet.scss +97 -0
- package/src/components/FieldSet/FieldSet.vue +70 -0
- package/src/components/FileUpload/FileUpload.scss +137 -0
- package/src/components/FileUpload/FileUpload.vue +183 -0
- package/src/components/Footer/Footer.scss +95 -0
- package/src/components/Footer/Footer.vue +59 -0
- package/src/components/Form/Form.scss +72 -0
- package/src/components/Form/Form.vue +30 -0
- package/src/components/Form/FormField.vue +42 -0
- package/src/components/Galleria/Galleria.scss +295 -0
- package/src/components/Galleria/Galleria.vue +274 -0
- package/src/components/Hero/Hero.scss +116 -0
- package/src/components/Hero/Hero.vue +57 -0
- package/src/components/Image/Image.scss +129 -0
- package/src/components/Image/Image.vue +117 -0
- package/src/components/ImageCompare/ImageCompare.scss +97 -0
- package/src/components/ImageCompare/ImageCompare.vue +66 -0
- package/src/components/InPlace/InPlace.scss +97 -0
- package/src/components/InPlace/InPlace.vue +107 -0
- package/src/components/InlineMessage/InlineMessage.scss +69 -0
- package/src/components/InlineMessage/InlineMessage.vue +47 -0
- package/src/components/InputChips/InputChips.scss +165 -0
- package/src/components/InputChips/InputChips.vue +169 -0
- package/src/components/InputGroup/InputGroup.scss +57 -0
- package/src/components/InputGroup/InputGroup.vue +22 -0
- package/src/components/InputGroupAddon/InputGroupAddon.scss +28 -0
- package/src/components/InputGroupAddon/InputGroupAddon.vue +22 -0
- package/src/components/InputIcon/InputIcon.scss +58 -0
- package/src/components/InputIcon/InputIcon.vue +28 -0
- package/src/components/InputMask/InputMask.scss +65 -0
- package/src/components/InputMask/InputMask.vue +268 -0
- package/src/components/InputNumber/InputNumber.scss +122 -0
- package/src/components/InputNumber/InputNumber.vue +150 -0
- package/src/components/InputOtp/InputOtp.scss +88 -0
- package/src/components/InputOtp/InputOtp.vue +230 -0
- package/src/components/InputSwitch/InputSwitch.scss +131 -0
- package/src/components/InputSwitch/InputSwitch.vue +49 -0
- package/src/components/InputText/InputText.scss +61 -0
- package/src/components/InputText/InputText.vue +71 -0
- package/src/components/Knob/Knob.scss +92 -0
- package/src/components/Knob/Knob.vue +252 -0
- package/src/components/ListBox/ListBox.scss +152 -0
- package/src/components/ListBox/ListBox.vue +198 -0
- package/src/components/LogoCloud/LogoCloud.scss +64 -0
- package/src/components/LogoCloud/LogoCloud.vue +35 -0
- package/src/components/MegaMenu/MegaMenu.scss +280 -0
- package/src/components/MegaMenu/MegaMenu.vue +218 -0
- package/src/components/Menu/Menu.scss +102 -0
- package/src/components/Menu/Menu.vue +221 -0
- package/src/components/MenuBar/MenuBar.scss +208 -0
- package/src/components/MenuBar/MenuBar.vue +306 -0
- package/src/components/Message/Message.scss +126 -0
- package/src/components/Message/Message.vue +99 -0
- package/src/components/MeterGroup/MeterGroup.scss +105 -0
- package/src/components/MeterGroup/MeterGroup.vue +73 -0
- package/src/components/MultiSelect/MultiSelect.scss +239 -0
- package/src/components/MultiSelect/MultiSelect.vue +296 -0
- package/src/components/OrderList/OrderList.scss +133 -0
- package/src/components/OrderList/OrderList.vue +267 -0
- package/src/components/OrganizationChart/OrganizationChart.scss +145 -0
- package/src/components/OrganizationChart/OrganizationChart.vue +220 -0
- package/src/components/OverlayPanel/OverlayPanel.scss +69 -0
- package/src/components/OverlayPanel/OverlayPanel.vue +180 -0
- package/src/components/Paginator/Paginator.scss +130 -0
- package/src/components/Paginator/Paginator.vue +212 -0
- package/src/components/Panel/Panel.scss +113 -0
- package/src/components/Panel/Panel.vue +89 -0
- package/src/components/PanelMenu/PanelMenu.scss +211 -0
- package/src/components/PanelMenu/PanelMenu.vue +295 -0
- package/src/components/ParticleBackground/ParticleBackground.vue +310 -0
- package/src/components/PickList/PickList.scss +126 -0
- package/src/components/PickList/PickList.vue +249 -0
- package/src/components/PopOver/PopOver.scss +112 -0
- package/src/components/PopOver/PopOver.vue +254 -0
- package/src/components/PricingTable/PricingCard.vue +33 -0
- package/src/components/PricingTable/PricingTable.scss +133 -0
- package/src/components/PricingTable/PricingTable.vue +21 -0
- package/src/components/ProgressBar/ProgressBar.scss +58 -0
- package/src/components/ProgressBar/ProgressBar.vue +48 -0
- package/src/components/ProgressSpinner/ProgressSpinner.scss +48 -0
- package/src/components/ProgressSpinner/ProgressSpinner.vue +53 -0
- package/src/components/RadioButton/RadioButton.scss +148 -0
- package/src/components/RadioButton/RadioButton.vue +52 -0
- package/src/components/Rating/Rating.scss +109 -0
- package/src/components/Rating/Rating.vue +136 -0
- package/src/components/Row/Row.scss +38 -0
- package/src/components/Row/Row.vue +30 -0
- package/src/components/ScrollPanel/ScrollPanel.scss +90 -0
- package/src/components/ScrollPanel/ScrollPanel.vue +284 -0
- package/src/components/ScrollTop/ScrollTop.scss +59 -0
- package/src/components/ScrollTop/ScrollTop.vue +99 -0
- package/src/components/Section/Section.scss +58 -0
- package/src/components/Section/Section.vue +39 -0
- package/src/components/Select/Select.scss +98 -0
- package/src/components/Select/Select.vue +92 -0
- package/src/components/SelectButton/SelectButton.scss +65 -0
- package/src/components/SelectButton/SelectButton.vue +144 -0
- package/src/components/Sidebar/Sidebar.scss +170 -0
- package/src/components/Sidebar/Sidebar.vue +137 -0
- package/src/components/Skeleton/Skeleton.scss +43 -0
- package/src/components/Skeleton/Skeleton.vue +57 -0
- package/src/components/Slider/Slider.scss +103 -0
- package/src/components/Slider/Slider.vue +65 -0
- package/src/components/SpeedDial/SpeedDial.scss +217 -0
- package/src/components/SpeedDial/SpeedDial.vue +196 -0
- package/src/components/SplitButton/SplitButton.scss +264 -0
- package/src/components/SplitButton/SplitButton.vue +172 -0
- package/src/components/Splitter/Splitter.scss +95 -0
- package/src/components/Splitter/Splitter.vue +191 -0
- package/src/components/Splitter/SplitterPanel.vue +125 -0
- package/src/components/Stats/Stats.scss +54 -0
- package/src/components/Stats/Stats.vue +28 -0
- package/src/components/Steps/Steps.scss +164 -0
- package/src/components/Steps/Steps.vue +100 -0
- package/src/components/TabMenu/TabMenu.scss +106 -0
- package/src/components/TabMenu/TabMenu.vue +174 -0
- package/src/components/Tabs/TabPanel.vue +41 -0
- package/src/components/Tabs/Tabs.scss +82 -0
- package/src/components/Tabs/Tabs.vue +162 -0
- package/src/components/Tag/Tag.scss +73 -0
- package/src/components/Tag/Tag.vue +37 -0
- package/src/components/Terminal/Terminal.scss +80 -0
- package/src/components/Terminal/Terminal.vue +113 -0
- package/src/components/Testimonial/Testimonial.scss +80 -0
- package/src/components/Testimonial/Testimonial.vue +29 -0
- package/src/components/Textarea/Textarea.scss +65 -0
- package/src/components/Textarea/Textarea.vue +101 -0
- package/src/components/TieredMenu/TieredMenu.scss +146 -0
- package/src/components/TieredMenu/TieredMenu.vue +270 -0
- package/src/components/TieredMenu/TieredMenuSub.vue +132 -0
- package/src/components/Timeline/Timeline.scss +190 -0
- package/src/components/Timeline/Timeline.vue +79 -0
- package/src/components/Toast/Toast.scss +284 -0
- package/src/components/Toast/Toast.vue +162 -0
- package/src/components/ToggleButton/ToggleButton.scss +99 -0
- package/src/components/ToggleButton/ToggleButton.vue +65 -0
- package/src/components/ToggleSwitch/ToggleSwitch.scss +68 -0
- package/src/components/ToggleSwitch/ToggleSwitch.vue +44 -0
- package/src/components/Toolbar/Toolbar.scss +37 -0
- package/src/components/Toolbar/Toolbar.vue +23 -0
- package/src/components/Tooltip/Tooltip.scss +114 -0
- package/src/components/Tooltip/Tooltip.vue +169 -0
- package/src/components/Tree/Tree.scss +164 -0
- package/src/components/Tree/Tree.vue +273 -0
- package/src/components/TreeSelect/TreeSelect.scss +238 -0
- package/src/components/TreeSelect/TreeSelect.vue +401 -0
- package/src/components/TreeTable/TreeTable.scss +172 -0
- package/src/components/TreeTable/TreeTable.vue +285 -0
- package/src/components/VirtualScroller/VirtualScroller.scss +107 -0
- package/src/components/VirtualScroller/VirtualScroller.vue +234 -0
- package/src/scss/fonts.scss +63 -0
- package/src/scss/mixins/accent-gradient.scss +43 -0
- package/src/scss/mixins/border.scss +28 -0
- package/src/scss/mixins/breakpoint.scss +80 -0
- package/src/scss/mixins/container.scss +33 -0
- package/src/scss/mixins/elevation.scss +43 -0
- package/src/scss/mixins/grid.scss +23 -0
- package/src/scss/mixins/levitation.scss +15 -0
- package/src/scss/mixins/list.scss +5 -0
- package/src/scss/mixins/surface-atmospheric.scss +93 -0
- package/src/scss/mixins/surface.scss +19 -0
- package/src/scss/mixins/typography.scss +91 -0
- package/src/scss/utility-classes/utility-classes-spacing.scss +34 -0
- package/src/scss/utility-classes/utility-classes-typography.scss +114 -0
- package/tokens/components/accordion.json +127 -0
- package/tokens/components/autocomplete.json +238 -0
- package/tokens/components/avatar.json +220 -0
- package/tokens/components/badge.json +119 -0
- package/tokens/components/block-ui.json +40 -0
- package/tokens/components/breadcrumb.json +57 -0
- package/tokens/components/button.json +395 -0
- package/tokens/components/calendar.json +260 -0
- package/tokens/components/card.json +157 -0
- package/tokens/components/carousel.json +154 -0
- package/tokens/components/chart.json +132 -0
- package/tokens/components/checkbox.json +130 -0
- package/tokens/components/chip.json +100 -0
- package/tokens/components/color-picker.json +196 -0
- package/tokens/components/column-group.json +45 -0
- package/tokens/components/column.json +109 -0
- package/tokens/components/confirm-dialog.json +141 -0
- package/tokens/components/confirm-popup.json +101 -0
- package/tokens/components/context-menu.json +168 -0
- package/tokens/components/data-table.json +157 -0
- package/tokens/components/data-view.json +172 -0
- package/tokens/components/dialog.json +151 -0
- package/tokens/components/divider.json +45 -0
- package/tokens/components/dock.json +173 -0
- package/tokens/components/drawer.json +163 -0
- package/tokens/components/dropdown.json +230 -0
- package/tokens/components/editor.json +170 -0
- package/tokens/components/field-set.json +115 -0
- package/tokens/components/file-upload.json +193 -0
- package/tokens/components/galleria.json +235 -0
- package/tokens/components/image-compare.json +74 -0
- package/tokens/components/image.json +71 -0
- package/tokens/components/in-place.json +100 -0
- package/tokens/components/inline-message.json +107 -0
- package/tokens/components/input-chips.json +187 -0
- package/tokens/components/input-group-addon.json +47 -0
- package/tokens/components/input-group.json +21 -0
- package/tokens/components/input-icon.json +38 -0
- package/tokens/components/input-mask.json +136 -0
- package/tokens/components/input-number.json +144 -0
- package/tokens/components/input-otp.json +138 -0
- package/tokens/components/input-switch.json +108 -0
- package/tokens/components/input-text.json +136 -0
- package/tokens/components/knob.json +119 -0
- package/tokens/components/listbox.json +166 -0
- package/tokens/components/mega-menu.json +283 -0
- package/tokens/components/menu.json +145 -0
- package/tokens/components/menubar.json +152 -0
- package/tokens/components/message.json +151 -0
- package/tokens/components/meter-group.json +108 -0
- package/tokens/components/multi-select.json +244 -0
- package/tokens/components/order-list.json +193 -0
- package/tokens/components/organization-chart.json +188 -0
- package/tokens/components/overlay-panel.json +94 -0
- package/tokens/components/paginator.json +186 -0
- package/tokens/components/panel.json +120 -0
- package/tokens/components/panelmenu.json +190 -0
- package/tokens/components/picklist.json +187 -0
- package/tokens/components/popover.json +65 -0
- package/tokens/components/progress-bar.json +33 -0
- package/tokens/components/progress-spinner.json +38 -0
- package/tokens/components/radio.json +125 -0
- package/tokens/components/rating.json +76 -0
- package/tokens/components/row.json +62 -0
- package/tokens/components/scroll-panel.json +69 -0
- package/tokens/components/scroll-top.json +84 -0
- package/tokens/components/select-button.json +145 -0
- package/tokens/components/select.json +190 -0
- package/tokens/components/sidebar.json +146 -0
- package/tokens/components/skeleton.json +26 -0
- package/tokens/components/slider.json +82 -0
- package/tokens/components/speed-dial.json +144 -0
- package/tokens/components/split-button.json +316 -0
- package/tokens/components/splitter.json +88 -0
- package/tokens/components/steps.json +154 -0
- package/tokens/components/tabmenu.json +103 -0
- package/tokens/components/tabs.json +97 -0
- package/tokens/components/tag.json +122 -0
- package/tokens/components/terminal.json +100 -0
- package/tokens/components/textarea.json +96 -0
- package/tokens/components/tieredmenu.json +142 -0
- package/tokens/components/timeline.json +129 -0
- package/tokens/components/toast.json +281 -0
- package/tokens/components/toggle-button.json +220 -0
- package/tokens/components/toggle-switch.json +95 -0
- package/tokens/components/toolbar.json +41 -0
- package/tokens/components/tooltip.json +60 -0
- package/tokens/components/tree-select.json +224 -0
- package/tokens/components/tree.json +153 -0
- package/tokens/components/treetable.json +155 -0
- package/tokens/components/virtualscroller.json +95 -0
- package/tokens/primitives/color.json +137 -0
- package/tokens/primitives/radius.json +12 -0
- package/tokens/primitives/shadow.json +29 -0
- package/tokens/primitives/spacing.json +15 -0
- package/tokens/semantics/color.json +81 -0
- package/tokens/semantics/radius.json +10 -0
- package/tokens/semantics/shadow.json +9 -0
- package/tokens/semantics/spacing.json +24 -0
- package/tokens/themes/dark.json +7 -0
- package/tokens/themes/light.json +7 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="carousel" :class="additionalClasses" role="region" aria-roledescription="carousel" :aria-label="ariaLabel || 'Carousel'" @keydown="onKeydown">
|
|
3
|
+
<div class="carousel__container">
|
|
4
|
+
<!-- Previous button -->
|
|
5
|
+
<button
|
|
6
|
+
v-if="showNavigators"
|
|
7
|
+
type="button"
|
|
8
|
+
class="carousel__navigator carousel__navigator--prev"
|
|
9
|
+
:disabled="!circular && currentIndex === 0"
|
|
10
|
+
aria-label="Previous slide"
|
|
11
|
+
@click="prev"
|
|
12
|
+
>
|
|
13
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
14
|
+
<polyline points="15 18 9 12 15 6" />
|
|
15
|
+
</svg>
|
|
16
|
+
</button>
|
|
17
|
+
|
|
18
|
+
<!-- Slides container -->
|
|
19
|
+
<div class="carousel__viewport" ref="viewportRef">
|
|
20
|
+
<div
|
|
21
|
+
class="carousel__track"
|
|
22
|
+
:style="trackStyle"
|
|
23
|
+
>
|
|
24
|
+
<div
|
|
25
|
+
v-for="(item, index) in items"
|
|
26
|
+
:key="index"
|
|
27
|
+
class="carousel__item"
|
|
28
|
+
:class="{ 'carousel__item--active': index === currentIndex }"
|
|
29
|
+
role="group"
|
|
30
|
+
:aria-roledescription="'slide'"
|
|
31
|
+
:aria-label="`Slide ${index + 1} of ${items.length}`"
|
|
32
|
+
>
|
|
33
|
+
<slot name="item" :data="item" :index="index">
|
|
34
|
+
{{ item }}
|
|
35
|
+
</slot>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<!-- Next button -->
|
|
41
|
+
<button
|
|
42
|
+
v-if="showNavigators"
|
|
43
|
+
type="button"
|
|
44
|
+
class="carousel__navigator carousel__navigator--next"
|
|
45
|
+
:disabled="!circular && currentIndex === items.length - 1"
|
|
46
|
+
aria-label="Next slide"
|
|
47
|
+
@click="next"
|
|
48
|
+
>
|
|
49
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
50
|
+
<polyline points="9 18 15 12 9 6" />
|
|
51
|
+
</svg>
|
|
52
|
+
</button>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<!-- Indicators -->
|
|
56
|
+
<div v-if="showIndicators && items.length > 1" class="carousel__indicators">
|
|
57
|
+
<button
|
|
58
|
+
v-for="(_, index) in items"
|
|
59
|
+
:key="index"
|
|
60
|
+
type="button"
|
|
61
|
+
class="carousel__indicator"
|
|
62
|
+
:class="{ 'carousel__indicator--active': index === currentIndex }"
|
|
63
|
+
:aria-label="`Go to slide ${index + 1}`"
|
|
64
|
+
:aria-current="index === currentIndex ? 'true' : undefined"
|
|
65
|
+
@click="goTo(index)"
|
|
66
|
+
/>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<style src="./Carousel.scss"></style>
|
|
72
|
+
|
|
73
|
+
<script setup lang="ts">
|
|
74
|
+
import type { CarouselProps, CarouselEmits } from '../../types';
|
|
75
|
+
import { computed, ref, watch, onMounted, onUnmounted } from "vue";
|
|
76
|
+
|
|
77
|
+
defineOptions({ name: 'FtpCarousel' });
|
|
78
|
+
|
|
79
|
+
const props = withDefaults(defineProps<CarouselProps>(), {
|
|
80
|
+
items: () => [],
|
|
81
|
+
numVisible: 1,
|
|
82
|
+
numScroll: 1,
|
|
83
|
+
circular: false,
|
|
84
|
+
autoplay: false,
|
|
85
|
+
autoplayInterval: 3000,
|
|
86
|
+
showNavigators: true,
|
|
87
|
+
showIndicators: true,
|
|
88
|
+
orientation: "horizontal",
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
const emit = defineEmits(["update:page"]);
|
|
92
|
+
|
|
93
|
+
const viewportRef = ref(null);
|
|
94
|
+
const currentIndex = ref(0);
|
|
95
|
+
const autoplayTimer = ref<ReturnType<typeof setInterval> | null>(null);
|
|
96
|
+
|
|
97
|
+
const additionalClasses = computed(() =>
|
|
98
|
+
[
|
|
99
|
+
`carousel--orientation-${props.orientation}`,
|
|
100
|
+
props.autoplay && "carousel--autoplay",
|
|
101
|
+
]
|
|
102
|
+
.filter(Boolean)
|
|
103
|
+
.join(" ")
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
const trackStyle = computed(() => {
|
|
107
|
+
const translateValue = -(currentIndex.value * (100 / props.numVisible));
|
|
108
|
+
return {
|
|
109
|
+
transform: props.orientation === "horizontal"
|
|
110
|
+
? `translateX(${translateValue}%)`
|
|
111
|
+
: `translateY(${translateValue}%)`,
|
|
112
|
+
};
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
const prev = () => {
|
|
116
|
+
if (currentIndex.value > 0) {
|
|
117
|
+
currentIndex.value -= props.numScroll;
|
|
118
|
+
} else if (props.circular) {
|
|
119
|
+
currentIndex.value = props.items.length - 1;
|
|
120
|
+
}
|
|
121
|
+
emit("update:page", currentIndex.value);
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const next = () => {
|
|
125
|
+
if (currentIndex.value < props.items.length - 1) {
|
|
126
|
+
currentIndex.value += props.numScroll;
|
|
127
|
+
if (currentIndex.value >= props.items.length) {
|
|
128
|
+
currentIndex.value = props.items.length - 1;
|
|
129
|
+
}
|
|
130
|
+
} else if (props.circular) {
|
|
131
|
+
currentIndex.value = 0;
|
|
132
|
+
}
|
|
133
|
+
emit("update:page", currentIndex.value);
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
const goTo = (index: any) => {
|
|
137
|
+
currentIndex.value = index;
|
|
138
|
+
emit("update:page", currentIndex.value);
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const startAutoplay = () => {
|
|
142
|
+
if (props.autoplay && props.items.length > 1) {
|
|
143
|
+
autoplayTimer.value = setInterval(() => {
|
|
144
|
+
next();
|
|
145
|
+
}, props.autoplayInterval);
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
const onKeydown = (event: KeyboardEvent) => {
|
|
150
|
+
switch (event.key) {
|
|
151
|
+
case "ArrowLeft":
|
|
152
|
+
event.preventDefault();
|
|
153
|
+
prev();
|
|
154
|
+
break;
|
|
155
|
+
case "ArrowRight":
|
|
156
|
+
event.preventDefault();
|
|
157
|
+
next();
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
const stopAutoplay = () => {
|
|
163
|
+
if (autoplayTimer.value) {
|
|
164
|
+
clearInterval(autoplayTimer.value);
|
|
165
|
+
autoplayTimer.value = null;
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
watch(() => props.autoplay, (newValue) => {
|
|
170
|
+
if (newValue) {
|
|
171
|
+
startAutoplay();
|
|
172
|
+
} else {
|
|
173
|
+
stopAutoplay();
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
onMounted(() => {
|
|
178
|
+
startAutoplay();
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
onUnmounted(() => {
|
|
182
|
+
stopAutoplay();
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
defineExpose({
|
|
186
|
+
prev,
|
|
187
|
+
next,
|
|
188
|
+
goTo,
|
|
189
|
+
currentIndex,
|
|
190
|
+
});
|
|
191
|
+
</script>
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
@use "../../../dist/scss/tokens" as *;
|
|
2
|
+
|
|
3
|
+
$c: chart;
|
|
4
|
+
|
|
5
|
+
.#{$c} {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
background: var(--chart-container-background, $chart-container-background);
|
|
9
|
+
padding: var(--chart-container-padding, $chart-container-padding);
|
|
10
|
+
border-radius: var(--chart-container-radius, $chart-container-radius);
|
|
11
|
+
border: var(--chart-container-border-width, $chart-container-border-width) solid
|
|
12
|
+
var(--chart-container-border-color, $chart-container-border-color);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.#{$c}__title {
|
|
16
|
+
color: var(--chart-title-color, $chart-title-color);
|
|
17
|
+
font-size: var(--chart-title-size, $chart-title-size);
|
|
18
|
+
font-weight: var(--chart-title-weight, $chart-title-weight);
|
|
19
|
+
margin-bottom: var(--chart-title-marginBottom, $chart-title-marginBottom);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.#{$c}__wrapper {
|
|
23
|
+
position: relative;
|
|
24
|
+
flex: 1;
|
|
25
|
+
min-height: var(--chart-canvas-minHeight, $chart-canvas-minHeight);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.#{$c}__canvas {
|
|
29
|
+
width: 100%;
|
|
30
|
+
height: 100%;
|
|
31
|
+
|
|
32
|
+
canvas {
|
|
33
|
+
max-width: 100%;
|
|
34
|
+
max-height: 100%;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Loading state
|
|
39
|
+
.#{$c}__loading {
|
|
40
|
+
position: absolute;
|
|
41
|
+
inset: 0;
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
background: var(--chart-loading-background, $chart-loading-background);
|
|
46
|
+
border-radius: inherit;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.#{$c}__spinner {
|
|
50
|
+
width: var(--chart-loading-spinnerSize, $chart-loading-spinnerSize);
|
|
51
|
+
height: var(--chart-loading-spinnerSize, $chart-loading-spinnerSize);
|
|
52
|
+
color: var(--chart-loading-spinnerColor, $chart-loading-spinnerColor);
|
|
53
|
+
animation: chart-spin 1s linear infinite;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@keyframes chart-spin {
|
|
57
|
+
from {
|
|
58
|
+
transform: rotate(0deg);
|
|
59
|
+
}
|
|
60
|
+
to {
|
|
61
|
+
transform: rotate(360deg);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Empty state
|
|
66
|
+
.#{$c}__empty {
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
align-items: center;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
gap: 12px;
|
|
72
|
+
height: 100%;
|
|
73
|
+
min-height: var(--chart-canvas-minHeight, $chart-canvas-minHeight);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.#{$c}__empty-icon {
|
|
77
|
+
width: var(--chart-empty-iconSize, $chart-empty-iconSize);
|
|
78
|
+
height: var(--chart-empty-iconSize, $chart-empty-iconSize);
|
|
79
|
+
color: var(--chart-empty-iconColor, $chart-empty-iconColor);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.#{$c}__empty-text {
|
|
83
|
+
font-size: 14px;
|
|
84
|
+
color: var(--chart-empty-textColor, $chart-empty-textColor);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Legend
|
|
88
|
+
.#{$c}__legend {
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-wrap: wrap;
|
|
91
|
+
gap: var(--chart-legend-gap, $chart-legend-gap);
|
|
92
|
+
margin-top: 16px;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Legend item helper classes (for custom legend slot content)
|
|
97
|
+
.#{$c}__legend-item {
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
gap: var(--chart-legend-item-gap, $chart-legend-item-gap);
|
|
101
|
+
font-size: var(--chart-legend-item-size, $chart-legend-item-size);
|
|
102
|
+
color: var(--chart-legend-item-color, $chart-legend-item-color);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.#{$c}__legend-marker {
|
|
106
|
+
width: var(--chart-legend-marker-size, $chart-legend-marker-size);
|
|
107
|
+
height: var(--chart-legend-marker-size, $chart-legend-marker-size);
|
|
108
|
+
border-radius: var(--chart-legend-marker-radius, $chart-legend-marker-radius);
|
|
109
|
+
}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="chart" :class="additionalClasses">
|
|
3
|
+
<div v-if="title" class="chart__title">{{ title }}</div>
|
|
4
|
+
|
|
5
|
+
<div class="chart__wrapper" :style="wrapperStyle">
|
|
6
|
+
<!-- Loading state -->
|
|
7
|
+
<div v-if="isLoading" class="chart__loading">
|
|
8
|
+
<svg class="chart__spinner" viewBox="0 0 24 24" fill="none">
|
|
9
|
+
<circle
|
|
10
|
+
cx="12"
|
|
11
|
+
cy="12"
|
|
12
|
+
r="10"
|
|
13
|
+
stroke="currentColor"
|
|
14
|
+
stroke-width="3"
|
|
15
|
+
stroke-linecap="round"
|
|
16
|
+
stroke-dasharray="31.4 31.4"
|
|
17
|
+
/>
|
|
18
|
+
</svg>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<!-- Empty state -->
|
|
22
|
+
<div v-else-if="!hasData" class="chart__empty">
|
|
23
|
+
<svg class="chart__empty-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
24
|
+
<path d="M3 3v18h18" />
|
|
25
|
+
<path d="M18 17V9" />
|
|
26
|
+
<path d="M13 17V5" />
|
|
27
|
+
<path d="M8 17v-3" />
|
|
28
|
+
</svg>
|
|
29
|
+
<span class="chart__empty-text">
|
|
30
|
+
<slot name="empty">No data available</slot>
|
|
31
|
+
</span>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<!-- Chart canvas -->
|
|
35
|
+
<canvas
|
|
36
|
+
v-else
|
|
37
|
+
ref="canvasRef"
|
|
38
|
+
class="chart__canvas"
|
|
39
|
+
@click="onCanvasClick"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<style src="./Chart.scss"></style>
|
|
46
|
+
|
|
47
|
+
<script setup lang="ts">
|
|
48
|
+
import type { ChartProps, ChartEmits } from '../../types';
|
|
49
|
+
import { computed, ref, watch, onMounted, onUnmounted, nextTick } from "vue";
|
|
50
|
+
|
|
51
|
+
defineOptions({ name: 'FtpChart' });
|
|
52
|
+
|
|
53
|
+
const emit = defineEmits(["select", "loaded"]);
|
|
54
|
+
|
|
55
|
+
const props = withDefaults(defineProps<ChartProps>(), {
|
|
56
|
+
type: "bar",
|
|
57
|
+
data: null,
|
|
58
|
+
options: null,
|
|
59
|
+
plugins: () => [],
|
|
60
|
+
title: null,
|
|
61
|
+
isLoading: false,
|
|
62
|
+
width: null,
|
|
63
|
+
height: null,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const canvasRef = ref(null);
|
|
67
|
+
let chartInstance: any = null;
|
|
68
|
+
let ChartJS: any = null;
|
|
69
|
+
|
|
70
|
+
const additionalClasses = computed(() =>
|
|
71
|
+
[
|
|
72
|
+
`chart--type-${props.type}`,
|
|
73
|
+
props.isLoading && "chart--loading",
|
|
74
|
+
]
|
|
75
|
+
.filter(Boolean)
|
|
76
|
+
.join(" ")
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
const hasData = computed(() => {
|
|
80
|
+
if (!props.data) return false;
|
|
81
|
+
if ((props.data as any).datasets) {
|
|
82
|
+
return (props.data as any).datasets.some((ds: any) => ds.data && ds.data.length > 0);
|
|
83
|
+
}
|
|
84
|
+
return Object.keys(props.data).length > 0;
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
const wrapperStyle = computed(() => {
|
|
88
|
+
const style: Record<string, string> = {};
|
|
89
|
+
if (props.width) {
|
|
90
|
+
style.width = typeof props.width === "number" ? `${props.width}px` : props.width;
|
|
91
|
+
}
|
|
92
|
+
if (props.height) {
|
|
93
|
+
style.height = typeof props.height === "number" ? `${props.height}px` : props.height;
|
|
94
|
+
}
|
|
95
|
+
return style;
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
async function initChart() {
|
|
99
|
+
if (!canvasRef.value || !hasData.value) return;
|
|
100
|
+
|
|
101
|
+
// Dynamically import Chart.js
|
|
102
|
+
if (!ChartJS) {
|
|
103
|
+
try {
|
|
104
|
+
const module = await import("chart.js/auto");
|
|
105
|
+
ChartJS = module.default || module.Chart;
|
|
106
|
+
} catch (e) {
|
|
107
|
+
console.error("Chart.js is required. Install it with: npm install chart.js");
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Destroy existing chart if any
|
|
113
|
+
destroyChart();
|
|
114
|
+
|
|
115
|
+
// Create new chart
|
|
116
|
+
chartInstance = new ChartJS(canvasRef.value, {
|
|
117
|
+
type: props.type,
|
|
118
|
+
data: props.data,
|
|
119
|
+
options: props.options || {},
|
|
120
|
+
plugins: props.plugins,
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
emit("loaded", chartInstance);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function destroyChart() {
|
|
127
|
+
if (chartInstance) {
|
|
128
|
+
chartInstance.destroy();
|
|
129
|
+
chartInstance = null;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function onCanvasClick(event: MouseEvent) {
|
|
134
|
+
if (!chartInstance) return;
|
|
135
|
+
|
|
136
|
+
const elements = chartInstance.getElementsAtEventForMode(
|
|
137
|
+
event,
|
|
138
|
+
"nearest",
|
|
139
|
+
{ intersect: true },
|
|
140
|
+
false
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
if (elements.length > 0) {
|
|
144
|
+
const { datasetIndex, index } = elements[0];
|
|
145
|
+
emit("select", {
|
|
146
|
+
originalEvent: event,
|
|
147
|
+
element: elements[0],
|
|
148
|
+
dataset: chartInstance.data.datasets[datasetIndex],
|
|
149
|
+
datasetIndex,
|
|
150
|
+
index,
|
|
151
|
+
value: chartInstance.data.datasets[datasetIndex].data[index],
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Refresh chart data
|
|
158
|
+
*/
|
|
159
|
+
function refresh() {
|
|
160
|
+
if (chartInstance) {
|
|
161
|
+
chartInstance.update();
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Reinitialize the chart
|
|
167
|
+
*/
|
|
168
|
+
function reinit() {
|
|
169
|
+
destroyChart();
|
|
170
|
+
nextTick(() => initChart());
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Get the Chart.js instance
|
|
175
|
+
*/
|
|
176
|
+
function getChart() {
|
|
177
|
+
return chartInstance;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Get chart as base64 image
|
|
182
|
+
*/
|
|
183
|
+
function getBase64Image() {
|
|
184
|
+
return chartInstance ? chartInstance.toBase64Image() : null;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Watch for data/type/options changes
|
|
188
|
+
watch(() => props.data, () => reinit(), { deep: true });
|
|
189
|
+
watch(() => props.type, () => reinit());
|
|
190
|
+
watch(() => props.options, () => reinit(), { deep: true });
|
|
191
|
+
|
|
192
|
+
onMounted(() => {
|
|
193
|
+
if (hasData.value) {
|
|
194
|
+
initChart();
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
onUnmounted(() => {
|
|
199
|
+
destroyChart();
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
// Expose methods
|
|
203
|
+
defineExpose({
|
|
204
|
+
refresh,
|
|
205
|
+
reinit,
|
|
206
|
+
getChart,
|
|
207
|
+
getBase64Image,
|
|
208
|
+
});
|
|
209
|
+
</script>
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
@use "../../../dist/scss/tokens" as *;
|
|
2
|
+
@use "../../scss/mixins/accent-gradient.scss" as *;
|
|
3
|
+
|
|
4
|
+
$c: checkbox;
|
|
5
|
+
|
|
6
|
+
.#{$c} {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: flex-start;
|
|
9
|
+
gap: var(--checkbox-label-gap, $checkbox-label-gap);
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
user-select: none;
|
|
12
|
+
position: relative;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.#{$c}__input {
|
|
16
|
+
position: absolute;
|
|
17
|
+
opacity: 0;
|
|
18
|
+
width: 0;
|
|
19
|
+
height: 0;
|
|
20
|
+
pointer-events: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.#{$c}__box {
|
|
24
|
+
display: inline-flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
flex-shrink: 0;
|
|
28
|
+
background-color: var(--checkbox-background-default, $checkbox-background-default);
|
|
29
|
+
border: var(--checkbox-border-width, $checkbox-border-width) solid var(--checkbox-border-color-default, $checkbox-border-color-default);
|
|
30
|
+
border-radius: var(--checkbox-radius, $checkbox-radius);
|
|
31
|
+
transition: all 0.15s ease;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.#{$c}__icon {
|
|
35
|
+
opacity: 0;
|
|
36
|
+
transform: scale(0.5);
|
|
37
|
+
transition: all 0.15s ease;
|
|
38
|
+
color: var(--checkbox-checkmark-color, $checkbox-checkmark-color);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.#{$c}__label {
|
|
42
|
+
color: var(--checkbox-label-color-default, $checkbox-label-color-default);
|
|
43
|
+
line-height: 1.4;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Hover state
|
|
47
|
+
.#{$c}:hover:not(.#{$c}--disabled) {
|
|
48
|
+
.#{$c}__box {
|
|
49
|
+
border-color: var(--checkbox-border-color-hover, $checkbox-border-color-hover);
|
|
50
|
+
background-color: var(--checkbox-background-hover, $checkbox-background-hover);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Focus state
|
|
55
|
+
.#{$c}__input:focus-visible ~ .#{$c}__box {
|
|
56
|
+
outline: var(--checkbox-focus-ringWidth, $checkbox-focus-ringWidth) solid var(--checkbox-focus-ringColor, $checkbox-focus-ringColor);
|
|
57
|
+
outline-offset: var(--checkbox-focus-ringOffset, $checkbox-focus-ringOffset);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Checked state
|
|
61
|
+
.#{$c}--checked,
|
|
62
|
+
.#{$c}--indeterminate {
|
|
63
|
+
.#{$c}__box {
|
|
64
|
+
@include accent-gradient();
|
|
65
|
+
border-color: var(--accent-gradient-start, $accent-gradient-start);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.#{$c}__icon {
|
|
69
|
+
opacity: 1;
|
|
70
|
+
transform: scale(1);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Disabled state
|
|
75
|
+
.#{$c}--disabled {
|
|
76
|
+
cursor: not-allowed;
|
|
77
|
+
|
|
78
|
+
.#{$c}__box {
|
|
79
|
+
background-color: var(--checkbox-background-disabled, $checkbox-background-disabled);
|
|
80
|
+
border-color: var(--checkbox-border-color-disabled, $checkbox-border-color-disabled);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.#{$c}__label {
|
|
84
|
+
color: var(--checkbox-label-color-disabled, $checkbox-label-color-disabled);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.#{$c}--disabled.#{$c}--checked {
|
|
89
|
+
.#{$c}__box {
|
|
90
|
+
background-color: var(--checkbox-border-color-disabled, $checkbox-border-color-disabled);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Invalid state
|
|
95
|
+
.#{$c}--invalid {
|
|
96
|
+
.#{$c}__box {
|
|
97
|
+
border-color: var(--checkbox-border-color-error, $checkbox-border-color-error);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Sizes
|
|
102
|
+
.#{$c}--size-sm {
|
|
103
|
+
.#{$c}__box {
|
|
104
|
+
width: var(--checkbox-size-sm, $checkbox-size-sm);
|
|
105
|
+
height: var(--checkbox-size-sm, $checkbox-size-sm);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.#{$c}__icon {
|
|
109
|
+
width: var(--checkbox-iconSize-sm, $checkbox-iconSize-sm);
|
|
110
|
+
height: var(--checkbox-iconSize-sm, $checkbox-iconSize-sm);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.#{$c}__label {
|
|
114
|
+
font-size: 14px;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.#{$c}--size-md {
|
|
119
|
+
.#{$c}__box {
|
|
120
|
+
width: var(--checkbox-size-md, $checkbox-size-md);
|
|
121
|
+
height: var(--checkbox-size-md, $checkbox-size-md);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.#{$c}__icon {
|
|
125
|
+
width: var(--checkbox-iconSize-md, $checkbox-iconSize-md);
|
|
126
|
+
height: var(--checkbox-iconSize-md, $checkbox-iconSize-md);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.#{$c}__label {
|
|
130
|
+
font-size: 15px;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.#{$c}--size-lg {
|
|
135
|
+
.#{$c}__box {
|
|
136
|
+
width: var(--checkbox-size-lg, $checkbox-size-lg);
|
|
137
|
+
height: var(--checkbox-size-lg, $checkbox-size-lg);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.#{$c}__icon {
|
|
141
|
+
width: var(--checkbox-iconSize-lg, $checkbox-iconSize-lg);
|
|
142
|
+
height: var(--checkbox-iconSize-lg, $checkbox-iconSize-lg);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.#{$c}__label {
|
|
146
|
+
font-size: 16px;
|
|
147
|
+
}
|
|
148
|
+
}
|