@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,455 @@
1
+ <template>
2
+ <div ref="containerRef" class="calendar" :class="additionalClasses">
3
+ <!-- Input trigger -->
4
+ <div v-if="!inline" class="calendar__input-wrapper" @click="togglePanel">
5
+ <input
6
+ ref="inputRef"
7
+ class="calendar__input"
8
+ type="text"
9
+ :value="displayValue"
10
+ :placeholder="placeholder"
11
+ :disabled="isDisabled"
12
+ :aria-invalid="isInvalid || undefined"
13
+ readonly
14
+ @focus="onInputFocus"
15
+ @blur="onInputBlur"
16
+ />
17
+ <span class="calendar__input-icon">
18
+ <svg
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
+ <rect x="2" y="3" width="12" height="11" rx="2" stroke="currentColor" stroke-width="1.5" />
26
+ <path d="M2 6H14" stroke="currentColor" stroke-width="1.5" />
27
+ <path d="M5 1V3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" />
28
+ <path d="M11 1V3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" />
29
+ </svg>
30
+ </span>
31
+ </div>
32
+
33
+ <!-- Calendar panel -->
34
+ <Teleport :to="inline ? null : 'body'" :disabled="inline">
35
+ <div
36
+ v-if="inline || isPanelOpen"
37
+ ref="panelRef"
38
+ class="calendar__panel"
39
+ :class="{ 'calendar__panel--inline': inline }"
40
+ :style="!inline ? panelStyle : {}"
41
+ >
42
+ <!-- Header with navigation -->
43
+ <div class="calendar__header">
44
+ <button
45
+ type="button"
46
+ class="calendar__nav calendar__nav--prev"
47
+ aria-label="Previous month"
48
+ @click="navigateMonth(-1)"
49
+ >
50
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none">
51
+ <path d="M10 4L6 8L10 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
52
+ </svg>
53
+ </button>
54
+
55
+ <div class="calendar__title">
56
+ <button type="button" class="calendar__title-btn" @click="toggleView">
57
+ {{ monthNames[viewDate.getMonth()] }} {{ viewDate.getFullYear() }}
58
+ </button>
59
+ </div>
60
+
61
+ <button
62
+ type="button"
63
+ class="calendar__nav calendar__nav--next"
64
+ aria-label="Next month"
65
+ @click="navigateMonth(1)"
66
+ >
67
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none">
68
+ <path d="M6 4L10 8L6 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
69
+ </svg>
70
+ </button>
71
+ </div>
72
+
73
+ <!-- Day view -->
74
+ <div v-if="currentView === 'day'" class="calendar__body" role="grid" aria-label="Calendar">
75
+ <div class="calendar__weekdays" role="row">
76
+ <span v-for="day in weekdayNames" :key="day" class="calendar__weekday" role="columnheader">
77
+ {{ day }}
78
+ </span>
79
+ </div>
80
+ <div class="calendar__days">
81
+ <button
82
+ v-for="(day, index) in calendarDays"
83
+ :key="index"
84
+ type="button"
85
+ class="calendar__day"
86
+ :class="getDayClasses(day)"
87
+ :disabled="!day.currentMonth"
88
+ :aria-label="day.currentMonth ? formatFullDate(day.date) : undefined"
89
+ :aria-selected="isSelected(day.date) || undefined"
90
+ @click="selectDate(day)"
91
+ >
92
+ {{ day.day }}
93
+ </button>
94
+ </div>
95
+ </div>
96
+
97
+ <!-- Month view -->
98
+ <div v-else-if="currentView === 'month'" class="calendar__months">
99
+ <button
100
+ v-for="(month, index) in monthNames"
101
+ :key="index"
102
+ type="button"
103
+ class="calendar__month"
104
+ :class="{ 'calendar__month--selected': isCurrentMonth(index) }"
105
+ @click="selectMonth(index)"
106
+ >
107
+ {{ month.substring(0, 3) }}
108
+ </button>
109
+ </div>
110
+
111
+ <!-- Year view -->
112
+ <div v-else-if="currentView === 'year'" class="calendar__years">
113
+ <button
114
+ v-for="year in yearRange"
115
+ :key="year"
116
+ type="button"
117
+ class="calendar__year"
118
+ :class="{ 'calendar__year--selected': isCurrentYear(year) }"
119
+ @click="selectYear(year)"
120
+ >
121
+ {{ year }}
122
+ </button>
123
+ </div>
124
+
125
+ <!-- Footer with today button -->
126
+ <div v-if="showTodayButton" class="calendar__footer">
127
+ <button type="button" class="calendar__today-btn" @click="goToToday">
128
+ Today
129
+ </button>
130
+ </div>
131
+ </div>
132
+ </Teleport>
133
+ </div>
134
+ </template>
135
+
136
+ <style src="./Calendar.scss"></style>
137
+
138
+ <script setup lang="ts">
139
+ import type { CalendarProps, CalendarEmits } from '../../types';
140
+ import { computed, ref, watch, onMounted, onUnmounted } from "vue";
141
+
142
+ defineOptions({ name: 'FtpCalendar' });
143
+
144
+ const props = withDefaults(defineProps<CalendarProps>(), {
145
+ modelValue: null,
146
+ placeholder: "Select date",
147
+ dateFormat: "dd/mm/yyyy",
148
+ selectionMode: "single",
149
+ minDate: null,
150
+ maxDate: null,
151
+ inline: false,
152
+ showTodayButton: false,
153
+ size: "md",
154
+ isDisabled: false,
155
+ isInvalid: false,
156
+ });
157
+
158
+ const emit = defineEmits(["update:modelValue", "select", "show", "hide"]);
159
+
160
+ const containerRef = ref<HTMLElement | null>(null);
161
+ const inputRef = ref<HTMLInputElement | null>(null);
162
+ const panelRef = ref<HTMLElement | null>(null);
163
+ const isPanelOpen = ref(false);
164
+ const isFocused = ref(false);
165
+ const viewDate = ref(new Date());
166
+ const currentView = ref("day");
167
+ const panelStyle = ref({});
168
+
169
+ const monthNames = [
170
+ "January", "February", "March", "April", "May", "June",
171
+ "July", "August", "September", "October", "November", "December"
172
+ ];
173
+
174
+ const weekdayNames = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
175
+
176
+ const today = new Date();
177
+ today.setHours(0, 0, 0, 0);
178
+
179
+ const formatDate = (date: any) => {
180
+ if (!date) return "";
181
+ const d = new Date(date);
182
+ const day = String(d.getDate()).padStart(2, "0");
183
+ const month = String(d.getMonth() + 1).padStart(2, "0");
184
+ const year = d.getFullYear();
185
+
186
+ return props.dateFormat
187
+ .replace("dd", day)
188
+ .replace("mm", month)
189
+ .replace("yyyy", String(year));
190
+ };
191
+
192
+ const formatFullDate = (date: any) => {
193
+ if (!date) return "";
194
+ return date.toLocaleDateString("en-US", { weekday: "long", year: "numeric", month: "long", day: "numeric" });
195
+ };
196
+
197
+ const displayValue = computed(() => {
198
+ if (!props.modelValue) return "";
199
+ if (props.selectionMode === "range" && Array.isArray(props.modelValue)) {
200
+ const [start, end] = props.modelValue;
201
+ if (start && end) {
202
+ return `${formatDate(start)} - ${formatDate(end)}`;
203
+ }
204
+ if (start) {
205
+ return formatDate(start);
206
+ }
207
+ return "";
208
+ }
209
+ return formatDate(props.modelValue);
210
+ });
211
+
212
+ const calendarDays = computed(() => {
213
+ const year = viewDate.value.getFullYear();
214
+ const month = viewDate.value.getMonth();
215
+
216
+ const firstDay = new Date(year, month, 1);
217
+ const lastDay = new Date(year, month + 1, 0);
218
+ const startOffset = firstDay.getDay();
219
+
220
+ const days = [];
221
+
222
+ // Previous month days
223
+ const prevMonth = new Date(year, month, 0);
224
+ for (let i = startOffset - 1; i >= 0; i--) {
225
+ days.push({
226
+ day: prevMonth.getDate() - i,
227
+ date: new Date(year, month - 1, prevMonth.getDate() - i),
228
+ currentMonth: false,
229
+ });
230
+ }
231
+
232
+ // Current month days
233
+ for (let i = 1; i <= lastDay.getDate(); i++) {
234
+ days.push({
235
+ day: i,
236
+ date: new Date(year, month, i),
237
+ currentMonth: true,
238
+ });
239
+ }
240
+
241
+ // Next month days
242
+ const remaining = 42 - days.length;
243
+ for (let i = 1; i <= remaining; i++) {
244
+ days.push({
245
+ day: i,
246
+ date: new Date(year, month + 1, i),
247
+ currentMonth: false,
248
+ });
249
+ }
250
+
251
+ return days;
252
+ });
253
+
254
+ const yearRange = computed(() => {
255
+ const currentYear = viewDate.value.getFullYear();
256
+ const startYear = currentYear - 6;
257
+ const years = [];
258
+ for (let i = 0; i < 12; i++) {
259
+ years.push(startYear + i);
260
+ }
261
+ return years;
262
+ });
263
+
264
+ const isSameDay = (date1: any, date2: any) => {
265
+ if (!date1 || !date2) return false;
266
+ return (
267
+ date1.getDate() === date2.getDate() &&
268
+ date1.getMonth() === date2.getMonth() &&
269
+ date1.getFullYear() === date2.getFullYear()
270
+ );
271
+ };
272
+
273
+ const isDateInRange = (date: any) => {
274
+ if (props.selectionMode !== "range" || !Array.isArray(props.modelValue)) return false;
275
+ const [start, end] = props.modelValue;
276
+ if (!start || !end) return false;
277
+ return date > start && date < end;
278
+ };
279
+
280
+ const isSelected = (date: any) => {
281
+ if (!props.modelValue) return false;
282
+ if (props.selectionMode === "range" && Array.isArray(props.modelValue)) {
283
+ return props.modelValue.some((d) => d && isSameDay(d, date));
284
+ }
285
+ return isSameDay(props.modelValue, date);
286
+ };
287
+
288
+ const getDayClasses = (day: any) => {
289
+ return {
290
+ "calendar__day--other-month": !day.currentMonth,
291
+ "calendar__day--today": isSameDay(day.date, today),
292
+ "calendar__day--selected": isSelected(day.date),
293
+ "calendar__day--in-range": isDateInRange(day.date),
294
+ };
295
+ };
296
+
297
+ const isCurrentMonth = (monthIndex: any) => {
298
+ const selected = props.modelValue instanceof Date ? props.modelValue : null;
299
+ return selected && selected.getMonth() === monthIndex && selected.getFullYear() === viewDate.value.getFullYear();
300
+ };
301
+
302
+ const isCurrentYear = (year: any) => {
303
+ const selected = props.modelValue instanceof Date ? props.modelValue : null;
304
+ return selected && selected.getFullYear() === year;
305
+ };
306
+
307
+ const updatePanelPosition = () => {
308
+ if (!containerRef.value || props.inline) return;
309
+ const rect = containerRef.value.getBoundingClientRect();
310
+ panelStyle.value = {
311
+ position: "fixed",
312
+ top: `${rect.bottom + 4}px`,
313
+ left: `${rect.left}px`,
314
+ zIndex: 1000,
315
+ };
316
+ };
317
+
318
+ const togglePanel = () => {
319
+ if (props.isDisabled) return;
320
+ if (isPanelOpen.value) {
321
+ closePanel();
322
+ } else {
323
+ openPanel();
324
+ }
325
+ };
326
+
327
+ const openPanel = () => {
328
+ isPanelOpen.value = true;
329
+ currentView.value = "day";
330
+ if (props.modelValue instanceof Date) {
331
+ viewDate.value = new Date(props.modelValue);
332
+ }
333
+ updatePanelPosition();
334
+ emit("show");
335
+ };
336
+
337
+ const closePanel = () => {
338
+ isPanelOpen.value = false;
339
+ emit("hide");
340
+ };
341
+
342
+ const toggleView = () => {
343
+ if (currentView.value === "day") {
344
+ currentView.value = "month";
345
+ } else if (currentView.value === "month") {
346
+ currentView.value = "year";
347
+ } else {
348
+ currentView.value = "day";
349
+ }
350
+ };
351
+
352
+ const navigateMonth = (offset: any) => {
353
+ const newDate = new Date(viewDate.value);
354
+ newDate.setMonth(newDate.getMonth() + offset);
355
+ viewDate.value = newDate;
356
+ };
357
+
358
+ const selectDate = (day: any) => {
359
+ if (!day.currentMonth) return;
360
+
361
+ if (props.selectionMode === "range") {
362
+ const current = Array.isArray(props.modelValue) ? [...props.modelValue] : [null, null];
363
+ if (!current[0] || (current[0] && current[1])) {
364
+ emit("update:modelValue", [day.date, null]);
365
+ } else {
366
+ const start = current[0];
367
+ if (day.date < start) {
368
+ emit("update:modelValue", [day.date, start]);
369
+ } else {
370
+ emit("update:modelValue", [start, day.date]);
371
+ }
372
+ if (!props.inline) closePanel();
373
+ }
374
+ } else {
375
+ emit("update:modelValue", day.date);
376
+ emit("select", { value: day.date });
377
+ if (!props.inline) closePanel();
378
+ }
379
+ };
380
+
381
+ const selectMonth = (monthIndex: any) => {
382
+ const newDate = new Date(viewDate.value);
383
+ newDate.setMonth(monthIndex);
384
+ viewDate.value = newDate;
385
+ currentView.value = "day";
386
+ };
387
+
388
+ const selectYear = (year: any) => {
389
+ const newDate = new Date(viewDate.value);
390
+ newDate.setFullYear(year);
391
+ viewDate.value = newDate;
392
+ currentView.value = "month";
393
+ };
394
+
395
+ const goToToday = () => {
396
+ viewDate.value = new Date();
397
+ if (props.selectionMode === "single") {
398
+ selectDate({ date: new Date(), currentMonth: true });
399
+ }
400
+ };
401
+
402
+ const onInputFocus = () => {
403
+ isFocused.value = true;
404
+ };
405
+
406
+ const onInputBlur = () => {
407
+ isFocused.value = false;
408
+ };
409
+
410
+ // Click outside handler
411
+ const handleClickOutside = (event: MouseEvent) => {
412
+ if (!containerRef.value || !panelRef.value) return;
413
+ if (
414
+ !containerRef.value.contains(event.target as Node) &&
415
+ !panelRef.value.contains(event.target as Node)
416
+ ) {
417
+ closePanel();
418
+ }
419
+ };
420
+
421
+ const handleScroll = () => {
422
+ if (isPanelOpen.value && !props.inline) {
423
+ updatePanelPosition();
424
+ }
425
+ };
426
+
427
+ onMounted(() => {
428
+ document.addEventListener("mousedown", handleClickOutside);
429
+ window.addEventListener("scroll", handleScroll, true);
430
+ window.addEventListener("resize", handleScroll);
431
+ });
432
+
433
+ onUnmounted(() => {
434
+ document.removeEventListener("mousedown", handleClickOutside);
435
+ window.removeEventListener("scroll", handleScroll, true);
436
+ window.removeEventListener("resize", handleScroll);
437
+ });
438
+
439
+ const additionalClasses = computed(() =>
440
+ [
441
+ `calendar--size-${props.size}`,
442
+ props.inline && "calendar--inline",
443
+ isFocused.value && "calendar--focused",
444
+ props.isDisabled && "calendar--disabled",
445
+ props.isInvalid && "calendar--invalid",
446
+ ]
447
+ .filter(Boolean)
448
+ .join(" ")
449
+ );
450
+
451
+ defineExpose({
452
+ show: openPanel,
453
+ hide: closePanel,
454
+ });
455
+ </script>
@@ -0,0 +1,66 @@
1
+ @use "../../../dist/scss/tokens" as *;
2
+ @use "../../scss/mixins/elevation" as *;
3
+
4
+ $c: card;
5
+
6
+ .#{$c} {
7
+ @include elevation(1);
8
+ // Component token overrides
9
+ background-color: var(--card-background, $card-background);
10
+ border-color: var(--card-border-color, $card-border-color);
11
+ border-width: var(--card-border-width, $card-border-width);
12
+ border-radius: var(--card-radius, $card-radius);
13
+ box-shadow: var(--card-shadow, $card-shadow);
14
+ overflow: hidden;
15
+ }
16
+
17
+ // Highlighted variant with vibrant gradient border and glow
18
+ .#{$c}--highlighted {
19
+ position: relative;
20
+ border: none;
21
+ background: linear-gradient(var(--card-background, $card-background), var(--card-background, $card-background)) padding-box,
22
+ linear-gradient(135deg, var(--card-highlighted-border-start, $card-highlighted-border-start), var(--card-highlighted-border-end, $card-highlighted-border-end)) border-box;
23
+ border: var(--card-highlighted-border-width, $card-highlighted-border-width) solid transparent;
24
+ box-shadow: var(--card-highlighted-glow, $card-highlighted-glow);
25
+ }
26
+
27
+ .#{$c}__header {
28
+ padding: var(--card-header-padding, $card-header-padding);
29
+ border-bottom: var(--card-header-borderWidth, $card-header-borderWidth) solid var(--card-header-borderColor, $card-header-borderColor);
30
+ }
31
+
32
+ .#{$c}__body {
33
+ padding: var(--card-body-padding, $card-body-padding);
34
+ display: flex;
35
+ flex-direction: column;
36
+ gap: var(--card-body-gap, $card-body-gap);
37
+ }
38
+
39
+ .#{$c}__caption {
40
+ display: flex;
41
+ flex-direction: column;
42
+ }
43
+
44
+ .#{$c}__title {
45
+ color: var(--card-title-color, $card-title-color);
46
+ font-size: var(--card-title-fontSize, $card-title-fontSize);
47
+ font-weight: var(--card-title-fontWeight, $card-title-fontWeight);
48
+ line-height: var(--card-title-lineHeight, $card-title-lineHeight);
49
+ margin: 0;
50
+ }
51
+
52
+ .#{$c}__subtitle {
53
+ color: var(--card-subtitle-color, $card-subtitle-color);
54
+ font-size: var(--card-subtitle-fontSize, $card-subtitle-fontSize);
55
+ font-weight: var(--card-subtitle-fontWeight, $card-subtitle-fontWeight);
56
+ margin-top: var(--card-subtitle-marginTop, $card-subtitle-marginTop);
57
+ }
58
+
59
+ .#{$c}__content {
60
+ color: var(--card-content-color, $card-content-color);
61
+ }
62
+
63
+ .#{$c}__footer {
64
+ padding: var(--card-footer-padding, $card-footer-padding);
65
+ border-top: var(--card-footer-borderWidth, $card-footer-borderWidth) solid var(--card-footer-borderColor, $card-footer-borderColor);
66
+ }
@@ -0,0 +1,48 @@
1
+ <template>
2
+ <article class="card" :class="additionalClasses" :aria-labelledby="$slots.title ? cardTitleId : undefined">
3
+ <div v-if="$slots.header" class="card__header">
4
+ <slot name="header" />
5
+ </div>
6
+ <div class="card__body">
7
+ <div v-if="$slots.title || $slots.subtitle" class="card__caption">
8
+ <div v-if="$slots.title" :id="cardTitleId" class="card__title">
9
+ <slot name="title" />
10
+ </div>
11
+ <div v-if="$slots.subtitle" class="card__subtitle">
12
+ <slot name="subtitle" />
13
+ </div>
14
+ </div>
15
+ <div v-if="$slots.content || $slots.default" class="card__content">
16
+ <slot name="content">
17
+ <slot />
18
+ </slot>
19
+ </div>
20
+ </div>
21
+ <div v-if="$slots.footer" class="card__footer">
22
+ <slot name="footer" />
23
+ </div>
24
+ </article>
25
+ </template>
26
+
27
+ <style src="./Card.scss"></style>
28
+
29
+ <script setup lang="ts">
30
+ import type { CardProps } from '../../types';
31
+ import { computed } from "vue";
32
+
33
+ defineOptions({ name: 'FtpCard' });
34
+
35
+ const cardTitleId = `card-title-${Math.random().toString(36).substring(2, 9)}`;
36
+
37
+ const props = withDefaults(defineProps<CardProps>(), {
38
+ variant: "default",
39
+ });
40
+
41
+ const additionalClasses = computed(() =>
42
+ [
43
+ props.variant !== "default" && `card--${props.variant}`,
44
+ ]
45
+ .filter(Boolean)
46
+ .join(" ")
47
+ );
48
+ </script>
@@ -0,0 +1,121 @@
1
+ @use "../../../dist/scss/tokens" as *;
2
+
3
+ $c: carousel;
4
+
5
+ .#{$c} {
6
+ display: flex;
7
+ flex-direction: column;
8
+ background: var(--carousel-container-background, $carousel-container-background);
9
+ border-radius: var(--carousel-container-radius, $carousel-container-radius);
10
+ }
11
+
12
+ .#{$c}__container {
13
+ display: flex;
14
+ align-items: center;
15
+ position: relative;
16
+ }
17
+
18
+ .#{$c}__viewport {
19
+ flex: 1;
20
+ overflow: hidden;
21
+ padding: var(--carousel-content-padding, $carousel-content-padding);
22
+ }
23
+
24
+ .#{$c}__track {
25
+ display: flex;
26
+ gap: var(--carousel-content-gap, $carousel-content-gap);
27
+ transition: transform var(--carousel-transition-duration, $carousel-transition-duration) ease;
28
+ }
29
+
30
+ .#{$c}--orientation-vertical {
31
+ .#{$c}__container {
32
+ flex-direction: column;
33
+ }
34
+
35
+ .#{$c}__track {
36
+ flex-direction: column;
37
+ }
38
+
39
+ .#{$c}__navigator--prev {
40
+ position: relative;
41
+ top: auto;
42
+ left: auto;
43
+ transform: rotate(90deg);
44
+ }
45
+
46
+ .#{$c}__navigator--next {
47
+ position: relative;
48
+ bottom: auto;
49
+ right: auto;
50
+ transform: rotate(90deg);
51
+ }
52
+ }
53
+
54
+ .#{$c}__item {
55
+ flex: 0 0 100%;
56
+ min-width: 0;
57
+ background: var(--carousel-item-background, $carousel-item-background);
58
+ border-radius: var(--carousel-item-radius, $carousel-item-radius);
59
+ padding: var(--carousel-item-padding, $carousel-item-padding);
60
+ }
61
+
62
+ .#{$c}__navigator {
63
+ display: flex;
64
+ align-items: center;
65
+ justify-content: center;
66
+ width: var(--carousel-navigator-size, $carousel-navigator-size);
67
+ height: var(--carousel-navigator-size, $carousel-navigator-size);
68
+ padding: 0;
69
+ border: var(--carousel-navigator-border-width, $carousel-navigator-border-width) solid
70
+ var(--carousel-navigator-border-color, $carousel-navigator-border-color);
71
+ border-radius: var(--carousel-navigator-radius, $carousel-navigator-radius);
72
+ background: var(--carousel-navigator-background-default, $carousel-navigator-background-default);
73
+ color: var(--carousel-navigator-color-default, $carousel-navigator-color-default);
74
+ cursor: pointer;
75
+ transition: all 150ms ease;
76
+ z-index: 1;
77
+ flex-shrink: 0;
78
+
79
+ &:hover:not(:disabled) {
80
+ background: var(--carousel-navigator-background-hover, $carousel-navigator-background-hover);
81
+ color: var(--carousel-navigator-color-hover, $carousel-navigator-color-hover);
82
+ }
83
+
84
+ &:disabled {
85
+ background: var(--carousel-navigator-background-disabled, $carousel-navigator-background-disabled);
86
+ color: var(--carousel-navigator-color-disabled, $carousel-navigator-color-disabled);
87
+ cursor: not-allowed;
88
+ opacity: 0.5;
89
+ }
90
+
91
+ svg {
92
+ width: var(--carousel-navigator-iconSize, $carousel-navigator-iconSize);
93
+ height: var(--carousel-navigator-iconSize, $carousel-navigator-iconSize);
94
+ }
95
+ }
96
+
97
+ .#{$c}__indicators {
98
+ display: flex;
99
+ justify-content: center;
100
+ gap: var(--carousel-indicator-gap, $carousel-indicator-gap);
101
+ margin-top: var(--carousel-indicator-marginTop, $carousel-indicator-marginTop);
102
+ }
103
+
104
+ .#{$c}__indicator {
105
+ width: var(--carousel-indicator-size, $carousel-indicator-size);
106
+ height: var(--carousel-indicator-size, $carousel-indicator-size);
107
+ padding: 0;
108
+ border: none;
109
+ border-radius: 50%;
110
+ background: var(--carousel-indicator-background-default, $carousel-indicator-background-default);
111
+ cursor: pointer;
112
+ transition: background-color 150ms ease;
113
+
114
+ &:hover {
115
+ background: var(--carousel-indicator-background-hover, $carousel-indicator-background-hover);
116
+ }
117
+ }
118
+
119
+ .#{$c}__indicator--active {
120
+ background: var(--carousel-indicator-background-active, $carousel-indicator-background-active);
121
+ }