entasis 0.10.2 → 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 +258 -32
- package/dist/components/Form/Field/Field.svelte.d.ts +15 -6
- 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 +75 -10
- 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 +117 -40
- package/dist/components/Form/Field/field.state.svelte.js +525 -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 +49 -15
- 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 +96 -12
- package/dist/components/Form/Form/FormFieldRenderer.svelte.d.ts +3 -2
- package/dist/components/Form/Form/FormInputRenderer.svelte +7 -0
- package/dist/components/Form/Form/form.d.ts +84 -11
- package/dist/components/Form/Form/form.mcp.d.ts +1 -1
- package/dist/components/Form/Form/form.mcp.js +178 -12
- package/dist/components/Form/Form/form.props.d.ts +32 -1
- package/dist/components/Form/Form/form.registry.d.ts +28 -0
- package/dist/components/Form/Form/form.registry.js +59 -0
- package/dist/components/Form/Form/form.state.svelte.d.ts +1186 -420
- package/dist/components/Form/Form/form.state.svelte.js +322 -28
- package/dist/components/Form/Form/index.d.ts +4 -1
- package/dist/components/Form/Form/index.js +1 -0
- package/dist/components/Form/Form/visibility.d.ts +3130 -1863
- 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 +1050 -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 +231 -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,7 +1,7 @@
|
|
|
1
1
|
export const numberInputDescription = `
|
|
2
2
|
# NumberInput Component
|
|
3
3
|
|
|
4
|
-
The NumberInput component is a numeric input
|
|
4
|
+
The NumberInput component is a locale-aware numeric input: a text input that reads and shows numbers the way the user writes them (\`1 234,5\`, \`١٢٣٫٤\`, \`R$ 12,50\`), with +/- steppers, keyboard stepping, min/max validation, and a hidden input that posts the plain number to a native form.
|
|
5
5
|
|
|
6
6
|
## Basic Usage
|
|
7
7
|
|
|
@@ -18,12 +18,20 @@ The NumberInput component is a numeric input field with +/- controls, min/max va
|
|
|
18
18
|
Extends all Field component props plus:
|
|
19
19
|
|
|
20
20
|
### Core Props
|
|
21
|
-
- **value**: number (bindable) - Input value
|
|
22
|
-
- **min**: number - Minimum allowed value
|
|
23
|
-
- **max**: number - Maximum allowed value
|
|
24
|
-
- **step**: number -
|
|
25
|
-
- **increment**: number
|
|
21
|
+
- **value**: number | null (bindable) - Input value. Only text that is a complete number is published: \`-\` or \`.\` while typing leave the value as it was, an emptied input is \`null\`.
|
|
22
|
+
- **min**: number - Minimum allowed value. Stepping stops there; a typed lower value is kept and reports a range error. A non-negative minimum refuses the minus sign.
|
|
23
|
+
- **max**: number - Maximum allowed value. Stepping stops there; a typed higher value is kept and reports a range error.
|
|
24
|
+
- **step**: number (default: 1) - Size of one step by the arrow keys, the +/- buttons and the wheel
|
|
25
|
+
- **increment**: number - Alias of step that wins when both are set
|
|
26
|
+
- **largeStep**: number (default: 10 x step) - Step of Shift+Arrow, PageUp and PageDown
|
|
27
|
+
- **smallStep**: number (default: step / 10) - Step of Alt+Arrow
|
|
28
|
+
- **snapOnStep**: boolean (default: false) - Snap the value to the step grid (counted from min, else 0) when stepping, before clamping: 7 with a step of 5 moves to 10. Without it a step adds or subtracts the step.
|
|
29
|
+
- **wheelStep**: boolean (default: false) - Step with the mouse wheel while the input is focused and hovered (vertical scroll, or horizontal with Shift). The wheel never changes the value otherwise.
|
|
26
30
|
- **showControls**: boolean (default: true) - Whether to render the +/- buttons
|
|
31
|
+
- **format**: Intl.NumberFormatOptions - Currency, percent and unit styles, fraction digits, grouping. The value is shown formatted on blur. Without a rounding option the value keeps its full precision; with one (maximumFractionDigits, maximumSignificantDigits...) the committed value is rounded the way the text is. Compact notation is not supported for entry.
|
|
32
|
+
- **locale**: string (default: the i18n catalog locale) - BCP 47 locale of the shown and parsed text. Digits of other numeral systems (Arabic-Indic, Persian, Devanagari, Bengali, Thai, full-width, Han) are read in any locale.
|
|
33
|
+
- **onValueCommit**: ({ value, reason }) => void - Called when an edit ends. reason is 'blur' (typed text committed on blur), 'keyboard' (Enter on typed text, and each arrow, Page or Home/End step), 'wheel' (each wheel step) or 'step' (release of a stepper button: one call for a whole press-and-hold). A blur without typing reports nothing.
|
|
34
|
+
- **inputAttrs**: native attributes of the text input (autocomplete, aria-label, aria-roledescription, inputmode, data-*, event handlers). Consumer handlers run before the built-in ones, and preventDefault cancels the built-in behaviour. The component keeps the role, value, type and form attributes.
|
|
27
35
|
|
|
28
36
|
### Display Props
|
|
29
37
|
- **placeholder**: string - Placeholder text
|
|
@@ -34,6 +42,8 @@ Extends all Field component props plus:
|
|
|
34
42
|
- **error**: string - Error message
|
|
35
43
|
- **required**: boolean - Mark as required
|
|
36
44
|
- **disabled**: boolean - Disable input
|
|
45
|
+
- **readOnly**: boolean - Focusable and announced as read-only; typing, pasting, stepping and the wheel are refused, and the value still validates and submits
|
|
46
|
+
- **name**: string - Posted by a hidden input as the plain number (\`1234.5\`), not the formatted text; an empty or disabled input posts nothing
|
|
37
47
|
- **size**: 'small' | 'normal' | 'large' - Input size
|
|
38
48
|
|
|
39
49
|
### Content Slots
|
|
@@ -52,10 +62,11 @@ Extends all Field component props plus:
|
|
|
52
62
|
<Description />
|
|
53
63
|
<InputContainer>
|
|
54
64
|
<Prefix />
|
|
55
|
-
<Input type="
|
|
65
|
+
<Input type="text" role="spinbutton" inputmode="decimal" />
|
|
66
|
+
<HiddenInput type="hidden" name />
|
|
56
67
|
<Controls>
|
|
57
|
-
<Button label="Decrease value" />
|
|
58
|
-
<Button label="Increase value" />
|
|
68
|
+
<Button label="Decrease value" tabindex="-1" />
|
|
69
|
+
<Button label="Increase value" tabindex="-1" />
|
|
59
70
|
</Controls>
|
|
60
71
|
<Suffix />
|
|
61
72
|
</InputContainer>
|
|
@@ -84,15 +95,25 @@ Extends all Field component props plus:
|
|
|
84
95
|
/>
|
|
85
96
|
\`\`\`
|
|
86
97
|
|
|
87
|
-
###
|
|
98
|
+
### Locale, currency and percent
|
|
88
99
|
\`\`\`svelte
|
|
89
|
-
<NumberInput
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
100
|
+
<NumberInput label="Prix" locale="fr" format={{ style: 'currency', currency: 'EUR' }} bind:value={price} />
|
|
101
|
+
<NumberInput label="Discount" format={{ style: 'percent', maximumFractionDigits: 0 }} step={0.01} bind:value={discount} />
|
|
102
|
+
\`\`\`
|
|
103
|
+
|
|
104
|
+
\`1 234,5\` typed in a French input publishes 1234.5; a percent of \`12.7\` rounds to 13% (the value 0.13) on blur.
|
|
105
|
+
|
|
106
|
+
### Large steps and snapping
|
|
107
|
+
\`\`\`svelte
|
|
108
|
+
<NumberInput label="Seats" bind:value={seats} step={5} largeStep={50} snapOnStep min={0} />
|
|
109
|
+
\`\`\`
|
|
110
|
+
|
|
111
|
+
### Native form
|
|
112
|
+
\`\`\`svelte
|
|
113
|
+
<form method="POST">
|
|
114
|
+
<NumberInput name="amount" locale="de" value={1234.5} />
|
|
115
|
+
</form>
|
|
116
|
+
<!-- posts amount=1234.5 -->
|
|
96
117
|
\`\`\`
|
|
97
118
|
|
|
98
119
|
### Custom Button Increment
|
|
@@ -229,30 +250,34 @@ Extends all Field component props plus:
|
|
|
229
250
|
NumberInput automatically validates:
|
|
230
251
|
- **min**: Value must be >= min
|
|
231
252
|
- **max**: Value must be <= max
|
|
232
|
-
- **step**: Value must align with step increments
|
|
233
253
|
- **required**: Non-null value
|
|
234
254
|
|
|
255
|
+
The range messages come from the i18n catalog with the bound formatted in the input's locale and format (\`Enter a value of 1.000 or less\`); override them with \`messages={{ rangeOverflow: (max) => ... }}\`.
|
|
256
|
+
|
|
235
257
|
## Keyboard Controls
|
|
236
258
|
|
|
237
|
-
- **Arrow Up**:
|
|
238
|
-
- **Arrow Down**:
|
|
239
|
-
- **
|
|
240
|
-
- **
|
|
259
|
+
- **Arrow Up / Arrow Down**: step by step
|
|
260
|
+
- **Shift + Arrow, Page Up / Page Down**: step by largeStep (default 10 x step)
|
|
261
|
+
- **Alt + Arrow**: step by smallStep (default step / 10)
|
|
262
|
+
- **Home / End**: jump to min / max when set (otherwise they move the caret)
|
|
263
|
+
- **Enter**: formats and commits the typed text; a surrounding Form still moves on or submits
|
|
264
|
+
|
|
265
|
+
The +/- buttons step by the same step, repeat while pressed (after 400 ms, every 60 ms), stop at the bounds and when the input becomes disabled or read-only, and keep focus in the input. They are out of the tab order (tabindex -1) and point at the input with \`aria-controls\`.
|
|
241
266
|
|
|
242
267
|
## Accessibility
|
|
243
268
|
|
|
244
269
|
- Proper label association
|
|
245
|
-
-
|
|
246
|
-
-
|
|
247
|
-
-
|
|
248
|
-
-
|
|
270
|
+
- The input has role spinbutton with aria-valuenow, aria-valuemin, aria-valuemax and aria-valuetext (the shown text)
|
|
271
|
+
- Read-only is announced with the readonly attribute and aria-readonly
|
|
272
|
+
- Keyboard stepping with large, small and bound keys
|
|
273
|
+
- The +/- buttons are labelled and activate with a keyboard click, but add no tab stops
|
|
249
274
|
|
|
250
275
|
## Notes
|
|
251
276
|
|
|
252
|
-
-
|
|
253
|
-
-
|
|
254
|
-
-
|
|
255
|
-
-
|
|
277
|
+
- The input is type text with inputmode decimal (numeric for non-negative integers), so the browser's locale never decides the separators. Characters that cannot belong to a number in the locale and format are refused, a paste is inserted at the caret, and text that is not a number yet (\`-\`) is not published.
|
|
278
|
+
- Intermediate text is kept as typed while focused; on blur or Enter it is rounded to the format, formatted for the locale and reported.
|
|
279
|
+
- Out-of-range typed values are kept and flagged, not clamped; stepping and Home/End clamp.
|
|
280
|
+
- The mouse wheel does nothing unless wheelStep is set.
|
|
256
281
|
- Can be styled with prefix/suffix for units
|
|
257
282
|
|
|
258
283
|
## Theme Customization
|
|
@@ -1,18 +1,78 @@
|
|
|
1
|
+
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
1
2
|
import type { InputProps } from '../Field/field.js';
|
|
2
3
|
import type { NumberInputThemeProps } from './numberInput.theme.js';
|
|
4
|
+
/**
|
|
5
|
+
* What ended an edit of a NumberInput: `blur` and `keyboard` (Enter) commit typed text, a
|
|
6
|
+
* `keyboard` arrow, Page or Home/End key and a `wheel` notch each commit one step, and `step`
|
|
7
|
+
* is the release of a stepper button (or a keyboard click on one).
|
|
8
|
+
*/
|
|
9
|
+
export type NumberInputCommitReason = 'blur' | 'keyboard' | 'step' | 'wheel';
|
|
10
|
+
/** Details `onValueCommit` receives. */
|
|
11
|
+
export type NumberInputCommitDetail = {
|
|
12
|
+
/** The committed value, after Intl rounding; `null` when the field is empty. */
|
|
13
|
+
value: number | null;
|
|
14
|
+
/** What ended the edit. */
|
|
15
|
+
reason: NumberInputCommitReason;
|
|
16
|
+
};
|
|
17
|
+
/** Native attributes of the text input; the component keeps its role, value and handlers. */
|
|
18
|
+
export type NumberInputInputAttributes = Omit<HTMLInputAttributes, 'class' | 'disabled' | 'form' | 'id' | 'max' | 'min' | 'name' | 'placeholder' | 'readonly' | 'required' | 'role' | 'step' | 'type' | 'value'>;
|
|
3
19
|
export type NumberInputProps = InputProps<'number'> & {
|
|
4
20
|
/** Hint text shown in the empty number input. */
|
|
5
21
|
placeholder?: string;
|
|
6
|
-
/** Minimum allowed value;
|
|
22
|
+
/** Minimum allowed value; stepping stops there, and a typed lower value reports a range error. */
|
|
7
23
|
min?: number;
|
|
8
|
-
/** Maximum allowed value;
|
|
24
|
+
/** Maximum allowed value; stepping stops there, and a typed higher value reports a range error. */
|
|
9
25
|
max?: number;
|
|
10
|
-
/**
|
|
26
|
+
/** Size of one step by the arrow keys, the +/- buttons and the wheel. Defaults to 1. */
|
|
11
27
|
step?: number;
|
|
12
|
-
/**
|
|
28
|
+
/** Alias of `step` that wins when both are set. */
|
|
13
29
|
increment?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Step of Shift+Arrow, PageUp and PageDown. Defaults to ten times the step.
|
|
32
|
+
*/
|
|
33
|
+
largeStep?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Step of Alt+Arrow. Defaults to a tenth of the step.
|
|
36
|
+
*/
|
|
37
|
+
smallStep?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Snaps the value to the step grid (counted from `min`, else 0) when stepping, before it is
|
|
40
|
+
* clamped, so a value of 7 with a step of 5 moves to 10. Without it a step adds or subtracts
|
|
41
|
+
* the step from the current value.
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
snapOnStep?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Steps the value with the mouse wheel while the input is focused and hovered: a vertical
|
|
47
|
+
* scroll, or a horizontal one with Shift. The wheel never changes the value otherwise.
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
wheelStep?: boolean;
|
|
14
51
|
/** Whether to render the decrement and increment buttons. */
|
|
15
52
|
showControls?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* `Intl.NumberFormat` options for the displayed text and for parsing what is typed: currency,
|
|
55
|
+
* percent and unit styles, fraction digits, grouping. The input shows the value formatted this
|
|
56
|
+
* way when it loses focus. Without a rounding option the value keeps its full precision;
|
|
57
|
+
* with one (`maximumFractionDigits`, `maximumSignificantDigits`...), the value is rounded
|
|
58
|
+
* the way the text is when it is committed.
|
|
59
|
+
*/
|
|
60
|
+
format?: Intl.NumberFormatOptions;
|
|
61
|
+
/**
|
|
62
|
+
* BCP 47 locale of the displayed and parsed text (`fr`, `ar-EG`, `pt-BR`). Defaults to the
|
|
63
|
+
* locale of the i18n catalog. Digits of other numeral systems are read in any locale.
|
|
64
|
+
*/
|
|
65
|
+
locale?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Called when an edit ends: text committed on blur or Enter, each keyboard or wheel step, and
|
|
68
|
+
* the release of a stepper button (one call for a whole press-and-hold).
|
|
69
|
+
*/
|
|
70
|
+
onValueCommit?: (detail: NumberInputCommitDetail) => void;
|
|
71
|
+
/**
|
|
72
|
+
* Native attributes for the text input: `autocomplete`, `aria-label`, `aria-roledescription`,
|
|
73
|
+
* `inputmode`, data attributes and event handlers, which run before the built-in ones.
|
|
74
|
+
*/
|
|
75
|
+
inputAttrs?: NumberInputInputAttributes;
|
|
16
76
|
/** Theme overrides for the number input element and its field container. */
|
|
17
77
|
theme?: NumberInputThemeProps & InputProps<'number'>['theme'];
|
|
18
78
|
};
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
import { eyeIcon } from '../../Icons/eye.js';
|
|
11
11
|
import { useI18n } from '../../../i18n/context.svelte.js';
|
|
12
12
|
|
|
13
|
+
const DEFAULT_MIN_LENGTH = 6;
|
|
14
|
+
|
|
13
15
|
let {
|
|
14
16
|
defaultValue = null,
|
|
15
17
|
value = $bindable(),
|
|
@@ -19,15 +21,26 @@
|
|
|
19
21
|
placeholder = '',
|
|
20
22
|
theme,
|
|
21
23
|
disabled,
|
|
24
|
+
readOnly,
|
|
25
|
+
messages,
|
|
22
26
|
name,
|
|
23
27
|
onValidate,
|
|
24
28
|
onValueChange,
|
|
25
29
|
visible,
|
|
30
|
+
autocomplete,
|
|
31
|
+
minLength,
|
|
32
|
+
inputAttrs,
|
|
26
33
|
...rest
|
|
27
34
|
}: PasswordInputProps = $props();
|
|
28
35
|
const t = $derived(useI18n());
|
|
29
36
|
if (value === undefined) value = untrack(() => defaultValue);
|
|
30
37
|
|
|
38
|
+
// A sign-in field must accept whatever password the account already has, so the default
|
|
39
|
+
// minimum is skipped for `current-password`. An explicit `minLength` always applies.
|
|
40
|
+
const resolvedMinLength = $derived(
|
|
41
|
+
minLength ?? (autocomplete === 'current-password' ? 0 : DEFAULT_MIN_LENGTH)
|
|
42
|
+
);
|
|
43
|
+
|
|
31
44
|
let showPassword = $state(false);
|
|
32
45
|
const id = $props.id();
|
|
33
46
|
|
|
@@ -58,6 +71,12 @@
|
|
|
58
71
|
set disabled(v: boolean | undefined) {
|
|
59
72
|
disabled = v;
|
|
60
73
|
},
|
|
74
|
+
get readOnly() {
|
|
75
|
+
return readOnly;
|
|
76
|
+
},
|
|
77
|
+
get messages() {
|
|
78
|
+
return messages;
|
|
79
|
+
},
|
|
61
80
|
get required() {
|
|
62
81
|
return required;
|
|
63
82
|
},
|
|
@@ -73,6 +92,13 @@
|
|
|
73
92
|
get visible() {
|
|
74
93
|
return visible;
|
|
75
94
|
},
|
|
95
|
+
// The field's own minimum replaces the built-in `password` schema's 6 characters (kept for
|
|
96
|
+
// custom password controls and `fieldSchemas`), so `isValid`, `validate()` and Form
|
|
97
|
+
// submission agree. An empty value reports presence alone, and `onValidate` runs only once
|
|
98
|
+
// the length passes.
|
|
99
|
+
get minLength() {
|
|
100
|
+
return resolvedMinLength;
|
|
101
|
+
},
|
|
76
102
|
type: 'password'
|
|
77
103
|
});
|
|
78
104
|
|
|
@@ -111,10 +137,11 @@
|
|
|
111
137
|
{...rest}
|
|
112
138
|
>
|
|
113
139
|
<input
|
|
114
|
-
|
|
140
|
+
{...inputAttrs}
|
|
115
141
|
type={showPassword ? 'text' : 'password'}
|
|
116
142
|
{id}
|
|
117
143
|
name={field.name}
|
|
144
|
+
{autocomplete}
|
|
118
145
|
bind:value={field.value}
|
|
119
146
|
bind:this={field.node}
|
|
120
147
|
{placeholder}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default as PasswordInput } from './Password.svelte';
|
|
2
|
-
export type { PasswordInputProps } from './passwordInput.props.js';
|
|
2
|
+
export type { PasswordInputAttributes, PasswordInputAutocomplete, PasswordInputProps } from './passwordInput.props.js';
|
|
3
3
|
export { passwordInputTheme, setPasswordInputTheme, usePasswordInputTheme, type PasswordInputTheme, type PasswordInputThemeProps } from './passwordInput.theme.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const passwordInputDescription = "\n# PasswordInput Component\n\nThe PasswordInput component is a specialized text input for password entry with visibility toggle functionality.\n\n## Basic Usage\n\n```svelte\n<script>\n\tlet password = $state('');\n</script>\n\n<PasswordInput label=\"Password\" bind:value={password} />\n```\n\n## Props\n\nExtends all TextInput component props:\n\n### Core Props\n- **value**: string (bindable) - Password value\n- **placeholder**: string - Placeholder text\n\n### Field Props (inherited)\n- **label**: string | Snippet - Field label\n- **description**: string | Snippet - Helper text\n- **error**: string - Error message\n- **required**: boolean - Mark as required\n- **disabled**: boolean - Disable input\n- **size**: 'small' | 'normal' | 'large'\n\n### Content Slots\n- **prefix**: Snippet - Content before input (e.g., lock icon)\n\n### Styling Props\n- **class**: string - Additional CSS classes\n- **theme**: ComponentTheme - Custom theme overrides\n\n## Structure\n\n```\n<Field>\n\t<Label />\n\t<Description />\n\t<InputContainer>\n\t\t<Prefix />\n\t\t<Input type=\"password\" />\n\t\t<VisibilityToggle />\n\t</InputContainer>\n\t<Error />\n</Field>\n```\n\n## Examples\n\n### Basic Password Input\n```svelte\n<script>\n\tlet password = $state('');\n</script>\n\n<PasswordInput label=\"Password\" bind:value={password} />\n```\n\n### Required Password\n```svelte\n<PasswordInput \n\tlabel=\"Password\"\n\tbind:value={password}\n\trequired\n/>\n```\n\n### With Placeholder\n```svelte\n<PasswordInput \n\tlabel=\"Password\"\n\tplaceholder=\"Enter your password\"\n\tbind:value={password}\n/>\n```\n\n### With Description\n```svelte\n<PasswordInput \n\tlabel=\"New Password\"\n\tdescription=\"Must be at least 8 characters\"\n\tbind:value={password}\n/>\n```\n\n### With Prefix Icon\n```svelte\n<script lang=\"ts\">\n\timport { lockIcon } from 'entasis/icons/lock';\n\n\tlet password = $state('');\n</script>\n\n<PasswordInput label=\"Password\" bind:value={password}>\n\t{#snippet prefix()}\n\t\t{@render lockIcon()}\n\t{/snippet}\n</PasswordInput>\n```\n\n### With Validation\n```svelte\n<script>\n\tlet password = $state('');\n\tlet error = $derived(\n\t\tpassword && password.length < 8 \n\t\t\t? 'Password must be at least 8 characters'\n\t\t\t: ''\n\t);\n</script>\n\n<PasswordInput \n\tlabel=\"Password\"\n\tbind:value={password}\n\terror={error}\n/>\n```\n\n### Login Form\n```svelte\n<script>\n\tlet email = $state('');\n\tlet password = $state('');\n\t\n\tfunction handleLogin() {\n\t\t// Login logic\n\t}\n</script>\n\n<form onsubmit={handleLogin}>\n\t<TextInput \n\t\ttype=\"email\"\n\t\tlabel=\"Email\"\n\t\tbind:value={email}\n\t\trequired\n\t/>\n\t\n\t<PasswordInput \n\t\tlabel=\"Password\"\n\t\tbind:value={password}\n\t\trequired\n\t/>\n\t\n\t<Button type=\"submit\" fullWidth>Login</Button>\n</form>\n```\n\n### Password Strength Indicator\n```svelte\n<script>\n\tlet password = $state('');\n\t\n\tfunction getPasswordStrength(pwd) {\n\t\tif (!pwd) return { label: '', strength: 0 };\n\t\tif (pwd.length < 6) return { label: 'Weak', strength: 1 };\n\t\tif (pwd.length < 10) return { label: 'Medium', strength: 2 };\n\t\treturn { label: 'Strong', strength: 3 };\n\t}\n\t\n\tlet strength = $derived(getPasswordStrength(password));\n</script>\n\n<PasswordInput \n\tlabel=\"Password\"\n\tbind:value={password}\n\tdescription=\"Strength: {strength.label}\"\n/>\n\n<Meter \n\tvalue={strength.strength * 33.33}\n\tmax={100}\n/>\n```\n\n### Change Password Form\n```svelte\n<script>\n\tlet currentPassword = $state('');\n\tlet newPassword = $state('');\n\tlet confirmPassword = $state('');\n\t\n\tlet passwordMismatch = $derived(\n\t\tnewPassword && confirmPassword && newPassword !== confirmPassword\n\t);\n</script>\n\n<form>\n\t<PasswordInput \n\t\tlabel=\"Current Password\"\n\t\tbind:value={currentPassword}\n\t\trequired\n\t/>\n\t\n\t<PasswordInput \n\t\tlabel=\"New Password\"\n\t\tbind:value={newPassword}\n\t\tdescription=\"Must be at least 8 characters\"\n\t\trequired\n\t/>\n\t\n\t<PasswordInput \n\t\tlabel=\"Confirm Password\"\n\t\tbind:value={confirmPassword}\n\t\terror={passwordMismatch ? 'Passwords do not match' : ''}\n\t\trequired\n\t/>\n\t\n\t<Button type=\"submit\">Update Password</Button>\n</form>\n```\n\n### Sign Up Form\n```svelte\n<script>\n\tlet formData = $state({\n\t\tusername: '',\n\t\temail: '',\n\t\tpassword: '',\n\t\tconfirmPassword: ''\n\t});\n\t\n\tfunction validatePassword() {\n\t\tif (formData.password.length < 8) {\n\t\t\treturn 'Password must be at least 8 characters';\n\t\t}\n\t\tif (!/[A-Z]/.test(formData.password)) {\n\t\t\treturn 'Password must contain an uppercase letter';\n\t\t}\n\t\tif (!/[0-9]/.test(formData.password)) {\n\t\t\treturn 'Password must contain a number';\n\t\t}\n\t\treturn '';\n\t}\n\t\n\tlet passwordError = $derived(validatePassword());\n</script>\n\n<form>\n\t<TextInput \n\t\tlabel=\"Username\"\n\t\tbind:value={formData.username}\n\t\trequired\n\t/>\n\t\n\t<TextInput \n\t\ttype=\"email\"\n\t\tlabel=\"Email\"\n\t\tbind:value={formData.email}\n\t\trequired\n\t/>\n\t\n\t<PasswordInput \n\t\tlabel=\"Password\"\n\t\tbind:value={formData.password}\n\t\terror={passwordError}\n\t\trequired\n\t/>\n\t\n\t<PasswordInput \n\t\tlabel=\"Confirm Password\"\n\t\tbind:value={formData.confirmPassword}\n\t\terror={formData.password !== formData.confirmPassword ? 'Passwords must match' : ''}\n\t\trequired\n\t/>\n\t\n\t<Button type=\"submit\" disabled={!!passwordError}>\n\t\tCreate Account\n\t</Button>\n</form>\n```\n\n## Visibility Toggle\n\nThe visibility toggle button:\n- Shows an eye icon when password is hidden\n- Shows an eye-off icon when password is visible\n- Toggles between `type=\"password\"` and `type=\"text\"`\n- Is always rendered; there is no prop to hide it\n\n## Validation\n\nPasswordInput supports:\n- **required**: Non-empty password\n- Custom validation via error prop\n- Pattern matching for complexity requirements\n\n## Security Best Practices\n\n- Never show password in plain text by default\n- Always use HTTPS in production\n- Consider password strength requirements\n- Don't limit password length unnecessarily\n- Support password managers (autocomplete=\"current-password\" or \"new-password\")\n\n## Accessibility\n\n- Proper label association\n- ARIA attributes for show/hide button\n- Password visibility state announced\n- Keyboard accessible toggle\n- Error messages announced to screen readers\n\n## Notes\n\n- Extends TextInput with password-specific features\n- Visibility toggle is accessible via keyboard\n- Type switches between \"password\" and \"text\"\n- Works with browser password managers\n- All TextInput features are available\n\n## Theme Customization\n\nThe PasswordInput component uses a theme object that can be customized using the `theme` prop or by setting a global theme. It shares the same theme structure as TextInput.\n\n### Theme Structure\n\nThe theme object contains the following parts:\n- **input**: Input element styles\n- **inputContainer**: Input container wrapper styles\n\n### Available Variants\n\n**input**:\n- base: Base classes applied to the input element\n- Variants:\n - size: 'small' | 'normal' | 'large' - Text size\n - disabled: boolean - Disabled state styling\n\n**inputContainer**:\n- base: Base classes for the input container (handles focus states, borders, padding)\n- Variants:\n - size: 'small' | 'normal' | 'large' - Size-based styling\n - disabled: boolean - Disabled state styling\n\n### Usage Examples\n\n**Basic Theme Override**:\n```svelte\n<PasswordInput \n label=\"Password\"\n bind:value={password}\n theme={{\n inputContainer: {\n base: 'border-2 rounded-lg',\n size: {\n normal: 'px-4 py-2'\n }\n },\n input: {\n size: {\n normal: 'text-base'\n }\n }\n }}\n/>\n```\n\n**Focus State Customization**:\n\nTo recolor every focus ring in the app at once, set `designTokens.focusColor` on `Theme`\ninstead of overriding per component. `ring-focus` is the focus state role and falls back to the\ncurrent role, so it never hard-pins a color.\n\n```svelte\n<PasswordInput \n label=\"Secure Password\"\n bind:value={password}\n theme={{\n inputContainer: {\n base: 'focus-within:ring-2 focus-within:ring-focus/50 focus-within:border-focus'\n }\n }}\n/>\n```\n\n**Global Theme Setting**:\n```svelte\n<script>\n import { setPasswordInputTheme } from './index.ts';\n \n setPasswordInputTheme({\n inputContainer: {\n base: 'rounded-lg border-2 transition-all',\n size: {\n normal: 'px-4 py-2'\n }\n },\n input: {\n base: 'placeholder:text-gray-400'\n }\n });\n</script>\n```\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 passwordInputDescription = "\n# PasswordInput Component\n\nThe PasswordInput component is a specialized text input for password entry with visibility toggle functionality.\n\n## Basic Usage\n\n```svelte\n<script>\n\tlet password = $state('');\n</script>\n\n<PasswordInput label=\"Password\" bind:value={password} />\n```\n\n## Props\n\nExtends all TextInput component props:\n\n### Core Props\n- **value**: string (bindable) - Password value\n- **placeholder**: string - Placeholder text\n- **autocomplete**: 'current-password' | 'new-password' | 'off' - Rendered as the input's `autocomplete` so browsers and password managers know what the field holds. Use `current-password` on sign-in forms and `new-password` on sign-up and change-password forms. Omitted, the attribute is left off\n- **minLength**: number - Fewest characters a non-empty value accepts during validation. Defaults to 6, or to no minimum when `autocomplete` is `current-password`; an explicit value always applies and `0` drops the rule. The message comes from the i18n catalog (`passwordTooShort`)\n- **inputAttrs**: native attributes for the underlying `<input>` (`aria-*`, `data-*`, `maxlength`, event handlers). `autocomplete`, `type`, `value`, `id`, `name`, `placeholder`, `required`, `disabled` and `class` stay owned by the component\n\n### Field Props (inherited)\n- **label**: string | Snippet - Field label\n- **description**: string | Snippet - Helper text\n- **error**: string - Error message\n- **required**: boolean - Mark as required\n- **disabled**: boolean - Disable input\n- **readOnly**: boolean - Make the input read-only: stays focusable and announced as read-only, refuses edits, and still validates and submits. A read-only Form, FormGroup or fieldset Field makes it read-only too\n- **size**: 'small' | 'normal' | 'large'\n\n### Content Slots\n- **prefix**: Snippet - Content before input (e.g., lock icon)\n\n### Styling Props\n- **class**: string - Additional CSS classes\n- **theme**: ComponentTheme - Custom theme overrides\n\n## Structure\n\n```\n<Field>\n\t<Label />\n\t<Description />\n\t<InputContainer>\n\t\t<Prefix />\n\t\t<Input type=\"password\" />\n\t\t<VisibilityToggle />\n\t</InputContainer>\n\t<Error />\n</Field>\n```\n\n## Examples\n\n### Basic Password Input\n```svelte\n<script>\n\tlet password = $state('');\n</script>\n\n<PasswordInput label=\"Password\" bind:value={password} />\n```\n\n### Required Password\n```svelte\n<PasswordInput \n\tlabel=\"Password\"\n\tbind:value={password}\n\trequired\n/>\n```\n\n### With Placeholder\n```svelte\n<PasswordInput \n\tlabel=\"Password\"\n\tplaceholder=\"Enter your password\"\n\tbind:value={password}\n/>\n```\n\n### With Description\n```svelte\n<PasswordInput \n\tlabel=\"New Password\"\n\tdescription=\"Must be at least 8 characters\"\n\tbind:value={password}\n/>\n```\n\n### With Prefix Icon\n```svelte\n<script lang=\"ts\">\n\timport { lockIcon } from 'entasis/icons/lock';\n\n\tlet password = $state('');\n</script>\n\n<PasswordInput label=\"Password\" bind:value={password}>\n\t{#snippet prefix()}\n\t\t{@render lockIcon()}\n\t{/snippet}\n</PasswordInput>\n```\n\n### With Validation\n```svelte\n<script>\n\tlet password = $state('');\n\tlet error = $derived(\n\t\tpassword && password.length < 8 \n\t\t\t? 'Password must be at least 8 characters'\n\t\t\t: ''\n\t);\n</script>\n\n<PasswordInput \n\tlabel=\"Password\"\n\tbind:value={password}\n\terror={error}\n/>\n```\n\n### Login Form\n```svelte\n<script>\n\tlet email = $state('');\n\tlet password = $state('');\n\t\n\tfunction handleLogin() {\n\t\t// Login logic\n\t}\n</script>\n\n<form onsubmit={handleLogin}>\n\t<TextInput \n\t\ttype=\"email\"\n\t\tlabel=\"Email\"\n\t\tinputAttrs={{ autocomplete: 'username' }}\n\t\tbind:value={email}\n\t\trequired\n\t/>\n\t\n\t<PasswordInput \n\t\tlabel=\"Password\"\n\t\tautocomplete=\"current-password\"\n\t\tbind:value={password}\n\t\trequired\n\t/>\n\t\n\t<Button type=\"submit\" fullWidth>Login</Button>\n</form>\n```\n\n### Password Strength Indicator\n```svelte\n<script>\n\tlet password = $state('');\n\t\n\tfunction getPasswordStrength(pwd) {\n\t\tif (!pwd) return { label: '', strength: 0 };\n\t\tif (pwd.length < 6) return { label: 'Weak', strength: 1 };\n\t\tif (pwd.length < 10) return { label: 'Medium', strength: 2 };\n\t\treturn { label: 'Strong', strength: 3 };\n\t}\n\t\n\tlet strength = $derived(getPasswordStrength(password));\n</script>\n\n<PasswordInput \n\tlabel=\"Password\"\n\tbind:value={password}\n\tdescription=\"Strength: {strength.label}\"\n/>\n\n<Meter \n\tvalue={strength.strength * 33.33}\n\tmax={100}\n/>\n```\n\n### Change Password Form\n```svelte\n<script>\n\tlet currentPassword = $state('');\n\tlet newPassword = $state('');\n\tlet confirmPassword = $state('');\n\t\n\tlet passwordMismatch = $derived(\n\t\tnewPassword && confirmPassword && newPassword !== confirmPassword\n\t);\n</script>\n\n<form>\n\t<PasswordInput \n\t\tlabel=\"Current Password\"\n\t\tautocomplete=\"current-password\"\n\t\tbind:value={currentPassword}\n\t\trequired\n\t/>\n\t\n\t<PasswordInput \n\t\tlabel=\"New Password\"\n\t\tautocomplete=\"new-password\"\n\t\tminLength={8}\n\t\tbind:value={newPassword}\n\t\tdescription=\"Must be at least 8 characters\"\n\t\trequired\n\t/>\n\t\n\t<PasswordInput \n\t\tlabel=\"Confirm Password\"\n\t\tautocomplete=\"new-password\"\n\t\tbind:value={confirmPassword}\n\t\terror={passwordMismatch ? 'Passwords do not match' : ''}\n\t\trequired\n\t/>\n\t\n\t<Button type=\"submit\">Update Password</Button>\n</form>\n```\n\n### Sign Up Form\n```svelte\n<script>\n\tlet formData = $state({\n\t\tusername: '',\n\t\temail: '',\n\t\tpassword: '',\n\t\tconfirmPassword: ''\n\t});\n\t\n\tfunction validatePassword() {\n\t\tif (formData.password.length < 8) {\n\t\t\treturn 'Password must be at least 8 characters';\n\t\t}\n\t\tif (!/[A-Z]/.test(formData.password)) {\n\t\t\treturn 'Password must contain an uppercase letter';\n\t\t}\n\t\tif (!/[0-9]/.test(formData.password)) {\n\t\t\treturn 'Password must contain a number';\n\t\t}\n\t\treturn '';\n\t}\n\t\n\tlet passwordError = $derived(validatePassword());\n</script>\n\n<form>\n\t<TextInput \n\t\tlabel=\"Username\"\n\t\tbind:value={formData.username}\n\t\trequired\n\t/>\n\t\n\t<TextInput \n\t\ttype=\"email\"\n\t\tlabel=\"Email\"\n\t\tbind:value={formData.email}\n\t\trequired\n\t/>\n\t\n\t<PasswordInput \n\t\tlabel=\"Password\"\n\t\tbind:value={formData.password}\n\t\terror={passwordError}\n\t\trequired\n\t/>\n\t\n\t<PasswordInput \n\t\tlabel=\"Confirm Password\"\n\t\tbind:value={formData.confirmPassword}\n\t\terror={formData.password !== formData.confirmPassword ? 'Passwords must match' : ''}\n\t\trequired\n\t/>\n\t\n\t<Button type=\"submit\" disabled={!!passwordError}>\n\t\tCreate Account\n\t</Button>\n</form>\n```\n\n## Visibility Toggle\n\nThe visibility toggle button:\n- Shows an eye icon when password is hidden\n- Shows an eye-off icon when password is visible\n- Toggles between `type=\"password\"` and `type=\"text\"`\n- Is always rendered; there is no prop to hide it\n\n## Validation\n\nPasswordInput supports:\n- **required**: Non-empty password\n- **minLength**: at least 6 characters by default, none for `autocomplete=\"current-password\"`; a short value reports only the length message\n- Custom validation via `onValidate`, which runs after the length rule passes\n- Pattern matching for complexity requirements\n\n## Password managers\n\nPasswordInput does not opt out of password managers. Set `autocomplete` so they offer a saved\npassword (`current-password`) or suggest a new one (`new-password`). To keep a specific manager\naway from a field that is not a real credential, pass its opt-out attribute through `inputAttrs`,\nfor example `inputAttrs={{ 'data-1p-ignore': true }}` for 1Password.\n\n## Security Best Practices\n\n- Never show password in plain text by default\n- Always use HTTPS in production\n- Consider password strength requirements\n- Don't limit password length unnecessarily\n- Support password managers with the `autocomplete` prop (`current-password` or `new-password`)\n\n## Accessibility\n\n- Proper label association\n- ARIA attributes for show/hide button\n- Password visibility state announced\n- Keyboard accessible toggle\n- Error messages announced to screen readers\n\n## Notes\n\n- Extends TextInput with password-specific features\n- Visibility toggle is accessible via keyboard\n- Type switches between \"password\" and \"text\"\n- Works with browser password managers\n- All TextInput features are available\n\n## Theme Customization\n\nThe PasswordInput component uses a theme object that can be customized using the `theme` prop or by setting a global theme. It shares the same theme structure as TextInput.\n\n### Theme Structure\n\nThe theme object contains the following parts:\n- **input**: Input element styles\n- **inputContainer**: Input container wrapper styles\n\n### Available Variants\n\n**input**:\n- base: Base classes applied to the input element\n- Variants:\n - size: 'small' | 'normal' | 'large' - Text size\n - disabled: boolean - Disabled state styling\n\n**inputContainer**:\n- base: Base classes for the input container (handles focus states, borders, padding)\n- Variants:\n - size: 'small' | 'normal' | 'large' - Size-based styling\n - disabled: boolean - Disabled state styling\n\n### Usage Examples\n\n**Basic Theme Override**:\n```svelte\n<PasswordInput \n label=\"Password\"\n bind:value={password}\n theme={{\n inputContainer: {\n base: 'border-2 rounded-lg',\n size: {\n normal: 'px-4 py-2'\n }\n },\n input: {\n size: {\n normal: 'text-base'\n }\n }\n }}\n/>\n```\n\n**Focus State Customization**:\n\nTo recolor every focus ring in the app at once, set `designTokens.focusColor` on `Theme`\ninstead of overriding per component. `ring-focus` is the focus state role and falls back to the\ncurrent role, so it never hard-pins a color.\n\n```svelte\n<PasswordInput \n label=\"Secure Password\"\n bind:value={password}\n theme={{\n inputContainer: {\n base: 'focus-within:ring-2 focus-within:ring-focus/50 focus-within:border-focus'\n }\n }}\n/>\n```\n\n**Global Theme Setting**:\n```svelte\n<script>\n import { setPasswordInputTheme } from './index.ts';\n \n setPasswordInputTheme({\n inputContainer: {\n base: 'rounded-lg border-2 transition-all',\n size: {\n normal: 'px-4 py-2'\n }\n },\n input: {\n base: 'placeholder:text-gray-400'\n }\n });\n</script>\n```\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";
|
|
@@ -20,6 +20,9 @@ Extends all TextInput component props:
|
|
|
20
20
|
### Core Props
|
|
21
21
|
- **value**: string (bindable) - Password value
|
|
22
22
|
- **placeholder**: string - Placeholder text
|
|
23
|
+
- **autocomplete**: 'current-password' | 'new-password' | 'off' - Rendered as the input's \`autocomplete\` so browsers and password managers know what the field holds. Use \`current-password\` on sign-in forms and \`new-password\` on sign-up and change-password forms. Omitted, the attribute is left off
|
|
24
|
+
- **minLength**: number - Fewest characters a non-empty value accepts during validation. Defaults to 6, or to no minimum when \`autocomplete\` is \`current-password\`; an explicit value always applies and \`0\` drops the rule. The message comes from the i18n catalog (\`passwordTooShort\`)
|
|
25
|
+
- **inputAttrs**: native attributes for the underlying \`<input>\` (\`aria-*\`, \`data-*\`, \`maxlength\`, event handlers). \`autocomplete\`, \`type\`, \`value\`, \`id\`, \`name\`, \`placeholder\`, \`required\`, \`disabled\` and \`class\` stay owned by the component
|
|
23
26
|
|
|
24
27
|
### Field Props (inherited)
|
|
25
28
|
- **label**: string | Snippet - Field label
|
|
@@ -27,6 +30,7 @@ Extends all TextInput component props:
|
|
|
27
30
|
- **error**: string - Error message
|
|
28
31
|
- **required**: boolean - Mark as required
|
|
29
32
|
- **disabled**: boolean - Disable input
|
|
33
|
+
- **readOnly**: boolean - Make the input read-only: stays focusable and announced as read-only, refuses edits, and still validates and submits. A read-only Form, FormGroup or fieldset Field makes it read-only too
|
|
30
34
|
- **size**: 'small' | 'normal' | 'large'
|
|
31
35
|
|
|
32
36
|
### Content Slots
|
|
@@ -137,12 +141,14 @@ Extends all TextInput component props:
|
|
|
137
141
|
<TextInput
|
|
138
142
|
type="email"
|
|
139
143
|
label="Email"
|
|
144
|
+
inputAttrs={{ autocomplete: 'username' }}
|
|
140
145
|
bind:value={email}
|
|
141
146
|
required
|
|
142
147
|
/>
|
|
143
148
|
|
|
144
149
|
<PasswordInput
|
|
145
150
|
label="Password"
|
|
151
|
+
autocomplete="current-password"
|
|
146
152
|
bind:value={password}
|
|
147
153
|
required
|
|
148
154
|
/>
|
|
@@ -193,12 +199,15 @@ Extends all TextInput component props:
|
|
|
193
199
|
<form>
|
|
194
200
|
<PasswordInput
|
|
195
201
|
label="Current Password"
|
|
202
|
+
autocomplete="current-password"
|
|
196
203
|
bind:value={currentPassword}
|
|
197
204
|
required
|
|
198
205
|
/>
|
|
199
206
|
|
|
200
207
|
<PasswordInput
|
|
201
208
|
label="New Password"
|
|
209
|
+
autocomplete="new-password"
|
|
210
|
+
minLength={8}
|
|
202
211
|
bind:value={newPassword}
|
|
203
212
|
description="Must be at least 8 characters"
|
|
204
213
|
required
|
|
@@ -206,6 +215,7 @@ Extends all TextInput component props:
|
|
|
206
215
|
|
|
207
216
|
<PasswordInput
|
|
208
217
|
label="Confirm Password"
|
|
218
|
+
autocomplete="new-password"
|
|
209
219
|
bind:value={confirmPassword}
|
|
210
220
|
error={passwordMismatch ? 'Passwords do not match' : ''}
|
|
211
221
|
required
|
|
@@ -287,16 +297,24 @@ The visibility toggle button:
|
|
|
287
297
|
|
|
288
298
|
PasswordInput supports:
|
|
289
299
|
- **required**: Non-empty password
|
|
290
|
-
-
|
|
300
|
+
- **minLength**: at least 6 characters by default, none for \`autocomplete="current-password"\`; a short value reports only the length message
|
|
301
|
+
- Custom validation via \`onValidate\`, which runs after the length rule passes
|
|
291
302
|
- Pattern matching for complexity requirements
|
|
292
303
|
|
|
304
|
+
## Password managers
|
|
305
|
+
|
|
306
|
+
PasswordInput does not opt out of password managers. Set \`autocomplete\` so they offer a saved
|
|
307
|
+
password (\`current-password\`) or suggest a new one (\`new-password\`). To keep a specific manager
|
|
308
|
+
away from a field that is not a real credential, pass its opt-out attribute through \`inputAttrs\`,
|
|
309
|
+
for example \`inputAttrs={{ 'data-1p-ignore': true }}\` for 1Password.
|
|
310
|
+
|
|
293
311
|
## Security Best Practices
|
|
294
312
|
|
|
295
313
|
- Never show password in plain text by default
|
|
296
314
|
- Always use HTTPS in production
|
|
297
315
|
- Consider password strength requirements
|
|
298
316
|
- Don't limit password length unnecessarily
|
|
299
|
-
- Support password managers (
|
|
317
|
+
- Support password managers with the \`autocomplete\` prop (\`current-password\` or \`new-password\`)
|
|
300
318
|
|
|
301
319
|
## Accessibility
|
|
302
320
|
|
|
@@ -1,8 +1,31 @@
|
|
|
1
1
|
import type { InputProps } from '../Field/field.js';
|
|
2
2
|
import type { PasswordInputThemeProps } from './passwordInput.theme.js';
|
|
3
|
+
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
4
|
+
/** What a password field holds, as browsers and password managers read it. */
|
|
5
|
+
export type PasswordInputAutocomplete = 'current-password' | 'new-password' | 'off';
|
|
6
|
+
export type PasswordInputAttributes = Omit<HTMLInputAttributes, 'autocomplete' | 'class' | 'disabled' | 'id' | 'name' | 'placeholder' | 'required' | 'type' | 'value'>;
|
|
3
7
|
export type PasswordInputProps = InputProps<'password'> & {
|
|
4
8
|
/** Hint text shown in the empty password input. */
|
|
5
9
|
placeholder?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Tells browsers and password managers what the field holds, rendered as the input's
|
|
12
|
+
* `autocomplete` attribute. Use `current-password` on sign-in forms so a saved password is
|
|
13
|
+
* offered, `new-password` on sign-up and change-password forms so a strong one is suggested,
|
|
14
|
+
* and `off` only where no manager should fill the field. Omitted, the attribute is left off and
|
|
15
|
+
* the browser decides.
|
|
16
|
+
*/
|
|
17
|
+
autocomplete?: PasswordInputAutocomplete;
|
|
18
|
+
/**
|
|
19
|
+
* Fewest characters a non-empty value accepts during validation. Defaults to 6, or to no
|
|
20
|
+
* minimum when `autocomplete` is `current-password`: a sign-in form must accept whatever
|
|
21
|
+
* password the account already has. An explicit value always applies; `0` drops the rule.
|
|
22
|
+
*/
|
|
23
|
+
minLength?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Native attributes applied to the underlying input, such as `aria-*`, `data-*` (for example
|
|
26
|
+
* `data-1p-ignore` to keep 1Password away), `maxlength` or event handlers.
|
|
27
|
+
*/
|
|
28
|
+
inputAttrs?: PasswordInputAttributes;
|
|
6
29
|
/** Theme overrides for the password input and its field container. */
|
|
7
30
|
theme?: PasswordInputThemeProps & InputProps<'password'>['theme'];
|
|
8
31
|
};
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
placeholder,
|
|
34
34
|
theme,
|
|
35
35
|
disabled,
|
|
36
|
+
readOnly,
|
|
37
|
+
messages,
|
|
36
38
|
name,
|
|
37
39
|
onValidate,
|
|
38
40
|
onValueChange,
|
|
@@ -51,7 +53,7 @@
|
|
|
51
53
|
let library = $state<IntlTelInputLibrary | null>(null);
|
|
52
54
|
let attachmentId = 0;
|
|
53
55
|
const countryOptions = $derived(
|
|
54
|
-
library ? createPhoneCountryOptions(library.getAllCountries()) : []
|
|
56
|
+
library ? createPhoneCountryOptions(library.getAllCountries(), t.locale) : []
|
|
55
57
|
);
|
|
56
58
|
|
|
57
59
|
const getValue = () => {
|
|
@@ -96,6 +98,12 @@
|
|
|
96
98
|
set disabled(v: boolean | undefined) {
|
|
97
99
|
disabled = v;
|
|
98
100
|
},
|
|
101
|
+
get readOnly() {
|
|
102
|
+
return readOnly;
|
|
103
|
+
},
|
|
104
|
+
get messages() {
|
|
105
|
+
return messages;
|
|
106
|
+
},
|
|
99
107
|
get required() {
|
|
100
108
|
return required;
|
|
101
109
|
},
|
|
@@ -163,7 +171,7 @@
|
|
|
163
171
|
}
|
|
164
172
|
|
|
165
173
|
library = intlTelInput;
|
|
166
|
-
const countries = createPhoneCountryOptions(intlTelInput.getAllCountries());
|
|
174
|
+
const countries = createPhoneCountryOptions(intlTelInput.getAllCountries(), t.locale);
|
|
167
175
|
const initialCountry =
|
|
168
176
|
getPhoneCountryOption(countries, country) ?? getPhoneCountryOption(countries, 'fr');
|
|
169
177
|
instance = intlTelInput(node, {
|
|
@@ -254,7 +262,7 @@
|
|
|
254
262
|
}
|
|
255
263
|
}}
|
|
256
264
|
{...rest}
|
|
257
|
-
{
|
|
265
|
+
anchor={popover.reference}
|
|
258
266
|
{@attach focusInputOnFieldClick}
|
|
259
267
|
>
|
|
260
268
|
<PhoneInputCountryTrigger
|
|
@@ -267,7 +275,6 @@
|
|
|
267
275
|
onToggle={popover.toggle}
|
|
268
276
|
/>
|
|
269
277
|
<input
|
|
270
|
-
data-1p-ignore
|
|
271
278
|
{@attach usePhoneInput}
|
|
272
279
|
oninput={() => {
|
|
273
280
|
field.value = getValue();
|