@openreachtech/furo-vue 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 (310) hide show
  1. package/LICENSE +9 -0
  2. package/README.ja.md +334 -0
  3. package/README.md +333 -0
  4. package/index.js +11 -0
  5. package/lib/assets/css/furo/0010.variables-palette-color-scale.css +298 -0
  6. package/lib/assets/css/furo/0020.variables-z-index.css +10 -0
  7. package/lib/assets/css/furo/0030.variables-semantic-color.css +178 -0
  8. package/lib/assets/css/furo/0035.variables-semantic-dimension.css +104 -0
  9. package/lib/assets/css/furo/0040.variables-component-furo.css +28 -0
  10. package/lib/assets/css/furo/0050.furo-editor-content.css +22 -0
  11. package/lib/assets/css/furo.css +15 -0
  12. package/lib/components/atoms/FuroAvatar/FuroAvatar.vue +135 -0
  13. package/lib/components/atoms/FuroAvatar/FuroAvatarContext.js +147 -0
  14. package/lib/components/atoms/FuroBadge/FuroBadge.vue +240 -0
  15. package/lib/components/atoms/FuroBadge/FuroBadgeContext.js +298 -0
  16. package/lib/components/atoms/FuroButton/ButtonEmitPayload.js +44 -0
  17. package/lib/components/atoms/FuroButton/FuroButton.vue +301 -0
  18. package/lib/components/atoms/FuroButton/FuroButtonContext.js +328 -0
  19. package/lib/components/atoms/FuroCheckbox/CheckboxEmitPayload.js +106 -0
  20. package/lib/components/atoms/FuroCheckbox/FuroCheckbox.vue +173 -0
  21. package/lib/components/atoms/FuroCheckbox/FuroCheckboxContext.js +682 -0
  22. package/lib/components/atoms/FuroEmailField/EmailFieldEmitPayload.js +74 -0
  23. package/lib/components/atoms/FuroEmailField/FuroEmailField.vue +119 -0
  24. package/lib/components/atoms/FuroEmailField/FuroEmailFieldContext.js +311 -0
  25. package/lib/components/atoms/FuroFileField/FileFieldEmitPayload.js +80 -0
  26. package/lib/components/atoms/FuroFileField/FuroFileField.vue +128 -0
  27. package/lib/components/atoms/FuroFileField/FuroFileFieldContext.js +195 -0
  28. package/lib/components/atoms/FuroIcon/FuroIcon.vue +74 -0
  29. package/lib/components/atoms/FuroIcon/FuroIconContext.js +293 -0
  30. package/lib/components/atoms/FuroIcon/FuroIconRegistry.js +617 -0
  31. package/lib/components/atoms/FuroIcon/FuroIconifyRendererContext.js +101 -0
  32. package/lib/components/atoms/FuroIcon/furoIconData.js +164 -0
  33. package/lib/components/atoms/FuroIcon/iconRenderers.js +62 -0
  34. package/lib/components/atoms/FuroIcon/icons.js +7 -0
  35. package/lib/components/atoms/FuroNumberField/FuroNumberField.vue +213 -0
  36. package/lib/components/atoms/FuroNumberField/FuroNumberFieldContext.js +442 -0
  37. package/lib/components/atoms/FuroNumberField/NumberFieldEmitPayload.js +162 -0
  38. package/lib/components/atoms/FuroPasswordField/FuroPasswordField.vue +119 -0
  39. package/lib/components/atoms/FuroPasswordField/FuroPasswordFieldContext.js +311 -0
  40. package/lib/components/atoms/FuroPasswordField/PasswordFieldEmitPayload.js +74 -0
  41. package/lib/components/atoms/FuroRadio/FuroRadio.vue +193 -0
  42. package/lib/components/atoms/FuroRadio/FuroRadioContext.js +557 -0
  43. package/lib/components/atoms/FuroRadio/RadioEmitPayload.js +72 -0
  44. package/lib/components/atoms/FuroSwitch/FuroSwitch.vue +165 -0
  45. package/lib/components/atoms/FuroSwitch/FuroSwitchContext.js +440 -0
  46. package/lib/components/atoms/FuroSwitch/SwitchEmitPayload.js +86 -0
  47. package/lib/components/atoms/FuroTextField/FuroTextField.vue +119 -0
  48. package/lib/components/atoms/FuroTextField/FuroTextFieldContext.js +311 -0
  49. package/lib/components/atoms/FuroTextField/TextFieldEmitPayload.js +83 -0
  50. package/lib/components/atoms/FuroTextarea/FuroTextarea.vue +121 -0
  51. package/lib/components/atoms/FuroTextarea/FuroTextareaContext.js +322 -0
  52. package/lib/components/atoms/FuroTextarea/TextareaEmitPayload.js +83 -0
  53. package/lib/components/atoms/FuroToggle/FuroToggle.vue +172 -0
  54. package/lib/components/atoms/FuroToggle/FuroToggleContext.js +410 -0
  55. package/lib/components/atoms/FuroToggle/ToggleEmitPayload.js +86 -0
  56. package/lib/components/molecules/FuroAccordion/AccordionEmitPayload.js +80 -0
  57. package/lib/components/molecules/FuroAccordion/FuroAccordion.vue +219 -0
  58. package/lib/components/molecules/FuroAccordion/FuroAccordionContext.js +547 -0
  59. package/lib/components/molecules/FuroAttachment/FuroAttachment.vue +376 -0
  60. package/lib/components/molecules/FuroAttachment/FuroAttachmentContext.js +628 -0
  61. package/lib/components/molecules/FuroAutocompleteField/AutocompleteEmitPayload.js +225 -0
  62. package/lib/components/molecules/FuroAutocompleteField/FuroAutocompleteField.vue +669 -0
  63. package/lib/components/molecules/FuroAutocompleteField/FuroAutocompleteFieldContext.js +1525 -0
  64. package/lib/components/molecules/FuroAvatarGroup/FuroAvatarGroup.vue +126 -0
  65. package/lib/components/molecules/FuroAvatarGroup/FuroAvatarGroupContext.js +245 -0
  66. package/lib/components/molecules/FuroBreadcrumb/FuroBreadcrumb.vue +219 -0
  67. package/lib/components/molecules/FuroBreadcrumb/FuroBreadcrumbContext.js +257 -0
  68. package/lib/components/molecules/FuroCollapsible/CollapsibleEmitPayload.js +69 -0
  69. package/lib/components/molecules/FuroCollapsible/FuroCollapsible.vue +177 -0
  70. package/lib/components/molecules/FuroCollapsible/FuroCollapsibleContext.js +389 -0
  71. package/lib/components/molecules/FuroControlBlock/FuroControlBlock.vue +149 -0
  72. package/lib/components/molecules/FuroControlBlock/FuroControlBlockContext.js +81 -0
  73. package/lib/components/molecules/FuroDatePicker/DatePickerEmitPayload.js +74 -0
  74. package/lib/components/molecules/FuroDatePicker/FuroDatePicker.vue +661 -0
  75. package/lib/components/molecules/FuroDatePicker/FuroDatePickerContext.js +1038 -0
  76. package/lib/components/molecules/FuroDateTimePicker/DateTimePickerEmitPayload.js +96 -0
  77. package/lib/components/molecules/FuroDateTimePicker/FuroDateTimePicker.vue +153 -0
  78. package/lib/components/molecules/FuroDateTimePicker/FuroDateTimePickerContext.js +840 -0
  79. package/lib/components/molecules/FuroDropdownMenu/DropdownMenuOptionSelectEmitPayload.js +100 -0
  80. package/lib/components/molecules/FuroDropdownMenu/FuroDropdownMenu.vue +348 -0
  81. package/lib/components/molecules/FuroDropdownMenu/FuroDropdownMenuContext.js +714 -0
  82. package/lib/components/molecules/FuroDropdownMenu/FuroDropdownMenuOptionRows.vue +222 -0
  83. package/lib/components/molecules/FuroEditableField/EditableEmitPayload.js +89 -0
  84. package/lib/components/molecules/FuroEditableField/FuroEditableField.vue +314 -0
  85. package/lib/components/molecules/FuroEditableField/FuroEditableFieldContext.js +1018 -0
  86. package/lib/components/molecules/FuroEditableField/processors/EditorCollisionProcessor.js +236 -0
  87. package/lib/components/molecules/FuroEditableField/processors/ObjectProcessor.js +101 -0
  88. package/lib/components/molecules/FuroEmptyState/FuroEmptyState.vue +124 -0
  89. package/lib/components/molecules/FuroEmptyState/FuroEmptyStateContext.js +42 -0
  90. package/lib/components/molecules/FuroErrorState/FuroErrorState.vue +125 -0
  91. package/lib/components/molecules/FuroErrorState/FuroErrorStateContext.js +42 -0
  92. package/lib/components/molecules/FuroPagination/FuroPagination.vue +246 -0
  93. package/lib/components/molecules/FuroPagination/FuroPaginationContext.js +489 -0
  94. package/lib/components/molecules/FuroPopover/FuroPopover.vue +171 -0
  95. package/lib/components/molecules/FuroPopover/FuroPopoverContext.js +279 -0
  96. package/lib/components/molecules/FuroScrollArea/FuroScrollArea.vue +181 -0
  97. package/lib/components/molecules/FuroScrollArea/FuroScrollAreaContext.js +149 -0
  98. package/lib/components/molecules/FuroSearchField/FuroSearchField.vue +155 -0
  99. package/lib/components/molecules/FuroSearchField/FuroSearchFieldContext.js +231 -0
  100. package/lib/components/molecules/FuroSectionHeader/FuroSectionHeader.vue +140 -0
  101. package/lib/components/molecules/FuroSectionHeader/FuroSectionHeaderContext.js +204 -0
  102. package/lib/components/molecules/FuroSelect/FuroSelect.vue +474 -0
  103. package/lib/components/molecules/FuroSelect/FuroSelectContext.js +743 -0
  104. package/lib/components/molecules/FuroSelect/SelectEmitPayload.js +181 -0
  105. package/lib/components/molecules/FuroSeparator/FuroSeparator.vue +88 -0
  106. package/lib/components/molecules/FuroSeparator/FuroSeparatorContext.js +40 -0
  107. package/lib/components/molecules/FuroSkeleton/FuroSkeleton.vue +101 -0
  108. package/lib/components/molecules/FuroSkeleton/FuroSkeletonContext.js +82 -0
  109. package/lib/components/molecules/FuroSplitter/FuroSplitter.vue +237 -0
  110. package/lib/components/molecules/FuroSplitter/FuroSplitterContext.js +429 -0
  111. package/lib/components/molecules/FuroSplitter/SplitterEmitPayload.js +69 -0
  112. package/lib/components/molecules/FuroTimeField/FuroTimeField.vue +251 -0
  113. package/lib/components/molecules/FuroTimeField/FuroTimeFieldContext.js +1138 -0
  114. package/lib/components/molecules/FuroTimeField/TimeFieldEmitPayload.js +74 -0
  115. package/lib/components/molecules/FuroToggleGroup/FuroToggleGroup.vue +211 -0
  116. package/lib/components/molecules/FuroToggleGroup/FuroToggleGroupContext.js +551 -0
  117. package/lib/components/molecules/FuroToggleGroup/ToggleGroupEmitPayload.js +80 -0
  118. package/lib/components/molecules/FuroToolBar/FuroToolBar.vue +91 -0
  119. package/lib/components/molecules/FuroToolBar/FuroToolBarContext.js +75 -0
  120. package/lib/components/molecules/FuroTooltip/FuroTooltip.vue +183 -0
  121. package/lib/components/molecules/FuroTooltip/FuroTooltipContext.js +290 -0
  122. package/lib/components/organisms/FuroAlertDialog/FuroAlertDialog.vue +324 -0
  123. package/lib/components/organisms/FuroAlertDialog/FuroAlertDialogContext.js +608 -0
  124. package/lib/components/organisms/FuroDialog/FuroDialog.vue +362 -0
  125. package/lib/components/organisms/FuroDialog/FuroDialogContext.js +535 -0
  126. package/lib/components/organisms/FuroDrawer/FuroDrawer.vue +618 -0
  127. package/lib/components/organisms/FuroDrawer/FuroDrawerContext.js +676 -0
  128. package/lib/components/organisms/FuroEditor/FuroEditor.vue +613 -0
  129. package/lib/components/organisms/FuroEditor/FuroEditorCommandContext.js +420 -0
  130. package/lib/components/organisms/FuroEditor/FuroEditorContext.js +2048 -0
  131. package/lib/components/organisms/FuroEditor/FuroEditorMentionMenu.vue +120 -0
  132. package/lib/components/organisms/FuroEditor/FuroEditorMentionMenuContext.js +261 -0
  133. package/lib/components/organisms/FuroEditor/PreserveNewlinesPasteExtension.js +267 -0
  134. package/lib/components/organisms/FuroEditor/build-editor-extensions.js +97 -0
  135. package/lib/components/organisms/FuroEditor/mention-suggestion.js +320 -0
  136. package/lib/components/organisms/FuroEditor/paste-link-segments.js +124 -0
  137. package/lib/components/organisms/FuroSidebar/FuroSidebar.vue +473 -0
  138. package/lib/components/organisms/FuroSidebar/FuroSidebarContext.js +1014 -0
  139. package/lib/components/organisms/FuroStepper/FuroStepper.vue +345 -0
  140. package/lib/components/organisms/FuroStepper/FuroStepperContext.js +481 -0
  141. package/lib/components/organisms/FuroTable/FuroTable.vue +707 -0
  142. package/lib/components/organisms/FuroTable/FuroTableContext.js +1965 -0
  143. package/lib/components/organisms/FuroTable/FuroTableRowItemContext.js +111 -0
  144. package/lib/components/organisms/FuroTabs/FuroTabs.vue +403 -0
  145. package/lib/components/organisms/FuroTabs/FuroTabsContext.js +846 -0
  146. package/lib/components/organisms/FuroToast/FuroToast.vue +624 -0
  147. package/lib/components/organisms/FuroToast/FuroToastContext.js +1089 -0
  148. package/lib/components/organisms/FuroToast/FuroToaster.vue +44 -0
  149. package/lib/components/organisms/FuroToast/FuroToasterContext.js +113 -0
  150. package/lib/components/organisms/FuroToast/ToastQueue.js +325 -0
  151. package/lib/components/organisms/FuroToast/toast.js +64 -0
  152. package/lib/contexts/BaseFuroContext.js +318 -0
  153. package/lib/contexts/BaseFuroContextAccessor.js +47 -0
  154. package/lib/emit-payload/BaseEmitPayload.js +91 -0
  155. package/lib/index.components.js +61 -0
  156. package/lib/index.core.js +18 -0
  157. package/lib/tools/TimerClerk.js +75 -0
  158. package/nuxt/index.js +109 -0
  159. package/nuxt/runtime/furo-icon-renderer.js +24 -0
  160. package/package.json +137 -0
  161. package/public/furo-vue/components.json +4619 -0
  162. package/public/furo-vue/llms.txt +66 -0
  163. package/types/furo-nuxt.d.ts +48 -0
  164. package/types/generated/components/atoms/FuroAvatar/FuroAvatar.vue.d.ts +74 -0
  165. package/types/generated/components/atoms/FuroAvatar/FuroAvatarContext.d.ts +82 -0
  166. package/types/generated/components/atoms/FuroBadge/FuroBadge.vue.d.ts +12 -0
  167. package/types/generated/components/atoms/FuroBadge/FuroBadgeContext.d.ts +160 -0
  168. package/types/generated/components/atoms/FuroButton/ButtonEmitPayload.d.ts +19 -0
  169. package/types/generated/components/atoms/FuroButton/FuroButton.vue.d.ts +53 -0
  170. package/types/generated/components/atoms/FuroButton/FuroButtonContext.d.ts +156 -0
  171. package/types/generated/components/atoms/FuroCheckbox/CheckboxEmitPayload.d.ts +55 -0
  172. package/types/generated/components/atoms/FuroCheckbox/FuroCheckbox.vue.d.ts +87 -0
  173. package/types/generated/components/atoms/FuroCheckbox/FuroCheckboxContext.d.ts +342 -0
  174. package/types/generated/components/atoms/FuroEmailField/EmailFieldEmitPayload.d.ts +46 -0
  175. package/types/generated/components/atoms/FuroEmailField/FuroEmailField.vue.d.ts +458 -0
  176. package/types/generated/components/atoms/FuroEmailField/FuroEmailFieldContext.d.ts +161 -0
  177. package/types/generated/components/atoms/FuroFileField/FileFieldEmitPayload.d.ts +46 -0
  178. package/types/generated/components/atoms/FuroFileField/FuroFileField.vue.d.ts +454 -0
  179. package/types/generated/components/atoms/FuroFileField/FuroFileFieldContext.d.ts +109 -0
  180. package/types/generated/components/atoms/FuroIcon/FuroIcon.vue.d.ts +14 -0
  181. package/types/generated/components/atoms/FuroIcon/FuroIconContext.d.ts +152 -0
  182. package/types/generated/components/atoms/FuroIcon/FuroIconRegistry.d.ts +457 -0
  183. package/types/generated/components/atoms/FuroIcon/FuroIconifyRendererContext.d.ts +65 -0
  184. package/types/generated/components/atoms/FuroIcon/furoIconData.d.ts +154 -0
  185. package/types/generated/components/atoms/FuroIcon/iconRenderers.d.ts +6 -0
  186. package/types/generated/components/atoms/FuroIcon/icons.d.ts +6 -0
  187. package/types/generated/components/atoms/FuroNumberField/FuroNumberField.vue.d.ts +500 -0
  188. package/types/generated/components/atoms/FuroNumberField/FuroNumberFieldContext.d.ts +243 -0
  189. package/types/generated/components/atoms/FuroNumberField/NumberFieldEmitPayload.d.ts +74 -0
  190. package/types/generated/components/atoms/FuroPasswordField/FuroPasswordField.vue.d.ts +458 -0
  191. package/types/generated/components/atoms/FuroPasswordField/FuroPasswordFieldContext.d.ts +161 -0
  192. package/types/generated/components/atoms/FuroPasswordField/PasswordFieldEmitPayload.d.ts +46 -0
  193. package/types/generated/components/atoms/FuroRadio/FuroRadio.vue.d.ts +96 -0
  194. package/types/generated/components/atoms/FuroRadio/FuroRadioContext.d.ts +290 -0
  195. package/types/generated/components/atoms/FuroRadio/RadioEmitPayload.d.ts +39 -0
  196. package/types/generated/components/atoms/FuroSwitch/FuroSwitch.vue.d.ts +74 -0
  197. package/types/generated/components/atoms/FuroSwitch/FuroSwitchContext.d.ts +218 -0
  198. package/types/generated/components/atoms/FuroSwitch/SwitchEmitPayload.d.ts +42 -0
  199. package/types/generated/components/atoms/FuroTextField/FuroTextField.vue.d.ts +458 -0
  200. package/types/generated/components/atoms/FuroTextField/FuroTextFieldContext.d.ts +161 -0
  201. package/types/generated/components/atoms/FuroTextField/TextFieldEmitPayload.d.ts +52 -0
  202. package/types/generated/components/atoms/FuroTextarea/FuroTextarea.vue.d.ts +422 -0
  203. package/types/generated/components/atoms/FuroTextarea/FuroTextareaContext.d.ts +161 -0
  204. package/types/generated/components/atoms/FuroTextarea/TextareaEmitPayload.d.ts +52 -0
  205. package/types/generated/components/atoms/FuroToggle/FuroToggle.vue.d.ts +51 -0
  206. package/types/generated/components/atoms/FuroToggle/FuroToggleContext.d.ts +191 -0
  207. package/types/generated/components/atoms/FuroToggle/ToggleEmitPayload.d.ts +42 -0
  208. package/types/generated/components/molecules/FuroAccordion/AccordionEmitPayload.d.ts +41 -0
  209. package/types/generated/components/molecules/FuroAccordion/FuroAccordion.vue.d.ts +133 -0
  210. package/types/generated/components/molecules/FuroAccordion/FuroAccordionContext.d.ts +279 -0
  211. package/types/generated/components/molecules/FuroAttachment/FuroAttachment.vue.d.ts +79 -0
  212. package/types/generated/components/molecules/FuroAttachment/FuroAttachmentContext.d.ts +363 -0
  213. package/types/generated/components/molecules/FuroAutocompleteField/AutocompleteEmitPayload.d.ts +129 -0
  214. package/types/generated/components/molecules/FuroAutocompleteField/FuroAutocompleteField.vue.d.ts +751 -0
  215. package/types/generated/components/molecules/FuroAutocompleteField/FuroAutocompleteFieldContext.d.ts +722 -0
  216. package/types/generated/components/molecules/FuroAvatarGroup/FuroAvatarGroup.vue.d.ts +84 -0
  217. package/types/generated/components/molecules/FuroAvatarGroup/FuroAvatarGroupContext.d.ts +150 -0
  218. package/types/generated/components/molecules/FuroBreadcrumb/FuroBreadcrumb.vue.d.ts +24 -0
  219. package/types/generated/components/molecules/FuroBreadcrumb/FuroBreadcrumbContext.d.ts +152 -0
  220. package/types/generated/components/molecules/FuroCollapsible/CollapsibleEmitPayload.d.ts +36 -0
  221. package/types/generated/components/molecules/FuroCollapsible/FuroCollapsible.vue.d.ts +98 -0
  222. package/types/generated/components/molecules/FuroCollapsible/FuroCollapsibleContext.d.ts +191 -0
  223. package/types/generated/components/molecules/FuroControlBlock/FuroControlBlock.vue.d.ts +30 -0
  224. package/types/generated/components/molecules/FuroControlBlock/FuroControlBlockContext.d.ts +57 -0
  225. package/types/generated/components/molecules/FuroDatePicker/DatePickerEmitPayload.d.ts +41 -0
  226. package/types/generated/components/molecules/FuroDatePicker/FuroDatePicker.vue.d.ts +456 -0
  227. package/types/generated/components/molecules/FuroDatePicker/FuroDatePickerContext.d.ts +516 -0
  228. package/types/generated/components/molecules/FuroDateTimePicker/DateTimePickerEmitPayload.d.ts +55 -0
  229. package/types/generated/components/molecules/FuroDateTimePicker/FuroDateTimePicker.vue.d.ts +1365 -0
  230. package/types/generated/components/molecules/FuroDateTimePicker/FuroDateTimePickerContext.d.ts +435 -0
  231. package/types/generated/components/molecules/FuroDropdownMenu/DropdownMenuOptionSelectEmitPayload.d.ts +48 -0
  232. package/types/generated/components/molecules/FuroDropdownMenu/FuroDropdownMenu.vue.d.ts +773 -0
  233. package/types/generated/components/molecules/FuroDropdownMenu/FuroDropdownMenuContext.d.ts +380 -0
  234. package/types/generated/components/molecules/FuroDropdownMenu/FuroDropdownMenuOptionRows.vue.d.ts +261 -0
  235. package/types/generated/components/molecules/FuroEditableField/EditableEmitPayload.d.ts +39 -0
  236. package/types/generated/components/molecules/FuroEditableField/FuroEditableField.vue.d.ts +646 -0
  237. package/types/generated/components/molecules/FuroEditableField/FuroEditableFieldContext.d.ts +477 -0
  238. package/types/generated/components/molecules/FuroEditableField/processors/EditorCollisionProcessor.d.ts +121 -0
  239. package/types/generated/components/molecules/FuroEditableField/processors/ObjectProcessor.d.ts +45 -0
  240. package/types/generated/components/molecules/FuroEmptyState/FuroEmptyState.vue.d.ts +21 -0
  241. package/types/generated/components/molecules/FuroEmptyState/FuroEmptyStateContext.d.ts +32 -0
  242. package/types/generated/components/molecules/FuroErrorState/FuroErrorState.vue.d.ts +21 -0
  243. package/types/generated/components/molecules/FuroErrorState/FuroErrorStateContext.d.ts +32 -0
  244. package/types/generated/components/molecules/FuroPagination/FuroPagination.vue.d.ts +534 -0
  245. package/types/generated/components/molecules/FuroPagination/FuroPaginationContext.d.ts +271 -0
  246. package/types/generated/components/molecules/FuroPopover/FuroPopover.vue.d.ts +513 -0
  247. package/types/generated/components/molecules/FuroPopover/FuroPopoverContext.d.ts +160 -0
  248. package/types/generated/components/molecules/FuroScrollArea/FuroScrollArea.vue.d.ts +124 -0
  249. package/types/generated/components/molecules/FuroScrollArea/FuroScrollAreaContext.d.ts +86 -0
  250. package/types/generated/components/molecules/FuroSearchField/FuroSearchField.vue.d.ts +487 -0
  251. package/types/generated/components/molecules/FuroSearchField/FuroSearchFieldContext.d.ts +137 -0
  252. package/types/generated/components/molecules/FuroSectionHeader/FuroSectionHeader.vue.d.ts +49 -0
  253. package/types/generated/components/molecules/FuroSectionHeader/FuroSectionHeaderContext.d.ts +121 -0
  254. package/types/generated/components/molecules/FuroSelect/FuroSelect.vue.d.ts +719 -0
  255. package/types/generated/components/molecules/FuroSelect/FuroSelectContext.d.ts +402 -0
  256. package/types/generated/components/molecules/FuroSelect/SelectEmitPayload.d.ts +102 -0
  257. package/types/generated/components/molecules/FuroSeparator/FuroSeparator.vue.d.ts +39 -0
  258. package/types/generated/components/molecules/FuroSeparator/FuroSeparatorContext.d.ts +31 -0
  259. package/types/generated/components/molecules/FuroSkeleton/FuroSkeleton.vue.d.ts +27 -0
  260. package/types/generated/components/molecules/FuroSkeleton/FuroSkeletonContext.d.ts +61 -0
  261. package/types/generated/components/molecules/FuroSplitter/FuroSplitter.vue.d.ts +139 -0
  262. package/types/generated/components/molecules/FuroSplitter/FuroSplitterContext.d.ts +226 -0
  263. package/types/generated/components/molecules/FuroSplitter/SplitterEmitPayload.d.ts +41 -0
  264. package/types/generated/components/molecules/FuroTimeField/FuroTimeField.vue.d.ts +498 -0
  265. package/types/generated/components/molecules/FuroTimeField/FuroTimeFieldContext.d.ts +555 -0
  266. package/types/generated/components/molecules/FuroTimeField/TimeFieldEmitPayload.d.ts +41 -0
  267. package/types/generated/components/molecules/FuroToggleGroup/FuroToggleGroup.vue.d.ts +70 -0
  268. package/types/generated/components/molecules/FuroToggleGroup/FuroToggleGroupContext.d.ts +270 -0
  269. package/types/generated/components/molecules/FuroToggleGroup/ToggleGroupEmitPayload.d.ts +41 -0
  270. package/types/generated/components/molecules/FuroToolBar/FuroToolBar.vue.d.ts +30 -0
  271. package/types/generated/components/molecules/FuroToolBar/FuroToolBarContext.d.ts +48 -0
  272. package/types/generated/components/molecules/FuroTooltip/FuroTooltip.vue.d.ts +524 -0
  273. package/types/generated/components/molecules/FuroTooltip/FuroTooltipContext.d.ts +166 -0
  274. package/types/generated/components/organisms/FuroAlertDialog/FuroAlertDialog.vue.d.ts +651 -0
  275. package/types/generated/components/organisms/FuroAlertDialog/FuroAlertDialogContext.d.ts +299 -0
  276. package/types/generated/components/organisms/FuroDialog/FuroDialog.vue.d.ts +583 -0
  277. package/types/generated/components/organisms/FuroDialog/FuroDialogContext.d.ts +264 -0
  278. package/types/generated/components/organisms/FuroDrawer/FuroDrawer.vue.d.ts +635 -0
  279. package/types/generated/components/organisms/FuroDrawer/FuroDrawerContext.d.ts +347 -0
  280. package/types/generated/components/organisms/FuroEditor/FuroEditor.vue.d.ts +2487 -0
  281. package/types/generated/components/organisms/FuroEditor/FuroEditorCommandContext.d.ts +192 -0
  282. package/types/generated/components/organisms/FuroEditor/FuroEditorContext.d.ts +904 -0
  283. package/types/generated/components/organisms/FuroEditor/FuroEditorMentionMenu.vue.d.ts +43 -0
  284. package/types/generated/components/organisms/FuroEditor/FuroEditorMentionMenuContext.d.ts +159 -0
  285. package/types/generated/components/organisms/FuroEditor/PreserveNewlinesPasteExtension.d.ts +43 -0
  286. package/types/generated/components/organisms/FuroEditor/build-editor-extensions.d.ts +22 -0
  287. package/types/generated/components/organisms/FuroEditor/mention-suggestion.d.ts +25 -0
  288. package/types/generated/components/organisms/FuroEditor/paste-link-segments.d.ts +31 -0
  289. package/types/generated/components/organisms/FuroSidebar/FuroSidebar.vue.d.ts +898 -0
  290. package/types/generated/components/organisms/FuroSidebar/FuroSidebarContext.d.ts +596 -0
  291. package/types/generated/components/organisms/FuroStepper/FuroStepper.vue.d.ts +589 -0
  292. package/types/generated/components/organisms/FuroStepper/FuroStepperContext.d.ts +266 -0
  293. package/types/generated/components/organisms/FuroTable/FuroTable.vue.d.ts +528 -0
  294. package/types/generated/components/organisms/FuroTable/FuroTableContext.d.ts +1035 -0
  295. package/types/generated/components/organisms/FuroTable/FuroTableRowItemContext.d.ts +62 -0
  296. package/types/generated/components/organisms/FuroTabs/FuroTabs.vue.d.ts +515 -0
  297. package/types/generated/components/organisms/FuroTabs/FuroTabsContext.d.ts +438 -0
  298. package/types/generated/components/organisms/FuroToast/FuroToast.vue.d.ts +725 -0
  299. package/types/generated/components/organisms/FuroToast/FuroToastContext.d.ts +543 -0
  300. package/types/generated/components/organisms/FuroToast/FuroToaster.vue.d.ts +729 -0
  301. package/types/generated/components/organisms/FuroToast/FuroToasterContext.d.ts +62 -0
  302. package/types/generated/components/organisms/FuroToast/ToastQueue.d.ts +201 -0
  303. package/types/generated/components/organisms/FuroToast/toast.d.ts +23 -0
  304. package/types/generated/contexts/BaseFuroContext.d.ts +207 -0
  305. package/types/generated/contexts/BaseFuroContextAccessor.d.ts +28 -0
  306. package/types/generated/emit-payload/BaseEmitPayload.d.ts +62 -0
  307. package/types/generated/index.components.d.ts +50 -0
  308. package/types/generated/index.core.d.ts +6 -0
  309. package/types/generated/tools/TimerClerk.d.ts +50 -0
  310. package/types/index.d.ts +12 -0
