@solostylist/ui-kit 1.0.230 → 2.0.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/colors-CNjL5fhq.js +180 -0
- package/dist/gradients-DSnBONEQ.js +199 -0
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.js +4 -5
- package/dist/hooks/use-countdown.js +69 -47
- package/dist/main.d.ts +7 -2
- package/dist/main.js +2 -0
- package/dist/palettes/index.d.ts +11 -0
- package/dist/palettes/index.js +2 -0
- package/dist/palettes-CJLuEy1m.js +1765 -0
- package/dist/s-accordion/index.d.ts +2 -1
- package/dist/s-accordion/index.js +1 -1
- package/dist/s-accordion/s-accordion.d.ts +39 -19
- package/dist/s-accordion/s-accordion.js +70 -2
- package/dist/s-action-overlay/index.d.ts +2 -1
- package/dist/s-action-overlay/s-action-overlay.d.ts +52 -51
- package/dist/s-action-overlay/s-action-overlay.js +106 -107
- package/dist/s-autocomplete/index.d.ts +2 -1
- package/dist/s-autocomplete/s-autocomplete.d.ts +25 -8
- package/dist/s-autocomplete/s-autocomplete.js +33 -22
- package/dist/s-avatar/index.d.ts +2 -1
- package/dist/s-avatar/s-avatar.d.ts +36 -18
- package/dist/s-avatar/s-avatar.js +53 -27
- package/dist/s-blur-text/index.d.ts +1 -0
- package/dist/s-blur-text/s-blur-text.d.ts +3 -3
- package/dist/s-blur-text/s-blur-text.js +68 -40
- package/dist/s-brand-logo/index.d.ts +3 -0
- package/dist/s-brand-logo/index.js +2 -0
- package/dist/s-brand-logo/s-brand-logo.d.ts +15 -0
- package/dist/s-brand-logo/s-brand-logo.js +2 -0
- package/dist/s-brand-logo-CErW9Slg.js +123 -0
- package/dist/s-breadcrumbs/index.d.ts +2 -1
- package/dist/s-breadcrumbs/s-breadcrumbs.d.ts +5 -1
- package/dist/s-breadcrumbs/s-breadcrumbs.js +71 -36
- package/dist/s-button/s-button.d.ts +3 -5
- package/dist/s-button/s-button.js +3 -9
- package/dist/s-carousel/index.d.ts +3 -1
- package/dist/s-carousel/index.js +1 -1
- package/dist/s-carousel/s-carousel.d.ts +18 -8
- package/dist/s-carousel/s-carousel.js +184 -2
- package/dist/s-category-card/index.d.ts +2 -1
- package/dist/s-category-card/s-category-card.d.ts +38 -51
- package/dist/s-category-card/s-category-card.js +88 -56
- package/dist/s-chat-input/index.d.ts +2 -1
- package/dist/s-chat-input/index.js +1 -1
- package/dist/s-chat-input/s-chat-input.d.ts +41 -6
- package/dist/s-chat-input/s-chat-input.js +398 -2
- package/dist/s-chat-message/index.d.ts +2 -1
- package/dist/s-chat-message/index.js +1 -1
- package/dist/s-chat-message/s-chat-message.d.ts +6 -3
- package/dist/s-chat-message/s-chat-message.js +314 -2
- package/dist/s-checkbox/index.d.ts +2 -1
- package/dist/s-checkbox/s-checkbox.d.ts +33 -11
- package/dist/s-checkbox/s-checkbox.js +44 -34
- package/dist/s-chip/s-chip.d.ts +3 -5
- package/dist/s-chip/s-chip.js +3 -9
- package/dist/s-chips/index.d.ts +2 -1
- package/dist/s-chips/index.js +1 -1
- package/dist/s-chips/s-chips.d.ts +50 -28
- package/dist/s-chips/s-chips.js +174 -2
- package/dist/s-code-block/index.d.ts +3 -1
- package/dist/s-code-block/index.js +1 -1
- package/dist/s-code-block/s-code-block.d.ts +30 -28
- package/dist/s-code-block/s-code-block.js +103 -2
- package/dist/s-comment-message/index.d.ts +1 -0
- package/dist/s-comment-message/index.js +1 -1
- package/dist/s-comment-message/s-comment-message.d.ts +6 -8
- package/dist/s-comment-message/s-comment-message.js +189 -2
- package/dist/s-copyable-text/index.d.ts +2 -1
- package/dist/s-copyable-text/s-copyable-text.d.ts +34 -17
- package/dist/s-copyable-text/s-copyable-text.js +55 -33
- package/dist/s-countdown/index.d.ts +4 -3
- package/dist/s-countdown/index.js +1 -1
- package/dist/s-countdown/s-count-box.d.ts +39 -32
- package/dist/s-countdown/s-count-box.js +104 -87
- package/dist/s-countdown/s-countdown.d.ts +3 -10
- package/dist/s-countdown/s-countdown.js +86 -70
- package/dist/s-data-table/index.d.ts +2 -1
- package/dist/s-data-table/index.js +1 -1
- package/dist/s-data-table/s-data-table.d.ts +15 -7
- package/dist/s-data-table/s-data-table.js +213 -2
- package/dist/s-date-picker/index.d.ts +3 -1
- package/dist/s-date-picker/index.js +1 -1
- package/dist/s-date-picker/picker-action-bar.js +43 -42
- package/dist/s-date-picker/s-date-picker.d.ts +9 -5
- package/dist/s-date-picker/s-date-picker.js +106 -2
- package/dist/s-datetime-picker/index.d.ts +3 -1
- package/dist/s-datetime-picker/index.js +1 -1
- package/dist/s-datetime-picker/s-datetime-picker.d.ts +9 -5
- package/dist/s-datetime-picker/s-datetime-picker.js +108 -2
- package/dist/s-dialog/index.d.ts +2 -1
- package/dist/s-dialog/s-dialog.d.ts +44 -22
- package/dist/s-dialog/s-dialog.js +76 -39
- package/dist/s-dialog-confirm/index.d.ts +2 -1
- package/dist/s-dialog-confirm/s-dialog-confirm.d.ts +46 -62
- package/dist/s-dialog-confirm/s-dialog-confirm.js +89 -71
- package/dist/s-dialog-message/index.d.ts +2 -1
- package/dist/s-dialog-message/s-dialog-message.d.ts +34 -51
- package/dist/s-dialog-message/s-dialog-message.js +74 -67
- package/dist/s-empty/index.d.ts +1 -0
- package/dist/s-empty/s-empty.d.ts +5 -10
- package/dist/s-empty/s-empty.js +27 -9
- package/dist/s-file-dropzone/index.d.ts +3 -1
- package/dist/s-file-dropzone/index.js +1 -1
- package/dist/s-file-dropzone/s-file-dropzone.d.ts +49 -26
- package/dist/s-file-dropzone/s-file-dropzone.js +219 -2
- package/dist/s-file-icon/index.d.ts +1 -0
- package/dist/s-file-icon/s-file-icon.d.ts +3 -5
- package/dist/s-file-icon/s-file-icon.js +118 -98
- package/dist/s-flex-box/index.d.ts +2 -1
- package/dist/s-flex-box/s-flex-box.d.ts +12 -14
- package/dist/s-flex-box/s-flex-box.js +19 -19
- package/dist/s-form/index.d.ts +2 -1
- package/dist/s-form/s-form.d.ts +33 -18
- package/dist/s-form/s-form.js +50 -21
- package/dist/s-gallery/gallery-grid-item.d.ts +3 -1
- package/dist/s-gallery/gallery-grid-item.js +128 -99
- package/dist/s-gallery/gallery-layout.d.ts +1 -1
- package/dist/s-gallery/gallery-media-item.d.ts +3 -3
- package/dist/s-gallery/gallery-media-item.js +45 -50
- package/dist/s-gallery/index.d.ts +2 -1
- package/dist/s-gallery/s-gallery.d.ts +14 -3
- package/dist/s-gallery/s-gallery.js +70 -51
- package/dist/s-glow-button/index.d.ts +2 -1
- package/dist/s-glow-button/index.js +1 -1
- package/dist/s-glow-button/s-glow-button.d.ts +14 -9
- package/dist/s-glow-button/s-glow-button.js +46 -25
- package/dist/s-gradient-icon/index.d.ts +2 -1
- package/dist/s-gradient-icon/s-gradient-icon.d.ts +17 -9
- package/dist/s-gradient-icon/s-gradient-icon.js +81 -69
- package/dist/s-icon-button/index.d.ts +2 -1
- package/dist/s-icon-button/s-icon-button.d.ts +31 -13
- package/dist/s-icon-button/s-icon-button.js +47 -9
- package/dist/s-image-comparison/index.d.ts +2 -1
- package/dist/s-image-comparison/index.js +1 -1
- package/dist/s-image-comparison/s-image-comparison.d.ts +13 -3
- package/dist/s-image-comparison/s-image-comparison.js +195 -98
- package/dist/{s-image-modal → s-image-viewer}/default-media-item.d.ts +0 -1
- package/dist/s-image-viewer/default-media-item.js +30 -0
- package/dist/s-image-viewer/image-viewer-thumbnail-dock.d.ts +12 -0
- package/dist/s-image-viewer/image-viewer-thumbnail-dock.js +102 -0
- package/dist/s-image-viewer/index.d.ts +4 -0
- package/dist/s-image-viewer/index.js +3 -0
- package/dist/s-image-viewer/s-image-viewer.d.ts +4 -0
- package/dist/s-image-viewer/s-image-viewer.js +266 -0
- package/dist/{s-image-modal → s-image-viewer}/types.d.ts +27 -10
- package/dist/s-image-viewer/use-image-viewer-navigation.d.ts +29 -0
- package/dist/s-image-viewer/use-image-viewer-navigation.js +75 -0
- package/dist/s-label/index.d.ts +2 -1
- package/dist/s-label/s-label.d.ts +35 -18
- package/dist/s-label/s-label.js +64 -23
- package/dist/s-language-switcher/index.d.ts +2 -1
- package/dist/s-language-switcher/index.js +2 -2
- package/dist/s-language-switcher/s-language-switcher.d.ts +25 -18
- package/dist/s-language-switcher/s-language-switcher.js +150 -2
- package/dist/s-lazy-image/index.d.ts +2 -1
- package/dist/s-lazy-image/index.js +1 -1
- package/dist/s-lazy-image/s-lazy-image.d.ts +45 -24
- package/dist/s-lazy-image/s-lazy-image.js +77 -40
- package/dist/s-link/s-link.d.ts +4 -33
- package/dist/s-link/s-link.js +3 -35
- package/dist/s-localization-provider/index.js +1 -1
- package/dist/s-localization-provider/s-localization-provider.d.ts +3 -5
- package/dist/s-localization-provider/s-localization-provider.js +12 -2
- package/dist/s-moving-border/index.d.ts +2 -1
- package/dist/s-moving-border/s-moving-border.d.ts +8 -2
- package/dist/s-moving-border/s-moving-border.js +100 -71
- package/dist/s-nav-item/index.d.ts +2 -1
- package/dist/s-nav-item/s-nav-item.d.ts +39 -31
- package/dist/s-nav-item/s-nav-item.js +65 -66
- package/dist/s-nav-items/index.d.ts +2 -1
- package/dist/s-nav-items/s-nav-items.d.ts +13 -10
- package/dist/s-nav-items/s-nav-items.js +95 -79
- package/dist/s-no-ssr/s-no-ssr.d.ts +4 -16
- package/dist/s-no-ssr/s-no-ssr.js +3 -13
- package/dist/s-overlay-scrollbar/index.d.ts +3 -1
- package/dist/s-overlay-scrollbar/s-overlay-scrollbar.d.ts +10 -8
- package/dist/s-overlay-scrollbar/s-overlay-scrollbar.js +28 -16
- package/dist/s-pagination/index.d.ts +2 -1
- package/dist/s-pagination/s-pagination.d.ts +14 -49
- package/dist/s-pagination/s-pagination.js +70 -35
- package/dist/s-pagination/types.d.ts +23 -1
- package/dist/s-pagination/types.js +8 -4
- package/dist/s-pixel-reveal/index.d.ts +2 -1
- package/dist/s-pixel-reveal/s-pixel-reveal.d.ts +10 -2
- package/dist/s-pixel-reveal/s-pixel-reveal.js +124 -86
- package/dist/s-quantity-input/index.d.ts +3 -0
- package/dist/s-quantity-input/index.js +2 -0
- package/dist/s-quantity-input/s-quantity-input.d.ts +114 -0
- package/dist/s-quantity-input/s-quantity-input.js +246 -0
- package/dist/s-radial-pulse-animate/index.d.ts +2 -1
- package/dist/s-radial-pulse-animate/s-radial-pulse-animate.d.ts +7 -7
- package/dist/s-radial-pulse-animate/s-radial-pulse-animate.js +50 -52
- package/dist/s-rating/s-rating.d.ts +3 -5
- package/dist/s-rating/s-rating.js +3 -9
- package/dist/s-review/index.d.ts +2 -1
- package/dist/s-review/index.js +1 -1
- package/dist/s-review/s-review.d.ts +25 -10
- package/dist/s-review/s-review.js +272 -2
- package/dist/s-scroll-reveal/index.d.ts +3 -1
- package/dist/s-scroll-reveal/s-scroll-reveal.d.ts +14 -6
- package/dist/s-scroll-reveal/s-scroll-reveal.js +78 -60
- package/dist/s-scroll-to-top/index.d.ts +2 -1
- package/dist/s-scroll-to-top/s-scroll-to-top.d.ts +15 -16
- package/dist/s-scroll-to-top/s-scroll-to-top.js +55 -28
- package/dist/s-scroll-velocity/index.d.ts +2 -1
- package/dist/s-scroll-velocity/s-scroll-velocity.d.ts +11 -7
- package/dist/s-scroll-velocity/s-scroll-velocity.js +27 -10
- package/dist/s-scroll-velocity/scroll-velocity-container.d.ts +2 -2
- package/dist/s-scroll-velocity/scroll-velocity-container.js +18 -18
- package/dist/s-scroll-velocity/scroll-velocity-row.d.ts +5 -3
- package/dist/s-scroll-velocity/scroll-velocity-row.js +81 -67
- package/dist/s-select/index.d.ts +2 -1
- package/dist/s-select/index.js +1 -1
- package/dist/s-select/s-select.d.ts +25 -11
- package/dist/s-select/s-select.js +201 -2
- package/dist/s-select-list/index.d.ts +2 -1
- package/dist/s-select-list/s-select-list.d.ts +57 -18
- package/dist/s-select-list/s-select-list.js +156 -32
- package/dist/s-skeleton/index.d.ts +2 -1
- package/dist/s-skeleton/s-skeleton.d.ts +21 -22
- package/dist/s-skeleton/s-skeleton.js +40 -39
- package/dist/s-snackbar-message/index.d.ts +2 -1
- package/dist/s-snackbar-message/s-snackbar-message.d.ts +40 -51
- package/dist/s-snackbar-message/s-snackbar-message.js +81 -44
- package/dist/s-spotlight-cursor/index.d.ts +2 -1
- package/dist/s-spotlight-cursor/s-spotlight-cursor.d.ts +23 -20
- package/dist/s-spotlight-cursor/s-spotlight-cursor.js +83 -58
- package/dist/s-status-illustration/index.d.ts +3 -0
- package/dist/s-status-illustration/index.js +2 -0
- package/dist/s-status-illustration/s-status-illustration.d.ts +57 -0
- package/dist/s-status-illustration/s-status-illustration.js +429 -0
- package/dist/s-stripe/index.d.ts +6 -1
- package/dist/s-stripe/s-stripe-cvc.d.ts +3 -1
- package/dist/s-stripe/s-stripe-expiry.d.ts +3 -1
- package/dist/s-stripe/s-stripe-number.d.ts +3 -1
- package/dist/s-stripe/s-stripe.d.ts +10 -3
- package/dist/s-stripe/s-stripe.js +53 -27
- package/dist/s-stripe/stripe-input.js +48 -20
- package/dist/s-switch/index.d.ts +2 -1
- package/dist/s-switch/s-switch.d.ts +33 -11
- package/dist/s-switch/s-switch.js +44 -34
- package/dist/s-tabs/index.d.ts +5 -3
- package/dist/s-tabs/index.js +5 -4
- package/dist/s-tabs/s-tab-panel.d.ts +12 -10
- package/dist/s-tabs/s-tab-panel.js +26 -19
- package/dist/s-tabs/s-tab.d.ts +3 -2
- package/dist/s-tabs/s-tab.js +3 -9
- package/dist/s-tabs/s-tabs.d.ts +46 -32
- package/dist/s-tabs/s-tabs.js +76 -37
- package/dist/s-tabs/tab-ids.d.ts +3 -0
- package/dist/s-tabs/tab-ids.js +9 -0
- package/dist/s-text-editor/index.d.ts +4 -2
- package/dist/s-text-editor/index.js +1 -1
- package/dist/s-text-editor/s-text-editor-toolbar.d.ts +9 -2
- package/dist/s-text-editor/s-text-editor-toolbar.js +216 -2
- package/dist/s-text-editor/s-text-editor.d.ts +7 -2
- package/dist/s-text-editor/s-text-editor.js +62 -39
- package/dist/s-text-field/index.d.ts +2 -1
- package/dist/s-text-field/index.js +1 -1
- package/dist/s-text-field/s-text-field.d.ts +6 -11
- package/dist/s-text-field/s-text-field.js +52 -2
- package/dist/s-text-shimmer/index.d.ts +2 -1
- package/dist/s-text-shimmer/s-text-shimmer.d.ts +16 -2
- package/dist/s-text-shimmer/s-text-shimmer.js +48 -25
- package/dist/s-text-truncation/index.d.ts +2 -1
- package/dist/s-text-truncation/s-text-truncation.d.ts +38 -14
- package/dist/s-text-truncation/s-text-truncation.js +105 -58
- package/dist/s-theme-demo/index.d.ts +2 -1
- package/dist/s-theme-demo/index.js +1 -1
- package/dist/s-theme-demo/s-theme-demo.d.ts +2 -12
- package/dist/s-theme-demo/s-theme-demo.js +77 -2
- package/dist/s-theme-demo/theme-demo-color-palette-section.d.ts +5 -0
- package/dist/s-theme-demo/theme-demo-color-palette-section.js +185 -0
- package/dist/s-theme-demo/theme-demo-color-ramps-section.d.ts +5 -0
- package/dist/s-theme-demo/theme-demo-color-ramps-section.js +125 -0
- package/dist/s-theme-demo/theme-demo-components-section.d.ts +2 -0
- package/dist/s-theme-demo/theme-demo-components-section.js +265 -0
- package/dist/s-theme-demo/theme-demo-data.d.ts +7 -0
- package/dist/s-theme-demo/theme-demo-data.js +45 -0
- package/dist/s-theme-demo/theme-demo-interactive-section.d.ts +2 -0
- package/dist/s-theme-demo/theme-demo-interactive-section.js +95 -0
- package/dist/s-theme-demo/theme-demo-shadow-section.d.ts +5 -0
- package/dist/s-theme-demo/theme-demo-shadow-section.js +52 -0
- package/dist/s-theme-demo/theme-demo-typography-section.d.ts +5 -0
- package/dist/s-theme-demo/theme-demo-typography-section.js +129 -0
- package/dist/s-theme-demo/types.d.ts +17 -0
- package/dist/s-theme-demo/types.js +0 -0
- package/dist/s-theme-demo/utils.d.ts +2 -0
- package/dist/s-theme-demo/utils.js +9 -0
- package/dist/s-theme-provider/index.d.ts +1 -0
- package/dist/s-theme-provider/s-theme-provider.js +30 -31
- package/dist/s-theme-switch/index.d.ts +2 -1
- package/dist/s-theme-switch/index.js +1 -1
- package/dist/s-theme-switch/s-theme-switch.d.ts +6 -4
- package/dist/s-theme-switch/s-theme-switch.js +60 -2
- package/dist/s-tip/index.d.ts +2 -1
- package/dist/s-tip/index.js +1 -1
- package/dist/s-tip/s-tip.d.ts +29 -11
- package/dist/s-tip/s-tip.js +61 -2
- package/dist/s-toggle-button/index.d.ts +2 -0
- package/dist/s-toggle-button/index.js +2 -0
- package/dist/s-toggle-button/s-toggle-button.d.ts +6 -0
- package/dist/s-toggle-button/s-toggle-button.js +5 -0
- package/dist/s-tool-bar/index.d.ts +2 -1
- package/dist/s-tool-bar/s-tool-bar.d.ts +2 -5
- package/dist/s-tool-bar/s-tool-bar.js +101 -72
- package/dist/s-tool-bar/tool-bar-action-buttons.d.ts +3 -3
- package/dist/s-tool-bar/tool-bar-action-buttons.js +55 -2
- package/dist/s-tool-bar/tool-bar-image-input.d.ts +2 -2
- package/dist/s-tool-bar/tool-bar-image-input.js +148 -2
- package/dist/s-tool-bar/tool-bar-inputs.js +139 -112
- package/dist/s-tool-bar/types.d.ts +45 -35
- package/dist/s-tool-bar/utils.d.ts +1 -0
- package/dist/s-tool-bar/utils.js +10 -7
- package/dist/s-tool-item/index.d.ts +2 -1
- package/dist/s-tool-item/s-tool-item.d.ts +35 -30
- package/dist/s-tool-item/s-tool-item.js +111 -56
- package/dist/s-two-pane-layout/index.d.ts +3 -1
- package/dist/s-two-pane-layout/s-two-pane-layout.d.ts +56 -50
- package/dist/s-two-pane-layout/s-two-pane-layout.js +154 -85
- package/dist/s-typewriter-text/index.d.ts +2 -1
- package/dist/s-typewriter-text/s-typewriter-text.d.ts +16 -5
- package/dist/s-typewriter-text/s-typewriter-text.js +50 -27
- package/dist/s-zoom-image/index.d.ts +2 -1
- package/dist/s-zoom-image/s-zoom-image.d.ts +14 -5
- package/dist/s-zoom-image/s-zoom-image.js +65 -44
- package/dist/theme/component-augmentation.d.ts +265 -0
- package/dist/theme/component-augmentation.js +0 -0
- package/dist/theme/components/accordion-summary.d.ts +41 -38
- package/dist/theme/components/accordion-summary.js +7 -7
- package/dist/theme/components/accordion.d.ts +21 -13
- package/dist/theme/components/accordion.js +15 -12
- package/dist/theme/components/action-styles.d.ts +1075 -0
- package/dist/theme/components/action-styles.js +71 -0
- package/dist/theme/components/alert.d.ts +169 -140
- package/dist/theme/components/alert.js +15 -4
- package/dist/theme/components/app-bar.d.ts +2 -2
- package/dist/theme/components/autocomplete.js +43 -2
- package/dist/theme/components/avatar.js +9 -2
- package/dist/theme/components/backdrop.js +1 -1
- package/dist/theme/components/button-base.d.ts +0 -5
- package/dist/theme/components/button-base.js +1 -10
- package/dist/theme/components/button.d.ts +111 -5275
- package/dist/theme/components/button.js +58 -74
- package/dist/theme/components/card.d.ts +69 -69
- package/dist/theme/components/card.js +11 -10
- package/dist/theme/components/checkbox.d.ts +34 -34
- package/dist/theme/components/checkbox.js +90 -2
- package/dist/theme/components/chip.d.ts +1 -7
- package/dist/theme/components/chip.js +91 -67
- package/dist/theme/components/components.js +22 -22
- package/dist/theme/components/date-calendar.js +1 -0
- package/dist/theme/components/day-calendar.js +1 -0
- package/dist/theme/components/dialog-title.d.ts +2 -2
- package/dist/theme/components/field-label-styles.d.ts +9 -0
- package/dist/theme/components/field-label-styles.js +19 -0
- package/dist/theme/components/form-control.d.ts +1 -1
- package/dist/theme/components/form-control.js +1 -1
- package/dist/theme/components/form-label.d.ts +2 -2
- package/dist/theme/components/form-label.js +1 -1
- package/dist/theme/components/icon-button.d.ts +85 -5228
- package/dist/theme/components/icon-button.js +27 -47
- package/dist/theme/components/input-adornment.d.ts +2 -2
- package/dist/theme/components/linear-progress.d.ts +35 -35
- package/dist/theme/components/linear-progress.js +5 -6
- package/dist/theme/components/link.d.ts +2 -2
- package/dist/theme/components/link.js +7 -9
- package/dist/theme/components/list-item-button.d.ts +120 -46
- package/dist/theme/components/list-item-button.js +27 -20
- package/dist/theme/components/list-item.d.ts +61 -24
- package/dist/theme/components/list-item.js +7 -7
- package/dist/theme/components/list-subheader.d.ts +2 -2
- package/dist/theme/components/month-calendar.d.ts +1049 -6
- package/dist/theme/components/month-calendar.js +25 -15
- package/dist/theme/components/multi-section-digital-clock-section.d.ts +2 -0
- package/dist/theme/components/multi-section-digital-clock-section.js +16 -17
- package/dist/theme/components/outlined-input.d.ts +42 -8
- package/dist/theme/components/outlined-input.js +41 -30
- package/dist/theme/components/pagination-item.d.ts +1038 -1043
- package/dist/theme/components/pagination-item.js +21 -53
- package/dist/theme/components/pagination.js +2 -2
- package/dist/theme/components/picker-day.d.ts +1034 -5
- package/dist/theme/components/picker-day.js +12 -13
- package/dist/theme/components/pickers-arrow-switcher.js +1 -0
- package/dist/theme/components/pickers-calendar-header.d.ts +51 -19
- package/dist/theme/components/pickers-calendar-header.js +49 -25
- package/dist/theme/components/rating.d.ts +12 -0
- package/dist/theme/components/rating.js +4 -1
- package/dist/theme/components/select.js +6 -6
- package/dist/theme/components/slider.d.ts +4 -4
- package/dist/theme/components/step-icon.d.ts +34 -34
- package/dist/theme/components/step-icon.js +9 -10
- package/dist/theme/components/step-label.d.ts +36 -36
- package/dist/theme/components/switch.d.ts +36 -36
- package/dist/theme/components/switch.js +48 -2
- package/dist/theme/components/tab.d.ts +14 -1015
- package/dist/theme/components/tab.js +18 -17
- package/dist/theme/components/table-pagination.js +1 -1
- package/dist/theme/components/tabs.d.ts +20 -1030
- package/dist/theme/components/tabs.js +14 -14
- package/dist/theme/components/toggle-button-group.d.ts +1 -1013
- package/dist/theme/components/toggle-button-group.js +3 -1
- package/dist/theme/components/toggle-button.d.ts +1135 -1014
- package/dist/theme/components/toggle-button.js +93 -2
- package/dist/theme/components/year-calendar.d.ts +1051 -6
- package/dist/theme/components/year-calendar.js +39 -29
- package/dist/theme/optional-component-augmentations/s-carousel.d.ts +14 -0
- package/dist/theme/optional-component-augmentations/s-carousel.js +0 -0
- package/dist/theme/optional-component-augmentations/s-code-block.d.ts +14 -0
- package/dist/theme/optional-component-augmentations/s-code-block.js +0 -0
- package/dist/theme/optional-component-augmentations/s-date-picker.d.ts +14 -0
- package/dist/theme/optional-component-augmentations/s-date-picker.js +0 -0
- package/dist/theme/optional-component-augmentations/s-datetime-picker.d.ts +14 -0
- package/dist/theme/optional-component-augmentations/s-datetime-picker.js +0 -0
- package/dist/theme/optional-component-augmentations/s-file-dropzone.d.ts +14 -0
- package/dist/theme/optional-component-augmentations/s-file-dropzone.js +0 -0
- package/dist/theme/optional-component-augmentations/s-overlay-scrollbar.d.ts +14 -0
- package/dist/theme/optional-component-augmentations/s-overlay-scrollbar.js +0 -0
- package/dist/theme/optional-component-augmentations/s-scroll-reveal.d.ts +14 -0
- package/dist/theme/optional-component-augmentations/s-scroll-reveal.js +0 -0
- package/dist/theme/optional-component-augmentations/s-stripe.d.ts +14 -0
- package/dist/theme/optional-component-augmentations/s-stripe.js +0 -0
- package/dist/theme/optional-component-augmentations/s-text-editor.d.ts +18 -0
- package/dist/theme/optional-component-augmentations/s-text-editor.js +0 -0
- package/dist/theme/optional-component-augmentations/s-two-pane-layout.d.ts +14 -0
- package/dist/theme/optional-component-augmentations/s-two-pane-layout.js +0 -0
- package/dist/theme/theme-primitives.d.ts +51 -8
- package/dist/theme/theme-primitives.js +3 -2
- package/dist/theme-primitives-CRfnMsNy.js +254 -0
- package/dist/utils/canvas-color.d.ts +7 -0
- package/dist/utils/canvas-color.js +62 -0
- package/dist/utils/dayjs.js +9 -146
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +6 -3
- package/dist/utils/slots.d.ts +12 -0
- package/dist/utils/slots.js +6 -0
- package/dist/utils/sx.d.ts +11 -0
- package/dist/utils/sx.js +4 -0
- package/package.json +1 -1
- package/dist/ArrowUpward-CNiENJp2.js +0 -6
- package/dist/Box-BlmynALm.js +0 -45
- package/dist/ButtonBase-BDefit5I.js +0 -720
- package/dist/ChevronRight-gZJ3kc6N.js +0 -6
- package/dist/Close-CJu3iF1p.js +0 -6
- package/dist/Collapse-JUd84Z9O.js +0 -261
- package/dist/ContentCopy-BMQ2JTA0.js +0 -6
- package/dist/Download-SNal6U7j.js +0 -6
- package/dist/ExpandMore-DIsT5FOp.js +0 -6
- package/dist/Favorite-CbvuQfe4.js +0 -6
- package/dist/FormControl-DsRIRfTs.js +0 -686
- package/dist/InfoOutlined-BCzG-5py.js +0 -6
- package/dist/MenuItem-IOMcBScJ.js +0 -220
- package/dist/MenuList-vtqACjea.js +0 -403
- package/dist/Modal-CLdC2-Th.js +0 -1027
- package/dist/Paper-CPC6sMxx.js +0 -133
- package/dist/Popover-ZneFWo2r.js +0 -333
- package/dist/Stack-BQkLmLFp.js +0 -157
- package/dist/Typography-CZ_MYa-E.js +0 -166
- package/dist/UnfoldMoreRounded-tvqQS6eb.js +0 -6
- package/dist/assets/stripe-input.css +0 -1
- package/dist/autocomplete-Dd4zjpaF.js +0 -43
- package/dist/avatar-DFQ5F7pY.js +0 -10
- package/dist/buttonBaseClasses-BVDyR-hz.js +0 -13
- package/dist/checkbox-DC-OoGvh.js +0 -74
- package/dist/checkboxClasses-DANc9lnq.js +0 -18
- package/dist/chunk-C_CI6nMA.js +0 -13
- package/dist/clsx-Bv8WXdlr.js +0 -34
- package/dist/createSimplePaletteValueFilter-5v48HHyU.js +0 -14
- package/dist/createSvgIcon-HW-tbFcL.js +0 -153
- package/dist/createTheme-Bnw5w28O.js +0 -2506
- package/dist/defaultTheme-Bi3OTfLN.js +0 -5
- package/dist/extends-DM-C9PwL.js +0 -12
- package/dist/formLabelClasses-LXZqWZfM.js +0 -18
- package/dist/generateUtilityClass-tRYNDrlH.js +0 -34
- package/dist/generateUtilityClasses-XrPHiTcM.js +0 -10
- package/dist/hooks/use-is-passed-position.d.ts +0 -1
- package/dist/hooks/use-is-passed-position.js +0 -21
- package/dist/iconButtonClasses-LyjwljJq.js +0 -27
- package/dist/inputAdornmentClasses-ZoGTcUz5.js +0 -19
- package/dist/memoTheme-QMocAblm.js +0 -150
- package/dist/mergeSlotProps-slENzJO5.js +0 -45
- package/dist/monthCalendarClasses-BLfBep-t.js +0 -14
- package/dist/objectWithoutPropertiesLoose-kj3TmhoA.js +0 -12
- package/dist/outlinedInputClasses-DPwt_pSZ.js +0 -38
- package/dist/resolveProps-DrnBChYC.js +0 -30
- package/dist/s-accordion-xPDelTvP.js +0 -453
- package/dist/s-carousel-CvmWl6Sc.js +0 -1324
- package/dist/s-chat-input-BHMymKij.js +0 -352
- package/dist/s-chat-message-C-d9amiC.js +0 -270
- package/dist/s-chips-CAC_vVd0.js +0 -99
- package/dist/s-code-block-DEojINTt.js +0 -630
- package/dist/s-comment-message-Dum0P6de.js +0 -169
- package/dist/s-data-table-DfGYIIvn.js +0 -951
- package/dist/s-date-picker-C06rlE6_.js +0 -640
- package/dist/s-datetime-picker-DnIK-QnQ.js +0 -3837
- package/dist/s-error/index.d.ts +0 -1
- package/dist/s-error/index.js +0 -2
- package/dist/s-error/s-error.d.ts +0 -6
- package/dist/s-error/s-error.js +0 -33
- package/dist/s-error-layout/index.d.ts +0 -2
- package/dist/s-error-layout/index.js +0 -2
- package/dist/s-error-layout/s-error-layout.d.ts +0 -58
- package/dist/s-error-layout/s-error-layout.js +0 -81
- package/dist/s-file-dropzone-C4_hCsN8.js +0 -139
- package/dist/s-image-modal/default-media-item.js +0 -34
- package/dist/s-image-modal/image-modal-thumbnail-dock.d.ts +0 -11
- package/dist/s-image-modal/image-modal-thumbnail-dock.js +0 -102
- package/dist/s-image-modal/index.d.ts +0 -3
- package/dist/s-image-modal/index.js +0 -3
- package/dist/s-image-modal/s-image-modal.d.ts +0 -4
- package/dist/s-image-modal/s-image-modal.js +0 -2
- package/dist/s-image-modal/use-image-modal-navigation.d.ts +0 -29
- package/dist/s-image-modal/use-image-modal-navigation.js +0 -57
- package/dist/s-image-modal-D-Jh-5b3.js +0 -243
- package/dist/s-item-not-found/index.d.ts +0 -2
- package/dist/s-item-not-found/index.js +0 -2
- package/dist/s-item-not-found/s-item-not-found.d.ts +0 -20
- package/dist/s-item-not-found/s-item-not-found.js +0 -243
- package/dist/s-language-switcher-B96dUknj.js +0 -192
- package/dist/s-localization-provider-l5J7myJJ.js +0 -519
- package/dist/s-review-CvTVBxTZ.js +0 -223
- package/dist/s-select-HMWY7frm.js +0 -149
- package/dist/s-text-editor-toolbar-ChtNCg2A.js +0 -2253
- package/dist/s-text-field-DD6nnwwU.js +0 -42
- package/dist/s-theme-demo-Bnv7lPIh.js +0 -867
- package/dist/s-theme-switch-DzXoVmQH.js +0 -37
- package/dist/s-tip-BOGEH1v8.js +0 -34
- package/dist/selectClasses-C-QpiLPi.js +0 -22
- package/dist/styled-BTDmdi4c.js +0 -164
- package/dist/styled-engine-DOxAQ3qw.js +0 -190
- package/dist/svgIconClasses-BtHvkhy5.js +0 -20
- package/dist/switch-BSg1TGWH.js +0 -62
- package/dist/tabClasses-CmFw6sbs.js +0 -20
- package/dist/theme-primitives-CiQYd9Cc.js +0 -431
- package/dist/toggle-button-TmtJ4nSp.js +0 -26
- package/dist/toggle-button-group-BCkdd3Jj.js +0 -26
- package/dist/tool-bar-action-buttons-CSXNDen6.js +0 -50
- package/dist/tool-bar-image-input-IdA6l71Y.js +0 -138
- package/dist/typographyClasses-CiDYRanL.js +0 -31
- package/dist/useControlled-BtZNCHV0.js +0 -5
- package/dist/useControlled-DuSwFVhD.js +0 -29
- package/dist/useEnhancedEffect-Dsu5K7-Z.js +0 -5
- package/dist/useForkRef-yOYCJHzF.js +0 -29
- package/dist/useFormControl-CUs308br.js +0 -18
- package/dist/useMobilePicker-CQA6fYLQ.js +0 -9864
- package/dist/useSlot-IwEDsR9t.js +0 -171
- package/dist/useThemeProps-D4jtjo2I.js +0 -19
- package/dist/utils-CU6O7jrX.js +0 -214
- package/dist/warning-CFMmJJnf.js +0 -111
- package/dist/yearCalendarClasses-DypEe_Vn.js +0 -14
- /package/dist/{s-image-modal → s-image-viewer}/types.js +0 -0
- /package/dist/{utils-B5Rl6Zwv.js → utils-CMeAWSRO.js} +0 -0
package/dist/s-select/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SSelect as e } from "./s-select.js";
|
|
2
2
|
export { e as SSelect, e as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
1
|
import { SelectProps } from '@mui/material';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
/** Base type constraint for select options - can be primitives or objects */
|
|
4
4
|
type BaseOption = string | number | Record<string, unknown>;
|
|
5
5
|
/**
|
|
6
6
|
* Props interface for SSelect component
|
|
7
7
|
*/
|
|
8
|
-
export type SSelectProps<T extends BaseOption = string> = Omit<SelectProps, 'error' | '
|
|
8
|
+
export type SSelectProps<T extends BaseOption = string> = Omit<SelectProps, 'children' | 'error' | 'label' | 'required'> & {
|
|
9
9
|
/** Array of options to display in the select dropdown */
|
|
10
10
|
options?: T[];
|
|
11
11
|
/** Stable key to use for each rendered option */
|
|
@@ -16,18 +16,16 @@ export type SSelectProps<T extends BaseOption = string> = Omit<SelectProps, 'err
|
|
|
16
16
|
optionValue?: T extends object ? keyof T : never;
|
|
17
17
|
/** Placeholder text shown when no option is selected */
|
|
18
18
|
placeholder?: string;
|
|
19
|
-
/**
|
|
20
|
-
variant?: 'outlined' | 'filled' | 'standard';
|
|
21
|
-
/** Field label displayed above the select */
|
|
19
|
+
/** Field label associated with the select */
|
|
22
20
|
label?: string | React.ReactNode;
|
|
23
|
-
/**
|
|
24
|
-
error?:
|
|
21
|
+
/** Whether the field has an error */
|
|
22
|
+
error?: boolean;
|
|
23
|
+
/** Supporting or validation content shown below the field */
|
|
24
|
+
helperText?: React.ReactNode;
|
|
25
25
|
/** Whether the field is required (shows asterisk in label) */
|
|
26
26
|
required?: boolean;
|
|
27
27
|
/** Whether to use simple value rendering (for primitive values) */
|
|
28
28
|
simple?: boolean;
|
|
29
|
-
/** HTML id attribute for the select element */
|
|
30
|
-
htmlFor?: string;
|
|
31
29
|
/** Enable search/filter functionality in the dropdown */
|
|
32
30
|
searchable?: boolean;
|
|
33
31
|
/** Placeholder text for the search input */
|
|
@@ -35,7 +33,23 @@ export type SSelectProps<T extends BaseOption = string> = Omit<SelectProps, 'err
|
|
|
35
33
|
/** Message shown when a search yields no matching options */
|
|
36
34
|
noResultsText?: string;
|
|
37
35
|
/** Custom render function for options */
|
|
38
|
-
renderOption?: (option: T) => ReactNode;
|
|
36
|
+
renderOption?: (option: T) => React.ReactNode;
|
|
39
37
|
};
|
|
40
|
-
export
|
|
38
|
+
export type SSelectOwnerState = SSelectProps & {
|
|
39
|
+
color: NonNullable<SelectProps['color']>;
|
|
40
|
+
disabled: boolean;
|
|
41
|
+
displayEmpty: boolean;
|
|
42
|
+
error: boolean;
|
|
43
|
+
fullWidth: boolean;
|
|
44
|
+
margin: NonNullable<SelectProps['margin']>;
|
|
45
|
+
required: boolean;
|
|
46
|
+
searchable: boolean;
|
|
47
|
+
size: NonNullable<SelectProps['size']>;
|
|
48
|
+
variant: NonNullable<SelectProps['variant']>;
|
|
49
|
+
};
|
|
50
|
+
export interface SSelectComponent {
|
|
51
|
+
<T extends BaseOption = string>(props: SSelectProps<T> & React.RefAttributes<HTMLDivElement>): React.JSX.Element;
|
|
52
|
+
displayName?: string;
|
|
53
|
+
}
|
|
54
|
+
export declare const SSelect: SSelectComponent;
|
|
41
55
|
export default SSelect;
|
|
@@ -1,2 +1,201 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { staticFieldLabelStyles as e } from "../theme/components/field-label-styles.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { Box as i, FormControl as a, FormHelperText as o, InputAdornment as s, InputLabel as c, ListSubheader as l, MenuItem as u, Select as ee, TextField as d, styled as f, useThemeProps as te } from "@mui/material";
|
|
5
|
+
import { mergeSlotProps as p } from "@mui/material/utils";
|
|
6
|
+
import ne from "@mui/icons-material/Search";
|
|
7
|
+
//#region lib/s-select/s-select.tsx
|
|
8
|
+
function m(e) {
|
|
9
|
+
return typeof e == "string" || typeof e == "number";
|
|
10
|
+
}
|
|
11
|
+
function h(e, t) {
|
|
12
|
+
return m(e) ? String(e) : String(e[t]);
|
|
13
|
+
}
|
|
14
|
+
function re(e, t) {
|
|
15
|
+
return m(e) ? e : e[t];
|
|
16
|
+
}
|
|
17
|
+
function g(e) {
|
|
18
|
+
return /* @__PURE__ */ n(i, {
|
|
19
|
+
component: "span",
|
|
20
|
+
sx: { color: "text.secondary" },
|
|
21
|
+
children: e
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function _(e, t, n) {
|
|
25
|
+
return e.find((e) => n(e) === t);
|
|
26
|
+
}
|
|
27
|
+
function ie(e, t, n, r, i, a) {
|
|
28
|
+
if (e == null || e === "") return g(r);
|
|
29
|
+
if (t) return String(e);
|
|
30
|
+
let o = _(n, e, a);
|
|
31
|
+
return o ? i(o) : "";
|
|
32
|
+
}
|
|
33
|
+
function ae(e, t, n, r, i, a) {
|
|
34
|
+
return e.length === 0 ? g(r) : t ? e.map(String).join(", ") : e.map((e) => {
|
|
35
|
+
let t = _(n, e, a);
|
|
36
|
+
return t ? i(t) : "";
|
|
37
|
+
}).filter(Boolean).join(", ");
|
|
38
|
+
}
|
|
39
|
+
function oe(e, t, n, r) {
|
|
40
|
+
if (!t || !n) return e;
|
|
41
|
+
let i = n.toLowerCase();
|
|
42
|
+
return e.filter((e) => r(e).toLowerCase().includes(i));
|
|
43
|
+
}
|
|
44
|
+
function v(e, t) {
|
|
45
|
+
return e.reduce((e, n) => {
|
|
46
|
+
let r = String(t(n));
|
|
47
|
+
return e.set(r, (e.get(r) ?? 0) + 1), e;
|
|
48
|
+
}, /* @__PURE__ */ new Map());
|
|
49
|
+
}
|
|
50
|
+
function y(e, t, n, r, i) {
|
|
51
|
+
let a = i?.(e, t);
|
|
52
|
+
if (a !== void 0) return a;
|
|
53
|
+
let o = String(r(e));
|
|
54
|
+
return (n.get(o) ?? 0) > 1 ? `${o}-${t}` : o;
|
|
55
|
+
}
|
|
56
|
+
function b(e, t, r, i, a) {
|
|
57
|
+
let o = v(e, t);
|
|
58
|
+
return e.map((e, s) => {
|
|
59
|
+
let c = t(e), l = y(e, s, o, t, a);
|
|
60
|
+
return /* @__PURE__ */ n(u, {
|
|
61
|
+
disabled: e?.disabled ?? !1,
|
|
62
|
+
value: c,
|
|
63
|
+
children: i ? i(e) : r(e)
|
|
64
|
+
}, l);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function x(e) {
|
|
68
|
+
if (e) return {
|
|
69
|
+
autoFocus: !1,
|
|
70
|
+
slotProps: { paper: { onKeyDown: (e) => {
|
|
71
|
+
e.key !== "Escape" && e.stopPropagation();
|
|
72
|
+
} } }
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function se(e, t) {
|
|
76
|
+
let n = x(e);
|
|
77
|
+
if (!n) return t;
|
|
78
|
+
if (!t) return n;
|
|
79
|
+
let { slotProps: r, slots: i, ...a } = n, { slotProps: o, slots: s, ...c } = t;
|
|
80
|
+
return {
|
|
81
|
+
...a,
|
|
82
|
+
...c,
|
|
83
|
+
slots: {
|
|
84
|
+
...i,
|
|
85
|
+
...s
|
|
86
|
+
},
|
|
87
|
+
slotProps: {
|
|
88
|
+
...r,
|
|
89
|
+
...o,
|
|
90
|
+
paper: p(o?.paper, r?.paper ?? {})
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
var S = f(a, {
|
|
95
|
+
name: "SSelect",
|
|
96
|
+
slot: "Root",
|
|
97
|
+
shouldForwardProp: (e) => e !== "ownerState"
|
|
98
|
+
})({ ...e });
|
|
99
|
+
function C(e, a) {
|
|
100
|
+
let f = te({
|
|
101
|
+
props: e,
|
|
102
|
+
name: "SSelect"
|
|
103
|
+
}), { options: p = [], getOptionKey: m, optionLabel: g = "name", optionValue: _ = "id", placeholder: v, label: y = "", error: x = !1, helperText: C, required: w = !1, simple: T = !1, searchable: E = !1, searchPlaceholder: ce = "", noResultsText: le = "No results found", renderOption: D, className: O, color: k = "primary", defaultValue: A, disabled: j = !1, displayEmpty: M = !0, fullWidth: N = !0, id: ue, inputProps: P, labelId: F, margin: I = "none", MenuProps: L, onChange: R, onClose: z, onOpen: B, open: V, renderValue: H, size: U = "medium", sx: de, variant: W = "outlined", ...G } = f, [K, q] = t.useState(""), fe = t.useId(), J = ue ?? fe, Y = F ?? `${J}-label`, X = C ? `${J}-helper-text` : void 0, pe = [P?.["aria-describedby"], X].filter(Boolean).join(" ") || void 0, me = G.value === void 0 ? A ?? (G.multiple ? [] : "") : void 0, he = {
|
|
104
|
+
...f,
|
|
105
|
+
color: k,
|
|
106
|
+
disabled: j,
|
|
107
|
+
displayEmpty: M,
|
|
108
|
+
error: x,
|
|
109
|
+
fullWidth: N,
|
|
110
|
+
margin: I,
|
|
111
|
+
required: w,
|
|
112
|
+
searchable: E,
|
|
113
|
+
size: U,
|
|
114
|
+
variant: W
|
|
115
|
+
}, Z = (e) => h(e, g), Q = (e) => re(e, _), $ = oe(p, E, K, Z), ge = (e) => {
|
|
116
|
+
z?.(e), E && q("");
|
|
117
|
+
}, _e = (e) => G.multiple ? ae(Array.isArray(e) ? e : [], T, p, v, Z, Q) : ie(e, T, p, v, Z, Q), ve = () => E ? $.length > 0 ? b($, Q, Z, D, m) : K ? /* @__PURE__ */ n(u, {
|
|
118
|
+
disabled: !0,
|
|
119
|
+
children: /* @__PURE__ */ n(i, {
|
|
120
|
+
sx: {
|
|
121
|
+
color: "text.secondary",
|
|
122
|
+
textAlign: "center",
|
|
123
|
+
width: "100%"
|
|
124
|
+
},
|
|
125
|
+
children: le
|
|
126
|
+
})
|
|
127
|
+
}) : b(p, Q, Z, D, m) : b(p, Q, Z, D, m), ye = se(E, L);
|
|
128
|
+
return /* @__PURE__ */ r(S, {
|
|
129
|
+
className: O,
|
|
130
|
+
color: k,
|
|
131
|
+
disabled: j,
|
|
132
|
+
error: x,
|
|
133
|
+
fullWidth: N,
|
|
134
|
+
margin: I,
|
|
135
|
+
ownerState: he,
|
|
136
|
+
ref: a,
|
|
137
|
+
required: w,
|
|
138
|
+
size: U,
|
|
139
|
+
sx: de,
|
|
140
|
+
variant: W,
|
|
141
|
+
children: [
|
|
142
|
+
y ? /* @__PURE__ */ n(c, {
|
|
143
|
+
id: Y,
|
|
144
|
+
shrink: !!v || M && !!H || void 0,
|
|
145
|
+
children: y
|
|
146
|
+
}) : null,
|
|
147
|
+
/* @__PURE__ */ r(ee, {
|
|
148
|
+
...G,
|
|
149
|
+
defaultValue: me,
|
|
150
|
+
id: J,
|
|
151
|
+
label: y,
|
|
152
|
+
labelId: y ? Y : F,
|
|
153
|
+
displayEmpty: M,
|
|
154
|
+
inputProps: {
|
|
155
|
+
...P,
|
|
156
|
+
"aria-describedby": pe
|
|
157
|
+
},
|
|
158
|
+
open: V,
|
|
159
|
+
onOpen: B,
|
|
160
|
+
onClose: ge,
|
|
161
|
+
MenuProps: ye,
|
|
162
|
+
onChange: R,
|
|
163
|
+
renderValue: H ?? _e,
|
|
164
|
+
variant: W,
|
|
165
|
+
children: [E && /* @__PURE__ */ n(l, {
|
|
166
|
+
sx: {
|
|
167
|
+
px: 2,
|
|
168
|
+
py: 1,
|
|
169
|
+
position: "sticky",
|
|
170
|
+
top: 0,
|
|
171
|
+
bgcolor: "background.paper",
|
|
172
|
+
zIndex: 1
|
|
173
|
+
},
|
|
174
|
+
children: /* @__PURE__ */ n(d, {
|
|
175
|
+
fullWidth: !0,
|
|
176
|
+
autoFocus: !0,
|
|
177
|
+
placeholder: ce,
|
|
178
|
+
value: K,
|
|
179
|
+
onChange: (e) => q(e.target.value),
|
|
180
|
+
onKeyDown: (e) => {
|
|
181
|
+
e.key !== "Escape" && e.stopPropagation();
|
|
182
|
+
},
|
|
183
|
+
onClick: (e) => e.stopPropagation(),
|
|
184
|
+
slotProps: { input: { startAdornment: /* @__PURE__ */ n(s, {
|
|
185
|
+
position: "start",
|
|
186
|
+
children: /* @__PURE__ */ n(ne, {})
|
|
187
|
+
}) } }
|
|
188
|
+
})
|
|
189
|
+
}), ve()]
|
|
190
|
+
}),
|
|
191
|
+
C ? /* @__PURE__ */ n(o, {
|
|
192
|
+
id: X,
|
|
193
|
+
children: C
|
|
194
|
+
}) : null
|
|
195
|
+
]
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
var w = t.forwardRef(C);
|
|
199
|
+
w.displayName = "SSelect";
|
|
200
|
+
//#endregion
|
|
201
|
+
export { w as SSelect, w as default };
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { default, default as SSelectList } from './s-select-list';
|
|
2
|
-
export type { SSelectListProps,
|
|
2
|
+
export type { SSelectListItem, SSelectListItemState, SSelectListOwnerState, SSelectListProps, SSelectListSlotProps, SSelectListSlots, } from './s-select-list';
|
|
3
|
+
export type {} from '../theme/component-augmentation';
|
|
@@ -1,27 +1,66 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BoxProps, CollapseProps, FormControlLabelProps, RadioGroupProps, RadioProps } from '@mui/material';
|
|
2
|
+
import { OwnerStateSlotProps as MuiOwnerStateSlotProps } from '../utils/slots';
|
|
3
|
+
import * as React from 'react';
|
|
2
4
|
export interface SSelectListItem<T = unknown> {
|
|
3
5
|
id: string;
|
|
4
6
|
data: T;
|
|
5
7
|
}
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
8
|
+
/** Props for a single-selection list built on MUI RadioGroup semantics. */
|
|
9
|
+
export interface SSelectListProps<T = unknown> extends Omit<RadioGroupProps, 'children' | 'defaultValue' | 'onChange' | 'value'> {
|
|
10
|
+
/** Initial selected item for uncontrolled usage. */
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
/** Items rendered as radio options. */
|
|
11
13
|
items: SSelectListItem<T>[];
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
onSelect: (id: string) => void;
|
|
16
|
-
/** Function to render the content of each item */
|
|
17
|
-
renderItem: (item: SSelectListItem<T>, selected: boolean) => React.ReactNode;
|
|
18
|
-
/** Optional function to render content below the selected item */
|
|
14
|
+
/** Called with the standard MUI RadioGroup change signature. */
|
|
15
|
+
onChange?: RadioGroupProps['onChange'];
|
|
16
|
+
/** Optional content rendered below the selected item. */
|
|
19
17
|
renderBelow?: (item: SSelectListItem<T>) => React.ReactNode;
|
|
20
|
-
/**
|
|
18
|
+
/** Renders the visible option label. */
|
|
19
|
+
renderItem: (item: SSelectListItem<T>, selected: boolean) => React.ReactNode;
|
|
20
|
+
/** Visually shows the radio indicator while retaining radio semantics when false. */
|
|
21
21
|
showRadio?: boolean;
|
|
22
|
+
/** Components used for structural slots. */
|
|
23
|
+
slots?: SSelectListSlots;
|
|
24
|
+
/** Props or item-state callbacks for structural slots. */
|
|
25
|
+
slotProps?: SSelectListSlotProps<T>;
|
|
26
|
+
/** Selected item for controlled usage. */
|
|
27
|
+
value?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface SSelectListOwnerState<T = unknown> extends SSelectListProps<T> {
|
|
30
|
+
showRadio: boolean;
|
|
31
|
+
value: string;
|
|
32
|
+
}
|
|
33
|
+
export interface SSelectListItemState<T = unknown> extends SSelectListOwnerState<T> {
|
|
34
|
+
item: SSelectListItem<T>;
|
|
35
|
+
selected: boolean;
|
|
36
|
+
}
|
|
37
|
+
type RootSlotProps<Props, T> = MuiOwnerStateSlotProps<Props, SSelectListOwnerState<T>>;
|
|
38
|
+
type ItemSlotProps<Props, T> = MuiOwnerStateSlotProps<Props, SSelectListItemState<T>>;
|
|
39
|
+
declare const managedItemProps: readonly ["checked", "inputRef", "name", "onChange", "value"];
|
|
40
|
+
declare const managedRadioProps: readonly ["checked", "disabled", "inputRef", "name", "onChange", "value"];
|
|
41
|
+
type ManagedItemProps = (typeof managedItemProps)[number];
|
|
42
|
+
type ManagedRadioProps = (typeof managedRadioProps)[number];
|
|
43
|
+
export interface SSelectListSlots {
|
|
44
|
+
details?: React.ElementType;
|
|
45
|
+
item?: React.ElementType;
|
|
46
|
+
label?: React.ElementType;
|
|
47
|
+
option?: React.ElementType;
|
|
48
|
+
radio?: React.ElementType;
|
|
49
|
+
root?: React.ElementType;
|
|
50
|
+
transition?: React.ElementType;
|
|
51
|
+
}
|
|
52
|
+
export interface SSelectListSlotProps<T = unknown> {
|
|
53
|
+
details?: ItemSlotProps<Omit<BoxProps, 'children'>, T>;
|
|
54
|
+
item?: ItemSlotProps<Omit<FormControlLabelProps, 'control' | 'label' | ManagedItemProps>, T>;
|
|
55
|
+
label?: ItemSlotProps<Omit<BoxProps, 'children'>, T>;
|
|
56
|
+
option?: ItemSlotProps<Omit<BoxProps, 'children'>, T>;
|
|
57
|
+
radio?: ItemSlotProps<Omit<RadioProps, ManagedRadioProps>, T>;
|
|
58
|
+
root?: RootSlotProps<Omit<RadioGroupProps, 'children' | 'defaultValue' | 'onChange' | 'value'>, T>;
|
|
59
|
+
transition?: ItemSlotProps<Omit<CollapseProps, 'children' | 'in'>, T>;
|
|
60
|
+
}
|
|
61
|
+
interface SSelectListComponent {
|
|
62
|
+
<T = unknown>(props: SSelectListProps<T> & React.RefAttributes<HTMLDivElement>): React.JSX.Element;
|
|
63
|
+
displayName?: string;
|
|
22
64
|
}
|
|
23
|
-
export declare const SSelectList:
|
|
24
|
-
<T>({ items, selectedId, onSelect, renderItem, renderBelow, showRadio, }: SSelectListProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
displayName: string;
|
|
26
|
-
};
|
|
65
|
+
export declare const SSelectList: SSelectListComponent;
|
|
27
66
|
export default SSelectList;
|
|
@@ -1,35 +1,159 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { resolveOwnerStateSlotProps as e } from "../utils/slots.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { createElement as n } from "react";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
import { Box as i, Collapse as a, FormControlLabel as o, Radio as s, RadioGroup as c, formControlLabelClasses as l, styled as u, useThemeProps as d } from "@mui/material";
|
|
6
|
+
import { mergeSlotProps as f, useControlled as p, useEventCallback as m, useForkRef as h } from "@mui/material/utils";
|
|
7
|
+
import g from "@mui/utils/appendOwnerState";
|
|
8
|
+
import { visuallyHidden as _ } from "@mui/utils";
|
|
4
9
|
//#region lib/s-select-list/s-select-list.tsx
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
var v = [
|
|
11
|
+
"checked",
|
|
12
|
+
"inputRef",
|
|
13
|
+
"name",
|
|
14
|
+
"onChange",
|
|
15
|
+
"value"
|
|
16
|
+
], y = [
|
|
17
|
+
"checked",
|
|
18
|
+
"disabled",
|
|
19
|
+
"inputRef",
|
|
20
|
+
"name",
|
|
21
|
+
"onChange",
|
|
22
|
+
"value"
|
|
23
|
+
], b = { ..._ };
|
|
24
|
+
function x(e, t) {
|
|
25
|
+
let n = { ...e ?? {} };
|
|
26
|
+
return t.forEach((e) => {
|
|
27
|
+
delete n[e];
|
|
28
|
+
}), n;
|
|
29
|
+
}
|
|
30
|
+
var S = u(c, {
|
|
31
|
+
name: "SSelectList",
|
|
32
|
+
slot: "Root",
|
|
33
|
+
shouldForwardProp: (e) => e !== "ownerState"
|
|
34
|
+
})(({ theme: e }) => ({ gap: e.spacing(1) })), C = u(i, {
|
|
35
|
+
name: "SSelectList",
|
|
36
|
+
slot: "Option",
|
|
37
|
+
shouldForwardProp: (e) => e !== "ownerState"
|
|
38
|
+
})({
|
|
39
|
+
minWidth: 0,
|
|
40
|
+
width: "100%",
|
|
41
|
+
variants: [{
|
|
42
|
+
props: ({ ownerState: e }) => !!e.row,
|
|
43
|
+
style: {
|
|
44
|
+
flex: "1 1 0",
|
|
45
|
+
width: 0
|
|
46
|
+
}
|
|
47
|
+
}]
|
|
48
|
+
}), w = u(o, {
|
|
49
|
+
name: "SSelectList",
|
|
50
|
+
slot: "Item",
|
|
51
|
+
shouldForwardProp: (e) => e !== "ownerState"
|
|
52
|
+
})(({ theme: e }) => ({
|
|
13
53
|
border: "1px solid",
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
54
|
+
borderColor: (e.vars ?? e).palette.divider,
|
|
55
|
+
borderRadius: e.radius.md,
|
|
56
|
+
justifyContent: "space-between",
|
|
57
|
+
margin: 0,
|
|
58
|
+
padding: e.spacing(1, 2),
|
|
59
|
+
width: "100%",
|
|
60
|
+
[`&.${l.disabled}`]: { color: (e.vars ?? e).palette.text.disabled },
|
|
61
|
+
variants: [{
|
|
62
|
+
props: ({ ownerState: e }) => e.selected,
|
|
63
|
+
style: { borderColor: (e.vars ?? e).palette.primary.dark }
|
|
64
|
+
}, {
|
|
65
|
+
props: ({ ownerState: e }) => !e.showRadio,
|
|
66
|
+
style: { "&:has(input:focus-visible)": {
|
|
67
|
+
outline: `2px solid ${(e.vars ?? e).palette.primary.main}`,
|
|
68
|
+
outlineOffset: 2
|
|
69
|
+
} }
|
|
70
|
+
}]
|
|
71
|
+
})), T = u("span", {
|
|
72
|
+
name: "SSelectList",
|
|
73
|
+
slot: "Label",
|
|
74
|
+
shouldForwardProp: (e) => e !== "ownerState"
|
|
75
|
+
})({
|
|
76
|
+
display: "block",
|
|
77
|
+
flex: 1,
|
|
78
|
+
minWidth: 0
|
|
79
|
+
}), E = u(s, {
|
|
80
|
+
name: "SSelectList",
|
|
81
|
+
slot: "Radio",
|
|
82
|
+
shouldForwardProp: (e) => e !== "ownerState"
|
|
83
|
+
})({ variants: [{
|
|
84
|
+
props: ({ ownerState: e }) => !e.showRadio,
|
|
85
|
+
style: b
|
|
86
|
+
}] }), D = u(a, {
|
|
87
|
+
name: "SSelectList",
|
|
88
|
+
slot: "Transition",
|
|
89
|
+
shouldForwardProp: (e) => e !== "ownerState"
|
|
90
|
+
})({}), O = u(i, {
|
|
91
|
+
name: "SSelectList",
|
|
92
|
+
slot: "Details",
|
|
93
|
+
shouldForwardProp: (e) => e !== "ownerState"
|
|
94
|
+
})(({ theme: e }) => ({
|
|
95
|
+
minWidth: 0,
|
|
96
|
+
marginTop: e.spacing(1),
|
|
97
|
+
width: "100%"
|
|
98
|
+
}));
|
|
99
|
+
function k(t, i) {
|
|
100
|
+
let a = d({
|
|
101
|
+
props: t,
|
|
102
|
+
name: "SSelectList"
|
|
103
|
+
}), { defaultValue: o, items: s, onChange: c, renderBelow: l, renderItem: u, showRadio: _ = !0, slotProps: b, slots: k, value: A, ...j } = a, [M, N] = p({
|
|
104
|
+
controlled: A,
|
|
105
|
+
default: o ?? "",
|
|
106
|
+
name: "SSelectList",
|
|
107
|
+
state: "value"
|
|
108
|
+
}), P = {
|
|
109
|
+
...a,
|
|
110
|
+
showRadio: _,
|
|
111
|
+
value: M
|
|
112
|
+
}, F = k?.root ?? S, I = k?.option ?? C, L = k?.item ?? w, R = k?.label ?? T, z = k?.radio ?? E, B = k?.transition ?? D, V = k?.details ?? O, H = m((e, t) => {
|
|
113
|
+
N(t), c?.(e, t);
|
|
114
|
+
}), { ref: U, ...W } = g(F, f(e(b?.root, P), {
|
|
115
|
+
...j,
|
|
116
|
+
onChange: H,
|
|
117
|
+
value: M
|
|
118
|
+
}), P), G = h(U, i);
|
|
119
|
+
return /* @__PURE__ */ r(F, {
|
|
120
|
+
...W,
|
|
121
|
+
ref: G,
|
|
122
|
+
children: s.map((t) => {
|
|
123
|
+
let i = t.id === M, a = {
|
|
124
|
+
...P,
|
|
125
|
+
item: t,
|
|
126
|
+
selected: i
|
|
127
|
+
}, o = e(b?.option, a), s = e(b?.item, a), c = e(b?.label, a), d = e(b?.radio, a), p = e(b?.transition, a) ?? {}, m = g(I, o ?? {}, a), h = g(L, x(f(s, {
|
|
128
|
+
disableTypography: !0,
|
|
129
|
+
labelPlacement: "start"
|
|
130
|
+
}), v), a), _ = g(R, c ?? {}, a), S = g(z, x(d, y), a);
|
|
131
|
+
return /* @__PURE__ */ n(I, {
|
|
132
|
+
...m,
|
|
133
|
+
key: t.id
|
|
134
|
+
}, /* @__PURE__ */ r(L, {
|
|
135
|
+
...h,
|
|
136
|
+
control: /* @__PURE__ */ r(z, { ...S }),
|
|
137
|
+
label: /* @__PURE__ */ r(R, {
|
|
138
|
+
..._,
|
|
139
|
+
children: u(t, i)
|
|
140
|
+
}),
|
|
141
|
+
value: t.id
|
|
142
|
+
}), l ? /* @__PURE__ */ r(B, {
|
|
143
|
+
...g(B, {
|
|
144
|
+
...p,
|
|
145
|
+
unmountOnExit: p.unmountOnExit ?? !0
|
|
146
|
+
}, a),
|
|
147
|
+
in: i,
|
|
148
|
+
children: /* @__PURE__ */ r(V, {
|
|
149
|
+
...g(V, e(b?.details, a) ?? {}, a),
|
|
150
|
+
children: l(t)
|
|
151
|
+
})
|
|
152
|
+
}) : null);
|
|
153
|
+
})
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
var A = t.forwardRef(k);
|
|
157
|
+
A.displayName = "SSelectList";
|
|
34
158
|
//#endregion
|
|
35
|
-
export {
|
|
159
|
+
export { A as SSelectList, A as default };
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { default, default as SSkeleton } from './s-skeleton';
|
|
2
|
-
export type { SSkeletonAnimation, SSkeletonCustomProps, SSkeletonPreset, SSkeletonPresetProps, SSkeletonProps, SSkeletonVariant, } from './s-skeleton';
|
|
2
|
+
export type { SSkeletonAnimation, SSkeletonCustomProps, SSkeletonOwnerState, SSkeletonPreset, SSkeletonPresetProps, SSkeletonProps, SSkeletonVariant, } from './s-skeleton';
|
|
3
|
+
export type {} from '../theme/component-augmentation';
|
|
@@ -1,38 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
export type SSkeletonVariant = '
|
|
1
|
+
import { SkeletonProps } from '@mui/material/Skeleton';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type SSkeletonVariant = NonNullable<SkeletonProps['variant']>;
|
|
4
4
|
export type SSkeletonPreset = 'avatar' | 'button' | 'checkbox' | 'icon-button';
|
|
5
|
-
export type SSkeletonAnimation = '
|
|
5
|
+
export type SSkeletonAnimation = NonNullable<SkeletonProps['animation']>;
|
|
6
|
+
export interface SSkeletonOwnerState {
|
|
7
|
+
animation: SkeletonProps['animation'];
|
|
8
|
+
fontSize?: number | string;
|
|
9
|
+
preset?: SSkeletonPreset;
|
|
10
|
+
variant: SSkeletonVariant;
|
|
11
|
+
}
|
|
6
12
|
type SSkeletonBaseProps = Omit<SkeletonProps, 'animation' | 'component' | 'height' | 'variant' | 'width'> & {
|
|
7
|
-
/** Loading animation.
|
|
13
|
+
/** Loading animation. @default 'pulse' */
|
|
8
14
|
animation?: SSkeletonAnimation;
|
|
9
15
|
};
|
|
10
16
|
export type SSkeletonCustomProps = SSkeletonBaseProps & {
|
|
11
|
-
/**
|
|
17
|
+
/** Font size used to size a text skeleton. */
|
|
18
|
+
fontSize?: number | string;
|
|
19
|
+
/** Skeleton height. */
|
|
20
|
+
height?: number | string;
|
|
12
21
|
preset?: never;
|
|
13
|
-
/**
|
|
22
|
+
/** Skeleton shape. @default 'text' */
|
|
14
23
|
variant?: SSkeletonVariant;
|
|
15
|
-
/**
|
|
16
|
-
height?: number | string;
|
|
17
|
-
/** Width of the skeleton (number for px, string for CSS units) */
|
|
24
|
+
/** Skeleton width. */
|
|
18
25
|
width?: number | string;
|
|
19
|
-
/** Font size for text variant skeletons */
|
|
20
|
-
fontSize?: number | string;
|
|
21
26
|
};
|
|
22
27
|
export type SSkeletonPresetProps = SSkeletonBaseProps & {
|
|
23
|
-
|
|
28
|
+
fontSize?: never;
|
|
29
|
+
height?: never;
|
|
30
|
+
/** Predefined dimensions and shape for a common UI element. */
|
|
24
31
|
preset: SSkeletonPreset;
|
|
25
32
|
variant?: never;
|
|
26
|
-
height?: never;
|
|
27
33
|
width?: never;
|
|
28
|
-
fontSize?: never;
|
|
29
34
|
};
|
|
30
|
-
/**
|
|
31
|
-
* Props interface for SSkeleton component
|
|
32
|
-
*/
|
|
33
35
|
export type SSkeletonProps = SSkeletonCustomProps | SSkeletonPresetProps;
|
|
34
|
-
export declare const SSkeleton:
|
|
35
|
-
(props: SSkeletonProps): React.JSX.Element;
|
|
36
|
-
displayName: string;
|
|
37
|
-
};
|
|
36
|
+
export declare const SSkeleton: React.ForwardRefExoticComponent<(Omit<SSkeletonCustomProps, "ref"> | Omit<SSkeletonPresetProps, "ref">) & React.RefAttributes<HTMLSpanElement>>;
|
|
38
37
|
export default SSkeleton;
|