@lavalogic/scoria 0.36.0 → 0.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Components/AccordionGroup.svelte +6 -2
- package/dist/Components/AccordionGroupButton.svelte +78 -78
- package/dist/Components/AccordionGroupButtonProps.d.ts +27 -8
- package/dist/Components/AccordionGroupProps.d.ts +10 -2
- package/dist/Components/Action.svelte +31 -33
- package/dist/Components/ActionProps.d.ts +23 -3
- package/dist/Components/AlertModal.svelte +90 -39
- package/dist/Components/AppointmentCalendar/AppointmentCalendar.svelte +1126 -0
- package/dist/Components/AppointmentCalendar/AppointmentCalendar.svelte.d.ts +4 -0
- package/dist/Components/AppointmentCalendar/AppointmentCalendarProps.d.ts +92 -0
- package/dist/Components/AppointmentCalendar/AppointmentCalendarProps.js +12 -0
- package/dist/Components/Base/BaseModal.svelte +172 -0
- package/dist/Components/Base/BaseModal.svelte.d.ts +4 -0
- package/dist/Components/Base/BaseModalProps.d.ts +73 -0
- package/dist/Components/Base/BaseModalProps.js +1 -0
- package/dist/Components/Base/ContextWrapper.svelte +37 -15
- package/dist/Components/Base/ContextWrapper.svelte.d.ts +24 -5
- package/dist/Components/Base/ContextWrapperProps.d.ts +22 -0
- package/dist/Components/Base/Pagination.svelte +70 -62
- package/dist/Components/Base/Pagination.svelte.d.ts +12 -2
- package/dist/Components/Base/PaginationProps.d.ts +60 -3
- package/dist/Components/Base/Snippets.svelte +7 -0
- package/dist/Components/Base/Snippets.svelte.d.ts +5 -1
- package/dist/Components/BigRadioSet.svelte +18 -9
- package/dist/Components/BigRadioSetProps.d.ts +17 -1
- package/dist/Components/Bubble.svelte +67 -34
- package/dist/Components/Bubble.svelte.d.ts +23 -2
- package/dist/Components/BubbleProps.d.ts +55 -4
- package/dist/Components/Button.svelte +50 -38
- package/dist/Components/ButtonProps.d.ts +66 -1
- package/dist/Components/Checkbox.svelte +57 -29
- package/dist/Components/Checkbox.svelte.d.ts +1 -12
- package/dist/Components/CheckboxProps.d.ts +27 -0
- package/dist/Components/CheckboxProps.js +1 -0
- package/dist/Components/CollapsibleCard.svelte +53 -22
- package/dist/Components/CollapsibleCardProps.d.ts +22 -1
- package/dist/Components/Contexts/ContextMenu.svelte +53 -32
- package/dist/Components/Contexts/ContextMenu.svelte.d.ts +26 -0
- package/dist/Components/Contexts/ContextMenuDivider.svelte +15 -7
- package/dist/Components/Contexts/ContextMenuDivider.svelte.d.ts +9 -0
- package/dist/Components/Contexts/ContextMenuOption.svelte +27 -18
- package/dist/Components/Contexts/ContextMenuOption.svelte.d.ts +12 -1
- package/dist/Components/Contexts/ContextMenuOptionProps.d.ts +34 -2
- package/dist/Components/Contexts/Toast.svelte +28 -4
- package/dist/Components/Contexts/Toast.svelte.d.ts +14 -0
- package/dist/Components/Contexts/ToastContainer.svelte +30 -11
- package/dist/Components/Contexts/ToastContainer.svelte.d.ts +14 -0
- package/dist/Components/Contexts/ToastProps.d.ts +14 -1
- package/dist/Components/Contexts/Tooltip.svelte +21 -10
- package/dist/Components/Contexts/Tooltip.svelte.d.ts +10 -0
- package/dist/Components/DataMatrixIcon.svelte +82 -11
- package/dist/Components/DataMatrixIconProps.d.ts +73 -1
- package/dist/Components/DateInput.svelte +64 -29
- package/dist/Components/DateInput.svelte.d.ts +1 -1
- package/dist/Components/DateOnlyInputProps.d.ts +31 -5
- package/dist/Components/DatePicker.svelte +96 -108
- package/dist/Components/DatePickerProps.d.ts +18 -1
- package/dist/Components/DateTimeInputProps.d.ts +30 -5
- package/dist/Components/DesktopModal.svelte +14 -43
- package/dist/Components/DesktopModalProps.d.ts +5 -4
- package/dist/Components/Dial.svelte +103 -41
- package/dist/Components/DialProps.d.ts +74 -2
- package/dist/Components/DimensionInput.svelte +50 -64
- package/dist/Components/DimensionInput.svelte.d.ts +1 -1
- package/dist/Components/DimensionInputProps.d.ts +39 -4
- package/dist/Components/DragMenu/DragMenuHolder.svelte +41 -29
- package/dist/Components/DragMenu/DragMenuHolderProps.d.ts +30 -1
- package/dist/Components/DragMenu/DraggableCard.svelte +44 -8
- package/dist/Components/DragMenu/DraggableCardProps.d.ts +27 -1
- package/dist/Components/FileCard.svelte +6 -2
- package/dist/Components/FileCardProps.d.ts +17 -1
- package/dist/Components/FileUpload.svelte +82 -42
- package/dist/Components/FileUploadProps.d.ts +34 -4
- package/dist/Components/GridInput.svelte +27 -17
- package/dist/Components/GridInput.svelte.d.ts +5 -5
- package/dist/Components/GridInputProps.d.ts +4 -1
- package/dist/Components/GridInputSet.svelte +12 -5
- package/dist/Components/GridInputSet.svelte.d.ts +5 -5
- package/dist/Components/GridInputSetProps.d.ts +4 -2
- package/dist/Components/HorizontalTabGroup.svelte +13 -11
- package/dist/Components/HorizontalTabGroupButton.svelte +16 -68
- package/dist/Components/HorizontalTabGroupProps.d.ts +15 -2
- package/dist/Components/Icon.svelte +62 -21
- package/dist/Components/IconProps.d.ts +54 -6
- package/dist/Components/Icons.d.ts +8 -0
- package/dist/Components/Icons.js +234 -215
- package/dist/Components/LoadingAnimation.svelte +18 -18
- package/dist/Components/LoadingAnimation.svelte.d.ts +1 -3
- package/dist/Components/LoadingAnimationProps.d.ts +16 -0
- package/dist/Components/LoadingAnimationProps.js +1 -0
- package/dist/Components/LoadingModal.svelte +18 -20
- package/dist/Components/LoadingModal.svelte.d.ts +1 -4
- package/dist/Components/LoadingModalProps.d.ts +17 -0
- package/dist/Components/LoadingModalProps.js +1 -0
- package/dist/Components/LoadingOverlay.svelte +11 -13
- package/dist/Components/LoadingOverlay.svelte.d.ts +1 -5
- package/dist/Components/LoadingOverlayProps.d.ts +28 -0
- package/dist/Components/LoadingOverlayProps.js +1 -0
- package/dist/Components/Modal.svelte +77 -82
- package/dist/Components/Modal.svelte.d.ts +1 -25
- package/dist/Components/ModalProps.d.ts +65 -0
- package/dist/Components/ModalProps.js +1 -0
- package/dist/Components/MultiSelect.svelte +88 -76
- package/dist/Components/MultiSelectCommonProps.d.ts +33 -4
- package/dist/Components/MultiSelectPropsAsObject.d.ts +5 -0
- package/dist/Components/MultiSelectPropsAsPrimitive.d.ts +6 -0
- package/dist/Components/Nav/CallbackButtonWithIcon.d.ts +22 -1
- package/dist/Components/Nav/Nav.svelte +35 -30
- package/dist/Components/Nav/Nav.svelte.d.ts +23 -2
- package/dist/Components/Nav/NavProps.d.ts +50 -3
- package/dist/Components/Nav/NavServiceMenuList.svelte +12 -3
- package/dist/Components/Nav/NavServiceMenuListProps.d.ts +25 -1
- package/dist/Components/Nav/NavTab.svelte +19 -48
- package/dist/Components/Nav/NavTab.svelte.d.ts +23 -2
- package/dist/Components/Nav/NavTabProps.d.ts +16 -2
- package/dist/Components/Nav/ServiceMenuItem.svelte +29 -20
- package/dist/Components/Nav/ServicesNav.svelte +60 -34
- package/dist/Components/Nav/ServicesNav.svelte.d.ts +23 -2
- package/dist/Components/Nav/ServicesNavProps.d.ts +20 -4
- package/dist/Components/Nav/SideMenuItemProps.d.ts +16 -0
- package/dist/Components/NumberInput.svelte +37 -27
- package/dist/Components/NumberInputProps.d.ts +37 -0
- package/dist/Components/PageHeading.svelte +2 -13
- package/dist/Components/PageHeading.svelte.d.ts +1 -6
- package/dist/Components/PageHeadingProps.d.ts +23 -0
- package/dist/Components/PageHeadingProps.js +1 -0
- package/dist/Components/PasswordInput.svelte +27 -15
- package/dist/Components/PasswordInput.svelte.d.ts +2 -2
- package/dist/Components/PasswordInputProps.d.ts +21 -0
- package/dist/Components/PasswordInputProps.js +1 -0
- package/dist/Components/Portal.svelte +14 -3
- package/dist/Components/PortalProps.d.ts +20 -1
- package/dist/Components/ProgressBubble.svelte +98 -53
- package/dist/Components/ProgressBubbleProps.d.ts +23 -2
- package/dist/Components/QuerySelect.svelte +103 -159
- package/dist/Components/QuerySelect.svelte.d.ts +2 -29
- package/dist/Components/QuerySelectProps.d.ts +66 -0
- package/dist/Components/QuerySelectProps.js +1 -0
- package/dist/Components/SingleSelect.svelte +86 -108
- package/dist/Components/SingleSelectCommonProps.d.ts +43 -5
- package/dist/Components/SingleSelectPropsAsObject.d.ts +7 -0
- package/dist/Components/SingleSelectPropsAsPrimitive.d.ts +8 -0
- package/dist/Components/StepButton.svelte +19 -69
- package/dist/Components/StepForm.svelte +52 -52
- package/dist/Components/StepFormProps.d.ts +16 -2
- package/dist/Components/Switch.svelte +68 -31
- package/dist/Components/Switch.svelte.d.ts +1 -1
- package/dist/Components/SwitchProps.d.ts +46 -0
- package/dist/Components/Table/Body/HeightData.d.ts +1 -6
- package/dist/Components/Table/Body/HeightData.js +8 -0
- package/dist/Components/Table/Body/QuickSearchCell.svelte +106 -50
- package/dist/Components/Table/Body/QuickSearchCell.svelte.d.ts +12 -11
- package/dist/Components/Table/Body/QuickSearchCellProps.d.ts +6 -0
- package/dist/Components/Table/Body/Rows/ColumnHighlight.svelte +43 -9
- package/dist/Components/Table/Body/Rows/ColumnHighlight.svelte.d.ts +24 -2
- package/dist/Components/Table/Body/Rows/ColumnHighlightProps.d.ts +3 -0
- package/dist/Components/Table/Body/Rows/ColumnList.svelte +15 -5
- package/dist/Components/Table/Body/Rows/ColumnList.svelte.d.ts +12 -11
- package/dist/Components/Table/Body/Rows/ColumnListProps.d.ts +1 -0
- package/dist/Components/Table/Body/Rows/ColumnListRow.svelte +437 -91
- package/dist/Components/Table/Body/Rows/ColumnListRow.svelte.d.ts +12 -11
- package/dist/Components/Table/Body/Rows/ColumnListRowProps.d.ts +5 -0
- package/dist/Components/Table/Body/Rows/Columns/AccessorComponent.svelte +43 -13
- package/dist/Components/Table/Body/Rows/Columns/AccessorComponentProps.d.ts +12 -0
- package/dist/Components/Table/Body/Rows/Columns/ActionsCell.svelte +50 -38
- package/dist/Components/Table/Body/Rows/Columns/ActionsCell.svelte.d.ts +12 -12
- package/dist/Components/Table/Body/Rows/Columns/ActionsColumn.d.ts +9 -0
- package/dist/Components/Table/Body/Rows/Columns/ActionsTableCell.d.ts +5 -0
- package/dist/Components/Table/Body/Rows/Columns/BubbleCell.svelte +61 -26
- package/dist/Components/Table/Body/Rows/Columns/BubbleCell.svelte.d.ts +14 -13
- package/dist/Components/Table/Body/Rows/Columns/BubbleCellProps.d.ts +12 -0
- package/dist/Components/Table/Body/Rows/Columns/BubbleCellProps.js +1 -0
- package/dist/Components/Table/Body/Rows/Columns/ExpandCell.svelte +36 -16
- package/dist/Components/Table/Body/Rows/Columns/FocusableImmutableCell.svelte +133 -26
- package/dist/Components/Table/Body/Rows/Columns/FocusableImmutableCell.svelte.d.ts +12 -11
- package/dist/Components/Table/Body/Rows/Columns/FocusableImmutableCellProps.d.ts +7 -0
- package/dist/Components/Table/Body/Rows/Columns/ProgressCell.svelte +54 -20
- package/dist/Components/Table/Body/Rows/Columns/ProgressCell.svelte.d.ts +17 -11
- package/dist/Components/Table/Body/Rows/Columns/RowSelectionColumn.d.ts +8 -0
- package/dist/Components/Table/Body/Rows/Columns/RowSelectionTableCell.d.ts +5 -0
- package/dist/Components/Table/Body/Rows/Columns/SelectColumn.d.ts +11 -0
- package/dist/Components/Table/Body/Rows/Columns/SelectTableCell.d.ts +11 -0
- package/dist/Components/Table/Body/Rows/Columns/TableAction.svelte +55 -40
- package/dist/Components/Table/Body/Rows/Columns/TableAction.svelte.d.ts +11 -0
- package/dist/Components/Table/Body/Rows/Columns/TableCheckbox.svelte +38 -27
- package/dist/Components/Table/Body/Rows/Columns/TableCheckbox.svelte.d.ts +13 -18
- package/dist/Components/Table/Body/Rows/Columns/TableCheckboxProps.d.ts +17 -0
- package/dist/Components/Table/Body/Rows/Columns/TableCheckboxProps.js +1 -0
- package/dist/Components/Table/Body/Rows/Columns/TableColumn.svelte +22 -7
- package/dist/Components/Table/Body/Rows/Columns/TableColumn.svelte.d.ts +1 -7
- package/dist/Components/Table/Body/Rows/Columns/TableColumnProps.d.ts +16 -0
- package/dist/Components/Table/Body/Rows/Columns/TableColumnProps.js +1 -0
- package/dist/Components/Table/Body/Rows/Columns/TableDatePicker.svelte +61 -31
- package/dist/Components/Table/Body/Rows/Columns/TableDatePicker.svelte.d.ts +12 -11
- package/dist/Components/Table/Body/Rows/Columns/TableDatePickerProps.d.ts +9 -0
- package/dist/Components/Table/Body/Rows/Columns/TableNumberInput.svelte +123 -244
- package/dist/Components/Table/Body/Rows/Columns/TableNumberInput.svelte.d.ts +20 -12
- package/dist/Components/Table/Body/Rows/Columns/TableQueryCell.d.ts +8 -0
- package/dist/Components/Table/Body/Rows/Columns/TableQueryColumn.d.ts +9 -0
- package/dist/Components/Table/Body/Rows/Columns/TableQuerySelect.svelte +126 -189
- package/dist/Components/Table/Body/Rows/Columns/TableQuerySelect.svelte.d.ts +12 -11
- package/dist/Components/Table/Body/Rows/Columns/TableQuerySelectProps.d.ts +8 -0
- package/dist/Components/Table/Body/Rows/Columns/TableRowSelectionCheckbox.svelte +31 -19
- package/dist/Components/Table/Body/Rows/Columns/TableRowSelectionCheckbox.svelte.d.ts +2 -5
- package/dist/Components/Table/Body/Rows/Columns/TableRowSelectionCheckboxProps.d.ts +14 -0
- package/dist/Components/Table/Body/Rows/Columns/TableRowSelectionCheckboxProps.js +1 -0
- package/dist/Components/Table/Body/Rows/Columns/TableSelect.svelte +125 -187
- package/dist/Components/Table/Body/Rows/Columns/TableSelect.svelte.d.ts +13 -12
- package/dist/Components/Table/Body/Rows/Columns/TableSelectProps.d.ts +6 -0
- package/dist/Components/Table/Body/Rows/Columns/TableTextInput.svelte +119 -270
- package/dist/Components/Table/Body/Rows/Columns/TableTextInput.svelte.d.ts +12 -11
- package/dist/Components/Table/Body/Rows/Columns/TableTextInputProps.d.ts +6 -0
- package/dist/Components/Table/Body/Rows/Columns/ValidityCell.svelte +46 -23
- package/dist/Components/Table/Body/Rows/Columns/_helpers/useAsyncEditable.svelte.d.ts +104 -0
- package/dist/Components/Table/Body/Rows/Columns/_helpers/useAsyncEditable.svelte.js +215 -0
- package/dist/Components/Table/Body/Rows/TableRow.svelte +200 -132
- package/dist/Components/Table/Body/Rows/TableRow.svelte.d.ts +2 -10
- package/dist/Components/Table/Body/Rows/TableRowProps.d.ts +11 -2
- package/dist/Components/Table/Body/TableBody.svelte +170 -53
- package/dist/Components/Table/Body/TableBody.svelte.d.ts +15 -22
- package/dist/Components/Table/Body/TableBodyProps.d.ts +9 -7
- package/dist/Components/Table/ColumnDefinitions/ExampleItemColumnDefRepository.svelte.d.ts +2 -2
- package/dist/Components/Table/ColumnDefinitions/ExampleItemColumnDefRepository.svelte.js +18 -12
- package/dist/Components/Table/ColumnFactory.svelte.d.ts +43 -0
- package/dist/Components/Table/ColumnFactory.svelte.js +339 -0
- package/dist/Components/Table/Headers/HighlightAllHeader.svelte +5 -3
- package/dist/Components/Table/Headers/HighlightAllHeader.svelte.d.ts +12 -11
- package/dist/Components/Table/Headers/SelectAllHeader.svelte +5 -3
- package/dist/Components/Table/Headers/SelectAllHeader.svelte.d.ts +12 -11
- package/dist/Components/Table/Headers/TableHead.svelte +340 -200
- package/dist/Components/Table/Headers/TableHead.svelte.d.ts +13 -16
- package/dist/Components/Table/Headers/TableHeadProps.d.ts +10 -0
- package/dist/Components/Table/Headers/TableHeadProps.js +1 -0
- package/dist/Components/Table/Misc/ColumnPanel.svelte +108 -50
- package/dist/Components/Table/Misc/ColumnPanel.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/ColumnPanelModal.svelte +20 -7
- package/dist/Components/Table/Misc/ColumnPanelModal.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/ColumnPanelModalProps.d.ts +5 -0
- package/dist/Components/Table/Misc/FilterInput.svelte +30 -41
- package/dist/Components/Table/Misc/FilterInput.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/FilterPanel.svelte +387 -29
- package/dist/Components/Table/Misc/FilterPanel.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/FilterPanelModal.svelte +4 -51
- package/dist/Components/Table/Misc/FilterPanelModal.svelte.d.ts +2 -23
- package/dist/Components/Table/Misc/SidePanel.svelte +12 -9
- package/dist/Components/Table/Misc/SidePanel.svelte.d.ts +1 -7
- package/dist/Components/Table/Misc/SidePanelProps.d.ts +17 -0
- package/dist/Components/Table/Misc/SidePanelProps.js +1 -0
- package/dist/Components/Table/Misc/TableFooter.svelte +44 -35
- package/dist/Components/Table/Misc/TableFooter.svelte.d.ts +13 -14
- package/dist/Components/Table/Misc/TableFooterProps.d.ts +8 -0
- package/dist/Components/Table/Misc/TableFooterProps.js +1 -0
- package/dist/Components/Table/Misc/TableHorizontalBar.svelte +17 -48
- package/dist/Components/Table/Misc/TableHorizontalBar.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/TableSidebar.svelte +28 -47
- package/dist/Components/Table/Misc/TableSidebar.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/ToolboxPanel.svelte +121 -55
- package/dist/Components/Table/Misc/ToolboxPanel.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/ToolboxPanelModal.svelte +31 -24
- package/dist/Components/Table/Misc/ToolboxPanelModal.svelte.d.ts +12 -11
- package/dist/Components/Table/Misc/ToolboxPanelModalProps.d.ts +5 -0
- package/dist/Components/Table/Misc/numberDateFilterTypes.d.ts +7 -4
- package/dist/Components/Table/Misc/numberDateFilterTypes.js +8 -3
- package/dist/Components/Table/Misc/stringFilterTypes.d.ts +6 -4
- package/dist/Components/Table/Misc/stringFilterTypes.js +7 -3
- package/dist/Components/Table/NestedTable.svelte +85 -41
- package/dist/Components/Table/NestedTable.svelte.d.ts +2 -10
- package/dist/Components/Table/NestedTableProps.d.ts +25 -0
- package/dist/Components/Table/NestedTableProps.js +1 -0
- package/dist/Components/Table/SubApis.svelte.d.ts +24 -0
- package/dist/Components/Table/SubApis.svelte.js +380 -0
- package/dist/Components/Table/Table.svelte +345 -172
- package/dist/Components/Table/Table.svelte.d.ts +24 -1
- package/dist/Components/Table/TableHelpers.svelte.d.ts +58 -0
- package/dist/Components/Table/TableHelpers.svelte.js +88 -0
- package/dist/Components/Table/Types/Columns/Column.d.ts +10 -0
- package/dist/Components/Table/Types/Columns/ColumnPinningState.d.ts +12 -0
- package/dist/Components/Table/Types/Columns/ColumnSizingState.d.ts +8 -0
- package/dist/Components/Table/Types/Columns/ColumnType.d.ts +17 -0
- package/dist/Components/Table/Types/Columns/ColumnType.js +18 -1
- package/dist/Components/Table/Types/Columns/DateColumn.d.ts +6 -0
- package/dist/Components/Table/Types/Columns/DateTableCell.d.ts +7 -0
- package/dist/Components/Table/Types/Columns/Definitions/AccessorFn.d.ts +13 -0
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/AccessorDef.svelte.d.ts +28 -3
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/AccessorDef.svelte.js +15 -0
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/AccessorType.d.ts +10 -0
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/AccessorType.js +11 -1
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/CheckboxDef.svelte.d.ts +23 -2
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/CheckboxDef.svelte.js +9 -2
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/DateInputDef.svelte.d.ts +21 -2
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/DateInputDef.svelte.js +8 -0
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/NumberInputDef.svelte.d.ts +29 -3
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/NumberInputDef.svelte.js +11 -0
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/QueryDef.svelte.d.ts +23 -0
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/QueryDef.svelte.js +8 -0
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/SelectDef.svelte.d.ts +31 -0
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/SelectDef.svelte.js +17 -3
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/TextInputDef.svelte.d.ts +21 -2
- package/dist/Components/Table/Types/Columns/Definitions/Accessors/TextInputDef.svelte.js +7 -0
- package/dist/Components/Table/Types/Columns/Definitions/Actions/ActionsDef.svelte.d.ts +29 -1
- package/dist/Components/Table/Types/Columns/Definitions/Actions/ActionsDef.svelte.js +17 -3
- package/dist/Components/Table/Types/Columns/Definitions/ColumnDef.svelte.d.ts +122 -11
- package/dist/Components/Table/Types/Columns/Definitions/ColumnDef.svelte.js +77 -11
- package/dist/Components/Table/Types/Columns/Definitions/ColumnDefSet.d.ts +9 -0
- package/dist/Components/Table/Types/Columns/Definitions/Display/AbstractDisplayDef.svelte.d.ts +30 -9
- package/dist/Components/Table/Types/Columns/Definitions/Display/AbstractDisplayDef.svelte.js +14 -0
- package/dist/Components/Table/Types/Columns/Definitions/Display/BubbleDef.svelte.d.ts +19 -1
- package/dist/Components/Table/Types/Columns/Definitions/Display/BubbleDef.svelte.js +12 -1
- package/dist/Components/Table/Types/Columns/Definitions/Display/DisplayDef.svelte.d.ts +11 -0
- package/dist/Components/Table/Types/Columns/Definitions/Display/DisplayDef.svelte.js +6 -3
- package/dist/Components/Table/Types/Columns/Definitions/Display/ProgressBarDef.svelte.d.ts +19 -0
- package/dist/Components/Table/Types/Columns/Definitions/Display/ProgressBarDef.svelte.js +25 -1
- package/dist/Components/Table/Types/Columns/Definitions/Display/ValidityDef.svelte.d.ts +26 -0
- package/dist/Components/Table/Types/Columns/Definitions/Display/ValidityDef.svelte.js +20 -5
- package/dist/Components/Table/Types/Columns/Definitions/Expand/ExpandDef.svelte.d.ts +43 -7
- package/dist/Components/Table/Types/Columns/Definitions/Expand/ExpandDef.svelte.js +18 -3
- package/dist/Components/Table/Types/Columns/Definitions/FilterOnly/FilterOnlyDef.svelte.d.ts +19 -5
- package/dist/Components/Table/Types/Columns/Definitions/FilterOnly/FilterOnlyDef.svelte.js +16 -5
- package/dist/Components/Table/Types/Columns/Definitions/JSONColumnDefSet.d.ts +14 -0
- package/dist/Components/Table/Types/Columns/Definitions/RowSelection/RowSelectionDef.svelte.d.ts +34 -2
- package/dist/Components/Table/Types/Columns/Definitions/RowSelection/RowSelectionDef.svelte.js +30 -7
- package/dist/Components/Table/Types/Columns/Definitions/ValidationFn.d.ts +17 -0
- package/dist/Components/Table/Types/Columns/DefsWrapper.d.ts +10 -0
- package/dist/Components/Table/Types/Columns/DisplayType.d.ts +13 -0
- package/dist/Components/Table/Types/Columns/DisplayType.js +14 -1
- package/dist/Components/Table/Types/Columns/ExpandColumn.d.ts +5 -0
- package/dist/Components/Table/Types/Columns/ExpandTableCell.d.ts +7 -0
- package/dist/Components/Table/Types/Columns/JSONColumnPinningState.d.ts +6 -0
- package/dist/Components/Table/Types/Columns/ProgressBarColumn.d.ts +5 -0
- package/dist/Components/Table/Types/Columns/ProgressBarTableCell.d.ts +9 -0
- package/dist/Components/Table/Types/Columns/TableActionButton.d.ts +12 -0
- package/dist/Components/Table/Types/Columns/TableCell.d.ts +16 -2
- package/dist/Components/Table/Types/Columns/VisibilityState.d.ts +12 -0
- package/dist/Components/Table/Types/Context/ColumnLayoutState.svelte.d.ts +173 -0
- package/dist/Components/Table/Types/Context/ColumnLayoutState.svelte.js +241 -0
- package/dist/Components/Table/Types/Context/FilteringState.svelte.d.ts +166 -0
- package/dist/Components/Table/Types/Context/FilteringState.svelte.js +180 -0
- package/dist/Components/Table/Types/Context/FocusState.svelte.d.ts +316 -0
- package/dist/Components/Table/Types/Context/FocusState.svelte.js +751 -0
- package/dist/Components/Table/Types/Context/ITable.d.ts +10 -0
- package/dist/Components/Table/Types/Context/PreferencesState.svelte.d.ts +242 -0
- package/dist/Components/Table/Types/Context/PreferencesState.svelte.js +317 -0
- package/dist/Components/Table/Types/Context/ReadonlyRowModel.d.ts +14 -3
- package/dist/Components/Table/Types/Context/Row.d.ts +18 -0
- package/dist/Components/Table/Types/Context/RowModel.d.ts +11 -0
- package/dist/Components/Table/Types/Context/SelectionState.svelte.d.ts +260 -0
- package/dist/Components/Table/Types/Context/SelectionState.svelte.js +613 -0
- package/dist/Components/Table/Types/Context/SortingState.svelte.d.ts +112 -0
- package/dist/Components/Table/Types/Context/SortingState.svelte.js +272 -0
- package/dist/Components/Table/Types/Context/TableContext.svelte.d.ts +580 -58
- package/dist/Components/Table/Types/Context/TableContext.svelte.js +984 -1278
- package/dist/Components/Table/Types/Context/TableInitOptions.d.ts +16 -0
- package/dist/Components/Table/Types/Context/TableSettings.d.ts +20 -0
- package/dist/Components/Table/Types/Context/VirtualisationState.svelte.d.ts +167 -0
- package/dist/Components/Table/Types/Context/VirtualisationState.svelte.js +226 -0
- package/dist/Components/Table/Types/Coordinates/CellCoordinates.d.ts +12 -0
- package/dist/Components/Table/Types/Coordinates/CellCoordinatesWithoutColumn.d.ts +5 -0
- package/dist/Components/Table/Types/Coordinates/ColumnIndices.d.ts +16 -2
- package/dist/Components/Table/Types/DataRepository/BuiltInRemoteRepository.svelte.d.ts +143 -0
- package/dist/Components/Table/Types/DataRepository/BuiltInRemoteRepository.svelte.js +454 -0
- package/dist/Components/Table/Types/DataRepository/IDataRepository.d.ts +21 -0
- package/dist/Components/Table/Types/DataRepository/ILocalDataRepository.d.ts +10 -0
- package/dist/Components/Table/Types/DataRepository/IRemoteDataRepository.d.ts +16 -0
- package/dist/Components/Table/Types/DataRepository/LocalTableDataRepository.svelte.d.ts +87 -3
- package/dist/Components/Table/Types/DataRepository/LocalTableDataRepository.svelte.js +112 -7
- package/dist/Components/Table/Types/DataRepository/SortingState.d.ts +12 -0
- package/dist/Components/Table/Types/DataRepository/TableDataRepository.svelte.d.ts +87 -2
- package/dist/Components/Table/Types/DataRepository/TableDataRepository.svelte.js +74 -1
- package/dist/Components/Table/Types/ExpandedPanel.d.ts +9 -0
- package/dist/Components/Table/Types/ExpandedPanel.js +10 -1
- package/dist/Components/Table/Types/Filtering/ColumnFiltersState.d.ts +17 -0
- package/dist/Components/Table/Types/Filtering/CustomFilter.d.ts +21 -0
- package/dist/Components/Table/Types/Filtering/CustomFilterType.d.ts +5 -0
- package/dist/Components/Table/Types/Filtering/CustomFilterType.js +6 -1
- package/dist/Components/Table/Types/Filtering/CustomRemoteFilters.d.ts +6 -0
- package/dist/Components/Table/Types/Filtering/FilterFn.d.ts +28 -0
- package/dist/Components/Table/Types/Filtering/FilterMode.d.ts +7 -0
- package/dist/Components/Table/Types/Filtering/FilterType.d.ts +8 -0
- package/dist/Components/Table/Types/Filtering/FilterType.js +9 -1
- package/dist/Components/Table/Types/Filtering/FilterValueType.d.ts +11 -0
- package/dist/Components/Table/Types/Filtering/FilterValueType.js +12 -1
- package/dist/Components/Table/Types/Filtering/HasCustomFilterFunction.d.ts +23 -2
- package/dist/Components/Table/Types/Filtering/NumberDateFilterMode.d.ts +19 -12
- package/dist/Components/Table/Types/Filtering/NumberDateFilterMode.js +18 -14
- package/dist/Components/Table/Types/Filtering/StringFilterMode.d.ts +22 -15
- package/dist/Components/Table/Types/Filtering/StringFilterMode.js +22 -16
- package/dist/Components/Table/Types/Focus/MultiFocusEdge.d.ts +8 -0
- package/dist/Components/Table/Types/Focus/MultiFocusEdge.js +9 -1
- package/dist/Components/Table/Types/Focus/TableFocusDetails.svelte.d.ts +22 -0
- package/dist/Components/Table/Types/Focus/TableFocusDetails.svelte.js +22 -0
- package/dist/Components/Table/Types/Header.d.ts +8 -0
- package/dist/Components/Table/Types/HeaderGroup.d.ts +7 -0
- package/dist/Components/Table/Types/Layout/CellPinning.d.ts +1 -0
- package/dist/Components/Table/Types/Layout/CellPinning.js +8 -0
- package/dist/Components/Table/Types/OnChangeFn.d.ts +11 -0
- package/dist/Components/Table/Types/Pagination/PaginationState.d.ts +9 -0
- package/dist/Components/Table/Types/Pagination/PaginationType.d.ts +10 -0
- package/dist/Components/Table/Types/Pagination/PaginationType.js +11 -1
- package/dist/Components/Table/Types/Public/AnyEditEvent.d.ts +30 -0
- package/dist/Components/Table/Types/Public/AnyEditEvent.js +1 -0
- package/dist/Components/Table/Types/Public/BaseColumnOptions.d.ts +44 -0
- package/dist/Components/Table/Types/Public/BaseColumnOptions.js +1 -0
- package/dist/Components/Table/Types/Public/ColumnFactory.d.ts +35 -0
- package/dist/Components/Table/Types/Public/ColumnFactory.js +1 -0
- package/dist/Components/Table/Types/Public/ColumnOptions.d.ts +244 -0
- package/dist/Components/Table/Types/Public/ColumnOptions.js +1 -0
- package/dist/Components/Table/Types/Public/ColumnSpec.d.ts +39 -0
- package/dist/Components/Table/Types/Public/ColumnSpec.js +1 -0
- package/dist/Components/Table/Types/Public/CreateTableOptions.d.ts +87 -0
- package/dist/Components/Table/Types/Public/CreateTableOptions.js +1 -0
- package/dist/Components/Table/Types/Public/KeyConstraints.d.ts +42 -0
- package/dist/Components/Table/Types/Public/KeyConstraints.js +22 -0
- package/dist/Components/Table/Types/Public/RowSource.d.ts +87 -0
- package/dist/Components/Table/Types/Public/RowSource.js +1 -0
- package/dist/Components/Table/Types/Public/SelectionOptions.d.ts +26 -0
- package/dist/Components/Table/Types/Public/SelectionOptions.js +1 -0
- package/dist/Components/Table/Types/Public/Table.d.ts +40 -0
- package/dist/Components/Table/Types/Public/Table.js +1 -0
- package/dist/Components/Table/Types/Public/TableInitialState.d.ts +26 -0
- package/dist/Components/Table/Types/Public/TableInitialState.js +1 -0
- package/dist/Components/Table/Types/Public/TablePersistence.d.ts +38 -0
- package/dist/Components/Table/Types/Public/TablePersistence.js +1 -0
- package/dist/Components/Table/Types/Public/TableSubApis.d.ts +190 -0
- package/dist/Components/Table/Types/Public/TableSubApis.js +1 -0
- package/dist/Components/Table/Types/Public/index.d.ts +20 -0
- package/dist/Components/Table/Types/Public/index.js +8 -0
- package/dist/Components/Table/Types/Toolbar/ToolbarPosition.d.ts +4 -0
- package/dist/Components/Table/Types/Toolbar/ToolbarPosition.js +5 -1
- package/dist/Components/Table/createTable.svelte.d.ts +53 -0
- package/dist/Components/Table/createTable.svelte.js +270 -0
- package/dist/Components/TextArea.svelte +37 -18
- package/dist/Components/TextAreaProps.d.ts +37 -0
- package/dist/Components/TextInput.svelte +41 -22
- package/dist/Components/TextInputProps.d.ts +58 -1
- package/dist/Components/ThreeStateRadio.svelte +61 -64
- package/dist/Components/ThreeStateRadioProps.d.ts +29 -1
- package/dist/Components/Touch/BoolCard.svelte +8 -15
- package/dist/Components/Touch/BoolCard.svelte.d.ts +1 -10
- package/dist/Components/Touch/BoolCardProps.d.ts +21 -0
- package/dist/Components/Touch/BoolCardProps.js +1 -0
- package/dist/Components/Touch/DateModal.svelte +17 -25
- package/dist/Components/Touch/DateModal.svelte.d.ts +1 -17
- package/dist/Components/Touch/DateModalProps.d.ts +36 -0
- package/dist/Components/Touch/DateModalProps.js +1 -0
- package/dist/Components/Touch/EditCard.svelte +10 -3
- package/dist/Components/Touch/EditCardProps.d.ts +21 -0
- package/dist/Components/Touch/InfoCard.svelte +14 -7
- package/dist/Components/Touch/InfoCardProps.d.ts +9 -0
- package/dist/Components/Touch/InfoTextCard.svelte +9 -2
- package/dist/Components/Touch/InfoTextCardProps.d.ts +8 -0
- package/dist/Components/Touch/ModalExplanation.svelte +9 -12
- package/dist/Components/Touch/ModalExplanation.svelte.d.ts +1 -6
- package/dist/Components/Touch/ModalExplanationProps.d.ts +22 -0
- package/dist/Components/Touch/ModalExplanationProps.js +1 -0
- package/dist/Components/Touch/NumberKeyboard.svelte +62 -105
- package/dist/Components/Touch/NumberKeyboardProps.d.ts +19 -0
- package/dist/Components/Touch/NumberModal.svelte +16 -6
- package/dist/Components/Touch/NumberModalProps.d.ts +23 -1
- package/dist/Components/Touch/PlusMinusCard.svelte +12 -16
- package/dist/Components/Touch/PlusMinusCard.svelte.d.ts +1 -6
- package/dist/Components/Touch/PlusMinusCardProps.d.ts +18 -0
- package/dist/Components/Touch/PlusMinusCardProps.js +1 -0
- package/dist/Components/Touch/SelectModal.svelte +33 -15
- package/dist/Components/Touch/SelectModalProps.d.ts +22 -1
- package/dist/Components/Touch/SummaryCard.svelte +56 -14
- package/dist/Components/Touch/SummaryCardProps.d.ts +16 -3
- package/dist/Components/Touch/TextAreaModal.svelte +18 -9
- package/dist/Components/Touch/TextAreaModalProps.d.ts +21 -0
- package/dist/Components/Touch/TextModal.svelte +15 -32
- package/dist/Components/Touch/TextModalProps.d.ts +28 -1
- package/dist/Components/Touch/TouchCard.svelte +9 -47
- package/dist/Components/Touch/TouchCardProps.d.ts +21 -0
- package/dist/Components/Touch/TouchModal.svelte +105 -99
- package/dist/Components/Touch/TouchModalProps.d.ts +35 -1
- package/dist/Components/Touch/UtilityButton.svelte +36 -18
- package/dist/Components/Touch/UtilityButtonProps.d.ts +16 -0
- package/dist/Components/VerticalTabGroup.svelte +18 -40
- package/dist/Components/VerticalTabGroupButton.svelte +11 -50
- package/dist/Components/VerticalTabGroupProps.d.ts +15 -2
- package/dist/Contexts/AlertContext.svelte.d.ts +92 -8
- package/dist/Contexts/AlertContext.svelte.js +69 -6
- package/dist/Contexts/ContextMenuContext.svelte.d.ts +54 -8
- package/dist/Contexts/ContextMenuContext.svelte.js +48 -2
- package/dist/Contexts/TestContext.svelte.d.ts +27 -1
- package/dist/Contexts/TestContext.svelte.js +29 -1
- package/dist/Contexts/ToastContext.svelte.d.ts +29 -1
- package/dist/Contexts/ToastContext.svelte.js +93 -24
- package/dist/Contexts/TooltipContext.svelte.d.ts +68 -1
- package/dist/Contexts/TooltipContext.svelte.js +70 -7
- package/dist/Contexts/UntypedInputContext.svelte.d.ts +54 -5
- package/dist/Contexts/UntypedInputContext.svelte.js +87 -34
- package/dist/Delay/Delay.js +1 -1
- package/dist/Helpers/AsyncFlag.svelte.d.ts +39 -0
- package/dist/Helpers/AsyncFlag.svelte.js +72 -0
- package/dist/Helpers/Datamatrix.d.ts +10 -1
- package/dist/Helpers/Datamatrix.js +290 -1
- package/dist/Helpers/Helpers.svelte.d.ts +252 -18
- package/dist/Helpers/Helpers.svelte.js +271 -75
- package/dist/Helpers/INamed.d.ts +6 -0
- package/dist/Helpers/Storage.d.ts +67 -0
- package/dist/Helpers/Storage.js +138 -0
- package/dist/Helpers/dropdownPortal.d.ts +52 -0
- package/dist/Helpers/dropdownPortal.js +232 -0
- package/dist/Helpers/dropdownPortal.svelte.d.ts +2 -0
- package/dist/Helpers/dropdownPortal.svelte.js +5 -0
- package/dist/Helpers/memoiseByRow.d.ts +45 -0
- package/dist/Helpers/memoiseByRow.js +78 -0
- package/dist/Helpers/prefersReducedMotion.svelte.d.ts +27 -0
- package/dist/Helpers/prefersReducedMotion.svelte.js +18 -0
- package/dist/Helpers/useTooltip.svelte.d.ts +53 -0
- package/dist/Helpers/useTooltip.svelte.js +62 -0
- package/dist/Types/Examples/ExampleModal.svelte +12 -11
- package/dist/Types/Examples/ExampleModal.svelte.d.ts +2 -2
- package/dist/Types/Examples/ExampleSelectEnum.js +1 -1
- package/dist/Types/Internal/AsyncFlag.d.ts +7 -0
- package/dist/Types/Internal/AsyncFlag.js +1 -0
- package/dist/Types/Internal/BigRadioOption.d.ts +8 -0
- package/dist/Types/Internal/ButtonProp.d.ts +24 -2
- package/dist/Types/Internal/CallbackButton.d.ts +12 -0
- package/dist/Types/Internal/DateChange.d.ts +8 -0
- package/dist/Types/Internal/DatePickerType.d.ts +5 -0
- package/dist/Types/Internal/DatePickerType.js +6 -1
- package/dist/Types/Internal/IdentifiableToastMessage.d.ts +8 -0
- package/dist/Types/Internal/InputVariant.d.ts +5 -0
- package/dist/Types/Internal/InputVariant.js +6 -1
- package/dist/Types/Internal/Misc.d.ts +91 -0
- package/dist/Types/Internal/RefWrapper.d.ts +6 -0
- package/dist/Types/Internal/SelectOption.d.ts +8 -0
- package/dist/Types/Internal/Shape.d.ts +1 -0
- package/dist/Types/Internal/Shape.js +2 -1
- package/dist/Types/Internal/Side.d.ts +1 -0
- package/dist/Types/Internal/Side.js +2 -1
- package/dist/Types/Internal/Size.d.ts +5 -0
- package/dist/Types/Internal/Size.js +6 -1
- package/dist/Types/Internal/TabOption.d.ts +15 -5
- package/dist/Types/Internal/Ternary.d.ts +6 -0
- package/dist/Types/Internal/Ternary.js +7 -1
- package/dist/Types/Internal/ToastMessage.d.ts +28 -0
- package/dist/Types/Internal/Validity.d.ts +6 -0
- package/dist/Types/Internal/Validity.js +7 -1
- package/dist/Types/Internal/ValidityWrapper.d.ts +8 -0
- package/dist/Types/Internal/Variant.d.ts +5 -0
- package/dist/Types/Internal/Variant.js +6 -1
- package/dist/index.d.ts +27 -82
- package/dist/index.js +24 -62
- package/dist/scss/_mixins.scss +451 -167
- package/dist/scss/_motion.scss +57 -0
- package/dist/scss/_sizing.scss +16 -0
- package/dist/scss/colours.js +2 -2
- package/dist/scss/sizing.d.ts +9 -0
- package/dist/scss/sizing.js +10 -1
- package/package.json +35 -31
|
@@ -1,29 +1,60 @@
|
|
|
1
1
|
<svelte:options runes />
|
|
2
2
|
|
|
3
|
-
<script
|
|
3
|
+
<script
|
|
4
|
+
lang="ts"
|
|
5
|
+
module
|
|
6
|
+
>
|
|
7
|
+
import { Sizing } from '../scss/sizing.js';
|
|
8
|
+
|
|
9
|
+
// Pixel height of each dial option. Sourced from `sizing.ts` so the
|
|
10
|
+
// SCSS partial and TS constant stay in sync (see comment at the top
|
|
11
|
+
// of `sizing.ts`).
|
|
12
|
+
const OPTION_HEIGHT: number = Sizing['$dial-option-height'];
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<script
|
|
16
|
+
lang="ts"
|
|
17
|
+
generics="T"
|
|
18
|
+
>
|
|
4
19
|
import { onMount } from 'svelte';
|
|
5
20
|
import type { DialProps } from './DialProps.js';
|
|
6
21
|
|
|
7
|
-
const optionHeight = 50;
|
|
8
|
-
|
|
9
22
|
let {
|
|
10
23
|
selected,
|
|
11
|
-
|
|
12
|
-
labels,
|
|
24
|
+
entries,
|
|
13
25
|
type,
|
|
14
26
|
ref = $bindable(),
|
|
15
27
|
onsubmit,
|
|
16
28
|
onPrevious,
|
|
17
29
|
onNext,
|
|
18
|
-
onchange
|
|
30
|
+
onchange,
|
|
19
31
|
}: DialProps<T> = $props();
|
|
20
32
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
let
|
|
33
|
+
// `position`, `offset`, `dragging` must all be `$state` so that the
|
|
34
|
+
// position-syncing `$effect` below re-runs when `dragging` flips back
|
|
35
|
+
// to `false` at the end of a drag. The previous `let` variables were
|
|
36
|
+
// invisible to Svelte's reactivity and made the `$effect`'s firing
|
|
37
|
+
// order depend on `selected` happening to change.
|
|
38
|
+
//
|
|
39
|
+
// `position` initialises to 0; the `$effect` below syncs it to the
|
|
40
|
+
// `selected`-derived position on first run. Reading `selected` /
|
|
41
|
+
// `values` directly in the initialiser would only capture their
|
|
42
|
+
// initial values (svelte warning `state_referenced_locally`), and
|
|
43
|
+
// since the effect already covers that path we keep the initialiser
|
|
44
|
+
// trivial.
|
|
45
|
+
let position = $state(0);
|
|
46
|
+
let offset = $state(0);
|
|
47
|
+
let dragging = $state(false);
|
|
24
48
|
|
|
25
49
|
let itemWrapper: HTMLUListElement | undefined = $state();
|
|
26
|
-
let previousY
|
|
50
|
+
let previousY = 0;
|
|
51
|
+
|
|
52
|
+
// AbortController used to register/clean up window-level
|
|
53
|
+
// `mousemove`/`mouseup`/`touchmove`/`touchend` listeners. Stored in a
|
|
54
|
+
// single ref so a stray `mousedown` cannot leak a second set, and so
|
|
55
|
+
// the cleanup `$effect` below can detach everything on unmount even
|
|
56
|
+
// if the user navigates away mid-drag.
|
|
57
|
+
let dragAbort: AbortController | undefined;
|
|
27
58
|
|
|
28
59
|
onMount(() => {
|
|
29
60
|
setPosition();
|
|
@@ -31,7 +62,8 @@
|
|
|
31
62
|
|
|
32
63
|
$effect(() => {
|
|
33
64
|
if (!dragging) {
|
|
34
|
-
const selectedPosition =
|
|
65
|
+
const selectedPosition =
|
|
66
|
+
selected != null ? -entries.findIndex((e) => e.value === selected) * OPTION_HEIGHT : 0;
|
|
35
67
|
if (position !== selectedPosition) {
|
|
36
68
|
position = selectedPosition;
|
|
37
69
|
setPosition();
|
|
@@ -39,69 +71,88 @@
|
|
|
39
71
|
}
|
|
40
72
|
});
|
|
41
73
|
|
|
74
|
+
// Ensure any in-flight drag listeners are detached on unmount. The
|
|
75
|
+
// listeners would otherwise leak if the component unmounted between
|
|
76
|
+
// `onmousedown` and `onMouseUp` (rare, but possible if the parent
|
|
77
|
+
// modal closes mid-drag).
|
|
78
|
+
$effect(() => () => {
|
|
79
|
+
dragAbort?.abort();
|
|
80
|
+
});
|
|
81
|
+
|
|
42
82
|
function onChange(changedData: T) {
|
|
43
83
|
onchange({
|
|
44
84
|
type,
|
|
45
|
-
changedData
|
|
85
|
+
changedData,
|
|
46
86
|
});
|
|
47
87
|
}
|
|
48
88
|
|
|
49
89
|
function setPosition() {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
itemWrapper.style.cssText = itemPosition;
|
|
56
|
-
} else {
|
|
57
|
-
console.warn('item wrapper is undefined');
|
|
90
|
+
if (!itemWrapper) {
|
|
91
|
+
// Silently no-op if the wrapper has not yet mounted. The previous
|
|
92
|
+
// `console.warn` fired during the initial render of every dial
|
|
93
|
+
// and was noise in production logs.
|
|
94
|
+
return;
|
|
58
95
|
}
|
|
96
|
+
|
|
97
|
+
// Set transform / transition individually rather than rewriting the
|
|
98
|
+
// full `cssText`. The latter parses the entire declaration string
|
|
99
|
+
// per mousemove (~60 Hz); `setProperty` skips the parse and only
|
|
100
|
+
// updates the named declarations. The `transition-duration` scales
|
|
101
|
+
// with drag inertia, so we still need imperative updates rather
|
|
102
|
+
// than `style:transform={...}` for the dragging case.
|
|
103
|
+
const transitionDuration = `${Math.abs(offset) / 100 + 0.1}s`;
|
|
104
|
+
itemWrapper.style.setProperty('transition', `transform ${transitionDuration}`);
|
|
105
|
+
itemWrapper.style.setProperty('transform', `translateY(${position}px)`);
|
|
59
106
|
}
|
|
60
107
|
|
|
61
108
|
const onmousedown = (event: MouseEvent | TouchEvent) => {
|
|
62
109
|
previousY = 'touches' in event ? event.touches[0].clientY : event.clientY;
|
|
63
110
|
dragging = true;
|
|
64
111
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
112
|
+
// One AbortController per drag. Attached to all four window
|
|
113
|
+
// listeners so a single `controller.abort()` detaches everything.
|
|
114
|
+
dragAbort?.abort();
|
|
115
|
+
dragAbort = new AbortController();
|
|
116
|
+
const { signal } = dragAbort;
|
|
117
|
+
|
|
118
|
+
window.addEventListener('mousemove', onMouseMove, { signal });
|
|
119
|
+
window.addEventListener('mouseup', onMouseUp, { signal });
|
|
120
|
+
window.addEventListener('touchmove', onMouseMove, { signal });
|
|
121
|
+
window.addEventListener('touchend', onMouseUp, { signal });
|
|
69
122
|
};
|
|
70
123
|
|
|
71
124
|
const onMouseMove = (event: MouseEvent | TouchEvent) => {
|
|
72
125
|
const clientY = 'touches' in event ? event.touches[0].clientY : event.clientY;
|
|
73
126
|
offset = clientY - previousY;
|
|
74
127
|
|
|
75
|
-
const maxPosition = -
|
|
128
|
+
const maxPosition = -entries.length * OPTION_HEIGHT;
|
|
76
129
|
const _position = position + offset;
|
|
77
|
-
position = Math.max(maxPosition, Math.min(
|
|
130
|
+
position = Math.max(maxPosition, Math.min(OPTION_HEIGHT, _position));
|
|
78
131
|
previousY = 'touches' in event ? event.touches[0].clientY : event.clientY;
|
|
79
132
|
setPosition();
|
|
80
133
|
};
|
|
81
134
|
|
|
82
135
|
const onMouseUp = () => {
|
|
83
|
-
const maxPosition = -(
|
|
84
|
-
const rounderPosition = Math.round((position + offset * 5) /
|
|
136
|
+
const maxPosition = -(entries.length - 1) * OPTION_HEIGHT;
|
|
137
|
+
const rounderPosition = Math.round((position + offset * 5) / OPTION_HEIGHT) * OPTION_HEIGHT;
|
|
85
138
|
const finalPosition = Math.max(maxPosition, Math.min(0, rounderPosition));
|
|
86
139
|
|
|
87
140
|
dragging = false;
|
|
88
141
|
position = finalPosition;
|
|
89
142
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
window.removeEventListener('touchmove', onMouseMove);
|
|
93
|
-
window.removeEventListener('touchend', onMouseUp);
|
|
143
|
+
dragAbort?.abort();
|
|
144
|
+
dragAbort = undefined;
|
|
94
145
|
|
|
95
146
|
setPosition();
|
|
96
|
-
onChange(
|
|
147
|
+
onChange(entries[-finalPosition / OPTION_HEIGHT].value);
|
|
97
148
|
};
|
|
98
149
|
|
|
99
150
|
const onwheel = (e: WheelEvent) => {
|
|
100
151
|
if (e.deltaY > 0) {
|
|
101
|
-
position = position -
|
|
152
|
+
position = position - OPTION_HEIGHT;
|
|
102
153
|
}
|
|
103
154
|
if (e.deltaY < 0) {
|
|
104
|
-
position = position +
|
|
155
|
+
position = position + OPTION_HEIGHT;
|
|
105
156
|
}
|
|
106
157
|
onMouseUp();
|
|
107
158
|
};
|
|
@@ -116,10 +167,10 @@
|
|
|
116
167
|
} else if (e.key === 'ArrowRight') {
|
|
117
168
|
onNext(type);
|
|
118
169
|
} else if (e.key === 'ArrowUp') {
|
|
119
|
-
position = position +
|
|
170
|
+
position = position + OPTION_HEIGHT;
|
|
120
171
|
onMouseUp();
|
|
121
172
|
} else if (e.key === 'ArrowDown') {
|
|
122
|
-
position = position -
|
|
173
|
+
position = position - OPTION_HEIGHT;
|
|
123
174
|
onMouseUp();
|
|
124
175
|
} else if (e.key === 'Enter') {
|
|
125
176
|
onsubmit();
|
|
@@ -129,7 +180,6 @@
|
|
|
129
180
|
</script>
|
|
130
181
|
|
|
131
182
|
<div
|
|
132
|
-
style="--option-height: {optionHeight}px"
|
|
133
183
|
class="select-wrapper"
|
|
134
184
|
role="listbox"
|
|
135
185
|
tabindex="0"
|
|
@@ -140,15 +190,19 @@
|
|
|
140
190
|
{onkeydown}
|
|
141
191
|
>
|
|
142
192
|
<div class="selected-wrapper">
|
|
143
|
-
<ul
|
|
144
|
-
{
|
|
145
|
-
|
|
193
|
+
<ul
|
|
194
|
+
bind:this={itemWrapper}
|
|
195
|
+
class="touch-date-container"
|
|
196
|
+
>
|
|
197
|
+
{#each entries as entry (entry.value)}
|
|
198
|
+
<li>{entry.label}</li>
|
|
146
199
|
{/each}
|
|
147
200
|
</ul>
|
|
148
201
|
</div>
|
|
149
202
|
</div>
|
|
150
203
|
|
|
151
204
|
<style>.select-wrapper {
|
|
205
|
+
--option-height: 50px;
|
|
152
206
|
height: calc(var(--option-height));
|
|
153
207
|
padding: 50px 0;
|
|
154
208
|
margin: 10px 0;
|
|
@@ -172,6 +226,14 @@
|
|
|
172
226
|
margin: 0;
|
|
173
227
|
padding: 0;
|
|
174
228
|
}
|
|
229
|
+
@media (prefers-reduced-motion: reduce) {
|
|
230
|
+
.touch-date-container {
|
|
231
|
+
animation-duration: 0.001ms !important;
|
|
232
|
+
animation-iteration-count: 1 !important;
|
|
233
|
+
transition-duration: 0.001ms !important;
|
|
234
|
+
scroll-behavior: auto !important;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
175
237
|
|
|
176
238
|
.selected-wrapper:before,
|
|
177
239
|
.selected-wrapper:after {
|
|
@@ -1,13 +1,85 @@
|
|
|
1
1
|
import type { DateChange } from '../Types/Internal/DateChange.js';
|
|
2
2
|
import type { DatePickerType } from '../Types/Internal/DatePickerType.js';
|
|
3
|
+
/**
|
|
4
|
+
* A single dial entry pairing the underlying value with its
|
|
5
|
+
* human-readable label. Replaces the previous parallel
|
|
6
|
+
* `values: Array<T>` / `labels: Array<string | number>` arrays whose
|
|
7
|
+
* index parity was a runtime invariant the type system could not
|
|
8
|
+
* enforce.
|
|
9
|
+
*/
|
|
10
|
+
export interface DialEntry<T> {
|
|
11
|
+
/** The underlying value selected when this entry is active. */
|
|
12
|
+
value: T;
|
|
13
|
+
/**
|
|
14
|
+
* The displayed label. `string | number` because both numeric
|
|
15
|
+
* ranges (days, years, hours) and named string lists (months) are
|
|
16
|
+
* valid label sources.
|
|
17
|
+
*/
|
|
18
|
+
label: string | number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Props for {@link Dial}.
|
|
22
|
+
*
|
|
23
|
+
* `Dial` is a touch/wheel-scroll value picker used by `DatePicker`.
|
|
24
|
+
* It renders a vertical scrolling list and reports the selected value
|
|
25
|
+
* via the `onchange` callback.
|
|
26
|
+
*
|
|
27
|
+
* @typeParam T - The underlying value type of each option (e.g. `number`
|
|
28
|
+
* for days/years, `number` for month indices).
|
|
29
|
+
*/
|
|
3
30
|
export interface DialProps<T> {
|
|
31
|
+
/**
|
|
32
|
+
* The currently selected value. Must be the `value` of one of the
|
|
33
|
+
* `entries`.
|
|
34
|
+
*/
|
|
4
35
|
selected: T;
|
|
5
|
-
|
|
6
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Ordered list of `{ value, label }` entries. Replaces the prior
|
|
38
|
+
* parallel `values` + `labels` arrays.
|
|
39
|
+
*
|
|
40
|
+
* BREAKING (vNext): was `values: Array<T> + labels: Array<string |
|
|
41
|
+
* number>`. Migrate by zipping the two arrays into entry objects:
|
|
42
|
+
*
|
|
43
|
+
* ```ts
|
|
44
|
+
* // before
|
|
45
|
+
* <Dial values={[1,2,3]} labels={['Jan','Feb','Mar']} />
|
|
46
|
+
* // after
|
|
47
|
+
* <Dial entries={[
|
|
48
|
+
* { value: 1, label: 'Jan' },
|
|
49
|
+
* { value: 2, label: 'Feb' },
|
|
50
|
+
* { value: 3, label: 'Mar' },
|
|
51
|
+
* ]} />
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
entries: ReadonlyArray<DialEntry<T>>;
|
|
55
|
+
/**
|
|
56
|
+
* Which date component this dial controls. Forwarded back through
|
|
57
|
+
* `onchange`, `onPrevious`, `onNext` so the parent `DatePicker` can
|
|
58
|
+
* dispatch the value to the correct field.
|
|
59
|
+
*/
|
|
7
60
|
type: DatePickerType;
|
|
61
|
+
/**
|
|
62
|
+
* Invoked when the user confirms the dial value (`Enter` keypress).
|
|
63
|
+
*/
|
|
8
64
|
onsubmit: () => void;
|
|
65
|
+
/**
|
|
66
|
+
* Invoked when the user requests focus on the previous dial
|
|
67
|
+
* (`ArrowLeft` keypress).
|
|
68
|
+
*/
|
|
9
69
|
onPrevious: (type: DatePickerType) => void;
|
|
70
|
+
/**
|
|
71
|
+
* Invoked when the user requests focus on the next dial
|
|
72
|
+
* (`ArrowRight` keypress).
|
|
73
|
+
*/
|
|
10
74
|
onNext: (type: DatePickerType) => void;
|
|
75
|
+
/**
|
|
76
|
+
* Invoked when the selected value changes (drag end, wheel scroll,
|
|
77
|
+
* or `ArrowUp`/`ArrowDown` keypress).
|
|
78
|
+
*/
|
|
11
79
|
onchange: (change: DateChange<T>) => void;
|
|
80
|
+
/**
|
|
81
|
+
* Two-way bindable reference to the outer wrapper element. Used by
|
|
82
|
+
* `DatePicker` to programmatically move focus between dials.
|
|
83
|
+
*/
|
|
12
84
|
ref?: HTMLDivElement | undefined;
|
|
13
85
|
}
|
|
@@ -12,12 +12,9 @@
|
|
|
12
12
|
y = $bindable(null),
|
|
13
13
|
z = $bindable(null),
|
|
14
14
|
|
|
15
|
-
// labelTop,
|
|
16
|
-
// rightIcon,
|
|
17
|
-
// onLeftIconClick,
|
|
18
|
-
// onRightIconClick,
|
|
19
|
-
|
|
20
15
|
max,
|
|
16
|
+
labelTop = 'Dimensions',
|
|
17
|
+
optional = true,
|
|
21
18
|
placeholder,
|
|
22
19
|
required = false,
|
|
23
20
|
variant = InputVariant.Default,
|
|
@@ -31,55 +28,39 @@
|
|
|
31
28
|
onblur,
|
|
32
29
|
onfocus,
|
|
33
30
|
onkeydown,
|
|
34
|
-
oninput
|
|
31
|
+
// oninput intentionally not forwarded; per-axis handleInput wires it.
|
|
32
|
+
onchange,
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
inputRefs = $bindable({}),
|
|
37
35
|
'data-type': dataType,
|
|
38
36
|
}: DimensionInputProps = $props();
|
|
39
37
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
x = (
|
|
49
|
-
isNaN(newValue) ? 0 : underMinimum ? min : overMaximum ? max : newValue
|
|
50
|
-
) as Centimetres;
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
function yNumberValidator(_node: HTMLInputElement, _newValue: number | null | undefined) {
|
|
55
|
-
return {
|
|
56
|
-
update(newValue: number) {
|
|
57
|
-
const underMinimum = min > newValue;
|
|
58
|
-
const overMaximum = max != undefined && max < newValue;
|
|
59
|
-
|
|
60
|
-
y = (
|
|
61
|
-
isNaN(newValue) ? 0 : underMinimum ? min : overMaximum ? max : newValue
|
|
62
|
-
) as Centimetres;
|
|
63
|
-
},
|
|
64
|
-
};
|
|
38
|
+
function clamp(value: number): Centimetres {
|
|
39
|
+
if (isNaN(value)) {
|
|
40
|
+
return 0 as Centimetres;
|
|
41
|
+
}
|
|
42
|
+
const underMinimum = min > value;
|
|
43
|
+
const overMaximum = max != undefined && max < value;
|
|
44
|
+
return (underMinimum ? min : overMaximum ? max : value) as Centimetres;
|
|
65
45
|
}
|
|
66
46
|
|
|
67
|
-
function
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
47
|
+
function handleInput(axis: 'x' | 'y' | 'z') {
|
|
48
|
+
return (e: Event) => {
|
|
49
|
+
const target = e.target as HTMLInputElement;
|
|
50
|
+
const raw = target.value;
|
|
51
|
+
const parsed = raw === '' ? null : clamp(Number(raw));
|
|
52
|
+
if (axis === 'x') {
|
|
53
|
+
x = parsed;
|
|
54
|
+
} else if (axis === 'y') {
|
|
55
|
+
y = parsed;
|
|
56
|
+
} else {
|
|
57
|
+
z = parsed;
|
|
58
|
+
}
|
|
59
|
+
onchange?.(axis, parsed);
|
|
78
60
|
};
|
|
79
61
|
}
|
|
80
|
-
// ^
|
|
81
62
|
|
|
82
|
-
|
|
63
|
+
const isInvalid = $derived(
|
|
83
64
|
showErrorColours &&
|
|
84
65
|
((required &&
|
|
85
66
|
(x == null ||
|
|
@@ -90,6 +71,10 @@
|
|
|
90
71
|
z.toString().trim() === '')) ||
|
|
91
72
|
invalid)
|
|
92
73
|
);
|
|
74
|
+
|
|
75
|
+
const xId = $derived(id ? `${id}-x` : undefined);
|
|
76
|
+
const yId = $derived(id ? `${id}-y` : undefined);
|
|
77
|
+
const zId = $derived(id ? `${id}-z` : undefined);
|
|
93
78
|
</script>
|
|
94
79
|
|
|
95
80
|
<div
|
|
@@ -100,30 +85,33 @@
|
|
|
100
85
|
<span
|
|
101
86
|
class="top-label"
|
|
102
87
|
class:for-default={variant === InputVariant.Default}
|
|
103
|
-
class:invalid={isInvalid}
|
|
88
|
+
class:invalid={isInvalid}
|
|
89
|
+
>{labelTop}{#if optional}
|
|
90
|
+
- <span class="optional">optional</span>{/if}</span
|
|
104
91
|
>
|
|
105
92
|
{#if variant === InputVariant.Default}
|
|
106
|
-
<span class="border"
|
|
93
|
+
<span class="border"
|
|
94
|
+
>{labelTop}{#if optional}
|
|
95
|
+
- <span class="optional">optional</span>{/if}</span
|
|
96
|
+
>
|
|
107
97
|
{/if}
|
|
108
|
-
<!-- style="--background-colour: {leftIcon?.backgroundColour ?? rightIcon?.backgroundColour};" -->
|
|
109
98
|
<div
|
|
110
99
|
class="icon-container"
|
|
111
100
|
class:for-modal={variant == InputVariant.Modal}
|
|
112
101
|
>
|
|
113
102
|
<input
|
|
114
|
-
{
|
|
103
|
+
id={xId}
|
|
115
104
|
class:for-default={variant === InputVariant.Default}
|
|
116
105
|
data-type={dataType}
|
|
117
|
-
use:xNumberValidator={x}
|
|
118
106
|
class:left-pad={leftIcon != undefined}
|
|
119
107
|
class:for-modal={variant == InputVariant.Modal}
|
|
120
108
|
type="number"
|
|
121
|
-
|
|
109
|
+
value={x ?? ''}
|
|
110
|
+
oninput={handleInput('x')}
|
|
122
111
|
{onblur}
|
|
123
112
|
{onfocus}
|
|
124
113
|
{onkeydown}
|
|
125
|
-
{
|
|
126
|
-
bind:this={inputRef}
|
|
114
|
+
bind:this={inputRefs.x}
|
|
127
115
|
{placeholder}
|
|
128
116
|
{required}
|
|
129
117
|
{disabled}
|
|
@@ -132,19 +120,18 @@
|
|
|
132
120
|
step={decimal ? 0.01 : 1}
|
|
133
121
|
/>
|
|
134
122
|
<input
|
|
135
|
-
{
|
|
123
|
+
id={yId}
|
|
136
124
|
class:for-default={variant === InputVariant.Default}
|
|
137
125
|
data-type={dataType}
|
|
138
|
-
use:yNumberValidator={y}
|
|
139
126
|
class:left-pad={leftIcon != undefined}
|
|
140
127
|
class:for-modal={variant == InputVariant.Modal}
|
|
141
128
|
type="number"
|
|
142
|
-
|
|
129
|
+
value={y ?? ''}
|
|
130
|
+
oninput={handleInput('y')}
|
|
143
131
|
{onblur}
|
|
144
132
|
{onfocus}
|
|
145
133
|
{onkeydown}
|
|
146
|
-
{
|
|
147
|
-
bind:this={inputRef}
|
|
134
|
+
bind:this={inputRefs.y}
|
|
148
135
|
{placeholder}
|
|
149
136
|
{required}
|
|
150
137
|
{disabled}
|
|
@@ -153,19 +140,18 @@
|
|
|
153
140
|
step={decimal ? 0.01 : 1}
|
|
154
141
|
/>
|
|
155
142
|
<input
|
|
156
|
-
{
|
|
143
|
+
id={zId}
|
|
157
144
|
class:for-default={variant === InputVariant.Default}
|
|
158
145
|
data-type={dataType}
|
|
159
|
-
use:zNumberValidator={z}
|
|
160
146
|
class:left-pad={leftIcon != undefined}
|
|
161
147
|
class:for-modal={variant == InputVariant.Modal}
|
|
162
148
|
type="number"
|
|
163
|
-
|
|
149
|
+
value={z ?? ''}
|
|
150
|
+
oninput={handleInput('z')}
|
|
164
151
|
{onblur}
|
|
165
152
|
{onfocus}
|
|
166
153
|
{onkeydown}
|
|
167
|
-
{
|
|
168
|
-
bind:this={inputRef}
|
|
154
|
+
bind:this={inputRefs.z}
|
|
169
155
|
{placeholder}
|
|
170
156
|
{required}
|
|
171
157
|
{disabled}
|
|
@@ -419,7 +405,7 @@ input[type=number] {
|
|
|
419
405
|
input::-webkit-outer-spin-button,
|
|
420
406
|
input::-webkit-inner-spin-button {
|
|
421
407
|
-webkit-appearance: none;
|
|
422
|
-
margin: 0;
|
|
408
|
+
margin: 0;
|
|
423
409
|
}
|
|
424
410
|
|
|
425
411
|
.error-wrapper {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { DimensionInputProps } from './DimensionInputProps.js';
|
|
2
|
-
declare const DimensionInput: import("svelte").Component<DimensionInputProps, {}, "x" | "
|
|
2
|
+
declare const DimensionInput: import("svelte").Component<DimensionInputProps, {}, "x" | "z" | "y" | "inputRefs">;
|
|
3
3
|
type DimensionInput = ReturnType<typeof DimensionInput>;
|
|
4
4
|
export default DimensionInput;
|
|
@@ -1,29 +1,64 @@
|
|
|
1
1
|
import type { InputVariant } from '../Types/Internal/InputVariant.js';
|
|
2
2
|
import type { Centimetres } from '../Types/Internal/Misc.js';
|
|
3
|
-
import type { FormEventHandler } from 'svelte/elements';
|
|
4
3
|
import type { PartialIconProps } from './PartialIconProps.js';
|
|
4
|
+
/**
|
|
5
|
+
* Per-axis refs to the three underlying number inputs. Each property is
|
|
6
|
+
* bindable independently so consumers can drive focus/showPicker on a
|
|
7
|
+
* specific axis. Replaces the previous single `inputRef` that exhibited
|
|
8
|
+
* a last-write-wins bug.
|
|
9
|
+
*/
|
|
10
|
+
export interface DimensionInputRefs {
|
|
11
|
+
x?: HTMLInputElement | undefined;
|
|
12
|
+
y?: HTMLInputElement | undefined;
|
|
13
|
+
z?: HTMLInputElement | undefined;
|
|
14
|
+
}
|
|
5
15
|
export interface DimensionInputProps {
|
|
16
|
+
/** Optional id prefix. The three inputs receive `${id}-x|-y|-z`. */
|
|
6
17
|
id?: string | undefined;
|
|
18
|
+
/** Bindable centimetre value for the x axis. */
|
|
7
19
|
x: Centimetres | null;
|
|
20
|
+
/** Bindable centimetre value for the y axis. */
|
|
8
21
|
y: Centimetres | null;
|
|
22
|
+
/** Bindable centimetre value for the z axis. */
|
|
9
23
|
z: Centimetres | null;
|
|
10
|
-
|
|
24
|
+
/** Inclusive maximum value, in centimetres. */
|
|
25
|
+
max?: Centimetres | undefined;
|
|
26
|
+
/** Visible top label. Defaults to "Dimensions". */
|
|
11
27
|
labelTop?: string | undefined;
|
|
28
|
+
/** When true, the visible "- optional" suffix is rendered. */
|
|
29
|
+
optional?: boolean;
|
|
30
|
+
/** Placeholder forwarded to each underlying input. */
|
|
12
31
|
placeholder?: string | undefined;
|
|
32
|
+
/** Whether the input is required for form submission. */
|
|
13
33
|
required?: boolean;
|
|
34
|
+
/** Visual variant. */
|
|
14
35
|
variant?: InputVariant;
|
|
36
|
+
/** Whether to permit decimal values (relaxes native step to 0.01). */
|
|
15
37
|
decimal?: boolean;
|
|
38
|
+
/** Force the invalid visual state. */
|
|
16
39
|
invalid?: boolean;
|
|
40
|
+
/** When true, error colours are shown for the invalid state. */
|
|
17
41
|
showErrorColours?: boolean;
|
|
42
|
+
/** Whether the inputs are disabled. */
|
|
18
43
|
disabled?: boolean | undefined;
|
|
44
|
+
/** Optional left-positioned icon. */
|
|
19
45
|
leftIcon?: PartialIconProps | undefined;
|
|
46
|
+
/** Optional right-positioned icon. */
|
|
20
47
|
rightIcon?: PartialIconProps | undefined;
|
|
48
|
+
/** Click handler for the left icon. */
|
|
21
49
|
onLeftIconClick?: (() => void) | undefined;
|
|
50
|
+
/** Click handler for the right icon. */
|
|
22
51
|
onRightIconClick?: (() => void) | undefined;
|
|
23
|
-
|
|
52
|
+
/** Per-axis bindable refs. Replaces single-input inputRef. */
|
|
53
|
+
inputRefs?: DimensionInputRefs;
|
|
54
|
+
/** Forwarded `data-type` attribute. */
|
|
24
55
|
'data-type'?: string;
|
|
56
|
+
/** Blur handler. */
|
|
25
57
|
onblur?: (e: FocusEvent) => void;
|
|
58
|
+
/** Focus handler. */
|
|
26
59
|
onfocus?: (e: FocusEvent) => void;
|
|
60
|
+
/** Keydown handler forwarded to each input. */
|
|
27
61
|
onkeydown?: (e: KeyboardEvent) => void;
|
|
28
|
-
|
|
62
|
+
/** Per-axis change callback. */
|
|
63
|
+
onchange?: (axis: 'x' | 'y' | 'z', value: Centimetres | null) => void;
|
|
29
64
|
}
|