@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.
Files changed (342) hide show
  1. package/README.md +80 -0
  2. package/dist/css/theme-dark.css +7 -0
  3. package/dist/css/tokens.css +2315 -0
  4. package/dist/scss/_tokens.scss +2521 -0
  5. package/dist/ts/tokens.ts +2441 -0
  6. package/package.json +80 -0
  7. package/src/components/Accordion/Accordion.scss +118 -0
  8. package/src/components/Accordion/Accordion.vue +105 -0
  9. package/src/components/Accordion/AccordionTab.vue +79 -0
  10. package/src/components/Alert/Alert.scss +109 -0
  11. package/src/components/Alert/Alert.vue +79 -0
  12. package/src/components/AppBar/AppBar.scss +73 -0
  13. package/src/components/AppBar/AppBar.vue +49 -0
  14. package/src/components/AtmosphericBackground/AtmosphericBackground.vue +198 -0
  15. package/src/components/AutoComplete/AutoComplete.scss +282 -0
  16. package/src/components/AutoComplete/AutoComplete.vue +398 -0
  17. package/src/components/Avatar/Avatar.scss +191 -0
  18. package/src/components/Avatar/Avatar.vue +44 -0
  19. package/src/components/Badge/Badge.scss +84 -0
  20. package/src/components/Badge/Badge.vue +41 -0
  21. package/src/components/BlockUI/BlockUI.scss +85 -0
  22. package/src/components/BlockUI/BlockUI.vue +90 -0
  23. package/src/components/Breadcrumb/Breadcrumb.scss +84 -0
  24. package/src/components/Breadcrumb/Breadcrumb.vue +141 -0
  25. package/src/components/Button/Button.scss +254 -0
  26. package/src/components/Button/Button.vue +68 -0
  27. package/src/components/CTA/CTA.scss +92 -0
  28. package/src/components/CTA/CTA.vue +33 -0
  29. package/src/components/Calendar/Calendar.scss +330 -0
  30. package/src/components/Calendar/Calendar.vue +455 -0
  31. package/src/components/Card/Card.scss +66 -0
  32. package/src/components/Card/Card.vue +48 -0
  33. package/src/components/Carousel/Carousel.scss +121 -0
  34. package/src/components/Carousel/Carousel.vue +191 -0
  35. package/src/components/Chart/Chart.scss +109 -0
  36. package/src/components/Chart/Chart.vue +209 -0
  37. package/src/components/Checkbox/Checkbox.scss +148 -0
  38. package/src/components/Checkbox/Checkbox.vue +75 -0
  39. package/src/components/Chip/Chip.scss +83 -0
  40. package/src/components/Chip/Chip.vue +73 -0
  41. package/src/components/ColorPicker/ColorPicker.scss +244 -0
  42. package/src/components/ColorPicker/ColorPicker.vue +411 -0
  43. package/src/components/Column/Column.scss +87 -0
  44. package/src/components/Column/Column.vue +45 -0
  45. package/src/components/ColumnGroup/ColumnGroup.scss +41 -0
  46. package/src/components/ColumnGroup/ColumnGroup.vue +27 -0
  47. package/src/components/ColumnGroup/ColumnGroupRow.vue +18 -0
  48. package/src/components/CommandPalette/CommandPalette.scss +143 -0
  49. package/src/components/CommandPalette/CommandPalette.vue +165 -0
  50. package/src/components/ConfirmDialog/ConfirmDialog.scss +177 -0
  51. package/src/components/ConfirmDialog/ConfirmDialog.vue +162 -0
  52. package/src/components/ConfirmPopup/ConfirmPopup.scss +180 -0
  53. package/src/components/ConfirmPopup/ConfirmPopup.vue +185 -0
  54. package/src/components/ContextMenu/ContextMenu.scss +171 -0
  55. package/src/components/ContextMenu/ContextMenu.vue +383 -0
  56. package/src/components/DataTable/DataTable.scss +162 -0
  57. package/src/components/DataTable/DataTable.vue +225 -0
  58. package/src/components/DataView/DataView.scss +149 -0
  59. package/src/components/DataView/DataView.vue +172 -0
  60. package/src/components/DatePicker/DatePicker.scss +71 -0
  61. package/src/components/DatePicker/DatePicker.vue +121 -0
  62. package/src/components/Dialog/Dialog.scss +161 -0
  63. package/src/components/Dialog/Dialog.vue +245 -0
  64. package/src/components/Divider/Divider.scss +147 -0
  65. package/src/components/Divider/Divider.vue +49 -0
  66. package/src/components/Dock/Dock.scss +221 -0
  67. package/src/components/Dock/Dock.vue +107 -0
  68. package/src/components/Drawer/Drawer.scss +220 -0
  69. package/src/components/Drawer/Drawer.vue +137 -0
  70. package/src/components/Dropdown/Dropdown.scss +218 -0
  71. package/src/components/Dropdown/Dropdown.vue +313 -0
  72. package/src/components/Editor/Editor.scss +156 -0
  73. package/src/components/Editor/Editor.vue +253 -0
  74. package/src/components/FAQ/FAQ.scss +24 -0
  75. package/src/components/FAQ/FAQ.vue +28 -0
  76. package/src/components/FeatureGrid/FeatureGrid.scss +92 -0
  77. package/src/components/FeatureGrid/FeatureGrid.vue +39 -0
  78. package/src/components/FieldSet/FieldSet.scss +97 -0
  79. package/src/components/FieldSet/FieldSet.vue +70 -0
  80. package/src/components/FileUpload/FileUpload.scss +137 -0
  81. package/src/components/FileUpload/FileUpload.vue +183 -0
  82. package/src/components/Footer/Footer.scss +95 -0
  83. package/src/components/Footer/Footer.vue +59 -0
  84. package/src/components/Form/Form.scss +72 -0
  85. package/src/components/Form/Form.vue +30 -0
  86. package/src/components/Form/FormField.vue +42 -0
  87. package/src/components/Galleria/Galleria.scss +295 -0
  88. package/src/components/Galleria/Galleria.vue +274 -0
  89. package/src/components/Hero/Hero.scss +116 -0
  90. package/src/components/Hero/Hero.vue +57 -0
  91. package/src/components/Image/Image.scss +129 -0
  92. package/src/components/Image/Image.vue +117 -0
  93. package/src/components/ImageCompare/ImageCompare.scss +97 -0
  94. package/src/components/ImageCompare/ImageCompare.vue +66 -0
  95. package/src/components/InPlace/InPlace.scss +97 -0
  96. package/src/components/InPlace/InPlace.vue +107 -0
  97. package/src/components/InlineMessage/InlineMessage.scss +69 -0
  98. package/src/components/InlineMessage/InlineMessage.vue +47 -0
  99. package/src/components/InputChips/InputChips.scss +165 -0
  100. package/src/components/InputChips/InputChips.vue +169 -0
  101. package/src/components/InputGroup/InputGroup.scss +57 -0
  102. package/src/components/InputGroup/InputGroup.vue +22 -0
  103. package/src/components/InputGroupAddon/InputGroupAddon.scss +28 -0
  104. package/src/components/InputGroupAddon/InputGroupAddon.vue +22 -0
  105. package/src/components/InputIcon/InputIcon.scss +58 -0
  106. package/src/components/InputIcon/InputIcon.vue +28 -0
  107. package/src/components/InputMask/InputMask.scss +65 -0
  108. package/src/components/InputMask/InputMask.vue +268 -0
  109. package/src/components/InputNumber/InputNumber.scss +122 -0
  110. package/src/components/InputNumber/InputNumber.vue +150 -0
  111. package/src/components/InputOtp/InputOtp.scss +88 -0
  112. package/src/components/InputOtp/InputOtp.vue +230 -0
  113. package/src/components/InputSwitch/InputSwitch.scss +131 -0
  114. package/src/components/InputSwitch/InputSwitch.vue +49 -0
  115. package/src/components/InputText/InputText.scss +61 -0
  116. package/src/components/InputText/InputText.vue +71 -0
  117. package/src/components/Knob/Knob.scss +92 -0
  118. package/src/components/Knob/Knob.vue +252 -0
  119. package/src/components/ListBox/ListBox.scss +152 -0
  120. package/src/components/ListBox/ListBox.vue +198 -0
  121. package/src/components/LogoCloud/LogoCloud.scss +64 -0
  122. package/src/components/LogoCloud/LogoCloud.vue +35 -0
  123. package/src/components/MegaMenu/MegaMenu.scss +280 -0
  124. package/src/components/MegaMenu/MegaMenu.vue +218 -0
  125. package/src/components/Menu/Menu.scss +102 -0
  126. package/src/components/Menu/Menu.vue +221 -0
  127. package/src/components/MenuBar/MenuBar.scss +208 -0
  128. package/src/components/MenuBar/MenuBar.vue +306 -0
  129. package/src/components/Message/Message.scss +126 -0
  130. package/src/components/Message/Message.vue +99 -0
  131. package/src/components/MeterGroup/MeterGroup.scss +105 -0
  132. package/src/components/MeterGroup/MeterGroup.vue +73 -0
  133. package/src/components/MultiSelect/MultiSelect.scss +239 -0
  134. package/src/components/MultiSelect/MultiSelect.vue +296 -0
  135. package/src/components/OrderList/OrderList.scss +133 -0
  136. package/src/components/OrderList/OrderList.vue +267 -0
  137. package/src/components/OrganizationChart/OrganizationChart.scss +145 -0
  138. package/src/components/OrganizationChart/OrganizationChart.vue +220 -0
  139. package/src/components/OverlayPanel/OverlayPanel.scss +69 -0
  140. package/src/components/OverlayPanel/OverlayPanel.vue +180 -0
  141. package/src/components/Paginator/Paginator.scss +130 -0
  142. package/src/components/Paginator/Paginator.vue +212 -0
  143. package/src/components/Panel/Panel.scss +113 -0
  144. package/src/components/Panel/Panel.vue +89 -0
  145. package/src/components/PanelMenu/PanelMenu.scss +211 -0
  146. package/src/components/PanelMenu/PanelMenu.vue +295 -0
  147. package/src/components/ParticleBackground/ParticleBackground.vue +310 -0
  148. package/src/components/PickList/PickList.scss +126 -0
  149. package/src/components/PickList/PickList.vue +249 -0
  150. package/src/components/PopOver/PopOver.scss +112 -0
  151. package/src/components/PopOver/PopOver.vue +254 -0
  152. package/src/components/PricingTable/PricingCard.vue +33 -0
  153. package/src/components/PricingTable/PricingTable.scss +133 -0
  154. package/src/components/PricingTable/PricingTable.vue +21 -0
  155. package/src/components/ProgressBar/ProgressBar.scss +58 -0
  156. package/src/components/ProgressBar/ProgressBar.vue +48 -0
  157. package/src/components/ProgressSpinner/ProgressSpinner.scss +48 -0
  158. package/src/components/ProgressSpinner/ProgressSpinner.vue +53 -0
  159. package/src/components/RadioButton/RadioButton.scss +148 -0
  160. package/src/components/RadioButton/RadioButton.vue +52 -0
  161. package/src/components/Rating/Rating.scss +109 -0
  162. package/src/components/Rating/Rating.vue +136 -0
  163. package/src/components/Row/Row.scss +38 -0
  164. package/src/components/Row/Row.vue +30 -0
  165. package/src/components/ScrollPanel/ScrollPanel.scss +90 -0
  166. package/src/components/ScrollPanel/ScrollPanel.vue +284 -0
  167. package/src/components/ScrollTop/ScrollTop.scss +59 -0
  168. package/src/components/ScrollTop/ScrollTop.vue +99 -0
  169. package/src/components/Section/Section.scss +58 -0
  170. package/src/components/Section/Section.vue +39 -0
  171. package/src/components/Select/Select.scss +98 -0
  172. package/src/components/Select/Select.vue +92 -0
  173. package/src/components/SelectButton/SelectButton.scss +65 -0
  174. package/src/components/SelectButton/SelectButton.vue +144 -0
  175. package/src/components/Sidebar/Sidebar.scss +170 -0
  176. package/src/components/Sidebar/Sidebar.vue +137 -0
  177. package/src/components/Skeleton/Skeleton.scss +43 -0
  178. package/src/components/Skeleton/Skeleton.vue +57 -0
  179. package/src/components/Slider/Slider.scss +103 -0
  180. package/src/components/Slider/Slider.vue +65 -0
  181. package/src/components/SpeedDial/SpeedDial.scss +217 -0
  182. package/src/components/SpeedDial/SpeedDial.vue +196 -0
  183. package/src/components/SplitButton/SplitButton.scss +264 -0
  184. package/src/components/SplitButton/SplitButton.vue +172 -0
  185. package/src/components/Splitter/Splitter.scss +95 -0
  186. package/src/components/Splitter/Splitter.vue +191 -0
  187. package/src/components/Splitter/SplitterPanel.vue +125 -0
  188. package/src/components/Stats/Stats.scss +54 -0
  189. package/src/components/Stats/Stats.vue +28 -0
  190. package/src/components/Steps/Steps.scss +164 -0
  191. package/src/components/Steps/Steps.vue +100 -0
  192. package/src/components/TabMenu/TabMenu.scss +106 -0
  193. package/src/components/TabMenu/TabMenu.vue +174 -0
  194. package/src/components/Tabs/TabPanel.vue +41 -0
  195. package/src/components/Tabs/Tabs.scss +82 -0
  196. package/src/components/Tabs/Tabs.vue +162 -0
  197. package/src/components/Tag/Tag.scss +73 -0
  198. package/src/components/Tag/Tag.vue +37 -0
  199. package/src/components/Terminal/Terminal.scss +80 -0
  200. package/src/components/Terminal/Terminal.vue +113 -0
  201. package/src/components/Testimonial/Testimonial.scss +80 -0
  202. package/src/components/Testimonial/Testimonial.vue +29 -0
  203. package/src/components/Textarea/Textarea.scss +65 -0
  204. package/src/components/Textarea/Textarea.vue +101 -0
  205. package/src/components/TieredMenu/TieredMenu.scss +146 -0
  206. package/src/components/TieredMenu/TieredMenu.vue +270 -0
  207. package/src/components/TieredMenu/TieredMenuSub.vue +132 -0
  208. package/src/components/Timeline/Timeline.scss +190 -0
  209. package/src/components/Timeline/Timeline.vue +79 -0
  210. package/src/components/Toast/Toast.scss +284 -0
  211. package/src/components/Toast/Toast.vue +162 -0
  212. package/src/components/ToggleButton/ToggleButton.scss +99 -0
  213. package/src/components/ToggleButton/ToggleButton.vue +65 -0
  214. package/src/components/ToggleSwitch/ToggleSwitch.scss +68 -0
  215. package/src/components/ToggleSwitch/ToggleSwitch.vue +44 -0
  216. package/src/components/Toolbar/Toolbar.scss +37 -0
  217. package/src/components/Toolbar/Toolbar.vue +23 -0
  218. package/src/components/Tooltip/Tooltip.scss +114 -0
  219. package/src/components/Tooltip/Tooltip.vue +169 -0
  220. package/src/components/Tree/Tree.scss +164 -0
  221. package/src/components/Tree/Tree.vue +273 -0
  222. package/src/components/TreeSelect/TreeSelect.scss +238 -0
  223. package/src/components/TreeSelect/TreeSelect.vue +401 -0
  224. package/src/components/TreeTable/TreeTable.scss +172 -0
  225. package/src/components/TreeTable/TreeTable.vue +285 -0
  226. package/src/components/VirtualScroller/VirtualScroller.scss +107 -0
  227. package/src/components/VirtualScroller/VirtualScroller.vue +234 -0
  228. package/src/scss/fonts.scss +63 -0
  229. package/src/scss/mixins/accent-gradient.scss +43 -0
  230. package/src/scss/mixins/border.scss +28 -0
  231. package/src/scss/mixins/breakpoint.scss +80 -0
  232. package/src/scss/mixins/container.scss +33 -0
  233. package/src/scss/mixins/elevation.scss +43 -0
  234. package/src/scss/mixins/grid.scss +23 -0
  235. package/src/scss/mixins/levitation.scss +15 -0
  236. package/src/scss/mixins/list.scss +5 -0
  237. package/src/scss/mixins/surface-atmospheric.scss +93 -0
  238. package/src/scss/mixins/surface.scss +19 -0
  239. package/src/scss/mixins/typography.scss +91 -0
  240. package/src/scss/utility-classes/utility-classes-spacing.scss +34 -0
  241. package/src/scss/utility-classes/utility-classes-typography.scss +114 -0
  242. package/tokens/components/accordion.json +127 -0
  243. package/tokens/components/autocomplete.json +238 -0
  244. package/tokens/components/avatar.json +220 -0
  245. package/tokens/components/badge.json +119 -0
  246. package/tokens/components/block-ui.json +40 -0
  247. package/tokens/components/breadcrumb.json +57 -0
  248. package/tokens/components/button.json +395 -0
  249. package/tokens/components/calendar.json +260 -0
  250. package/tokens/components/card.json +157 -0
  251. package/tokens/components/carousel.json +154 -0
  252. package/tokens/components/chart.json +132 -0
  253. package/tokens/components/checkbox.json +130 -0
  254. package/tokens/components/chip.json +100 -0
  255. package/tokens/components/color-picker.json +196 -0
  256. package/tokens/components/column-group.json +45 -0
  257. package/tokens/components/column.json +109 -0
  258. package/tokens/components/confirm-dialog.json +141 -0
  259. package/tokens/components/confirm-popup.json +101 -0
  260. package/tokens/components/context-menu.json +168 -0
  261. package/tokens/components/data-table.json +157 -0
  262. package/tokens/components/data-view.json +172 -0
  263. package/tokens/components/dialog.json +151 -0
  264. package/tokens/components/divider.json +45 -0
  265. package/tokens/components/dock.json +173 -0
  266. package/tokens/components/drawer.json +163 -0
  267. package/tokens/components/dropdown.json +230 -0
  268. package/tokens/components/editor.json +170 -0
  269. package/tokens/components/field-set.json +115 -0
  270. package/tokens/components/file-upload.json +193 -0
  271. package/tokens/components/galleria.json +235 -0
  272. package/tokens/components/image-compare.json +74 -0
  273. package/tokens/components/image.json +71 -0
  274. package/tokens/components/in-place.json +100 -0
  275. package/tokens/components/inline-message.json +107 -0
  276. package/tokens/components/input-chips.json +187 -0
  277. package/tokens/components/input-group-addon.json +47 -0
  278. package/tokens/components/input-group.json +21 -0
  279. package/tokens/components/input-icon.json +38 -0
  280. package/tokens/components/input-mask.json +136 -0
  281. package/tokens/components/input-number.json +144 -0
  282. package/tokens/components/input-otp.json +138 -0
  283. package/tokens/components/input-switch.json +108 -0
  284. package/tokens/components/input-text.json +136 -0
  285. package/tokens/components/knob.json +119 -0
  286. package/tokens/components/listbox.json +166 -0
  287. package/tokens/components/mega-menu.json +283 -0
  288. package/tokens/components/menu.json +145 -0
  289. package/tokens/components/menubar.json +152 -0
  290. package/tokens/components/message.json +151 -0
  291. package/tokens/components/meter-group.json +108 -0
  292. package/tokens/components/multi-select.json +244 -0
  293. package/tokens/components/order-list.json +193 -0
  294. package/tokens/components/organization-chart.json +188 -0
  295. package/tokens/components/overlay-panel.json +94 -0
  296. package/tokens/components/paginator.json +186 -0
  297. package/tokens/components/panel.json +120 -0
  298. package/tokens/components/panelmenu.json +190 -0
  299. package/tokens/components/picklist.json +187 -0
  300. package/tokens/components/popover.json +65 -0
  301. package/tokens/components/progress-bar.json +33 -0
  302. package/tokens/components/progress-spinner.json +38 -0
  303. package/tokens/components/radio.json +125 -0
  304. package/tokens/components/rating.json +76 -0
  305. package/tokens/components/row.json +62 -0
  306. package/tokens/components/scroll-panel.json +69 -0
  307. package/tokens/components/scroll-top.json +84 -0
  308. package/tokens/components/select-button.json +145 -0
  309. package/tokens/components/select.json +190 -0
  310. package/tokens/components/sidebar.json +146 -0
  311. package/tokens/components/skeleton.json +26 -0
  312. package/tokens/components/slider.json +82 -0
  313. package/tokens/components/speed-dial.json +144 -0
  314. package/tokens/components/split-button.json +316 -0
  315. package/tokens/components/splitter.json +88 -0
  316. package/tokens/components/steps.json +154 -0
  317. package/tokens/components/tabmenu.json +103 -0
  318. package/tokens/components/tabs.json +97 -0
  319. package/tokens/components/tag.json +122 -0
  320. package/tokens/components/terminal.json +100 -0
  321. package/tokens/components/textarea.json +96 -0
  322. package/tokens/components/tieredmenu.json +142 -0
  323. package/tokens/components/timeline.json +129 -0
  324. package/tokens/components/toast.json +281 -0
  325. package/tokens/components/toggle-button.json +220 -0
  326. package/tokens/components/toggle-switch.json +95 -0
  327. package/tokens/components/toolbar.json +41 -0
  328. package/tokens/components/tooltip.json +60 -0
  329. package/tokens/components/tree-select.json +224 -0
  330. package/tokens/components/tree.json +153 -0
  331. package/tokens/components/treetable.json +155 -0
  332. package/tokens/components/virtualscroller.json +95 -0
  333. package/tokens/primitives/color.json +137 -0
  334. package/tokens/primitives/radius.json +12 -0
  335. package/tokens/primitives/shadow.json +29 -0
  336. package/tokens/primitives/spacing.json +15 -0
  337. package/tokens/semantics/color.json +81 -0
  338. package/tokens/semantics/radius.json +10 -0
  339. package/tokens/semantics/shadow.json +9 -0
  340. package/tokens/semantics/spacing.json +24 -0
  341. package/tokens/themes/dark.json +7 -0
  342. package/tokens/themes/light.json +7 -0
