@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,149 @@
|
|
|
1
|
+
import BaseFuroContext from '../../../contexts/BaseFuroContext.js'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Furo-owned parcel keys (not forwarded verbatim to the underlying primitive
|
|
5
|
+
* root). `orientation` drives scrollbar rendering; `scrollbarVisibility` is
|
|
6
|
+
* re-mapped to the primitive's own visibility prop inside
|
|
7
|
+
* `buildOptionalRootAttributes()`.
|
|
8
|
+
*/
|
|
9
|
+
const FURO_SCROLL_AREA_PARCEL_KEYS = new Set([
|
|
10
|
+
'orientation',
|
|
11
|
+
'scrollbarVisibility',
|
|
12
|
+
])
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Context class for FuroScrollArea molecule.
|
|
16
|
+
*
|
|
17
|
+
* Presentational scroll container that wraps overflowing content with a styled,
|
|
18
|
+
* cross-browser scrollbar. It carries no value and emits nothing — orientation
|
|
19
|
+
* and scrollbar visibility are read from `parcel`.
|
|
20
|
+
*
|
|
21
|
+
* @extends {BaseFuroContext<null, Props, null>}
|
|
22
|
+
*/
|
|
23
|
+
export default class FuroScrollAreaContext extends BaseFuroContext {
|
|
24
|
+
/**
|
|
25
|
+
* get: scroll axis the container exposes.
|
|
26
|
+
*
|
|
27
|
+
* @returns {FuroScrollAreaOrientation} Orientation; defaults to vertical.
|
|
28
|
+
*/
|
|
29
|
+
get orientation () {
|
|
30
|
+
return this.parcel?.orientation
|
|
31
|
+
?? 'vertical'
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* get: when the scrollbars become visible.
|
|
36
|
+
*
|
|
37
|
+
* Value-oriented public key mapped to the primitive's visibility prop in
|
|
38
|
+
* `buildOptionalRootAttributes()`. `null` lets the primitive apply its own
|
|
39
|
+
* default (visible on hover).
|
|
40
|
+
*
|
|
41
|
+
* @returns {FuroScrollAreaScrollbarVisibility | null} Visibility, or null.
|
|
42
|
+
*/
|
|
43
|
+
get scrollbarVisibility () {
|
|
44
|
+
return this.parcel?.scrollbarVisibility
|
|
45
|
+
?? null
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Whether the vertical scrollbar is rendered.
|
|
50
|
+
*
|
|
51
|
+
* @returns {boolean} true for `vertical` and `both` orientations.
|
|
52
|
+
*/
|
|
53
|
+
showsVerticalScrollbar () {
|
|
54
|
+
return this.orientation === 'vertical'
|
|
55
|
+
|| this.orientation === 'both'
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Whether the horizontal scrollbar is rendered.
|
|
60
|
+
*
|
|
61
|
+
* @returns {boolean} true for `horizontal` and `both` orientations.
|
|
62
|
+
*/
|
|
63
|
+
showsHorizontalScrollbar () {
|
|
64
|
+
return this.orientation === 'horizontal'
|
|
65
|
+
|| this.orientation === 'both'
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Whether the corner (where both scrollbars meet) is rendered.
|
|
70
|
+
*
|
|
71
|
+
* @returns {boolean} true only for the `both` orientation.
|
|
72
|
+
*/
|
|
73
|
+
showsCorner () {
|
|
74
|
+
return this.orientation === 'both'
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Extract CSS class map for the root.
|
|
79
|
+
*
|
|
80
|
+
* @returns {Record<string, boolean>}
|
|
81
|
+
*/
|
|
82
|
+
extractRootClassNames () {
|
|
83
|
+
return Object.fromEntries([
|
|
84
|
+
['unit-scroll-area', true],
|
|
85
|
+
[this.orientation, true],
|
|
86
|
+
])
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Extract attributes forwarded to the underlying primitive root.
|
|
91
|
+
*
|
|
92
|
+
* @returns {Record<string, unknown>}
|
|
93
|
+
*/
|
|
94
|
+
extractRootAttributes () {
|
|
95
|
+
const passthroughEntries = Object.entries(this.parcel ?? {})
|
|
96
|
+
.filter(([key]) => !FURO_SCROLL_AREA_PARCEL_KEYS.has(key))
|
|
97
|
+
|
|
98
|
+
return {
|
|
99
|
+
...Object.fromEntries(passthroughEntries),
|
|
100
|
+
...this.buildOptionalRootAttributes(),
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Build optional root attributes whose values are absent unless set.
|
|
106
|
+
*
|
|
107
|
+
* @returns {Record<string, unknown>}
|
|
108
|
+
*/
|
|
109
|
+
buildOptionalRootAttributes () {
|
|
110
|
+
const entries = [
|
|
111
|
+
['type', this.scrollbarVisibility],
|
|
112
|
+
]
|
|
113
|
+
.filter(([, value]) => value !== null)
|
|
114
|
+
|
|
115
|
+
return Object.fromEntries(entries)
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @typedef {'vertical' | 'horizontal' | 'both'} FuroScrollAreaOrientation
|
|
121
|
+
*/
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* When the scrollbars become visible. Does not affect whether the content
|
|
125
|
+
* scrolls — configured axes are always scrollable; this only controls the
|
|
126
|
+
* bar's visibility.
|
|
127
|
+
*
|
|
128
|
+
* - `hover`: visible while the pointer is over the scroll area (primitive default).
|
|
129
|
+
* - `scroll`: visible while scrolling, then hidden after `scrollHideDelay`.
|
|
130
|
+
* - `glimpse`: briefly revealed on pointer enter, then hidden.
|
|
131
|
+
* - `auto`: visible whenever the axis overflows (native-like), hidden otherwise.
|
|
132
|
+
* - `always`: always visible.
|
|
133
|
+
*
|
|
134
|
+
* @typedef {'hover' | 'scroll' | 'glimpse' | 'auto' | 'always'} FuroScrollAreaScrollbarVisibility
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @typedef {{
|
|
139
|
+
* parcel: FuroScrollAreaParcel | null
|
|
140
|
+
* }} Props
|
|
141
|
+
*/
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @typedef {{
|
|
145
|
+
* orientation?: FuroScrollAreaOrientation
|
|
146
|
+
* scrollbarVisibility?: FuroScrollAreaScrollbarVisibility
|
|
147
|
+
* scrollHideDelay?: number
|
|
148
|
+
* }} FuroScrollAreaParcel
|
|
149
|
+
*/
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import {
|
|
3
|
+
defineComponent,
|
|
4
|
+
} from 'vue'
|
|
5
|
+
|
|
6
|
+
import FuroIcon from '../../atoms/FuroIcon/FuroIcon.vue'
|
|
7
|
+
import FuroTextField from '../../atoms/FuroTextField/FuroTextField.vue'
|
|
8
|
+
import FuroSearchFieldContext from './FuroSearchFieldContext.js'
|
|
9
|
+
|
|
10
|
+
export default defineComponent({
|
|
11
|
+
name: 'FuroSearchField',
|
|
12
|
+
|
|
13
|
+
components: {
|
|
14
|
+
FuroIcon,
|
|
15
|
+
FuroTextField,
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
inheritAttrs: false,
|
|
19
|
+
|
|
20
|
+
props: {
|
|
21
|
+
parcel: {
|
|
22
|
+
/** @type {import('vue').PropType<import('./FuroSearchFieldContext.js').Props['parcel']>} */
|
|
23
|
+
type: [
|
|
24
|
+
Object,
|
|
25
|
+
null,
|
|
26
|
+
],
|
|
27
|
+
default: null,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
emits: FuroSearchFieldContext.EMIT_EVENT_HASH,
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Setup of this component.
|
|
35
|
+
*
|
|
36
|
+
* @type {import('./FuroSearchFieldContext.js').FuroSearchFieldSetup}
|
|
37
|
+
*/
|
|
38
|
+
setup (
|
|
39
|
+
props,
|
|
40
|
+
componentContext
|
|
41
|
+
) {
|
|
42
|
+
const context = FuroSearchFieldContext.create({
|
|
43
|
+
props,
|
|
44
|
+
componentContext,
|
|
45
|
+
})
|
|
46
|
+
.setupComponent()
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
context,
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
})
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<template>
|
|
56
|
+
<div
|
|
57
|
+
:class="[
|
|
58
|
+
context.extractRootClassNames(),
|
|
59
|
+
$attrs.class,
|
|
60
|
+
]"
|
|
61
|
+
:style="$attrs.style"
|
|
62
|
+
>
|
|
63
|
+
<span
|
|
64
|
+
class="leading"
|
|
65
|
+
aria-hidden="true"
|
|
66
|
+
>
|
|
67
|
+
<slot name="icon">
|
|
68
|
+
<FuroIcon
|
|
69
|
+
:name="context.extractLeadingIconName()"
|
|
70
|
+
class="leading-icon"
|
|
71
|
+
/>
|
|
72
|
+
</slot>
|
|
73
|
+
</span>
|
|
74
|
+
|
|
75
|
+
<FuroTextField
|
|
76
|
+
:parcel="context.buildControlParcel()"
|
|
77
|
+
v-bind="context.extractControlAttributes()"
|
|
78
|
+
@change-value="context.onChangeValue({
|
|
79
|
+
payload: $event,
|
|
80
|
+
})"
|
|
81
|
+
@commit-value="context.onCommitValue({
|
|
82
|
+
payload: $event,
|
|
83
|
+
})"
|
|
84
|
+
/>
|
|
85
|
+
|
|
86
|
+
<slot name="trailing" />
|
|
87
|
+
</div>
|
|
88
|
+
</template>
|
|
89
|
+
|
|
90
|
+
<style scoped>
|
|
91
|
+
@layer furo {
|
|
92
|
+
.unit-form-control.search {
|
|
93
|
+
border-radius: var(--size-border-radius-medium);
|
|
94
|
+
border: var(--size-thinnest) solid var(--color-input);
|
|
95
|
+
|
|
96
|
+
height: var(--size-input-height);
|
|
97
|
+
width: 100%;
|
|
98
|
+
min-width: 0;
|
|
99
|
+
|
|
100
|
+
display: flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
gap: var(--size-space-small);
|
|
103
|
+
|
|
104
|
+
padding-inline: 0.75rem;
|
|
105
|
+
|
|
106
|
+
background-color: var(--color-background);
|
|
107
|
+
|
|
108
|
+
transition-duration: var(--transition-timer);
|
|
109
|
+
transition-property: border-color;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.unit-form-control.search:focus-within {
|
|
113
|
+
border-color: var(--color-ring);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.unit-form-control.search.invalid,
|
|
117
|
+
.unit-form-control.search.invalid:focus-within {
|
|
118
|
+
border-color: var(--color-destructive);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.unit-form-control.search.disabled {
|
|
122
|
+
cursor: not-allowed;
|
|
123
|
+
|
|
124
|
+
opacity: 0.5;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.unit-form-control.search > .leading {
|
|
128
|
+
display: inline-flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
|
|
131
|
+
color: var(--color-foreground-tertiary);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.unit-form-control.search > .leading > .leading-icon {
|
|
135
|
+
width: 1rem;
|
|
136
|
+
height: 1rem;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.unit-form-control.search > .text {
|
|
140
|
+
border: none;
|
|
141
|
+
|
|
142
|
+
height: 100%;
|
|
143
|
+
|
|
144
|
+
padding-block: 0;
|
|
145
|
+
padding-inline: 0;
|
|
146
|
+
|
|
147
|
+
color: var(--color-foreground);
|
|
148
|
+
font: var(--font-body-medium);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.unit-form-control.search.disabled > .text {
|
|
152
|
+
opacity: 1;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
</style>
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import BaseFuroContext from '../../../contexts/BaseFuroContext.js'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Attributes the wrapper keeps for itself instead of handing to the control.
|
|
5
|
+
*/
|
|
6
|
+
const FURO_SEARCH_FIELD_WRAPPER_ATTRIBUTE_KEYS = new Set([
|
|
7
|
+
'class',
|
|
8
|
+
'style',
|
|
9
|
+
])
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Context class for FuroSearchField molecule.
|
|
13
|
+
*
|
|
14
|
+
* @extends {BaseFuroContext<null, Props, EmitEventName>}
|
|
15
|
+
*/
|
|
16
|
+
export default class FuroSearchFieldContext extends BaseFuroContext {
|
|
17
|
+
/**
|
|
18
|
+
* Icon the field leads with.
|
|
19
|
+
*
|
|
20
|
+
* @returns {string} Name of a built-in icon.
|
|
21
|
+
*/
|
|
22
|
+
static get LEADING_ICON_NAME () {
|
|
23
|
+
return 'ph:magnifying-glass'
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Get emit event name.
|
|
28
|
+
*
|
|
29
|
+
* @override
|
|
30
|
+
* @returns {Readonly<{
|
|
31
|
+
* CHANGE_VALUE: 'change-value'
|
|
32
|
+
* COMMIT_VALUE: 'commit-value'
|
|
33
|
+
* UPDATE_VALUE: 'update:value'
|
|
34
|
+
* }>} Emit event names.
|
|
35
|
+
*/
|
|
36
|
+
static get EMIT_EVENT_NAME () {
|
|
37
|
+
return {
|
|
38
|
+
CHANGE_VALUE: 'change-value',
|
|
39
|
+
COMMIT_VALUE: 'commit-value',
|
|
40
|
+
UPDATE_VALUE: 'update:value',
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Get emit options.
|
|
46
|
+
*
|
|
47
|
+
* @returns {{
|
|
48
|
+
* 'change-value': (payload: SearchFieldEmitPayload) => boolean
|
|
49
|
+
* 'commit-value': (payload: SearchFieldEmitPayload) => boolean
|
|
50
|
+
* 'update:value': (value: string | null) => boolean
|
|
51
|
+
* }} Emit event hash.
|
|
52
|
+
*/
|
|
53
|
+
static get EMIT_EVENT_HASH () {
|
|
54
|
+
return {
|
|
55
|
+
[this.EMIT_EVENT_NAME.CHANGE_VALUE]: (/** @type {SearchFieldEmitPayload} */ payload) => true,
|
|
56
|
+
[this.EMIT_EVENT_NAME.COMMIT_VALUE]: (/** @type {SearchFieldEmitPayload} */ payload) => true,
|
|
57
|
+
[this.EMIT_EVENT_NAME.UPDATE_VALUE]: (/** @type {string | null} */ value) => true,
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* get: Constructor of this class.
|
|
63
|
+
*
|
|
64
|
+
* @override
|
|
65
|
+
* @returns {typeof FuroSearchFieldContext} Constructor of this class.
|
|
66
|
+
*/
|
|
67
|
+
get Ctor () {
|
|
68
|
+
return /** @type {typeof FuroSearchFieldContext} */ (
|
|
69
|
+
this.constructor
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* get: the text the field holds.
|
|
75
|
+
*
|
|
76
|
+
* @returns {string | number | null} Current search text.
|
|
77
|
+
*/
|
|
78
|
+
get value () {
|
|
79
|
+
return this.parcel?.value
|
|
80
|
+
?? null
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Extract the icon the field leads with.
|
|
85
|
+
*
|
|
86
|
+
* @returns {string} Name of a built-in icon.
|
|
87
|
+
*/
|
|
88
|
+
extractLeadingIconName () {
|
|
89
|
+
return this.Ctor.LEADING_ICON_NAME
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Whether the field is marked invalid.
|
|
94
|
+
*
|
|
95
|
+
* @returns {boolean} Whether the field is invalid.
|
|
96
|
+
*/
|
|
97
|
+
isInvalid () {
|
|
98
|
+
return Boolean(this.parcel?.invalid)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Whether the field is disabled.
|
|
103
|
+
*
|
|
104
|
+
* Disabling is a native attribute on the control, and the wrapper reads it so
|
|
105
|
+
* the border and the icon dim with it.
|
|
106
|
+
*
|
|
107
|
+
* @returns {boolean} Whether the field is disabled.
|
|
108
|
+
*/
|
|
109
|
+
isDisabled () {
|
|
110
|
+
return this.hasBooleanAttribute({ name: 'disabled' })
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Build the parcel handed to the text control.
|
|
115
|
+
*
|
|
116
|
+
* @returns {{
|
|
117
|
+
* value: string | number | null
|
|
118
|
+
* invalid: boolean
|
|
119
|
+
* }} Parcel of the text control.
|
|
120
|
+
*/
|
|
121
|
+
buildControlParcel () {
|
|
122
|
+
return {
|
|
123
|
+
value: this.value,
|
|
124
|
+
invalid: this.isInvalid(),
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Extract attributes handed to the text control.
|
|
130
|
+
*
|
|
131
|
+
* `class` and `style` stay on the wrapper, which is the box a consumer lays out.
|
|
132
|
+
*
|
|
133
|
+
* @returns {Record<string, *>} Attributes of the text control.
|
|
134
|
+
*/
|
|
135
|
+
extractControlAttributes () {
|
|
136
|
+
const passthroughEntries = Object.entries(this.attrs)
|
|
137
|
+
.filter(([key]) => !FURO_SEARCH_FIELD_WRAPPER_ATTRIBUTE_KEYS.has(key))
|
|
138
|
+
|
|
139
|
+
return Object.fromEntries(passthroughEntries)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Extract CSS class map for the root.
|
|
144
|
+
*
|
|
145
|
+
* @returns {Record<string, boolean>} Class map of the root.
|
|
146
|
+
*/
|
|
147
|
+
extractRootClassNames () {
|
|
148
|
+
return Object.fromEntries([
|
|
149
|
+
['unit-form-control', true],
|
|
150
|
+
['search', true],
|
|
151
|
+
['invalid', this.isInvalid()],
|
|
152
|
+
['disabled', this.isDisabled()],
|
|
153
|
+
])
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Handle a keystroke reported by the text control.
|
|
158
|
+
*
|
|
159
|
+
* @param {{
|
|
160
|
+
* payload: SearchFieldEmitPayload
|
|
161
|
+
* }} params - Parameters.
|
|
162
|
+
*/
|
|
163
|
+
onChangeValue ({
|
|
164
|
+
payload,
|
|
165
|
+
}) {
|
|
166
|
+
this.emit(
|
|
167
|
+
this.EMIT_EVENT_NAME.CHANGE_VALUE,
|
|
168
|
+
payload
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
this.emit(
|
|
172
|
+
this.EMIT_EVENT_NAME.UPDATE_VALUE,
|
|
173
|
+
payload.value
|
|
174
|
+
)
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Handle a settled value reported by the text control.
|
|
179
|
+
*
|
|
180
|
+
* @param {{
|
|
181
|
+
* payload: SearchFieldEmitPayload
|
|
182
|
+
* }} params - Parameters.
|
|
183
|
+
*/
|
|
184
|
+
onCommitValue ({
|
|
185
|
+
payload,
|
|
186
|
+
}) {
|
|
187
|
+
this.emit(
|
|
188
|
+
this.EMIT_EVENT_NAME.COMMIT_VALUE,
|
|
189
|
+
payload
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
this.emit(
|
|
193
|
+
this.EMIT_EVENT_NAME.UPDATE_VALUE,
|
|
194
|
+
payload.value
|
|
195
|
+
)
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* @typedef {import('../../atoms/FuroTextField/TextFieldEmitPayload.js').default} SearchFieldEmitPayload
|
|
201
|
+
*/
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* @typedef {keyof typeof FuroSearchFieldContext.EMIT_EVENT_NAME} EmitEventName
|
|
205
|
+
*/
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* @typedef {{
|
|
209
|
+
* parcel: FuroSearchFieldParcel | null
|
|
210
|
+
* }} Props
|
|
211
|
+
*/
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* @typedef {{
|
|
215
|
+
* value?: string | number | null
|
|
216
|
+
* invalid?: boolean
|
|
217
|
+
* }} FuroSearchFieldParcel
|
|
218
|
+
*/
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* @typedef {import('vue').SetupContext<typeof FuroSearchFieldContext.EMIT_EVENT_HASH>} ComponentContext
|
|
222
|
+
*/
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* @typedef {(
|
|
226
|
+
* props: Props,
|
|
227
|
+
* componentContext: ComponentContext
|
|
228
|
+
* ) => {
|
|
229
|
+
* context: FuroSearchFieldContext
|
|
230
|
+
* }} FuroSearchFieldSetup
|
|
231
|
+
*/
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import {
|
|
3
|
+
defineComponent,
|
|
4
|
+
} from 'vue'
|
|
5
|
+
|
|
6
|
+
import FuroSeparator from '../FuroSeparator/FuroSeparator.vue'
|
|
7
|
+
import FuroSectionHeaderContext from './FuroSectionHeaderContext.js'
|
|
8
|
+
|
|
9
|
+
export default defineComponent({
|
|
10
|
+
name: 'FuroSectionHeader',
|
|
11
|
+
|
|
12
|
+
components: {
|
|
13
|
+
FuroSeparator,
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
inheritAttrs: false,
|
|
17
|
+
|
|
18
|
+
props: {
|
|
19
|
+
parcel: {
|
|
20
|
+
/** @type {import('vue').PropType<import('./FuroSectionHeaderContext.js').Props['parcel']>} */
|
|
21
|
+
type: [
|
|
22
|
+
Object,
|
|
23
|
+
null,
|
|
24
|
+
],
|
|
25
|
+
default: null,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Setup of this component.
|
|
31
|
+
*
|
|
32
|
+
* @param {import('./FuroSectionHeaderContext.js').Props} props - Props.
|
|
33
|
+
* @param {import('vue').SetupContext} componentContext - Setup context.
|
|
34
|
+
* @returns {{ context: FuroSectionHeaderContext }} Render context.
|
|
35
|
+
*/
|
|
36
|
+
setup (
|
|
37
|
+
props,
|
|
38
|
+
componentContext
|
|
39
|
+
) {
|
|
40
|
+
const context = FuroSectionHeaderContext.create({
|
|
41
|
+
props,
|
|
42
|
+
componentContext,
|
|
43
|
+
})
|
|
44
|
+
.setupComponent()
|
|
45
|
+
|
|
46
|
+
return {
|
|
47
|
+
context,
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
})
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<template>
|
|
54
|
+
<div
|
|
55
|
+
v-bind="{
|
|
56
|
+
...context.extractRootAttributes(),
|
|
57
|
+
...$attrs,
|
|
58
|
+
}"
|
|
59
|
+
:class="context.extractRootClassNames()"
|
|
60
|
+
>
|
|
61
|
+
<div class="row">
|
|
62
|
+
<div class="lead">
|
|
63
|
+
<slot name="leading" />
|
|
64
|
+
|
|
65
|
+
<component
|
|
66
|
+
:is="context.extractHeadingTag()"
|
|
67
|
+
class="title"
|
|
68
|
+
>
|
|
69
|
+
<slot name="title">
|
|
70
|
+
{{ context.title }}
|
|
71
|
+
</slot>
|
|
72
|
+
</component>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div
|
|
76
|
+
v-if="context.hasActions()"
|
|
77
|
+
class="actions"
|
|
78
|
+
>
|
|
79
|
+
<slot name="actions" />
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<FuroSeparator
|
|
84
|
+
v-if="context.isDivided()"
|
|
85
|
+
:parcel="context.buildDividerParcel()"
|
|
86
|
+
/>
|
|
87
|
+
</div>
|
|
88
|
+
</template>
|
|
89
|
+
|
|
90
|
+
<style scoped>
|
|
91
|
+
@layer furo {
|
|
92
|
+
.unit-section-header {
|
|
93
|
+
border-start-start-radius: var(--size-border-radius-2x-large);
|
|
94
|
+
border-start-end-radius: var(--size-border-radius-2x-large);
|
|
95
|
+
|
|
96
|
+
background-color: var(--color-card);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.unit-section-header > .row {
|
|
100
|
+
min-block-size: 3.5rem;
|
|
101
|
+
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
justify-content: space-between;
|
|
105
|
+
gap: var(--size-space-medium);
|
|
106
|
+
|
|
107
|
+
padding-block: 0.75rem;
|
|
108
|
+
padding-inline: 1.25rem;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.unit-section-header > .row > .lead {
|
|
112
|
+
min-inline-size: 0;
|
|
113
|
+
|
|
114
|
+
display: flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
gap: var(--size-space-tiny);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.unit-section-header > .row > .lead > .title {
|
|
120
|
+
margin-block: 0;
|
|
121
|
+
margin-inline: 0;
|
|
122
|
+
|
|
123
|
+
color: var(--color-foreground-title);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.unit-section-header.size-large > .row > .lead > .title {
|
|
127
|
+
font: var(--font-label-large);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.unit-section-header.size-medium > .row > .lead > .title {
|
|
131
|
+
font: var(--font-label-medium);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.unit-section-header > .row > .actions {
|
|
135
|
+
display: flex;
|
|
136
|
+
align-items: center;
|
|
137
|
+
gap: var(--size-space-compact);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
</style>
|