fluency-v8-components 1.3.5 → 1.3.7

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 (178) hide show
  1. package/dist/fluency-v8-components.es.js +1 -1
  2. package/dist/fluency-v8-components.umd.js +99 -99
  3. package/dist/{index-q2NbjdVo.mjs → index-ChEFiXF5.mjs} +12 -11
  4. package/dist/{index.es-PAPL4E6Y.mjs → index.es-CjjN70eV.mjs} +1 -1
  5. package/package.json +3 -2
  6. package/src/assets/images/ai.svg +1 -0
  7. package/src/assets/images/github-dark.svg +1 -0
  8. package/src/assets/images/github.svg +1 -0
  9. package/src/assets/images/high-priority.svg +1 -0
  10. package/src/assets/images/power-off.svg +1 -0
  11. package/src/assets/images/save.svg +1 -0
  12. package/src/assets/index.ts +15 -0
  13. package/src/assets/main.css +495 -0
  14. package/src/assets/prism-theme.css +290 -0
  15. package/src/components/buttons/ActionButtons.vue +374 -0
  16. package/src/components/buttons/DropdownButton.vue +104 -0
  17. package/src/components/buttons/IconButton.vue +63 -0
  18. package/src/components/buttons/ImageButton.vue +16 -0
  19. package/src/components/buttons/MenuButton.vue +138 -0
  20. package/src/components/buttons/SubmitButtons.vue +51 -0
  21. package/src/components/buttons/TextButton.vue +40 -0
  22. package/src/components/charts/AlertChart.vue +376 -0
  23. package/src/components/charts/BarChart.vue +212 -0
  24. package/src/components/charts/BarChartHorizontal.vue +243 -0
  25. package/src/components/charts/CronChart.vue +146 -0
  26. package/src/components/charts/EmptyChart.vue +76 -0
  27. package/src/components/charts/GradientChart.vue +310 -0
  28. package/src/components/charts/LineChart.test.js +59 -0
  29. package/src/components/charts/LineChart.vue +434 -0
  30. package/src/components/charts/PieChart.vue +293 -0
  31. package/src/components/charts/ProgressChart.vue +106 -0
  32. package/src/components/charts/StackedChart.vue +364 -0
  33. package/src/components/charts/StackedChartClustered.vue +395 -0
  34. package/src/components/charts/TimelineChart.vue +215 -0
  35. package/src/components/charts/WorkflowChart.vue +520 -0
  36. package/src/components/common/AutoCompleteSearchBar.vue +100 -0
  37. package/src/components/common/AutoRefreshButton.vue +53 -0
  38. package/src/components/common/Breadcrumb.vue +45 -0
  39. package/src/components/common/ButtonToggle.vue +24 -0
  40. package/src/components/common/Card.vue +116 -0
  41. package/src/components/common/Carousel.vue +66 -0
  42. package/src/components/common/CategoryCard.vue +28 -0
  43. package/src/components/common/CodeEditor.vue +59 -0
  44. package/src/components/common/DatePicker.vue +21 -0
  45. package/src/components/common/DatePickerInput.vue +109 -0
  46. package/src/components/common/Dialog.vue +103 -0
  47. package/src/components/common/EditorHeading.vue +10 -0
  48. package/src/components/common/EventList.vue +41 -0
  49. package/src/components/common/Facet.vue +206 -0
  50. package/src/components/common/Feed.vue +58 -0
  51. package/src/components/common/Flag.vue +27 -0
  52. package/src/components/common/HomeCard.vue +20 -0
  53. package/src/components/common/ItemBox.vue +49 -0
  54. package/src/components/common/Loading.vue +19 -0
  55. package/src/components/common/LoadingDots.vue +12 -0
  56. package/src/components/common/PageHeading.vue +30 -0
  57. package/src/components/common/Pagination.vue +105 -0
  58. package/src/components/common/Popover.vue +24 -0
  59. package/src/components/common/PowerToggle.vue +130 -0
  60. package/src/components/common/ProgressBar.vue +33 -0
  61. package/src/components/common/RadioButtons.vue +52 -0
  62. package/src/components/common/Schedule.vue +79 -0
  63. package/src/components/common/SearchBar.vue +30 -0
  64. package/src/components/common/Separator.vue +3 -0
  65. package/src/components/common/Slideout.vue +95 -0
  66. package/src/components/common/Sort.vue +83 -0
  67. package/src/components/common/Table.vue +48 -0
  68. package/src/components/common/Tabs.vue +129 -0
  69. package/src/components/common/Tag.vue +53 -0
  70. package/src/components/common/Tooltip.vue +49 -0
  71. package/src/components/common/VerticalTabs.vue +34 -0
  72. package/src/components/common/card/CardItem.vue +27 -0
  73. package/src/components/common/card/CardItemGroup.vue +45 -0
  74. package/src/components/common/facet/Leaf.vue +97 -0
  75. package/src/components/common/facet/TriState.vue +37 -0
  76. package/src/components/common/table/TableData.vue +48 -0
  77. package/src/components/common/table/TableHeader.vue +21 -0
  78. package/src/components/dialogs/ChooseValueDialog.vue +97 -0
  79. package/src/components/dialogs/ConfirmDialog.vue +73 -0
  80. package/src/components/dialogs/CopyDialog.vue +51 -0
  81. package/src/components/dialogs/DownloadDialog.vue +48 -0
  82. package/src/components/dialogs/NameDescDialog.vue +74 -0
  83. package/src/components/dialogs/NameDialog.vue +56 -0
  84. package/src/components/dialogs/PopupEditor.vue +113 -0
  85. package/src/components/dialogs/ProgressDialog.vue +58 -0
  86. package/src/components/dialogs/ResetPasswordDialog.vue +58 -0
  87. package/src/components/dialogs/Wizard.vue +99 -0
  88. package/src/components/dialogs/wizard/Stepper.vue +31 -0
  89. package/src/components/form/CheckBox.vue +26 -0
  90. package/src/components/form/Editor.vue +93 -0
  91. package/src/components/form/FormCol.vue +19 -0
  92. package/src/components/form/FormRow.vue +19 -0
  93. package/src/components/form/FormSection.vue +21 -0
  94. package/src/components/form/GreyForm.vue +7 -0
  95. package/src/components/form/GreyInput.vue +51 -0
  96. package/src/components/form/GreyInputAutocomplete.vue +100 -0
  97. package/src/components/form/GreyInputCopy.vue +66 -0
  98. package/src/components/form/GreyInputGrow.vue +42 -0
  99. package/src/components/form/GreyInputToken.vue +78 -0
  100. package/src/components/form/GreyPassword.vue +36 -0
  101. package/src/components/form/GreySelect.vue +154 -0
  102. package/src/components/form/GreySelectInput.vue +123 -0
  103. package/src/components/form/GreySelectInputMultiple.vue +218 -0
  104. package/src/components/form/GreyTel.vue +58 -0
  105. package/src/components/form/HamburgerItem.vue +95 -0
  106. package/src/components/form/KeyValueEntry.vue +74 -0
  107. package/src/components/form/RadioInput.vue +38 -0
  108. package/src/components/form/UploadFile.vue +99 -0
  109. package/src/components/icons/AiIcon.vue +6 -0
  110. package/src/components/icons/GithubIcon.vue +18 -0
  111. package/src/components/icons/HighPriorityIcon.vue +6 -0
  112. package/src/components/icons/PowerOffIcon.vue +6 -0
  113. package/src/components/icons/SaveIcon.vue +6 -0
  114. package/src/components/index.js +134 -0
  115. package/src/components/menu/DialogMenu.vue +142 -0
  116. package/src/components/menu/GrandChild.vue +39 -0
  117. package/src/components/menu/GridMenu.vue +88 -0
  118. package/src/components/menu/MenuAvatar.vue +66 -0
  119. package/src/components/menu/MenuDesktop.vue +90 -0
  120. package/src/components/notifications/Notify.vue +123 -0
  121. package/src/components/notifications/NotifyList.vue +130 -0
  122. package/src/components/page-structure/FacetPage.vue +77 -0
  123. package/src/components/query/Child.vue +63 -0
  124. package/src/components/query/LVDBQuery.vue +38 -0
  125. package/src/components/status/Active.vue +44 -0
  126. package/src/components/status/ScoreLevel.vue +43 -0
  127. package/src/components/status/Status.vue +51 -0
  128. package/src/components/status/TaskDot.vue +25 -0
  129. package/src/components/status/TaskStatus.vue +26 -0
  130. package/src/components/status/TicketStatus.vue +201 -0
  131. package/src/components/status/Trend.vue +20 -0
  132. package/src/components/tables/ArgumentRunTable.vue +96 -0
  133. package/src/components/tables/ArgumentTable.vue +67 -0
  134. package/src/components/tables/CloudFormationParameters.vue +25 -0
  135. package/src/constants/colors.js +248 -0
  136. package/src/constants/font-map.js +128 -0
  137. package/src/constants/fpl2.js +162 -0
  138. package/src/constants/icon-svg.js +405 -0
  139. package/src/constants/schedule.js +52 -0
  140. package/src/fpl/AddPanel.vue +237 -0
  141. package/src/fpl/Configs/Alert.vue +16 -0
  142. package/src/fpl/Configs/AlertSprite.vue +2 -0
  143. package/src/fpl/Configs/Chart.vue +63 -0
  144. package/src/fpl/Configs/Config.js +154 -0
  145. package/src/fpl/Configs/Counter.vue +35 -0
  146. package/src/fpl/Configs/Histogram.vue +70 -0
  147. package/src/fpl/Configs/IPMap.vue +37 -0
  148. package/src/fpl/Configs/Image.vue +163 -0
  149. package/src/fpl/Configs/MetricChart.vue +20 -0
  150. package/src/fpl/Configs/PieChart.vue +37 -0
  151. package/src/fpl/Configs/SparkChart.vue +41 -0
  152. package/src/fpl/Configs/StackedBarChart.vue +49 -0
  153. package/src/fpl/Configs/Table.vue +211 -0
  154. package/src/fpl/Configs/Text.vue +14 -0
  155. package/src/fpl/Configs/TopNChart.vue +37 -0
  156. package/src/fpl/Outputs/FPLAlert.vue +64 -0
  157. package/src/fpl/Outputs/FPLStream.vue +41 -0
  158. package/src/fpl/Outputs/FPLTable.vue +77 -0
  159. package/src/fpl/Panel.vue +202 -0
  160. package/src/fpl/Panels/Alert.vue +85 -0
  161. package/src/fpl/Panels/AlertSprite.vue +9 -0
  162. package/src/fpl/Panels/Chart.vue +98 -0
  163. package/src/fpl/Panels/Counter.vue +43 -0
  164. package/src/fpl/Panels/Histogram.vue +138 -0
  165. package/src/fpl/Panels/IPMap.vue +48 -0
  166. package/src/fpl/Panels/Image.vue +35 -0
  167. package/src/fpl/Panels/MetricChart.vue +97 -0
  168. package/src/fpl/Panels/PieChart.vue +54 -0
  169. package/src/fpl/Panels/SparkChart.vue +166 -0
  170. package/src/fpl/Panels/StackedBarChart.vue +74 -0
  171. package/src/fpl/Panels/Table.vue +103 -0
  172. package/src/fpl/Panels/Text.vue +24 -0
  173. package/src/fpl/Panels/TopNChart.vue +69 -0
  174. package/src/fpl/index.js +39 -0
  175. package/src/utils/download.js +220 -0
  176. package/src/utils/formatOutput.js +156 -0
  177. package/src/utils/random.js +32 -0
  178. package/src/utils/timeUtils.js +138 -0