@@ -0,0 +1,252 @@
1
+ <template>
2
+ <div
3
+ class="knob"
4
+ :class="additionalClasses"
5
+ :style="{ width: sizeValue, height: sizeValue }"
6
+ >
7
+ <svg
8
+ class="knob__svg"
9
+ viewBox="0 0 100 100"
10
+ role="slider"
11
+ :aria-valuenow="modelValue"
12
+ :aria-valuemin="min"
13
+ :aria-valuemax="max"
14
+ :aria-disabled="isDisabled || undefined"
15
+ tabindex="0"
16
+ @mousedown="onMouseDown"
17
+ @touchstart="onTouchStart"
18
+ @keydown="onKeyDown"
19
+ >
20
+ <!-- Background track -->
21
+ <circle
22
+ class="knob__track"
23
+ cx="50"
24
+ cy="50"
25
+ :r="radius"
26
+ fill="none"
27
+ :stroke-width="strokeWidthValue"
28
+ />
29
+
30
+ <!-- Fill arc -->
31
+ <circle
32
+ class="knob__fill"
33
+ cx="50"
34
+ cy="50"
35
+ :r="radius"
36
+ fill="none"
37
+ :stroke-width="strokeWidthValue"
38
+ :stroke-dasharray="circumference"
39
+ :stroke-dashoffset="dashOffset"
40
+ stroke-linecap="round"
41
+ transform="rotate(-90 50 50)"
42
+ />
43
+ </svg>
44
+
45
+ <!-- Value display -->
46
+ <div v-if="showValue" class="knob__value">
47
+ <slot name="value" :value="modelValue">
48
+ {{ displayValue }}
49
+ </slot>
50
+ </div>
51
+ </div>
52
+ </template>
53
+
54
+ <style src="./Knob.scss"></style>
55
+
56
+ <script setup lang="ts">
57
+ import type { KnobProps, KnobEmits } from '../../types';
58
+ import { computed, ref } from "vue";
59
+
60
+ defineOptions({ name: 'FtpKnob' });
61
+
62
+ const props = withDefaults(defineProps<KnobProps>(), {
63
+ modelValue: 0,
64
+ min: 0,
65
+ max: 100,
66
+ step: 1,
67
+ size: "md",
68
+ showValue: true,
69
+ valueTemplate: "{value}",
70
+ isDisabled: false,
71
+ });
72
+
73
+ const emit = defineEmits(["update:modelValue", "change"]);
74
+
75
+ const sizeMap = {
76
+ sm: 80,
77
+ md: 120,
78
+ lg: 160,
79
+ };
80
+
81
+ const strokeMap = {
82
+ sm: 6,
83
+ md: 8,
84
+ lg: 10,
85
+ };
86
+
87
+ const sizeValue = computed(() => `${sizeMap[props.size]}px`);
88
+
89
+ const strokeWidthValue = computed(() => {
90
+ if (props.strokeWidth !== undefined) {
91
+ return (props.strokeWidth / sizeMap[props.size]) * 100;
92
+ }
93
+ return (strokeMap[props.size] / sizeMap[props.size]) * 100;
94
+ });
95
+
96
+ const radius = computed(() => 50 - strokeWidthValue.value / 2);
97
+ const circumference = computed(() => 2 * Math.PI * radius.value);
98
+
99
+ const percentage = computed(() => {
100
+ const range = props.max - props.min;
101
+ if (range === 0) return 0;
102
+ return ((props.modelValue - props.min) / range) * 100;
103
+ });
104
+
105
+ const dashOffset = computed(() => {
106
+ const offset = circumference.value * (1 - percentage.value / 100);
107
+ return offset;
108
+ });
109
+
110
+ const displayValue = computed(() => {
111
+ return props.valueTemplate.replace("{value}", String(props.modelValue));
112
+ });
113
+
114
+ const additionalClasses = computed(() =>
115
+ [
116
+ `knob--size-${props.size}`,
117
+ props.isDisabled && "knob--disabled",
118
+ ]
119
+ .filter(Boolean)
120
+ .join(" ")
121
+ );
122
+
123
+ const isDragging = ref(false);
124
+ const knobElement = ref(null);
125
+
126
+ const updateValue = (event: MouseEvent | TouchEvent) => {
127
+ if (props.isDisabled) return;
128
+
129
+ const svg = (event.target as HTMLElement).closest("svg") || event.currentTarget as HTMLElement;
130
+ const rect = svg!.getBoundingClientRect();
131
+ const centerX = rect.left + rect.width / 2;
132
+ const centerY = rect.top + rect.height / 2;
133
+
134
+ const clientX = 'touches' in event && event.touches.length ? event.touches[0].clientX : (event as MouseEvent).clientX;
135
+ const clientY = 'touches' in event && event.touches.length ? event.touches[0].clientY : (event as MouseEvent).clientY;
136
+
137
+ // Calculate angle from center
138
+ const dx = clientX - centerX;
139
+ const dy = clientY - centerY;
140
+ let angle = Math.atan2(dy, dx) * (180 / Math.PI);
141
+
142
+ // Convert to 0-360 starting from top (270 degrees offset)
143
+ angle = (angle + 90 + 360) % 360;
144
+
145
+ // Convert angle to value
146
+ const range = props.max - props.min;
147
+ let value = (angle / 360) * range + props.min;
148
+
149
+ // Apply step
150
+ value = Math.round(value / props.step) * props.step;
151
+
152
+ // Clamp value
153
+ value = Math.max(props.min, Math.min(props.max, value));
154
+
155
+ if (value !== props.modelValue) {
156
+ emit("update:modelValue", value);
157
+ }
158
+ };
159
+
160
+ const onMouseDown = (event: MouseEvent) => {
161
+ if (props.isDisabled) return;
162
+
163
+ isDragging.value = true;
164
+ updateValue(event);
165
+
166
+ const onMouseMove = (e: MouseEvent) => {
167
+ if (isDragging.value) {
168
+ updateValue(e);
169
+ }
170
+ };
171
+
172
+ const onMouseUp = () => {
173
+ if (isDragging.value) {
174
+ isDragging.value = false;
175
+ emit("change", { value: props.modelValue });
176
+ }
177
+ document.removeEventListener("mousemove", onMouseMove);
178
+ document.removeEventListener("mouseup", onMouseUp);
179
+ };
180
+
181
+ document.addEventListener("mousemove", onMouseMove);
182
+ document.addEventListener("mouseup", onMouseUp);
183
+ };
184
+
185
+ const onTouchStart = (event: TouchEvent) => {
186
+ if (props.isDisabled) return;
187
+
188
+ isDragging.value = true;
189
+ updateValue(event);
190
+
191
+ const onTouchMove = (e: TouchEvent) => {
192
+ if (isDragging.value) {
193
+ e.preventDefault();
194
+ updateValue(e);
195
+ }
196
+ };
197
+
198
+ const onTouchEnd = () => {
199
+ if (isDragging.value) {
200
+ isDragging.value = false;
201
+ emit("change", { value: props.modelValue });
202
+ }
203
+ document.removeEventListener("touchmove", onTouchMove);
204
+ document.removeEventListener("touchend", onTouchEnd);
205
+ };
206
+
207
+ document.addEventListener("touchmove", onTouchMove, { passive: false });
208
+ document.addEventListener("touchend", onTouchEnd);
209
+ };
210
+
211
+ const onKeyDown = (event: KeyboardEvent) => {
212
+ if (props.isDisabled) return;
213
+
214
+ let newValue = props.modelValue;
215
+
216
+ switch (event.key) {
217
+ case "ArrowUp":
218
+ case "ArrowRight":
219
+ newValue = Math.min(props.max, props.modelValue + props.step);
220
+ event.preventDefault();
221
+ break;
222
+ case "ArrowDown":
223
+ case "ArrowLeft":
224
+ newValue = Math.max(props.min, props.modelValue - props.step);
225
+ event.preventDefault();
226
+ break;
227
+ case "Home":
228
+ newValue = props.min;
229
+ event.preventDefault();
230
+ break;
231
+ case "End":
232
+ newValue = props.max;
233
+ event.preventDefault();
234
+ break;
235
+ case "PageUp":
236
+ newValue = Math.min(props.max, props.modelValue + props.step * 10);
237
+ event.preventDefault();
238
+ break;
239
+ case "PageDown":
240
+ newValue = Math.max(props.min, props.modelValue - props.step * 10);
241
+ event.preventDefault();
242
+ break;
243
+ default:
244
+ return;
245
+ }
246
+
247
+ if (newValue !== props.modelValue) {
248
+ emit("update:modelValue", newValue);
249
+ emit("change", { value: newValue });
250
+ }
251
+ };
252
+ </script>
@@ -0,0 +1,152 @@
1
+ @use "../../../dist/scss/tokens" as *;
2
+
3
+ $c: listbox;
4
+
5
+ .#{$c} {
6
+ display: flex;
7
+ flex-direction: column;
8
+ width: 100%;
9
+ background-color: var(--listbox-background-default, $listbox-background-default);
10
+ border: var(--listbox-border-width, $listbox-border-width) solid var(--listbox-border-color-default, $listbox-border-color-default);
11
+ border-radius: var(--listbox-radius, $listbox-radius);
12
+ overflow: hidden;
13
+ }
14
+
15
+ .#{$c}--disabled {
16
+ opacity: 0.6;
17
+ pointer-events: none;
18
+ background-color: var(--listbox-background-disabled, $listbox-background-disabled);
19
+ border-color: var(--listbox-border-color-disabled, $listbox-border-color-disabled);
20
+ }
21
+
22
+ // Filter
23
+ .#{$c}__filter {
24
+ position: relative;
25
+ padding: var(--listbox-padding, $listbox-padding);
26
+ border-bottom: 1px solid var(--listbox-filter-border, $listbox-filter-border);
27
+ }
28
+
29
+ .#{$c}__filter-input {
30
+ width: 100%;
31
+ height: var(--listbox-filter-height, $listbox-filter-height);
32
+ padding: 0 var(--listbox-filter-padding-x, $listbox-filter-padding-x);
33
+ padding-left: 32px;
34
+ background-color: var(--listbox-filter-background, $listbox-filter-background);
35
+ border: 1px solid var(--listbox-filter-border, $listbox-filter-border);
36
+ border-radius: var(--listbox-filter-radius, $listbox-filter-radius);
37
+ font-size: 14px;
38
+ color: var(--listbox-filter-text, $listbox-filter-text);
39
+
40
+ &::placeholder {
41
+ color: var(--listbox-filter-placeholder, $listbox-filter-placeholder);
42
+ }
43
+
44
+ &:focus {
45
+ outline: none;
46
+ border-color: var(--listbox-border-color-focus, $listbox-border-color-focus);
47
+ }
48
+ }
49
+
50
+ .#{$c}__filter-icon {
51
+ position: absolute;
52
+ left: calc(var(--listbox-padding, $listbox-padding) + 10px);
53
+ top: 50%;
54
+ transform: translateY(-50%);
55
+ color: var(--listbox-filter-placeholder, $listbox-filter-placeholder);
56
+ pointer-events: none;
57
+ }
58
+
59
+ // List container
60
+ .#{$c}__list {
61
+ max-height: var(--listbox-maxHeight, $listbox-maxHeight);
62
+ overflow-y: auto;
63
+ padding: var(--listbox-padding, $listbox-padding);
64
+ }
65
+
66
+ // Option
67
+ .#{$c}__option {
68
+ display: flex;
69
+ align-items: center;
70
+ padding: var(--listbox-option-padding-y, $listbox-option-padding-y) var(--listbox-option-padding-x, $listbox-option-padding-x);
71
+ background-color: var(--listbox-option-background-default, $listbox-option-background-default);
72
+ border-radius: var(--listbox-option-radius, $listbox-option-radius);
73
+ font-size: var(--listbox-option-fontSize, $listbox-option-fontSize);
74
+ color: var(--listbox-option-text-default, $listbox-option-text-default);
75
+ cursor: pointer;
76
+ transition: background-color 0.15s ease;
77
+ user-select: none;
78
+
79
+ &:hover:not(.#{$c}__option--disabled) {
80
+ background-color: var(--listbox-option-background-hover, $listbox-option-background-hover);
81
+ }
82
+
83
+ &:focus {
84
+ outline: none;
85
+ background-color: var(--listbox-option-background-focus, $listbox-option-background-focus);
86
+ }
87
+
88
+ &:focus-visible {
89
+ outline: 2px solid var(--listbox-focus-ringColor, $listbox-focus-ringColor);
90
+ outline-offset: -2px;
91
+ }
92
+ }
93
+
94
+ .#{$c}__option--selected {
95
+ background-color: var(--listbox-option-background-selected, $listbox-option-background-selected);
96
+ color: var(--listbox-option-text-selected, $listbox-option-text-selected);
97
+
98
+ &:hover {
99
+ background-color: var(--listbox-option-background-selected, $listbox-option-background-selected);
100
+ filter: brightness(0.95);
101
+ }
102
+ }
103
+
104
+ .#{$c}__option--disabled {
105
+ opacity: 0.5;
106
+ cursor: not-allowed;
107
+ color: var(--listbox-option-text-disabled, $listbox-option-text-disabled);
108
+ }
109
+
110
+ .#{$c}__option--focused {
111
+ background-color: var(--listbox-option-background-focus, $listbox-option-background-focus);
112
+ }
113
+
114
+ // Checkbox for multiple selection
115
+ .#{$c}__checkbox {
116
+ display: inline-flex;
117
+ align-items: center;
118
+ justify-content: center;
119
+ width: var(--listbox-checkbox-size, $listbox-checkbox-size);
120
+ height: var(--listbox-checkbox-size, $listbox-checkbox-size);
121
+ margin-right: var(--listbox-checkbox-marginRight, $listbox-checkbox-marginRight);
122
+ border: 1.5px solid currentColor;
123
+ border-radius: 3px;
124
+ flex-shrink: 0;
125
+
126
+ svg {
127
+ display: block;
128
+ }
129
+ }
130
+
131
+ .#{$c}__option--selected .#{$c}__checkbox {
132
+ background-color: currentColor;
133
+
134
+ svg {
135
+ color: var(--listbox-background-default, $listbox-background-default);
136
+ }
137
+ }
138
+
139
+ .#{$c}__option-label {
140
+ flex: 1;
141
+ white-space: nowrap;
142
+ overflow: hidden;
143
+ text-overflow: ellipsis;
144
+ }
145
+
146
+ // Empty state
147
+ .#{$c}__empty {
148
+ padding: var(--listbox-option-padding-y, $listbox-option-padding-y) var(--listbox-option-padding-x, $listbox-option-padding-x);
149
+ color: var(--listbox-option-text-disabled, $listbox-option-text-disabled);
150
+ text-align: center;
151
+ font-size: 14px;
152
+ }
@@ -0,0 +1,198 @@
1
+ <template>
2
+ <div
3
+ class="listbox"
4
+ :class="additionalClasses"
5
+ role="listbox"
6
+ :aria-multiselectable="multiple"
7
+ :aria-disabled="isDisabled"
8
+ >
9
+ <div v-if="filter" class="listbox__filter">
10
+ <input
11
+ v-model="filterValue"
12
+ type="text"
13
+ class="listbox__filter-input"
14
+ placeholder="Search..."
15
+ @input="onFilterInput"
16
+ />
17
+ <svg
18
+ class="listbox__filter-icon"
19
+ width="16"
20
+ height="16"
21
+ viewBox="0 0 16 16"
22
+ fill="none"
23
+ xmlns="http://www.w3.org/2000/svg"
24
+ >
25
+ <path
26
+ d="M7 12C9.76142 12 12 9.76142 12 7C12 4.23858 9.76142 2 7 2C4.23858 2 2 4.23858 2 7C2 9.76142 4.23858 12 7 12Z"
27
+ stroke="currentColor"
28
+ stroke-width="1.5"
29
+ stroke-linecap="round"
30
+ stroke-linejoin="round"
31
+ />
32
+ <path
33
+ d="M14 14L10.5 10.5"
34
+ stroke="currentColor"
35
+ stroke-width="1.5"
36
+ stroke-linecap="round"
37
+ stroke-linejoin="round"
38
+ />
39
+ </svg>
40
+ </div>
41
+ <div class="listbox__list" role="group">
42
+ <div
43
+ v-for="(option, index) in filteredOptions"
44
+ :key="getOptionValue(option)"
45
+ class="listbox__option"
46
+ :class="{
47
+ 'listbox__option--selected': isSelected(option),
48
+ 'listbox__option--focused': focusedIndex === index,
49
+ 'listbox__option--disabled': option.disabled,
50
+ }"
51
+ role="option"
52
+ :aria-selected="isSelected(option)"
53
+ :aria-disabled="option.disabled"
54
+ :tabindex="option.disabled ? -1 : 0"
55
+ @click="!option.disabled && selectOption(option)"
56
+ @keydown="onOptionKeydown($event, option, index)"
57
+ >
58
+ <span v-if="multiple" class="listbox__checkbox">
59
+ <svg
60
+ v-if="isSelected(option)"
61
+ width="12"
62
+ height="12"
63
+ viewBox="0 0 12 12"
64
+ fill="none"
65
+ xmlns="http://www.w3.org/2000/svg"
66
+ >
67
+ <path
68
+ d="M2.5 6L5 8.5L9.5 3.5"
69
+ stroke="currentColor"
70
+ stroke-width="1.5"
71
+ stroke-linecap="round"
72
+ stroke-linejoin="round"
73
+ />
74
+ </svg>
75
+ </span>
76
+ <span class="listbox__option-label">{{ getOptionLabel(option) }}</span>
77
+ </div>
78
+ <div v-if="filteredOptions.length === 0" class="listbox__empty">
79
+ No results found
80
+ </div>
81
+ </div>
82
+ </div>
83
+ </template>
84
+
85
+ <style src="./ListBox.scss"></style>
86
+
87
+ <script setup lang="ts">
88
+ import type { ListBoxProps, ListBoxEmits } from '../../types';
89
+ import { computed, ref } from "vue";
90
+
91
+ defineOptions({ name: 'FtpListBox' });
92
+
93
+ const props = withDefaults(defineProps<ListBoxProps>(), {
94
+ modelValue: null,
95
+ options: () => [],
96
+ optionLabel: "label",
97
+ optionValue: "value",
98
+ multiple: false,
99
+ filter: false,
100
+ isDisabled: false,
101
+ });
102
+
103
+ const emit = defineEmits(["update:modelValue", "change", "filter"]);
104
+
105
+ const filterValue = ref("");
106
+ const focusedIndex = ref(-1);
107
+
108
+ const getOptionLabel = (option: any) => {
109
+ if (typeof option === "string" || typeof option === "number") {
110
+ return option;
111
+ }
112
+ return option[props.optionLabel];
113
+ };
114
+
115
+ const getOptionValue = (option: any) => {
116
+ if (typeof option === "string" || typeof option === "number") {
117
+ return option;
118
+ }
119
+ return option[props.optionValue];
120
+ };
121
+
122
+ const filteredOptions = computed((): any[] => {
123
+ if (!filterValue.value) {
124
+ return props.options;
125
+ }
126
+ const searchTerm = filterValue.value.toLowerCase();
127
+ return props.options.filter((option) => {
128
+ const label = getOptionLabel(option);
129
+ return String(label).toLowerCase().includes(searchTerm);
130
+ });
131
+ });
132
+
133
+ const isSelected = (option: any) => {
134
+ const value = getOptionValue(option);
135
+ if (props.multiple) {
136
+ return Array.isArray(props.modelValue) && props.modelValue.includes(value);
137
+ }
138
+ return props.modelValue === value;
139
+ };
140
+
141
+ const selectOption = (option: any) => {
142
+ if (props.isDisabled || option.disabled) return;
143
+
144
+ const value = getOptionValue(option);
145
+
146
+ if (props.multiple) {
147
+ const currentValue = Array.isArray(props.modelValue) ? [...props.modelValue] : [];
148
+ const index = currentValue.indexOf(value);
149
+
150
+ if (index > -1) {
151
+ currentValue.splice(index, 1);
152
+ } else {
153
+ currentValue.push(value);
154
+ }
155
+
156
+ emit("update:modelValue", currentValue);
157
+ emit("change", { value: currentValue, originalEvent: event });
158
+ } else {
159
+ emit("update:modelValue", value);
160
+ emit("change", { value, originalEvent: event });
161
+ }
162
+ };
163
+
164
+ const onFilterInput = (event: Event) => {
165
+ emit("filter", { value: filterValue.value, originalEvent: event });
166
+ };
167
+
168
+ const onOptionKeydown = (event: KeyboardEvent, option: any, index: any) => {
169
+ if (event.key === "Enter" || event.key === " ") {
170
+ event.preventDefault();
171
+ if (!option.disabled) {
172
+ selectOption(option);
173
+ }
174
+ } else if (event.key === "ArrowDown") {
175
+ event.preventDefault();
176
+ const nextIndex = Math.min(index + 1, filteredOptions.value.length - 1);
177
+ focusedIndex.value = nextIndex;
178
+ focusOption(nextIndex);
179
+ } else if (event.key === "ArrowUp") {
180
+ event.preventDefault();
181
+ const prevIndex = Math.max(index - 1, 0);
182
+ focusedIndex.value = prevIndex;
183
+ focusOption(prevIndex);
184
+ }
185
+ };
186
+
187
+ const focusOption = (index: any) => {
188
+ const options = document.querySelectorAll(".listbox__option");
189
+ if (options[index]) {
190
+ (options[index] as HTMLElement).focus();
191
+ }
192
+ };
193
+
194
+ const additionalClasses = computed(() => [
195
+ props.isDisabled && "listbox--disabled",
196
+ props.multiple && "listbox--multiple",
197
+ ].filter(Boolean).join(" "));
198
+ </script>
@@ -0,0 +1,64 @@
1
+ @use "../../../dist/scss/tokens" as *;
2
+
3
+ $c: logo-cloud;
4
+
5
+ .#{$c} {
6
+ display: flex;
7
+ flex-direction: column;
8
+ align-items: center;
9
+ gap: 2rem;
10
+ width: 100%;
11
+ }
12
+
13
+ .#{$c}__title {
14
+ font-size: 0.875rem;
15
+ font-weight: 600;
16
+ color: $text-muted;
17
+ text-transform: uppercase;
18
+ letter-spacing: 0.08em;
19
+ margin: 0;
20
+ }
21
+
22
+ .#{$c}__grid {
23
+ display: grid;
24
+ gap: 2rem;
25
+ width: 100%;
26
+ align-items: center;
27
+ justify-items: center;
28
+ }
29
+
30
+ .#{$c}__grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
31
+ .#{$c}__grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
32
+ .#{$c}__grid--cols-5 { grid-template-columns: repeat(5, 1fr); }
33
+ .#{$c}__grid--cols-6 { grid-template-columns: repeat(6, 1fr); }
34
+
35
+ @media (max-width: 768px) {
36
+ .#{$c}__grid { grid-template-columns: repeat(2, 1fr) !important; }
37
+ }
38
+
39
+ .#{$c}__item {
40
+ display: flex;
41
+ align-items: center;
42
+ justify-content: center;
43
+ text-decoration: none;
44
+ transition: opacity 0.2s ease;
45
+
46
+ &:hover { opacity: 1; }
47
+ }
48
+
49
+ .#{$c}__img {
50
+ max-height: 2.5rem;
51
+ max-width: 100%;
52
+ object-fit: contain;
53
+ }
54
+
55
+ .#{$c}--grayscale .#{$c}__img {
56
+ filter: grayscale(1) brightness(0.7);
57
+ opacity: 0.6;
58
+ transition: filter 0.2s ease, opacity 0.2s ease;
59
+ }
60
+
61
+ .#{$c}--grayscale .#{$c}__item:hover .#{$c}__img {
62
+ filter: grayscale(0) brightness(1);
63
+ opacity: 1;
64
+ }
@@ -0,0 +1,35 @@
1
+ <template>
2
+ <div class="logo-cloud" :class="additionalClasses">
3
+ <p v-if="title" class="logo-cloud__title">{{ title }}</p>
4
+ <div class="logo-cloud__grid" :class="`logo-cloud__grid--cols-${columns}`">
5
+ <component
6
+ :is="logo.href ? 'a' : 'div'"
7
+ v-for="(logo, i) in logos"
8
+ :key="i"
9
+ class="logo-cloud__item"
10
+ v-bind="logo.href ? { href: logo.href, target: '_blank', rel: 'noopener noreferrer' } : {}"
11
+ >
12
+ <img :src="logo.src" :alt="logo.alt" class="logo-cloud__img" />
13
+ </component>
14
+ </div>
15
+ </div>
16
+ </template>
17
+
18
+ <style src="./LogoCloud.scss"></style>
19
+
20
+ <script setup lang="ts">
21
+ import type { LogoCloudProps } from '../../types';
22
+ import { computed } from 'vue';
23
+
24
+ defineOptions({ name: 'FtpLogoCloud' });
25
+
26
+ const props = withDefaults(defineProps<LogoCloudProps>(), {
27
+ logos: () => [],
28
+ columns: 5,
29
+ grayscale: false,
30
+ });
31
+
32
+ const additionalClasses = computed(() =>
33
+ [props.grayscale && 'logo-cloud--grayscale'].filter(Boolean).join(' ')
34
+ );
35
+ </script>