@@ -0,0 +1,1014 @@
1
+ import {
2
+ ref,
3
+ } from 'vue'
4
+
5
+ import BaseFuroContext from '../../../contexts/BaseFuroContext.js'
6
+
7
+ const DEFAULT_NAVIGATION_LABEL = 'Sidebar'
8
+ const DEFAULT_SEARCH_LABEL = 'Search'
9
+
10
+ /**
11
+ * Context class for FuroSidebar organism.
12
+ *
13
+ * @extends {BaseFuroContext<null, Props, EmitEventName>}
14
+ */
15
+ export default class FuroSidebarContext extends BaseFuroContext {
16
+ /**
17
+ * Constructor.
18
+ *
19
+ * @param {FuroSidebarContextParams} params - Parameters of this constructor.
20
+ */
21
+ constructor ({
22
+ props,
23
+ componentContext,
24
+
25
+ refHash,
26
+ }) {
27
+ super({
28
+ props,
29
+ componentContext,
30
+ })
31
+
32
+ this.refHash = refHash
33
+ }
34
+
35
+ /**
36
+ * Factory method.
37
+ *
38
+ * @template {X extends typeof FuroSidebarContext ? X : never} T, X
39
+ * @override
40
+ * @param {FuroSidebarContextFactoryParams} params - Parameters of this factory method.
41
+ * @returns {InstanceType<T>} An instance of this class.
42
+ * @this {T}
43
+ */
44
+ static create ({
45
+ props,
46
+ componentContext,
47
+
48
+ refHash = this.buildRefHash(),
49
+ }) {
50
+ return /** @type {InstanceType<T>} */ (
51
+ new this({
52
+ props,
53
+ componentContext,
54
+
55
+ refHash,
56
+ })
57
+ )
58
+ }
59
+
60
+ /**
61
+ * Build ref hash.
62
+ *
63
+ * @override
64
+ * @returns {FuroSidebarContextParams['refHash']} Ref hash.
65
+ */
66
+ static buildRefHash () {
67
+ return {
68
+ activeKeyRef: /** @type {import('vue').Ref<string | null>} */ (ref(null)),
69
+ expandedKeysRef: /** @type {import('vue').Ref<Array<string>>} */ (ref([])),
70
+ }
71
+ }
72
+
73
+ /**
74
+ * Icon marking an open disclosure.
75
+ *
76
+ * @returns {string} Name of a built-in icon.
77
+ */
78
+ static get OPEN_DISCLOSURE_ICON_NAME () {
79
+ return 'ph:caret-up'
80
+ }
81
+
82
+ /**
83
+ * Icon marking a closed disclosure.
84
+ *
85
+ * @returns {string} Name of a built-in icon.
86
+ */
87
+ static get CLOSED_DISCLOSURE_ICON_NAME () {
88
+ return 'ph:caret-down'
89
+ }
90
+
91
+ /**
92
+ * Get emit event name.
93
+ *
94
+ * @override
95
+ * @returns {Readonly<{
96
+ * NAVIGATE: 'navigate'
97
+ * UPDATE_ACTIVE_KEY: 'update:activeKey'
98
+ * EXPAND_CHANGE: 'expand-change'
99
+ * UPDATE_EXPANDED_KEYS: 'update:expandedKeys'
100
+ * SEARCH_CHANGE: 'search-change'
101
+ * SEARCH_COMMIT: 'search-commit'
102
+ * UPDATE_SEARCH_VALUE: 'update:searchValue'
103
+ * }>} Emit event names.
104
+ */
105
+ static get EMIT_EVENT_NAME () {
106
+ return {
107
+ NAVIGATE: 'navigate',
108
+ UPDATE_ACTIVE_KEY: 'update:activeKey',
109
+ EXPAND_CHANGE: 'expand-change',
110
+ UPDATE_EXPANDED_KEYS: 'update:expandedKeys',
111
+ SEARCH_CHANGE: 'search-change',
112
+ SEARCH_COMMIT: 'search-commit',
113
+ UPDATE_SEARCH_VALUE: 'update:searchValue',
114
+ }
115
+ }
116
+
117
+ /**
118
+ * Get emit options.
119
+ *
120
+ * @returns {{
121
+ * 'navigate': (payload: NavigatePayload) => boolean
122
+ * 'update:activeKey': (key: string) => boolean
123
+ * 'expand-change': (payload: ExpandChangePayload) => boolean
124
+ * 'update:expandedKeys': (keys: Array<string>) => boolean
125
+ * 'search-change': (payload: SidebarSearchPayload) => boolean
126
+ * 'search-commit': (payload: SidebarSearchPayload) => boolean
127
+ * 'update:searchValue': (value: string | null) => boolean
128
+ * }} Emit event hash.
129
+ */
130
+ static get EMIT_EVENT_HASH () {
131
+ return {
132
+ [this.EMIT_EVENT_NAME.NAVIGATE]: (/** @type {NavigatePayload} */ payload) => true,
133
+ [this.EMIT_EVENT_NAME.UPDATE_ACTIVE_KEY]: (/** @type {string} */ key) => true,
134
+ [this.EMIT_EVENT_NAME.EXPAND_CHANGE]: (/** @type {ExpandChangePayload} */ payload) => true,
135
+ [this.EMIT_EVENT_NAME.UPDATE_EXPANDED_KEYS]: (/** @type {Array<string>} */ keys) => true,
136
+ [this.EMIT_EVENT_NAME.SEARCH_CHANGE]: (/** @type {SidebarSearchPayload} */ payload) => true,
137
+ [this.EMIT_EVENT_NAME.SEARCH_COMMIT]: (/** @type {SidebarSearchPayload} */ payload) => true,
138
+ [this.EMIT_EVENT_NAME.UPDATE_SEARCH_VALUE]: (/** @type {string | null} */ value) => true,
139
+ }
140
+ }
141
+
142
+ /**
143
+ * get: Constructor of this class.
144
+ *
145
+ * @override
146
+ * @returns {typeof FuroSidebarContext} Constructor of this class.
147
+ */
148
+ get Ctor () {
149
+ return /** @type {typeof FuroSidebarContext} */ (
150
+ this.constructor
151
+ )
152
+ }
153
+
154
+ /**
155
+ * get: the internally held active key, used while uncontrolled.
156
+ *
157
+ * @returns {import('vue').Ref<string | null>} Ref of the active key.
158
+ */
159
+ get activeKeyRef () {
160
+ return this.refHash.activeKeyRef
161
+ }
162
+
163
+ /**
164
+ * get: the internally held open disclosures, used while uncontrolled.
165
+ *
166
+ * @returns {import('vue').Ref<Array<string>>} Ref of the open keys.
167
+ */
168
+ get expandedKeysRef () {
169
+ return this.refHash.expandedKeysRef
170
+ }
171
+
172
+ /**
173
+ * Parcel passed from parent via props.
174
+ *
175
+ * @override
176
+ * @returns {NonNullable<Props['parcel']>} Parcel filled with its defaults.
177
+ */
178
+ get parcel () {
179
+ return {
180
+ groups: [],
181
+ collapsed: false,
182
+ searchable: false,
183
+ searchValue: null,
184
+ searchPlaceholder: null,
185
+ searchLabel: DEFAULT_SEARCH_LABEL,
186
+ label: DEFAULT_NAVIGATION_LABEL,
187
+ ...this.props.parcel,
188
+ }
189
+ }
190
+
191
+ /**
192
+ * Normalized groups for rendering.
193
+ *
194
+ * @returns {Array<GroupEntry>} Group entries.
195
+ */
196
+ get groupEntries () {
197
+ return (this.parcel?.groups ?? [])
198
+ .map(it => ({
199
+ key: it.key,
200
+ label: it.label ?? null,
201
+ items: this.buildItemEntries({
202
+ items: it.items ?? [],
203
+ }),
204
+ }))
205
+ }
206
+
207
+ /**
208
+ * Whether the rail is drawn as the narrow icon-only form.
209
+ *
210
+ * @returns {boolean} Whether the rail is collapsed.
211
+ */
212
+ isCollapsed () {
213
+ return this.parcel?.collapsed === true
214
+ }
215
+
216
+ /**
217
+ * Whether the active key arrives from the parcel rather than from within.
218
+ *
219
+ * @returns {boolean} Whether the active key is controlled.
220
+ */
221
+ isControlledActiveKey () {
222
+ const { parcel } = this.props
223
+
224
+ return parcel !== null
225
+ && Object.hasOwn(parcel, 'activeKey')
226
+ }
227
+
228
+ /**
229
+ * Whether the open disclosures arrive from the parcel rather than from within.
230
+ *
231
+ * @returns {boolean} Whether the open disclosures are controlled.
232
+ */
233
+ isControlledExpandedKeys () {
234
+ const { parcel } = this.props
235
+
236
+ return parcel !== null
237
+ && Object.hasOwn(parcel, 'expandedKeys')
238
+ }
239
+
240
+ /**
241
+ * Whether a given key is the one the application currently shows.
242
+ *
243
+ * @param {{
244
+ * key: string
245
+ * }} params - Parameters.
246
+ * @returns {boolean} Whether the key is active.
247
+ */
248
+ isActiveEntry ({
249
+ key,
250
+ }) {
251
+ return this.extractActiveKey() === key
252
+ }
253
+
254
+ /**
255
+ * Whether a given key has its sub-items revealed.
256
+ *
257
+ * @param {{
258
+ * key: string
259
+ * }} params - Parameters.
260
+ * @returns {boolean} Whether the disclosure is open.
261
+ */
262
+ isExpandedEntry ({
263
+ key,
264
+ }) {
265
+ return this.extractExpandedKeys()
266
+ .includes(key)
267
+ }
268
+
269
+ /**
270
+ * Whether the header region renders.
271
+ *
272
+ * @returns {boolean} Whether the header slot was filled.
273
+ */
274
+ hasHeaderSlot () {
275
+ return Boolean(this.slots?.header)
276
+ }
277
+
278
+ /**
279
+ * Whether the footer region renders.
280
+ *
281
+ * @returns {boolean} Whether the footer slot was filled.
282
+ */
283
+ hasFooterSlot () {
284
+ return Boolean(this.slots?.footer)
285
+ }
286
+
287
+ /**
288
+ * Whether the search entry renders.
289
+ *
290
+ * A collapsed rail is one icon box wide, which no text control fits in, so the
291
+ * entry is dropped there rather than squeezed.
292
+ *
293
+ * @returns {boolean} Whether the search entry renders.
294
+ */
295
+ shouldShowSearch () {
296
+ return this.parcel?.searchable === true
297
+ && !this.isCollapsed()
298
+ }
299
+
300
+ /**
301
+ * Whether a group draws its heading.
302
+ *
303
+ * @param {{
304
+ * group: GroupEntry
305
+ * }} params - Parameters.
306
+ * @returns {boolean} Whether the heading renders.
307
+ */
308
+ shouldShowGroupLabel ({
309
+ group,
310
+ }) {
311
+ return group.label !== null
312
+ && !this.isCollapsed()
313
+ }
314
+
315
+ /**
316
+ * Whether item labels render.
317
+ *
318
+ * @returns {boolean} Whether labels render.
319
+ */
320
+ shouldShowLabel () {
321
+ return !this.isCollapsed()
322
+ }
323
+
324
+ /**
325
+ * Whether an item draws its disclosure caret.
326
+ *
327
+ * @param {{
328
+ * entry: ItemEntry
329
+ * }} params - Parameters.
330
+ * @returns {boolean} Whether the caret renders.
331
+ */
332
+ shouldShowDisclosureIcon ({
333
+ entry,
334
+ }) {
335
+ return entry.hasSubItems
336
+ && !this.isCollapsed()
337
+ }
338
+
339
+ /**
340
+ * Whether an item reveals its sub-items.
341
+ *
342
+ * @param {{
343
+ * entry: ItemEntry
344
+ * }} params - Parameters.
345
+ * @returns {boolean} Whether the sub-items render.
346
+ */
347
+ shouldShowSubItems ({
348
+ entry,
349
+ }) {
350
+ return entry.hasSubItems
351
+ && this.isExpandedEntry({
352
+ key: entry.key,
353
+ })
354
+ && !this.isCollapsed()
355
+ }
356
+
357
+ /**
358
+ * Resolve the key the application currently shows.
359
+ *
360
+ * @returns {string | null} The active key.
361
+ */
362
+ extractActiveKey () {
363
+ if (this.isControlledActiveKey()) {
364
+ return this.parcel?.activeKey
365
+ ?? null
366
+ }
367
+
368
+ return this.activeKeyRef.value
369
+ }
370
+
371
+ /**
372
+ * Resolve the keys whose sub-items are revealed.
373
+ *
374
+ * @returns {Array<string>} The open keys.
375
+ */
376
+ extractExpandedKeys () {
377
+ if (this.isControlledExpandedKeys()) {
378
+ return this.parcel?.expandedKeys
379
+ ?? []
380
+ }
381
+
382
+ return this.expandedKeysRef.value
383
+ }
384
+
385
+ /**
386
+ * Resolve the caret an item draws.
387
+ *
388
+ * @param {{
389
+ * entry: ItemEntry
390
+ * }} params - Parameters.
391
+ * @returns {string} Name of a built-in icon.
392
+ */
393
+ extractDisclosureIconName ({
394
+ entry,
395
+ }) {
396
+ return this.isExpandedEntry({
397
+ key: entry.key,
398
+ })
399
+ ? this.Ctor.OPEN_DISCLOSURE_ICON_NAME
400
+ : this.Ctor.CLOSED_DISCLOSURE_ICON_NAME
401
+ }
402
+
403
+ /**
404
+ * Resolve the name a collapsed item is announced and titled with.
405
+ *
406
+ * An expanded rail shows the label as text, so repeating it as an attribute
407
+ * would have a screen reader read it twice.
408
+ *
409
+ * @param {{
410
+ * entry: ItemEntry
411
+ * }} params - Parameters.
412
+ * @returns {string | null} The label, or null while the rail is expanded.
413
+ */
414
+ extractCollapsedItemLabel ({
415
+ entry,
416
+ }) {
417
+ return this.isCollapsed()
418
+ ? entry.label
419
+ : null
420
+ }
421
+
422
+ /**
423
+ * Resolve the aria-current value of an item.
424
+ *
425
+ * @param {{
426
+ * entry: ItemEntry | SubItemEntry
427
+ * }} params - Parameters.
428
+ * @returns {'page' | null} The aria-current value.
429
+ */
430
+ extractCurrentValue ({
431
+ entry,
432
+ }) {
433
+ return this.isActiveEntry({
434
+ key: entry.key,
435
+ })
436
+ ? 'page'
437
+ : null
438
+ }
439
+
440
+ /**
441
+ * Resolve the aria-expanded value of an item.
442
+ *
443
+ * @param {{
444
+ * entry: ItemEntry
445
+ * }} params - Parameters.
446
+ * @returns {'true' | 'false' | null} The aria-expanded value, null when the item discloses nothing.
447
+ */
448
+ extractDisclosureExpandedValue ({
449
+ entry,
450
+ }) {
451
+ if (!entry.hasSubItems) {
452
+ return null
453
+ }
454
+
455
+ return this.isExpandedEntry({
456
+ key: entry.key,
457
+ })
458
+ ? 'true'
459
+ : 'false'
460
+ }
461
+
462
+ /**
463
+ * Resolve the accessible name of the navigation landmark.
464
+ *
465
+ * @returns {string} Name of the landmark.
466
+ */
467
+ extractNavigationLabel () {
468
+ return this.parcel?.label
469
+ ?? DEFAULT_NAVIGATION_LABEL
470
+ }
471
+
472
+ /**
473
+ * Resolve the placeholder of the search control.
474
+ *
475
+ * @returns {string | null} Placeholder of the search control.
476
+ */
477
+ extractSearchPlaceholder () {
478
+ return this.parcel?.searchPlaceholder
479
+ ?? null
480
+ }
481
+
482
+ /**
483
+ * Resolve the accessible name of the search control.
484
+ *
485
+ * @returns {string} Name of the search control.
486
+ */
487
+ extractSearchLabel () {
488
+ return this.parcel?.searchLabel
489
+ ?? DEFAULT_SEARCH_LABEL
490
+ }
491
+
492
+ /**
493
+ * Resolve the text the search control holds.
494
+ *
495
+ * @returns {string | null} The search text.
496
+ */
497
+ extractSearchValue () {
498
+ return this.parcel?.searchValue
499
+ ?? null
500
+ }
501
+
502
+ /**
503
+ * Extract attributes handed to the search control.
504
+ *
505
+ * @returns {{
506
+ * placeholder: string | null
507
+ * 'aria-label': string
508
+ * }} Attributes of the search control.
509
+ */
510
+ extractSearchAttributes () {
511
+ return {
512
+ placeholder: this.extractSearchPlaceholder(),
513
+ 'aria-label': this.extractSearchLabel(),
514
+ }
515
+ }
516
+
517
+ /**
518
+ * Extract CSS class map for the root.
519
+ *
520
+ * @returns {Record<string, boolean>} Class map of the root.
521
+ */
522
+ extractRootClassNames () {
523
+ return {
524
+ 'unit-sidebar': true,
525
+ collapsed: this.isCollapsed(),
526
+ }
527
+ }
528
+
529
+ /**
530
+ * Extract CSS class map for a primary item.
531
+ *
532
+ * @param {{
533
+ * entry: ItemEntry
534
+ * }} params - Parameters.
535
+ * @returns {Record<string, boolean>} Class map of the item.
536
+ */
537
+ extractItemClassNames ({
538
+ entry,
539
+ }) {
540
+ return {
541
+ row: true,
542
+ active: this.isActiveEntry({
543
+ key: entry.key,
544
+ }),
545
+ disclosure: entry.hasSubItems,
546
+ }
547
+ }
548
+
549
+ /**
550
+ * Extract CSS class map for a nested sub-item.
551
+ *
552
+ * @param {{
553
+ * entry: SubItemEntry
554
+ * }} params - Parameters.
555
+ * @returns {Record<string, boolean>} Class map of the sub-item.
556
+ */
557
+ extractSubItemClassNames ({
558
+ entry,
559
+ }) {
560
+ return {
561
+ 'sub-row': true,
562
+ active: this.isActiveEntry({
563
+ key: entry.key,
564
+ }),
565
+ }
566
+ }
567
+
568
+ /**
569
+ * Build the entries of one group.
570
+ *
571
+ * @param {{
572
+ * items: Array<FuroSidebarItem>
573
+ * }} params - Parameters.
574
+ * @returns {Array<ItemEntry>} Item entries.
575
+ */
576
+ buildItemEntries ({
577
+ items,
578
+ }) {
579
+ return items.map(it => ({
580
+ key: it.key,
581
+ label: it.label,
582
+ icon: it.icon ?? null,
583
+ hasIcon: Boolean(it.icon),
584
+ disabled: Boolean(it.disabled),
585
+ subItems: this.buildSubItemEntries({
586
+ items: it.items ?? [],
587
+ }),
588
+ hasSubItems: (it.items ?? []).length > 0,
589
+ }))
590
+ }
591
+
592
+ /**
593
+ * Build the entries nested under one item.
594
+ *
595
+ * @param {{
596
+ * items: Array<FuroSidebarSubItem>
597
+ * }} params - Parameters.
598
+ * @returns {Array<SubItemEntry>} Sub-item entries.
599
+ */
600
+ buildSubItemEntries ({
601
+ items,
602
+ }) {
603
+ return items.map(it => ({
604
+ key: it.key,
605
+ label: it.label,
606
+ disabled: Boolean(it.disabled),
607
+ }))
608
+ }
609
+
610
+ /**
611
+ * Build attributes of the root host element.
612
+ *
613
+ * @param {{
614
+ * attrs: Record<string, *>
615
+ * }} params - Parameters.
616
+ * @returns {Record<string, *>} Attributes of the root.
617
+ */
618
+ buildRootAttributes ({
619
+ attrs,
620
+ }) {
621
+ return {
622
+ 'aria-label': this.extractNavigationLabel(),
623
+ ...attrs,
624
+ }
625
+ }
626
+
627
+ /**
628
+ * Build attributes of a primary item.
629
+ *
630
+ * @param {{
631
+ * entry: ItemEntry
632
+ * }} params - Parameters.
633
+ * @returns {{
634
+ * disabled: boolean
635
+ * title: string | null
636
+ * 'aria-label': string | null
637
+ * 'aria-current': 'page' | null
638
+ * 'aria-expanded': 'true' | 'false' | null
639
+ * }} Attributes of the item.
640
+ */
641
+ buildItemAttributes ({
642
+ entry,
643
+ }) {
644
+ const collapsedLabel = this.extractCollapsedItemLabel({
645
+ entry,
646
+ })
647
+
648
+ return {
649
+ disabled: entry.disabled,
650
+ title: collapsedLabel,
651
+ 'aria-label': collapsedLabel,
652
+ 'aria-current': this.extractCurrentValue({
653
+ entry,
654
+ }),
655
+ 'aria-expanded': this.extractDisclosureExpandedValue({
656
+ entry,
657
+ }),
658
+ }
659
+ }
660
+
661
+ /**
662
+ * Build attributes of a nested sub-item.
663
+ *
664
+ * @param {{
665
+ * entry: SubItemEntry
666
+ * }} params - Parameters.
667
+ * @returns {{
668
+ * disabled: boolean
669
+ * 'aria-current': 'page' | null
670
+ * }} Attributes of the sub-item.
671
+ */
672
+ buildSubItemAttributes ({
673
+ entry,
674
+ }) {
675
+ return {
676
+ disabled: entry.disabled,
677
+ 'aria-current': this.extractCurrentValue({
678
+ entry,
679
+ }),
680
+ }
681
+ }
682
+
683
+ /**
684
+ * Build the parcel handed to the search control.
685
+ *
686
+ * @returns {{
687
+ * value: string | null
688
+ * }} Parcel of the search control.
689
+ */
690
+ buildSearchParcel () {
691
+ return {
692
+ value: this.extractSearchValue(),
693
+ }
694
+ }
695
+
696
+ /**
697
+ * Build the open keys a disclosure toggle results in.
698
+ *
699
+ * @param {{
700
+ * key: string
701
+ * }} params - Parameters.
702
+ * @returns {Array<string>} The next open keys.
703
+ */
704
+ buildNextExpandedKeys ({
705
+ key,
706
+ }) {
707
+ const currentKeys = this.extractExpandedKeys()
708
+ const remainingKeys = currentKeys.filter(it => it !== key)
709
+
710
+ return remainingKeys.length === currentKeys.length
711
+ ? [
712
+ ...currentKeys,
713
+ key,
714
+ ]
715
+ : remainingKeys
716
+ }
717
+
718
+ /**
719
+ * Handle a click on a primary item.
720
+ *
721
+ * An item that discloses sub-items opens and closes them; the design gives it
722
+ * a caret rather than a destination, so it never reports navigation.
723
+ *
724
+ * @param {{
725
+ * entry: ItemEntry
726
+ * }} params - Parameters.
727
+ */
728
+ onActivateEntry ({
729
+ entry,
730
+ }) {
731
+ if (entry.hasSubItems) {
732
+ this.toggleDisclosure({
733
+ entry,
734
+ })
735
+
736
+ return
737
+ }
738
+
739
+ this.selectKey({
740
+ key: entry.key,
741
+ parentKey: null,
742
+ })
743
+ }
744
+
745
+ /**
746
+ * Handle a click on a nested sub-item.
747
+ *
748
+ * @param {{
749
+ * entry: SubItemEntry
750
+ * parentEntry: ItemEntry
751
+ * }} params - Parameters.
752
+ */
753
+ onActivateSubEntry ({
754
+ entry,
755
+ parentEntry,
756
+ }) {
757
+ this.selectKey({
758
+ key: entry.key,
759
+ parentKey: parentEntry.key,
760
+ })
761
+ }
762
+
763
+ /**
764
+ * Handle a keystroke reported by the search control.
765
+ *
766
+ * @param {{
767
+ * payload: SidebarSearchPayload
768
+ * }} params - Parameters.
769
+ */
770
+ onSearchChange ({
771
+ payload,
772
+ }) {
773
+ this.emit(
774
+ this.EMIT_EVENT_NAME.SEARCH_CHANGE,
775
+ payload
776
+ )
777
+
778
+ this.emit(
779
+ this.EMIT_EVENT_NAME.UPDATE_SEARCH_VALUE,
780
+ payload.value
781
+ )
782
+ }
783
+
784
+ /**
785
+ * Handle a settled value reported by the search control.
786
+ *
787
+ * @param {{
788
+ * payload: SidebarSearchPayload
789
+ * }} params - Parameters.
790
+ */
791
+ onSearchCommit ({
792
+ payload,
793
+ }) {
794
+ this.emit(
795
+ this.EMIT_EVENT_NAME.SEARCH_COMMIT,
796
+ payload
797
+ )
798
+
799
+ this.emit(
800
+ this.EMIT_EVENT_NAME.UPDATE_SEARCH_VALUE,
801
+ payload.value
802
+ )
803
+ }
804
+
805
+ /**
806
+ * Report that a key is the one the application should show.
807
+ *
808
+ * @param {{
809
+ * key: string
810
+ * parentKey: string | null
811
+ * }} params - Parameters.
812
+ */
813
+ selectKey ({
814
+ key,
815
+ parentKey,
816
+ }) {
817
+ if (!this.isControlledActiveKey()) {
818
+ this.activeKeyRef.value = key
819
+ }
820
+
821
+ this.emit(
822
+ this.EMIT_EVENT_NAME.UPDATE_ACTIVE_KEY,
823
+ key
824
+ )
825
+
826
+ this.emit(
827
+ this.EMIT_EVENT_NAME.NAVIGATE,
828
+ {
829
+ key,
830
+ parentKey,
831
+ }
832
+ )
833
+ }
834
+
835
+ /**
836
+ * Open or close the sub-items of one item.
837
+ *
838
+ * @param {{
839
+ * entry: ItemEntry
840
+ * }} params - Parameters.
841
+ */
842
+ toggleDisclosure ({
843
+ entry,
844
+ }) {
845
+ const expandedKeys = this.buildNextExpandedKeys({
846
+ key: entry.key,
847
+ })
848
+
849
+ if (!this.isControlledExpandedKeys()) {
850
+ this.expandedKeysRef.value = expandedKeys
851
+ }
852
+
853
+ this.emit(
854
+ this.EMIT_EVENT_NAME.UPDATE_EXPANDED_KEYS,
855
+ expandedKeys
856
+ )
857
+
858
+ this.emit(
859
+ this.EMIT_EVENT_NAME.EXPAND_CHANGE,
860
+ {
861
+ key: entry.key,
862
+ expanded: expandedKeys.includes(entry.key),
863
+ }
864
+ )
865
+ }
866
+ }
867
+
868
+ /**
869
+ * @typedef {import('../../../contexts/BaseFuroContext.js').BaseFuroContextParams & {
870
+ * props: Props
871
+ * componentContext: ComponentContext
872
+ * refHash: {
873
+ * activeKeyRef: import('vue').Ref<string | null>
874
+ * expandedKeysRef: import('vue').Ref<Array<string>>
875
+ * }
876
+ * }} FuroSidebarContextParams
877
+ */
878
+
879
+ /**
880
+ * @typedef {Omit<FuroSidebarContextParams, 'refHash'> & {
881
+ * refHash?: FuroSidebarContextParams['refHash']
882
+ * }} FuroSidebarContextFactoryParams
883
+ */
884
+
885
+ /**
886
+ * @typedef {keyof typeof FuroSidebarContext.EMIT_EVENT_NAME} EmitEventName
887
+ */
888
+
889
+ /**
890
+ * @typedef {import('vue').HTMLAttributes & {
891
+ * parcel?: FuroSidebarParcel | null
892
+ * }} Props
893
+ */
894
+
895
+ /**
896
+ * Closed-set Furo behavior for `<FuroSidebar>`.
897
+ * JSON-serializable only.
898
+ *
899
+ * @typedef {{
900
+ * groups?: Array<FuroSidebarGroup>
901
+ * activeKey?: string | null
902
+ * expandedKeys?: Array<string> | null
903
+ * collapsed?: boolean
904
+ * searchable?: boolean
905
+ * searchValue?: string | null
906
+ * searchPlaceholder?: string | null
907
+ * searchLabel?: string
908
+ * label?: string
909
+ * }} FuroSidebarParcel
910
+ */
911
+
912
+ /**
913
+ * @typedef {{
914
+ * key: string
915
+ * label?: string | null
916
+ * items?: Array<FuroSidebarItem>
917
+ * }} FuroSidebarGroup
918
+ */
919
+
920
+ /**
921
+ * @typedef {{
922
+ * key: string
923
+ * label: string
924
+ * icon?: string | null
925
+ * disabled?: boolean
926
+ * items?: Array<FuroSidebarSubItem>
927
+ * }} FuroSidebarItem
928
+ */
929
+
930
+ /**
931
+ * @typedef {{
932
+ * key: string
933
+ * label: string
934
+ * disabled?: boolean
935
+ * }} FuroSidebarSubItem
936
+ */
937
+
938
+ /**
939
+ * @typedef {{
940
+ * key: string
941
+ * label: string | null
942
+ * items: Array<ItemEntry>
943
+ * }} GroupEntry
944
+ */
945
+
946
+ /**
947
+ * @typedef {{
948
+ * key: string
949
+ * label: string
950
+ * icon: string | null
951
+ * hasIcon: boolean
952
+ * disabled: boolean
953
+ * subItems: Array<SubItemEntry>
954
+ * hasSubItems: boolean
955
+ * }} ItemEntry
956
+ */
957
+
958
+ /**
959
+ * @typedef {{
960
+ * key: string
961
+ * label: string
962
+ * disabled: boolean
963
+ * }} SubItemEntry
964
+ */
965
+
966
+ /**
967
+ * @typedef {{
968
+ * key: string
969
+ * parentKey: string | null
970
+ * }} NavigatePayload
971
+ */
972
+
973
+ /**
974
+ * @typedef {{
975
+ * key: string
976
+ * expanded: boolean
977
+ * }} ExpandChangePayload
978
+ */
979
+
980
+ /**
981
+ * @typedef {import('../../atoms/FuroTextField/TextFieldEmitPayload.js').default} SidebarSearchPayload
982
+ */
983
+
984
+ /**
985
+ * @typedef {import('vue').SetupContext<typeof FuroSidebarContext.EMIT_EVENT_HASH, FuroSidebarSlots>} ComponentContext
986
+ */
987
+
988
+ /**
989
+ * @typedef {import('vue').SlotsType<{
990
+ * header: {}
991
+ * footer: {}
992
+ * search: {}
993
+ * item: {
994
+ * entry: ItemEntry
995
+ * active: boolean
996
+ * expanded: boolean
997
+ * collapsed: boolean
998
+ * }
999
+ * 'sub-item': {
1000
+ * entry: SubItemEntry
1001
+ * parent: ItemEntry
1002
+ * active: boolean
1003
+ * }
1004
+ * }>} FuroSidebarSlots
1005
+ */
1006
+
1007
+ /**
1008
+ * @typedef {(
1009
+ * props: Props,
1010
+ * componentContext: ComponentContext
1011
+ * ) => {
1012
+ * context: FuroSidebarContext
1013
+ * }} FuroSidebarSetup
1014
+ */