@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
package/package.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@for-the-people-initiative/design-system",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "1.3.1",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "Design system with design tokens, SCSS utilities, and Vue 3 components",
|
|
7
|
+
"author": "For The People",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"keywords": [
|
|
10
|
+
"design-system",
|
|
11
|
+
"design-tokens",
|
|
12
|
+
"scss",
|
|
13
|
+
"vue",
|
|
14
|
+
"vue3",
|
|
15
|
+
"components"
|
|
16
|
+
],
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"src/scss",
|
|
20
|
+
"src/components",
|
|
21
|
+
"tokens"
|
|
22
|
+
],
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/ts/tokens.ts",
|
|
26
|
+
"import": "./dist/ts/tokens.ts"
|
|
27
|
+
},
|
|
28
|
+
"./css": "./dist/css/tokens.css",
|
|
29
|
+
"./css/tokens.css": "./dist/css/tokens.css",
|
|
30
|
+
"./css/theme-dark.css": "./dist/css/theme-dark.css",
|
|
31
|
+
"./scss": "./dist/scss/_tokens.scss",
|
|
32
|
+
"./scss/tokens": "./dist/scss/_tokens.scss",
|
|
33
|
+
"./scss/mixins/*": "./src/scss/mixins/*",
|
|
34
|
+
"./components/*": "./src/components/*"
|
|
35
|
+
},
|
|
36
|
+
"main": "./dist/ts/tokens.ts",
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build:tokens": "tsx scripts/build-tokens.ts",
|
|
39
|
+
"dev": "npm run build:tokens && npm --prefix server run dev",
|
|
40
|
+
"build": "npm run build:tokens && npm --prefix server install && npm --prefix server run build",
|
|
41
|
+
"preview": "npm --prefix server run preview",
|
|
42
|
+
"prepublishOnly": "npm run build:tokens",
|
|
43
|
+
"publish-all": "npm run build:tokens && npm publish && node ./workflow/DeploymentCDN/preprocessUtilityClasses.cjs && node ./workflow/DeploymentCDN/deployUtilityClassesToCDN.cjs",
|
|
44
|
+
"storybook": "storybook dev -p 6006",
|
|
45
|
+
"build-storybook": "storybook build",
|
|
46
|
+
"story:dev": "histoire dev",
|
|
47
|
+
"story:build": "histoire build",
|
|
48
|
+
"story:preview": "histoire preview",
|
|
49
|
+
"process-utility-classes": "node ./workflow/DeploymentCDN/preprocessUtilityClasses.cjs",
|
|
50
|
+
"deploy-utility-classes": "node ./workflow/DeploymentCDN/deployUtilityClassesToCDN.cjs"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@azure/storage-blob": "^12.16.0",
|
|
54
|
+
"@histoire/plugin-vue": "~0.17.17",
|
|
55
|
+
"@storybook/addon-essentials": "^8.6.14",
|
|
56
|
+
"@storybook/blocks": "^8.6.14",
|
|
57
|
+
"@storybook/manager-api": "^8.6.14",
|
|
58
|
+
"@storybook/theming": "^8.6.14",
|
|
59
|
+
"@storybook/vue3": "^8.6.15",
|
|
60
|
+
"@storybook/vue3-vite": "^8.6.15",
|
|
61
|
+
"@vitejs/plugin-vue": "^4.2.3",
|
|
62
|
+
"basic-ftp": "^5.0.3",
|
|
63
|
+
"consola": "^3.2.3",
|
|
64
|
+
"dotenv": "^16.4.5",
|
|
65
|
+
"glob-promise": "^6.0.7",
|
|
66
|
+
"histoire": "~0.17.17",
|
|
67
|
+
"lodash": "^4.17.21",
|
|
68
|
+
"sass": "^1.64.2",
|
|
69
|
+
"storybook": "^8.6.15",
|
|
70
|
+
"storybook-design-token": "^3.3.0",
|
|
71
|
+
"tsx": "^4.19.0",
|
|
72
|
+
"typescript": "^5.6.0",
|
|
73
|
+
"uglifycss": "^0.0.29",
|
|
74
|
+
"vite": "^4.4.5",
|
|
75
|
+
"vue": "^3.5.0"
|
|
76
|
+
},
|
|
77
|
+
"dependencies": {
|
|
78
|
+
"chart.js": "^4.5.1"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
@use "../../../dist/scss/tokens" as *;
|
|
2
|
+
|
|
3
|
+
$c: accordion;
|
|
4
|
+
|
|
5
|
+
.#{$c} {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: var(--accordion-gap, $accordion-gap);
|
|
9
|
+
width: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.#{$c}__tab {
|
|
13
|
+
border: var(--accordion-border-width, $accordion-border-width) solid var(--accordion-border-color, $accordion-border-color);
|
|
14
|
+
border-radius: var(--accordion-border-radius, $accordion-border-radius);
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.#{$c}__header {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
width: 100%;
|
|
23
|
+
padding: var(--accordion-header-padding, $accordion-header-padding);
|
|
24
|
+
background-color: var(--accordion-header-background-default, $accordion-header-background-default);
|
|
25
|
+
color: var(--accordion-header-color-default, $accordion-header-color-default);
|
|
26
|
+
border: none;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
font-family: inherit;
|
|
29
|
+
font-size: inherit;
|
|
30
|
+
text-align: left;
|
|
31
|
+
transition: background-color var(--accordion-transition-duration, $accordion-transition-duration) ease,
|
|
32
|
+
color var(--accordion-transition-duration, $accordion-transition-duration) ease;
|
|
33
|
+
|
|
34
|
+
&:hover:not(:disabled) {
|
|
35
|
+
background-color: var(--accordion-header-background-hover, $accordion-header-background-hover);
|
|
36
|
+
color: var(--accordion-header-color-hover, $accordion-header-color-hover);
|
|
37
|
+
|
|
38
|
+
.#{$c}__icon {
|
|
39
|
+
color: var(--accordion-icon-color-hover, $accordion-icon-color-hover);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:focus-visible {
|
|
44
|
+
outline: 2px solid var(--accordion-border-color, $accordion-border-color);
|
|
45
|
+
outline-offset: -2px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&:disabled {
|
|
49
|
+
cursor: not-allowed;
|
|
50
|
+
color: var(--accordion-header-color-disabled, $accordion-header-color-disabled);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.#{$c}__header-text {
|
|
55
|
+
flex: 1;
|
|
56
|
+
font-weight: 500;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.#{$c}__icon {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
width: var(--accordion-icon-size, $accordion-icon-size);
|
|
64
|
+
height: var(--accordion-icon-size, $accordion-icon-size);
|
|
65
|
+
color: var(--accordion-icon-color-default, $accordion-icon-color-default);
|
|
66
|
+
transition: transform var(--accordion-transition-duration, $accordion-transition-duration) ease,
|
|
67
|
+
color var(--accordion-transition-duration, $accordion-transition-duration) ease;
|
|
68
|
+
transform: rotate(var(--accordion-icon-rotation-collapsed, $accordion-icon-rotation-collapsed));
|
|
69
|
+
|
|
70
|
+
svg {
|
|
71
|
+
width: 100%;
|
|
72
|
+
height: 100%;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.#{$c}__content-wrapper {
|
|
77
|
+
display: grid;
|
|
78
|
+
grid-template-rows: 0fr;
|
|
79
|
+
transition: grid-template-rows var(--accordion-transition-duration, $accordion-transition-duration) ease;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.#{$c}__content {
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
background-color: var(--accordion-content-background, $accordion-content-background);
|
|
85
|
+
color: var(--accordion-content-color, $accordion-content-color);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Active state
|
|
89
|
+
.#{$c}__tab--active {
|
|
90
|
+
.#{$c}__header {
|
|
91
|
+
background-color: var(--accordion-header-background-active, $accordion-header-background-active);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.#{$c}__icon {
|
|
95
|
+
transform: rotate(var(--accordion-icon-rotation-expanded, $accordion-icon-rotation-expanded));
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.#{$c}__content-wrapper {
|
|
99
|
+
grid-template-rows: 1fr;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.#{$c}__content {
|
|
103
|
+
padding: var(--accordion-content-padding, $accordion-content-padding);
|
|
104
|
+
border-top: var(--accordion-border-width, $accordion-border-width) solid var(--accordion-border-color, $accordion-border-color);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Disabled state
|
|
109
|
+
.#{$c}__tab--disabled {
|
|
110
|
+
.#{$c}__header {
|
|
111
|
+
cursor: not-allowed;
|
|
112
|
+
opacity: 0.6;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.#{$c}__icon {
|
|
116
|
+
color: var(--accordion-icon-color-disabled, $accordion-icon-color-disabled);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="accordion" :class="additionalClasses">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<style src="./Accordion.scss"></style>
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts">
|
|
10
|
+
import type { AccordionProps, AccordionEmits } from '../../types';
|
|
11
|
+
import { computed, provide, ref, watch } from "vue";
|
|
12
|
+
|
|
13
|
+
defineOptions({ name: 'FtpAccordion' });
|
|
14
|
+
|
|
15
|
+
const props = withDefaults(defineProps<AccordionProps>(), {
|
|
16
|
+
activeIndex: null,
|
|
17
|
+
multiple: false,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const emit = defineEmits(["update:activeIndex", "tab-open", "tab-close"]);
|
|
21
|
+
|
|
22
|
+
// Internal state for active tabs
|
|
23
|
+
const activeIndices = ref(
|
|
24
|
+
props.multiple
|
|
25
|
+
? Array.isArray(props.activeIndex)
|
|
26
|
+
? [...props.activeIndex]
|
|
27
|
+
: props.activeIndex !== null
|
|
28
|
+
? [props.activeIndex]
|
|
29
|
+
: []
|
|
30
|
+
: props.activeIndex !== null
|
|
31
|
+
? [props.activeIndex]
|
|
32
|
+
: []
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
// Watch for external changes to activeIndex
|
|
36
|
+
watch(
|
|
37
|
+
() => props.activeIndex,
|
|
38
|
+
(newVal) => {
|
|
39
|
+
if (props.multiple) {
|
|
40
|
+
activeIndices.value = Array.isArray(newVal)
|
|
41
|
+
? [...newVal]
|
|
42
|
+
: newVal !== null
|
|
43
|
+
? [newVal]
|
|
44
|
+
: [];
|
|
45
|
+
} else {
|
|
46
|
+
activeIndices.value = newVal !== null ? [newVal] : [];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
// Tab registration
|
|
52
|
+
let tabCount = ref(0);
|
|
53
|
+
|
|
54
|
+
const registerTab = () => {
|
|
55
|
+
const index = tabCount.value;
|
|
56
|
+
tabCount.value++;
|
|
57
|
+
return index;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const isTabActive = (index: number) => {
|
|
61
|
+
return activeIndices.value.includes(index);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const toggleTab = (index: any, disabled: any) => {
|
|
65
|
+
if (disabled) return;
|
|
66
|
+
|
|
67
|
+
const isActive = activeIndices.value.includes(index);
|
|
68
|
+
|
|
69
|
+
if (props.multiple) {
|
|
70
|
+
if (isActive) {
|
|
71
|
+
activeIndices.value = activeIndices.value.filter((i) => i !== index);
|
|
72
|
+
emit("tab-close", { index });
|
|
73
|
+
} else {
|
|
74
|
+
activeIndices.value = [...activeIndices.value, index];
|
|
75
|
+
emit("tab-open", { index });
|
|
76
|
+
}
|
|
77
|
+
emit("update:activeIndex", [...activeIndices.value]);
|
|
78
|
+
} else {
|
|
79
|
+
if (isActive) {
|
|
80
|
+
activeIndices.value = [];
|
|
81
|
+
emit("tab-close", { index });
|
|
82
|
+
emit("update:activeIndex", null);
|
|
83
|
+
} else {
|
|
84
|
+
const previousIndex = activeIndices.value[0];
|
|
85
|
+
if (previousIndex !== undefined) {
|
|
86
|
+
emit("tab-close", { index: previousIndex });
|
|
87
|
+
}
|
|
88
|
+
activeIndices.value = [index];
|
|
89
|
+
emit("tab-open", { index });
|
|
90
|
+
emit("update:activeIndex", index);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
// Provide context to child AccordionTab components
|
|
96
|
+
provide("accordion", {
|
|
97
|
+
registerTab,
|
|
98
|
+
isTabActive,
|
|
99
|
+
toggleTab,
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
const additionalClasses = computed(() =>
|
|
103
|
+
[props.multiple && "accordion--multiple"].filter(Boolean).join(" ")
|
|
104
|
+
);
|
|
105
|
+
</script>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="accordion__tab" :class="tabClasses">
|
|
3
|
+
<button
|
|
4
|
+
type="button"
|
|
5
|
+
class="accordion__header"
|
|
6
|
+
:disabled="isDisabled"
|
|
7
|
+
:aria-expanded="isActive"
|
|
8
|
+
:aria-controls="contentId"
|
|
9
|
+
@click="handleClick"
|
|
10
|
+
>
|
|
11
|
+
<span class="accordion__header-text">
|
|
12
|
+
<slot name="header">{{ header }}</slot>
|
|
13
|
+
</span>
|
|
14
|
+
<span class="accordion__icon">
|
|
15
|
+
<svg
|
|
16
|
+
viewBox="0 0 24 24"
|
|
17
|
+
fill="none"
|
|
18
|
+
stroke="currentColor"
|
|
19
|
+
stroke-width="2"
|
|
20
|
+
stroke-linecap="round"
|
|
21
|
+
stroke-linejoin="round"
|
|
22
|
+
>
|
|
23
|
+
<polyline points="6 9 12 15 18 9"></polyline>
|
|
24
|
+
</svg>
|
|
25
|
+
</span>
|
|
26
|
+
</button>
|
|
27
|
+
<div
|
|
28
|
+
:id="contentId"
|
|
29
|
+
class="accordion__content-wrapper"
|
|
30
|
+
:aria-hidden="!isActive"
|
|
31
|
+
>
|
|
32
|
+
<div class="accordion__content">
|
|
33
|
+
<slot></slot>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script setup lang="ts">
|
|
40
|
+
import type { AccordionTabProps } from '../../types';
|
|
41
|
+
import { computed, inject, onMounted, ref } from "vue";
|
|
42
|
+
|
|
43
|
+
defineOptions({ name: 'FtpAccordionTab' });
|
|
44
|
+
|
|
45
|
+
const props = withDefaults(defineProps<AccordionTabProps>(), {
|
|
46
|
+
header: "",
|
|
47
|
+
isDisabled: false,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const accordion = inject<{ registerTab: () => number; isTabActive: (index: number) => boolean; toggleTab: (index: number, disabled: boolean) => void }>("accordion");
|
|
51
|
+
const tabIndex = ref(-1);
|
|
52
|
+
const contentId = computed(() => `accordion-content-${tabIndex.value}`);
|
|
53
|
+
|
|
54
|
+
onMounted(() => {
|
|
55
|
+
if (accordion) {
|
|
56
|
+
tabIndex.value = accordion.registerTab();
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
const isActive = computed(() => {
|
|
61
|
+
if (!accordion || tabIndex.value === -1) return false;
|
|
62
|
+
return accordion.isTabActive(tabIndex.value);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
const handleClick = () => {
|
|
66
|
+
if (accordion && !props.isDisabled) {
|
|
67
|
+
accordion.toggleTab(tabIndex.value, props.isDisabled);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const tabClasses = computed(() =>
|
|
72
|
+
[
|
|
73
|
+
isActive.value && "accordion__tab--active",
|
|
74
|
+
props.isDisabled && "accordion__tab--disabled",
|
|
75
|
+
]
|
|
76
|
+
.filter(Boolean)
|
|
77
|
+
.join(" ")
|
|
78
|
+
);
|
|
79
|
+
</script>
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
@use "../../../dist/scss/tokens" as *;
|
|
2
|
+
|
|
3
|
+
$c: alert;
|
|
4
|
+
|
|
5
|
+
.#{$c} {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: flex-start;
|
|
8
|
+
gap: 0.75rem;
|
|
9
|
+
padding: 1rem 1.25rem;
|
|
10
|
+
border-radius: 0.5rem;
|
|
11
|
+
border: 1px solid transparent;
|
|
12
|
+
font-size: 0.875rem;
|
|
13
|
+
line-height: 1.5;
|
|
14
|
+
|
|
15
|
+
&--success {
|
|
16
|
+
background-color: var(--color-success-subtle, rgba(34, 197, 94, 0.1));
|
|
17
|
+
border-color: var(--color-success-border, rgba(34, 197, 94, 0.3));
|
|
18
|
+
color: var(--color-success-text, #16a34a);
|
|
19
|
+
|
|
20
|
+
.#{$c}__icon { color: var(--color-success, #22c55e); }
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&--info {
|
|
24
|
+
background-color: var(--color-info-subtle, rgba(59, 130, 246, 0.1));
|
|
25
|
+
border-color: var(--color-info-border, rgba(59, 130, 246, 0.3));
|
|
26
|
+
color: var(--color-info-text, #2563eb);
|
|
27
|
+
|
|
28
|
+
.#{$c}__icon { color: var(--color-info, #3b82f6); }
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&--warn {
|
|
32
|
+
background-color: var(--color-warning-subtle, rgba(245, 158, 11, 0.1));
|
|
33
|
+
border-color: var(--color-warning-border, rgba(245, 158, 11, 0.3));
|
|
34
|
+
color: var(--color-warning-text, #d97706);
|
|
35
|
+
|
|
36
|
+
.#{$c}__icon { color: var(--color-warning, #f59e0b); }
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&--error {
|
|
40
|
+
background-color: var(--color-error-subtle, rgba(239, 68, 68, 0.1));
|
|
41
|
+
border-color: var(--color-error-border, rgba(239, 68, 68, 0.3));
|
|
42
|
+
color: var(--color-error-text, #dc2626);
|
|
43
|
+
|
|
44
|
+
.#{$c}__icon { color: var(--color-error, #ef4444); }
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.#{$c}__icon-wrapper {
|
|
49
|
+
flex-shrink: 0;
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
padding-top: 0.125rem;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.#{$c}__icon {
|
|
56
|
+
width: 1.25rem;
|
|
57
|
+
height: 1.25rem;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.#{$c}__content {
|
|
61
|
+
flex: 1;
|
|
62
|
+
min-width: 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.#{$c}__title {
|
|
66
|
+
font-weight: 600;
|
|
67
|
+
margin-bottom: 0.25rem;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.#{$c}__description {
|
|
71
|
+
opacity: 0.9;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.#{$c}__action {
|
|
75
|
+
flex-shrink: 0;
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.#{$c}__close {
|
|
81
|
+
flex-shrink: 0;
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
justify-content: center;
|
|
85
|
+
width: 1.5rem;
|
|
86
|
+
height: 1.5rem;
|
|
87
|
+
padding: 0;
|
|
88
|
+
border: none;
|
|
89
|
+
background: transparent;
|
|
90
|
+
color: currentColor;
|
|
91
|
+
opacity: 0.5;
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
border-radius: 0.25rem;
|
|
94
|
+
transition: opacity 0.15s ease;
|
|
95
|
+
|
|
96
|
+
&:hover {
|
|
97
|
+
opacity: 1;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&:focus-visible {
|
|
101
|
+
outline: 2px solid currentColor;
|
|
102
|
+
outline-offset: 2px;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.#{$c}__close-icon {
|
|
107
|
+
width: 1rem;
|
|
108
|
+
height: 1rem;
|
|
109
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="!dismissed"
|
|
4
|
+
class="alert"
|
|
5
|
+
:class="additionalClasses"
|
|
6
|
+
role="alert"
|
|
7
|
+
>
|
|
8
|
+
<div class="alert__icon-wrapper" aria-hidden="true">
|
|
9
|
+
<slot name="icon">
|
|
10
|
+
<svg v-if="computedIcon === 'success'" class="alert__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
11
|
+
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14" /><polyline points="22 4 12 14.01 9 11.01" />
|
|
12
|
+
</svg>
|
|
13
|
+
<svg v-else-if="computedIcon === 'info'" class="alert__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
14
|
+
<circle cx="12" cy="12" r="10" /><line x1="12" y1="16" x2="12" y2="12" /><line x1="12" y1="8" x2="12.01" y2="8" />
|
|
15
|
+
</svg>
|
|
16
|
+
<svg v-else-if="computedIcon === 'warn'" class="alert__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
17
|
+
<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" /><line x1="12" y1="9" x2="12" y2="13" /><line x1="12" y1="17" x2="12.01" y2="17" />
|
|
18
|
+
</svg>
|
|
19
|
+
<svg v-else-if="computedIcon === 'error'" class="alert__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
20
|
+
<circle cx="12" cy="12" r="10" /><line x1="15" y1="9" x2="9" y2="15" /><line x1="9" y1="9" x2="15" y2="15" />
|
|
21
|
+
</svg>
|
|
22
|
+
</slot>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div class="alert__content">
|
|
26
|
+
<div v-if="title" class="alert__title">{{ title }}</div>
|
|
27
|
+
<div v-if="$slots.default" class="alert__description">
|
|
28
|
+
<slot />
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<div v-if="$slots.action" class="alert__action">
|
|
33
|
+
<slot name="action" />
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<button
|
|
37
|
+
v-if="closable"
|
|
38
|
+
type="button"
|
|
39
|
+
class="alert__close"
|
|
40
|
+
aria-label="Close"
|
|
41
|
+
@click="onClose"
|
|
42
|
+
>
|
|
43
|
+
<svg class="alert__close-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
44
|
+
<line x1="18" y1="6" x2="6" y2="18" /><line x1="6" y1="6" x2="18" y2="18" />
|
|
45
|
+
</svg>
|
|
46
|
+
</button>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<style src="./Alert.scss"></style>
|
|
51
|
+
|
|
52
|
+
<script setup lang="ts">
|
|
53
|
+
import type { AlertProps } from '../../types';
|
|
54
|
+
import { computed, ref } from 'vue';
|
|
55
|
+
|
|
56
|
+
defineOptions({ name: 'FtpAlert' });
|
|
57
|
+
|
|
58
|
+
const props = withDefaults(defineProps<AlertProps>(), {
|
|
59
|
+
severity: 'info',
|
|
60
|
+
closable: false,
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
const emit = defineEmits<{
|
|
64
|
+
(e: 'close'): void
|
|
65
|
+
}>();
|
|
66
|
+
|
|
67
|
+
const dismissed = ref(false);
|
|
68
|
+
|
|
69
|
+
const computedIcon = computed(() => props.icon ?? props.severity);
|
|
70
|
+
|
|
71
|
+
const additionalClasses = computed(() =>
|
|
72
|
+
[`alert--${props.severity}`].filter(Boolean).join(' ')
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
const onClose = () => {
|
|
76
|
+
dismissed.value = true;
|
|
77
|
+
emit('close');
|
|
78
|
+
};
|
|
79
|
+
</script>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
@use "../../../dist/scss/tokens" as *;
|
|
2
|
+
|
|
3
|
+
$c: app-bar;
|
|
4
|
+
|
|
5
|
+
.#{$c} {
|
|
6
|
+
width: 100%;
|
|
7
|
+
background: var(--surface-overlay, #1e1e2e);
|
|
8
|
+
border-bottom: 1px solid var(--surface-border, rgba(255, 255, 255, 0.1));
|
|
9
|
+
z-index: 1000;
|
|
10
|
+
|
|
11
|
+
&--fixed {
|
|
12
|
+
position: fixed;
|
|
13
|
+
top: 0;
|
|
14
|
+
left: 0;
|
|
15
|
+
right: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&--elevated {
|
|
19
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&--transparent {
|
|
23
|
+
background: transparent;
|
|
24
|
+
border-bottom-color: transparent;
|
|
25
|
+
box-shadow: none;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.#{$c}__container {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: 1rem;
|
|
33
|
+
height: 3.5rem;
|
|
34
|
+
padding: 0 1.5rem;
|
|
35
|
+
max-width: 100%;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.#{$c}__start {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
gap: 0.5rem;
|
|
42
|
+
flex-shrink: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.#{$c}__center {
|
|
46
|
+
flex: 1;
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
min-width: 0;
|
|
50
|
+
font-size: 1.125rem;
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
color: var(--text-primary, #fff);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.#{$c}__end {
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: 0.5rem;
|
|
59
|
+
flex-shrink: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Responsive
|
|
63
|
+
@media (max-width: 640px) {
|
|
64
|
+
.#{$c}__container {
|
|
65
|
+
height: 3rem;
|
|
66
|
+
padding: 0 1rem;
|
|
67
|
+
gap: 0.5rem;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.#{$c}__center {
|
|
71
|
+
font-size: 1rem;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<header
|
|
3
|
+
class="app-bar"
|
|
4
|
+
:class="additionalClasses"
|
|
5
|
+
:style="colorStyle"
|
|
6
|
+
role="banner"
|
|
7
|
+
>
|
|
8
|
+
<div class="app-bar__container">
|
|
9
|
+
<div v-if="$slots.start" class="app-bar__start">
|
|
10
|
+
<slot name="start" />
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<div class="app-bar__center">
|
|
14
|
+
<slot />
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<div v-if="$slots.end" class="app-bar__end">
|
|
18
|
+
<slot name="end" />
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</header>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<style src="./AppBar.scss"></style>
|
|
25
|
+
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import type { AppBarProps } from '../../types';
|
|
28
|
+
import { computed } from 'vue';
|
|
29
|
+
|
|
30
|
+
defineOptions({ name: 'FtpAppBar' });
|
|
31
|
+
|
|
32
|
+
const props = withDefaults(defineProps<AppBarProps>(), {
|
|
33
|
+
fixed: false,
|
|
34
|
+
elevated: true,
|
|
35
|
+
transparent: false,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const additionalClasses = computed(() =>
|
|
39
|
+
[
|
|
40
|
+
props.fixed && 'app-bar--fixed',
|
|
41
|
+
props.elevated && 'app-bar--elevated',
|
|
42
|
+
props.transparent && 'app-bar--transparent',
|
|
43
|
+
].filter(Boolean).join(' ')
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
const colorStyle = computed(() =>
|
|
47
|
+
props.color ? { backgroundColor: props.color } : undefined
|
|
48
|
+
);
|
|
49
|
+
</script>
|