@@ -0,0 +1,134 @@
1
+ // form
2
+ export { default as GreyInput } from "./form/GreyInput.vue";
3
+ export { default as GreyInputAutocomplete } from "./form/GreyInputAutocomplete.vue";
4
+ export { default as GreyInputGrow } from "./form/GreyInputGrow.vue";
5
+ export { default as GreyInputCopy } from "./form/GreyInputCopy.vue";
6
+ export { default as GreyInputToken } from "./form/GreyInputToken.vue";
7
+ export { default as GreyPassword } from "./form/GreyPassword.vue";
8
+ export { default as GreyTel } from "./form/GreyTel.vue";
9
+ export { default as GreySelect } from "./form/GreySelect.vue";
10
+ export { default as GreySelectInput } from "./form/GreySelectInput.vue";
11
+ export { default as GreySelectInputMultiple } from "./form/GreySelectInputMultiple.vue";
12
+ export { default as CheckBox } from "./form/CheckBox.vue";
13
+ export { default as FormCol } from "./form/FormCol.vue";
14
+ export { default as FormRow } from "./form/FormRow.vue";
15
+ export { default as FormSection } from "./form/FormSection.vue";
16
+ export { default as GreyForm } from "./form/GreyForm.vue";
17
+ export { default as HamburgerItem } from "./form/HamburgerItem.vue";
18
+ export { default as RadioInput } from "./form/RadioInput.vue";
19
+ export { default as UploadFile } from "./form/UploadFile.vue";
20
+ export { default as KeyValueEntry } from "./form/KeyValueEntry.vue";
21
+ export { default as Editor } from "./form/Editor.vue";
22
+
23
+ // notify and dialogs
24
+ export { default as ConfirmDialog } from "./dialogs/ConfirmDialog.vue";
25
+ export { default as CopyDialog } from "./dialogs/CopyDialog.vue";
26
+ export { default as ChooseValueDialog } from "./dialogs/ChooseValueDialog.vue";
27
+ export { default as NameDialog } from "./dialogs/NameDialog.vue";
28
+ export { default as NameDescDialog } from "./dialogs/NameDescDialog.vue";
29
+ export { default as Notify } from "./notifications/Notify.vue";
30
+ export { default as NotifyList } from "./notifications/NotifyList.vue";
31
+ export { default as ProgressDialog } from "./dialogs/ProgressDialog.vue";
32
+ export { default as Wizard } from "./dialogs/Wizard.vue";
33
+ export { default as ResetPasswordDialog } from "./dialogs/ResetPasswordDialog.vue";
34
+ export { default as DownloadDialog } from "./dialogs/DownloadDialog.vue";
35
+ export { default as PopupEditor } from "./dialogs/PopupEditor.vue";
36
+
37
+ // Buttons
38
+ export { default as ActionButtons } from "./buttons/ActionButtons.vue";
39
+ export { default as TextButton } from "./buttons/TextButton.vue";
40
+ export { default as IconButton } from "./buttons/IconButton.vue";
41
+ export { default as ImageButton } from "./buttons/ImageButton.vue";
42
+ export { default as DropdownButton } from "./buttons/DropdownButton.vue";
43
+ export { default as MenuButton } from "./buttons/MenuButton.vue";
44
+ export { default as SubmitButtons } from "./buttons/SubmitButtons.vue";
45
+
46
+ // statuses
47
+ export { default as Active } from "./status/Active.vue";
48
+ export { default as Trend } from "./status/Trend.vue";
49
+ export { default as TaskStatus } from "./status/TaskStatus.vue";
50
+ export { default as TaskDot } from "./status/TaskDot.vue";
51
+ export { default as TicketStatus } from "./status/TicketStatus.vue";
52
+ export { default as ScoreLevel } from "./status/ScoreLevel.vue";
53
+ export { default as Status } from "./status/Status.vue";
54
+
55
+ // commons
56
+ export { default as AutoRefreshButton } from "./common/AutoRefreshButton.vue";
57
+ export { default as AutoCompleteSearchBar } from "./common/AutoCompleteSearchBar.vue";
58
+ export { default as Breadcrumb } from "./common/Breadcrumb.vue";
59
+ export { default as SearchBar } from "./common/SearchBar.vue";
60
+ export { default as ButtonToggle } from "./common/ButtonToggle.vue";
61
+ export { default as EventList } from "./common/EventList.vue";
62
+ export { default as PowerToggle } from "./common/PowerToggle.vue";
63
+ export { default as ProgressBar } from "./common/ProgressBar.vue";
64
+ export { default as PageHeading } from "./common/PageHeading.vue";
65
+ export { default as Pagination } from "./common/Pagination.vue";
66
+ export { default as Tag } from "./common/Tag.vue";
67
+ export { default as Tooltip } from "./common/Tooltip.vue";
68
+ export { default as HomeCard } from "./common/HomeCard.vue";
69
+ export { default as ItemBox } from "./common/ItemBox.vue";
70
+ export { default as RadioButtons } from "./common/RadioButtons.vue";
71
+ export { default as Carousel } from "./common/Carousel.vue";
72
+ export { default as Card } from "./common/Card.vue";
73
+ export { default as CardItem } from "./common/card/CardItem.vue";
74
+ export { default as CardItemGroup } from "./common/card/CardItemGroup.vue";
75
+ export { default as Slideout } from "./common/Slideout.vue";
76
+ export { default as Table } from "./common/Table.vue";
77
+ export { default as TableData } from "./common/table/TableData.vue";
78
+ export { default as TableHeader } from "./common/table/TableHeader.vue";
79
+ export { default as Tabs } from "./common/Tabs.vue";
80
+ export { default as VerticalTabs } from "./common/VerticalTabs.vue";
81
+ export { default as Separator } from "./common/Separator.vue";
82
+ export { default as Dialog } from "./common/Dialog.vue";
83
+ export { default as Popover } from "./common/Popover.vue";
84
+ export { default as Loading } from "./common/Loading.vue";
85
+ export { default as LoadingDots } from "./common/LoadingDots.vue";
86
+ export { default as DatePicker } from "./common/DatePicker.vue";
87
+ export { default as DatePickerInput } from "./common/DatePickerInput.vue";
88
+ export { default as Facet } from "./common/Facet.vue";
89
+ export { default as Schedule } from "./common/Schedule.vue";
90
+ export { default as Feed } from "./common/Feed.vue";
91
+ export { default as CategoryCard } from "./common/CategoryCard.vue";
92
+ export { default as EditorHeading } from "./common/EditorHeading.vue";
93
+ export { default as CodeEditor } from "./common/CodeEditor.vue";
94
+ export { default as Sort } from "./common/Sort.vue";
95
+ export { default as Flag } from "./common/Flag.vue";
96
+
97
+ // icons
98
+ export { default as AiIcon } from "./icons/AiIcon.vue";
99
+ export { default as GithubIcon } from "./icons/GithubIcon.vue";
100
+ export { default as HighPriorityIcon } from "./icons/HighPriorityIcon.vue";
101
+ export { default as PowerOffIcon } from "./icons/PowerOffIcon.vue";
102
+ export { default as SaveIcon } from "./icons/SaveIcon.vue";
103
+
104
+ // charts
105
+ export { default as AlertChart } from "./charts/AlertChart.vue";
106
+ export { default as CronChart } from "./charts/CronChart.vue";
107
+ export { default as LineChart } from "./charts/LineChart.vue";
108
+ export { default as BarChart } from "./charts/BarChart.vue";
109
+ export { default as BarChartHorizontal } from "./charts/BarChartHorizontal.vue";
110
+ export { default as GradientChart } from "./charts/GradientChart.vue";
111
+ export { default as StackedChart } from "./charts/StackedChart.vue";
112
+ export { default as StackedChartClustered } from "./charts/StackedChartClustered.vue";
113
+ export { default as PieChart } from "./charts/PieChart.vue";
114
+ export { default as ProgressChart } from "./charts/ProgressChart.vue";
115
+ export { default as TimelineChart } from "./charts/TimelineChart.vue";
116
+ export { default as EmptyChart } from "./charts/EmptyChart.vue";
117
+ export { default as WorkflowChart } from "./charts/WorkflowChart.vue";
118
+
119
+ // tables
120
+ export { default as ArgumentTable } from "./tables/ArgumentTable.vue";
121
+ export { default as ArgumentRunTable } from "./tables/ArgumentRunTable.vue";
122
+ export { default as CloudFormationParameters } from "./tables/CloudFormationParameters.vue";
123
+
124
+ // query builder
125
+ export { default as LVDBQuery } from "./query/LVDBQuery.vue";
126
+
127
+ // page layouts
128
+ export { default as FacetPage } from "./page-structure/FacetPage.vue";
129
+
130
+ // menu navigations
131
+ export { default as DialogMenu } from "./menu/DialogMenu.vue";
132
+ export { default as GridMenu } from "./menu/GridMenu.vue";
133
+ export { default as MenuAvatar } from "./menu/MenuAvatar.vue";
134
+ export { default as MenuDesktop } from "./menu/MenuDesktop.vue";
@@ -0,0 +1,142 @@
1
+ <template>
2
+ <Dialog
3
+ as="div"
4
+ class="lg:hidden"
5
+ :open="mobileMenuOpen"
6
+ @click="emits('close')"
7
+ @close="emits('close')"
8
+ >
9
+ <div class="fixed inset-0 z-50" />
10
+ <DialogPanel
11
+ class="fixed top-8 left-0 z-50 w-80 px-2 py-6 sm:px-6 sm:top-2 sm:w-full sm:max-w-sm sm:ring-1 sm:ring-gray-900/10"
12
+ >
13
+ <div class="flex items-center justify-end">
14
+ <button
15
+ type="button"
16
+ class="-m-2.5 rounded-md p-2.5"
17
+ @click="emits('close')"
18
+ >
19
+ <span class="sr-only">Close menu</span>
20
+ <XMarkIcon class="icon-lg" aria-hidden="true" />
21
+ </button>
22
+ </div>
23
+ <div
24
+ class="mt-6 flow-root white-bg text-gray-700 dark:bg-black dark:text-gray-300 rounded-3xl p-3"
25
+ >
26
+ <div class="-my-6 divide-y divide-gray-500/10">
27
+ <div class="space-y-2 py-6">
28
+ <div v-for="item in navigation" :key="item.name">
29
+ <Disclosure v-if="item.children" as="div" v-slot="{ open }">
30
+ <DisclosureButton
31
+ class="flex w-full items-center rounded-lg py-2 pl-3 pr-3.5 text-base font-medium leading-7 hover:font-bold"
32
+ >
33
+ <component
34
+ :is="item.icon"
35
+ class="h-6 flex-shrink-0 hover:font-bold pr-2"
36
+ aria-hidden="true"
37
+ />
38
+ {{ item.name }}
39
+ <ChevronDownIcon
40
+ :class="[
41
+ open ? 'rotate-180' : '',
42
+ 'icon-md right-10 absolute',
43
+ ]"
44
+ aria-hidden="true"
45
+ />
46
+ </DisclosureButton>
47
+ <DisclosurePanel class="mt-2 space-y-2">
48
+ <div v-for="child in item.children">
49
+ <router-link
50
+ v-if="!child.children"
51
+ :key="child.name"
52
+ :to="{ name: child.route, params: child.params }"
53
+ :class="[
54
+ 'text-sm font-medium',
55
+ props.currentRoute === child.route
56
+ ? 'font-semibold text-slate-900 dark:text-slate-100'
57
+ : 'hover:font-bold',
58
+ ]"
59
+ @click="emits('close')"
60
+ >
61
+ <DisclosureButton
62
+ class="block rounded-lg pl-6 pr-3 leading-7"
63
+ >
64
+ {{ child.name }}
65
+ </DisclosureButton>
66
+ </router-link>
67
+ <div
68
+ v-else
69
+ class="relative text-sm font-medium hover:font-bold"
70
+ @mouseenter="child.expanded = true"
71
+ @mouseleave="child.expanded = false"
72
+ >
73
+ <span
74
+ class="row rounded-lg pl-6 pr-3 leading-7 cursor-pointer"
75
+ >
76
+ {{ child.name }}
77
+ <ChevronRightIcon
78
+ class="icon-md absolute right-4 sm:right-0"
79
+ />
80
+ </span>
81
+ <GrandChild
82
+ v-if="child.expanded"
83
+ :children="child.children"
84
+ :currentRoute="currentRoute"
85
+ @close="emits('close')"
86
+ />
87
+ </div>
88
+ </div>
89
+ </DisclosurePanel>
90
+ </Disclosure>
91
+ <router-link
92
+ v-else
93
+ :to="{ name: item.route }"
94
+ @click="emits('close')"
95
+ >
96
+ <div
97
+ class="flex w-full items-center rounded-lg py-2 pl-3 pr-3.5 text-base font-semibold leading-7 hover:font-bold"
98
+ >
99
+ <component
100
+ :is="item.icon"
101
+ class="h-6 flex-shrink-0 hover:font-bold pr-2"
102
+ aria-hidden="true"
103
+ />
104
+ {{ item.name }}
105
+ </div>
106
+ </router-link>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ </div>
111
+ </DialogPanel>
112
+ </Dialog>
113
+ </template>
114
+ <script setup>
115
+ import { ref } from "vue";
116
+ import {
117
+ Dialog,
118
+ DialogPanel,
119
+ Disclosure,
120
+ DisclosureButton,
121
+ DisclosurePanel,
122
+ } from "@headlessui/vue";
123
+ import {
124
+ XMarkIcon,
125
+ ChevronDownIcon,
126
+ ChevronRightIcon,
127
+ } from "@heroicons/vue/24/outline";
128
+ import GrandChild from "./GrandChild.vue";
129
+
130
+ // props and emits
131
+ const props = defineProps({
132
+ mobileMenuOpen: Boolean,
133
+ navigation: Array,
134
+ currentRoute: {
135
+ type: String,
136
+ default: "",
137
+ },
138
+ });
139
+ const emits = defineEmits(["close"]);
140
+ // states
141
+ const navigation = ref(props.navigation);
142
+ </script>
@@ -0,0 +1,39 @@
1
+ <template>
2
+ <div
3
+ class="absolute top-0 z-50 w-44 rounded-3xl shadow-lg ring-1 ring-gray-900/5 left-full white-bg text-gray-700 dark:bg-black dark:text-gray-300"
4
+ >
5
+ <router-link
6
+ v-for="grandchild in children"
7
+ :to="{
8
+ name: grandchild.route,
9
+ params: grandchild.params,
10
+ }"
11
+ @click="emits('close')"
12
+ >
13
+ <div
14
+ :class="[
15
+ 'rounded-lg m-2 p-3 text-sm leading-6',
16
+ props.currentRoute === grandchild.route
17
+ ? 'bg-slate-300 dark:bg-slate-700'
18
+ : 'hover:bg-gray-200 dark:hover:bg-neutral-700',
19
+ ]"
20
+ >
21
+ {{ grandchild.name }}
22
+ </div>
23
+ </router-link>
24
+ </div>
25
+ </template>
26
+ <script setup>
27
+ // props and emits
28
+ const props = defineProps({
29
+ children: {
30
+ type: Object,
31
+ required: true,
32
+ },
33
+ currentRoute: {
34
+ type: String,
35
+ default: "",
36
+ },
37
+ });
38
+ const emits = defineEmits(["close"]);
39
+ </script>
@@ -0,0 +1,88 @@
1
+ <template>
2
+ <Combobox
3
+ as="div"
4
+ class="py-1 relative"
5
+ v-model="selected"
6
+ @update:model-value="emits('update', $event)"
7
+ >
8
+ <ComboboxInput
9
+ class="w-full border-2 text-sm bg-transparent p-1 px-2 pr-4 focus:ring-0"
10
+ @change="query = $event.target.value"
11
+ :displayValue="(option) => option.label"
12
+ />
13
+ <ComboboxButton class="input-icon">
14
+ <ChevronUpDownIcon class="icon-md" />
15
+ </ComboboxButton>
16
+ <TransitionRoot
17
+ leave="transition ease-in duration-100"
18
+ leaveFrom="opacity-100"
19
+ leaveTo="opacity-0"
20
+ @after-leave="query = ''"
21
+ >
22
+ <ComboboxOptions
23
+ class="absolute z-50 mt-1 max-h-96 w-full overflow-auto p-1 text-base text-sm white-bg text-gray-700 dark:bg-black dark:text-gray-300"
24
+ >
25
+ <ComboboxOption
26
+ as="template"
27
+ v-for="option in filteredOptions"
28
+ :key="option.value"
29
+ :value="option"
30
+ v-slot="{ selected, active }"
31
+ >
32
+ <li
33
+ :class="[
34
+ active ? 'bg-indigo-600 text-white' : '',
35
+ 'relative cursor-default select-none py-2 pl-8 pr-3',
36
+ ]"
37
+ >
38
+ <span
39
+ v-if="selected"
40
+ class="absolute inset-y-0 left-0 flex items-center pl-1"
41
+ >
42
+ <CheckIcon class="icon" aria-hidden="true" />
43
+ </span>
44
+ <span :class="['block truncate', { 'ml-4' : option.isSMB}]">
45
+ {{ option.label }}
46
+ </span>
47
+ </li>
48
+ </ComboboxOption>
49
+ </ComboboxOptions>
50
+ </TransitionRoot>
51
+ </Combobox>
52
+ </template>
53
+ <script setup>
54
+ import { ref, watch, computed } from "vue";
55
+ import {
56
+ Combobox,
57
+ ComboboxInput,
58
+ ComboboxButton,
59
+ ComboboxOptions,
60
+ ComboboxOption,
61
+ TransitionRoot,
62
+ } from "@headlessui/vue";
63
+ import { ChevronUpDownIcon, CheckIcon } from "@heroicons/vue/24/outline";
64
+
65
+ // props and emits
66
+ const props = defineProps({
67
+ options: Array,
68
+ selected: Object,
69
+ });
70
+ const emits = defineEmits(["update"]);
71
+ // states
72
+ const selected = ref(props.selected);
73
+ const query = ref("");
74
+ // computed
75
+ const filteredOptions = computed(() => {
76
+ return props.options.filter((option) => {
77
+ const opt = option.label.toLowerCase() + option.value.toLowerCase();
78
+ return opt.includes(query.value.toLowerCase());
79
+ });
80
+ });
81
+ // watch
82
+ watch(
83
+ () => props.selected,
84
+ (newVal) => {
85
+ selected.value = newVal;
86
+ }
87
+ );
88
+ </script>
@@ -0,0 +1,66 @@
1
+ <template>
2
+ <Menu as="div" class="relative ml-auto mt-1.5">
3
+ <MenuButton
4
+ class="rounded-full ring-2 w-7 h-7 ring-black dark:ring-white text-sm"
5
+ >
6
+ {{ initials }}
7
+ </MenuButton>
8
+ <transition
9
+ enter-active-class="transition ease-out duration-100"
10
+ enter-from-class="transform opacity-0 scale-95"
11
+ enter-to-class="transform opacity-100 scale-100"
12
+ leave-active-class="transition ease-in duration-75"
13
+ leave-from-class="transform opacity-100 scale-100"
14
+ leave-to-class="transform opacity-0 scale-95"
15
+ >
16
+ <MenuItems
17
+ class="absolute right-0 top-full z-50 mt-3 w-44 overflow-hidden rounded-3xl shadow-lg ring-1 ring-gray-900/5"
18
+ >
19
+ <MenuItem
20
+ v-for="child in userChildren"
21
+ :key="child.name"
22
+ v-slot="{ close }"
23
+ >
24
+ <div
25
+ class="py-1 px-2 white-bg text-gray-700 dark:bg-black dark:text-gray-300"
26
+ >
27
+ <router-link
28
+ :to="{ name: child.route, params: child.params }"
29
+ @click="close"
30
+ >
31
+ <div
32
+ class="rounded-lg p-4 text-sm leading-6 hover:bg-gray-200 dark:hover:bg-neutral-700"
33
+ >
34
+ {{ child.name }}
35
+ </div>
36
+ </router-link>
37
+ </div>
38
+ </MenuItem>
39
+ </MenuItems>
40
+ </transition>
41
+ </Menu>
42
+ </template>
43
+ <script setup>
44
+ import { computed } from "vue";
45
+ import { Menu, MenuButton, MenuItems, MenuItem } from "@headlessui/vue";
46
+
47
+ // constants
48
+ const userChildren = [
49
+ { name: "Profile", route: "profile" },
50
+ { name: "Logout", route: "logout" },
51
+ ];
52
+ // props and emits
53
+ const props = defineProps({
54
+ fullName: {
55
+ type: String,
56
+ default: "Fluency User",
57
+ },
58
+ })
59
+ // computed
60
+ const initials = computed(() => {
61
+ const names = props.fullName.split(" ");
62
+ const firstInitial = names[0][0]?.toUpperCase() || "A";
63
+ const lastInitial = names[names.length - 1][0]?.toUpperCase() || "U";
64
+ return `${firstInitial}${lastInitial}`;
65
+ });
66
+ </script>
@@ -0,0 +1,90 @@
1
+ <template>
2
+ <div v-for="item in navigation" :key="item.name">
3
+ <Menu v-if="item.children" as="div" class="menu">
4
+ <MenuButton class="menu-button">
5
+ <component :is="item.icon" class="menu-icon" aria-hidden="true" />
6
+ {{ item.name }}
7
+ <ChevronDownIcon class="icon-md flex-none" aria-hidden="true" />
8
+ </MenuButton>
9
+ <transition
10
+ enter-active-class="transition ease-out duration-100"
11
+ enter-from-class="transform opacity-0 scale-95"
12
+ enter-to-class="transform opacity-100 scale-100"
13
+ leave-active-class="transition ease-in duration-75"
14
+ leave-from-class="transform opacity-100 scale-100"
15
+ leave-to-class="transform opacity-0 scale-95"
16
+ >
17
+ <MenuItems
18
+ class="absolute -left-8 top-full z-50 mt-3 w-44 rounded-3xl shadow-lg ring-1 ring-gray-900/5"
19
+ >
20
+ <MenuItem
21
+ v-for="child in item.children"
22
+ :key="child.name"
23
+ v-slot="{ close, active }"
24
+ >
25
+ <div
26
+ class="py-1 px-2 white-bg text-gray-700 dark:bg-black dark:text-gray-300"
27
+ >
28
+ <router-link
29
+ v-if="!child.children"
30
+ :to="{ name: child.route, params: child.params }"
31
+ @click="close"
32
+ >
33
+ <div
34
+ :class="[
35
+ 'rounded-lg p-4 text-sm leading-6',
36
+ currentRoute === child.route
37
+ ? 'bg-slate-300 dark:bg-slate-700'
38
+ : 'hover:bg-gray-200 dark:hover:bg-neutral-700',
39
+ ]"
40
+ >
41
+ {{ child.name }}
42
+ </div>
43
+ </router-link>
44
+ <div v-else>
45
+ <div
46
+ class="relative rounded-lg p-4 text-sm leading-6 hover:bg-gray-200 dark:hover:bg-neutral-700"
47
+ >
48
+ <span class="relative row text-sm">
49
+ {{ child.name }}
50
+ <ChevronRightIcon class="icon-md absolute right-0" />
51
+ </span>
52
+ <GrandChild
53
+ v-if="active"
54
+ :children="child.children"
55
+ :currentRoute="currentRoute"
56
+ @close="close"
57
+ />
58
+ </div>
59
+ </div>
60
+ </div>
61
+ </MenuItem>
62
+ </MenuItems>
63
+ </transition>
64
+ </Menu>
65
+ <router-link v-else :to="{ name: item.route }">
66
+ <div class="menu">
67
+ <div class="menu-button">
68
+ <component :is="item.icon" class="menu-icon" aria-hidden="true" />
69
+ {{ item.name }}
70
+ </div>
71
+ </div>
72
+ </router-link>
73
+ </div>
74
+ </template>
75
+
76
+ <script setup>
77
+ import { Menu, MenuButton, MenuItems, MenuItem } from "@headlessui/vue";
78
+ import { ChevronDownIcon, ChevronRightIcon } from "@heroicons/vue/24/outline";
79
+ import GrandChild from "./GrandChild.vue";
80
+
81
+ // props and emits
82
+ const props = defineProps({
83
+ navigation: Array,
84
+ currentRoute: {
85
+ type: String,
86
+ default: "",
87
+ },
88
+ });
89
+ const emit = defineEmits([]);
90
+ </script>