@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,41 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span v-if="!isEmpty" class="badge" :class="additionalClasses" :aria-label="ariaLabel || (value !== null ? `${value}` : undefined)">
|
|
3
|
+
<slot>{{ value }}</slot>
|
|
4
|
+
</span>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<style src="./Badge.scss"></style>
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts">
|
|
10
|
+
import type { BadgeProps } from '../../types';
|
|
11
|
+
import { computed } from "vue";
|
|
12
|
+
|
|
13
|
+
defineOptions({ name: 'FtpBadge' });
|
|
14
|
+
|
|
15
|
+
const props = withDefaults(defineProps<BadgeProps>(), {
|
|
16
|
+
value: null,
|
|
17
|
+
size: "md",
|
|
18
|
+
severity: "primary",
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const slots = defineSlots();
|
|
22
|
+
|
|
23
|
+
const isEmpty = computed(() => {
|
|
24
|
+
return props.value === null && !slots.default;
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const isSingleChar = computed(() => {
|
|
28
|
+
const val = String(props.value ?? "");
|
|
29
|
+
return val.length === 1;
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const additionalClasses = computed(() =>
|
|
33
|
+
[
|
|
34
|
+
`badge--size-${props.size}`,
|
|
35
|
+
`badge--severity-${props.severity}`,
|
|
36
|
+
isSingleChar.value ? "badge--circle" : "",
|
|
37
|
+
]
|
|
38
|
+
.filter(Boolean)
|
|
39
|
+
.join(" ")
|
|
40
|
+
);
|
|
41
|
+
</script>
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
@use "../../../dist/scss/tokens" as *;
|
|
2
|
+
|
|
3
|
+
$c: block-ui;
|
|
4
|
+
|
|
5
|
+
.#{$c} {
|
|
6
|
+
position: relative;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.#{$c}--fullscreen {
|
|
10
|
+
// Container doesn't need special styling for fullscreen
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Overlay
|
|
14
|
+
.#{$c}__overlay {
|
|
15
|
+
position: absolute;
|
|
16
|
+
inset: 0;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
background-color: var(--block-ui-overlay-background, $block-ui-overlay-background);
|
|
21
|
+
z-index: var(--block-ui-overlay-zIndex, $block-ui-overlay-zIndex);
|
|
22
|
+
border-radius: inherit;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.#{$c}__overlay--fullscreen {
|
|
26
|
+
position: fixed;
|
|
27
|
+
border-radius: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Spinner
|
|
31
|
+
.#{$c}__spinner {
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.#{$c}__spinner-icon {
|
|
38
|
+
width: var(--block-ui-spinner-size, $block-ui-spinner-size);
|
|
39
|
+
height: var(--block-ui-spinner-size, $block-ui-spinner-size);
|
|
40
|
+
animation: block-ui-spin 1.5s linear infinite;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.#{$c}__spinner-circle {
|
|
44
|
+
stroke: var(--block-ui-spinner-color, $block-ui-spinner-color);
|
|
45
|
+
stroke-linecap: round;
|
|
46
|
+
stroke-dasharray: 90, 150;
|
|
47
|
+
stroke-dashoffset: 0;
|
|
48
|
+
animation: block-ui-dash 1.5s ease-in-out infinite;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Animations
|
|
52
|
+
@keyframes block-ui-spin {
|
|
53
|
+
0% {
|
|
54
|
+
transform: rotate(0deg);
|
|
55
|
+
}
|
|
56
|
+
100% {
|
|
57
|
+
transform: rotate(360deg);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@keyframes block-ui-dash {
|
|
62
|
+
0% {
|
|
63
|
+
stroke-dasharray: 1, 150;
|
|
64
|
+
stroke-dashoffset: 0;
|
|
65
|
+
}
|
|
66
|
+
50% {
|
|
67
|
+
stroke-dasharray: 90, 150;
|
|
68
|
+
stroke-dashoffset: -35;
|
|
69
|
+
}
|
|
70
|
+
100% {
|
|
71
|
+
stroke-dasharray: 90, 150;
|
|
72
|
+
stroke-dashoffset: -124;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Transition
|
|
77
|
+
.block-ui-fade-enter-active,
|
|
78
|
+
.block-ui-fade-leave-active {
|
|
79
|
+
transition: opacity var(--block-ui-transition-duration, $block-ui-transition-duration) ease;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.block-ui-fade-enter-from,
|
|
83
|
+
.block-ui-fade-leave-to {
|
|
84
|
+
opacity: 0;
|
|
85
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="block-ui"
|
|
4
|
+
:class="additionalClasses"
|
|
5
|
+
>
|
|
6
|
+
<slot></slot>
|
|
7
|
+
<Transition name="block-ui-fade">
|
|
8
|
+
<div
|
|
9
|
+
v-if="blocked"
|
|
10
|
+
class="block-ui__overlay"
|
|
11
|
+
:class="{ 'block-ui__overlay--fullscreen': fullScreen }"
|
|
12
|
+
aria-busy="true"
|
|
13
|
+
aria-live="polite"
|
|
14
|
+
>
|
|
15
|
+
<slot name="spinner">
|
|
16
|
+
<div v-if="showSpinner" class="block-ui__spinner" aria-label="Loading">
|
|
17
|
+
<svg class="block-ui__spinner-icon" viewBox="0 0 50 50">
|
|
18
|
+
<circle
|
|
19
|
+
class="block-ui__spinner-circle"
|
|
20
|
+
cx="25"
|
|
21
|
+
cy="25"
|
|
22
|
+
r="20"
|
|
23
|
+
fill="none"
|
|
24
|
+
stroke-width="4"
|
|
25
|
+
/>
|
|
26
|
+
</svg>
|
|
27
|
+
</div>
|
|
28
|
+
</slot>
|
|
29
|
+
</div>
|
|
30
|
+
</Transition>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<style src="./BlockUI.scss"></style>
|
|
35
|
+
|
|
36
|
+
<script setup lang="ts">
|
|
37
|
+
import type { BlockUIProps, BlockUIEmits } from '../../types';
|
|
38
|
+
import { computed, watch, onMounted, onUnmounted } from "vue";
|
|
39
|
+
|
|
40
|
+
defineOptions({ name: 'FtpBlockUI' });
|
|
41
|
+
|
|
42
|
+
const props = withDefaults(defineProps<BlockUIProps>(), {
|
|
43
|
+
blocked: false,
|
|
44
|
+
fullScreen: false,
|
|
45
|
+
showSpinner: true,
|
|
46
|
+
autoZIndex: true,
|
|
47
|
+
baseZIndex: 1000,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const emit = defineEmits(["block", "unblock"]);
|
|
51
|
+
|
|
52
|
+
const additionalClasses = computed(() => [
|
|
53
|
+
props.blocked && "block-ui--blocked",
|
|
54
|
+
props.fullScreen && "block-ui--fullscreen",
|
|
55
|
+
].filter(Boolean).join(" "));
|
|
56
|
+
|
|
57
|
+
// Block body scroll when fullscreen
|
|
58
|
+
watch(
|
|
59
|
+
() => props.blocked,
|
|
60
|
+
(newValue, oldValue) => {
|
|
61
|
+
if (newValue && !oldValue) {
|
|
62
|
+
emit("block");
|
|
63
|
+
if (props.fullScreen) {
|
|
64
|
+
document.body.style.overflow = "hidden";
|
|
65
|
+
// Blur active element
|
|
66
|
+
if (document.activeElement instanceof HTMLElement) {
|
|
67
|
+
document.activeElement.blur();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
} else if (!newValue && oldValue) {
|
|
71
|
+
emit("unblock");
|
|
72
|
+
if (props.fullScreen) {
|
|
73
|
+
document.body.style.overflow = "";
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
onMounted(() => {
|
|
80
|
+
if (props.blocked && props.fullScreen) {
|
|
81
|
+
document.body.style.overflow = "hidden";
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
onUnmounted(() => {
|
|
86
|
+
if (props.fullScreen) {
|
|
87
|
+
document.body.style.overflow = "";
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
</script>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
@use "../../../dist/scss/tokens" as *;
|
|
2
|
+
|
|
3
|
+
$c: breadcrumb;
|
|
4
|
+
|
|
5
|
+
.#{$c} {
|
|
6
|
+
font-size: var(--breadcrumb-fontSize, $breadcrumb-fontSize);
|
|
7
|
+
line-height: 1.4;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.#{$c}__list {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: var(--breadcrumb-gap, $breadcrumb-gap);
|
|
14
|
+
margin: 0;
|
|
15
|
+
padding: 0;
|
|
16
|
+
list-style: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.#{$c}__item {
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.#{$c}__link {
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: var(--breadcrumb-icon-gap, $breadcrumb-icon-gap);
|
|
28
|
+
color: var(--breadcrumb-link-color-default, $breadcrumb-link-color-default);
|
|
29
|
+
text-decoration: none;
|
|
30
|
+
transition: color 150ms ease;
|
|
31
|
+
|
|
32
|
+
&:hover {
|
|
33
|
+
color: var(--breadcrumb-link-color-hover, $breadcrumb-link-color-hover);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:focus {
|
|
37
|
+
outline: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:focus-visible {
|
|
41
|
+
outline: 2px solid var(--breadcrumb-link-color-hover, $breadcrumb-link-color-hover);
|
|
42
|
+
outline-offset: 2px;
|
|
43
|
+
border-radius: 2px;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.#{$c}__text {
|
|
48
|
+
display: inline-flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: var(--breadcrumb-icon-gap, $breadcrumb-icon-gap);
|
|
51
|
+
color: var(--breadcrumb-link-color-default, $breadcrumb-link-color-default);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.#{$c}__item--current .#{$c}__text {
|
|
55
|
+
color: var(--breadcrumb-link-color-current, $breadcrumb-link-color-current);
|
|
56
|
+
font-weight: 500;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.#{$c}__label {
|
|
60
|
+
white-space: nowrap;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.#{$c}__icon {
|
|
64
|
+
font-size: var(--breadcrumb-icon-size, $breadcrumb-icon-size);
|
|
65
|
+
flex-shrink: 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.#{$c}__home-icon {
|
|
69
|
+
width: var(--breadcrumb-icon-size, $breadcrumb-icon-size);
|
|
70
|
+
height: var(--breadcrumb-icon-size, $breadcrumb-icon-size);
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.#{$c}__separator {
|
|
75
|
+
display: inline-flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
color: var(--breadcrumb-separator-color, $breadcrumb-separator-color);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.#{$c}__separator-icon {
|
|
81
|
+
width: var(--breadcrumb-separator-size, $breadcrumb-separator-size);
|
|
82
|
+
height: var(--breadcrumb-separator-size, $breadcrumb-separator-size);
|
|
83
|
+
flex-shrink: 0;
|
|
84
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nav class="breadcrumb" aria-label="Breadcrumb">
|
|
3
|
+
<ol class="breadcrumb__list">
|
|
4
|
+
<!-- Home item -->
|
|
5
|
+
<li v-if="home" class="breadcrumb__item">
|
|
6
|
+
<a
|
|
7
|
+
v-if="home.url"
|
|
8
|
+
:href="home.url"
|
|
9
|
+
class="breadcrumb__link"
|
|
10
|
+
:aria-label="home.label || 'Home'"
|
|
11
|
+
>
|
|
12
|
+
<i v-if="home.icon" :class="home.icon" class="breadcrumb__icon"></i>
|
|
13
|
+
<svg
|
|
14
|
+
v-else
|
|
15
|
+
class="breadcrumb__home-icon"
|
|
16
|
+
viewBox="0 0 16 16"
|
|
17
|
+
fill="none"
|
|
18
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
19
|
+
aria-hidden="true"
|
|
20
|
+
>
|
|
21
|
+
<path
|
|
22
|
+
d="M2 6.5L8 2L14 6.5V13C14 13.5523 13.5523 14 13 14H3C2.44772 14 2 13.5523 2 13V6.5Z"
|
|
23
|
+
stroke="currentColor"
|
|
24
|
+
stroke-width="1.5"
|
|
25
|
+
stroke-linecap="round"
|
|
26
|
+
stroke-linejoin="round"
|
|
27
|
+
/>
|
|
28
|
+
<path
|
|
29
|
+
d="M6 14V9H10V14"
|
|
30
|
+
stroke="currentColor"
|
|
31
|
+
stroke-width="1.5"
|
|
32
|
+
stroke-linecap="round"
|
|
33
|
+
stroke-linejoin="round"
|
|
34
|
+
/>
|
|
35
|
+
</svg>
|
|
36
|
+
<span v-if="home.label && home.icon" class="breadcrumb__label">{{ home.label }}</span>
|
|
37
|
+
</a>
|
|
38
|
+
<span v-else class="breadcrumb__text">
|
|
39
|
+
<i v-if="home.icon" :class="home.icon" class="breadcrumb__icon"></i>
|
|
40
|
+
<svg
|
|
41
|
+
v-else
|
|
42
|
+
class="breadcrumb__home-icon"
|
|
43
|
+
viewBox="0 0 16 16"
|
|
44
|
+
fill="none"
|
|
45
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
46
|
+
aria-hidden="true"
|
|
47
|
+
>
|
|
48
|
+
<path
|
|
49
|
+
d="M2 6.5L8 2L14 6.5V13C14 13.5523 13.5523 14 13 14H3C2.44772 14 2 13.5523 2 13V6.5Z"
|
|
50
|
+
stroke="currentColor"
|
|
51
|
+
stroke-width="1.5"
|
|
52
|
+
stroke-linecap="round"
|
|
53
|
+
stroke-linejoin="round"
|
|
54
|
+
/>
|
|
55
|
+
<path
|
|
56
|
+
d="M6 14V9H10V14"
|
|
57
|
+
stroke="currentColor"
|
|
58
|
+
stroke-width="1.5"
|
|
59
|
+
stroke-linecap="round"
|
|
60
|
+
stroke-linejoin="round"
|
|
61
|
+
/>
|
|
62
|
+
</svg>
|
|
63
|
+
<span v-if="home.label && home.icon" class="breadcrumb__label">{{ home.label }}</span>
|
|
64
|
+
</span>
|
|
65
|
+
</li>
|
|
66
|
+
|
|
67
|
+
<!-- Separator after home -->
|
|
68
|
+
<li v-if="home && model && model.length > 0" class="breadcrumb__separator" aria-hidden="true">
|
|
69
|
+
<slot name="separator">
|
|
70
|
+
<svg
|
|
71
|
+
class="breadcrumb__separator-icon"
|
|
72
|
+
viewBox="0 0 16 16"
|
|
73
|
+
fill="none"
|
|
74
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
75
|
+
>
|
|
76
|
+
<path
|
|
77
|
+
d="M6 4L10 8L6 12"
|
|
78
|
+
stroke="currentColor"
|
|
79
|
+
stroke-width="1.5"
|
|
80
|
+
stroke-linecap="round"
|
|
81
|
+
stroke-linejoin="round"
|
|
82
|
+
/>
|
|
83
|
+
</svg>
|
|
84
|
+
</slot>
|
|
85
|
+
</li>
|
|
86
|
+
|
|
87
|
+
<!-- Model items -->
|
|
88
|
+
<template v-for="(item, index) in model" :key="index">
|
|
89
|
+
<li
|
|
90
|
+
class="breadcrumb__item"
|
|
91
|
+
:class="{ 'breadcrumb__item--current': index === model.length - 1 }"
|
|
92
|
+
>
|
|
93
|
+
<a
|
|
94
|
+
v-if="item.url && index !== model.length - 1"
|
|
95
|
+
:href="item.url"
|
|
96
|
+
class="breadcrumb__link"
|
|
97
|
+
>
|
|
98
|
+
<i v-if="item.icon" :class="item.icon" class="breadcrumb__icon"></i>
|
|
99
|
+
<span class="breadcrumb__label">{{ item.label }}</span>
|
|
100
|
+
</a>
|
|
101
|
+
<span v-else class="breadcrumb__text" :aria-current="index === model.length - 1 ? 'page' : undefined">
|
|
102
|
+
<i v-if="item.icon" :class="item.icon" class="breadcrumb__icon"></i>
|
|
103
|
+
<span class="breadcrumb__label">{{ item.label }}</span>
|
|
104
|
+
</span>
|
|
105
|
+
</li>
|
|
106
|
+
|
|
107
|
+
<!-- Separator (not after last item) -->
|
|
108
|
+
<li v-if="index < model.length - 1" class="breadcrumb__separator" aria-hidden="true">
|
|
109
|
+
<slot name="separator">
|
|
110
|
+
<svg
|
|
111
|
+
class="breadcrumb__separator-icon"
|
|
112
|
+
viewBox="0 0 16 16"
|
|
113
|
+
fill="none"
|
|
114
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
115
|
+
>
|
|
116
|
+
<path
|
|
117
|
+
d="M6 4L10 8L6 12"
|
|
118
|
+
stroke="currentColor"
|
|
119
|
+
stroke-width="1.5"
|
|
120
|
+
stroke-linecap="round"
|
|
121
|
+
stroke-linejoin="round"
|
|
122
|
+
/>
|
|
123
|
+
</svg>
|
|
124
|
+
</slot>
|
|
125
|
+
</li>
|
|
126
|
+
</template>
|
|
127
|
+
</ol>
|
|
128
|
+
</nav>
|
|
129
|
+
</template>
|
|
130
|
+
|
|
131
|
+
<style src="./Breadcrumb.scss"></style>
|
|
132
|
+
|
|
133
|
+
<script setup lang="ts">
|
|
134
|
+
import type { BreadcrumbProps } from '../../types';
|
|
135
|
+
|
|
136
|
+
defineOptions({ name: 'FtpBreadcrumb' });
|
|
137
|
+
|
|
138
|
+
const props = withDefaults(defineProps<BreadcrumbProps>(), {
|
|
139
|
+
model: () => [],
|
|
140
|
+
});
|
|
141
|
+
</script>
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
@use "../../../dist/scss/tokens" as *;
|
|
2
|
+
@use "../../scss/mixins/accent-gradient.scss" as *;
|
|
3
|
+
|
|
4
|
+
$c: button;
|
|
5
|
+
|
|
6
|
+
.#{$c} {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
border-style: solid;
|
|
11
|
+
border-width: var(--button-border-width, $button-border-width);
|
|
12
|
+
border-radius: var(--button-radius-default, $button-radius-default);
|
|
13
|
+
font-weight: var(--button-fontWeight, $button-fontWeight);
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
user-select: none;
|
|
16
|
+
text-decoration: none;
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
transition:
|
|
19
|
+
background-color var(--button-transition-duration, $button-transition-duration) ease,
|
|
20
|
+
border-color var(--button-transition-duration, $button-transition-duration) ease,
|
|
21
|
+
color var(--button-transition-duration, $button-transition-duration) ease;
|
|
22
|
+
|
|
23
|
+
&:focus-visible {
|
|
24
|
+
outline: var(--button-focus-ringWidth, $button-focus-ringWidth) solid var(--button-focus-ringColor, $button-focus-ringColor);
|
|
25
|
+
outline-offset: var(--button-focus-ringOffset, $button-focus-ringOffset);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.#{$c}__label {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.#{$c}__icon {
|
|
34
|
+
flex-shrink: 0;
|
|
35
|
+
display: inline-flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.#{$c}__spinner {
|
|
41
|
+
display: inline-flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.#{$c}__spinner-icon {
|
|
47
|
+
animation: button-spin 1s linear infinite;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@keyframes button-spin {
|
|
51
|
+
from {
|
|
52
|
+
transform: rotate(0deg);
|
|
53
|
+
}
|
|
54
|
+
to {
|
|
55
|
+
transform: rotate(360deg);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Sizes
|
|
60
|
+
.#{$c}--size-sm {
|
|
61
|
+
height: var(--button-size-sm-height, $button-size-sm-height);
|
|
62
|
+
padding: var(--button-size-sm-paddingY, $button-size-sm-paddingY) var(--button-size-sm-paddingX, $button-size-sm-paddingX);
|
|
63
|
+
font-size: var(--button-size-sm-fontSize, $button-size-sm-fontSize);
|
|
64
|
+
gap: var(--button-size-sm-gap, $button-size-sm-gap);
|
|
65
|
+
|
|
66
|
+
.#{$c}__icon {
|
|
67
|
+
font-size: var(--button-size-sm-iconSize, $button-size-sm-iconSize);
|
|
68
|
+
width: var(--button-size-sm-iconSize, $button-size-sm-iconSize);
|
|
69
|
+
height: var(--button-size-sm-iconSize, $button-size-sm-iconSize);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.#{$c}__spinner-icon {
|
|
73
|
+
width: var(--button-size-sm-iconSize, $button-size-sm-iconSize);
|
|
74
|
+
height: var(--button-size-sm-iconSize, $button-size-sm-iconSize);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.#{$c}--size-md {
|
|
79
|
+
height: var(--button-size-md-height, $button-size-md-height);
|
|
80
|
+
padding: var(--button-size-md-paddingY, $button-size-md-paddingY) var(--button-size-md-paddingX, $button-size-md-paddingX);
|
|
81
|
+
font-size: var(--button-size-md-fontSize, $button-size-md-fontSize);
|
|
82
|
+
gap: var(--button-size-md-gap, $button-size-md-gap);
|
|
83
|
+
|
|
84
|
+
.#{$c}__icon {
|
|
85
|
+
font-size: var(--button-size-md-iconSize, $button-size-md-iconSize);
|
|
86
|
+
width: var(--button-size-md-iconSize, $button-size-md-iconSize);
|
|
87
|
+
height: var(--button-size-md-iconSize, $button-size-md-iconSize);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.#{$c}__spinner-icon {
|
|
91
|
+
width: var(--button-size-md-iconSize, $button-size-md-iconSize);
|
|
92
|
+
height: var(--button-size-md-iconSize, $button-size-md-iconSize);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.#{$c}--size-lg {
|
|
97
|
+
height: var(--button-size-lg-height, $button-size-lg-height);
|
|
98
|
+
padding: var(--button-size-lg-paddingY, $button-size-lg-paddingY) var(--button-size-lg-paddingX, $button-size-lg-paddingX);
|
|
99
|
+
font-size: var(--button-size-lg-fontSize, $button-size-lg-fontSize);
|
|
100
|
+
gap: var(--button-size-lg-gap, $button-size-lg-gap);
|
|
101
|
+
|
|
102
|
+
.#{$c}__icon {
|
|
103
|
+
font-size: var(--button-size-lg-iconSize, $button-size-lg-iconSize);
|
|
104
|
+
width: var(--button-size-lg-iconSize, $button-size-lg-iconSize);
|
|
105
|
+
height: var(--button-size-lg-iconSize, $button-size-lg-iconSize);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.#{$c}__spinner-icon {
|
|
109
|
+
width: var(--button-size-lg-iconSize, $button-size-lg-iconSize);
|
|
110
|
+
height: var(--button-size-lg-iconSize, $button-size-lg-iconSize);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Variants
|
|
115
|
+
.#{$c}--variant-primary {
|
|
116
|
+
@include accent-gradient();
|
|
117
|
+
border-color: transparent;
|
|
118
|
+
color: var(--button-text-primary-default, $button-text-primary-default);
|
|
119
|
+
text-shadow: var(--button-text-primary-shadow, $button-text-primary-shadow);
|
|
120
|
+
|
|
121
|
+
&:hover:not(:disabled) {
|
|
122
|
+
@include accent-gradient("hover");
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&:active:not(:disabled) {
|
|
126
|
+
background: linear-gradient(
|
|
127
|
+
135deg,
|
|
128
|
+
var(--button-background-gradient-activeStart, $button-background-gradient-activeStart),
|
|
129
|
+
var(--button-background-gradient-activeEnd, $button-background-gradient-activeEnd)
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&:disabled,
|
|
134
|
+
&.#{$c}--disabled {
|
|
135
|
+
background: var(--button-background-primary-disabled, $button-background-primary-disabled);
|
|
136
|
+
border-color: var(--button-border-primary-disabled, $button-border-primary-disabled);
|
|
137
|
+
color: var(--button-text-primary-disabled, $button-text-primary-disabled);
|
|
138
|
+
text-shadow: none;
|
|
139
|
+
cursor: not-allowed;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.#{$c}--variant-secondary {
|
|
144
|
+
position: relative;
|
|
145
|
+
background-color: var(--button-background-secondary-default, $button-background-secondary-default);
|
|
146
|
+
border-color: transparent;
|
|
147
|
+
color: var(--button-text-secondary-default, $button-text-secondary-default);
|
|
148
|
+
|
|
149
|
+
// Gradient border via pseudo-element
|
|
150
|
+
&::before {
|
|
151
|
+
content: "";
|
|
152
|
+
position: absolute;
|
|
153
|
+
inset: 0;
|
|
154
|
+
padding: var(--button-border-width, $button-border-width);
|
|
155
|
+
border-radius: inherit;
|
|
156
|
+
background: linear-gradient(
|
|
157
|
+
135deg,
|
|
158
|
+
var(--accent-gradient-start, $accent-gradient-start),
|
|
159
|
+
var(--accent-gradient-end, $accent-gradient-end)
|
|
160
|
+
);
|
|
161
|
+
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
162
|
+
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
163
|
+
-webkit-mask-composite: xor;
|
|
164
|
+
mask-composite: exclude;
|
|
165
|
+
pointer-events: none;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&:hover:not(:disabled) {
|
|
169
|
+
background-color: var(--button-background-secondary-hover, $button-background-secondary-hover);
|
|
170
|
+
|
|
171
|
+
&::before {
|
|
172
|
+
background: linear-gradient(
|
|
173
|
+
135deg,
|
|
174
|
+
var(--accent-gradient-hoverStart, $accent-gradient-hoverStart),
|
|
175
|
+
var(--accent-gradient-hoverEnd, $accent-gradient-hoverEnd)
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
&:active:not(:disabled) {
|
|
181
|
+
background-color: var(--button-background-secondary-active, $button-background-secondary-active);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
&:disabled,
|
|
185
|
+
&.#{$c}--disabled {
|
|
186
|
+
background-color: var(--button-background-secondary-disabled, $button-background-secondary-disabled);
|
|
187
|
+
border-color: var(--button-border-secondary-disabled, $button-border-secondary-disabled);
|
|
188
|
+
color: var(--button-text-secondary-disabled, $button-text-secondary-disabled);
|
|
189
|
+
cursor: not-allowed;
|
|
190
|
+
|
|
191
|
+
&::before {
|
|
192
|
+
display: none;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.#{$c}--variant-outlined {
|
|
198
|
+
background-color: var(--button-background-outlined-default, $button-background-outlined-default);
|
|
199
|
+
border-color: var(--button-border-outlined-default, $button-border-outlined-default);
|
|
200
|
+
color: var(--button-text-outlined-default, $button-text-outlined-default);
|
|
201
|
+
|
|
202
|
+
&:hover:not(:disabled) {
|
|
203
|
+
background-color: var(--button-background-outlined-hover, $button-background-outlined-hover);
|
|
204
|
+
border-color: var(--button-border-outlined-hover, $button-border-outlined-hover);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
&:active:not(:disabled) {
|
|
208
|
+
background-color: var(--button-background-outlined-active, $button-background-outlined-active);
|
|
209
|
+
border-color: var(--button-border-outlined-active, $button-border-outlined-active);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
&:disabled,
|
|
213
|
+
&.#{$c}--disabled {
|
|
214
|
+
background-color: var(--button-background-outlined-disabled, $button-background-outlined-disabled);
|
|
215
|
+
border-color: var(--button-border-outlined-disabled, $button-border-outlined-disabled);
|
|
216
|
+
color: var(--button-text-outlined-disabled, $button-text-outlined-disabled);
|
|
217
|
+
cursor: not-allowed;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.#{$c}--variant-text {
|
|
222
|
+
background-color: var(--button-background-text-default, $button-background-text-default);
|
|
223
|
+
border-color: var(--button-border-text-default, $button-border-text-default);
|
|
224
|
+
color: var(--button-text-text-default, $button-text-text-default);
|
|
225
|
+
|
|
226
|
+
&:hover:not(:disabled) {
|
|
227
|
+
background-color: var(--button-background-text-hover, $button-background-text-hover);
|
|
228
|
+
border-color: var(--button-border-text-hover, $button-border-text-hover);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&:active:not(:disabled) {
|
|
232
|
+
background-color: var(--button-background-text-active, $button-background-text-active);
|
|
233
|
+
border-color: var(--button-border-text-active, $button-border-text-active);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
&:disabled,
|
|
237
|
+
&.#{$c}--disabled {
|
|
238
|
+
background-color: var(--button-background-text-disabled, $button-background-text-disabled);
|
|
239
|
+
border-color: var(--button-border-text-disabled, $button-border-text-disabled);
|
|
240
|
+
color: var(--button-text-text-disabled, $button-text-text-disabled);
|
|
241
|
+
cursor: not-allowed;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// Loading state
|
|
246
|
+
.#{$c}--loading {
|
|
247
|
+
cursor: wait;
|
|
248
|
+
pointer-events: none;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// Pill shape
|
|
252
|
+
.#{$c}--pill {
|
|
253
|
+
border-radius: var(--button-radius-pill, $button-radius-pill);
|
|
254
|
+
}
|