@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,1038 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ref,
|
|
3
|
+
} from 'vue'
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
CalendarDate,
|
|
7
|
+
getLocalTimeZone,
|
|
8
|
+
parseDate,
|
|
9
|
+
today,
|
|
10
|
+
} from '@internationalized/date'
|
|
11
|
+
|
|
12
|
+
import BaseFuroContext from '../../../contexts/BaseFuroContext.js'
|
|
13
|
+
|
|
14
|
+
import DatePickerEmitPayload from './DatePickerEmitPayload.js'
|
|
15
|
+
|
|
16
|
+
/** @type {{ value: number, label: string }[]} */
|
|
17
|
+
const CALENDAR_MONTHS = [
|
|
18
|
+
{ value: 1, label: 'January' },
|
|
19
|
+
{ value: 2, label: 'February' },
|
|
20
|
+
{ value: 3, label: 'March' },
|
|
21
|
+
{ value: 4, label: 'April' },
|
|
22
|
+
{ value: 5, label: 'May' },
|
|
23
|
+
{ value: 6, label: 'June' },
|
|
24
|
+
{ value: 7, label: 'July' },
|
|
25
|
+
{ value: 8, label: 'August' },
|
|
26
|
+
{ value: 9, label: 'September' },
|
|
27
|
+
{ value: 10, label: 'October' },
|
|
28
|
+
{ value: 11, label: 'November' },
|
|
29
|
+
{ value: 12, label: 'December' },
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Furo-only parcel keys that are not forwarded to Reka `DatePickerRoot`.
|
|
34
|
+
* These are stripped from the Reka v-bind spread.
|
|
35
|
+
*/
|
|
36
|
+
export const FURO_DATE_PICKER_PARCEL_KEYS = new Set([
|
|
37
|
+
'invalid',
|
|
38
|
+
'placeholder',
|
|
39
|
+
'disabled',
|
|
40
|
+
'minValue',
|
|
41
|
+
'maxValue',
|
|
42
|
+
'displayFormat',
|
|
43
|
+
'timezone',
|
|
44
|
+
'clearButtonText',
|
|
45
|
+
'todayButtonText',
|
|
46
|
+
])
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Default footer button labels. A consumer overrides them via parcel; passing `null` hides
|
|
50
|
+
* the corresponding button.
|
|
51
|
+
*/
|
|
52
|
+
const DEFAULT_TODAY_BUTTON_TEXT = 'Today'
|
|
53
|
+
|
|
54
|
+
const DEFAULT_CLEAR_BUTTON_TEXT = 'Clear'
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Context class for managing FuroDatePicker atom.
|
|
58
|
+
*
|
|
59
|
+
* @extends {BaseFuroContext<null, Props, EmitEventName>}
|
|
60
|
+
*/
|
|
61
|
+
export default class FuroDatePickerContext extends BaseFuroContext {
|
|
62
|
+
/**
|
|
63
|
+
* Constructor.
|
|
64
|
+
*
|
|
65
|
+
* @param {FuroDatePickerContextParams} params - Parameters of this constructor.
|
|
66
|
+
*/
|
|
67
|
+
constructor ({
|
|
68
|
+
props,
|
|
69
|
+
componentContext,
|
|
70
|
+
refHash,
|
|
71
|
+
}) {
|
|
72
|
+
super({
|
|
73
|
+
props,
|
|
74
|
+
componentContext,
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
this.refHash = refHash
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Factory method.
|
|
82
|
+
*
|
|
83
|
+
* @template {X extends typeof FuroDatePickerContext ? X : never} T, X
|
|
84
|
+
* @override
|
|
85
|
+
* @param {FuroDatePickerContextFactoryParams} params - Parameters of this factory method.
|
|
86
|
+
* @returns {InstanceType<T>} An instance of this class.
|
|
87
|
+
* @this {T}
|
|
88
|
+
*/
|
|
89
|
+
static create ({
|
|
90
|
+
props,
|
|
91
|
+
componentContext,
|
|
92
|
+
refHash = this.buildRefHash(),
|
|
93
|
+
}) {
|
|
94
|
+
return /** @type {InstanceType<T>} */ (
|
|
95
|
+
new this({
|
|
96
|
+
props,
|
|
97
|
+
componentContext,
|
|
98
|
+
refHash,
|
|
99
|
+
})
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Build ref hash.
|
|
105
|
+
*
|
|
106
|
+
* @override
|
|
107
|
+
* @returns {FuroDatePickerContextParams['refHash']}
|
|
108
|
+
*/
|
|
109
|
+
static buildRefHash () {
|
|
110
|
+
return {
|
|
111
|
+
triggerElementRef: ref(null),
|
|
112
|
+
internalValueRef: ref(null),
|
|
113
|
+
placeholderRef: ref(null),
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Get emit event names.
|
|
119
|
+
*
|
|
120
|
+
* @override
|
|
121
|
+
* @returns {Readonly<{
|
|
122
|
+
* CHANGE_VALUE: 'change-value'
|
|
123
|
+
* COMMIT_VALUE: 'commit-value'
|
|
124
|
+
* UPDATE_VALUE: 'update:value'
|
|
125
|
+
* }>}
|
|
126
|
+
*/
|
|
127
|
+
static get EMIT_EVENT_NAME () {
|
|
128
|
+
return {
|
|
129
|
+
CHANGE_VALUE: 'change-value',
|
|
130
|
+
COMMIT_VALUE: 'commit-value',
|
|
131
|
+
UPDATE_VALUE: 'update:value',
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Get emit event hash.
|
|
137
|
+
*
|
|
138
|
+
* @returns {{
|
|
139
|
+
* 'change-value': (payload: import('./DatePickerEmitPayload.js').default) => void
|
|
140
|
+
* 'commit-value': (payload: import('./DatePickerEmitPayload.js').default) => void
|
|
141
|
+
* 'update:value': (value: string | null) => void
|
|
142
|
+
* }}
|
|
143
|
+
*/
|
|
144
|
+
static get EMIT_EVENT_HASH () {
|
|
145
|
+
return {
|
|
146
|
+
[this.EMIT_EVENT_NAME.CHANGE_VALUE]: payload => {},
|
|
147
|
+
[this.EMIT_EVENT_NAME.COMMIT_VALUE]: payload => {},
|
|
148
|
+
[this.EMIT_EVENT_NAME.UPDATE_VALUE]: value => {},
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Get the EmitPayload constructor.
|
|
154
|
+
*
|
|
155
|
+
* @returns {typeof DatePickerEmitPayload}
|
|
156
|
+
*/
|
|
157
|
+
static get EmitPayloadCtor () {
|
|
158
|
+
return DatePickerEmitPayload
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Get the constructor of this class.
|
|
163
|
+
*
|
|
164
|
+
* @override
|
|
165
|
+
* @returns {typeof FuroDatePickerContext}
|
|
166
|
+
*/
|
|
167
|
+
get Ctor () {
|
|
168
|
+
return /** @type {typeof FuroDatePickerContext} */ (this.constructor)
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Get trigger element ref.
|
|
173
|
+
*
|
|
174
|
+
* @returns {import('vue').Ref<HTMLElement | null>}
|
|
175
|
+
*/
|
|
176
|
+
get triggerElementRef () {
|
|
177
|
+
return this.refHash.triggerElementRef
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Get internal CalendarDate value ref.
|
|
182
|
+
*
|
|
183
|
+
* @returns {import('vue').Ref<import('@internationalized/date').CalendarDate | null>}
|
|
184
|
+
*/
|
|
185
|
+
get internalValueRef () {
|
|
186
|
+
return this.refHash.internalValueRef
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Get calendar view placeholder ref (controls which month/year the calendar shows).
|
|
191
|
+
*
|
|
192
|
+
* @returns {import('vue').Ref<import('@internationalized/date').CalendarDate | null>}
|
|
193
|
+
*/
|
|
194
|
+
get placeholderRef () {
|
|
195
|
+
return this.refHash.placeholderRef
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Parcel passed from parent via props.
|
|
200
|
+
*
|
|
201
|
+
* @override
|
|
202
|
+
* @returns {Props['parcel']}
|
|
203
|
+
*/
|
|
204
|
+
get parcel () {
|
|
205
|
+
return this.props.parcel
|
|
206
|
+
?? null
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Get trigger parcel.
|
|
211
|
+
*
|
|
212
|
+
* @returns {Props['triggerParcel']}
|
|
213
|
+
*/
|
|
214
|
+
get triggerParcel () {
|
|
215
|
+
return this.props.triggerParcel
|
|
216
|
+
?? null
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Get content parcel.
|
|
221
|
+
*
|
|
222
|
+
* @returns {Props['contentParcel']}
|
|
223
|
+
*/
|
|
224
|
+
get contentParcel () {
|
|
225
|
+
return this.props.contentParcel
|
|
226
|
+
?? null
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Whether the date picker is in an invalid state.
|
|
231
|
+
*
|
|
232
|
+
* @returns {boolean}
|
|
233
|
+
*/
|
|
234
|
+
get isInvalid () {
|
|
235
|
+
return this.parcel?.invalid
|
|
236
|
+
?? false
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Whether the date picker is disabled.
|
|
241
|
+
*
|
|
242
|
+
* @returns {boolean}
|
|
243
|
+
*/
|
|
244
|
+
get isDisabled () {
|
|
245
|
+
return this.parcel?.disabled
|
|
246
|
+
?? false
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Placeholder text.
|
|
251
|
+
*
|
|
252
|
+
* @returns {string}
|
|
253
|
+
*/
|
|
254
|
+
get placeholder () {
|
|
255
|
+
return this.parcel?.placeholder
|
|
256
|
+
?? ''
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* IANA timezone identifier for Date object normalization (e.g. `'Asia/Tokyo'`).
|
|
261
|
+
* When `null`, normalization falls back to local date parts (timezone-naive).
|
|
262
|
+
*
|
|
263
|
+
* @returns {string | null}
|
|
264
|
+
*/
|
|
265
|
+
get timezone () {
|
|
266
|
+
return this.parcel?.timezone
|
|
267
|
+
?? null
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Footer "Today" button label. Defaults to `'Today'`; `null` hides the button.
|
|
272
|
+
*
|
|
273
|
+
* @returns {string | null}
|
|
274
|
+
*/
|
|
275
|
+
get todayButtonText () {
|
|
276
|
+
if (
|
|
277
|
+
!this.parcel
|
|
278
|
+
|| !('todayButtonText' in this.parcel)
|
|
279
|
+
) {
|
|
280
|
+
return DEFAULT_TODAY_BUTTON_TEXT
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
return this.parcel.todayButtonText ?? null
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Footer "Clear" button label. Defaults to `'Clear'`; `null` hides the button.
|
|
288
|
+
*
|
|
289
|
+
* @returns {string | null}
|
|
290
|
+
*/
|
|
291
|
+
get clearButtonText () {
|
|
292
|
+
if (
|
|
293
|
+
!this.parcel
|
|
294
|
+
|| !('clearButtonText' in this.parcel)
|
|
295
|
+
) {
|
|
296
|
+
return DEFAULT_CLEAR_BUTTON_TEXT
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
return this.parcel.clearButtonText ?? null
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Setup component — sync external value into internal CalendarDate ref.
|
|
304
|
+
*
|
|
305
|
+
* @template {X extends FuroDatePickerContext ? X : never} T, X
|
|
306
|
+
* @override
|
|
307
|
+
* @returns {T} - For method chaining.
|
|
308
|
+
* @this {T}
|
|
309
|
+
*/
|
|
310
|
+
setupComponent () {
|
|
311
|
+
this.watch(
|
|
312
|
+
[
|
|
313
|
+
() => this.parcel?.value,
|
|
314
|
+
() => this.attrs?.value ?? null,
|
|
315
|
+
],
|
|
316
|
+
([parcelValue, attrsValue]) => {
|
|
317
|
+
const raw = /** @type {string | null} */ (parcelValue ?? attrsValue ?? null)
|
|
318
|
+
|
|
319
|
+
this.internalValueRef.value = this.normalizeToCalendarDate({ raw })
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
immediate: true,
|
|
323
|
+
}
|
|
324
|
+
)
|
|
325
|
+
|
|
326
|
+
return this
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Normalize an external value to `CalendarDate | null`.
|
|
331
|
+
* Accepts `YYYY-MM-DD` strings, `Date` objects, `CalendarDate` instances, or `null`.
|
|
332
|
+
*
|
|
333
|
+
* @param {{
|
|
334
|
+
* raw: string | Date | import('@internationalized/date').CalendarDate | null
|
|
335
|
+
* }} params - Parameters of this method.
|
|
336
|
+
* @returns {import('@internationalized/date').CalendarDate | null}
|
|
337
|
+
*/
|
|
338
|
+
normalizeToCalendarDate ({
|
|
339
|
+
raw,
|
|
340
|
+
}) {
|
|
341
|
+
if (!raw) {
|
|
342
|
+
return null
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
if (typeof raw === 'string') {
|
|
346
|
+
return this.normalizeStringToCalendarDate({ raw })
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
if (raw instanceof Date) {
|
|
350
|
+
return this.normalizeDateToCalendarDate({ raw })
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
// Already a CalendarDate-like object
|
|
354
|
+
return /** @type {import('@internationalized/date').CalendarDate} */ (raw)
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Parse an ISO `YYYY-MM-DD` string into a `CalendarDate`.
|
|
359
|
+
*
|
|
360
|
+
* @param {{
|
|
361
|
+
* raw: string
|
|
362
|
+
* }} params - Parameters of this method.
|
|
363
|
+
* @returns {import('@internationalized/date').CalendarDate | null}
|
|
364
|
+
*/
|
|
365
|
+
normalizeStringToCalendarDate ({
|
|
366
|
+
raw,
|
|
367
|
+
}) {
|
|
368
|
+
if (!raw) {
|
|
369
|
+
return null
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
try {
|
|
373
|
+
return parseDate(raw)
|
|
374
|
+
} catch {
|
|
375
|
+
return null
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Convert a `Date` object to `CalendarDate`.
|
|
381
|
+
* When `parcel.timezone` is set, date parts are extracted in that IANA timezone.
|
|
382
|
+
* Otherwise falls back to local date parts (timezone-naive).
|
|
383
|
+
*
|
|
384
|
+
* @param {{
|
|
385
|
+
* raw: Date
|
|
386
|
+
* }} params - Parameters of this method.
|
|
387
|
+
* @returns {import('@internationalized/date').CalendarDate | null}
|
|
388
|
+
*/
|
|
389
|
+
normalizeDateToCalendarDate ({
|
|
390
|
+
raw,
|
|
391
|
+
}) {
|
|
392
|
+
if (
|
|
393
|
+
!raw
|
|
394
|
+
|| isNaN(raw.getTime())
|
|
395
|
+
) {
|
|
396
|
+
return null
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
const { timezone } = this
|
|
400
|
+
|
|
401
|
+
if (timezone) {
|
|
402
|
+
return this.normalizeDateToCalendarDateInTimezone({ raw, timezone })
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
const yearString = String(raw.getFullYear())
|
|
406
|
+
.padStart(4, '0')
|
|
407
|
+
const monthString = String(raw.getMonth() + 1)
|
|
408
|
+
.padStart(2, '0')
|
|
409
|
+
const dayString = String(raw.getDate())
|
|
410
|
+
.padStart(2, '0')
|
|
411
|
+
|
|
412
|
+
const isoString = [
|
|
413
|
+
yearString,
|
|
414
|
+
monthString,
|
|
415
|
+
dayString,
|
|
416
|
+
].join('-')
|
|
417
|
+
|
|
418
|
+
return this.normalizeStringToCalendarDate({ raw: isoString })
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Convert a `Date` object to `CalendarDate` using a specific IANA timezone.
|
|
423
|
+
* Returns `null` when the timezone identifier is invalid.
|
|
424
|
+
*
|
|
425
|
+
* @param {{
|
|
426
|
+
* raw: Date
|
|
427
|
+
* timezone: string
|
|
428
|
+
* }} params - Parameters of this method.
|
|
429
|
+
* @returns {import('@internationalized/date').CalendarDate | null}
|
|
430
|
+
*/
|
|
431
|
+
normalizeDateToCalendarDateInTimezone ({
|
|
432
|
+
raw,
|
|
433
|
+
timezone,
|
|
434
|
+
}) {
|
|
435
|
+
try {
|
|
436
|
+
const { year, month, day } = this.Ctor.extractDatePartsInTimezone({ raw, timezone })
|
|
437
|
+
|
|
438
|
+
if (
|
|
439
|
+
year === null
|
|
440
|
+
|| month === null
|
|
441
|
+
|| day === null
|
|
442
|
+
) {
|
|
443
|
+
return null
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
const isoString = [
|
|
447
|
+
year,
|
|
448
|
+
month,
|
|
449
|
+
day,
|
|
450
|
+
].join('-')
|
|
451
|
+
|
|
452
|
+
return this.normalizeStringToCalendarDate({ raw: isoString })
|
|
453
|
+
} catch {
|
|
454
|
+
return null
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Extract year / month / day string parts from a `Date` object in a specific IANA timezone
|
|
460
|
+
* via `Intl.DateTimeFormat`. Year is zero-padded to 4 digits to satisfy ISO 8601.
|
|
461
|
+
*
|
|
462
|
+
* @param {{
|
|
463
|
+
* raw: Date
|
|
464
|
+
* timezone: string
|
|
465
|
+
* }} params - Parameters of this method.
|
|
466
|
+
* @returns {{ year: string | null, month: string | null, day: string | null }}
|
|
467
|
+
*/
|
|
468
|
+
static extractDatePartsInTimezone ({
|
|
469
|
+
raw,
|
|
470
|
+
timezone,
|
|
471
|
+
}) {
|
|
472
|
+
const formatter = new Intl.DateTimeFormat('en-US', {
|
|
473
|
+
timeZone: timezone,
|
|
474
|
+
year: 'numeric',
|
|
475
|
+
month: '2-digit',
|
|
476
|
+
day: '2-digit',
|
|
477
|
+
})
|
|
478
|
+
|
|
479
|
+
const parts = formatter.formatToParts(raw)
|
|
480
|
+
|
|
481
|
+
const year = parts.find(part => part.type === 'year')
|
|
482
|
+
?.value
|
|
483
|
+
?.padStart(4, '0')
|
|
484
|
+
?? null
|
|
485
|
+
const month = parts.find(part => part.type === 'month')
|
|
486
|
+
?.value
|
|
487
|
+
?? null
|
|
488
|
+
const day = parts.find(part => part.type === 'day')
|
|
489
|
+
?.value
|
|
490
|
+
?? null
|
|
491
|
+
|
|
492
|
+
return {
|
|
493
|
+
year,
|
|
494
|
+
month,
|
|
495
|
+
day,
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Detect the browser's locale string. Returns `'en'` when `navigator` is unavailable
|
|
501
|
+
* (e.g. server-side render).
|
|
502
|
+
*
|
|
503
|
+
* @returns {string}
|
|
504
|
+
*/
|
|
505
|
+
static detectBrowserLocale () {
|
|
506
|
+
if (!navigator) {
|
|
507
|
+
return 'en'
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
return navigator.language
|
|
511
|
+
?? 'en'
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Whether the footer actions row should be rendered (at least one button is visible).
|
|
516
|
+
*
|
|
517
|
+
* @returns {boolean}
|
|
518
|
+
*/
|
|
519
|
+
hasFooterButtons () {
|
|
520
|
+
return this.hasTodayButton()
|
|
521
|
+
|| this.hasClearButton()
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Whether the Today button is visible.
|
|
526
|
+
*
|
|
527
|
+
* @returns {boolean}
|
|
528
|
+
*/
|
|
529
|
+
hasTodayButton () {
|
|
530
|
+
return this.todayButtonText !== null
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* Whether the Clear button is visible.
|
|
535
|
+
*
|
|
536
|
+
* @returns {boolean}
|
|
537
|
+
*/
|
|
538
|
+
hasClearButton () {
|
|
539
|
+
return this.clearButtonText !== null
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Normalize a `CalendarDate` to an ISO `YYYY-MM-DD` string or `null`.
|
|
544
|
+
*
|
|
545
|
+
* @param {{
|
|
546
|
+
* calendarDate: import('@internationalized/date').CalendarDate | null
|
|
547
|
+
* }} params - Parameters of this method.
|
|
548
|
+
* @returns {string | null}
|
|
549
|
+
*/
|
|
550
|
+
normalizeToIsoString ({
|
|
551
|
+
calendarDate,
|
|
552
|
+
}) {
|
|
553
|
+
return calendarDate?.toString() ?? null
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* Normalize the parcel `minValue` to a `CalendarDate`.
|
|
558
|
+
*
|
|
559
|
+
* @returns {import('@internationalized/date').CalendarDate | null}
|
|
560
|
+
*/
|
|
561
|
+
normalizeMinValue () {
|
|
562
|
+
const raw = this.parcel?.minValue ?? null
|
|
563
|
+
|
|
564
|
+
return this.normalizeToCalendarDate({ raw })
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* Normalize the parcel `maxValue` to a `CalendarDate`.
|
|
569
|
+
*
|
|
570
|
+
* @returns {import('@internationalized/date').CalendarDate | null}
|
|
571
|
+
*/
|
|
572
|
+
normalizeMaxValue () {
|
|
573
|
+
const raw = this.parcel?.maxValue ?? null
|
|
574
|
+
|
|
575
|
+
return this.normalizeToCalendarDate({ raw })
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* Resolve the calendar placeholder, which drives both the displayed month/year and the
|
|
580
|
+
* empty segment placeholders. Falls back to an explicit placeholder, then the current
|
|
581
|
+
* value, then today clamped into the `[minValue, maxValue]` window — so the year segment
|
|
582
|
+
* auto-fills within range when bounds are set but no value exists yet.
|
|
583
|
+
*
|
|
584
|
+
* @returns {import('@internationalized/date').CalendarDate | null}
|
|
585
|
+
*/
|
|
586
|
+
resolveCalendarPlaceholder () {
|
|
587
|
+
const explicit = this.placeholderRef.value
|
|
588
|
+
?? this.internalValueRef.value
|
|
589
|
+
|
|
590
|
+
if (explicit !== null) {
|
|
591
|
+
return explicit
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
return this.clampDateToBounds({
|
|
595
|
+
date: today(getLocalTimeZone()),
|
|
596
|
+
})
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* Clamp a `CalendarDate` into the `[minValue, maxValue]` window.
|
|
601
|
+
* Returns the bound when out of range, otherwise the original date.
|
|
602
|
+
*
|
|
603
|
+
* @param {{
|
|
604
|
+
* date: import('@internationalized/date').CalendarDate
|
|
605
|
+
* }} params - Parameters of this method.
|
|
606
|
+
* @returns {import('@internationalized/date').CalendarDate}
|
|
607
|
+
*/
|
|
608
|
+
clampDateToBounds ({
|
|
609
|
+
date,
|
|
610
|
+
}) {
|
|
611
|
+
const minValue = this.normalizeMinValue()
|
|
612
|
+
const maxValue = this.normalizeMaxValue()
|
|
613
|
+
|
|
614
|
+
if (
|
|
615
|
+
minValue !== null
|
|
616
|
+
&& date.compare(minValue) < 0
|
|
617
|
+
) {
|
|
618
|
+
return minValue
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
if (
|
|
622
|
+
maxValue !== null
|
|
623
|
+
&& date.compare(maxValue) > 0
|
|
624
|
+
) {
|
|
625
|
+
return maxValue
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
return date
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* Resolve whether the calendar popover closes when a date is selected.
|
|
633
|
+
* Defaults to `true` (single-date close-on-select UX). A consumer — e.g. the
|
|
634
|
+
* `FuroDateTimePicker` molecule — passes `closeOnSelect: false` to keep the popover open
|
|
635
|
+
* so a time can also be chosen in the same session.
|
|
636
|
+
*
|
|
637
|
+
* @returns {boolean}
|
|
638
|
+
*/
|
|
639
|
+
resolveCloseOnSelect () {
|
|
640
|
+
return this.parcel?.closeOnSelect
|
|
641
|
+
?? true
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* Resolve whether re-selecting the already-selected date is prevented from clearing it.
|
|
646
|
+
* Defaults to `true` (re-clicking a selected date keeps it), with `parcel.preventDeselect`
|
|
647
|
+
* as an explicit override.
|
|
648
|
+
*
|
|
649
|
+
* @returns {boolean}
|
|
650
|
+
*/
|
|
651
|
+
resolvePreventDeselect () {
|
|
652
|
+
return this.parcel?.preventDeselect
|
|
653
|
+
?? true
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* Resolve the locale that drives the date field's segment order and formatting.
|
|
658
|
+
* Defaults to the browser locale so the segment order follows the user's locale
|
|
659
|
+
* (e.g. `dd/mm/yyyy`), with `parcel.locale` as an explicit override.
|
|
660
|
+
*
|
|
661
|
+
* @returns {string}
|
|
662
|
+
*/
|
|
663
|
+
resolveLocale () {
|
|
664
|
+
return this.parcel?.locale
|
|
665
|
+
?? this.Ctor.detectBrowserLocale()
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* Extract attributes for Reka `DatePickerRoot`.
|
|
670
|
+
* Strips all Furo-only keys and re-applies normalized Reka props.
|
|
671
|
+
*
|
|
672
|
+
* @returns {Record<string, unknown>}
|
|
673
|
+
*/
|
|
674
|
+
extractRootAttributes () {
|
|
675
|
+
const strippedParcel = this.stripFuroParcelKeys()
|
|
676
|
+
|
|
677
|
+
const minValue = this.normalizeMinValue()
|
|
678
|
+
const maxValue = this.normalizeMaxValue()
|
|
679
|
+
const placeholder = this.resolveCalendarPlaceholder()
|
|
680
|
+
|
|
681
|
+
return {
|
|
682
|
+
...this.attrs,
|
|
683
|
+
...strippedParcel,
|
|
684
|
+
modelValue: this.internalValueRef.value,
|
|
685
|
+
granularity: 'day',
|
|
686
|
+
closeOnSelect: this.resolveCloseOnSelect(),
|
|
687
|
+
preventDeselect: this.resolvePreventDeselect(),
|
|
688
|
+
locale: this.resolveLocale(),
|
|
689
|
+
disabled: this.isDisabled,
|
|
690
|
+
...(placeholder === null
|
|
691
|
+
? {}
|
|
692
|
+
: { placeholder }),
|
|
693
|
+
...(minValue === null
|
|
694
|
+
? {}
|
|
695
|
+
: { minValue }),
|
|
696
|
+
...(maxValue === null
|
|
697
|
+
? {}
|
|
698
|
+
: { maxValue }),
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* Strip Furo-only parcel keys from the parcel object.
|
|
704
|
+
*
|
|
705
|
+
* @returns {Record<string, unknown>}
|
|
706
|
+
*/
|
|
707
|
+
stripFuroParcelKeys () {
|
|
708
|
+
const { parcel } = this
|
|
709
|
+
|
|
710
|
+
if (!parcel) {
|
|
711
|
+
return {}
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
const entries = Object.entries(parcel)
|
|
715
|
+
.filter(([key]) => !FURO_DATE_PICKER_PARCEL_KEYS.has(key))
|
|
716
|
+
|
|
717
|
+
return Object.fromEntries(entries)
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* Extract attributes for Reka `DatePickerField` / `DatePickerTrigger`.
|
|
722
|
+
*
|
|
723
|
+
* @returns {Props['triggerParcel']}
|
|
724
|
+
*/
|
|
725
|
+
extractTriggerAttributes () {
|
|
726
|
+
return this.triggerParcel
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* Extract attributes for Reka `DatePickerContent`.
|
|
731
|
+
*
|
|
732
|
+
* @returns {Props['contentParcel']}
|
|
733
|
+
*/
|
|
734
|
+
extractContentAttributes () {
|
|
735
|
+
return this.contentParcel
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* Build a custom event for the emit payload.
|
|
740
|
+
*
|
|
741
|
+
* @param {{
|
|
742
|
+
* name: string
|
|
743
|
+
* value: string | null
|
|
744
|
+
* }} params - Parameters of this method.
|
|
745
|
+
* @returns {CustomEvent<{
|
|
746
|
+
* target: HTMLElement | null
|
|
747
|
+
* value: string | null
|
|
748
|
+
* }>}
|
|
749
|
+
*/
|
|
750
|
+
buildCustomEvent ({
|
|
751
|
+
name,
|
|
752
|
+
value,
|
|
753
|
+
}) {
|
|
754
|
+
return new CustomEvent(
|
|
755
|
+
name,
|
|
756
|
+
{
|
|
757
|
+
detail: {
|
|
758
|
+
target: this.triggerElementRef.value,
|
|
759
|
+
value,
|
|
760
|
+
},
|
|
761
|
+
}
|
|
762
|
+
)
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
/**
|
|
766
|
+
* Respond to `update:modelValue` from Reka `DatePickerRoot`.
|
|
767
|
+
* Emits `change-value`, `update:value`, and `commit-value`.
|
|
768
|
+
*
|
|
769
|
+
* @param {{
|
|
770
|
+
* calendarDate?: import('@internationalized/date').DateValue | null
|
|
771
|
+
* }} params - Parameters of this method.
|
|
772
|
+
*/
|
|
773
|
+
onChangeValue ({
|
|
774
|
+
calendarDate = null,
|
|
775
|
+
}) {
|
|
776
|
+
const normalized = this.normalizeToCalendarDate({
|
|
777
|
+
raw: /** @type {import('@internationalized/date').CalendarDate | null} */ (calendarDate ?? null),
|
|
778
|
+
})
|
|
779
|
+
|
|
780
|
+
this.internalValueRef.value = normalized
|
|
781
|
+
|
|
782
|
+
const value = this.normalizeToIsoString({ calendarDate: normalized })
|
|
783
|
+
|
|
784
|
+
const customEvent = this.buildCustomEvent({
|
|
785
|
+
name: this.EMIT_EVENT_NAME.CHANGE_VALUE,
|
|
786
|
+
value,
|
|
787
|
+
})
|
|
788
|
+
|
|
789
|
+
const payload = this.Ctor.EmitPayloadCtor.create({
|
|
790
|
+
rawEvent: customEvent,
|
|
791
|
+
})
|
|
792
|
+
|
|
793
|
+
this.emit(
|
|
794
|
+
this.EMIT_EVENT_NAME.CHANGE_VALUE,
|
|
795
|
+
payload
|
|
796
|
+
)
|
|
797
|
+
|
|
798
|
+
this.emit(
|
|
799
|
+
this.EMIT_EVENT_NAME.UPDATE_VALUE,
|
|
800
|
+
value
|
|
801
|
+
)
|
|
802
|
+
|
|
803
|
+
this.emit(
|
|
804
|
+
this.EMIT_EVENT_NAME.COMMIT_VALUE,
|
|
805
|
+
payload
|
|
806
|
+
)
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* Sync calendar view placeholder when Reka navigates (prev/next buttons).
|
|
811
|
+
*
|
|
812
|
+
* @param {{
|
|
813
|
+
* calendarDate: import('@internationalized/date').DateValue | null
|
|
814
|
+
* }} params - Parameters of this method.
|
|
815
|
+
*/
|
|
816
|
+
onPlaceholderChange ({
|
|
817
|
+
calendarDate,
|
|
818
|
+
}) {
|
|
819
|
+
this.placeholderRef.value = this.normalizeToCalendarDate({
|
|
820
|
+
raw: /** @type {import('@internationalized/date').CalendarDate | null} */ (calendarDate ?? null),
|
|
821
|
+
})
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* Navigate the calendar view to a specific month, keeping the current year.
|
|
826
|
+
*
|
|
827
|
+
* @param {{
|
|
828
|
+
* changeEvent: Event
|
|
829
|
+
* currentYear: number
|
|
830
|
+
* }} params - Parameters of this method.
|
|
831
|
+
*/
|
|
832
|
+
onMonthChange ({
|
|
833
|
+
changeEvent,
|
|
834
|
+
currentYear,
|
|
835
|
+
}) {
|
|
836
|
+
const month = /** @type {HTMLSelectElement} */ (changeEvent.target)?.value
|
|
837
|
+
|
|
838
|
+
this.placeholderRef.value = new CalendarDate(Number(currentYear), Number(month), 1)
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* Navigate the calendar view to a specific year, keeping the current month.
|
|
843
|
+
*
|
|
844
|
+
* @param {{
|
|
845
|
+
* changeEvent: Event
|
|
846
|
+
* currentMonth: number
|
|
847
|
+
* }} params - Parameters of this method.
|
|
848
|
+
*/
|
|
849
|
+
onYearChange ({
|
|
850
|
+
changeEvent,
|
|
851
|
+
currentMonth,
|
|
852
|
+
}) {
|
|
853
|
+
const year = /** @type {HTMLSelectElement} */ (changeEvent.target)?.value
|
|
854
|
+
|
|
855
|
+
this.placeholderRef.value = new CalendarDate(Number(year), Number(currentMonth), 1)
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
/**
|
|
859
|
+
* Select today's date (clamped into the `[minValue, maxValue]` window) from the footer
|
|
860
|
+
* "Today" button, navigating the calendar view to it and emitting the change trio.
|
|
861
|
+
*/
|
|
862
|
+
onSelectToday () {
|
|
863
|
+
const todayDate = this.clampDateToBounds({
|
|
864
|
+
date: today(getLocalTimeZone()),
|
|
865
|
+
})
|
|
866
|
+
|
|
867
|
+
this.placeholderRef.value = todayDate
|
|
868
|
+
|
|
869
|
+
this.onChangeValue({
|
|
870
|
+
calendarDate: todayDate,
|
|
871
|
+
})
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* Clear the selected value from the footer "Clear" button, emitting the change trio with
|
|
876
|
+
* `null`.
|
|
877
|
+
*/
|
|
878
|
+
onClearValue () {
|
|
879
|
+
this.onChangeValue({
|
|
880
|
+
calendarDate: null,
|
|
881
|
+
})
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* Extract the 12 calendar months for the month dropdown.
|
|
886
|
+
*
|
|
887
|
+
* @returns {{ value: number, label: string }[]}
|
|
888
|
+
*/
|
|
889
|
+
extractCalendarMonths () {
|
|
890
|
+
return CALENDAR_MONTHS
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* Extract the year range for the year dropdown.
|
|
895
|
+
* Respects `minValue`/`maxValue` parcel constraints; defaults to ±100/+50 from today.
|
|
896
|
+
*
|
|
897
|
+
* @returns {{ value: number }[]}
|
|
898
|
+
*/
|
|
899
|
+
extractCalendarYears () {
|
|
900
|
+
const currentYear = new Date()
|
|
901
|
+
.getFullYear()
|
|
902
|
+
|
|
903
|
+
const minYear = this.normalizeMinValue()?.year ?? (currentYear - 100)
|
|
904
|
+
const maxYear = this.normalizeMaxValue()?.year ?? (currentYear + 50)
|
|
905
|
+
|
|
906
|
+
const count = maxYear - minYear + 1
|
|
907
|
+
|
|
908
|
+
return Array.from(
|
|
909
|
+
{ length: count },
|
|
910
|
+
(_, index) => ({ value: minYear + index })
|
|
911
|
+
)
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* Whether the part is a slash character part.
|
|
916
|
+
*
|
|
917
|
+
* @param {{ part: import('reka-ui').SegmentPart }} params - Parameters of this method.
|
|
918
|
+
* @returns {boolean}
|
|
919
|
+
*/
|
|
920
|
+
isSlashCharacterPart ({
|
|
921
|
+
part,
|
|
922
|
+
}) {
|
|
923
|
+
return part === 'literal'
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
/**
|
|
927
|
+
* Format a date field segment value for display. Day and month segments are zero-padded to
|
|
928
|
+
* two digits (e.g. `3` → `03`, `5` → `05`) so the field always shows `dd`/`mm`; placeholder
|
|
929
|
+
* text, the year, and literals pass through unchanged. The underlying primitive renders
|
|
930
|
+
* filled day/month segments with single-digit (`numeric`) formatting, so this restores the
|
|
931
|
+
* 2-digit display.
|
|
932
|
+
*
|
|
933
|
+
* @param {{
|
|
934
|
+
* part: import('reka-ui').SegmentPart
|
|
935
|
+
* value: string
|
|
936
|
+
* }} params - Parameters of this method.
|
|
937
|
+
* @returns {string}
|
|
938
|
+
*/
|
|
939
|
+
formatSegmentValue ({
|
|
940
|
+
part,
|
|
941
|
+
value,
|
|
942
|
+
}) {
|
|
943
|
+
if (!this.isTwoDigitSegmentPart({ part })) {
|
|
944
|
+
return value
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
if (!/^\d{1,2}$/u.test(value)) {
|
|
948
|
+
return value
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
return value.padStart(2, '0')
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* Whether a segment part should display zero-padded to two digits (day or month).
|
|
956
|
+
*
|
|
957
|
+
* @param {{ part: import('reka-ui').SegmentPart }} params - Parameters of this method.
|
|
958
|
+
* @returns {boolean}
|
|
959
|
+
*/
|
|
960
|
+
isTwoDigitSegmentPart ({
|
|
961
|
+
part,
|
|
962
|
+
}) {
|
|
963
|
+
return [
|
|
964
|
+
'day',
|
|
965
|
+
'month',
|
|
966
|
+
]
|
|
967
|
+
.includes(part)
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
/**
|
|
972
|
+
* @typedef {import('../../../contexts/BaseFuroContext.js').BaseFuroContextParams & {
|
|
973
|
+
* props: Props
|
|
974
|
+
* componentContext: ComponentContext
|
|
975
|
+
* refHash: {
|
|
976
|
+
* triggerElementRef: import('vue').Ref<HTMLElement | null>
|
|
977
|
+
* internalValueRef: import('vue').Ref<import('@internationalized/date').CalendarDate | null>
|
|
978
|
+
* placeholderRef: import('vue').Ref<import('@internationalized/date').CalendarDate | null>
|
|
979
|
+
* }
|
|
980
|
+
* }} FuroDatePickerContextParams
|
|
981
|
+
*/
|
|
982
|
+
|
|
983
|
+
/**
|
|
984
|
+
* @typedef {Omit<FuroDatePickerContextParams, 'refHash'> & {
|
|
985
|
+
* refHash?: {
|
|
986
|
+
* triggerElementRef: import('vue').Ref<HTMLElement | null>
|
|
987
|
+
* internalValueRef: import('vue').Ref<import('@internationalized/date').CalendarDate | null>
|
|
988
|
+
* placeholderRef: import('vue').Ref<import('@internationalized/date').CalendarDate | null>
|
|
989
|
+
* }
|
|
990
|
+
* }} FuroDatePickerContextFactoryParams
|
|
991
|
+
*/
|
|
992
|
+
|
|
993
|
+
/**
|
|
994
|
+
* @typedef {keyof typeof FuroDatePickerContext.EMIT_EVENT_NAME} EmitEventName
|
|
995
|
+
*/
|
|
996
|
+
|
|
997
|
+
/**
|
|
998
|
+
* @typedef {import('vue').HTMLAttributes & {
|
|
999
|
+
* parcel?: DatePickerParcel | null
|
|
1000
|
+
* triggerParcel?: Record<string, unknown> | null
|
|
1001
|
+
* contentParcel?: Record<string, unknown> | null
|
|
1002
|
+
* }} Props
|
|
1003
|
+
*/
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* @typedef {Record<string, unknown> & {
|
|
1007
|
+
* value?: string | null
|
|
1008
|
+
* invalid?: boolean
|
|
1009
|
+
* placeholder?: string | null
|
|
1010
|
+
* disabled?: boolean
|
|
1011
|
+
* minValue?: string | null
|
|
1012
|
+
* maxValue?: string | null
|
|
1013
|
+
* displayFormat?: string | null
|
|
1014
|
+
* timezone?: string | null
|
|
1015
|
+
* closeOnSelect?: boolean | null
|
|
1016
|
+
* preventDeselect?: boolean | null
|
|
1017
|
+
* locale?: string | null
|
|
1018
|
+
* todayButtonText?: string | null
|
|
1019
|
+
* clearButtonText?: string | null
|
|
1020
|
+
* }} DatePickerParcel
|
|
1021
|
+
*/
|
|
1022
|
+
|
|
1023
|
+
/**
|
|
1024
|
+
* @typedef {import('vue').SetupContext<FuroDatePickerEmitHash>} ComponentContext
|
|
1025
|
+
*/
|
|
1026
|
+
|
|
1027
|
+
/**
|
|
1028
|
+
* @typedef {typeof FuroDatePickerContext.EMIT_EVENT_HASH} FuroDatePickerEmitHash
|
|
1029
|
+
*/
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* @typedef {(
|
|
1033
|
+
* props: Props,
|
|
1034
|
+
* componentContext: ComponentContext
|
|
1035
|
+
* ) => {
|
|
1036
|
+
* context: FuroDatePickerContext
|
|
1037
|
+
* }} FuroDatePickerSetup
|
|
1038
|
+
*/
|