@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.
- package/LICENSE +9 -0
- package/README.ja.md +334 -0
- package/README.md +333 -0
- package/index.js +11 -0
- package/lib/assets/css/furo/0010.variables-palette-color-scale.css +298 -0
- package/lib/assets/css/furo/0020.variables-z-index.css +10 -0
- package/lib/assets/css/furo/0030.variables-semantic-color.css +178 -0
- package/lib/assets/css/furo/0035.variables-semantic-dimension.css +104 -0
- package/lib/assets/css/furo/0040.variables-component-furo.css +28 -0
- package/lib/assets/css/furo/0050.furo-editor-content.css +22 -0
- package/lib/assets/css/furo.css +15 -0
- package/lib/components/atoms/FuroAvatar/FuroAvatar.vue +135 -0
- package/lib/components/atoms/FuroAvatar/FuroAvatarContext.js +147 -0
- package/lib/components/atoms/FuroBadge/FuroBadge.vue +240 -0
- package/lib/components/atoms/FuroBadge/FuroBadgeContext.js +298 -0
- package/lib/components/atoms/FuroButton/ButtonEmitPayload.js +44 -0
- package/lib/components/atoms/FuroButton/FuroButton.vue +301 -0
- package/lib/components/atoms/FuroButton/FuroButtonContext.js +328 -0
- package/lib/components/atoms/FuroCheckbox/CheckboxEmitPayload.js +106 -0
- package/lib/components/atoms/FuroCheckbox/FuroCheckbox.vue +173 -0
- package/lib/components/atoms/FuroCheckbox/FuroCheckboxContext.js +682 -0
- package/lib/components/atoms/FuroEmailField/EmailFieldEmitPayload.js +74 -0
- package/lib/components/atoms/FuroEmailField/FuroEmailField.vue +119 -0
- package/lib/components/atoms/FuroEmailField/FuroEmailFieldContext.js +311 -0
- package/lib/components/atoms/FuroFileField/FileFieldEmitPayload.js +80 -0
- package/lib/components/atoms/FuroFileField/FuroFileField.vue +128 -0
- package/lib/components/atoms/FuroFileField/FuroFileFieldContext.js +195 -0
- package/lib/components/atoms/FuroIcon/FuroIcon.vue +74 -0
- package/lib/components/atoms/FuroIcon/FuroIconContext.js +293 -0
- package/lib/components/atoms/FuroIcon/FuroIconRegistry.js +617 -0
- package/lib/components/atoms/FuroIcon/FuroIconifyRendererContext.js +101 -0
- package/lib/components/atoms/FuroIcon/furoIconData.js +164 -0
- package/lib/components/atoms/FuroIcon/iconRenderers.js +62 -0
- package/lib/components/atoms/FuroIcon/icons.js +7 -0
- package/lib/components/atoms/FuroNumberField/FuroNumberField.vue +213 -0
- package/lib/components/atoms/FuroNumberField/FuroNumberFieldContext.js +442 -0
- package/lib/components/atoms/FuroNumberField/NumberFieldEmitPayload.js +162 -0
- package/lib/components/atoms/FuroPasswordField/FuroPasswordField.vue +119 -0
- package/lib/components/atoms/FuroPasswordField/FuroPasswordFieldContext.js +311 -0
- package/lib/components/atoms/FuroPasswordField/PasswordFieldEmitPayload.js +74 -0
- package/lib/components/atoms/FuroRadio/FuroRadio.vue +193 -0
- package/lib/components/atoms/FuroRadio/FuroRadioContext.js +557 -0
- package/lib/components/atoms/FuroRadio/RadioEmitPayload.js +72 -0
- package/lib/components/atoms/FuroSwitch/FuroSwitch.vue +165 -0
- package/lib/components/atoms/FuroSwitch/FuroSwitchContext.js +440 -0
- package/lib/components/atoms/FuroSwitch/SwitchEmitPayload.js +86 -0
- package/lib/components/atoms/FuroTextField/FuroTextField.vue +119 -0
- package/lib/components/atoms/FuroTextField/FuroTextFieldContext.js +311 -0
- package/lib/components/atoms/FuroTextField/TextFieldEmitPayload.js +83 -0
- package/lib/components/atoms/FuroTextarea/FuroTextarea.vue +121 -0
- package/lib/components/atoms/FuroTextarea/FuroTextareaContext.js +322 -0
- package/lib/components/atoms/FuroTextarea/TextareaEmitPayload.js +83 -0
- package/lib/components/atoms/FuroToggle/FuroToggle.vue +172 -0
- package/lib/components/atoms/FuroToggle/FuroToggleContext.js +410 -0
- package/lib/components/atoms/FuroToggle/ToggleEmitPayload.js +86 -0
- package/lib/components/molecules/FuroAccordion/AccordionEmitPayload.js +80 -0
- package/lib/components/molecules/FuroAccordion/FuroAccordion.vue +219 -0
- package/lib/components/molecules/FuroAccordion/FuroAccordionContext.js +547 -0
- package/lib/components/molecules/FuroAttachment/FuroAttachment.vue +376 -0
- package/lib/components/molecules/FuroAttachment/FuroAttachmentContext.js +628 -0
- package/lib/components/molecules/FuroAutocompleteField/AutocompleteEmitPayload.js +225 -0
- package/lib/components/molecules/FuroAutocompleteField/FuroAutocompleteField.vue +669 -0
- package/lib/components/molecules/FuroAutocompleteField/FuroAutocompleteFieldContext.js +1525 -0
- package/lib/components/molecules/FuroAvatarGroup/FuroAvatarGroup.vue +126 -0
- package/lib/components/molecules/FuroAvatarGroup/FuroAvatarGroupContext.js +245 -0
- package/lib/components/molecules/FuroBreadcrumb/FuroBreadcrumb.vue +219 -0
- package/lib/components/molecules/FuroBreadcrumb/FuroBreadcrumbContext.js +257 -0
- package/lib/components/molecules/FuroCollapsible/CollapsibleEmitPayload.js +69 -0
- package/lib/components/molecules/FuroCollapsible/FuroCollapsible.vue +177 -0
- package/lib/components/molecules/FuroCollapsible/FuroCollapsibleContext.js +389 -0
- package/lib/components/molecules/FuroControlBlock/FuroControlBlock.vue +149 -0
- package/lib/components/molecules/FuroControlBlock/FuroControlBlockContext.js +81 -0
- package/lib/components/molecules/FuroDatePicker/DatePickerEmitPayload.js +74 -0
- package/lib/components/molecules/FuroDatePicker/FuroDatePicker.vue +661 -0
- package/lib/components/molecules/FuroDatePicker/FuroDatePickerContext.js +1038 -0
- package/lib/components/molecules/FuroDateTimePicker/DateTimePickerEmitPayload.js +96 -0
- package/lib/components/molecules/FuroDateTimePicker/FuroDateTimePicker.vue +153 -0
- package/lib/components/molecules/FuroDateTimePicker/FuroDateTimePickerContext.js +840 -0
- package/lib/components/molecules/FuroDropdownMenu/DropdownMenuOptionSelectEmitPayload.js +100 -0
- package/lib/components/molecules/FuroDropdownMenu/FuroDropdownMenu.vue +348 -0
- package/lib/components/molecules/FuroDropdownMenu/FuroDropdownMenuContext.js +714 -0
- package/lib/components/molecules/FuroDropdownMenu/FuroDropdownMenuOptionRows.vue +222 -0
- package/lib/components/molecules/FuroEditableField/EditableEmitPayload.js +89 -0
- package/lib/components/molecules/FuroEditableField/FuroEditableField.vue +314 -0
- package/lib/components/molecules/FuroEditableField/FuroEditableFieldContext.js +1018 -0
- package/lib/components/molecules/FuroEditableField/processors/EditorCollisionProcessor.js +236 -0
- package/lib/components/molecules/FuroEditableField/processors/ObjectProcessor.js +101 -0
- package/lib/components/molecules/FuroEmptyState/FuroEmptyState.vue +124 -0
- package/lib/components/molecules/FuroEmptyState/FuroEmptyStateContext.js +42 -0
- package/lib/components/molecules/FuroErrorState/FuroErrorState.vue +125 -0
- package/lib/components/molecules/FuroErrorState/FuroErrorStateContext.js +42 -0
- package/lib/components/molecules/FuroPagination/FuroPagination.vue +246 -0
- package/lib/components/molecules/FuroPagination/FuroPaginationContext.js +489 -0
- package/lib/components/molecules/FuroPopover/FuroPopover.vue +171 -0
- package/lib/components/molecules/FuroPopover/FuroPopoverContext.js +279 -0
- package/lib/components/molecules/FuroScrollArea/FuroScrollArea.vue +181 -0
- package/lib/components/molecules/FuroScrollArea/FuroScrollAreaContext.js +149 -0
- package/lib/components/molecules/FuroSearchField/FuroSearchField.vue +155 -0
- package/lib/components/molecules/FuroSearchField/FuroSearchFieldContext.js +231 -0
- package/lib/components/molecules/FuroSectionHeader/FuroSectionHeader.vue +140 -0
- package/lib/components/molecules/FuroSectionHeader/FuroSectionHeaderContext.js +204 -0
- package/lib/components/molecules/FuroSelect/FuroSelect.vue +474 -0
- package/lib/components/molecules/FuroSelect/FuroSelectContext.js +743 -0
- package/lib/components/molecules/FuroSelect/SelectEmitPayload.js +181 -0
- package/lib/components/molecules/FuroSeparator/FuroSeparator.vue +88 -0
- package/lib/components/molecules/FuroSeparator/FuroSeparatorContext.js +40 -0
- package/lib/components/molecules/FuroSkeleton/FuroSkeleton.vue +101 -0
- package/lib/components/molecules/FuroSkeleton/FuroSkeletonContext.js +82 -0
- package/lib/components/molecules/FuroSplitter/FuroSplitter.vue +237 -0
- package/lib/components/molecules/FuroSplitter/FuroSplitterContext.js +429 -0
- package/lib/components/molecules/FuroSplitter/SplitterEmitPayload.js +69 -0
- package/lib/components/molecules/FuroTimeField/FuroTimeField.vue +251 -0
- package/lib/components/molecules/FuroTimeField/FuroTimeFieldContext.js +1138 -0
- package/lib/components/molecules/FuroTimeField/TimeFieldEmitPayload.js +74 -0
- package/lib/components/molecules/FuroToggleGroup/FuroToggleGroup.vue +211 -0
- package/lib/components/molecules/FuroToggleGroup/FuroToggleGroupContext.js +551 -0
- package/lib/components/molecules/FuroToggleGroup/ToggleGroupEmitPayload.js +80 -0
- package/lib/components/molecules/FuroToolBar/FuroToolBar.vue +91 -0
- package/lib/components/molecules/FuroToolBar/FuroToolBarContext.js +75 -0
- package/lib/components/molecules/FuroTooltip/FuroTooltip.vue +183 -0
- package/lib/components/molecules/FuroTooltip/FuroTooltipContext.js +290 -0
- package/lib/components/organisms/FuroAlertDialog/FuroAlertDialog.vue +324 -0
- package/lib/components/organisms/FuroAlertDialog/FuroAlertDialogContext.js +608 -0
- package/lib/components/organisms/FuroDialog/FuroDialog.vue +362 -0
- package/lib/components/organisms/FuroDialog/FuroDialogContext.js +535 -0
- package/lib/components/organisms/FuroDrawer/FuroDrawer.vue +618 -0
- package/lib/components/organisms/FuroDrawer/FuroDrawerContext.js +676 -0
- package/lib/components/organisms/FuroEditor/FuroEditor.vue +613 -0
- package/lib/components/organisms/FuroEditor/FuroEditorCommandContext.js +420 -0
- package/lib/components/organisms/FuroEditor/FuroEditorContext.js +2048 -0
- package/lib/components/organisms/FuroEditor/FuroEditorMentionMenu.vue +120 -0
- package/lib/components/organisms/FuroEditor/FuroEditorMentionMenuContext.js +261 -0
- package/lib/components/organisms/FuroEditor/PreserveNewlinesPasteExtension.js +267 -0
- package/lib/components/organisms/FuroEditor/build-editor-extensions.js +97 -0
- package/lib/components/organisms/FuroEditor/mention-suggestion.js +320 -0
- package/lib/components/organisms/FuroEditor/paste-link-segments.js +124 -0
- package/lib/components/organisms/FuroSidebar/FuroSidebar.vue +473 -0
- package/lib/components/organisms/FuroSidebar/FuroSidebarContext.js +1014 -0
- package/lib/components/organisms/FuroStepper/FuroStepper.vue +345 -0
- package/lib/components/organisms/FuroStepper/FuroStepperContext.js +481 -0
- package/lib/components/organisms/FuroTable/FuroTable.vue +707 -0
- package/lib/components/organisms/FuroTable/FuroTableContext.js +1965 -0
- package/lib/components/organisms/FuroTable/FuroTableRowItemContext.js +111 -0
- package/lib/components/organisms/FuroTabs/FuroTabs.vue +403 -0
- package/lib/components/organisms/FuroTabs/FuroTabsContext.js +846 -0
- package/lib/components/organisms/FuroToast/FuroToast.vue +624 -0
- package/lib/components/organisms/FuroToast/FuroToastContext.js +1089 -0
- package/lib/components/organisms/FuroToast/FuroToaster.vue +44 -0
- package/lib/components/organisms/FuroToast/FuroToasterContext.js +113 -0
- package/lib/components/organisms/FuroToast/ToastQueue.js +325 -0
- package/lib/components/organisms/FuroToast/toast.js +64 -0
- package/lib/contexts/BaseFuroContext.js +318 -0
- package/lib/contexts/BaseFuroContextAccessor.js +47 -0
- package/lib/emit-payload/BaseEmitPayload.js +91 -0
- package/lib/index.components.js +61 -0
- package/lib/index.core.js +18 -0
- package/lib/tools/TimerClerk.js +75 -0
- package/nuxt/index.js +109 -0
- package/nuxt/runtime/furo-icon-renderer.js +24 -0
- package/package.json +137 -0
- package/public/furo-vue/components.json +4619 -0
- package/public/furo-vue/llms.txt +66 -0
- package/types/furo-nuxt.d.ts +48 -0
- package/types/generated/components/atoms/FuroAvatar/FuroAvatar.vue.d.ts +74 -0
- package/types/generated/components/atoms/FuroAvatar/FuroAvatarContext.d.ts +82 -0
- package/types/generated/components/atoms/FuroBadge/FuroBadge.vue.d.ts +12 -0
- package/types/generated/components/atoms/FuroBadge/FuroBadgeContext.d.ts +160 -0
- package/types/generated/components/atoms/FuroButton/ButtonEmitPayload.d.ts +19 -0
- package/types/generated/components/atoms/FuroButton/FuroButton.vue.d.ts +53 -0
- package/types/generated/components/atoms/FuroButton/FuroButtonContext.d.ts +156 -0
- package/types/generated/components/atoms/FuroCheckbox/CheckboxEmitPayload.d.ts +55 -0
- package/types/generated/components/atoms/FuroCheckbox/FuroCheckbox.vue.d.ts +87 -0
- package/types/generated/components/atoms/FuroCheckbox/FuroCheckboxContext.d.ts +342 -0
- package/types/generated/components/atoms/FuroEmailField/EmailFieldEmitPayload.d.ts +46 -0
- package/types/generated/components/atoms/FuroEmailField/FuroEmailField.vue.d.ts +458 -0
- package/types/generated/components/atoms/FuroEmailField/FuroEmailFieldContext.d.ts +161 -0
- package/types/generated/components/atoms/FuroFileField/FileFieldEmitPayload.d.ts +46 -0
- package/types/generated/components/atoms/FuroFileField/FuroFileField.vue.d.ts +454 -0
- package/types/generated/components/atoms/FuroFileField/FuroFileFieldContext.d.ts +109 -0
- package/types/generated/components/atoms/FuroIcon/FuroIcon.vue.d.ts +14 -0
- package/types/generated/components/atoms/FuroIcon/FuroIconContext.d.ts +152 -0
- package/types/generated/components/atoms/FuroIcon/FuroIconRegistry.d.ts +457 -0
- package/types/generated/components/atoms/FuroIcon/FuroIconifyRendererContext.d.ts +65 -0
- package/types/generated/components/atoms/FuroIcon/furoIconData.d.ts +154 -0
- package/types/generated/components/atoms/FuroIcon/iconRenderers.d.ts +6 -0
- package/types/generated/components/atoms/FuroIcon/icons.d.ts +6 -0
- package/types/generated/components/atoms/FuroNumberField/FuroNumberField.vue.d.ts +500 -0
- package/types/generated/components/atoms/FuroNumberField/FuroNumberFieldContext.d.ts +243 -0
- package/types/generated/components/atoms/FuroNumberField/NumberFieldEmitPayload.d.ts +74 -0
- package/types/generated/components/atoms/FuroPasswordField/FuroPasswordField.vue.d.ts +458 -0
- package/types/generated/components/atoms/FuroPasswordField/FuroPasswordFieldContext.d.ts +161 -0
- package/types/generated/components/atoms/FuroPasswordField/PasswordFieldEmitPayload.d.ts +46 -0
- package/types/generated/components/atoms/FuroRadio/FuroRadio.vue.d.ts +96 -0
- package/types/generated/components/atoms/FuroRadio/FuroRadioContext.d.ts +290 -0
- package/types/generated/components/atoms/FuroRadio/RadioEmitPayload.d.ts +39 -0
- package/types/generated/components/atoms/FuroSwitch/FuroSwitch.vue.d.ts +74 -0
- package/types/generated/components/atoms/FuroSwitch/FuroSwitchContext.d.ts +218 -0
- package/types/generated/components/atoms/FuroSwitch/SwitchEmitPayload.d.ts +42 -0
- package/types/generated/components/atoms/FuroTextField/FuroTextField.vue.d.ts +458 -0
- package/types/generated/components/atoms/FuroTextField/FuroTextFieldContext.d.ts +161 -0
- package/types/generated/components/atoms/FuroTextField/TextFieldEmitPayload.d.ts +52 -0
- package/types/generated/components/atoms/FuroTextarea/FuroTextarea.vue.d.ts +422 -0
- package/types/generated/components/atoms/FuroTextarea/FuroTextareaContext.d.ts +161 -0
- package/types/generated/components/atoms/FuroTextarea/TextareaEmitPayload.d.ts +52 -0
- package/types/generated/components/atoms/FuroToggle/FuroToggle.vue.d.ts +51 -0
- package/types/generated/components/atoms/FuroToggle/FuroToggleContext.d.ts +191 -0
- package/types/generated/components/atoms/FuroToggle/ToggleEmitPayload.d.ts +42 -0
- package/types/generated/components/molecules/FuroAccordion/AccordionEmitPayload.d.ts +41 -0
- package/types/generated/components/molecules/FuroAccordion/FuroAccordion.vue.d.ts +133 -0
- package/types/generated/components/molecules/FuroAccordion/FuroAccordionContext.d.ts +279 -0
- package/types/generated/components/molecules/FuroAttachment/FuroAttachment.vue.d.ts +79 -0
- package/types/generated/components/molecules/FuroAttachment/FuroAttachmentContext.d.ts +363 -0
- package/types/generated/components/molecules/FuroAutocompleteField/AutocompleteEmitPayload.d.ts +129 -0
- package/types/generated/components/molecules/FuroAutocompleteField/FuroAutocompleteField.vue.d.ts +751 -0
- package/types/generated/components/molecules/FuroAutocompleteField/FuroAutocompleteFieldContext.d.ts +722 -0
- package/types/generated/components/molecules/FuroAvatarGroup/FuroAvatarGroup.vue.d.ts +84 -0
- package/types/generated/components/molecules/FuroAvatarGroup/FuroAvatarGroupContext.d.ts +150 -0
- package/types/generated/components/molecules/FuroBreadcrumb/FuroBreadcrumb.vue.d.ts +24 -0
- package/types/generated/components/molecules/FuroBreadcrumb/FuroBreadcrumbContext.d.ts +152 -0
- package/types/generated/components/molecules/FuroCollapsible/CollapsibleEmitPayload.d.ts +36 -0
- package/types/generated/components/molecules/FuroCollapsible/FuroCollapsible.vue.d.ts +98 -0
- package/types/generated/components/molecules/FuroCollapsible/FuroCollapsibleContext.d.ts +191 -0
- package/types/generated/components/molecules/FuroControlBlock/FuroControlBlock.vue.d.ts +30 -0
- package/types/generated/components/molecules/FuroControlBlock/FuroControlBlockContext.d.ts +57 -0
- package/types/generated/components/molecules/FuroDatePicker/DatePickerEmitPayload.d.ts +41 -0
- package/types/generated/components/molecules/FuroDatePicker/FuroDatePicker.vue.d.ts +456 -0
- package/types/generated/components/molecules/FuroDatePicker/FuroDatePickerContext.d.ts +516 -0
- package/types/generated/components/molecules/FuroDateTimePicker/DateTimePickerEmitPayload.d.ts +55 -0
- package/types/generated/components/molecules/FuroDateTimePicker/FuroDateTimePicker.vue.d.ts +1365 -0
- package/types/generated/components/molecules/FuroDateTimePicker/FuroDateTimePickerContext.d.ts +435 -0
- package/types/generated/components/molecules/FuroDropdownMenu/DropdownMenuOptionSelectEmitPayload.d.ts +48 -0
- package/types/generated/components/molecules/FuroDropdownMenu/FuroDropdownMenu.vue.d.ts +773 -0
- package/types/generated/components/molecules/FuroDropdownMenu/FuroDropdownMenuContext.d.ts +380 -0
- package/types/generated/components/molecules/FuroDropdownMenu/FuroDropdownMenuOptionRows.vue.d.ts +261 -0
- package/types/generated/components/molecules/FuroEditableField/EditableEmitPayload.d.ts +39 -0
- package/types/generated/components/molecules/FuroEditableField/FuroEditableField.vue.d.ts +646 -0
- package/types/generated/components/molecules/FuroEditableField/FuroEditableFieldContext.d.ts +477 -0
- package/types/generated/components/molecules/FuroEditableField/processors/EditorCollisionProcessor.d.ts +121 -0
- package/types/generated/components/molecules/FuroEditableField/processors/ObjectProcessor.d.ts +45 -0
- package/types/generated/components/molecules/FuroEmptyState/FuroEmptyState.vue.d.ts +21 -0
- package/types/generated/components/molecules/FuroEmptyState/FuroEmptyStateContext.d.ts +32 -0
- package/types/generated/components/molecules/FuroErrorState/FuroErrorState.vue.d.ts +21 -0
- package/types/generated/components/molecules/FuroErrorState/FuroErrorStateContext.d.ts +32 -0
- package/types/generated/components/molecules/FuroPagination/FuroPagination.vue.d.ts +534 -0
- package/types/generated/components/molecules/FuroPagination/FuroPaginationContext.d.ts +271 -0
- package/types/generated/components/molecules/FuroPopover/FuroPopover.vue.d.ts +513 -0
- package/types/generated/components/molecules/FuroPopover/FuroPopoverContext.d.ts +160 -0
- package/types/generated/components/molecules/FuroScrollArea/FuroScrollArea.vue.d.ts +124 -0
- package/types/generated/components/molecules/FuroScrollArea/FuroScrollAreaContext.d.ts +86 -0
- package/types/generated/components/molecules/FuroSearchField/FuroSearchField.vue.d.ts +487 -0
- package/types/generated/components/molecules/FuroSearchField/FuroSearchFieldContext.d.ts +137 -0
- package/types/generated/components/molecules/FuroSectionHeader/FuroSectionHeader.vue.d.ts +49 -0
- package/types/generated/components/molecules/FuroSectionHeader/FuroSectionHeaderContext.d.ts +121 -0
- package/types/generated/components/molecules/FuroSelect/FuroSelect.vue.d.ts +719 -0
- package/types/generated/components/molecules/FuroSelect/FuroSelectContext.d.ts +402 -0
- package/types/generated/components/molecules/FuroSelect/SelectEmitPayload.d.ts +102 -0
- package/types/generated/components/molecules/FuroSeparator/FuroSeparator.vue.d.ts +39 -0
- package/types/generated/components/molecules/FuroSeparator/FuroSeparatorContext.d.ts +31 -0
- package/types/generated/components/molecules/FuroSkeleton/FuroSkeleton.vue.d.ts +27 -0
- package/types/generated/components/molecules/FuroSkeleton/FuroSkeletonContext.d.ts +61 -0
- package/types/generated/components/molecules/FuroSplitter/FuroSplitter.vue.d.ts +139 -0
- package/types/generated/components/molecules/FuroSplitter/FuroSplitterContext.d.ts +226 -0
- package/types/generated/components/molecules/FuroSplitter/SplitterEmitPayload.d.ts +41 -0
- package/types/generated/components/molecules/FuroTimeField/FuroTimeField.vue.d.ts +498 -0
- package/types/generated/components/molecules/FuroTimeField/FuroTimeFieldContext.d.ts +555 -0
- package/types/generated/components/molecules/FuroTimeField/TimeFieldEmitPayload.d.ts +41 -0
- package/types/generated/components/molecules/FuroToggleGroup/FuroToggleGroup.vue.d.ts +70 -0
- package/types/generated/components/molecules/FuroToggleGroup/FuroToggleGroupContext.d.ts +270 -0
- package/types/generated/components/molecules/FuroToggleGroup/ToggleGroupEmitPayload.d.ts +41 -0
- package/types/generated/components/molecules/FuroToolBar/FuroToolBar.vue.d.ts +30 -0
- package/types/generated/components/molecules/FuroToolBar/FuroToolBarContext.d.ts +48 -0
- package/types/generated/components/molecules/FuroTooltip/FuroTooltip.vue.d.ts +524 -0
- package/types/generated/components/molecules/FuroTooltip/FuroTooltipContext.d.ts +166 -0
- package/types/generated/components/organisms/FuroAlertDialog/FuroAlertDialog.vue.d.ts +651 -0
- package/types/generated/components/organisms/FuroAlertDialog/FuroAlertDialogContext.d.ts +299 -0
- package/types/generated/components/organisms/FuroDialog/FuroDialog.vue.d.ts +583 -0
- package/types/generated/components/organisms/FuroDialog/FuroDialogContext.d.ts +264 -0
- package/types/generated/components/organisms/FuroDrawer/FuroDrawer.vue.d.ts +635 -0
- package/types/generated/components/organisms/FuroDrawer/FuroDrawerContext.d.ts +347 -0
- package/types/generated/components/organisms/FuroEditor/FuroEditor.vue.d.ts +2487 -0
- package/types/generated/components/organisms/FuroEditor/FuroEditorCommandContext.d.ts +192 -0
- package/types/generated/components/organisms/FuroEditor/FuroEditorContext.d.ts +904 -0
- package/types/generated/components/organisms/FuroEditor/FuroEditorMentionMenu.vue.d.ts +43 -0
- package/types/generated/components/organisms/FuroEditor/FuroEditorMentionMenuContext.d.ts +159 -0
- package/types/generated/components/organisms/FuroEditor/PreserveNewlinesPasteExtension.d.ts +43 -0
- package/types/generated/components/organisms/FuroEditor/build-editor-extensions.d.ts +22 -0
- package/types/generated/components/organisms/FuroEditor/mention-suggestion.d.ts +25 -0
- package/types/generated/components/organisms/FuroEditor/paste-link-segments.d.ts +31 -0
- package/types/generated/components/organisms/FuroSidebar/FuroSidebar.vue.d.ts +898 -0
- package/types/generated/components/organisms/FuroSidebar/FuroSidebarContext.d.ts +596 -0
- package/types/generated/components/organisms/FuroStepper/FuroStepper.vue.d.ts +589 -0
- package/types/generated/components/organisms/FuroStepper/FuroStepperContext.d.ts +266 -0
- package/types/generated/components/organisms/FuroTable/FuroTable.vue.d.ts +528 -0
- package/types/generated/components/organisms/FuroTable/FuroTableContext.d.ts +1035 -0
- package/types/generated/components/organisms/FuroTable/FuroTableRowItemContext.d.ts +62 -0
- package/types/generated/components/organisms/FuroTabs/FuroTabs.vue.d.ts +515 -0
- package/types/generated/components/organisms/FuroTabs/FuroTabsContext.d.ts +438 -0
- package/types/generated/components/organisms/FuroToast/FuroToast.vue.d.ts +725 -0
- package/types/generated/components/organisms/FuroToast/FuroToastContext.d.ts +543 -0
- package/types/generated/components/organisms/FuroToast/FuroToaster.vue.d.ts +729 -0
- package/types/generated/components/organisms/FuroToast/FuroToasterContext.d.ts +62 -0
- package/types/generated/components/organisms/FuroToast/ToastQueue.d.ts +201 -0
- package/types/generated/components/organisms/FuroToast/toast.d.ts +23 -0
- package/types/generated/contexts/BaseFuroContext.d.ts +207 -0
- package/types/generated/contexts/BaseFuroContextAccessor.d.ts +28 -0
- package/types/generated/emit-payload/BaseEmitPayload.d.ts +62 -0
- package/types/generated/index.components.d.ts +50 -0
- package/types/generated/index.core.d.ts +6 -0
- package/types/generated/tools/TimerClerk.d.ts +50 -0
- package/types/index.d.ts +12 -0
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Processor for calculating floating editor position within a collision boundary.
|
|
3
|
+
*/
|
|
4
|
+
export default class EditorCollisionProcessor {
|
|
5
|
+
/**
|
|
6
|
+
* Constructor.
|
|
7
|
+
*
|
|
8
|
+
* @param {EditorCollisionProcessorParams} params - Parameters.
|
|
9
|
+
*/
|
|
10
|
+
constructor ({
|
|
11
|
+
anchorRect,
|
|
12
|
+
boundaryRect,
|
|
13
|
+
editorWidth,
|
|
14
|
+
editorHeight,
|
|
15
|
+
}) {
|
|
16
|
+
this.anchorRect = anchorRect
|
|
17
|
+
this.boundaryRect = boundaryRect
|
|
18
|
+
this.editorWidth = editorWidth
|
|
19
|
+
this.editorHeight = editorHeight
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Factory method.
|
|
24
|
+
*
|
|
25
|
+
* @template {X extends typeof EditorCollisionProcessor ? X : never} T, X
|
|
26
|
+
* @param {EditorCollisionProcessorFactoryParams} params - Parameters.
|
|
27
|
+
* @returns {InstanceType<T>}
|
|
28
|
+
* @this {T}
|
|
29
|
+
*/
|
|
30
|
+
static create ({
|
|
31
|
+
anchorRect,
|
|
32
|
+
boundaryRect,
|
|
33
|
+
editorWidth,
|
|
34
|
+
editorHeight,
|
|
35
|
+
}) {
|
|
36
|
+
return /** @type {InstanceType<T>} */ (
|
|
37
|
+
new this({
|
|
38
|
+
anchorRect,
|
|
39
|
+
boundaryRect,
|
|
40
|
+
editorWidth,
|
|
41
|
+
editorHeight,
|
|
42
|
+
})
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Extract viewport collision boundary edges.
|
|
48
|
+
*
|
|
49
|
+
* @returns {CollisionBoundaryEdges}
|
|
50
|
+
*/
|
|
51
|
+
static extractViewportCollisionBoundaryEdges () {
|
|
52
|
+
return {
|
|
53
|
+
leftBoundary: 0,
|
|
54
|
+
rightBoundary: document.documentElement.clientWidth,
|
|
55
|
+
topBoundary: 0,
|
|
56
|
+
bottomBoundary: document.documentElement.clientHeight,
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Extract collision boundary edges.
|
|
62
|
+
*
|
|
63
|
+
* @param {{
|
|
64
|
+
* boundaryRect?: DOMRect
|
|
65
|
+
* }} params - Parameters.
|
|
66
|
+
* @returns {CollisionBoundaryEdges}
|
|
67
|
+
*/
|
|
68
|
+
static extractCollisionBoundaryEdges ({
|
|
69
|
+
boundaryRect,
|
|
70
|
+
}) {
|
|
71
|
+
if (!boundaryRect) {
|
|
72
|
+
return EditorCollisionProcessor.extractViewportCollisionBoundaryEdges()
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
leftBoundary: boundaryRect.left,
|
|
77
|
+
rightBoundary: boundaryRect.right,
|
|
78
|
+
topBoundary: boundaryRect.top,
|
|
79
|
+
bottomBoundary: boundaryRect.bottom,
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Normalize editor offset within boundary range.
|
|
85
|
+
*
|
|
86
|
+
* @param {{
|
|
87
|
+
* preferredOffset: number
|
|
88
|
+
* boundaryStart: number
|
|
89
|
+
* boundaryEnd: number
|
|
90
|
+
* editorSize: number
|
|
91
|
+
* }} params - Parameters.
|
|
92
|
+
* @returns {number}
|
|
93
|
+
*/
|
|
94
|
+
static normalizeEditorOffsetWithinBoundary ({
|
|
95
|
+
preferredOffset,
|
|
96
|
+
boundaryStart,
|
|
97
|
+
boundaryEnd,
|
|
98
|
+
editorSize,
|
|
99
|
+
}) {
|
|
100
|
+
const maximumOffset = boundaryEnd - editorSize
|
|
101
|
+
|
|
102
|
+
if (maximumOffset < boundaryStart) {
|
|
103
|
+
return boundaryStart
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return Math.min(
|
|
107
|
+
Math.max(boundaryStart, preferredOffset),
|
|
108
|
+
maximumOffset
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Extract collision boundary edges for this processor.
|
|
114
|
+
*
|
|
115
|
+
* @returns {CollisionBoundaryEdges}
|
|
116
|
+
*/
|
|
117
|
+
extractCollisionBoundaryEdges () {
|
|
118
|
+
return EditorCollisionProcessor.extractCollisionBoundaryEdges({
|
|
119
|
+
boundaryRect: this.boundaryRect,
|
|
120
|
+
})
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Calculate editor left offset.
|
|
125
|
+
*
|
|
126
|
+
* @param {{
|
|
127
|
+
* leftBoundary: number
|
|
128
|
+
* rightBoundary: number
|
|
129
|
+
* }} params - Parameters.
|
|
130
|
+
* @returns {string}
|
|
131
|
+
*/
|
|
132
|
+
calculateEditorLeftOffset ({
|
|
133
|
+
leftBoundary,
|
|
134
|
+
rightBoundary,
|
|
135
|
+
}) {
|
|
136
|
+
const shouldFlipLeft = this.anchorRect.left + this.editorWidth > rightBoundary
|
|
137
|
+
|
|
138
|
+
const preferredLeft = shouldFlipLeft
|
|
139
|
+
? this.anchorRect.right - this.editorWidth
|
|
140
|
+
: this.anchorRect.left
|
|
141
|
+
|
|
142
|
+
const normalizedLeft = EditorCollisionProcessor.normalizeEditorOffsetWithinBoundary({
|
|
143
|
+
preferredOffset: preferredLeft,
|
|
144
|
+
boundaryStart: leftBoundary,
|
|
145
|
+
boundaryEnd: rightBoundary,
|
|
146
|
+
editorSize: this.editorWidth,
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
return `${normalizedLeft}px`
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Calculate editor top offset.
|
|
154
|
+
*
|
|
155
|
+
* @param {{
|
|
156
|
+
* topBoundary: number
|
|
157
|
+
* bottomBoundary: number
|
|
158
|
+
* }} params - Parameters.
|
|
159
|
+
* @returns {string}
|
|
160
|
+
*/
|
|
161
|
+
calculateEditorTopOffset ({
|
|
162
|
+
topBoundary,
|
|
163
|
+
bottomBoundary,
|
|
164
|
+
}) {
|
|
165
|
+
const shouldFlipUp = this.anchorRect.top + this.editorHeight > bottomBoundary
|
|
166
|
+
|
|
167
|
+
const preferredTop = shouldFlipUp
|
|
168
|
+
? this.anchorRect.bottom - this.editorHeight
|
|
169
|
+
: this.anchorRect.top
|
|
170
|
+
|
|
171
|
+
const normalizedTop = EditorCollisionProcessor.normalizeEditorOffsetWithinBoundary({
|
|
172
|
+
preferredOffset: preferredTop,
|
|
173
|
+
boundaryStart: topBoundary,
|
|
174
|
+
boundaryEnd: bottomBoundary,
|
|
175
|
+
editorSize: this.editorHeight,
|
|
176
|
+
})
|
|
177
|
+
|
|
178
|
+
return `${normalizedTop}px`
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Generate editor position style.
|
|
183
|
+
*
|
|
184
|
+
* @returns {{
|
|
185
|
+
* position: 'fixed'
|
|
186
|
+
* top: string
|
|
187
|
+
* left: string
|
|
188
|
+
* width: string
|
|
189
|
+
* zIndex: string
|
|
190
|
+
* }}
|
|
191
|
+
*/
|
|
192
|
+
generateEditorPositionStyle () {
|
|
193
|
+
const {
|
|
194
|
+
leftBoundary,
|
|
195
|
+
rightBoundary,
|
|
196
|
+
topBoundary,
|
|
197
|
+
bottomBoundary,
|
|
198
|
+
} = this.extractCollisionBoundaryEdges()
|
|
199
|
+
|
|
200
|
+
return {
|
|
201
|
+
position: 'fixed',
|
|
202
|
+
top: this.calculateEditorTopOffset({
|
|
203
|
+
topBoundary,
|
|
204
|
+
bottomBoundary,
|
|
205
|
+
}),
|
|
206
|
+
left: this.calculateEditorLeftOffset({
|
|
207
|
+
leftBoundary,
|
|
208
|
+
rightBoundary,
|
|
209
|
+
}),
|
|
210
|
+
width: `${this.anchorRect.width}px`,
|
|
211
|
+
zIndex: 'calc(var(--value-z-index-layer-overlay) + 0)',
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* @typedef {{
|
|
218
|
+
* leftBoundary: number
|
|
219
|
+
* rightBoundary: number
|
|
220
|
+
* topBoundary: number
|
|
221
|
+
* bottomBoundary: number
|
|
222
|
+
* }} CollisionBoundaryEdges
|
|
223
|
+
*/
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* @typedef {{
|
|
227
|
+
* anchorRect: DOMRect
|
|
228
|
+
* boundaryRect?: DOMRect
|
|
229
|
+
* editorWidth: number
|
|
230
|
+
* editorHeight: number
|
|
231
|
+
* }} EditorCollisionProcessorParams
|
|
232
|
+
*/
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* @typedef {EditorCollisionProcessorParams} EditorCollisionProcessorFactoryParams
|
|
236
|
+
*/
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Processor for comparing two values with deep equality semantics.
|
|
3
|
+
*/
|
|
4
|
+
export default class ObjectProcessor {
|
|
5
|
+
/**
|
|
6
|
+
* Constructor.
|
|
7
|
+
*
|
|
8
|
+
* @param {ObjectProcessorParams} params - Parameters.
|
|
9
|
+
*/
|
|
10
|
+
constructor ({
|
|
11
|
+
leftValue,
|
|
12
|
+
rightValue,
|
|
13
|
+
}) {
|
|
14
|
+
this.leftValue = leftValue
|
|
15
|
+
this.rightValue = rightValue
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Factory method.
|
|
20
|
+
*
|
|
21
|
+
* @template {X extends typeof ObjectProcessor ? X : never} T, X
|
|
22
|
+
* @param {ObjectProcessorFactoryParams} params - Parameters.
|
|
23
|
+
* @returns {InstanceType<T>}
|
|
24
|
+
* @this {T}
|
|
25
|
+
*/
|
|
26
|
+
static create ({
|
|
27
|
+
leftValue,
|
|
28
|
+
rightValue,
|
|
29
|
+
}) {
|
|
30
|
+
return /** @type {InstanceType<T>} */ (
|
|
31
|
+
new this({
|
|
32
|
+
leftValue,
|
|
33
|
+
rightValue,
|
|
34
|
+
})
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Whether left and right values are deeply equal.
|
|
40
|
+
*
|
|
41
|
+
* @returns {boolean}
|
|
42
|
+
*/
|
|
43
|
+
areDeepEqual () {
|
|
44
|
+
if (Object.is(this.leftValue, this.rightValue)) {
|
|
45
|
+
return true
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (!this.areBothObjects()) {
|
|
49
|
+
return false
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return this.haveSameDeepObjectEntries()
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Whether both values are non-null objects.
|
|
57
|
+
*
|
|
58
|
+
* @returns {boolean}
|
|
59
|
+
*/
|
|
60
|
+
areBothObjects () {
|
|
61
|
+
return typeof this.leftValue === 'object'
|
|
62
|
+
&& typeof this.rightValue === 'object'
|
|
63
|
+
&& this.leftValue !== null
|
|
64
|
+
&& this.rightValue !== null
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Whether both objects have the same entries with deep equality.
|
|
69
|
+
*
|
|
70
|
+
* @returns {boolean}
|
|
71
|
+
*/
|
|
72
|
+
haveSameDeepObjectEntries () {
|
|
73
|
+
const leftObject = /** @type {Record<string, unknown>} */ (this.leftValue)
|
|
74
|
+
const rightObject = /** @type {Record<string, unknown>} */ (this.rightValue)
|
|
75
|
+
const keys = Object.keys(leftObject)
|
|
76
|
+
|
|
77
|
+
if (keys.length !== Object.keys(rightObject).length) {
|
|
78
|
+
return false
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return keys.every(key =>
|
|
82
|
+
Object.hasOwn(rightObject, key)
|
|
83
|
+
&& ObjectProcessor.create({
|
|
84
|
+
leftValue: leftObject[key],
|
|
85
|
+
rightValue: rightObject[key],
|
|
86
|
+
})
|
|
87
|
+
.areDeepEqual()
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @typedef {{
|
|
94
|
+
* leftValue: unknown
|
|
95
|
+
* rightValue: unknown
|
|
96
|
+
* }} ObjectProcessorParams
|
|
97
|
+
*/
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @typedef {ObjectProcessorParams} ObjectProcessorFactoryParams
|
|
101
|
+
*/
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import {
|
|
3
|
+
defineComponent,
|
|
4
|
+
} from 'vue'
|
|
5
|
+
|
|
6
|
+
import FuroEmptyStateContext from './FuroEmptyStateContext.js'
|
|
7
|
+
|
|
8
|
+
export default defineComponent({
|
|
9
|
+
name: 'FuroEmptyState',
|
|
10
|
+
inheritAttrs: false,
|
|
11
|
+
|
|
12
|
+
props: {
|
|
13
|
+
parcel: {
|
|
14
|
+
/** @type {import('vue').PropType<import('./FuroEmptyStateContext.js').Props['parcel']>} */
|
|
15
|
+
type: [
|
|
16
|
+
Object,
|
|
17
|
+
null,
|
|
18
|
+
],
|
|
19
|
+
default: null,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Setup of this component.
|
|
25
|
+
*
|
|
26
|
+
* @param {import('./FuroEmptyStateContext.js').Props} props - Props.
|
|
27
|
+
* @param {import('vue').SetupContext} componentContext - Setup context.
|
|
28
|
+
* @returns {{ context: FuroEmptyStateContext }} Render context.
|
|
29
|
+
*/
|
|
30
|
+
setup (
|
|
31
|
+
props,
|
|
32
|
+
componentContext
|
|
33
|
+
) {
|
|
34
|
+
const context = FuroEmptyStateContext.create({
|
|
35
|
+
props,
|
|
36
|
+
componentContext,
|
|
37
|
+
})
|
|
38
|
+
.setupComponent()
|
|
39
|
+
|
|
40
|
+
return {
|
|
41
|
+
context,
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
})
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<template>
|
|
48
|
+
<div
|
|
49
|
+
class="unit-empty-state"
|
|
50
|
+
v-bind="$attrs"
|
|
51
|
+
>
|
|
52
|
+
<div
|
|
53
|
+
v-if="$slots.icon"
|
|
54
|
+
class="icon"
|
|
55
|
+
>
|
|
56
|
+
<slot name="icon" />
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<p
|
|
60
|
+
v-if="context.title"
|
|
61
|
+
class="title"
|
|
62
|
+
>
|
|
63
|
+
{{ context.title }}
|
|
64
|
+
</p>
|
|
65
|
+
|
|
66
|
+
<p
|
|
67
|
+
v-if="context.description"
|
|
68
|
+
class="description"
|
|
69
|
+
>
|
|
70
|
+
{{ context.description }}
|
|
71
|
+
</p>
|
|
72
|
+
|
|
73
|
+
<div
|
|
74
|
+
v-if="$slots.action"
|
|
75
|
+
class="actions"
|
|
76
|
+
>
|
|
77
|
+
<slot name="action" />
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</template>
|
|
81
|
+
|
|
82
|
+
<style>
|
|
83
|
+
@layer furo {
|
|
84
|
+
.unit-empty-state {
|
|
85
|
+
display: flex;
|
|
86
|
+
flex-direction: column;
|
|
87
|
+
align-items: center;
|
|
88
|
+
gap: var(--size-space-small);
|
|
89
|
+
|
|
90
|
+
padding-block: var(--size-space-2x-large);
|
|
91
|
+
padding-inline: var(--size-space-large);
|
|
92
|
+
|
|
93
|
+
color: var(--color-muted-foreground);
|
|
94
|
+
text-align: center;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.unit-empty-state > .icon {
|
|
98
|
+
display: flex;
|
|
99
|
+
|
|
100
|
+
color: var(--color-muted-foreground);
|
|
101
|
+
font-size: 2rem;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.unit-empty-state > .title {
|
|
105
|
+
margin: 0;
|
|
106
|
+
|
|
107
|
+
color: var(--color-foreground);
|
|
108
|
+
font: var(--font-headline-small);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.unit-empty-state > .description {
|
|
112
|
+
margin: 0;
|
|
113
|
+
|
|
114
|
+
font: var(--font-body-small);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.unit-empty-state > .actions {
|
|
118
|
+
display: flex;
|
|
119
|
+
gap: var(--size-space-small);
|
|
120
|
+
|
|
121
|
+
margin-block-start: var(--size-space-small);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import BaseFuroContext from '../../../contexts/BaseFuroContext.js'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Context class for FuroEmptyState molecule.
|
|
5
|
+
*
|
|
6
|
+
* Presentational placeholder shown when a region has no content to display
|
|
7
|
+
* (no views, no records, nothing found). Title and description text come from
|
|
8
|
+
* the parcel so the consumer owns the wording; an icon and action controls are
|
|
9
|
+
* supplied via slots. It carries no value and emits nothing.
|
|
10
|
+
*
|
|
11
|
+
* @extends {BaseFuroContext<null, Props, null>}
|
|
12
|
+
*/
|
|
13
|
+
export default class FuroEmptyStateContext extends BaseFuroContext {
|
|
14
|
+
/**
|
|
15
|
+
* get: heading text.
|
|
16
|
+
*
|
|
17
|
+
* @returns {string | null} Title, or null when the consumer supplies none.
|
|
18
|
+
*/
|
|
19
|
+
get title () {
|
|
20
|
+
return this.parcel?.title
|
|
21
|
+
?? null
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* get: supporting description text.
|
|
26
|
+
*
|
|
27
|
+
* @returns {string | null} Description, or null when the consumer supplies none.
|
|
28
|
+
*/
|
|
29
|
+
get description () {
|
|
30
|
+
return this.parcel?.description
|
|
31
|
+
?? null
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @typedef {{
|
|
37
|
+
* parcel: {
|
|
38
|
+
* title?: string
|
|
39
|
+
* description?: string
|
|
40
|
+
* } | null
|
|
41
|
+
* }} Props
|
|
42
|
+
*/
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import {
|
|
3
|
+
defineComponent,
|
|
4
|
+
} from 'vue'
|
|
5
|
+
|
|
6
|
+
import FuroErrorStateContext from './FuroErrorStateContext.js'
|
|
7
|
+
|
|
8
|
+
export default defineComponent({
|
|
9
|
+
name: 'FuroErrorState',
|
|
10
|
+
inheritAttrs: false,
|
|
11
|
+
|
|
12
|
+
props: {
|
|
13
|
+
parcel: {
|
|
14
|
+
/** @type {import('vue').PropType<import('./FuroErrorStateContext.js').Props['parcel']>} */
|
|
15
|
+
type: [
|
|
16
|
+
Object,
|
|
17
|
+
null,
|
|
18
|
+
],
|
|
19
|
+
default: null,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Setup of this component.
|
|
25
|
+
*
|
|
26
|
+
* @param {import('./FuroErrorStateContext.js').Props} props - Props.
|
|
27
|
+
* @param {import('vue').SetupContext} componentContext - Setup context.
|
|
28
|
+
* @returns {{ context: FuroErrorStateContext }} Render context.
|
|
29
|
+
*/
|
|
30
|
+
setup (
|
|
31
|
+
props,
|
|
32
|
+
componentContext
|
|
33
|
+
) {
|
|
34
|
+
const context = FuroErrorStateContext.create({
|
|
35
|
+
props,
|
|
36
|
+
componentContext,
|
|
37
|
+
})
|
|
38
|
+
.setupComponent()
|
|
39
|
+
|
|
40
|
+
return {
|
|
41
|
+
context,
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
})
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<template>
|
|
48
|
+
<div
|
|
49
|
+
class="unit-error-state"
|
|
50
|
+
role="alert"
|
|
51
|
+
v-bind="$attrs"
|
|
52
|
+
>
|
|
53
|
+
<div
|
|
54
|
+
v-if="$slots.icon"
|
|
55
|
+
class="icon"
|
|
56
|
+
>
|
|
57
|
+
<slot name="icon" />
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<p
|
|
61
|
+
v-if="context.title"
|
|
62
|
+
class="title"
|
|
63
|
+
>
|
|
64
|
+
{{ context.title }}
|
|
65
|
+
</p>
|
|
66
|
+
|
|
67
|
+
<p
|
|
68
|
+
v-if="context.description"
|
|
69
|
+
class="description"
|
|
70
|
+
>
|
|
71
|
+
{{ context.description }}
|
|
72
|
+
</p>
|
|
73
|
+
|
|
74
|
+
<div
|
|
75
|
+
v-if="$slots.action"
|
|
76
|
+
class="actions"
|
|
77
|
+
>
|
|
78
|
+
<slot name="action" />
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</template>
|
|
82
|
+
|
|
83
|
+
<style>
|
|
84
|
+
@layer furo {
|
|
85
|
+
.unit-error-state {
|
|
86
|
+
display: flex;
|
|
87
|
+
flex-direction: column;
|
|
88
|
+
align-items: center;
|
|
89
|
+
gap: var(--size-space-small);
|
|
90
|
+
|
|
91
|
+
padding-block: var(--size-space-2x-large);
|
|
92
|
+
padding-inline: var(--size-space-large);
|
|
93
|
+
|
|
94
|
+
color: var(--color-muted-foreground);
|
|
95
|
+
text-align: center;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.unit-error-state > .icon {
|
|
99
|
+
display: flex;
|
|
100
|
+
|
|
101
|
+
color: var(--color-destructive);
|
|
102
|
+
font-size: 2rem;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.unit-error-state > .title {
|
|
106
|
+
margin: 0;
|
|
107
|
+
|
|
108
|
+
color: var(--color-foreground);
|
|
109
|
+
font: var(--font-headline-small);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.unit-error-state > .description {
|
|
113
|
+
margin: 0;
|
|
114
|
+
|
|
115
|
+
font: var(--font-body-small);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.unit-error-state > .actions {
|
|
119
|
+
display: flex;
|
|
120
|
+
gap: var(--size-space-small);
|
|
121
|
+
|
|
122
|
+
margin-block-start: var(--size-space-small);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import BaseFuroContext from '../../../contexts/BaseFuroContext.js'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Context class for FuroErrorState molecule.
|
|
5
|
+
*
|
|
6
|
+
* Presentational placeholder shown when a region fails to load (a fetch error,
|
|
7
|
+
* a failed request). Title and description text come from the parcel so the
|
|
8
|
+
* consumer owns the wording; an icon and action controls (typically a retry
|
|
9
|
+
* button) are supplied via slots. It carries no value and emits nothing.
|
|
10
|
+
*
|
|
11
|
+
* @extends {BaseFuroContext<null, Props, null>}
|
|
12
|
+
*/
|
|
13
|
+
export default class FuroErrorStateContext extends BaseFuroContext {
|
|
14
|
+
/**
|
|
15
|
+
* get: heading text.
|
|
16
|
+
*
|
|
17
|
+
* @returns {string | null} Title, or null when the consumer supplies none.
|
|
18
|
+
*/
|
|
19
|
+
get title () {
|
|
20
|
+
return this.parcel?.title
|
|
21
|
+
?? null
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* get: supporting description text.
|
|
26
|
+
*
|
|
27
|
+
* @returns {string | null} Description, or null when the consumer supplies none.
|
|
28
|
+
*/
|
|
29
|
+
get description () {
|
|
30
|
+
return this.parcel?.description
|
|
31
|
+
?? null
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @typedef {{
|
|
37
|
+
* parcel: {
|
|
38
|
+
* title?: string
|
|
39
|
+
* description?: string
|
|
40
|
+
* } | null
|
|
41
|
+
* }} Props
|
|
42
|
+
*/
|