entasis 0.11.0 → 0.12.0
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/README.md +1 -1
- package/dist/attachments/disclosurePanel.svelte.d.ts +84 -0
- package/dist/attachments/disclosurePanel.svelte.js +277 -0
- package/dist/attachments/portal.d.ts +17 -1
- package/dist/attachments/portal.js +39 -2
- package/dist/attachments/spinnerOverlay.svelte.js +12 -0
- package/dist/attachments/transitionSize.d.ts +6 -0
- package/dist/attachments/transitionSize.js +30 -0
- package/dist/components/AIAskUserQuestion/AIAskUserQuestion.svelte +131 -17
- package/dist/components/AIAskUserQuestion/AIAskUserQuestionFileStep.svelte +26 -6
- package/dist/components/AIAskUserQuestion/AIAskUserQuestionFileStep.svelte.d.ts +6 -0
- package/dist/components/AIAskUserQuestion/AIAskUserQuestionFooter.svelte +27 -53
- package/dist/components/AIAskUserQuestion/AIAskUserQuestionFooter.svelte.d.ts +3 -4
- package/dist/components/AIAskUserQuestion/AIAskUserQuestionHeader.svelte +19 -16
- package/dist/components/AIAskUserQuestion/AIAskUserQuestionStep.svelte +180 -21
- package/dist/components/AIAskUserQuestion/AIAskUserQuestionStep.svelte.d.ts +9 -1
- package/dist/components/AIAskUserQuestion/AIAskUserQuestionSummary.svelte +56 -0
- package/dist/components/AIAskUserQuestion/AIAskUserQuestionSummary.svelte.d.ts +4 -0
- package/dist/components/AIAskUserQuestion/aiAskUserQuestion.mcp.d.ts +1 -1
- package/dist/components/AIAskUserQuestion/aiAskUserQuestion.mcp.js +26 -8
- package/dist/components/AIAskUserQuestion/aiAskUserQuestion.props.d.ts +62 -5
- package/dist/components/AIAskUserQuestion/aiAskUserQuestion.theme.d.ts +42 -0
- package/dist/components/AIAskUserQuestion/aiAskUserQuestion.theme.js +53 -12
- package/dist/components/AIAskUserQuestion/aiAskUserQuestionAnswers.d.ts +17 -1
- package/dist/components/AIAskUserQuestion/aiAskUserQuestionAnswers.js +56 -8
- package/dist/components/AIAskUserQuestion/index.d.ts +3 -1
- package/dist/components/AIAskUserQuestion/index.js +2 -0
- package/dist/components/AIAskUserQuestion/schemas.d.ts +44 -0
- package/dist/components/AIAskUserQuestion/schemas.js +10 -3
- package/dist/components/AIChat/AIChat.svelte +10 -0
- package/dist/components/AIChat/AIChat.svelte.d.ts +2 -2
- package/dist/components/AIChat/AIChatComposerSurface.svelte +23 -5
- package/dist/components/AIChat/AIChatComposerSurface.svelte.d.ts +5 -0
- package/dist/components/AIChat/AIChatSkeleton.svelte +29 -37
- package/dist/components/AIChat/AIChatSurface.svelte +30 -2
- package/dist/components/AIChat/AIChatSurface.svelte.d.ts +1 -1
- package/dist/components/AIChat/AIChatThreadSurface.svelte +11 -1
- package/dist/components/AIChat/AIChatThreadSurface.svelte.d.ts +3 -1
- package/dist/components/AIChat/aiChat.mcp.d.ts +1 -1
- package/dist/components/AIChat/aiChat.mcp.js +31 -15
- package/dist/components/AIChat/aiChat.props.d.ts +36 -10
- package/dist/components/AIChat/aiChat.theme.d.ts +9 -0
- package/dist/components/AIChat/aiChat.theme.js +21 -4
- package/dist/components/AIChat/aiChatSkeleton.props.d.ts +5 -0
- package/dist/components/AIChat/index.d.ts +1 -1
- package/dist/components/AIComposer/AIComposer.svelte +102 -5
- package/dist/components/AIComposer/AIComposer.svelte.d.ts +1 -0
- package/dist/components/AIComposer/AIComposerFooter.svelte +54 -12
- package/dist/components/AIComposer/AIComposerFooter.svelte.d.ts +2 -0
- package/dist/components/AIComposer/AIComposerQueue.svelte +8 -3
- package/dist/components/AIComposer/aiComposer.editor.theme.js +13 -2
- package/dist/components/AIComposer/aiComposer.mcp.d.ts +1 -1
- package/dist/components/AIComposer/aiComposer.mcp.js +15 -7
- package/dist/components/AIComposer/aiComposer.props.d.ts +27 -7
- package/dist/components/AIComposer/aiComposer.theme.d.ts +42 -3
- package/dist/components/AIComposer/aiComposer.theme.js +37 -5
- package/dist/components/AIComposer/aiComposerFileController.svelte.d.ts +20 -0
- package/dist/components/AIComposer/aiComposerFileController.svelte.js +75 -9
- package/dist/components/AIComposer/aiComposerSourceAdapter.js +22 -4
- package/dist/components/AIComposer/aiComposerSubmitController.svelte.d.ts +12 -0
- package/dist/components/AIComposer/aiComposerSubmitController.svelte.js +16 -6
- package/dist/components/AIContext/AIContext.svelte +7 -3
- package/dist/components/AIContext/aiContext.mcp.d.ts +1 -1
- package/dist/components/AIContext/aiContext.mcp.js +1 -1
- package/dist/components/AIContext/aiContext.props.d.ts +4 -1
- package/dist/components/AIContext/aiContext.theme.d.ts +3 -0
- package/dist/components/AIContext/aiContext.theme.js +7 -2
- package/dist/components/AIConversation/AIConversation.svelte.d.ts +2 -2
- package/dist/components/AIFilePreview/aiFilePreview.theme.js +1 -1
- package/dist/components/AIMarker/AIMarker.svelte +2 -0
- package/dist/components/AIMarker/aiMarker.mcp.d.ts +1 -1
- package/dist/components/AIMarker/aiMarker.mcp.js +2 -0
- package/dist/components/AIMarker/aiMarker.props.d.ts +3 -0
- package/dist/components/AIMarker/aiMarker.theme.js +2 -2
- package/dist/components/AIMessage/AIMessage.svelte +38 -16
- package/dist/components/AIMessage/aiMessage.mcp.d.ts +1 -1
- package/dist/components/AIMessage/aiMessage.mcp.js +20 -6
- package/dist/components/AIMessage/aiMessage.props.d.ts +18 -2
- package/dist/components/AIMessage/aiMessage.theme.d.ts +51 -6
- package/dist/components/AIMessage/aiMessage.theme.js +91 -32
- package/dist/components/AIMessageActions/AIMessageActions.svelte +19 -9
- package/dist/components/AIMessageActions/aiMessageActions.mcp.d.ts +1 -1
- package/dist/components/AIMessageActions/aiMessageActions.mcp.js +11 -3
- package/dist/components/AIMessageActions/aiMessageActions.theme.js +36 -9
- package/dist/components/AIModelSelector/AIModelSelector.svelte +25 -10
- package/dist/components/AIModelSelector/aiModelSelector.mcp.d.ts +1 -1
- package/dist/components/AIModelSelector/aiModelSelector.mcp.js +1 -1
- package/dist/components/AIModelSelector/aiModelSelector.theme.d.ts +3 -0
- package/dist/components/AIModelSelector/aiModelSelector.theme.js +7 -3
- package/dist/components/AIReasoning/AIReasoning.svelte +135 -38
- package/dist/components/AIReasoning/aiReasoning.mcp.d.ts +1 -1
- package/dist/components/AIReasoning/aiReasoning.mcp.js +11 -5
- package/dist/components/AIReasoning/aiReasoning.props.d.ts +15 -4
- package/dist/components/AIReasoning/aiReasoning.theme.d.ts +45 -0
- package/dist/components/AIReasoning/aiReasoning.theme.js +47 -7
- package/dist/components/AISuggestion/AISuggestion.svelte +2 -1
- package/dist/components/AISuggestion/AISuggestions.svelte +2 -1
- package/dist/components/AISuggestion/aiSuggestion.mcp.d.ts +1 -1
- package/dist/components/AISuggestion/aiSuggestion.mcp.js +8 -1
- package/dist/components/AISuggestion/aiSuggestion.props.d.ts +4 -1
- package/dist/components/AISuggestion/aiSuggestion.theme.js +1 -1
- package/dist/components/AISuggestion/aiSuggestions.props.d.ts +7 -0
- package/dist/components/AIThread/AIThread.svelte +378 -95
- package/dist/components/AIThread/AIThreadAskUserQuestion.svelte +1 -0
- package/dist/components/AIThread/AIThreadItems.svelte +266 -64
- package/dist/components/AIThread/AIThreadItems.svelte.d.ts +7 -3
- package/dist/components/AIThread/AIThreadMarker.svelte +8 -1
- package/dist/components/AIThread/AIThreadMarker.svelte.d.ts +1 -0
- package/dist/components/AIThread/aiThread.mcp.d.ts +1 -1
- package/dist/components/AIThread/aiThread.mcp.js +34 -20
- package/dist/components/AIThread/aiThread.props.d.ts +73 -8
- package/dist/components/AIThread/aiThread.theme.d.ts +78 -0
- package/dist/components/AIThread/aiThread.theme.js +108 -9
- package/dist/components/AIThread/index.d.ts +1 -1
- package/dist/components/AIThread/threadAskUserQuestion.d.ts +4 -1
- package/dist/components/AIThread/threadAskUserQuestion.js +8 -4
- package/dist/components/AIThread/threadRenderItems.d.ts +74 -3
- package/dist/components/AIThread/threadRenderItems.js +265 -77
- package/dist/components/AIThread/threadScrollController.d.ts +0 -8
- package/dist/components/AIThread/threadScrollController.js +2 -39
- package/dist/components/AIThread/threadTools.d.ts +11 -0
- package/dist/components/AIThread/threadTools.js +79 -0
- package/dist/components/AIThreadToc/AIThreadToc.svelte +188 -18
- package/dist/components/AIThreadToc/AIThreadTocPreview.svelte +25 -2
- package/dist/components/AIThreadToc/AIThreadTocPreview.svelte.d.ts +3 -0
- package/dist/components/AIThreadToc/aiThreadToc.d.ts +4 -2
- package/dist/components/AIThreadToc/aiThreadToc.js +17 -5
- package/dist/components/AIThreadToc/aiThreadToc.mcp.d.ts +1 -1
- package/dist/components/AIThreadToc/aiThreadToc.mcp.js +13 -3
- package/dist/components/AIThreadToc/aiThreadToc.props.d.ts +11 -0
- package/dist/components/AIThreadToc/aiThreadToc.theme.d.ts +3 -0
- package/dist/components/AIThreadToc/aiThreadToc.theme.js +15 -6
- package/dist/components/AITool/AITool.svelte +56 -21
- package/dist/components/AITool/AIToolCallList.svelte +79 -29
- package/dist/components/AITool/AIToolCallList.svelte.d.ts +6 -2
- package/dist/components/AITool/AIToolStatusMark.svelte +52 -0
- package/dist/components/AITool/AIToolStatusMark.svelte.d.ts +14 -0
- package/dist/components/AITool/AIToolValueSection.svelte +126 -28
- package/dist/components/AITool/AIToolValueSection.svelte.d.ts +6 -2
- package/dist/components/AITool/AIToolValueTree.svelte +11 -16
- package/dist/components/AITool/AIToolValueTree.svelte.d.ts +2 -3
- package/dist/components/AITool/aiTool.mcp.d.ts +1 -1
- package/dist/components/AITool/aiTool.mcp.js +36 -8
- package/dist/components/AITool/aiTool.props.d.ts +52 -6
- package/dist/components/AITool/aiTool.theme.d.ts +117 -39
- package/dist/components/AITool/aiTool.theme.js +144 -140
- package/dist/components/AITool/aiToolClock.svelte.d.ts +18 -0
- package/dist/components/AITool/aiToolClock.svelte.js +62 -0
- package/dist/components/AITool/aiToolPrimitiveThemes.d.ts +0 -2
- package/dist/components/AITool/aiToolPrimitiveThemes.js +0 -10
- package/dist/components/AITool/index.d.ts +2 -1
- package/dist/components/AITool/index.js +1 -0
- package/dist/components/AITool/toolRendering.d.ts +33 -1
- package/dist/components/AITool/toolRendering.js +179 -15
- package/dist/components/AITool/toolValueTree.d.ts +14 -1
- package/dist/components/AITool/toolValueTree.js +126 -27
- package/dist/components/Accordion/Accordion.svelte +109 -109
- package/dist/components/Accordion/Accordion.svelte.d.ts +0 -1
- package/dist/components/Accordion/AccordionPanel.svelte +64 -0
- package/dist/components/Accordion/AccordionPanel.svelte.d.ts +20 -0
- package/dist/components/Accordion/accordion.attributes.d.ts +24 -0
- package/dist/components/Accordion/accordion.attributes.js +20 -0
- package/dist/components/Accordion/accordion.mcp.d.ts +1 -1
- package/dist/components/Accordion/accordion.mcp.js +78 -22
- package/dist/components/Accordion/accordion.props.d.ts +54 -10
- package/dist/components/Accordion/accordion.theme.d.ts +3 -0
- package/dist/components/Accordion/accordion.theme.js +4 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Accordion/index.js +1 -0
- package/dist/components/AudioPlayer/audioPlayerVolumeControl.slider.theme.d.ts +31 -1
- package/dist/components/Avatar/Avatar.svelte +60 -10
- package/dist/components/Avatar/AvatarGroup.svelte +9 -0
- package/dist/components/Avatar/avatar.mcp.d.ts +1 -1
- package/dist/components/Avatar/avatar.mcp.js +13 -5
- package/dist/components/Avatar/avatar.props.d.ts +28 -1
- package/dist/components/Avatar/avatar.theme.js +3 -3
- package/dist/components/Avatar/index.d.ts +1 -1
- package/dist/components/Breadcrumbs/breadcrumbs.mcp.d.ts +1 -1
- package/dist/components/Breadcrumbs/breadcrumbs.mcp.js +1 -1
- package/dist/components/Button/Button.svelte +35 -15
- package/dist/components/Button/button.mcp.d.ts +1 -1
- package/dist/components/Button/button.mcp.js +8 -4
- package/dist/components/Button/button.props.d.ts +23 -8
- package/dist/components/Button/button.theme.d.ts +12 -0
- package/dist/components/Button/button.theme.js +17 -4
- package/dist/components/ButtonGroup/buttonGroup.mcp.d.ts +1 -1
- package/dist/components/ButtonGroup/buttonGroup.mcp.js +1 -1
- package/dist/components/ButtonGroup/buttonGroup.props.d.ts +4 -1
- package/dist/components/Collapsible/Collapsible.svelte +125 -19
- package/dist/components/Collapsible/collapsible.attributes.d.ts +21 -0
- package/dist/components/Collapsible/collapsible.attributes.js +17 -0
- package/dist/components/Collapsible/collapsible.mcp.d.ts +1 -1
- package/dist/components/Collapsible/collapsible.mcp.js +62 -12
- package/dist/components/Collapsible/collapsible.props.d.ts +39 -8
- package/dist/components/Collapsible/collapsible.theme.js +3 -1
- package/dist/components/Collapsible/index.d.ts +1 -0
- package/dist/components/Collapsible/index.js +1 -0
- package/dist/components/Command/Command.svelte +56 -14
- package/dist/components/Command/command.mcp.d.ts +1 -1
- package/dist/components/Command/command.mcp.js +12 -6
- package/dist/components/Command/command.props.d.ts +39 -6
- package/dist/components/Command/command.state.svelte.d.ts +40 -11
- package/dist/components/Command/command.state.svelte.js +75 -28
- package/dist/components/Command/command.theme.js +4 -3
- package/dist/components/Confirmation/Confirmation.svelte +72 -31
- package/dist/components/Confirmation/confirmation.mcp.d.ts +1 -1
- package/dist/components/Confirmation/confirmation.mcp.js +5 -4
- package/dist/components/ContextMenu/ContextMenu.svelte +126 -16
- package/dist/components/ContextMenu/contextMenu.mcp.d.ts +1 -1
- package/dist/components/ContextMenu/contextMenu.mcp.js +10 -7
- package/dist/components/ContextMenu/contextMenu.props.d.ts +13 -4
- package/dist/components/ContextMenu/contextMenu.theme.d.ts +3 -3
- package/dist/components/ContextMenu/contextMenu.theme.js +3 -2
- package/dist/components/DataTable/DataTable.svelte +4 -9
- package/dist/components/DataTable/DataTableEditor.svelte +5 -0
- package/dist/components/DataTable/DataTableFilter.svelte +1 -0
- package/dist/components/DataTable/DataTableToolbar.svelte +1 -0
- package/dist/components/DataTable/dataTable.mcp.d.ts +1 -1
- package/dist/components/DataTable/dataTable.mcp.js +4 -2
- package/dist/components/DataTable/dataTable.theme.d.ts +0 -3
- package/dist/components/DataTable/dataTable.theme.js +9 -6
- package/dist/components/Dialog/Dialog.svelte +120 -35
- package/dist/components/Dialog/Dialog.svelte.d.ts +1 -1
- package/dist/components/Dialog/DialogBackdrop.svelte +21 -1
- package/dist/components/Dialog/dialog.api.d.ts +65 -0
- package/dist/components/Dialog/dialog.api.js +1 -0
- package/dist/components/Dialog/dialog.attributes.d.ts +23 -0
- package/dist/components/Dialog/dialog.attributes.js +19 -0
- package/dist/components/Dialog/dialog.indent.d.ts +6 -0
- package/dist/components/Dialog/dialog.indent.js +16 -0
- package/dist/components/Dialog/dialog.mcp.d.ts +1 -1
- package/dist/components/Dialog/dialog.mcp.js +195 -22
- package/dist/components/Dialog/dialog.props.d.ts +102 -19
- package/dist/components/Dialog/dialog.snap.d.ts +40 -0
- package/dist/components/Dialog/dialog.snap.js +78 -0
- package/dist/components/Dialog/dialog.state.svelte.d.ts +122 -10
- package/dist/components/Dialog/dialog.state.svelte.js +525 -66
- package/dist/components/Dialog/dialog.theme.d.ts +48 -0
- package/dist/components/Dialog/dialog.theme.js +32 -9
- package/dist/components/Dialog/index.d.ts +4 -1
- package/dist/components/Dialog/index.js +1 -0
- package/dist/components/DocumentViewer/DocumentSearchControl.svelte +5 -3
- package/dist/components/DocumentViewer/documentOutput.js +2 -1
- package/dist/components/FloatingWindow/FloatingWindow.svelte +20 -32
- package/dist/components/FloatingWindow/FloatingWindow.svelte.d.ts +1 -1
- package/dist/components/FloatingWindow/floatingWindow.mcp.d.ts +1 -1
- package/dist/components/FloatingWindow/floatingWindow.mcp.js +3 -3
- package/dist/components/FloatingWindow/floatingWindow.props.d.ts +9 -4
- package/dist/components/FloatingWindow/floatingWindow.state.svelte.d.ts +8 -2
- package/dist/components/FloatingWindow/floatingWindow.state.svelte.js +18 -7
- package/dist/components/Form/Ask/Ask.svelte +9 -13
- package/dist/components/Form/Ask/ask.mcp.d.ts +1 -1
- package/dist/components/Form/Ask/ask.mcp.js +1 -1
- package/dist/components/Form/Ask/ask.props.d.ts +1 -1
- package/dist/components/Form/Autocomplete/Autocomplete.svelte +418 -0
- package/dist/components/Form/Autocomplete/Autocomplete.svelte.d.ts +4 -0
- package/dist/components/Form/Autocomplete/autocomplete.items.d.ts +30 -0
- package/dist/components/Form/Autocomplete/autocomplete.items.js +64 -0
- package/dist/components/Form/Autocomplete/autocomplete.mcp.d.ts +1 -0
- package/dist/components/Form/Autocomplete/autocomplete.mcp.js +134 -0
- package/dist/components/Form/Autocomplete/autocomplete.props.d.ts +146 -0
- package/dist/components/Form/Autocomplete/autocomplete.props.js +1 -0
- package/dist/components/Form/Autocomplete/autocomplete.theme.d.ts +213 -0
- package/dist/components/Form/Autocomplete/autocomplete.theme.js +119 -0
- package/dist/components/Form/Autocomplete/index.d.ts +3 -0
- package/dist/components/Form/Autocomplete/index.js +2 -0
- package/dist/components/Form/Calendar/CalendarInput.svelte +9 -0
- package/dist/components/Form/Calendar/CalendarMonthYearPicker.svelte +3 -0
- package/dist/components/Form/Calendar/CalendarPrimitive.svelte +5 -0
- package/dist/components/Form/Calendar/calendar.mcp.d.ts +1 -1
- package/dist/components/Form/Calendar/calendar.mcp.js +2 -1
- package/dist/components/Form/Calendar/calendarInput.props.d.ts +2 -0
- package/dist/components/Form/Calendar/useCalendar.svelte.d.ts +3 -0
- package/dist/components/Form/Calendar/useCalendar.svelte.js +3 -0
- package/dist/components/Form/Checkbox/Checkbox.svelte +17 -2
- package/dist/components/Form/Checkbox/checkbox.mcp.d.ts +1 -1
- package/dist/components/Form/Checkbox/checkbox.mcp.js +11 -1
- package/dist/components/Form/Checkbox/checkbox.props.d.ts +12 -1
- package/dist/components/Form/CheckboxesInput/CheckboxLine.svelte +69 -32
- package/dist/components/Form/CheckboxesInput/CheckboxLine.svelte.d.ts +10 -2
- package/dist/components/Form/CheckboxesInput/CheckboxesInput.svelte +123 -74
- package/dist/components/Form/CheckboxesInput/CheckboxesInput.svelte.d.ts +12 -12
- package/dist/components/Form/CheckboxesInput/checkboxesInput.mcp.d.ts +1 -1
- package/dist/components/Form/CheckboxesInput/checkboxesInput.mcp.js +11 -7
- package/dist/components/Form/CheckboxesInput/checkboxesInput.props.d.ts +25 -9
- package/dist/components/Form/CheckboxesInput/checkboxesInput.theme.d.ts +12 -0
- package/dist/components/Form/CheckboxesInput/checkboxesInput.theme.js +9 -4
- package/dist/components/Form/CheckboxesInput/choiceEnter.d.ts +11 -0
- package/dist/components/Form/CheckboxesInput/choiceEnter.js +27 -0
- package/dist/components/Form/ColorInput/ColorInput.svelte +12 -3
- package/dist/components/Form/ColorInput/colorInput.mcp.d.ts +1 -1
- package/dist/components/Form/ColorInput/colorInput.mcp.js +1 -0
- package/dist/components/Form/ColorPicker/ColorPicker.svelte +11 -2
- package/dist/components/Form/ColorPicker/ColorPickerInput.svelte +9 -0
- package/dist/components/Form/ColorPicker/colorPicker.mcp.d.ts +1 -1
- package/dist/components/Form/ColorPicker/colorPicker.mcp.js +1 -0
- package/dist/components/Form/ColorPicker/colorPicker.props.d.ts +2 -0
- package/dist/components/Form/ColorPicker/colorPicker.state.svelte.d.ts +4 -0
- package/dist/components/Form/ColorPicker/colorPicker.state.svelte.js +12 -8
- package/dist/components/Form/Combobox/Combobox.svelte +145 -185
- package/dist/components/Form/Combobox/Combobox.svelte.d.ts +1 -1
- package/dist/components/Form/Combobox/ComboboxPopup.svelte +128 -0
- package/dist/components/Form/Combobox/ComboboxPopup.svelte.d.ts +28 -0
- package/dist/components/Form/Combobox/combobox.attributes.d.ts +34 -0
- package/dist/components/Form/Combobox/combobox.attributes.js +25 -0
- package/dist/components/Form/Combobox/combobox.items.d.ts +28 -0
- package/dist/components/Form/Combobox/combobox.items.js +68 -0
- package/dist/components/Form/Combobox/combobox.mcp.d.ts +1 -1
- package/dist/components/Form/Combobox/combobox.mcp.js +104 -13
- package/dist/components/Form/Combobox/combobox.props.d.ts +113 -19
- package/dist/components/Form/Combobox/combobox.state.svelte.d.ts +137 -0
- package/dist/components/Form/Combobox/combobox.state.svelte.js +375 -0
- package/dist/components/Form/Combobox/combobox.theme.d.ts +63 -0
- package/dist/components/Form/Combobox/combobox.theme.js +37 -1
- package/dist/components/Form/Combobox/index.d.ts +2 -1
- package/dist/components/Form/Combobox/index.js +1 -0
- package/dist/components/Form/DateInput/DateInput.svelte +11 -3
- package/dist/components/Form/DateInput/dateInput.mcp.d.ts +1 -1
- package/dist/components/Form/DateInput/dateInput.mcp.js +5 -0
- package/dist/components/Form/DateSelector/DateSelector.svelte +5 -2
- package/dist/components/Form/DateSelector/DateSelectorInput.svelte +9 -0
- package/dist/components/Form/DateSelector/dateSelector.mcp.d.ts +1 -1
- package/dist/components/Form/DateSelector/dateSelector.mcp.js +2 -2
- package/dist/components/Form/DateSelector/dateSelector.props.d.ts +2 -0
- package/dist/components/Form/Field/Field.svelte +256 -30
- package/dist/components/Form/Field/Field.svelte.d.ts +9 -0
- package/dist/components/Form/Field/FieldGroup.svelte +29 -0
- package/dist/components/Form/Field/FieldGroup.svelte.d.ts +11 -0
- package/dist/components/Form/Field/FieldHiddenInputs.svelte +187 -0
- package/dist/components/Form/Field/FieldHiddenInputs.svelte.d.ts +26 -0
- package/dist/components/Form/Field/field.d.ts +64 -8
- package/dist/components/Form/Field/field.mcp.d.ts +1 -1
- package/dist/components/Form/Field/field.mcp.js +158 -18
- package/dist/components/Form/Field/field.messages.d.ts +47 -0
- package/dist/components/Form/Field/field.messages.js +64 -0
- package/dist/components/Form/Field/field.state.svelte.d.ts +109 -3
- package/dist/components/Form/Field/field.state.svelte.js +508 -16
- package/dist/components/Form/Field/field.theme.d.ts +46 -0
- package/dist/components/Form/Field/field.theme.js +33 -0
- package/dist/components/Form/Field/fieldHiddenInputs.props.d.ts +61 -0
- package/dist/components/Form/Field/fieldHiddenInputs.props.js +1 -0
- package/dist/components/Form/Field/fieldNativeForm.svelte.d.ts +14 -0
- package/dist/components/Form/Field/fieldNativeForm.svelte.js +113 -0
- package/dist/components/Form/Field/index.d.ts +5 -2
- package/dist/components/Form/Field/index.js +1 -0
- package/dist/components/Form/Field/schemas.js +7 -2
- package/dist/components/Form/File/FileInput.svelte +24 -3
- package/dist/components/Form/File/fileInput.mcp.d.ts +1 -1
- package/dist/components/Form/File/fileInput.mcp.js +1 -0
- package/dist/components/Form/Form/Form.svelte +47 -14
- package/dist/components/Form/Form/FormActions.svelte +3 -1
- package/dist/components/Form/Form/FormActions.svelte.d.ts +42 -2
- package/dist/components/Form/Form/FormFieldRenderer.svelte +40 -2
- package/dist/components/Form/Form/FormInputRenderer.svelte +7 -0
- package/dist/components/Form/Form/form.d.ts +35 -6
- package/dist/components/Form/Form/form.mcp.d.ts +1 -1
- package/dist/components/Form/Form/form.mcp.js +113 -13
- package/dist/components/Form/Form/form.props.d.ts +32 -1
- package/dist/components/Form/Form/form.registry.d.ts +2 -2
- package/dist/components/Form/Form/form.registry.js +1 -4
- package/dist/components/Form/Form/form.state.svelte.d.ts +1138 -413
- package/dist/components/Form/Form/form.state.svelte.js +319 -26
- package/dist/components/Form/Form/index.d.ts +3 -1
- package/dist/components/Form/Form/visibility.d.ts +3096 -1831
- package/dist/components/Form/KeyValueInput/KeyValueInput.svelte +22 -10
- package/dist/components/Form/KeyValueInput/keyValueInput.mcp.d.ts +1 -1
- package/dist/components/Form/KeyValueInput/keyValueInput.mcp.js +1 -0
- package/dist/components/Form/MultiStepForm/MultiStepForm.svelte +12 -5
- package/dist/components/Form/MultiStepForm/multiStepForm.mcp.d.ts +1 -1
- package/dist/components/Form/MultiStepForm/multiStepForm.mcp.js +5 -3
- package/dist/components/Form/MultiStepForm/multiStepForm.props.d.ts +5 -0
- package/dist/components/Form/MultiStepForm/multiStepForm.state.svelte.d.ts +1022 -408
- package/dist/components/Form/MultiStepForm/multiStepForm.state.svelte.js +48 -24
- package/dist/components/Form/NumberInput/NumberInput.svelte +365 -46
- package/dist/components/Form/NumberInput/index.d.ts +1 -1
- package/dist/components/Form/NumberInput/numberInput.mcp.d.ts +1 -1
- package/dist/components/Form/NumberInput/numberInput.mcp.js +55 -30
- package/dist/components/Form/NumberInput/numberInput.props.d.ts +64 -4
- package/dist/components/Form/PasswordInput/Password.svelte +28 -1
- package/dist/components/Form/PasswordInput/index.d.ts +1 -1
- package/dist/components/Form/PasswordInput/passwordInput.mcp.d.ts +1 -1
- package/dist/components/Form/PasswordInput/passwordInput.mcp.js +20 -2
- package/dist/components/Form/PasswordInput/passwordInput.props.d.ts +23 -0
- package/dist/components/Form/PhoneInput/PhoneInput.svelte +11 -4
- package/dist/components/Form/PhoneInput/PhoneInputCountryPicker.svelte +47 -21
- package/dist/components/Form/PhoneInput/phoneInput-cdn.js +2 -1
- package/dist/components/Form/PhoneInput/phoneInput.mcp.d.ts +1 -1
- package/dist/components/Form/PhoneInput/phoneInput.mcp.js +6 -2
- package/dist/components/Form/PhoneInput/phoneInputCountry.d.ts +9 -3
- package/dist/components/Form/PhoneInput/phoneInputCountry.js +34 -24
- package/dist/components/Form/PinInput/PinInput.svelte +44 -9
- package/dist/components/Form/PinInput/PinInputCells.svelte +22 -1
- package/dist/components/Form/PinInput/PinInputCells.svelte.d.ts +1 -0
- package/dist/components/Form/PinInput/index.d.ts +1 -1
- package/dist/components/Form/PinInput/pinInput.mcp.d.ts +1 -1
- package/dist/components/Form/PinInput/pinInput.mcp.js +29 -6
- package/dist/components/Form/PinInput/pinInput.props.d.ts +38 -4
- package/dist/components/Form/PinInput/pinInput.state.svelte.d.ts +41 -0
- package/dist/components/Form/PinInput/pinInput.state.svelte.js +227 -24
- package/dist/components/Form/PinInput/pinInput.theme.d.ts +39 -3
- package/dist/components/Form/PinInput/pinInput.theme.js +27 -1
- package/dist/components/Form/RadioInput/RadioInput.svelte +94 -32
- package/dist/components/Form/RadioInput/RadioInput.svelte.d.ts +12 -12
- package/dist/components/Form/RadioInput/radioInput.mcp.d.ts +1 -1
- package/dist/components/Form/RadioInput/radioInput.mcp.js +12 -9
- package/dist/components/Form/RadioInput/radioInput.props.d.ts +22 -6
- package/dist/components/Form/RadioInput/radioInput.theme.d.ts +12 -0
- package/dist/components/Form/RadioInput/radioInput.theme.js +10 -5
- package/dist/components/Form/RatingInput/RatingInput.svelte +13 -4
- package/dist/components/Form/RatingInput/ratingInput.mcp.d.ts +1 -1
- package/dist/components/Form/RatingInput/ratingInput.mcp.js +3 -3
- package/dist/components/Form/RatingInput/ratingInput.props.d.ts +1 -1
- package/dist/components/Form/Select/Select.svelte +186 -48
- package/dist/components/Form/Select/Select.svelte.d.ts +23 -2
- package/dist/components/Form/Select/SelectOptionRow.svelte +69 -0
- package/dist/components/Form/Select/SelectOptionRow.svelte.d.ts +18 -0
- package/dist/components/Form/Select/index.d.ts +2 -1
- package/dist/components/Form/Select/index.js +1 -0
- package/dist/components/Form/Select/select.align.d.ts +5 -0
- package/dist/components/Form/Select/select.align.js +19 -5
- package/dist/components/Form/Select/select.attributes.d.ts +36 -0
- package/dist/components/Form/Select/select.attributes.js +27 -0
- package/dist/components/Form/Select/select.mcp.d.ts +1 -1
- package/dist/components/Form/Select/select.mcp.js +103 -18
- package/dist/components/Form/Select/select.props.d.ts +87 -10
- package/dist/components/Form/Select/select.state.svelte.d.ts +108 -17
- package/dist/components/Form/Select/select.state.svelte.js +354 -59
- package/dist/components/Form/Select/select.theme.d.ts +21 -0
- package/dist/components/Form/Select/select.theme.js +22 -0
- package/dist/components/Form/Slider/Slider.svelte +54 -14
- package/dist/components/Form/Slider/SliderMarks.svelte +1 -1
- package/dist/components/Form/Slider/SliderThumb.svelte +49 -19
- package/dist/components/Form/Slider/SliderThumb.svelte.d.ts +8 -2
- package/dist/components/Form/Slider/SliderTrack.svelte +33 -12
- package/dist/components/Form/Slider/SliderTrack.svelte.d.ts +6 -2
- package/dist/components/Form/Slider/index.d.ts +1 -1
- package/dist/components/Form/Slider/slider.mcp.d.ts +1 -1
- package/dist/components/Form/Slider/slider.mcp.js +55 -11
- package/dist/components/Form/Slider/slider.props.d.ts +35 -2
- package/dist/components/Form/Slider/slider.state.svelte.d.ts +66 -5
- package/dist/components/Form/Slider/slider.state.svelte.js +273 -49
- package/dist/components/Form/Slider/slider.theme.d.ts +36 -0
- package/dist/components/Form/Slider/slider.theme.js +35 -17
- package/dist/components/Form/Switch/Switch.svelte +61 -38
- package/dist/components/Form/Switch/switch.mcp.d.ts +1 -1
- package/dist/components/Form/Switch/switch.mcp.js +25 -5
- package/dist/components/Form/Switch/switch.props.d.ts +14 -1
- package/dist/components/Form/Switch/switch.theme.d.ts +12 -0
- package/dist/components/Form/Switch/switch.theme.js +8 -3
- package/dist/components/Form/TagGroup/TagGroup.svelte +8 -0
- package/dist/components/Form/TagGroup/tagGroup.mcp.d.ts +1 -1
- package/dist/components/Form/TagGroup/tagGroup.mcp.js +1 -0
- package/dist/components/Form/TagsInput/TagsInput.svelte +277 -275
- package/dist/components/Form/TagsInput/TagsInput.svelte.d.ts +1 -1
- package/dist/components/Form/TagsInput/tagsInput.mcp.d.ts +1 -1
- package/dist/components/Form/TagsInput/tagsInput.mcp.js +31 -11
- package/dist/components/Form/TagsInput/tagsInput.props.d.ts +6 -26
- package/dist/components/Form/TagsInput/tagsInput.theme.d.ts +63 -0
- package/dist/components/Form/TagsInput/tagsInput.theme.js +37 -1
- package/dist/components/Form/TextArea/TextArea.svelte +8 -0
- package/dist/components/Form/TextArea/textArea.mcp.d.ts +1 -1
- package/dist/components/Form/TextArea/textArea.mcp.js +1 -0
- package/dist/components/Form/TextInput/TextInput.svelte +8 -1
- package/dist/components/Form/TextInput/textInput.mcp.d.ts +1 -1
- package/dist/components/Form/TextInput/textInput.mcp.js +5 -0
- package/dist/components/Form/TimeInput/TimeInput.svelte +9 -1
- package/dist/components/Form/TimeInput/timeInput.mcp.d.ts +1 -1
- package/dist/components/Form/TimeInput/timeInput.mcp.js +31 -0
- package/dist/components/Form/VoiceInput/VoiceInput.svelte +10 -2
- package/dist/components/Form/VoiceInput/voiceInput.mcp.d.ts +1 -1
- package/dist/components/Form/VoiceInput/voiceInput.mcp.js +1 -0
- package/dist/components/GanttChart/GanttDependencyControl.svelte +4 -4
- package/dist/components/HoverCard/HoverCard.svelte +100 -10
- package/dist/components/HoverCard/hoverCard.attributes.d.ts +33 -0
- package/dist/components/HoverCard/hoverCard.attributes.js +24 -0
- package/dist/components/HoverCard/hoverCard.mcp.d.ts +1 -1
- package/dist/components/HoverCard/hoverCard.mcp.js +61 -2
- package/dist/components/HoverCard/hoverCard.props.d.ts +19 -0
- package/dist/components/HoverCard/hoverCard.theme.d.ts +12 -0
- package/dist/components/HoverCard/hoverCard.theme.js +9 -2
- package/dist/components/HoverCard/index.d.ts +1 -0
- package/dist/components/HoverCard/index.js +1 -0
- package/dist/components/ImageGallery/imageGallery.state.svelte.d.ts +1 -1
- package/dist/components/ImageZoom/imageZoom.lightbox.js +40 -6
- package/dist/components/ImageZoom/imageZoom.mcp.d.ts +1 -1
- package/dist/components/ImageZoom/imageZoom.mcp.js +3 -3
- package/dist/components/ImageZoom/imageZoom.props.d.ts +10 -4
- package/dist/components/ImageZoom/imageZoom.state.svelte.d.ts +16 -4
- package/dist/components/ImageZoom/imageZoom.state.svelte.js +38 -9
- package/dist/components/Kanban/kanban.theme.js +7 -3
- package/dist/components/Layout/layoutSpacing.d.ts +2 -2
- package/dist/components/LinkPreview/LinkPreview.svelte +7 -1
- package/dist/components/LinkPreview/linkPreview.mcp.d.ts +1 -1
- package/dist/components/LinkPreview/linkPreview.mcp.js +4 -1
- package/dist/components/LinkPreview/linkPreview.props.d.ts +15 -0
- package/dist/components/LinkPreview/linkPreview.theme.d.ts +12 -0
- package/dist/components/LinkPreview/linkPreview.theme.js +9 -2
- package/dist/components/Map/maplibre-cdn.js +3 -2
- package/dist/components/Markdown/markdown.mcp.d.ts +1 -1
- package/dist/components/Markdown/markdown.mcp.js +2 -1
- package/dist/components/Markdown/markdown.theme.js +18 -9
- package/dist/components/MediaVolume/MediaVolumeControl.svelte +4 -3
- package/dist/components/Menu/Menu.svelte +3 -3
- package/dist/components/Menu/Menu.svelte.d.ts +1 -1
- package/dist/components/Menu/MenuCheckboxItem.svelte +87 -0
- package/dist/components/Menu/MenuCheckboxItem.svelte.d.ts +16 -0
- package/dist/components/Menu/MenuFloating.svelte +421 -74
- package/dist/components/Menu/MenuFloating.svelte.d.ts +1 -1
- package/dist/components/Menu/MenuMirroredIcon.svelte +9 -0
- package/dist/components/Menu/MenuMirroredIcon.svelte.d.ts +7 -0
- package/dist/components/Menu/MenuRadioGroup.svelte +102 -0
- package/dist/components/Menu/MenuRadioGroup.svelte.d.ts +18 -0
- package/dist/components/Menu/MenuSearchField.svelte +54 -0
- package/dist/components/Menu/MenuSearchField.svelte.d.ts +20 -0
- package/dist/components/Menu/MenuStacked.svelte +404 -158
- package/dist/components/Menu/MenuStacked.svelte.d.ts +1 -1
- package/dist/components/Menu/MenuStackedBackHeader.svelte +6 -1
- package/dist/components/Menu/index.d.ts +2 -1
- package/dist/components/Menu/index.js +1 -0
- package/dist/components/Menu/menu.attributes.d.ts +37 -0
- package/dist/components/Menu/menu.attributes.js +28 -0
- package/dist/components/Menu/menu.filter.svelte.d.ts +52 -0
- package/dist/components/Menu/menu.filter.svelte.js +143 -0
- package/dist/components/Menu/menu.mcp.d.ts +1 -1
- package/dist/components/Menu/menu.mcp.js +227 -17
- package/dist/components/Menu/menu.platform.d.ts +5 -0
- package/dist/components/Menu/menu.platform.js +11 -0
- package/dist/components/Menu/menu.props.d.ts +172 -9
- package/dist/components/Menu/menu.theme.d.ts +147 -0
- package/dist/components/Menu/menu.theme.js +101 -0
- package/dist/components/Menu/menuTree.d.ts +35 -1
- package/dist/components/Menu/menuTree.js +158 -1
- package/dist/components/MenuBar/menuBar.mcp.d.ts +1 -1
- package/dist/components/MenuBar/menuBar.mcp.js +4 -2
- package/dist/components/MenuBar/menuBar.state.svelte.js +28 -10
- package/dist/components/MenuOption/MenuOption.svelte +5 -1
- package/dist/components/MenuOption/menuOption.mcp.d.ts +1 -1
- package/dist/components/MenuOption/menuOption.mcp.js +8 -0
- package/dist/components/MenuOption/menuOption.props.d.ts +12 -0
- package/dist/components/MenuOption/menuOption.theme.d.ts +18 -0
- package/dist/components/MenuOption/menuOption.theme.js +24 -4
- package/dist/components/Mermaid/mermaid.mcp.d.ts +1 -1
- package/dist/components/Mermaid/mermaid.mcp.js +8 -8
- package/dist/components/Mermaid/mermaid.props.d.ts +3 -4
- package/dist/components/Mermaid/mermaid.state.svelte.d.ts +20 -19
- package/dist/components/Mermaid/mermaid.state.svelte.js +80 -243
- package/dist/components/Mermaid/mermaid.theme.js +26 -1
- package/dist/components/MetadataList/MetadataList.svelte.d.ts +1 -1
- package/dist/components/Meter/Meter.svelte +110 -24
- package/dist/components/Meter/Meter.svelte.d.ts +12 -12
- package/dist/components/Meter/meter.mcp.d.ts +1 -1
- package/dist/components/Meter/meter.mcp.js +23 -37
- package/dist/components/Meter/meter.props.d.ts +36 -44
- package/dist/components/NavigationMenu/NavigationMenu.svelte +181 -0
- package/dist/components/NavigationMenu/NavigationMenu.svelte.d.ts +25 -0
- package/dist/components/NavigationMenu/NavigationMenuContent.svelte +141 -0
- package/dist/components/NavigationMenu/NavigationMenuContent.svelte.d.ts +13 -0
- package/dist/components/NavigationMenu/NavigationMenuTrigger.svelte +75 -0
- package/dist/components/NavigationMenu/NavigationMenuTrigger.svelte.d.ts +13 -0
- package/dist/components/NavigationMenu/index.d.ts +4 -0
- package/dist/components/NavigationMenu/index.js +3 -0
- package/dist/components/NavigationMenu/navigationMenu.attributes.d.ts +24 -0
- package/dist/components/NavigationMenu/navigationMenu.attributes.js +21 -0
- package/dist/components/NavigationMenu/navigationMenu.mcp.d.ts +1 -0
- package/dist/components/NavigationMenu/navigationMenu.mcp.js +138 -0
- package/dist/components/NavigationMenu/navigationMenu.props.d.ts +129 -0
- package/dist/components/NavigationMenu/navigationMenu.props.js +1 -0
- package/dist/components/NavigationMenu/navigationMenu.state.svelte.d.ts +163 -0
- package/dist/components/NavigationMenu/navigationMenu.state.svelte.js +721 -0
- package/dist/components/NavigationMenu/navigationMenu.theme.d.ts +326 -0
- package/dist/components/NavigationMenu/navigationMenu.theme.js +239 -0
- package/dist/components/Overlay/Overlay.svelte +19 -30
- package/dist/components/Overlay/index.d.ts +1 -0
- package/dist/components/Overlay/index.js +1 -0
- package/dist/components/Overlay/overlay.attributes.d.ts +16 -0
- package/dist/components/Overlay/overlay.attributes.js +14 -0
- package/dist/components/Overlay/overlay.mcp.d.ts +1 -1
- package/dist/components/Overlay/overlay.mcp.js +21 -3
- package/dist/components/Overlay/overlay.props.d.ts +8 -4
- package/dist/components/Popover/Popover.svelte +163 -52
- package/dist/components/Popover/Popover.svelte.d.ts +23 -2
- package/dist/components/Popover/PopoverSession.svelte +12 -0
- package/dist/components/Popover/PopoverSession.svelte.d.ts +7 -0
- package/dist/components/Popover/index.d.ts +10 -2
- package/dist/components/Popover/index.js +4 -1
- package/dist/components/Popover/popover.api.d.ts +83 -0
- package/dist/components/Popover/popover.api.js +1 -0
- package/dist/components/Popover/popover.attributes.d.ts +32 -0
- package/dist/components/Popover/popover.attributes.js +28 -0
- package/dist/components/Popover/popover.claims.d.ts +19 -0
- package/dist/components/Popover/popover.claims.js +45 -0
- package/dist/components/Popover/popover.mcp.d.ts +1 -1
- package/dist/components/Popover/popover.mcp.js +163 -31
- package/dist/components/Popover/popover.position.d.ts +226 -0
- package/dist/components/Popover/popover.position.js +402 -0
- package/dist/components/Popover/popover.props.d.ts +179 -24
- package/dist/components/Popover/popover.state.svelte.d.ts +169 -37
- package/dist/components/Popover/popover.state.svelte.js +1034 -194
- package/dist/components/Popover/popover.theme.d.ts +15 -0
- package/dist/components/Popover/popover.theme.js +27 -2
- package/dist/components/PopupMenu/PopupMenu.svelte +193 -22
- package/dist/components/PopupMenu/PopupMenu.svelte.d.ts +2 -2
- package/dist/components/PopupMenu/popupMenu.context.d.ts +42 -0
- package/dist/components/PopupMenu/popupMenu.context.js +52 -0
- package/dist/components/PopupMenu/popupMenu.mcp.d.ts +1 -1
- package/dist/components/PopupMenu/popupMenu.mcp.js +46 -6
- package/dist/components/PopupMenu/popupMenu.props.d.ts +29 -2
- package/dist/components/Progress/Progress.svelte +160 -0
- package/dist/components/Progress/Progress.svelte.d.ts +4 -0
- package/dist/components/Progress/index.d.ts +3 -0
- package/dist/components/Progress/index.js +2 -0
- package/dist/components/Progress/progress.mcp.d.ts +1 -0
- package/dist/components/Progress/progress.mcp.js +101 -0
- package/dist/components/Progress/progress.props.d.ts +79 -0
- package/dist/components/Progress/progress.props.js +1 -0
- package/dist/components/Progress/progress.theme.d.ts +129 -0
- package/dist/components/Progress/progress.theme.js +83 -0
- package/dist/components/ProgressCircle/ProgressCircle.svelte +51 -6
- package/dist/components/ProgressCircle/progressCircle.mcp.d.ts +1 -1
- package/dist/components/ProgressCircle/progressCircle.mcp.js +18 -4
- package/dist/components/ProgressCircle/progressCircle.props.d.ts +32 -2
- package/dist/components/ProgressCircle/progressCircle.theme.d.ts +15 -3
- package/dist/components/ProgressCircle/progressCircle.theme.js +7 -2
- package/dist/components/RichTextInput/RichTextInput.svelte +19 -1
- package/dist/components/RichTextInput/RichTextInputChrome.svelte +5 -1
- package/dist/components/RichTextInput/RichTextInputChrome.svelte.d.ts +2 -0
- package/dist/components/RichTextInput/RichTextInputViewport.svelte +3 -1
- package/dist/components/RichTextInput/RichTextInputViewport.svelte.d.ts +1 -0
- package/dist/components/RichTextInput/richTextInput.mcp.d.ts +1 -1
- package/dist/components/RichTextInput/richTextInput.mcp.js +1 -0
- package/dist/components/RichTextInput/suggestions.js +2 -0
- package/dist/components/ScrollArea/ScrollArea.svelte +166 -27
- package/dist/components/ScrollArea/index.d.ts +2 -1
- package/dist/components/ScrollArea/index.js +1 -0
- package/dist/components/ScrollArea/scrollArea.attributes.d.ts +25 -0
- package/dist/components/ScrollArea/scrollArea.attributes.js +21 -0
- package/dist/components/ScrollArea/scrollArea.mcp.d.ts +1 -1
- package/dist/components/ScrollArea/scrollArea.mcp.js +47 -3
- package/dist/components/ScrollArea/scrollArea.props.d.ts +33 -6
- package/dist/components/ScrollArea/scrollArea.svelte.d.ts +56 -12
- package/dist/components/ScrollArea/scrollArea.svelte.js +281 -71
- package/dist/components/ScrollArea/scrollArea.theme.js +5 -2
- package/dist/components/SegmentedControl/SegmentedControl.svelte +4 -3
- package/dist/components/SegmentedControl/segmentedControl.mcp.d.ts +1 -1
- package/dist/components/SegmentedControl/segmentedControl.mcp.js +3 -2
- package/dist/components/SelectionMenu/SelectionMenu.svelte +4 -2
- package/dist/components/Sidebar/SidebarAction.svelte +13 -3
- package/dist/components/Sidebar/SidebarAction.svelte.d.ts +2 -1
- package/dist/components/Sidebar/SidebarActivityBar.svelte +14 -7
- package/dist/components/Sidebar/SidebarFlyout.svelte +97 -0
- package/dist/components/Sidebar/SidebarFlyout.svelte.d.ts +32 -0
- package/dist/components/Sidebar/SidebarGroup.svelte +39 -15
- package/dist/components/Sidebar/SidebarMenuButton.svelte +6 -3
- package/dist/components/Sidebar/SidebarMenuItem.svelte +134 -31
- package/dist/components/Sidebar/SidebarMenuSubItem.svelte +30 -14
- package/dist/components/Sidebar/SidebarTreeNode.svelte +41 -61
- package/dist/components/Sidebar/index.d.ts +1 -0
- package/dist/components/Sidebar/index.js +1 -0
- package/dist/components/Sidebar/sidebar-position.d.ts +37 -2
- package/dist/components/Sidebar/sidebar-position.js +31 -2
- package/dist/components/Sidebar/sidebar.attributes.d.ts +33 -0
- package/dist/components/Sidebar/sidebar.attributes.js +29 -0
- package/dist/components/Sidebar/sidebar.mcp.d.ts +1 -1
- package/dist/components/Sidebar/sidebar.mcp.js +45 -10
- package/dist/components/Sidebar/sidebar.props.d.ts +28 -7
- package/dist/components/Sidebar/sidebar.theme.d.ts +51 -21
- package/dist/components/Sidebar/sidebar.theme.js +113 -62
- package/dist/components/Sidebar/sidebar.views.svelte.js +11 -18
- package/dist/components/Stepper/Stepper.svelte +2 -0
- package/dist/components/Stepper/stepper.mcp.d.ts +1 -1
- package/dist/components/Stepper/stepper.mcp.js +1 -0
- package/dist/components/Stepper/stepper.props.d.ts +5 -0
- package/dist/components/Stepper/stepper.state.svelte.d.ts +2 -0
- package/dist/components/Stepper/stepper.state.svelte.js +31 -12
- package/dist/components/Tabbar/Tabbar.svelte +55 -16
- package/dist/components/Tabbar/index.d.ts +1 -1
- package/dist/components/Tabbar/tabbar.mcp.d.ts +1 -1
- package/dist/components/Tabbar/tabbar.mcp.js +26 -9
- package/dist/components/Tabbar/tabbar.props.d.ts +34 -5
- package/dist/components/Tabbar/tabbar.selection.svelte.d.ts +79 -0
- package/dist/components/Tabbar/tabbar.selection.svelte.js +99 -0
- package/dist/components/TableOfContents/tableOfContents.state.svelte.js +9 -7
- package/dist/components/Tabs/Tabs.svelte +73 -16
- package/dist/components/Tabs/index.d.ts +2 -1
- package/dist/components/Tabs/tabs.direction.svelte.d.ts +25 -0
- package/dist/components/Tabs/tabs.direction.svelte.js +40 -0
- package/dist/components/Tabs/tabs.mcp.d.ts +1 -1
- package/dist/components/Tabs/tabs.mcp.js +22 -4
- package/dist/components/Tabs/tabs.props.d.ts +39 -12
- package/dist/components/Tabs/tabs.theme.js +3 -1
- package/dist/components/Theme/Theme.svelte +44 -27
- package/dist/components/Theme/helper.d.ts +16 -2
- package/dist/components/Theme/helper.js +46 -4
- package/dist/components/Theme/theme.mcp.d.ts +1 -1
- package/dist/components/Theme/theme.mcp.js +103 -0
- package/dist/components/Theme/theme.props.d.ts +16 -0
- package/dist/components/Theme/theme.state.svelte.d.ts +14 -1
- package/dist/components/Theme/theme.state.svelte.js +18 -1
- package/dist/components/Toast/Toast.svelte +184 -39
- package/dist/components/Toast/Toaster.svelte +14 -10
- package/dist/components/Toast/index.d.ts +1 -0
- package/dist/components/Toast/toast.mcp.d.ts +1 -1
- package/dist/components/Toast/toast.mcp.js +47 -6
- package/dist/components/Toast/toast.state.svelte.d.ts +172 -6
- package/dist/components/Toast/toast.state.svelte.js +513 -68
- package/dist/components/Toast/toast.theme.js +1 -1
- package/dist/components/ToggleButton/ToggleButton.svelte +23 -1
- package/dist/components/ToggleButton/toggleButton.mcp.d.ts +1 -1
- package/dist/components/ToggleButton/toggleButton.mcp.js +3 -1
- package/dist/components/ToggleButton/toggleButton.props.d.ts +13 -1
- package/dist/components/ToggleButton/toggleButton.theme.d.ts +12 -0
- package/dist/components/ToggleButton/toggleButton.theme.js +15 -3
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.svelte +29 -9
- package/dist/components/ToggleButtonGroup/index.d.ts +1 -1
- package/dist/components/ToggleButtonGroup/toggleButtonGroup.mcp.d.ts +1 -1
- package/dist/components/ToggleButtonGroup/toggleButtonGroup.mcp.js +5 -2
- package/dist/components/ToggleButtonGroup/toggleButtonGroup.props.d.ts +19 -1
- package/dist/components/ToggleButtonGroup/toggleButtonGroup.theme.d.ts +12 -0
- package/dist/components/ToggleButtonGroup/toggleButtonGroup.theme.js +21 -2
- package/dist/components/ToggleMenu/ToggleMenu.svelte +57 -43
- package/dist/components/ToggleMenu/ToggleMenuGroup.svelte +1 -0
- package/dist/components/ToggleMenu/ToggleMenuMenu.svelte +9 -3
- package/dist/components/ToggleMenu/ToggleMenuRadioGroup.svelte +7 -2
- package/dist/components/ToggleMenu/toggleMenu.mcp.d.ts +1 -1
- package/dist/components/ToggleMenu/toggleMenu.mcp.js +3 -2
- package/dist/components/ToggleMenu/toggleMenu.props.d.ts +4 -1
- package/dist/components/Tooltip/Tooltip.svelte +4 -12
- package/dist/components/Tooltip/TooltipHost.svelte +136 -15
- package/dist/components/Tooltip/index.d.ts +1 -0
- package/dist/components/Tooltip/index.js +1 -0
- package/dist/components/Tooltip/tooltip.attachment.svelte.d.ts +5 -0
- package/dist/components/Tooltip/tooltip.attachment.svelte.js +215 -33
- package/dist/components/Tooltip/tooltip.attributes.d.ts +32 -0
- package/dist/components/Tooltip/tooltip.attributes.js +28 -0
- package/dist/components/Tooltip/tooltip.mcp.d.ts +1 -1
- package/dist/components/Tooltip/tooltip.mcp.js +111 -10
- package/dist/components/Tooltip/tooltip.props.d.ts +33 -2
- package/dist/components/Tooltip/tooltip.surface.d.ts +24 -0
- package/dist/components/Tooltip/tooltip.surface.js +42 -0
- package/dist/components/Tree/TreeContextMenuSurface.svelte +16 -3
- package/dist/components/Utils/BeforeHydratation.svelte +14 -3
- package/dist/components/Utils/BeforeHydratation.svelte.d.ts +2 -0
- package/dist/components/VideoPlayer/VideoPlayer.svelte.d.ts +1 -1
- package/dist/components/VideoPlayer/VideoPlayerSettings.svelte +2 -0
- package/dist/generated/componentAliases.d.ts +3 -0
- package/dist/generated/componentAliases.js +3 -0
- package/dist/generated/componentContract.d.ts +79 -34
- package/dist/generated/componentContract.js +225 -6
- package/dist/generated/componentMcpRegistry.js +6 -0
- package/dist/i18n/ar.js +107 -3
- package/dist/i18n/context.svelte.d.ts +6 -0
- package/dist/i18n/context.svelte.js +12 -0
- package/dist/i18n/de.js +101 -3
- package/dist/i18n/en.d.ts +91 -2
- package/dist/i18n/en.js +101 -3
- package/dist/i18n/es.js +101 -3
- package/dist/i18n/fr.js +101 -3
- package/dist/i18n/ja.js +101 -3
- package/dist/i18n/pt.js +101 -3
- package/dist/i18n/zh.js +101 -3
- package/dist/tailwind/geometry.js +7 -0
- package/dist/tailwind/global.js +31 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types.mcp.d.ts +1 -1
- package/dist/types/types.mcp.js +23 -0
- package/dist/utils/cspNonce.d.ts +16 -0
- package/dist/utils/cspNonce.js +39 -0
- package/dist/utils/cva/merge.d.ts +5 -1
- package/dist/utils/cva/merge.js +6 -4
- package/dist/utils/focus.d.ts +34 -0
- package/dist/utils/focus.js +93 -0
- package/dist/utils/focusHistory.d.ts +21 -0
- package/dist/utils/focusHistory.js +99 -0
- package/dist/utils/handlers.d.ts +7 -0
- package/dist/utils/handlers.js +14 -0
- package/dist/utils/hoverIntent.d.ts +42 -0
- package/dist/utils/hoverIntent.js +57 -0
- package/dist/utils/id.d.ts +7 -0
- package/dist/utils/id.js +15 -0
- package/dist/utils/layers.svelte.d.ts +32 -4
- package/dist/utils/layers.svelte.js +214 -21
- package/dist/utils/listFilter.d.ts +44 -0
- package/dist/utils/listFilter.js +130 -0
- package/dist/utils/match.d.ts +35 -0
- package/dist/utils/match.js +36 -0
- package/dist/utils/number.d.ts +126 -0
- package/dist/utils/number.js +401 -0
- package/dist/utils/openChange.d.ts +88 -0
- package/dist/utils/openChange.js +71 -0
- package/dist/utils/openLifecycle.svelte.d.ts +41 -0
- package/dist/utils/openLifecycle.svelte.js +134 -0
- package/dist/utils/pointerDrag.d.ts +10 -0
- package/dist/utils/pointerDrag.js +37 -2
- package/dist/utils/pragmaticDragAndDrop.d.ts +2 -1
- package/dist/utils/pragmaticDragAndDrop.js +8 -3
- package/dist/utils/range.d.ts +62 -0
- package/dist/utils/range.js +70 -0
- package/dist/utils/requestNativeSubmit.d.ts +17 -0
- package/dist/utils/requestNativeSubmit.js +47 -0
- package/dist/utils/safeArea.svelte.d.ts +10 -1
- package/dist/utils/safeArea.svelte.js +19 -11
- package/dist/utils/stateAttributes.d.ts +108 -0
- package/dist/utils/stateAttributes.js +78 -0
- package/dist/utils/swipeVelocity.d.ts +32 -0
- package/dist/utils/swipeVelocity.js +59 -0
- package/dist/utils/timer.svelte.d.ts +65 -2
- package/dist/utils/timer.svelte.js +159 -25
- package/dist/utils/trigger.d.ts +41 -0
- package/dist/utils/trigger.js +103 -0
- package/dist/utils/typeahead.d.ts +9 -0
- package/dist/utils/typeahead.js +21 -9
- package/dist/utils/useDndList.svelte.d.ts +1 -1
- package/dist/utils/useDndList.svelte.js +6 -23
- package/dist/utils/useFocusScope.svelte.d.ts +29 -0
- package/dist/utils/useFocusScope.svelte.js +189 -27
- package/dist/utils/useHoverAction.svelte.d.ts +44 -4
- package/dist/utils/useHoverAction.svelte.js +161 -51
- package/dist/utils/useKeyDown.svelte.d.ts +19 -2
- package/dist/utils/useKeyDown.svelte.js +19 -12
- package/dist/utils/useListNavigation.svelte.d.ts +94 -13
- package/dist/utils/useListNavigation.svelte.js +261 -35
- package/dist/utils/useLiveAnnouncer.svelte.d.ts +77 -2
- package/dist/utils/useLiveAnnouncer.svelte.js +119 -2
- package/dist/utils/useNavigation.svelte.d.ts +36 -3
- package/dist/utils/useNavigation.svelte.js +699 -332
- package/dist/utils/usePressAndHold.svelte.d.ts +38 -0
- package/dist/utils/usePressAndHold.svelte.js +191 -0
- package/dist/utils/useScrollLock.svelte.d.ts +20 -1
- package/dist/utils/useScrollLock.svelte.js +54 -13
- package/dist/utils/useSlidingIndicator.svelte.d.ts +2 -0
- package/dist/utils/useSlidingIndicator.svelte.js +27 -5
- package/dist/utils/useTabBridge.svelte.d.ts +20 -0
- package/dist/utils/useTabBridge.svelte.js +109 -0
- package/dist/utils/values.d.ts +15 -0
- package/dist/utils/values.js +49 -0
- package/package.json +31 -2
- package/dist/generated/componentMcpRegistry.d.ts +0 -142
- package/dist/utils/useDrag.svelte.d.ts +0 -11
- package/dist/utils/useDrag.svelte.js +0 -55
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const selectDescription = "\n# Select Component\n\nA custom (non-native) selection field: a combobox trigger opening a listbox popover, with full\nkeyboard navigation, grouped options, and Field/Form integration. Like a native select (and\nRadix's item-aligned or Base UI's `alignItemWithTrigger` position), the listbox opens over the\ntrigger with the selected option sitting on the value.\n\n## Basic Usage\n\n```svelte\n<Select\n\tlabel=\"Country\"\n\tbind:value={country}\n\titems={[\n\t\t{ value: 'us', label: 'United States' },\n\t\t{ value: 'uk', label: 'United Kingdom' },\n\t\t{ value: 'ca', label: 'Canada' }\n\t]}\n/>\n```\n\n## Grouped options\n\nFlat options and `{ label, items }` groups can be mixed freely; separators render between groups.\n\n```svelte\n<Select\n\tlabel=\"Timezone\"\n\tbind:value={tz}\n\titems={[\n\t\t{ label: 'Europe', items: [{ value: 'paris', label: 'Paris' }, { value: 'berlin', label: 'Berlin' }] },\n\t\t{ label: 'America', items: [{ value: 'nyc', label: 'New York' }, { value: 'la', label: 'Los Angeles' }] }\n\t]}\n/>\n```\n\n## Props\n\nExtends all Field component props plus:\n\n### Core Props\n- **value**: string (bindable) - Selected value\n- **items**: (SelectOption | SelectOptionGroup)[] - Flat `{ value, label, disabled? }` options and/or `{ label, items }` groups\n- **placeholder**: string (default: 'Select an option') - Trigger text when no selection\n- **separators**: boolean (default: true) - Render separators between consecutive groups\n- **alignItemWithTrigger**: boolean (default: true) - Open over the trigger with the selected option (the first enabled one when nothing is selected) on the trigger's middle and its text on the value text. A list taller than the viewport is capped 8px from the edges and pre-scrolled so the option stays on the trigger; a trigger too close to the bottom for four rows gives up the alignment and the panel rises into view. Wheel and touch scrolling outside the panel are blocked while it is open, so the trigger cannot move away from it. `false` opens a dropdown below the trigger instead, capped at ~240px\n\n### Field Props (inherited)\n- **label**: string | Snippet - Field label, and the trigger's accessible name; without it the trigger falls back to the placeholder\n- **description**: string | Snippet - Helper text\n- **required**: boolean - Mark as required\n- **disabled**: boolean - Disable the trigger\n- **size**: 'small' | 'normal' | 'large' - Trigger and dropdown size\n- **density**: 'compact' | 'normal' | 'comfortable' (default: 'normal') - Spacing density forwarded to the dropdown option rows (paddings, gaps, min-height)\n- **name**: string - Form field name; also renders a hidden input for native form posts\n\n### Bindable Props\n- **value**: string - Selected value\n- **errors**: string[] - Validation errors\n- **focused**: boolean - Trigger focus state\n\n### Callbacks\n- **onValueChange**: (value) => void - Fires when the selection changes\n- **onValidate**: (value) => string[] | boolean - Custom validation\n\n### Advanced Props\n- **theme**: SelectThemeProps - Theme overrides (input, inputContainer, value, triggerIcon, content, group, groupLabel, item, itemIndicator, separator)\n\n## Keyboard\n\n- Closed: ArrowDown / ArrowUp / Enter / Space open the dropdown, anchored on the selected option\n- Open: ArrowDown / ArrowUp move the highlight (wrap-around), Home / End jump, Enter / Space select, Escape closes, Tab closes and moves focus on\n- Type-ahead: typing letters while the trigger has focus moves the highlight to the next option whose label starts with the typed text\n- Disabled options are skipped by the highlight\n\n## Accessibility\n\nARIA 1.2 select-only combobox pattern: the trigger is a `role=\"combobox\"` button with\n`aria-haspopup=\"listbox\"`, `aria-expanded`, and `aria-controls`; DOM focus stays on the\ntrigger while `aria-activedescendant` tracks the highlighted `role=\"option\"` (virtual focus).\nThe selected option shows a check indicator and `aria-selected`.\n\nThe trigger always has an accessible name: `label` names it through the Field label (a string\nlabel as a `<label for>`, a snippet through `aria-labelledby`), and without one the trigger\nfalls back to `placeholder`, then to the catalog's \"Select an option\". Pass `label` whenever\nan unlabelled select sits in a toolbar or filter row, so the name says which control it is\nrather than repeating the placeholder.\n\n## Notes\n\n- Selection re-focuses the trigger (matches native select behavior)\n- Clicking outside closes via trigger blur; option rows prevent mousedown so the click can land\n- The list scrolls (ScrollArea) beyond the viewport when item-aligned, beyond ~240px as a dropdown; the highlight scrolls into view on keyboard nav\n- The panel covers the trigger while open, so clicking outside (not the trigger) closes it, as with a native select\n\n## State contract\n\n- **value**: current bindable editable value.\n- **defaultValue**: initial value used only when `value` is omitted.\n- **onValueChange**: called with the new value when the component changes it.\n\n";
|
|
1
|
+
export declare const selectDescription = "\n# Select Component\n\nA custom (non-native) selection field: a combobox trigger opening a listbox popover, with full\nkeyboard navigation, type-to-select, grouped options, read-only and multiple selection, browser\nautofill and Field/Form integration. Like a native select (and Radix's item-aligned or Base UI's\n`alignItemWithTrigger` position), the listbox opens over the trigger with the selected option\nsitting on the value.\n\n## Basic Usage\n\n```svelte\n<Select\n\tlabel=\"Country\"\n\tbind:value={country}\n\titems={[\n\t\t{ value: 'us', label: 'United States' },\n\t\t{ value: 'uk', label: 'United Kingdom' },\n\t\t{ value: 'ca', label: 'Canada' }\n\t]}\n/>\n```\n\n## Grouped options\n\nFlat options and `{ label, items }` groups can be mixed freely; separators render between groups.\n\n```svelte\n<Select\n\tlabel=\"Timezone\"\n\tbind:value={tz}\n\titems={[\n\t\t{ label: 'Europe', items: [{ value: 'paris', label: 'Paris' }, { value: 'berlin', label: 'Berlin' }] },\n\t\t{ label: 'America', items: [{ value: 'nyc', label: 'New York' }, { value: 'la', label: 'Los Angeles' }] }\n\t]}\n/>\n```\n\n## Multiple selection\n\n`multiple` makes the Select hold a list of values (field type `select-multiple`). The list stays\nopen while options are toggled with a click, Enter or Space, the listbox is `aria-multiselectable`,\nevery selected option shows its check, and `value` is an array in item order.\n\n```svelte\n<Select\n\tmultiple\n\tlabel=\"Toppings\"\n\tbind:value={toppings}\n\titems={[\n\t\t{ value: 'olives', label: 'Olives' },\n\t\t{ value: 'basil', label: 'Basil' },\n\t\t{ value: 'ham', label: 'Ham' }\n\t]}\n/>\n```\n\nThe trigger lists the first two selected labels and counts the rest (`Olives, Basil +1`); pass\n`formatValue` to write your own text. The list opens on the first selected option in item order.\nA native form submits one hidden input per value under the same `name` (read them with\n`FormData.getAll`), and a required multiple Select needs at least one value. In a Form, use\n`type: 'select-multiple'`.\n\n## Props\n\nExtends all Field component props plus:\n\n### Core Props\n- **value**: string | null (bindable) - Selected value; with `multiple`, a (readonly) string array in item order\n- **multiple**: boolean (default: false) - Hold several values; the list stays open while options are toggled\n- **formatValue**: (options: SelectOption[]) => string - With `multiple`, the text the trigger shows for the selected options (default: two labels and `+N`)\n- **clearable**: boolean (default: false) - Adds a button that clears the selection (`null`, or `[]` with `multiple`) and returns focus to the trigger; hidden while empty, read-only or disabled\n- **id**: string - Id of the trigger button, so an external `<label for>` can name it; without a `label` the trigger's placeholder fallback steps aside when such a label exists\n- **autocomplete**: string - Autofill token (`country`, `address-level1`...). Renders a visually hidden text input the browser can autofill; the filled text selects the option whose value matches, else whose label matches (ignoring case and accents). Autofill never opens the list and is ignored while disabled or read-only\n- **items**: readonly (SelectOption | SelectOptionGroup)[] - Flat `{ value, label, disabled? }` options and/or `{ label, items }` groups; readonly arrays and `as const` data are accepted\n- **placeholder**: string (default: 'Select an option') - Trigger text when no selection\n- **separators**: boolean (default: true) - Render separators between consecutive groups\n- **alignItemWithTrigger**: boolean (default: true) - Open over the trigger with the selected option (the first enabled one when nothing is selected) on the trigger's middle and its text on the value text. A list taller than the viewport is capped 8px from the edges and pre-scrolled so the option stays on the trigger, and a `max-height` the theme puts on the `list` slot caps it further; a trigger too close to the bottom for four rows gives up the alignment and the panel rises into view. Wheel and touch scrolling outside the panel are blocked while it is open, so the trigger cannot move away from it. Only a mouse or keyboard open aligns: a list opened by touch is a dropdown below the trigger. `false` opens a dropdown below the trigger always, capped at 240px or the room left beside the trigger\n\n### Field Props (inherited)\n- **label**: string | Snippet - Field label, and the trigger's accessible name; without it the trigger falls back to the placeholder\n- **description**: string | Snippet - Helper text\n- **required**: boolean - Mark as required. A native form is blocked from submitting while nothing is selected (the browser's report moves to the trigger); a disabled Select is not required\n- **disabled**: boolean - Disable the trigger; the hidden inputs are disabled too, so a native form post leaves the value out\n- **readOnly**: boolean - The list opens and can be browsed (arrows, Home, End, typing, hover), but no option can be chosen and the value cannot change. The trigger carries `aria-readonly` and `data-readonly` (the popup does not), typing on the closed trigger picks nothing, `clearable` hides its button, and the value is still submitted by a native form\n- **open**: boolean (bindable) - Whether the list is open\n- **defaultOpen**: boolean (default: false) - Initial open state when `open` is not provided\n- **size**: 'small' | 'normal' | 'large' - Trigger and dropdown size\n- **density**: 'compact' | 'normal' | 'comfortable' (default: 'normal') - Spacing density forwarded to the dropdown option rows (paddings, gaps, min-height)\n- **name**: string - Form field name; also renders a hidden input per value for native form posts (disabled while the Select is disabled; a read-only Select still submits)\n\n### Bindable Props\n- **value**: string - Selected value\n- **errors**: string[] - Validation errors\n- **focused**: boolean - Trigger focus state\n\n### Callbacks\n- **onValueChange**: (value) => void - Fires when the selection changes: the new string or `null`, or with `multiple` the new array (once per toggle)\n- **onValidate**: (value) => string[] | boolean - Custom validation\n- **onOpenChange**: (open, details) => void - Runs before the list opens or closes. `details` carries `reason` (`'trigger-press'`, `'list-navigation'` for an arrow-key open, `'item-press'`, `'escape-key'`, `'outside-press'` (a press outside the list), `'focus-out'`, `'close-press'`, `'imperative-action'`), the originating `event`, the `trigger`, the `interaction` (`'mouse'`, `'touch'`, `'pen'`, `'keyboard'`, `'programmatic'`) and `cancel()`, which keeps the list as it is. Setting `open` from outside is silent\n- **onAfterOpen** / **onAfterClose**: () => void - Once per open and close, after the transition (right away when none plays)\n\n### Advanced Props\n- **triggerAttrs**: native attributes for the trigger button (handlers run before the built-in ones; `preventDefault()` cancels them)\n- **theme**: SelectThemeProps - Theme overrides (input, inputContainer, value, triggerIcon, content, list, listbox, group, groupLabel, separator). The `list` slot is the scrolling list: its `dropdown` variant carries the 240px cap of a dropdown, and a `max-height` you put on it caps an item-aligned list too\n\n## Keyboard\n\n- Closed: ArrowDown / ArrowUp / Enter / Space open the dropdown, anchored on the selected option (the first selected one with `multiple`)\n- Open: ArrowDown / ArrowUp move the highlight (wrap-around), Home / End jump, Enter / Space select (toggle with `multiple`), Escape closes, Tab closes and moves focus on\n- Type-ahead: typing letters while the trigger has focus moves the highlight to the next option whose label starts with the typed text. Space continues the search while characters are buffered (`united s` reaches United States) and selects only when the search is over. The buffer clears after a second and whenever the list closes\n- Typing on a closed trigger picks the matching option without opening the list, as a native select does, with one `onValueChange` (not with `multiple` or `readOnly`)\n- Disabled options are skipped by the highlight and the type-ahead\n\n## Styling hooks\n\nThe trigger, the field container, the list panel and every option carry state attributes. `data-highlighted` and `data-selected` are written as `\"true\"`; match them by presence (`[data-highlighted]`).\n\nAttributes are presence attributes (set while the state holds, omitted otherwise) unless they carry a value.\n\n**Data attributes**\n- `data-popup-open`: On the trigger button and the field container around it: present while the list is open.\n- `data-placeholder`: On the trigger: present while no value is chosen and the placeholder shows.\n- `data-disabled`: On the trigger: present while disabled. On an option: present while it is disabled.\n- `data-readonly`: On the trigger: present while `readOnly`.\n- `data-popup-side`: On the field container: `none` while the list is placed over the trigger, otherwise the side it sits on.\n- `data-highlighted`: On an option: present while the keyboard or the pointer highlights it.\n- `data-selected`: On an option: present while it is selected.\n- `data-open`: On the list panel: present while open.\n- `data-closed`: On the list panel: present while its exit transition plays.\n- `data-entering`: On the list panel: present while the enter transition plays.\n- `data-exiting`: On the list panel: present while the exit transition plays.\n- `data-side`: On the list panel: `none` while it is placed over the trigger (aligned on the selected option), otherwise the side of the trigger it sits on.\n\n**CSS variables** (set on the list panel's positioned wrapper and inherited by the list; the mobile sheet has none)\n- `--available-width`: The width in px the panel can take before it reaches the viewport edges, minus 20px.\n- `--available-height`: The room in px between the trigger and the viewport edge on the panel's side, minus 20px. Cap a scrolling list with `max-height: min(240px, var(--available-height))`.\n- `--anchor-width`: The trigger's width in px, snapped to the device pixel grid.\n- `--anchor-height`: The trigger's height in px, snapped to the device pixel grid.\n- `--transform-origin`: The panel corner facing the trigger, mirrored in right-to-left documents; the point the panel scales from.\n\nThe typed maps `selectDataAttributes` and `selectCssVariables` (from `entasis/select`) list each name with its meaning.\n\n## Accessibility\n\nARIA 1.2 select-only combobox pattern: the trigger is a `role=\"combobox\"` button with\n`aria-haspopup=\"listbox\"`, `aria-expanded`, and `aria-controls`; DOM focus stays on the\ntrigger while `aria-activedescendant` tracks the highlighted `role=\"option\"` (virtual focus).\nThe selected option shows a check indicator and `aria-selected`.\n\nThe scrolling viewport is the listbox (`role=\"listbox\"`, `tabindex=\"-1\"`), so the list scrolls\ninside the element that owns the options and no extra scroll group or tab stop appears when it\noverflows. The listbox owns only options and `role=\"group\"` sets: bare options sit directly under\nit, a group exists only for a labelled set. Group separators are `role=\"presentation\"`, group\nlabels are `aria-hidden` (each group is named through `aria-label`), and the scrollbars are\n`aria-hidden` and sit outside the listbox. `multiple` adds `aria-multiselectable`.\n\nThe trigger is the only tab stop; the label focuses it without opening the list. Touch\nscreen readers move focus onto options instead of using the virtual cursor, so focus entering the\npanel keeps the list open (it closes when focus leaves both the trigger and the panel), Escape on a\nfocused option closes it and returns focus to the trigger, and a visually hidden \"Close\" button at\nthe end of the panel gives users with no Escape key a way out.\n\nThe trigger always has an accessible name: `label` names it through the Field label (a string\nlabel as a `<label for>`, a snippet through `aria-labelledby`), and without one the trigger\nfalls back to `placeholder`, then to the catalog's \"Select an option\". Pass `label` whenever\nan unlabelled select sits in a toolbar or filter row, so the name says which control it is\nrather than repeating the placeholder.\n\n## Notes\n\n- Selection re-focuses the trigger (matches native select behavior); with `multiple` the list stays open and focus stays on the trigger\n- Clicking outside closes via trigger blur; option rows prevent mousedown so the click can land. A list opened from outside (`open`, `defaultOpen`) moves focus to the trigger, so Escape, the arrow keys and clicking away work the same, and it is measured afresh each time it opens\n- A `<label for>` pointing at `id` names the trigger and focuses it on click\n- The list scrolls (ScrollArea) beyond the viewport when item-aligned, beyond 240px as a dropdown (less when there is less room beside the trigger: the dropdown list is capped by the Popover's `--available-height`, so it never runs under an on-screen keyboard or over its trigger); the highlight scrolls into view on keyboard nav\n- While the dropdown is open, the input container carries `data-popup-side` (`bottom`, `top`, or `none` when item-aligned) and the panel `data-side`, so a theme can flatten the corner where they meet\n- The trigger carries `data-placeholder` while nothing is selected and `data-readonly` while read-only\n- Option rows are lean: a titled row with a check, using MenuOption's theme, and each option's id comes from a map, so a list of a thousand options opens without a search per row. Option ids are numbered in the order they are first needed, so values that would collide once sanitised (`a.b`, `a_b`) never share an id\n- The panel covers the trigger while open, so clicking outside (not the trigger) closes it, as with a native select\n\n## State contract\n\n- **value**: current bindable editable value.\n- **defaultValue**: initial value used only when `value` is omitted.\n- **onValueChange**: called with the new value when the component changes it.\n- **open**: bindable disclosure state; **defaultOpen** initial state; **onOpenChange** reports every user-driven change before it happens and may cancel it; **onAfterOpen** / **onAfterClose** fire once per open and close.\n\n";
|
|
@@ -2,9 +2,10 @@ export const selectDescription = `
|
|
|
2
2
|
# Select Component
|
|
3
3
|
|
|
4
4
|
A custom (non-native) selection field: a combobox trigger opening a listbox popover, with full
|
|
5
|
-
keyboard navigation, grouped options, and
|
|
6
|
-
Radix's item-aligned or Base UI's
|
|
7
|
-
|
|
5
|
+
keyboard navigation, type-to-select, grouped options, read-only and multiple selection, browser
|
|
6
|
+
autofill and Field/Form integration. Like a native select (and Radix's item-aligned or Base UI's
|
|
7
|
+
\`alignItemWithTrigger\` position), the listbox opens over the trigger with the selected option
|
|
8
|
+
sitting on the value.
|
|
8
9
|
|
|
9
10
|
## Basic Usage
|
|
10
11
|
|
|
@@ -35,25 +36,58 @@ Flat options and \`{ label, items }\` groups can be mixed freely; separators ren
|
|
|
35
36
|
/>
|
|
36
37
|
\`\`\`
|
|
37
38
|
|
|
39
|
+
## Multiple selection
|
|
40
|
+
|
|
41
|
+
\`multiple\` makes the Select hold a list of values (field type \`select-multiple\`). The list stays
|
|
42
|
+
open while options are toggled with a click, Enter or Space, the listbox is \`aria-multiselectable\`,
|
|
43
|
+
every selected option shows its check, and \`value\` is an array in item order.
|
|
44
|
+
|
|
45
|
+
\`\`\`svelte
|
|
46
|
+
<Select
|
|
47
|
+
multiple
|
|
48
|
+
label="Toppings"
|
|
49
|
+
bind:value={toppings}
|
|
50
|
+
items={[
|
|
51
|
+
{ value: 'olives', label: 'Olives' },
|
|
52
|
+
{ value: 'basil', label: 'Basil' },
|
|
53
|
+
{ value: 'ham', label: 'Ham' }
|
|
54
|
+
]}
|
|
55
|
+
/>
|
|
56
|
+
\`\`\`
|
|
57
|
+
|
|
58
|
+
The trigger lists the first two selected labels and counts the rest (\`Olives, Basil +1\`); pass
|
|
59
|
+
\`formatValue\` to write your own text. The list opens on the first selected option in item order.
|
|
60
|
+
A native form submits one hidden input per value under the same \`name\` (read them with
|
|
61
|
+
\`FormData.getAll\`), and a required multiple Select needs at least one value. In a Form, use
|
|
62
|
+
\`type: 'select-multiple'\`.
|
|
63
|
+
|
|
38
64
|
## Props
|
|
39
65
|
|
|
40
66
|
Extends all Field component props plus:
|
|
41
67
|
|
|
42
68
|
### Core Props
|
|
43
|
-
- **value**: string (bindable) - Selected value
|
|
44
|
-
- **
|
|
69
|
+
- **value**: string | null (bindable) - Selected value; with \`multiple\`, a (readonly) string array in item order
|
|
70
|
+
- **multiple**: boolean (default: false) - Hold several values; the list stays open while options are toggled
|
|
71
|
+
- **formatValue**: (options: SelectOption[]) => string - With \`multiple\`, the text the trigger shows for the selected options (default: two labels and \`+N\`)
|
|
72
|
+
- **clearable**: boolean (default: false) - Adds a button that clears the selection (\`null\`, or \`[]\` with \`multiple\`) and returns focus to the trigger; hidden while empty, read-only or disabled
|
|
73
|
+
- **id**: string - Id of the trigger button, so an external \`<label for>\` can name it; without a \`label\` the trigger's placeholder fallback steps aside when such a label exists
|
|
74
|
+
- **autocomplete**: string - Autofill token (\`country\`, \`address-level1\`...). Renders a visually hidden text input the browser can autofill; the filled text selects the option whose value matches, else whose label matches (ignoring case and accents). Autofill never opens the list and is ignored while disabled or read-only
|
|
75
|
+
- **items**: readonly (SelectOption | SelectOptionGroup)[] - Flat \`{ value, label, disabled? }\` options and/or \`{ label, items }\` groups; readonly arrays and \`as const\` data are accepted
|
|
45
76
|
- **placeholder**: string (default: 'Select an option') - Trigger text when no selection
|
|
46
77
|
- **separators**: boolean (default: true) - Render separators between consecutive groups
|
|
47
|
-
- **alignItemWithTrigger**: boolean (default: true) - Open over the trigger with the selected option (the first enabled one when nothing is selected) on the trigger's middle and its text on the value text. A list taller than the viewport is capped 8px from the edges and pre-scrolled so the option stays on the trigger; a trigger too close to the bottom for four rows gives up the alignment and the panel rises into view. Wheel and touch scrolling outside the panel are blocked while it is open, so the trigger cannot move away from it. \`false\` opens a dropdown below the trigger
|
|
78
|
+
- **alignItemWithTrigger**: boolean (default: true) - Open over the trigger with the selected option (the first enabled one when nothing is selected) on the trigger's middle and its text on the value text. A list taller than the viewport is capped 8px from the edges and pre-scrolled so the option stays on the trigger, and a \`max-height\` the theme puts on the \`list\` slot caps it further; a trigger too close to the bottom for four rows gives up the alignment and the panel rises into view. Wheel and touch scrolling outside the panel are blocked while it is open, so the trigger cannot move away from it. Only a mouse or keyboard open aligns: a list opened by touch is a dropdown below the trigger. \`false\` opens a dropdown below the trigger always, capped at 240px or the room left beside the trigger
|
|
48
79
|
|
|
49
80
|
### Field Props (inherited)
|
|
50
81
|
- **label**: string | Snippet - Field label, and the trigger's accessible name; without it the trigger falls back to the placeholder
|
|
51
82
|
- **description**: string | Snippet - Helper text
|
|
52
|
-
- **required**: boolean - Mark as required
|
|
53
|
-
- **disabled**: boolean - Disable the trigger
|
|
83
|
+
- **required**: boolean - Mark as required. A native form is blocked from submitting while nothing is selected (the browser's report moves to the trigger); a disabled Select is not required
|
|
84
|
+
- **disabled**: boolean - Disable the trigger; the hidden inputs are disabled too, so a native form post leaves the value out
|
|
85
|
+
- **readOnly**: boolean - The list opens and can be browsed (arrows, Home, End, typing, hover), but no option can be chosen and the value cannot change. The trigger carries \`aria-readonly\` and \`data-readonly\` (the popup does not), typing on the closed trigger picks nothing, \`clearable\` hides its button, and the value is still submitted by a native form
|
|
86
|
+
- **open**: boolean (bindable) - Whether the list is open
|
|
87
|
+
- **defaultOpen**: boolean (default: false) - Initial open state when \`open\` is not provided
|
|
54
88
|
- **size**: 'small' | 'normal' | 'large' - Trigger and dropdown size
|
|
55
89
|
- **density**: 'compact' | 'normal' | 'comfortable' (default: 'normal') - Spacing density forwarded to the dropdown option rows (paddings, gaps, min-height)
|
|
56
|
-
- **name**: string - Form field name; also renders a hidden input for native form posts
|
|
90
|
+
- **name**: string - Form field name; also renders a hidden input per value for native form posts (disabled while the Select is disabled; a read-only Select still submits)
|
|
57
91
|
|
|
58
92
|
### Bindable Props
|
|
59
93
|
- **value**: string - Selected value
|
|
@@ -61,18 +95,51 @@ Extends all Field component props plus:
|
|
|
61
95
|
- **focused**: boolean - Trigger focus state
|
|
62
96
|
|
|
63
97
|
### Callbacks
|
|
64
|
-
- **onValueChange**: (value) => void - Fires when the selection changes
|
|
98
|
+
- **onValueChange**: (value) => void - Fires when the selection changes: the new string or \`null\`, or with \`multiple\` the new array (once per toggle)
|
|
65
99
|
- **onValidate**: (value) => string[] | boolean - Custom validation
|
|
100
|
+
- **onOpenChange**: (open, details) => void - Runs before the list opens or closes. \`details\` carries \`reason\` (\`'trigger-press'\`, \`'list-navigation'\` for an arrow-key open, \`'item-press'\`, \`'escape-key'\`, \`'outside-press'\` (a press outside the list), \`'focus-out'\`, \`'close-press'\`, \`'imperative-action'\`), the originating \`event\`, the \`trigger\`, the \`interaction\` (\`'mouse'\`, \`'touch'\`, \`'pen'\`, \`'keyboard'\`, \`'programmatic'\`) and \`cancel()\`, which keeps the list as it is. Setting \`open\` from outside is silent
|
|
101
|
+
- **onAfterOpen** / **onAfterClose**: () => void - Once per open and close, after the transition (right away when none plays)
|
|
66
102
|
|
|
67
103
|
### Advanced Props
|
|
68
|
-
- **
|
|
104
|
+
- **triggerAttrs**: native attributes for the trigger button (handlers run before the built-in ones; \`preventDefault()\` cancels them)
|
|
105
|
+
- **theme**: SelectThemeProps - Theme overrides (input, inputContainer, value, triggerIcon, content, list, listbox, group, groupLabel, separator). The \`list\` slot is the scrolling list: its \`dropdown\` variant carries the 240px cap of a dropdown, and a \`max-height\` you put on it caps an item-aligned list too
|
|
69
106
|
|
|
70
107
|
## Keyboard
|
|
71
108
|
|
|
72
|
-
- Closed: ArrowDown / ArrowUp / Enter / Space open the dropdown, anchored on the selected option
|
|
73
|
-
- Open: ArrowDown / ArrowUp move the highlight (wrap-around), Home / End jump, Enter / Space select, Escape closes, Tab closes and moves focus on
|
|
74
|
-
- Type-ahead: typing letters while the trigger has focus moves the highlight to the next option whose label starts with the typed text
|
|
75
|
-
-
|
|
109
|
+
- Closed: ArrowDown / ArrowUp / Enter / Space open the dropdown, anchored on the selected option (the first selected one with \`multiple\`)
|
|
110
|
+
- Open: ArrowDown / ArrowUp move the highlight (wrap-around), Home / End jump, Enter / Space select (toggle with \`multiple\`), Escape closes, Tab closes and moves focus on
|
|
111
|
+
- Type-ahead: typing letters while the trigger has focus moves the highlight to the next option whose label starts with the typed text. Space continues the search while characters are buffered (\`united s\` reaches United States) and selects only when the search is over. The buffer clears after a second and whenever the list closes
|
|
112
|
+
- Typing on a closed trigger picks the matching option without opening the list, as a native select does, with one \`onValueChange\` (not with \`multiple\` or \`readOnly\`)
|
|
113
|
+
- Disabled options are skipped by the highlight and the type-ahead
|
|
114
|
+
|
|
115
|
+
## Styling hooks
|
|
116
|
+
|
|
117
|
+
The trigger, the field container, the list panel and every option carry state attributes. \`data-highlighted\` and \`data-selected\` are written as \`"true"\`; match them by presence (\`[data-highlighted]\`).
|
|
118
|
+
|
|
119
|
+
Attributes are presence attributes (set while the state holds, omitted otherwise) unless they carry a value.
|
|
120
|
+
|
|
121
|
+
**Data attributes**
|
|
122
|
+
- \`data-popup-open\`: On the trigger button and the field container around it: present while the list is open.
|
|
123
|
+
- \`data-placeholder\`: On the trigger: present while no value is chosen and the placeholder shows.
|
|
124
|
+
- \`data-disabled\`: On the trigger: present while disabled. On an option: present while it is disabled.
|
|
125
|
+
- \`data-readonly\`: On the trigger: present while \`readOnly\`.
|
|
126
|
+
- \`data-popup-side\`: On the field container: \`none\` while the list is placed over the trigger, otherwise the side it sits on.
|
|
127
|
+
- \`data-highlighted\`: On an option: present while the keyboard or the pointer highlights it.
|
|
128
|
+
- \`data-selected\`: On an option: present while it is selected.
|
|
129
|
+
- \`data-open\`: On the list panel: present while open.
|
|
130
|
+
- \`data-closed\`: On the list panel: present while its exit transition plays.
|
|
131
|
+
- \`data-entering\`: On the list panel: present while the enter transition plays.
|
|
132
|
+
- \`data-exiting\`: On the list panel: present while the exit transition plays.
|
|
133
|
+
- \`data-side\`: On the list panel: \`none\` while it is placed over the trigger (aligned on the selected option), otherwise the side of the trigger it sits on.
|
|
134
|
+
|
|
135
|
+
**CSS variables** (set on the list panel's positioned wrapper and inherited by the list; the mobile sheet has none)
|
|
136
|
+
- \`--available-width\`: The width in px the panel can take before it reaches the viewport edges, minus 20px.
|
|
137
|
+
- \`--available-height\`: The room in px between the trigger and the viewport edge on the panel's side, minus 20px. Cap a scrolling list with \`max-height: min(240px, var(--available-height))\`.
|
|
138
|
+
- \`--anchor-width\`: The trigger's width in px, snapped to the device pixel grid.
|
|
139
|
+
- \`--anchor-height\`: The trigger's height in px, snapped to the device pixel grid.
|
|
140
|
+
- \`--transform-origin\`: The panel corner facing the trigger, mirrored in right-to-left documents; the point the panel scales from.
|
|
141
|
+
|
|
142
|
+
The typed maps \`selectDataAttributes\` and \`selectCssVariables\` (from \`entasis/select\`) list each name with its meaning.
|
|
76
143
|
|
|
77
144
|
## Accessibility
|
|
78
145
|
|
|
@@ -81,6 +148,19 @@ ARIA 1.2 select-only combobox pattern: the trigger is a \`role="combobox"\` butt
|
|
|
81
148
|
trigger while \`aria-activedescendant\` tracks the highlighted \`role="option"\` (virtual focus).
|
|
82
149
|
The selected option shows a check indicator and \`aria-selected\`.
|
|
83
150
|
|
|
151
|
+
The scrolling viewport is the listbox (\`role="listbox"\`, \`tabindex="-1"\`), so the list scrolls
|
|
152
|
+
inside the element that owns the options and no extra scroll group or tab stop appears when it
|
|
153
|
+
overflows. The listbox owns only options and \`role="group"\` sets: bare options sit directly under
|
|
154
|
+
it, a group exists only for a labelled set. Group separators are \`role="presentation"\`, group
|
|
155
|
+
labels are \`aria-hidden\` (each group is named through \`aria-label\`), and the scrollbars are
|
|
156
|
+
\`aria-hidden\` and sit outside the listbox. \`multiple\` adds \`aria-multiselectable\`.
|
|
157
|
+
|
|
158
|
+
The trigger is the only tab stop; the label focuses it without opening the list. Touch
|
|
159
|
+
screen readers move focus onto options instead of using the virtual cursor, so focus entering the
|
|
160
|
+
panel keeps the list open (it closes when focus leaves both the trigger and the panel), Escape on a
|
|
161
|
+
focused option closes it and returns focus to the trigger, and a visually hidden "Close" button at
|
|
162
|
+
the end of the panel gives users with no Escape key a way out.
|
|
163
|
+
|
|
84
164
|
The trigger always has an accessible name: \`label\` names it through the Field label (a string
|
|
85
165
|
label as a \`<label for>\`, a snippet through \`aria-labelledby\`), and without one the trigger
|
|
86
166
|
falls back to \`placeholder\`, then to the catalog's "Select an option". Pass \`label\` whenever
|
|
@@ -89,9 +169,13 @@ rather than repeating the placeholder.
|
|
|
89
169
|
|
|
90
170
|
## Notes
|
|
91
171
|
|
|
92
|
-
- Selection re-focuses the trigger (matches native select behavior)
|
|
93
|
-
- Clicking outside closes via trigger blur; option rows prevent mousedown so the click can land
|
|
94
|
-
-
|
|
172
|
+
- Selection re-focuses the trigger (matches native select behavior); with \`multiple\` the list stays open and focus stays on the trigger
|
|
173
|
+
- Clicking outside closes via trigger blur; option rows prevent mousedown so the click can land. A list opened from outside (\`open\`, \`defaultOpen\`) moves focus to the trigger, so Escape, the arrow keys and clicking away work the same, and it is measured afresh each time it opens
|
|
174
|
+
- A \`<label for>\` pointing at \`id\` names the trigger and focuses it on click
|
|
175
|
+
- The list scrolls (ScrollArea) beyond the viewport when item-aligned, beyond 240px as a dropdown (less when there is less room beside the trigger: the dropdown list is capped by the Popover's \`--available-height\`, so it never runs under an on-screen keyboard or over its trigger); the highlight scrolls into view on keyboard nav
|
|
176
|
+
- While the dropdown is open, the input container carries \`data-popup-side\` (\`bottom\`, \`top\`, or \`none\` when item-aligned) and the panel \`data-side\`, so a theme can flatten the corner where they meet
|
|
177
|
+
- The trigger carries \`data-placeholder\` while nothing is selected and \`data-readonly\` while read-only
|
|
178
|
+
- Option rows are lean: a titled row with a check, using MenuOption's theme, and each option's id comes from a map, so a list of a thousand options opens without a search per row. Option ids are numbered in the order they are first needed, so values that would collide once sanitised (\`a.b\`, \`a_b\`) never share an id
|
|
95
179
|
- The panel covers the trigger while open, so clicking outside (not the trigger) closes it, as with a native select
|
|
96
180
|
|
|
97
181
|
## State contract
|
|
@@ -99,5 +183,6 @@ rather than repeating the placeholder.
|
|
|
99
183
|
- **value**: current bindable editable value.
|
|
100
184
|
- **defaultValue**: initial value used only when \`value\` is omitted.
|
|
101
185
|
- **onValueChange**: called with the new value when the component changes it.
|
|
186
|
+
- **open**: bindable disclosure state; **defaultOpen** initial state; **onOpenChange** reports every user-driven change before it happens and may cancel it; **onAfterOpen** / **onAfterClose** fire once per open and close.
|
|
102
187
|
|
|
103
188
|
`;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { Density } from '../../../types/theme.js';
|
|
2
2
|
import type { Messages } from '../../../i18n/en.js';
|
|
3
|
+
import type { OpenChangeHandler } from '../../../utils/openChange.js';
|
|
3
4
|
import type { InputProps } from '../Field/field.js';
|
|
5
|
+
import type { FieldValidatorResult } from '../Field/field.state.svelte.js';
|
|
4
6
|
import type { SelectThemeProps } from './select.theme.js';
|
|
5
|
-
import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
6
|
-
export type SelectTriggerAttributes = Omit<HTMLButtonAttributes, 'aria-activedescendant' | 'aria-controls' | 'aria-expanded' | 'aria-haspopup' | 'aria-required' | 'class' | 'disabled' | 'id' | 'role' | 'type'>;
|
|
7
|
+
import type { HTMLButtonAttributes, HTMLInputAttributes } from 'svelte/elements';
|
|
8
|
+
export type SelectTriggerAttributes = Omit<HTMLButtonAttributes, 'aria-activedescendant' | 'aria-controls' | 'aria-expanded' | 'aria-haspopup' | 'aria-multiselectable' | 'aria-readonly' | 'aria-required' | 'class' | 'disabled' | 'id' | 'role' | 'type'>;
|
|
7
9
|
export type SelectOption = {
|
|
8
10
|
/** Option value submitted when this item is chosen. */
|
|
9
11
|
value: string;
|
|
@@ -16,15 +18,22 @@ export type SelectOptionGroup = {
|
|
|
16
18
|
/** Optional group label rendered above the group's options. */
|
|
17
19
|
label?: string;
|
|
18
20
|
/** The options of the group. */
|
|
19
|
-
items: SelectOption[];
|
|
21
|
+
items: readonly SelectOption[];
|
|
20
22
|
};
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Flat options and `{ label, items }` groups can be mixed freely. Readonly arrays are accepted,
|
|
25
|
+
* so `as const` data type-checks.
|
|
26
|
+
*/
|
|
27
|
+
export type SelectItems = readonly (SelectOption | SelectOptionGroup)[];
|
|
28
|
+
/** Props shared by the single and the multiple Select. */
|
|
29
|
+
type SelectSharedProps = {
|
|
24
30
|
/** Text shown in the trigger when no value is selected. */
|
|
25
31
|
placeholder?: string;
|
|
26
|
-
/**
|
|
27
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Id of the trigger button, which an external `<label for>` can target. Defaults to a
|
|
34
|
+
* generated id.
|
|
35
|
+
*/
|
|
36
|
+
id?: string;
|
|
28
37
|
/** Items to display — flat `{ value, label }` entries and/or `{ label, items }` groups. */
|
|
29
38
|
items?: SelectItems;
|
|
30
39
|
/**
|
|
@@ -37,13 +46,81 @@ export type SelectProps = InputProps<'select'> & {
|
|
|
37
46
|
/**
|
|
38
47
|
* Open over the trigger with the selected option (or the first, when nothing is selected) on
|
|
39
48
|
* the value, its text lined up with the value's, like a native select. A list taller than the
|
|
40
|
-
* viewport is capped and pre-scrolled to keep the option there
|
|
41
|
-
* the
|
|
49
|
+
* viewport is capped and pre-scrolled to keep the option there, and a `max-height` the theme
|
|
50
|
+
* puts on the list caps it further. Only mouse and keyboard opens align: a list opened by
|
|
51
|
+
* touch is a dropdown below the trigger. `false` opens a dropdown below the trigger always.
|
|
42
52
|
* @default true
|
|
43
53
|
*/
|
|
44
54
|
alignItemWithTrigger?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Adds a button that clears the selection, shown while something is selected and the Select
|
|
57
|
+
* is neither disabled nor read-only. Clearing sets a single Select to `null` and a multiple
|
|
58
|
+
* Select to `[]`, then returns focus to the trigger.
|
|
59
|
+
* @default false
|
|
60
|
+
*/
|
|
61
|
+
clearable?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Autofill token, such as `country` or `address-level1`. The Select then renders a visually
|
|
64
|
+
* hidden text input the browser can autofill; the filled text selects the option whose value
|
|
65
|
+
* matches, else whose label matches (ignoring case and accents). Autofill does not open the
|
|
66
|
+
* list and is ignored while disabled or read-only.
|
|
67
|
+
*/
|
|
68
|
+
autocomplete?: HTMLInputAttributes['autocomplete'];
|
|
45
69
|
/** Native attributes applied to the combobox trigger button. */
|
|
46
70
|
triggerAttrs?: SelectTriggerAttributes;
|
|
47
71
|
/** Per-instance i18n overrides merged over the global catalog. */
|
|
48
72
|
i18n?: Partial<Messages>;
|
|
73
|
+
/** Controls whether the list is open; bindable for two-way control. */
|
|
74
|
+
open?: boolean;
|
|
75
|
+
/** Initial open state when `open` is not provided. */
|
|
76
|
+
defaultOpen?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Called before the list opens or closes, with the requested state and the change details:
|
|
79
|
+
* `reason` (`'trigger-press'`, `'list-navigation'`, `'item-press'`, `'escape-key'`,
|
|
80
|
+
* `'outside-press'`, `'focus-out'`, `'close-press'`, `'imperative-action'`…), the originating `event`, the
|
|
81
|
+
* `trigger` element, the `interaction` type and `cancel()`. Calling `details.cancel()` keeps
|
|
82
|
+
* the list as it is. Inside the callback, `open` still holds the previous state.
|
|
83
|
+
*/
|
|
84
|
+
onOpenChange?: OpenChangeHandler;
|
|
85
|
+
/** Called once per open, after the open transition finishes. */
|
|
86
|
+
onAfterOpen?: () => void;
|
|
87
|
+
/** Called once per close, after the close transition finishes. */
|
|
88
|
+
onAfterClose?: () => void;
|
|
89
|
+
};
|
|
90
|
+
/** The value a Select holds: a string or `null`, or a list of strings when `multiple`. */
|
|
91
|
+
export type SelectValue<Multiple extends boolean = false> = Multiple extends true ? readonly string[] | null : string | null;
|
|
92
|
+
/**
|
|
93
|
+
* Props of Select. The `Multiple` parameter follows the `multiple` prop: a single Select (the
|
|
94
|
+
* default) holds a string or `null`; `<Select multiple>` holds a list of values in item order
|
|
95
|
+
* (field type `select-multiple`), stays open while options are toggled, and a native form submits
|
|
96
|
+
* one hidden input per value under the same `name`.
|
|
97
|
+
*/
|
|
98
|
+
export type SelectProps<Multiple extends boolean = false> = Omit<InputProps<'select'>, 'value' | 'defaultValue' | 'onValueChange' | 'onValidate' | 'theme'> & SelectSharedProps & {
|
|
99
|
+
/**
|
|
100
|
+
* Makes the Select hold several values: `value` is an array in item order (`readonly`
|
|
101
|
+
* arrays are accepted), `onValueChange` receives the new array, and the list stays open
|
|
102
|
+
* while options are toggled with a click, Enter or Space.
|
|
103
|
+
* @default false
|
|
104
|
+
*/
|
|
105
|
+
multiple?: Multiple;
|
|
106
|
+
/** The selected value, bindable: a string or `null`, or an array when `multiple`. */
|
|
107
|
+
value?: SelectValue<Multiple>;
|
|
108
|
+
/** Initial value when `value` is omitted. */
|
|
109
|
+
defaultValue?: SelectValue<Multiple>;
|
|
110
|
+
/** Called whenever the selection changes, with the new value (the values in item order when `multiple`). */
|
|
111
|
+
onValueChange?: (value: Multiple extends true ? string[] | null : string | null) => void;
|
|
112
|
+
/**
|
|
113
|
+
* Validates the value; messages or true mark it invalid, false/null/undefined accept it.
|
|
114
|
+
* It may return a promise, as for every field.
|
|
115
|
+
*/
|
|
116
|
+
onValidate?: (value: Multiple extends true ? string[] : string) => FieldValidatorResult;
|
|
117
|
+
/**
|
|
118
|
+
* With `multiple`: the text the trigger shows for the selected options, which arrive in
|
|
119
|
+
* item order. The default lists the first two labels followed by `+N` for the rest
|
|
120
|
+
* (`Apple, Banana +2`).
|
|
121
|
+
*/
|
|
122
|
+
formatValue?: (options: SelectOption[]) => string;
|
|
123
|
+
/** Theme overrides for the select trigger, dropdown, options, and field container. */
|
|
124
|
+
theme?: SelectThemeProps & InputProps<'select'>['theme'];
|
|
49
125
|
};
|
|
126
|
+
export {};
|
|
@@ -1,54 +1,115 @@
|
|
|
1
|
+
import { type OpenChangeHandler, type OpenChangeInit } from '../../../utils/openChange.js';
|
|
1
2
|
import type { SelectItems, SelectOption } from './select.props.js';
|
|
3
|
+
type SelectValue = string | readonly string[] | null | undefined;
|
|
2
4
|
interface SelectStateOptions {
|
|
3
5
|
id: string;
|
|
4
6
|
/** Items list — reactive getter bridged from the component props. */
|
|
5
7
|
items: SelectItems | undefined;
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Selected value — reactive getter/setter bridged to the field state: a string or `null`, or
|
|
10
|
+
* the array of values when `multiple`.
|
|
11
|
+
*/
|
|
12
|
+
value: SelectValue;
|
|
13
|
+
/** The Select holds a list of values and stays open while options are toggled. */
|
|
14
|
+
multiple?: boolean;
|
|
8
15
|
disabled: boolean | undefined;
|
|
16
|
+
/** Browsable but unchangeable: the list opens, nothing is committed. */
|
|
17
|
+
readOnly?: boolean;
|
|
9
18
|
/** The trigger button — reactive getter bridged to `field.node`, refocused after selection. */
|
|
10
19
|
triggerEl: HTMLElement | null;
|
|
11
20
|
/** Open over the trigger with the selected option on the value, like a native select. */
|
|
12
21
|
alignItemWithTrigger: boolean;
|
|
13
|
-
/** The trigger's value text, the option list root, and its scrolling viewport. */
|
|
22
|
+
/** The trigger's value text, the option list root, and its scrolling viewport (the listbox). */
|
|
14
23
|
valueEl: HTMLElement | null;
|
|
15
24
|
listEl: HTMLElement | null;
|
|
16
25
|
viewportEl: HTMLElement | null;
|
|
26
|
+
/** The panel's content: the listbox and the close button, the elements focus may rest in. */
|
|
27
|
+
contentEl?: HTMLElement | null;
|
|
28
|
+
/** Where the open state lives (a bindable prop); the state keeps its own when absent. */
|
|
29
|
+
openState?: {
|
|
30
|
+
get: () => boolean;
|
|
31
|
+
set: (open: boolean) => void;
|
|
32
|
+
};
|
|
33
|
+
/** Runs before every open or close and may cancel it. */
|
|
34
|
+
onOpenChange?: OpenChangeHandler;
|
|
17
35
|
}
|
|
18
36
|
export declare class SelectState {
|
|
19
37
|
#private;
|
|
20
38
|
id: string;
|
|
21
39
|
items: SelectItems | undefined;
|
|
22
|
-
value:
|
|
40
|
+
value: SelectValue;
|
|
41
|
+
multiple: boolean | undefined;
|
|
23
42
|
disabled: boolean | undefined;
|
|
43
|
+
readOnly: boolean | undefined;
|
|
24
44
|
triggerEl: HTMLElement | null;
|
|
25
45
|
alignItemWithTrigger: boolean;
|
|
26
46
|
valueEl: HTMLElement | null;
|
|
27
47
|
listEl: HTMLElement | null;
|
|
28
48
|
viewportEl: HTMLElement | null;
|
|
29
|
-
|
|
49
|
+
contentEl: HTMLElement | null | undefined;
|
|
50
|
+
openState: SelectStateOptions['openState'];
|
|
51
|
+
onOpenChange: OpenChangeHandler | undefined;
|
|
30
52
|
listboxId: string;
|
|
53
|
+
get isOpen(): boolean;
|
|
54
|
+
set isOpen(open: boolean);
|
|
55
|
+
/**
|
|
56
|
+
* The list is a dropdown below the trigger rather than item-aligned: the prop says so, or a
|
|
57
|
+
* finger opened it (the alignment is for mouse and keyboard).
|
|
58
|
+
*/
|
|
59
|
+
get dropdown(): boolean;
|
|
31
60
|
/** All options, flattened across groups — render order. */
|
|
32
61
|
flatOptions: SelectOption[];
|
|
33
62
|
/** Options as rendered: consecutive bare options bundled into one unlabeled group. */
|
|
34
63
|
renderGroups: {
|
|
35
64
|
label?: string;
|
|
36
|
-
items: SelectOption[];
|
|
65
|
+
items: readonly SelectOption[];
|
|
37
66
|
}[];
|
|
38
|
-
|
|
67
|
+
/** The enabled values in render order: what the highlight and the typeahead move over. */
|
|
68
|
+
enabledValues: string[];
|
|
69
|
+
/** The selected values, in the order the value holds them. */
|
|
70
|
+
selectedValues: string[];
|
|
71
|
+
/** The selected values as a set, so a row asks whether it is selected in constant time. */
|
|
72
|
+
selectedSet: Set<string>;
|
|
73
|
+
/** The selected options in render order (the value of a single Select, at most one). */
|
|
74
|
+
selectedOptions: SelectOption[];
|
|
75
|
+
/** The first selected option in render order: what the trigger shows for a single Select. */
|
|
76
|
+
selectedOption: SelectOption;
|
|
77
|
+
/**
|
|
78
|
+
* The option the list opens on: the first enabled selected one in render order, found in one
|
|
79
|
+
* pass over the options (a Set lookup per option, never a search per selected value).
|
|
80
|
+
*/
|
|
81
|
+
anchorOption: SelectOption | undefined;
|
|
39
82
|
/** Keyboard navigation: value-driven virtual focus — DOM focus stays on the trigger. */
|
|
40
83
|
nav: {
|
|
41
84
|
readonly highlighted: string | undefined;
|
|
85
|
+
readonly highlightDetails: import("../../../utils/useListNavigation.svelte.js").HighlightDetails;
|
|
42
86
|
readonly activeDescendant: string | undefined;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
87
|
+
optionId: (value: string) => string | undefined;
|
|
88
|
+
typeahead: {
|
|
89
|
+
readonly isTyping: boolean;
|
|
90
|
+
reset: () => void;
|
|
91
|
+
} | null;
|
|
92
|
+
setHighlighted: (value: string | undefined, details?: import("../../../utils/useListNavigation.svelte.js").HighlightDetails) => void;
|
|
93
|
+
pointerHighlight: (value: string | undefined, event?: MouseEvent | PointerEvent) => boolean;
|
|
94
|
+
highlight: (value: string | undefined, details?: import("../../../utils/useListNavigation.svelte.js").HighlightDetails) => void;
|
|
95
|
+
move: (delta: number, details?: import("../../../utils/useListNavigation.svelte.js").HighlightDetails) => void;
|
|
96
|
+
first: (details?: import("../../../utils/useListNavigation.svelte.js").HighlightDetails) => void;
|
|
97
|
+
last: (details?: import("../../../utils/useListNavigation.svelte.js").HighlightDetails) => void;
|
|
98
|
+
reanchor: () => void;
|
|
99
|
+
scrollToHighlighted: () => void;
|
|
48
100
|
onKeydown: (event: KeyboardEvent) => void;
|
|
49
101
|
};
|
|
50
102
|
constructor(options: SelectStateOptions);
|
|
103
|
+
/**
|
|
104
|
+
* DOM id of an option. Each value gets the next number the first time it is asked for, so
|
|
105
|
+
* values that would collide once sanitised ('a.b', 'a_b') never share an id, and a lookup costs
|
|
106
|
+
* the same however long the list is.
|
|
107
|
+
*/
|
|
51
108
|
optionId: (value: string) => string;
|
|
109
|
+
/** Whether `value` is selected. */
|
|
110
|
+
isSelected: (value: string) => boolean;
|
|
111
|
+
/** Whether a node is the trigger or inside the panel: focus there keeps the list open. */
|
|
112
|
+
contains: (node: EventTarget | null) => boolean;
|
|
52
113
|
/**
|
|
53
114
|
* Popover `positionPanel`: places the open panel over the trigger with the selected option (or
|
|
54
115
|
* the first one) on the value, and sizes and scrolls the list to keep it there. `null` falls
|
|
@@ -62,12 +123,42 @@ export declare class SelectState {
|
|
|
62
123
|
y: number;
|
|
63
124
|
minWidth: number;
|
|
64
125
|
} | null;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
126
|
+
/**
|
|
127
|
+
* Opens or closes the list. `onOpenChange` runs first and may cancel; returns whether the
|
|
128
|
+
* change went through (or was already the state).
|
|
129
|
+
*/
|
|
130
|
+
setOpen: (next: boolean, init?: OpenChangeInit) => boolean;
|
|
131
|
+
open: (init?: OpenChangeInit) => boolean;
|
|
132
|
+
close: (init?: OpenChangeInit) => boolean;
|
|
133
|
+
toggle: (init?: OpenChangeInit) => boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Chooses an option: a single Select takes it, closes and refocuses the trigger; a multiple
|
|
136
|
+
* Select toggles it and stays open. A read-only Select commits nothing.
|
|
137
|
+
*/
|
|
138
|
+
activate: (value: string, event?: Event) => void;
|
|
139
|
+
/** @deprecated Use `activate`. */
|
|
68
140
|
selectValue: (value: string) => void;
|
|
69
|
-
/**
|
|
70
|
-
|
|
141
|
+
/** Empties the selection: `null` for a single Select, `[]` for a multiple one. */
|
|
142
|
+
clear: () => void;
|
|
143
|
+
/**
|
|
144
|
+
* A label elsewhere on the page was clicked: the browser forwards the click to the trigger, which
|
|
145
|
+
* should take focus, as a label focuses a native select, rather than toggle the list.
|
|
146
|
+
*/
|
|
147
|
+
noteLabelClick: () => void;
|
|
148
|
+
/** Whether the click now arriving at the trigger is a label's: consumed once. */
|
|
149
|
+
consumeLabelClick: () => boolean;
|
|
150
|
+
/** A press on the trigger: remembers the pointer type so a touch open can be told from a mouse one. */
|
|
151
|
+
onTriggerPointerDown: (event: PointerEvent) => void;
|
|
152
|
+
/** Focus left the trigger: the list closes, unless focus moved into the panel (a screen reader's cursor). */
|
|
153
|
+
onTriggerBlur: (event: FocusEvent) => void;
|
|
154
|
+
/** Focus left the panel: the list closes unless it went back to the trigger or stayed inside. */
|
|
155
|
+
onPanelFocusOut: (event: FocusEvent) => void;
|
|
156
|
+
/** Keys while focus rests in the panel (a screen reader moved it onto an option). */
|
|
157
|
+
onPanelKeydown: (event: KeyboardEvent) => void;
|
|
158
|
+
/** The visually hidden close button, for touch screen-reader users with no Escape key. */
|
|
159
|
+
onCloseButton: (event: MouseEvent) => void;
|
|
160
|
+
/** Keydown handler for the trigger — closed: open on ArrowUp/Down/Enter/Space and type to pick;
|
|
161
|
+
* open: Escape/Tab close, Enter/Space choose, arrows/Home/End/typing move the highlight. */
|
|
71
162
|
onTriggerKeydown: (event: KeyboardEvent) => void;
|
|
72
163
|
}
|
|
73
164
|
export {};
|