@pathscale/ui 2.4.0 → 2.6.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 +4 -5
- package/dist/components/_shared/material.css +115 -0
- package/dist/components/_shared/overlayPosition.d.ts +4 -3
- package/dist/components/accordion/Accordion.generated.d.ts +1 -1
- package/dist/components/accordion/Accordion.generated.js +146 -195
- package/dist/components/accordion/Accordion.recipe.d.ts +1 -1
- package/dist/components/address/Address.generated.d.ts +1 -1
- package/dist/components/address/Address.generated.js +79 -80
- package/dist/components/address/Address.recipe.d.ts +1 -1
- package/dist/components/alert/Alert.generated.d.ts +1 -1
- package/dist/components/alert/Alert.generated.js +71 -73
- package/dist/components/alert/Alert.recipe.d.ts +1 -1
- package/dist/components/auth-card/AuthCard.generated.d.ts +1 -1
- package/dist/components/auth-card/AuthCard.generated.js +14 -14
- package/dist/components/auth-card/AuthCard.recipe.d.ts +1 -1
- package/dist/components/auth-field-group/AuthFieldGroup.generated.d.ts +1 -1
- package/dist/components/auth-field-group/AuthFieldGroup.generated.js +3 -3
- package/dist/components/auth-field-group/AuthFieldGroup.recipe.d.ts +1 -1
- package/dist/components/auth-footer-links/AuthFooterLinks.generated.d.ts +1 -1
- package/dist/components/auth-footer-links/AuthFooterLinks.generated.js +6 -5
- package/dist/components/auth-footer-links/AuthFooterLinks.recipe.d.ts +1 -1
- package/dist/components/auth-message/AuthMessage.generated.d.ts +1 -1
- package/dist/components/auth-message/AuthMessage.generated.js +2 -2
- package/dist/components/auth-message/AuthMessage.recipe.d.ts +1 -1
- package/dist/components/auth-powered-by/AuthPoweredBy.generated.d.ts +1 -1
- package/dist/components/auth-powered-by/AuthPoweredBy.generated.js +7 -6
- package/dist/components/auth-powered-by/AuthPoweredBy.recipe.d.ts +1 -1
- package/dist/components/auth-submit-button/AuthSubmitButton.generated.d.ts +1 -1
- package/dist/components/auth-submit-button/AuthSubmitButton.generated.js +2 -2
- package/dist/components/auth-submit-button/AuthSubmitButton.recipe.d.ts +1 -1
- package/dist/components/avatar/Avatar.generated.d.ts +1 -1
- package/dist/components/avatar/Avatar.generated.js +47 -71
- package/dist/components/avatar/Avatar.recipe.d.ts +1 -1
- package/dist/components/avatar/AvatarGroup.generated.d.ts +1 -1
- package/dist/components/avatar/AvatarGroup.generated.js +9 -13
- package/dist/components/badge/Badge.generated.d.ts +1 -1
- package/dist/components/badge/Badge.generated.js +38 -58
- package/dist/components/badge/Badge.recipe.d.ts +1 -1
- package/dist/components/breadcrumb/Breadcrumb.generated.d.ts +1 -1
- package/dist/components/breadcrumb/Breadcrumb.generated.js +78 -94
- package/dist/components/breadcrumb/Breadcrumb.recipe.d.ts +1 -1
- package/dist/components/button/Button.generated.d.ts +17 -1
- package/dist/components/button/Button.generated.js +77 -62
- package/dist/components/button/Button.interactions.d.ts +28 -0
- package/dist/components/button/Button.interactions.js +4 -0
- package/dist/components/button/Button.recipe.d.ts +1 -1
- package/dist/components/button-group/ButtonGroup.generated.d.ts +1 -1
- package/dist/components/button-group/ButtonGroup.generated.js +34 -51
- package/dist/components/button-group/ButtonGroup.recipe.d.ts +1 -1
- package/dist/components/button-group/context.d.ts +1 -1
- package/dist/components/calendar/Calendar.generated.d.ts +1 -1
- package/dist/components/calendar/Calendar.generated.js +280 -301
- package/dist/components/calendar/Calendar.recipe.d.ts +1 -1
- package/dist/components/card/Card.generated.d.ts +10 -4
- package/dist/components/card/Card.generated.js +53 -51
- package/dist/components/card/Card.recipe.d.ts +4 -4
- package/dist/components/chatbubble/ChatBubble.generated.d.ts +1 -1
- package/dist/components/chatbubble/ChatBubble.generated.js +20 -27
- package/dist/components/chatbubble/ChatBubble.recipe.d.ts +1 -1
- package/dist/components/chatbubble/ChatBubbleAvatar.generated.js +5 -5
- package/dist/components/chatbubble/ChatBubbleFooter.generated.d.ts +1 -1
- package/dist/components/chatbubble/ChatBubbleFooter.generated.js +10 -14
- package/dist/components/chatbubble/ChatBubbleHeader.generated.d.ts +1 -1
- package/dist/components/chatbubble/ChatBubbleHeader.generated.js +10 -14
- package/dist/components/chatbubble/ChatBubbleMessage.generated.d.ts +1 -1
- package/dist/components/chatbubble/ChatBubbleMessage.generated.js +14 -19
- package/dist/components/chatbubble/ChatBubbleTime.generated.d.ts +1 -1
- package/dist/components/chatbubble/ChatBubbleTime.generated.js +10 -14
- package/dist/components/checkbox/Checkbox.generated.d.ts +1 -1
- package/dist/components/checkbox/Checkbox.generated.js +133 -152
- package/dist/components/checkbox/Checkbox.recipe.d.ts +1 -1
- package/dist/components/checkbox-group/CheckboxGroup.generated.d.ts +1 -1
- package/dist/components/checkbox-group/CheckboxGroup.generated.js +21 -35
- package/dist/components/checkbox-group/CheckboxGroup.recipe.d.ts +1 -1
- package/dist/components/checkbox-group/context.d.ts +1 -1
- package/dist/components/chip/Chip.generated.d.ts +1 -1
- package/dist/components/chip/Chip.generated.js +103 -119
- package/dist/components/chip/Chip.recipe.d.ts +1 -1
- package/dist/components/close-button/CloseButton.generated.d.ts +1 -1
- package/dist/components/close-button/CloseButton.generated.js +64 -78
- package/dist/components/close-button/CloseButton.recipe.d.ts +1 -1
- package/dist/components/collapsible/Collapsible.generated.d.ts +1 -1
- package/dist/components/collapsible/Collapsible.generated.js +120 -168
- package/dist/components/collapsible/Collapsible.recipe.d.ts +1 -1
- package/dist/components/color-area/ColorArea.generated.d.ts +1 -1
- package/dist/components/color-area/ColorArea.generated.js +69 -79
- package/dist/components/color-area/ColorArea.recipe.d.ts +1 -1
- package/dist/components/color-field/ColorField.generated.d.ts +1 -1
- package/dist/components/color-field/ColorField.generated.js +68 -84
- package/dist/components/color-field/ColorField.recipe.d.ts +1 -1
- package/dist/components/color-picker/ColorPicker.generated.d.ts +1 -1
- package/dist/components/color-picker/ColorPicker.generated.js +45 -69
- package/dist/components/color-picker/ColorPicker.recipe.d.ts +1 -1
- package/dist/components/color-slider/ColorSlider.generated.d.ts +1 -1
- package/dist/components/color-slider/ColorSlider.generated.js +83 -94
- package/dist/components/color-slider/ColorSlider.recipe.d.ts +1 -1
- package/dist/components/color-swatch/ColorSwatch.generated.d.ts +1 -1
- package/dist/components/color-swatch/ColorSwatch.generated.js +69 -89
- package/dist/components/color-swatch/ColorSwatch.recipe.d.ts +1 -1
- package/dist/components/color-swatch-picker/ColorSwatchPicker.generated.d.ts +3 -2
- package/dist/components/color-swatch-picker/ColorSwatchPicker.generated.js +18 -28
- package/dist/components/color-swatch-picker/ColorSwatchPicker.recipe.d.ts +1 -1
- package/dist/components/color-wheel-flower/ColorWheelFlower.generated.js +243 -250
- package/dist/components/color-wheel-flower/ColorWheelFlower.recipe.d.ts +1 -1
- package/dist/components/combo-box/ComboBox.generated.d.ts +1 -1
- package/dist/components/combo-box/ComboBox.generated.js +334 -406
- package/dist/components/combo-box/ComboBox.recipe.d.ts +1 -1
- package/dist/components/composer/Composer.generated.d.ts +1 -1
- package/dist/components/composer/Composer.generated.js +112 -112
- package/dist/components/composer/Composer.recipe.d.ts +1 -1
- package/dist/components/data-grid/DataGrid.generated.d.ts +1 -1
- package/dist/components/data-grid/DataGrid.generated.js +61 -78
- package/dist/components/data-grid/DataGrid.interactions.d.ts +1 -1
- package/dist/components/data-grid/DataGrid.recipe.d.ts +1 -1
- package/dist/components/data-grid/createDataGrid.d.ts +2 -1
- package/dist/components/data-grid/createDataGrid.js +43 -26
- package/dist/components/data-grid/index.d.ts +1 -1
- package/dist/components/date-field/DateField.generated.d.ts +1 -1
- package/dist/components/date-field/DateField.generated.js +160 -221
- package/dist/components/date-field/DateField.recipe.d.ts +1 -1
- package/dist/components/date-picker/DatePicker.generated.d.ts +1 -1
- package/dist/components/date-picker/DatePicker.generated.js +154 -174
- package/dist/components/date-picker/DatePicker.recipe.d.ts +1 -1
- package/dist/components/date-range-picker/DateRangePicker.generated.d.ts +1 -1
- package/dist/components/date-range-picker/DateRangePicker.generated.js +198 -221
- package/dist/components/date-range-picker/DateRangePicker.recipe.d.ts +1 -1
- package/dist/components/dialog/Dialog.generated.d.ts +12 -2
- package/dist/components/dialog/Dialog.generated.js +224 -320
- package/dist/components/dialog/Dialog.recipe.d.ts +1 -1
- package/dist/components/dock/Dock.generated.d.ts +1 -1
- package/dist/components/dock/Dock.generated.js +358 -391
- package/dist/components/dock/Dock.recipe.d.ts +1 -1
- package/dist/components/drawer/Drawer.context.d.ts +1 -1
- package/dist/components/drawer/Drawer.generated.d.ts +5 -2
- package/dist/components/drawer/Drawer.generated.js +280 -382
- package/dist/components/drawer/Drawer.recipe.d.ts +1 -1
- package/dist/components/dropdown/Dropdown.generated.d.ts +1 -1
- package/dist/components/dropdown/Dropdown.generated.js +146 -199
- package/dist/components/dropdown/Dropdown.recipe.d.ts +1 -1
- package/dist/components/empty/Empty.generated.d.ts +1 -1
- package/dist/components/empty/Empty.generated.js +82 -117
- package/dist/components/empty/Empty.recipe.d.ts +1 -1
- package/dist/components/fieldset/Fieldset.generated.d.ts +1 -1
- package/dist/components/fieldset/Fieldset.generated.js +64 -92
- package/dist/components/fieldset/Fieldset.recipe.d.ts +1 -1
- package/dist/components/flex/Flex.generated.d.ts +1 -1
- package/dist/components/flex/Flex.generated.js +8 -28
- package/dist/components/flex/Flex.recipe.d.ts +1 -1
- package/dist/components/footer/Footer.generated.d.ts +1 -1
- package/dist/components/footer/Footer.generated.js +16 -25
- package/dist/components/footer/Footer.recipe.d.ts +1 -1
- package/dist/components/footer/FooterTitle.generated.d.ts +1 -1
- package/dist/components/footer/FooterTitle.generated.js +16 -22
- package/dist/components/form/FieldErrorMessage.generated.d.ts +1 -1
- package/dist/components/form/FieldErrorMessage.generated.js +4 -4
- package/dist/components/form/Form.generated.d.ts +1 -1
- package/dist/components/form/Form.generated.js +30 -41
- package/dist/components/form/Form.recipe.d.ts +1 -1
- package/dist/components/form/FormField.generated.d.ts +1 -1
- package/dist/components/form/FormField.generated.js +62 -77
- package/dist/components/form/FormSubmitButton.generated.js +14 -24
- package/dist/components/glow-card/GlowCard.generated.d.ts +1 -1
- package/dist/components/glow-card/GlowCard.generated.js +27 -35
- package/dist/components/glow-card/GlowCard.recipe.d.ts +1 -1
- package/dist/components/grid/Grid.generated.d.ts +1 -1
- package/dist/components/grid/Grid.generated.js +9 -19
- package/dist/components/grid/Grid.recipe.d.ts +1 -1
- package/dist/components/header/Header.generated.d.ts +1 -1
- package/dist/components/header/Header.generated.js +19 -26
- package/dist/components/header/Header.recipe.d.ts +1 -1
- package/dist/components/icon/Icon.generated.d.ts +1 -1
- package/dist/components/icon/Icon.generated.js +10 -14
- package/dist/components/icon/Icon.recipe.d.ts +1 -1
- package/dist/components/immersive-landing/ImmersiveLanding.generated.js +57 -78
- package/dist/components/immersive-landing/ImmersiveLanding.recipe.d.ts +1 -1
- package/dist/components/immersive-landing/ImmersiveLandingArrows.generated.js +24 -29
- package/dist/components/immersive-landing/ImmersiveLandingContext.d.ts +1 -1
- package/dist/components/immersive-landing/ImmersiveLandingNavigation.generated.js +111 -122
- package/dist/components/immersive-landing/ImmersiveLandingPage.generated.js +36 -42
- package/dist/components/immersive-landing/components/CookieConsent.js +56 -36
- package/dist/components/immersive-landing/components/FirefoxPWABanner.js +15 -11
- package/dist/components/immersive-landing/components/PWAInstallPrompt.js +17 -11
- package/dist/components/immersive-landing/types.d.ts +2 -1
- package/dist/components/immersive-landing/useImmersiveLanding.js +2 -2
- package/dist/components/input/Input.generated.d.ts +2 -1
- package/dist/components/input/Input.generated.js +129 -177
- package/dist/components/input/Input.recipe.d.ts +1 -1
- package/dist/components/input-otp/InputOTP.generated.d.ts +2 -2
- package/dist/components/input-otp/InputOTP.generated.js +132 -177
- package/dist/components/input-otp/InputOTP.recipe.d.ts +1 -1
- package/dist/components/join/Join.generated.d.ts +1 -1
- package/dist/components/join/Join.generated.js +23 -33
- package/dist/components/join/Join.recipe.d.ts +1 -1
- package/dist/components/kbd/Kbd.generated.d.ts +2 -1
- package/dist/components/kbd/Kbd.generated.js +59 -82
- package/dist/components/kbd/Kbd.recipe.d.ts +1 -1
- package/dist/components/label/Label.generated.d.ts +1 -1
- package/dist/components/label/Label.generated.js +38 -50
- package/dist/components/label/Label.recipe.d.ts +1 -1
- package/dist/components/language-switcher/LanguageSwitcher.generated.js +20 -30
- package/dist/components/language-switcher/LanguageSwitcher.recipe.d.ts +1 -1
- package/dist/components/language-switcher/createI18n.d.ts +4 -3
- package/dist/components/language-switcher/createI18n.js +2 -2
- package/dist/components/link/Link.generated.d.ts +2 -1
- package/dist/components/link/Link.generated.js +77 -99
- package/dist/components/link/Link.recipe.d.ts +1 -1
- package/dist/components/list-box/ListBox.generated.d.ts +1 -1
- package/dist/components/list-box/ListBox.generated.js +30 -49
- package/dist/components/list-box/ListBox.recipe.d.ts +1 -1
- package/dist/components/list-box/ListBoxItem.generated.d.ts +1 -1
- package/dist/components/list-box/ListBoxItem.generated.js +67 -83
- package/dist/components/list-box/ListBoxSection.generated.d.ts +1 -1
- package/dist/components/list-box/ListBoxSection.generated.js +39 -48
- package/dist/components/list-box/context.d.ts +1 -1
- package/dist/components/live-chat/LiveChat.recipe.d.ts +1 -1
- package/dist/components/live-chat/LiveChatBubble.generated.d.ts +1 -1
- package/dist/components/live-chat/LiveChatBubble.generated.js +38 -53
- package/dist/components/live-chat/LiveChatPanel.generated.js +158 -176
- package/dist/components/menu/Menu.generated.d.ts +5 -2
- package/dist/components/menu/Menu.generated.js +33 -47
- package/dist/components/menu/Menu.recipe.d.ts +1 -1
- package/dist/components/menu/MenuItem.generated.d.ts +1 -1
- package/dist/components/menu/MenuItem.generated.js +95 -119
- package/dist/components/menu/MenuSection.generated.d.ts +1 -1
- package/dist/components/menu/MenuSection.generated.js +39 -48
- package/dist/components/menu/context.d.ts +1 -1
- package/dist/components/metal-border/MetalBorder.generated.d.ts +1 -1
- package/dist/components/metal-border/MetalBorder.generated.js +72 -86
- package/dist/components/metal-border/MetalBorder.recipe.d.ts +1 -1
- package/dist/components/meter/Meter.generated.d.ts +1 -1
- package/dist/components/meter/Meter.generated.js +71 -107
- package/dist/components/meter/Meter.recipe.d.ts +1 -1
- package/dist/components/navbar/Navbar.generated.d.ts +5 -2
- package/dist/components/navbar/Navbar.generated.js +14 -16
- package/dist/components/navbar/Navbar.recipe.d.ts +1 -1
- package/dist/components/navbar/NavbarRow.generated.d.ts +1 -1
- package/dist/components/navbar/NavbarRow.generated.js +21 -32
- package/dist/components/navbar/NavbarSection.generated.d.ts +1 -1
- package/dist/components/navbar/NavbarSection.generated.js +20 -28
- package/dist/components/navbar/NavbarStack.generated.d.ts +1 -1
- package/dist/components/navbar/NavbarStack.generated.js +20 -29
- package/dist/components/noise-background/NoiseBackground.generated.d.ts +1 -1
- package/dist/components/noise-background/NoiseBackground.generated.js +85 -100
- package/dist/components/noise-background/NoiseBackground.recipe.d.ts +1 -1
- package/dist/components/pagination/Pagination.generated.d.ts +1 -1
- package/dist/components/pagination/Pagination.generated.js +114 -117
- package/dist/components/pagination/Pagination.recipe.d.ts +1 -1
- package/dist/components/password-field/PasswordField.generated.d.ts +1 -1
- package/dist/components/password-field/PasswordField.generated.js +56 -58
- package/dist/components/password-field/PasswordField.interactions.d.ts +1 -1
- package/dist/components/password-field/PasswordField.interactions.js +1 -1
- package/dist/components/password-field/PasswordField.recipe.d.ts +1 -1
- package/dist/components/password-requirements/PasswordRequirements.generated.d.ts +1 -1
- package/dist/components/password-requirements/PasswordRequirements.generated.js +8 -8
- package/dist/components/password-requirements/PasswordRequirements.recipe.d.ts +1 -1
- package/dist/components/popover/Popover.generated.d.ts +5 -2
- package/dist/components/popover/Popover.generated.js +123 -170
- package/dist/components/popover/Popover.recipe.d.ts +1 -1
- package/dist/components/progress/Progress.generated.d.ts +1 -1
- package/dist/components/progress/Progress.generated.js +82 -98
- package/dist/components/progress/Progress.recipe.d.ts +1 -1
- package/dist/components/radial-progress/RadialProgress.generated.d.ts +1 -1
- package/dist/components/radial-progress/RadialProgress.generated.js +74 -89
- package/dist/components/radial-progress/RadialProgress.recipe.d.ts +1 -1
- package/dist/components/radio/Radio.generated.d.ts +1 -1
- package/dist/components/radio/Radio.generated.js +110 -126
- package/dist/components/radio/Radio.recipe.d.ts +1 -1
- package/dist/components/radio-group/RadioGroup.generated.d.ts +1 -1
- package/dist/components/radio-group/RadioGroup.generated.js +46 -61
- package/dist/components/radio-group/RadioGroup.recipe.d.ts +1 -1
- package/dist/components/radio-group/context.d.ts +1 -1
- package/dist/components/range-calendar/RangeCalendar.generated.d.ts +1 -1
- package/dist/components/range-calendar/RangeCalendar.generated.js +72 -92
- package/dist/components/range-calendar/RangeCalendar.recipe.d.ts +1 -1
- package/dist/components/scroll-area/ScrollArea.generated.d.ts +1 -1
- package/dist/components/scroll-area/ScrollArea.generated.js +37 -53
- package/dist/components/scroll-area/ScrollArea.recipe.d.ts +1 -1
- package/dist/components/select/Select.generated.d.ts +2 -1
- package/dist/components/select/Select.generated.js +326 -404
- package/dist/components/select/Select.recipe.d.ts +1 -1
- package/dist/components/separator/Separator.generated.d.ts +1 -1
- package/dist/components/separator/Separator.generated.js +33 -42
- package/dist/components/separator/Separator.recipe.d.ts +1 -1
- package/dist/components/size-picker/SizePicker.generated.js +41 -50
- package/dist/components/size-picker/SizePicker.recipe.d.ts +1 -1
- package/dist/components/skeleton/Skeleton.generated.d.ts +1 -1
- package/dist/components/skeleton/Skeleton.generated.js +8 -7
- package/dist/components/skeleton/Skeleton.recipe.d.ts +1 -1
- package/dist/components/slider/Slider.generated.d.ts +1 -1
- package/dist/components/slider/Slider.generated.js +147 -163
- package/dist/components/slider/Slider.recipe.d.ts +1 -1
- package/dist/components/spinner/Spinner.generated.d.ts +1 -1
- package/dist/components/spinner/Spinner.generated.js +9 -11
- package/dist/components/spinner/Spinner.recipe.d.ts +1 -1
- package/dist/components/status/status.d.ts +1 -1
- package/dist/components/switch/Switch.generated.d.ts +1 -1
- package/dist/components/switch/Switch.generated.js +113 -128
- package/dist/components/switch/Switch.recipe.d.ts +1 -1
- package/dist/components/table/ExpandToggle.generated.d.ts +1 -1
- package/dist/components/table/ExpandToggle.generated.js +67 -78
- package/dist/components/table/InlineConfirm.generated.js +54 -67
- package/dist/components/table/MobileListView.generated.d.ts +1 -1
- package/dist/components/table/MobileListView.generated.js +60 -73
- package/dist/components/table/SortIcon.generated.d.ts +1 -1
- package/dist/components/table/SortIcon.generated.js +46 -56
- package/dist/components/table/Table.context.d.ts +4 -3
- package/dist/components/table/Table.context.js +8 -16
- package/dist/components/table/Table.recipe.d.ts +20 -20
- package/dist/components/table/TableBody.generated.d.ts +1 -1
- package/dist/components/table/TableBody.generated.js +16 -22
- package/dist/components/table/TableCell.generated.d.ts +1 -1
- package/dist/components/table/TableCell.generated.js +16 -22
- package/dist/components/table/TableColumn.generated.d.ts +1 -1
- package/dist/components/table/TableColumn.generated.js +40 -51
- package/dist/components/table/TableColumnResizer.generated.d.ts +1 -1
- package/dist/components/table/TableColumnResizer.generated.js +23 -31
- package/dist/components/table/TableContent.generated.d.ts +1 -1
- package/dist/components/table/TableContent.generated.js +14 -20
- package/dist/components/table/TableExpandedRow.generated.d.ts +2 -2
- package/dist/components/table/TableExpandedRow.generated.js +12 -20
- package/dist/components/table/TableFooter.generated.d.ts +1 -1
- package/dist/components/table/TableFooter.generated.js +16 -22
- package/dist/components/table/TableHeader.generated.d.ts +1 -1
- package/dist/components/table/TableHeader.generated.js +16 -22
- package/dist/components/table/TableLoadMore.generated.d.ts +1 -1
- package/dist/components/table/TableLoadMore.generated.js +16 -22
- package/dist/components/table/TableLoadMoreContent.generated.d.ts +1 -1
- package/dist/components/table/TableLoadMoreContent.generated.js +16 -22
- package/dist/components/table/TablePageSize.generated.d.ts +1 -1
- package/dist/components/table/TablePageSize.generated.js +35 -46
- package/dist/components/table/TableResizableContainer.generated.d.ts +1 -1
- package/dist/components/table/TableResizableContainer.generated.js +16 -22
- package/dist/components/table/TableRoot.generated.d.ts +1 -1
- package/dist/components/table/TableRoot.generated.js +11 -16
- package/dist/components/table/TableRow.generated.d.ts +1 -1
- package/dist/components/table/TableRow.generated.js +16 -22
- package/dist/components/table/TableScrollContainer.generated.d.ts +1 -1
- package/dist/components/table/TableScrollContainer.generated.js +16 -22
- package/dist/components/table/VirtualSpacerRow.generated.d.ts +1 -1
- package/dist/components/table/VirtualSpacerRow.generated.js +23 -28
- package/dist/components/table/index.d.ts +2 -2
- package/dist/components/table/index.js +1 -1
- package/dist/components/tabs/Tabs.generated.d.ts +1 -1
- package/dist/components/tabs/Tabs.generated.js +156 -194
- package/dist/components/tabs/Tabs.recipe.d.ts +1 -1
- package/dist/components/text/Text.generated.d.ts +1 -1
- package/dist/components/text/Text.generated.js +42 -56
- package/dist/components/text/Text.recipe.d.ts +1 -1
- package/dist/components/textarea/Textarea.generated.d.ts +1 -1
- package/dist/components/textarea/Textarea.generated.js +38 -49
- package/dist/components/textarea/Textarea.recipe.d.ts +1 -1
- package/dist/components/theme-color-picker/ThemeColorPicker.generated.d.ts +1 -1
- package/dist/components/theme-color-picker/ThemeColorPicker.generated.js +36 -46
- package/dist/components/theme-color-picker/ThemeColorPicker.recipe.d.ts +1 -1
- package/dist/components/theme-color-picker/hueShift.js +8 -5
- package/dist/components/time-field/TimeField.generated.d.ts +1 -1
- package/dist/components/time-field/TimeField.generated.js +160 -221
- package/dist/components/time-field/TimeField.recipe.d.ts +1 -1
- package/dist/components/toast/Toast.generated.d.ts +2 -1
- package/dist/components/toast/Toast.generated.js +234 -306
- package/dist/components/toast/Toast.recipe.d.ts +1 -1
- package/dist/components/toolbar/Toolbar.generated.d.ts +1 -1
- package/dist/components/toolbar/Toolbar.generated.js +33 -45
- package/dist/components/toolbar/Toolbar.recipe.d.ts +1 -1
- package/dist/components/tooltip/Tooltip.generated.d.ts +1 -1
- package/dist/components/tooltip/Tooltip.generated.js +86 -125
- package/dist/components/tooltip/Tooltip.recipe.d.ts +1 -1
- package/dist/components/utils.d.ts +1 -1
- package/dist/components/utils.js +1 -1
- package/dist/components/video-preview/VideoPreview.generated.d.ts +2 -1
- package/dist/components/video-preview/VideoPreview.generated.js +28 -37
- package/dist/components/video-preview/VideoPreview.recipe.d.ts +1 -1
- package/dist/components/vocabulary.d.ts +19 -1
- package/dist/hooks/date/useCalendarNavigation.d.ts +4 -4
- package/dist/hooks/date/useCalendarState.d.ts +6 -6
- package/dist/hooks/date/useDateSelection.d.ts +2 -2
- package/dist/hooks/date/usePickerOpenState.d.ts +2 -2
- package/dist/hooks/date/usePickerOpenState.js +2 -2
- package/dist/hooks/date/useRangeSelection.d.ts +8 -8
- package/dist/hooks/form/FormContext.d.ts +1 -1
- package/dist/hooks/form/createForm.d.ts +41 -31
- package/dist/hooks/form/createForm.js +109 -84
- package/dist/hooks/form/useFieldNew.d.ts +3 -3
- package/dist/hooks/form/useFieldNew.js +6 -15
- package/dist/hooks/layout/useDesktop.d.ts +1 -1
- package/dist/hooks/layout/useDesktop.js +2 -2
- package/dist/hooks/table/index.d.ts +0 -7
- package/dist/hooks/table/index.js +0 -7
- package/dist/hooks/table/useAnchoredOverlayPosition.d.ts +3 -2
- package/dist/index.d.ts +3 -5
- package/dist/index.js +1 -2
- package/dist/layouts.manifest.json +1 -1
- package/dist/lib/layouts/index.d.ts +1 -1
- package/dist/lib/layouts/index.js +1 -1
- package/dist/lib/twMerge.d.ts +21 -0
- package/dist/lib/twMerge.js +12 -0
- package/dist/motion/solid/AnimatedCollapse.d.ts +3 -14
- package/dist/motion/solid/AnimatedCollapse.js +20 -42
- package/dist/motion/solid/MotionDiv.d.ts +2 -1
- package/dist/motion/solid/MotionDiv.js +16 -28
- package/dist/motion/solid/Presence.d.ts +3 -10
- package/dist/motion/solid/Presence.js +2 -15
- package/dist/motion/solid/collapseState.d.ts +14 -0
- package/dist/motion/solid/collapseState.js +22 -0
- package/dist/motion/solid/presenceState.d.ts +9 -0
- package/dist/motion/solid/presenceState.js +15 -0
- package/package.json +13 -33
- package/dist/hooks/table/helpers.d.ts +0 -7
- package/dist/hooks/table/helpers.js +0 -26
- package/dist/hooks/table/useTableExpansion.d.ts +0 -13
- package/dist/hooks/table/useTableExpansion.js +0 -17
- package/dist/hooks/table/useTableFiltering.d.ts +0 -30
- package/dist/hooks/table/useTableFiltering.js +0 -67
- package/dist/hooks/table/useTableModel.d.ts +0 -27
- package/dist/hooks/table/useTableModel.js +0 -56
- package/dist/hooks/table/useTablePagination.d.ts +0 -20
- package/dist/hooks/table/useTablePagination.js +0 -48
- package/dist/hooks/table/useTableSelection.d.ts +0 -14
- package/dist/hooks/table/useTableSelection.js +0 -17
- package/dist/hooks/table/useTableSorting.d.ts +0 -19
- package/dist/hooks/table/useTableSorting.js +0 -21
- package/dist/primitives/virtualizer/index.d.ts +0 -2
- package/dist/primitives/virtualizer/index.js +0 -1
- package/dist/primitives/virtualizer/useVirtualRows.d.ts +0 -18
- package/dist/primitives/virtualizer/useVirtualRows.js +0 -31
|
@@ -6,16 +6,16 @@ type CalendarNavigationOptions = {
|
|
|
6
6
|
isDateDisabled: (date: Date) => boolean;
|
|
7
7
|
};
|
|
8
8
|
export declare const useCalendarNavigation: (options: CalendarNavigationOptions) => {
|
|
9
|
-
visibleMonth:
|
|
10
|
-
focusedDate:
|
|
9
|
+
visibleMonth: import("solid-js").SourceAccessor<Date>;
|
|
10
|
+
focusedDate: import("solid-js").SourceAccessor<Date>;
|
|
11
11
|
setFocusedDate: import("solid-js").Setter<Date>;
|
|
12
12
|
clampVisibleMonth: (nextVisibleMonth: Date) => Date;
|
|
13
13
|
setVisibleMonthFromDate: (date: Date) => void;
|
|
14
14
|
findNearestEnabledDate: (startDate: Date, direction: 1 | -1) => Date;
|
|
15
15
|
moveFocusToDate: (date: Date, direction: 1 | -1) => Date;
|
|
16
16
|
navigateMonth: (direction: -1 | 1) => Date | null;
|
|
17
|
-
canNavigatePrevious:
|
|
18
|
-
canNavigateNext:
|
|
17
|
+
canNavigatePrevious: import("solid-js").SourceAccessor<boolean>;
|
|
18
|
+
canNavigateNext: import("solid-js").SourceAccessor<boolean>;
|
|
19
19
|
syncFocusedDate: (value: Date | null) => void;
|
|
20
20
|
};
|
|
21
21
|
export {};
|
|
@@ -28,15 +28,15 @@ export type CalendarCellState = {
|
|
|
28
28
|
isAriaSelected: boolean;
|
|
29
29
|
};
|
|
30
30
|
export declare const useCalendarState: (options: CalendarStateOptions) => {
|
|
31
|
-
monthFormatter:
|
|
32
|
-
dayLabelFormatter:
|
|
33
|
-
weekdayLabels:
|
|
34
|
-
calendarWeeks:
|
|
35
|
-
normalizedRange:
|
|
31
|
+
monthFormatter: import("solid-js").SourceAccessor<Intl.DateTimeFormat>;
|
|
32
|
+
dayLabelFormatter: import("solid-js").SourceAccessor<Intl.DateTimeFormat>;
|
|
33
|
+
weekdayLabels: import("solid-js").SourceAccessor<string[]>;
|
|
34
|
+
calendarWeeks: import("solid-js").SourceAccessor<Date[][]>;
|
|
35
|
+
normalizedRange: import("solid-js").SourceAccessor<{
|
|
36
36
|
start: Date | null;
|
|
37
37
|
end: Date | null;
|
|
38
38
|
}>;
|
|
39
|
-
previewRange:
|
|
39
|
+
previewRange: import("solid-js").SourceAccessor<{
|
|
40
40
|
start: Date | null;
|
|
41
41
|
end: Date | null;
|
|
42
42
|
}>;
|
|
@@ -5,8 +5,8 @@ type DateSelectionOptions = {
|
|
|
5
5
|
onChange: Accessor<((value: Date) => void) | undefined>;
|
|
6
6
|
};
|
|
7
7
|
export declare const useDateSelection: (options: DateSelectionOptions) => {
|
|
8
|
-
isControlled:
|
|
9
|
-
selectedDate:
|
|
8
|
+
isControlled: import("solid-js").SourceAccessor<boolean>;
|
|
9
|
+
selectedDate: import("solid-js").SourceAccessor<Date | null>;
|
|
10
10
|
setSelectedDate: (value: Date) => void;
|
|
11
11
|
};
|
|
12
12
|
export {};
|
|
@@ -6,8 +6,8 @@ type PickerOpenStateOptions = {
|
|
|
6
6
|
isDisabled: Accessor<boolean>;
|
|
7
7
|
};
|
|
8
8
|
export declare const usePickerOpenState: (options: PickerOpenStateOptions) => {
|
|
9
|
-
isOpen:
|
|
10
|
-
isControlled:
|
|
9
|
+
isOpen: import("solid-js").SourceAccessor<boolean>;
|
|
10
|
+
isControlled: import("solid-js").SourceAccessor<boolean>;
|
|
11
11
|
setOpen: (nextOpen: boolean) => void;
|
|
12
12
|
toggleOpen: () => void;
|
|
13
13
|
setRootRef: import("solid-js").Setter<HTMLElement | undefined>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createEffect, createMemo, createSignal, onCleanup,
|
|
1
|
+
import { createEffect, createMemo, createSignal, onCleanup, onSettled } from "solid-js";
|
|
2
2
|
const usePickerOpenState = (options)=>{
|
|
3
3
|
const [internalOpen, setInternalOpen] = createSignal(Boolean(options.defaultOpen()));
|
|
4
4
|
const [rootRef, setRootRef] = createSignal(void 0);
|
|
@@ -13,7 +13,7 @@ const usePickerOpenState = (options)=>{
|
|
|
13
13
|
const toggleOpen = ()=>{
|
|
14
14
|
setOpen(!isOpen());
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
onSettled(()=>{
|
|
17
17
|
const handlePointerDown = (event)=>{
|
|
18
18
|
if (!isOpen()) return;
|
|
19
19
|
const root = rootRef();
|
|
@@ -7,17 +7,17 @@ type RangeSelectionOptions = {
|
|
|
7
7
|
onChange: Accessor<((value: ControlledDateRangeValue) => void) | undefined>;
|
|
8
8
|
};
|
|
9
9
|
export declare const useRangeSelection: (options: RangeSelectionOptions) => {
|
|
10
|
-
isControlled:
|
|
11
|
-
isSelectingEnd:
|
|
12
|
-
committedRange:
|
|
13
|
-
hoveredDate:
|
|
14
|
-
rangeStart:
|
|
15
|
-
rangeEnd:
|
|
16
|
-
previewRange:
|
|
10
|
+
isControlled: import("solid-js").SourceAccessor<boolean>;
|
|
11
|
+
isSelectingEnd: import("solid-js").SourceAccessor<boolean>;
|
|
12
|
+
committedRange: import("solid-js").SourceAccessor<DateRangeValue | null>;
|
|
13
|
+
hoveredDate: import("solid-js").SourceAccessor<Date | null>;
|
|
14
|
+
rangeStart: import("solid-js").SourceAccessor<Date | null>;
|
|
15
|
+
rangeEnd: import("solid-js").SourceAccessor<Date | null>;
|
|
16
|
+
previewRange: import("solid-js").SourceAccessor<{
|
|
17
17
|
start: Date | null;
|
|
18
18
|
end: Date | null;
|
|
19
19
|
}>;
|
|
20
|
-
focusDate:
|
|
20
|
+
focusDate: import("solid-js").SourceAccessor<Date | null>;
|
|
21
21
|
selectDate: (value: Date) => void;
|
|
22
22
|
setCommittedRange: (nextValue: ControlledDateRangeValue) => void;
|
|
23
23
|
setHoverDate: (value: Date | undefined) => void;
|
|
@@ -11,6 +11,6 @@ export declare const FormContext: import("solid-js").Context<AnyFormApi | null>;
|
|
|
11
11
|
* @example
|
|
12
12
|
* // Inside a component rendered as a child of <Form form={form}>
|
|
13
13
|
* const form = useFormContext();
|
|
14
|
-
* const
|
|
14
|
+
* const value = form.getFieldValue("email");
|
|
15
15
|
*/
|
|
16
16
|
export declare const useFormContext: () => AnyFormApi;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { StandardSchemaV1 } from "@standard-schema/spec";
|
|
2
|
-
|
|
2
|
+
import { getFirstFieldError } from "./getFirstFieldError";
|
|
3
|
+
type AnyValues = Record<string, any>;
|
|
3
4
|
export type AsyncValidatorFn<TValues extends AnyValues> = (context: {
|
|
4
5
|
value: TValues;
|
|
5
6
|
}) => Promise<Partial<Record<keyof TValues, string>> | undefined>;
|
|
@@ -11,8 +12,7 @@ export type CreateFormOptions<TValues extends AnyValues = AnyValues> = {
|
|
|
11
12
|
defaultValues: TValues;
|
|
12
13
|
/**
|
|
13
14
|
* Any Standard Schema-compatible schema (Zod, Valibot, Arktype, ...).
|
|
14
|
-
*
|
|
15
|
-
* `validators.onSubmit`.
|
|
15
|
+
* Runs on change, on blur and on submit.
|
|
16
16
|
*/
|
|
17
17
|
schema?: StandardSchemaV1<TValues>;
|
|
18
18
|
/**
|
|
@@ -28,44 +28,54 @@ export type CreateFormOptions<TValues extends AnyValues = AnyValues> = {
|
|
|
28
28
|
*/
|
|
29
29
|
onSubmit?: (value: TValues) => void | Promise<void>;
|
|
30
30
|
};
|
|
31
|
+
/** What a field tracks besides its value. */
|
|
32
|
+
type FieldMeta = {
|
|
33
|
+
isTouched: boolean;
|
|
34
|
+
errors: string[];
|
|
35
|
+
};
|
|
31
36
|
/**
|
|
32
37
|
* The form API returned by `createForm`.
|
|
33
38
|
*
|
|
34
|
-
* Consumers should use `<Form form={api}>` to wire it into the component tree
|
|
35
|
-
*
|
|
39
|
+
* Consumers should use `<Form form={api}>` to wire it into the component tree,
|
|
40
|
+
* and read individual fields with `useField(name)`.
|
|
36
41
|
*/
|
|
37
42
|
export type FormApi<TValues extends AnyValues = AnyValues> = {
|
|
38
|
-
/**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
/** Every field's current value. */
|
|
44
|
+
values: () => TValues;
|
|
45
|
+
/** One field's current value. */
|
|
46
|
+
getFieldValue: (name: string) => unknown;
|
|
47
|
+
/** One field's touched flag and errors. */
|
|
48
|
+
getFieldMeta: (name: string) => FieldMeta;
|
|
49
|
+
/** Write a value and re-run the synchronous schema. */
|
|
50
|
+
setFieldValue: (name: string, value: unknown) => void;
|
|
51
|
+
/** Mark touched and validate, which is what a blur means. */
|
|
52
|
+
validateField: (name: string, cause: "change" | "blur") => void | Promise<void>;
|
|
53
|
+
/** Validate everything, run async validators, then `onSubmit` if clean. */
|
|
54
|
+
submit: () => Promise<void>;
|
|
55
|
+
/** True while `submit()` is awaiting. */
|
|
56
|
+
isSubmitting: () => boolean;
|
|
57
|
+
/** True when no field holds an error. */
|
|
58
|
+
isValid: () => boolean;
|
|
48
59
|
/** Phantom field: preserves TValues for type inference in consuming hooks. */
|
|
49
60
|
_values?: TValues;
|
|
50
61
|
};
|
|
51
62
|
/**
|
|
52
|
-
*
|
|
63
|
+
* A form, without TanStack.
|
|
64
|
+
*
|
|
65
|
+
* The engine is deliberately small because the field components already carry
|
|
66
|
+
* the hard parts: `Input`, `Select`, `Checkbox` and the rest own their own
|
|
67
|
+
* presentation, `state="invalid"` and error slot. What was missing is
|
|
68
|
+
* bookkeeping — values, touched, errors, and when to run the schema — and that
|
|
69
|
+
* is what this is.
|
|
53
70
|
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* onSubmit: async (values) => { await login(values); },
|
|
59
|
-
* });
|
|
71
|
+
* `@tanstack/solid-form` used to supply it, through a `_tsForm` escape hatch
|
|
72
|
+
* that leaked its twelve erased generics into this library's public type. It
|
|
73
|
+
* also peer-pinned Solid 1, which made it one of three packages standing
|
|
74
|
+
* between this library and Solid 2.
|
|
60
75
|
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* <FormField name="password" label="Password" inputProps={{ type: "password" }} />
|
|
65
|
-
* <FormSubmitButton>Log in</FormSubmitButton>
|
|
66
|
-
* </Form>
|
|
67
|
-
* );
|
|
68
|
-
* ```
|
|
76
|
+
* Validation runs on change and on blur, and errors are only *shown* once a
|
|
77
|
+
* field is touched — the display gate lives in `useField`, so a submit can
|
|
78
|
+
* surface every error at once by touching every field.
|
|
69
79
|
*/
|
|
70
80
|
export declare const createForm: <TValues extends AnyValues = AnyValues>(options: CreateFormOptions<TValues>) => FormApi<TValues>;
|
|
71
|
-
export {};
|
|
81
|
+
export { getFirstFieldError };
|
|
@@ -1,93 +1,118 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { createStore, flush } from "solid-js";
|
|
2
|
+
const issuesToErrors = (issues)=>{
|
|
3
|
+
const errors = {};
|
|
4
|
+
for (const issue of issues){
|
|
5
|
+
const head = issue.path?.[0];
|
|
6
|
+
const name = "object" == typeof head && null !== head && "key" in head ? String(head.key) : String(head ?? "");
|
|
7
|
+
if (name) (errors[name] ??= []).push(issue.message);
|
|
8
|
+
}
|
|
9
|
+
return errors;
|
|
10
|
+
};
|
|
11
|
+
const createForm = (options)=>{
|
|
12
|
+
const [values, setValues] = createStore({
|
|
13
|
+
...options.defaultValues
|
|
6
14
|
});
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
const [meta, setMeta] = createStore({});
|
|
16
|
+
const [status, setStatus] = createStore({
|
|
17
|
+
isSubmitting: false
|
|
18
|
+
});
|
|
19
|
+
const metaFor = (name)=>meta[name] ?? {
|
|
20
|
+
isTouched: false,
|
|
21
|
+
errors: []
|
|
22
|
+
};
|
|
23
|
+
const applyErrors = (errors, touchAll)=>{
|
|
24
|
+
setMeta((draft)=>{
|
|
25
|
+
for (const name of new Set([
|
|
26
|
+
...Object.keys(draft),
|
|
27
|
+
...Object.keys(errors)
|
|
28
|
+
]))draft[name] = {
|
|
29
|
+
isTouched: touchAll || (draft[name]?.isTouched ?? false),
|
|
30
|
+
errors: errors[name] ?? []
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
flush();
|
|
19
34
|
};
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
35
|
+
const runSchema = ()=>{
|
|
36
|
+
const schema = options.schema;
|
|
37
|
+
if (!schema) return true;
|
|
38
|
+
const result = schema["~standard"].validate(values);
|
|
39
|
+
if (result instanceof Promise) return true;
|
|
40
|
+
applyErrors(result.issues ? issuesToErrors(result.issues) : {}, false);
|
|
41
|
+
return !result.issues?.length;
|
|
23
42
|
};
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
43
|
+
const setFieldValue = (name, value)=>{
|
|
44
|
+
setValues((draft)=>{
|
|
45
|
+
draft[name] = value;
|
|
46
|
+
});
|
|
47
|
+
flush();
|
|
48
|
+
runSchema();
|
|
27
49
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
});
|
|
36
|
-
case "submit":
|
|
37
|
-
return props.runValidation({
|
|
38
|
-
validators: [
|
|
39
|
-
onChangeValidator,
|
|
40
|
-
onBlurValidator,
|
|
41
|
-
onSubmitValidator,
|
|
42
|
-
onServerValidator
|
|
43
|
-
],
|
|
44
|
-
form: props.form
|
|
45
|
-
});
|
|
46
|
-
case "server":
|
|
47
|
-
return props.runValidation({
|
|
48
|
-
validators: [],
|
|
49
|
-
form: props.form
|
|
50
|
-
});
|
|
51
|
-
case "blur":
|
|
52
|
-
return props.runValidation({
|
|
53
|
-
validators: [
|
|
54
|
-
onBlurValidator,
|
|
55
|
-
onServerValidator
|
|
56
|
-
],
|
|
57
|
-
form: props.form
|
|
50
|
+
const validateField = (name, cause)=>{
|
|
51
|
+
if ("blur" === cause) {
|
|
52
|
+
setMeta((draft)=>{
|
|
53
|
+
draft[name] = {
|
|
54
|
+
isTouched: true,
|
|
55
|
+
errors: draft[name]?.errors ?? []
|
|
56
|
+
};
|
|
58
57
|
});
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
onBlur: options.schema,
|
|
80
|
-
onSubmit: options.schema,
|
|
81
|
-
onBlurAsync: options.asyncValidators?.onBlur,
|
|
82
|
-
onSubmitAsync: options.asyncValidators?.onSubmit
|
|
83
|
-
} : void 0,
|
|
84
|
-
validationLogic: createValidationLogic,
|
|
85
|
-
onSubmit: async ({ value })=>{
|
|
86
|
-
await options.onSubmit?.(value);
|
|
58
|
+
flush();
|
|
59
|
+
}
|
|
60
|
+
runSchema();
|
|
61
|
+
};
|
|
62
|
+
const submit = async ()=>{
|
|
63
|
+
setMeta((draft)=>{
|
|
64
|
+
for (const name of Object.keys(values))draft[name] = {
|
|
65
|
+
isTouched: true,
|
|
66
|
+
errors: draft[name]?.errors ?? []
|
|
67
|
+
};
|
|
68
|
+
});
|
|
69
|
+
flush();
|
|
70
|
+
let ok = runSchema();
|
|
71
|
+
const schema = options.schema;
|
|
72
|
+
if (schema) {
|
|
73
|
+
const result = schema["~standard"].validate(values);
|
|
74
|
+
if (result instanceof Promise) {
|
|
75
|
+
const resolved = await result;
|
|
76
|
+
applyErrors(resolved.issues ? issuesToErrors(resolved.issues) : {}, true);
|
|
77
|
+
ok = !resolved.issues?.length;
|
|
87
78
|
}
|
|
88
|
-
}
|
|
79
|
+
}
|
|
80
|
+
if (!ok) return;
|
|
81
|
+
setStatus((draft)=>{
|
|
82
|
+
draft.isSubmitting = true;
|
|
83
|
+
});
|
|
84
|
+
try {
|
|
85
|
+
const asyncSubmit = options.asyncValidators?.onSubmit;
|
|
86
|
+
if (asyncSubmit) {
|
|
87
|
+
const serverErrors = await asyncSubmit({
|
|
88
|
+
value: values
|
|
89
|
+
});
|
|
90
|
+
if (serverErrors && Object.keys(serverErrors).length > 0) return void setMeta((draft)=>{
|
|
91
|
+
for (const [name, message] of Object.entries(serverErrors))if (message) draft[name] = {
|
|
92
|
+
isTouched: true,
|
|
93
|
+
errors: [
|
|
94
|
+
String(message)
|
|
95
|
+
]
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
await options.onSubmit?.(values);
|
|
100
|
+
} finally{
|
|
101
|
+
setStatus((draft)=>{
|
|
102
|
+
draft.isSubmitting = false;
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
};
|
|
89
106
|
return {
|
|
90
|
-
|
|
107
|
+
values: ()=>values,
|
|
108
|
+
getFieldValue: (name)=>values[name],
|
|
109
|
+
getFieldMeta: metaFor,
|
|
110
|
+
setFieldValue,
|
|
111
|
+
validateField,
|
|
112
|
+
submit,
|
|
113
|
+
isSubmitting: ()=>status.isSubmitting,
|
|
114
|
+
isValid: ()=>Object.values(meta).every((m)=>(m?.errors.length ?? 0) === 0)
|
|
91
115
|
};
|
|
92
116
|
};
|
|
93
|
-
export {
|
|
117
|
+
export { getFirstFieldError } from "./getFirstFieldError.js";
|
|
118
|
+
export { createForm };
|
|
@@ -17,8 +17,8 @@ export type UseFieldResult = {
|
|
|
17
17
|
* Reads live field state for `name` from the nearest `<Form>` context.
|
|
18
18
|
*
|
|
19
19
|
* Must be called **inside** a `<Form form={...}>` descendant component.
|
|
20
|
-
*
|
|
21
|
-
*
|
|
20
|
+
* Field components own their own presentation; this supplies the state they
|
|
21
|
+
* need to show it.
|
|
22
22
|
*
|
|
23
23
|
* ```tsx
|
|
24
24
|
* // Inside a child of <Form form={form}>
|
|
@@ -28,7 +28,7 @@ export type UseFieldResult = {
|
|
|
28
28
|
* value={String(email.value() ?? "")}
|
|
29
29
|
* onInput={(e) => email.handleChange(e.currentTarget.value)}
|
|
30
30
|
* onBlur={email.handleBlur}
|
|
31
|
-
* aria-invalid={email.invalid()}
|
|
31
|
+
* aria-invalid={email.invalid() ? "true" : "false"}
|
|
32
32
|
* />
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
@@ -3,22 +3,13 @@ import { useFormContext } from "./FormContext.js";
|
|
|
3
3
|
import { getFirstFieldError } from "./getFirstFieldError.js";
|
|
4
4
|
const useField = (name)=>{
|
|
5
5
|
const form = useFormContext();
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const error = createMemo(()=>{
|
|
11
|
-
const m = meta();
|
|
12
|
-
if (!m?.isTouched) return;
|
|
13
|
-
return getFirstFieldError(m.errors ?? []);
|
|
14
|
-
});
|
|
6
|
+
const value = createMemo(()=>form.getFieldValue(name));
|
|
7
|
+
const meta = createMemo(()=>form.getFieldMeta(name));
|
|
8
|
+
const touched = createMemo(()=>meta().isTouched);
|
|
9
|
+
const error = createMemo(()=>meta().isTouched ? getFirstFieldError(meta().errors) : void 0);
|
|
15
10
|
const invalid = createMemo(()=>Boolean(error()));
|
|
16
|
-
const handleChange = (
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
const handleBlur = ()=>{
|
|
20
|
-
tsForm.validateField(name, "blur");
|
|
21
|
-
};
|
|
11
|
+
const handleChange = (next)=>form.setFieldValue(name, next);
|
|
12
|
+
const handleBlur = ()=>form.validateField(name, "blur");
|
|
22
13
|
return {
|
|
23
14
|
value,
|
|
24
15
|
error,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useDesktop(breakpoint?: number): import("solid-js").
|
|
1
|
+
export declare function useDesktop(breakpoint?: number): import("solid-js").SourceAccessor<boolean>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createSignal, onCleanup,
|
|
1
|
+
import { createSignal, onCleanup, onSettled } from "solid-js";
|
|
2
2
|
function useDesktop(breakpoint = 1024) {
|
|
3
3
|
const [isDesktop, setIsDesktop] = createSignal(false);
|
|
4
4
|
const checkIfDesktop = ()=>{
|
|
5
5
|
const width = window.innerWidth;
|
|
6
6
|
setIsDesktop(width >= breakpoint);
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
onSettled(()=>{
|
|
9
9
|
checkIfDesktop();
|
|
10
10
|
window.addEventListener("resize", checkIfDesktop);
|
|
11
11
|
});
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
export { useTableSorting, type UseTableSortingOptions, type UseTableSortingResult, type HookSortDirection, type HookSortDescriptor, } from "./useTableSorting";
|
|
2
|
-
export { useTablePagination, type UseTablePaginationOptions, type UseTablePaginationResult, } from "./useTablePagination";
|
|
3
|
-
export { useTableFiltering, type UseTableFilteringOptions, type UseTableFilteringResult, } from "./useTableFiltering";
|
|
4
|
-
export { useTableSelection, type UseTableSelectionOptions, type UseTableSelectionResult, type TableSelectionState, } from "./useTableSelection";
|
|
5
|
-
export { useTableExpansion, type UseTableExpansionOptions, type UseTableExpansionResult, } from "./useTableExpansion";
|
|
6
|
-
export { useTableModel, type UseTableModelOptions, } from "./useTableModel";
|
|
7
|
-
export { toSortDescriptor, toSortingState } from "./helpers";
|
|
8
1
|
export { useAnchoredOverlayPosition } from "./useAnchoredOverlayPosition";
|
|
9
2
|
export type { UseAnchoredOverlayPositionOptions } from "./useAnchoredOverlayPosition";
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
export { useTableSorting } from "./useTableSorting.js";
|
|
2
|
-
export { useTablePagination } from "./useTablePagination.js";
|
|
3
|
-
export { useTableFiltering } from "./useTableFiltering.js";
|
|
4
|
-
export { useTableSelection } from "./useTableSelection.js";
|
|
5
|
-
export { useTableExpansion } from "./useTableExpansion.js";
|
|
6
|
-
export { useTableModel } from "./useTableModel.js";
|
|
7
|
-
export { toSortDescriptor, toSortingState } from "./helpers.js";
|
|
8
1
|
export { useAnchoredOverlayPosition } from "./useAnchoredOverlayPosition.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type Accessor
|
|
1
|
+
import { type Accessor } from "solid-js";
|
|
2
|
+
import type { JSX } from "@solidjs/web";
|
|
2
3
|
export interface UseAnchoredOverlayPositionOptions {
|
|
3
4
|
isOpen: Accessor<boolean>;
|
|
4
5
|
getAnchor: Accessor<HTMLElement | undefined>;
|
|
@@ -11,6 +12,6 @@ export interface UseAnchoredOverlayPositionOptions {
|
|
|
11
12
|
zIndex?: number;
|
|
12
13
|
}
|
|
13
14
|
export declare const useAnchoredOverlayPosition: (options: UseAnchoredOverlayPositionOptions) => {
|
|
14
|
-
style:
|
|
15
|
+
style: import("solid-js").SourceAccessor<JSX.CSSProperties>;
|
|
15
16
|
updatePosition: () => void;
|
|
16
17
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -98,8 +98,8 @@ export type { CreateDataGridOptions, DataGridCellContext, DataGridColumn, DataGr
|
|
|
98
98
|
export { default as Table } from "./components/table";
|
|
99
99
|
export { SortIcon as TableSortIcon, ExpandToggle as TableExpandToggle, VirtualSpacerRow as TableVirtualSpacerRow, MobileListView as TableMobileListView, InlineConfirm as TableInlineConfirm, } from "./components/table";
|
|
100
100
|
export type { TableProps, TableSortDirection, TableSortDescriptor, TableColumnRenderProps, SortIconProps as TableSortIconProps, SortIconState as TableSortIconState, ExpandToggleProps as TableExpandToggleProps, VirtualSpacerRowProps as TableVirtualSpacerRowProps, MobileListViewProps as TableMobileListViewProps, InlineConfirmProps as TableInlineConfirmProps, InlineConfirmVariant as TableInlineConfirmVariant, } from "./components/table";
|
|
101
|
-
export {
|
|
102
|
-
export type {
|
|
101
|
+
export { useAnchoredOverlayPosition } from "./hooks/table";
|
|
102
|
+
export type { UseAnchoredOverlayPositionOptions } from "./hooks/table";
|
|
103
103
|
export { default as Tabs } from "./components/tabs";
|
|
104
104
|
export type { TabsRootProps, TabListContainerProps, TabListProps, TabProps, TabIndicatorProps, TabSeparatorProps, TabPanelProps, } from "./components/tabs";
|
|
105
105
|
export { default as Text } from "./components/text";
|
|
@@ -114,11 +114,9 @@ export { default as Switch } from "./components/switch";
|
|
|
114
114
|
export { default as Tooltip, TooltipTrigger, TooltipContent, TooltipArrow, } from "./components/tooltip";
|
|
115
115
|
export type { TooltipPlacement, TooltipRootProps, TooltipTriggerProps, TooltipContentProps, TooltipArrowProps, } from "./components/tooltip";
|
|
116
116
|
export * from "./motion";
|
|
117
|
-
export { useVirtualRows } from "./primitives/virtualizer";
|
|
118
|
-
export type { UseVirtualRowsOptions, UseVirtualRowsResult, VirtualRowsRange, } from "./primitives/virtualizer";
|
|
119
117
|
export { useStreamingBuffer, useStreamingSubscription, } from "./primitives/streaming";
|
|
120
118
|
export type { StreamingBufferStrategy, StreamingSubscribeFn, StreamingSubscriptionObserver, UseStreamingBufferOptions, UseStreamingBufferResult, UseStreamingSubscriptionOptions, UseStreamingSubscriptionResult, } from "./primitives/streaming";
|
|
121
|
-
export type { Flavor, State, Variant, Size, Radius, Space, Width, Height, MaxWidth, Align, Justify, Direction, UIBaseProps, IconSlotProps, Controlled, Issue, ErrorHandler, Failable, Constraint, Validate, ValidateOn, Validatable, OpenChangeReason, ChangeReason, Disclosable, CapabilityProps, } from "./components/vocabulary";
|
|
119
|
+
export type { Flavor, State, Variant, Material, Size, Radius, Space, Width, Height, MaxWidth, Align, Justify, Direction, UIBaseProps, IconSlotProps, Controlled, Issue, ErrorHandler, Failable, Constraint, Validate, ValidateOn, Validatable, OpenChangeReason, ChangeReason, Disclosable, CapabilityProps, } from "./components/vocabulary";
|
|
122
120
|
export { isInvalid, resolveState } from "./components/vocabulary";
|
|
123
121
|
export { FLAVORS, STATES, VARIANTS, SIZES, SPACES } from "./components/vocabulary";
|
|
124
122
|
export { default as InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator, REGEXP_ONLY_DIGITS, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS_AND_CHARS, } from "./components/input-otp";
|
package/dist/index.js
CHANGED
|
@@ -58,14 +58,13 @@ export { default as Slider } from "./components/slider/index.js";
|
|
|
58
58
|
export { default as Skeleton } from "./components/skeleton/index.js";
|
|
59
59
|
export { createDataGrid, default as DataGrid } from "./components/data-grid/index.js";
|
|
60
60
|
export { ExpandToggle as TableExpandToggle, InlineConfirm as TableInlineConfirm, MobileListView as TableMobileListView, SortIcon as TableSortIcon, VirtualSpacerRow as TableVirtualSpacerRow, default as Table } from "./components/table/index.js";
|
|
61
|
-
export {
|
|
61
|
+
export { useAnchoredOverlayPosition } from "./hooks/table/index.js";
|
|
62
62
|
export { default as Tabs } from "./components/tabs/index.js";
|
|
63
63
|
export { default as Text } from "./components/text/index.js";
|
|
64
64
|
export { default as Textarea } from "./components/textarea/index.js";
|
|
65
65
|
export { ThemeColorPicker, createHueShiftStore, getDefaultHueShiftStore, resetHueShift } from "./components/theme-color-picker/index.js";
|
|
66
66
|
export { default as Switch } from "./components/switch/index.js";
|
|
67
67
|
export { TooltipArrow, TooltipContent, TooltipTrigger, default as Tooltip } from "./components/tooltip/index.js";
|
|
68
|
-
export { useVirtualRows } from "./primitives/virtualizer/index.js";
|
|
69
68
|
export { useStreamingBuffer, useStreamingSubscription } from "./primitives/streaming/index.js";
|
|
70
69
|
export { FLAVORS, SIZES, SPACES, STATES, VARIANTS, isInvalid, resolveState } from "./components/vocabulary.js";
|
|
71
70
|
export { InputOTPGroup, InputOTPSeparator, InputOTPSlot, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS, default as InputOTP } from "./components/input-otp/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { compound, defineComponent, recipe, type DefineComponentConfig, type Layout, type PropsOf, type Recipe, type RecipeConfig, type SlotAttrs, type SlotsOf, type StateOf, } from "solid-layouts";
|
|
1
|
+
export { compound, defineComponent, recipe, type DefineComponentConfig, type Layout, type PropsOf, type Recipe, type RecipeConfig, type SlotAttrs, type SlotsOf, type StateOf, } from "solid-layouts/solid-2";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { compound, defineComponent, recipe } from "solid-layouts";
|
|
1
|
+
export { compound, defineComponent, recipe } from "solid-layouts/solid-2";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `twMerge`, accepting what Solid 2 says a `class` prop can be.
|
|
3
|
+
*
|
|
4
|
+
* 2.0 absorbed `classList` into `class`, so `JSX.HTMLAttributes["class"]` is now
|
|
5
|
+
* `ClassValue`: a string, a number, a boolean, `null`, an array of those, or a
|
|
6
|
+
* `Record<string, boolean>` of conditional names. `tailwind-merge` accepts most
|
|
7
|
+
* of that but not `number`, so every `twMerge(CLASSES.base, props.class)` in the
|
|
8
|
+
* library stopped typechecking — 287 call sites across 114 files, each one
|
|
9
|
+
* correct and each one now the wrong colour.
|
|
10
|
+
*
|
|
11
|
+
* Widening here rather than casting there. A cast at 287 sites is 287 chances
|
|
12
|
+
* to cast to the wrong thing, and it would leave no single place to say why.
|
|
13
|
+
*
|
|
14
|
+
* `Record<string, boolean>` is flattened to its truthy keys, which is what the
|
|
15
|
+
* old `classList` did with the same object. Numbers and booleans are dropped:
|
|
16
|
+
* `class={0}` and `class={false}` are how a conditional resolves to "nothing",
|
|
17
|
+
* and `tailwind-merge` has no meaning for them.
|
|
18
|
+
*/
|
|
19
|
+
type SolidClassValue = string | number | boolean | null | undefined | Record<string, boolean | undefined> | SolidClassValue[];
|
|
20
|
+
export declare const twMerge: (...values: SolidClassValue[]) => string;
|
|
21
|
+
export type { SolidClassValue };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { twMerge } from "tailwind-merge";
|
|
2
|
+
const flatten = (value)=>{
|
|
3
|
+
if (null == value) return [];
|
|
4
|
+
if ("string" == typeof value) return value ? [
|
|
5
|
+
value
|
|
6
|
+
] : [];
|
|
7
|
+
if ("number" == typeof value || "boolean" == typeof value) return [];
|
|
8
|
+
if (Array.isArray(value)) return value.flatMap(flatten);
|
|
9
|
+
return Object.keys(value).filter((key)=>value[key]);
|
|
10
|
+
};
|
|
11
|
+
const twMerge_twMerge = (...values)=>twMerge(...values.flatMap(flatten));
|
|
12
|
+
export { twMerge_twMerge as twMerge };
|