@witchcraft/ui 0.3.26 → 0.4.0-beta.2
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 +54 -61
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/assets/animations.css +1 -1
- package/dist/runtime/assets/locales/en.json +2 -0
- package/dist/runtime/build/WitchcraftUiResolver.js +1 -1
- package/dist/runtime/components/TestControls/TestControls.vue +3 -3
- package/dist/runtime/components/WButton/WButton.d.vue.ts +34 -0
- package/dist/runtime/components/{LibButton/LibButton.vue → WButton/WButton.vue} +26 -38
- package/dist/runtime/components/WButton/WButton.vue.d.ts +34 -0
- package/dist/runtime/components/WCheckbox/WCheckbox.d.vue.ts +33 -0
- package/dist/runtime/components/WCheckbox/WCheckbox.vue +109 -0
- package/dist/runtime/components/WCheckbox/WCheckbox.vue.d.ts +33 -0
- package/dist/runtime/components/WColorInput/WColorInput.d.vue.ts +45 -0
- package/dist/runtime/components/WColorInput/WColorInput.vue +85 -0
- package/dist/runtime/components/WColorInput/WColorInput.vue.d.ts +45 -0
- package/dist/runtime/components/WColorInput/WColorSwatchButton.d.vue.ts +28 -0
- package/dist/runtime/components/WColorInput/WColorSwatchButton.vue +86 -0
- package/dist/runtime/components/WColorInput/WColorSwatchButton.vue.d.ts +28 -0
- package/dist/runtime/components/{LibColorPicker/LibColorPicker.d.vue.ts → WColorPicker/WColorPicker.d.vue.ts} +7 -6
- package/dist/runtime/components/{LibColorPicker/LibColorPicker.vue → WColorPicker/WColorPicker.vue} +40 -29
- package/dist/runtime/components/{LibColorPicker/LibColorPicker.vue.d.ts → WColorPicker/WColorPicker.vue.d.ts} +7 -6
- package/dist/runtime/components/WCombobox/WCombobox.d.vue.ts +109 -0
- package/dist/runtime/components/WCombobox/WCombobox.vue +402 -0
- package/dist/runtime/components/WCombobox/WCombobox.vue.d.ts +109 -0
- package/dist/runtime/components/WCombobox/storyPlays.d.ts +18 -0
- package/dist/runtime/components/WCombobox/storyPlays.js +68 -0
- package/dist/runtime/components/{LibDarkModeSwitcher/LibDarkModeSwitcher.d.vue.ts → WDarkModeSwitcher/WDarkModeSwitcher.d.vue.ts} +8 -13
- package/dist/runtime/components/{LibDarkModeSwitcher/LibDarkModeSwitcher.vue → WDarkModeSwitcher/WDarkModeSwitcher.vue} +11 -14
- package/dist/runtime/components/{LibDarkModeSwitcher/LibDarkModeSwitcher.vue.d.ts → WDarkModeSwitcher/WDarkModeSwitcher.vue.d.ts} +8 -13
- package/dist/runtime/components/WDatePicker/WDatePicker.d.vue.ts +40 -0
- package/dist/runtime/components/{LibDatePicker/LibDatePicker.vue → WDatePicker/WDatePicker.vue} +3 -7
- package/dist/runtime/components/WDatePicker/WDatePicker.vue.d.ts +40 -0
- package/dist/runtime/components/{LibDatePicker/LibRangeDatePicker.vue → WDatePicker/WRangeDatePicker.vue} +16 -21
- package/dist/runtime/components/{LibDatePicker/LibSingleDatePicker.vue → WDatePicker/WSingleDatePicker.vue} +16 -21
- package/dist/runtime/components/{LibDatePicker/LibTimeZonePicker.d.vue.ts → WDatePicker/WTimeZonePicker.d.vue.ts} +1 -11
- package/dist/runtime/components/{LibDatePicker/LibTimeZonePicker.vue → WDatePicker/WTimeZonePicker.vue} +5 -12
- package/dist/runtime/components/{LibDatePicker/LibTimeZonePicker.vue.d.ts → WDatePicker/WTimeZonePicker.vue.d.ts} +1 -11
- package/dist/runtime/components/{LibDebug/LibDebug.vue → WDebug/WDebug.vue} +9 -12
- package/dist/runtime/components/{LibDevOnly/LibDevOnly.d.vue.ts → WDevOnly/WDevOnly.d.vue.ts} +0 -3
- package/dist/runtime/components/{LibDevOnly/LibDevOnly.vue.d.ts → WDevOnly/WDevOnly.vue.d.ts} +0 -3
- package/dist/runtime/components/WFileInput/WFileInput.d.vue.ts +58 -0
- package/dist/runtime/components/{LibFileInput/LibFileInput.vue → WFileInput/WFileInput.vue} +71 -57
- package/dist/runtime/components/WFileInput/WFileInput.vue.d.ts +58 -0
- package/dist/runtime/components/{Icon/Icon.vue.d.ts → WIcon/WIcon.d.vue.ts} +2 -6
- package/dist/runtime/components/{Icon/Icon.vue → WIcon/WIcon.vue} +1 -1
- package/dist/runtime/components/{Icon/Icon.d.vue.ts → WIcon/WIcon.vue.d.ts} +2 -6
- package/dist/runtime/components/{LibMultiValues/LibMultiValues.d.vue.ts → WMultiValues/WMultiValues.d.vue.ts} +8 -14
- package/dist/runtime/components/WMultiValues/WMultiValues.vue +149 -0
- package/dist/runtime/components/{LibMultiValues/LibMultiValues.vue.d.ts → WMultiValues/WMultiValues.vue.d.ts} +8 -14
- package/dist/runtime/components/WNotifications/WNotification.d.vue.ts +37 -0
- package/dist/runtime/components/{LibNotifications/LibNotification.vue → WNotifications/WNotification.vue} +32 -47
- package/dist/runtime/components/WNotifications/WNotification.vue.d.ts +37 -0
- package/dist/runtime/components/WNotifications/WNotifications.d.vue.ts +11 -0
- package/dist/runtime/components/{LibNotifications/LibNotifications.vue → WNotifications/WNotifications.vue} +35 -17
- package/dist/runtime/components/WNotifications/WNotifications.vue.d.ts +11 -0
- package/dist/runtime/components/WNumberInput/WNumberInput.d.vue.ts +27 -0
- package/dist/runtime/components/WNumberInput/WNumberInput.vue +96 -0
- package/dist/runtime/components/WNumberInput/WNumberInput.vue.d.ts +27 -0
- package/dist/runtime/components/WPagination/WPagination.d.vue.ts +59 -0
- package/dist/runtime/components/WPagination/WPagination.vue +182 -0
- package/dist/runtime/components/WPagination/WPagination.vue.d.ts +59 -0
- package/dist/runtime/components/WPalette/WPalette.d.vue.ts +11 -0
- package/dist/runtime/components/{LibPalette/LibPalette.vue → WPalette/WPalette.vue} +3 -8
- package/dist/runtime/components/WPalette/WPalette.vue.d.ts +11 -0
- package/dist/runtime/components/WPopover/WPopover.d.vue.ts +43 -0
- package/dist/runtime/components/WPopover/WPopover.vue +138 -0
- package/dist/runtime/components/WPopover/WPopover.vue.d.ts +43 -0
- package/dist/runtime/components/WPopup/WPopup.d.vue.ts +41 -0
- package/dist/runtime/components/WPopup/WPopup.vue +74 -0
- package/dist/runtime/components/WPopup/WPopup.vue.d.ts +41 -0
- package/dist/runtime/components/{LibProgressBar/LibProgressBar.d.vue.ts → WProgressBar/WProgressBar.d.vue.ts} +14 -18
- package/dist/runtime/components/WProgressBar/WProgressBar.vue +150 -0
- package/dist/runtime/components/{LibProgressBar/LibProgressBar.vue.d.ts → WProgressBar/WProgressBar.vue.d.ts} +14 -18
- package/dist/runtime/components/{LibRecorder/LibRecorder.d.vue.ts → WRecorder/WRecorder.d.vue.ts} +14 -29
- package/dist/runtime/components/{LibRecorder/LibRecorder.vue → WRecorder/WRecorder.vue} +37 -36
- package/dist/runtime/components/{LibRecorder/LibRecorder.vue.d.ts → WRecorder/WRecorder.vue.d.ts} +14 -29
- package/dist/runtime/components/{LibRoot/LibRoot.d.vue.ts → WRoot/WRoot.d.vue.ts} +6 -5
- package/dist/runtime/components/{LibRoot/LibRoot.vue → WRoot/WRoot.vue} +17 -15
- package/dist/runtime/components/{LibRoot/LibRoot.vue.d.ts → WRoot/WRoot.vue.d.ts} +6 -5
- package/dist/runtime/components/{LibSimpleInput/LibSimpleInput.d.vue.ts → WSimpleInput/WSimpleInput.d.vue.ts} +9 -16
- package/dist/runtime/components/{LibSimpleInput/LibSimpleInput.vue → WSimpleInput/WSimpleInput.vue} +12 -23
- package/dist/runtime/components/{LibSimpleInput/LibSimpleInput.vue.d.ts → WSimpleInput/WSimpleInput.vue.d.ts} +9 -16
- package/dist/runtime/components/WTable/WTable.d.vue.ts +102 -0
- package/dist/runtime/components/{LibTable/LibTable.vue → WTable/WTable.vue} +13 -14
- package/dist/runtime/components/WTable/WTable.vue.d.ts +102 -0
- package/dist/runtime/components/WTooltip/WTooltip.d.vue.ts +40 -0
- package/dist/runtime/components/WTooltip/WTooltip.vue +111 -0
- package/dist/runtime/components/WTooltip/WTooltip.vue.d.ts +40 -0
- package/dist/runtime/components/index.d.ts +20 -20
- package/dist/runtime/components/index.js +20 -20
- package/dist/runtime/composables/index.d.ts +4 -4
- package/dist/runtime/composables/index.js +4 -4
- package/dist/runtime/composables/useDelayedLoadingIndicator.d.ts +9 -0
- package/dist/runtime/composables/useDelayedLoadingIndicator.js +18 -0
- package/dist/runtime/composables/useDisplayForReka.d.ts +25 -0
- package/dist/runtime/composables/useDisplayForReka.js +16 -0
- package/dist/runtime/composables/useFallbackId.d.ts +3 -0
- package/dist/runtime/composables/useFallbackId.js +5 -0
- package/dist/runtime/composables/useInjectedDarkMode.d.ts +1 -1
- package/dist/runtime/composables/usePopupConstrainToStyle.d.ts +8 -0
- package/dist/runtime/composables/usePopupConstrainToStyle.js +8 -0
- package/dist/runtime/composables/useSetupDarkMode.d.ts +2 -3
- package/dist/runtime/composables/useSetupDarkMode.js +90 -4
- package/dist/runtime/helpers/NotificationHandler.d.ts +2 -2
- package/dist/runtime/injectionKeys.d.ts +1 -5
- package/dist/runtime/injectionKeys.js +0 -2
- package/dist/runtime/types/index.d.ts +85 -27
- package/dist/runtime/types/index.js +1 -0
- package/package.json +1 -1
- package/src/module.ts +1 -1
- package/src/runtime/assets/animations.css +3 -3
- package/src/runtime/assets/locales/en.json +2 -0
- package/src/runtime/build/WitchcraftUiResolver.ts +1 -1
- package/src/runtime/components/TestControls/TestControls.vue +3 -3
- package/src/runtime/components/WButton/WButton.stories.ts +112 -0
- package/src/runtime/components/{LibButton/LibButton.vue → WButton/WButton.vue} +34 -50
- package/src/runtime/components/{LibCheckbox/LibCheckbox.stories.ts → WCheckbox/WCheckbox.stories.ts} +5 -5
- package/src/runtime/components/WCheckbox/WCheckbox.vue +123 -0
- package/src/runtime/components/{LibColorInput/LibColorInput.stories.ts → WColorInput/WColorInput.stories.ts} +8 -8
- package/src/runtime/components/WColorInput/WColorInput.vue +112 -0
- package/src/runtime/components/WColorInput/WColorSwatchButton.vue +102 -0
- package/src/runtime/components/{LibColorPicker/LibColorPicker.stories.ts → WColorPicker/WColorPicker.stories.ts} +12 -12
- package/src/runtime/components/{LibColorPicker/LibColorPicker.vue → WColorPicker/WColorPicker.vue} +43 -32
- package/src/runtime/components/WCombobox/WCombobox.stories.ts +209 -0
- package/src/runtime/components/WCombobox/WCombobox.vue +446 -0
- package/src/runtime/components/WCombobox/storyPlays.ts +92 -0
- package/src/runtime/components/{LibDarkModeSwitcher/LibDarkModeSwitcher.stories.ts → WDarkModeSwitcher/WDarkModeSwitcher.stories.ts} +6 -6
- package/src/runtime/components/{LibDarkModeSwitcher/LibDarkModeSwitcher.vue → WDarkModeSwitcher/WDarkModeSwitcher.vue} +19 -30
- package/src/runtime/components/{LibDatePicker/LibDatePicker.stories.ts → WDatePicker/WDatePicker.stories.ts} +42 -34
- package/src/runtime/components/{LibDatePicker/LibDatePicker.vue → WDatePicker/WDatePicker.vue} +3 -7
- package/src/runtime/components/{LibDatePicker/LibRangeDatePicker.vue → WDatePicker/WRangeDatePicker.vue} +16 -22
- package/src/runtime/components/{LibDatePicker/LibSingleDatePicker.vue → WDatePicker/WSingleDatePicker.vue} +16 -22
- package/src/runtime/components/{LibDatePicker/LibTimeZonePicker.vue → WDatePicker/WTimeZonePicker.vue} +5 -12
- package/src/runtime/components/{LibDebug/LibDebug.stories.ts → WDebug/WDebug.stories.ts} +5 -5
- package/src/runtime/components/{LibDebug/LibDebug.vue → WDebug/WDebug.vue} +8 -11
- package/src/runtime/components/{LibDevOnly/LibDevOnly.vue → WDevOnly/WDevOnly.vue} +0 -4
- package/src/runtime/components/{LibFileInput/LibFileInput.stories.ts → WFileInput/WFileInput.stories.ts} +7 -7
- package/src/runtime/components/{LibFileInput/LibFileInput.vue → WFileInput/WFileInput.vue} +95 -98
- package/src/runtime/components/{Icon/Icon.vue → WIcon/WIcon.vue} +5 -8
- package/src/runtime/components/{LibMultiValues/LibMultiValues.stories.ts → WMultiValues/WMultiValues.stories.ts} +9 -9
- package/src/runtime/components/WMultiValues/WMultiValues.vue +161 -0
- package/src/runtime/components/{LibNotifications/LibNotification.stories.ts → WNotifications/WNotification.stories.ts} +9 -9
- package/src/runtime/components/{LibNotifications/LibNotification.vue → WNotifications/WNotification.vue} +43 -66
- package/src/runtime/components/WNotifications/WNotifications.stories.ts +139 -0
- package/src/runtime/components/{LibNotifications/LibNotifications.vue → WNotifications/WNotifications.vue} +51 -29
- package/src/runtime/components/WNumberInput/WNumberInput.vue +109 -0
- package/src/runtime/components/WPagination/WPagination.stories.ts +51 -0
- package/src/runtime/components/WPagination/WPagination.vue +207 -0
- package/src/runtime/components/{LibPalette/LibPalette.stories.ts → WPalette/WPalette.stories.ts} +6 -6
- package/src/runtime/components/{LibPalette/LibPalette.vue → WPalette/WPalette.vue} +3 -8
- package/src/runtime/components/WPopover/WPopover.stories.ts +218 -0
- package/src/runtime/components/WPopover/WPopover.vue +161 -0
- package/src/runtime/components/WPopup/WPopup.stories.ts +60 -0
- package/src/runtime/components/WPopup/WPopup.vue +93 -0
- package/src/runtime/components/WProgressBar/WProgressBar.stories.ts +119 -0
- package/src/runtime/components/WProgressBar/WProgressBar.vue +185 -0
- package/src/runtime/components/{LibRecorder/LibRecorder.stories.ts → WRecorder/WRecorder.stories.ts} +9 -6
- package/src/runtime/components/{LibRecorder/LibRecorder.vue → WRecorder/WRecorder.vue} +69 -68
- package/src/runtime/components/{LibRoot/LibRoot.vue → WRoot/WRoot.vue} +18 -15
- package/src/runtime/components/{LibSimpleInput/LibSimpleInput.stories.ts → WSimpleInput/WSimpleInput.stories.ts} +11 -12
- package/src/runtime/components/{LibSimpleInput/LibSimpleInput.vue → WSimpleInput/WSimpleInput.vue} +27 -44
- package/src/runtime/components/{LibTable/LibTable.stories.ts → WTable/WTable.stories.ts} +60 -52
- package/src/runtime/components/{LibTable/LibTable.vue → WTable/WTable.vue} +85 -87
- package/src/runtime/components/WTooltip/WTooltip.stories.ts +82 -0
- package/src/runtime/components/WTooltip/WTooltip.vue +126 -0
- package/src/runtime/components/index.ts +20 -20
- package/src/runtime/composables/index.ts +4 -4
- package/src/runtime/composables/useDelayedLoadingIndicator.ts +30 -0
- package/src/runtime/composables/useDisplayForReka.ts +37 -0
- package/src/runtime/composables/useFallbackId.ts +6 -0
- package/src/runtime/composables/useInjectedDarkMode.ts +1 -2
- package/src/runtime/composables/usePopupConstrainToStyle.ts +29 -0
- package/src/runtime/composables/useSetupDarkMode.ts +122 -4
- package/src/runtime/helpers/NotificationHandler.ts +2 -2
- package/src/runtime/injectionKeys.ts +1 -7
- package/src/runtime/types/index.ts +105 -32
- package/types/components.d.ts +13 -15
- package/dist/runtime/components/Aria/Aria.d.vue.ts +0 -6
- package/dist/runtime/components/Aria/Aria.vue +0 -16
- package/dist/runtime/components/Aria/Aria.vue.d.ts +0 -6
- package/dist/runtime/components/LibButton/LibButton.d.vue.ts +0 -37
- package/dist/runtime/components/LibButton/LibButton.vue.d.ts +0 -37
- package/dist/runtime/components/LibCheckbox/LibCheckbox.d.vue.ts +0 -41
- package/dist/runtime/components/LibCheckbox/LibCheckbox.vue +0 -103
- package/dist/runtime/components/LibCheckbox/LibCheckbox.vue.d.ts +0 -41
- package/dist/runtime/components/LibColorInput/LibColorInput.d.vue.ts +0 -64
- package/dist/runtime/components/LibColorInput/LibColorInput.vue +0 -162
- package/dist/runtime/components/LibColorInput/LibColorInput.vue.d.ts +0 -64
- package/dist/runtime/components/LibDatePicker/LibDatePicker.d.vue.ts +0 -191
- package/dist/runtime/components/LibDatePicker/LibDatePicker.vue.d.ts +0 -191
- package/dist/runtime/components/LibFileInput/LibFileInput.d.vue.ts +0 -46
- package/dist/runtime/components/LibFileInput/LibFileInput.vue.d.ts +0 -46
- package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.d.vue.ts +0 -256
- package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.vue +0 -387
- package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.vue.d.ts +0 -256
- package/dist/runtime/components/LibLabel/LibLabel.d.vue.ts +0 -27
- package/dist/runtime/components/LibLabel/LibLabel.vue +0 -45
- package/dist/runtime/components/LibLabel/LibLabel.vue.d.ts +0 -27
- package/dist/runtime/components/LibMultiValues/LibMultiValues.vue +0 -109
- package/dist/runtime/components/LibNotifications/LibNotification.d.vue.ts +0 -45
- package/dist/runtime/components/LibNotifications/LibNotification.vue.d.ts +0 -45
- package/dist/runtime/components/LibNotifications/LibNotifications.d.vue.ts +0 -15
- package/dist/runtime/components/LibNotifications/LibNotifications.vue.d.ts +0 -15
- package/dist/runtime/components/LibPagination/LibPagination.d.vue.ts +0 -105
- package/dist/runtime/components/LibPagination/LibPagination.vue +0 -229
- package/dist/runtime/components/LibPagination/LibPagination.vue.d.ts +0 -105
- package/dist/runtime/components/LibPalette/LibPalette.d.vue.ts +0 -15
- package/dist/runtime/components/LibPalette/LibPalette.vue.d.ts +0 -15
- package/dist/runtime/components/LibPopup/LibPopup.d.vue.ts +0 -52
- package/dist/runtime/components/LibPopup/LibPopup.vue +0 -365
- package/dist/runtime/components/LibPopup/LibPopup.vue.d.ts +0 -52
- package/dist/runtime/components/LibProgressBar/LibProgressBar.vue +0 -169
- package/dist/runtime/components/LibSuggestions/LibSuggestions.d.vue.ts +0 -99
- package/dist/runtime/components/LibSuggestions/LibSuggestions.vue +0 -178
- package/dist/runtime/components/LibSuggestions/LibSuggestions.vue.d.ts +0 -99
- package/dist/runtime/components/LibTable/LibTable.d.vue.ts +0 -125
- package/dist/runtime/components/LibTable/LibTable.vue.d.ts +0 -125
- package/dist/runtime/components/Template/NAME.d.vue.ts +0 -18
- package/dist/runtime/components/Template/NAME.vue +0 -27
- package/dist/runtime/components/Template/NAME.vue.d.ts +0 -18
- package/dist/runtime/components/Template/TemplateStory.d.ts +0 -7
- package/dist/runtime/components/Template/TemplateStory.js +0 -22
- package/dist/runtime/components/shared/props.d.ts +0 -171
- package/dist/runtime/components/shared/props.js +0 -2
- package/dist/runtime/composables/useAriaLabel.d.ts +0 -6
- package/dist/runtime/composables/useAriaLabel.js +0 -15
- package/dist/runtime/composables/useDarkMode.d.ts +0 -77
- package/dist/runtime/composables/useDarkMode.js +0 -89
- package/dist/runtime/composables/useDivideAttrs.d.ts +0 -27
- package/dist/runtime/composables/useDivideAttrs.js +0 -27
- package/dist/runtime/composables/useSuggestions.d.ts +0 -40
- package/dist/runtime/composables/useSuggestions.js +0 -263
- package/src/runtime/components/Aria/Aria.vue +0 -26
- package/src/runtime/components/LibButton/LibButton.stories.ts +0 -106
- package/src/runtime/components/LibCheckbox/LibCheckbox.vue +0 -131
- package/src/runtime/components/LibColorInput/LibColorInput.vue +0 -203
- package/src/runtime/components/LibInputDeprecated/LibInputDeprecated.stories.ts +0 -405
- package/src/runtime/components/LibInputDeprecated/LibInputDeprecated.vue +0 -419
- package/src/runtime/components/LibLabel/LibLabel.stories.ts +0 -33
- package/src/runtime/components/LibLabel/LibLabel.vue +0 -65
- package/src/runtime/components/LibMultiValues/LibMultiValues.vue +0 -123
- package/src/runtime/components/LibNotifications/LibNotifications.stories.ts +0 -131
- package/src/runtime/components/LibPagination/LibPagination.stories.ts +0 -49
- package/src/runtime/components/LibPagination/LibPagination.vue +0 -274
- package/src/runtime/components/LibPopup/LibPopup.stories.ts +0 -153
- package/src/runtime/components/LibPopup/LibPopup.vue +0 -396
- package/src/runtime/components/LibProgressBar/LibProgressBar.stories.ts +0 -90
- package/src/runtime/components/LibProgressBar/LibProgressBar.vue +0 -197
- package/src/runtime/components/LibSuggestions/LibSuggestions.stories.ts +0 -134
- package/src/runtime/components/LibSuggestions/LibSuggestions.vue +0 -212
- package/src/runtime/components/Template/NAME.vue +0 -49
- package/src/runtime/components/Template/TemplateStory.ts +0 -37
- package/src/runtime/components/shared/props.ts +0 -199
- package/src/runtime/composables/useAriaLabel.ts +0 -23
- package/src/runtime/composables/useDarkMode.ts +0 -199
- package/src/runtime/composables/useDivideAttrs.ts +0 -53
- package/src/runtime/composables/useSuggestions.ts +0 -339
- /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/safeConvertToHsva.d.ts +0 -0
- /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/safeConvertToHsva.js +0 -0
- /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/safeConvertToRgba.d.ts +0 -0
- /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/safeConvertToRgba.js +0 -0
- /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/toLowPrecisionRgbaString.d.ts +0 -0
- /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/toLowPrecisionRgbaString.js +0 -0
- /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/truncate.d.ts +0 -0
- /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/truncate.js +0 -0
- /package/dist/runtime/components/{LibDatePicker/LibRangeDatePicker.d.vue.ts → WDatePicker/WRangeDatePicker.d.vue.ts} +0 -0
- /package/dist/runtime/components/{LibDatePicker/LibRangeDatePicker.vue.d.ts → WDatePicker/WRangeDatePicker.vue.d.ts} +0 -0
- /package/dist/runtime/components/{LibDatePicker/LibSingleDatePicker.d.vue.ts → WDatePicker/WSingleDatePicker.d.vue.ts} +0 -0
- /package/dist/runtime/components/{LibDatePicker/LibSingleDatePicker.vue.d.ts → WDatePicker/WSingleDatePicker.vue.d.ts} +0 -0
- /package/dist/runtime/components/{LibDatePicker → WDatePicker}/helpers.d.ts +0 -0
- /package/dist/runtime/components/{LibDatePicker → WDatePicker}/helpers.js +0 -0
- /package/dist/runtime/components/{LibDebug/LibDebug.d.vue.ts → WDebug/WDebug.d.vue.ts} +0 -0
- /package/dist/runtime/components/{LibDebug/LibDebug.vue.d.ts → WDebug/WDebug.vue.d.ts} +0 -0
- /package/dist/runtime/components/{LibDevOnly/LibDevOnly.vue → WDevOnly/WDevOnly.vue} +0 -0
- /package/dist/runtime/components/{LibNotifications/LibNotificationTestMessageComponent.d.vue.ts → WNotifications/WNotificationTestMessageComponent.d.vue.ts} +0 -0
- /package/dist/runtime/components/{LibNotifications/LibNotificationTestMessageComponent.vue → WNotifications/WNotificationTestMessageComponent.vue} +0 -0
- /package/dist/runtime/components/{LibNotifications/LibNotificationTestMessageComponent.vue.d.ts → WNotifications/WNotificationTestMessageComponent.vue.d.ts} +0 -0
- /package/dist/runtime/components/{LibNotifications → WNotifications}/calculateNotificationProgress.d.ts +0 -0
- /package/dist/runtime/components/{LibNotifications → WNotifications}/calculateNotificationProgress.js +0 -0
- /package/src/runtime/components/{LibColorPicker → WColorPicker}/utils/safeConvertToHsva.ts +0 -0
- /package/src/runtime/components/{LibColorPicker → WColorPicker}/utils/safeConvertToRgba.ts +0 -0
- /package/src/runtime/components/{LibColorPicker → WColorPicker}/utils/toLowPrecisionRgbaString.ts +0 -0
- /package/src/runtime/components/{LibColorPicker → WColorPicker}/utils/truncate.ts +0 -0
- /package/src/runtime/components/{LibDatePicker → WDatePicker}/helpers.ts +0 -0
- /package/src/runtime/components/{LibNotifications/LibNotificationTestMessageComponent.vue → WNotifications/WNotificationTestMessageComponent.vue} +0 -0
- /package/src/runtime/components/{LibNotifications → WNotifications}/calculateNotificationProgress.ts +0 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<PaginationRoot
|
|
3
|
+
:total="total"
|
|
4
|
+
:items-per-page="itemsPerPage"
|
|
5
|
+
:sibling-count="siblingCount"
|
|
6
|
+
show-edges
|
|
7
|
+
:class="twMerge(`
|
|
8
|
+
pagination--wrapper
|
|
9
|
+
flex flex-wrap items-center justify-center gap-2
|
|
10
|
+
`, $attrs.class)"
|
|
11
|
+
v-model:page="current"
|
|
12
|
+
v-bind="{ ...$attrs, class: void 0 }"
|
|
13
|
+
>
|
|
14
|
+
<PaginationList
|
|
15
|
+
v-slot="{ items }"
|
|
16
|
+
class="flex items-center gap-2 w-full"
|
|
17
|
+
>
|
|
18
|
+
<PaginationFirst
|
|
19
|
+
as-child
|
|
20
|
+
:class="`pagination--link ${pageClasses}`"
|
|
21
|
+
>
|
|
22
|
+
<a
|
|
23
|
+
:href="customRoute(route, 1).href"
|
|
24
|
+
:aria-label="t('pagination.aria.go-to-first-page')"
|
|
25
|
+
>
|
|
26
|
+
<slot name="first">
|
|
27
|
+
<i-lucide-chevrons-left class="w-4 h-4"/>
|
|
28
|
+
</slot>
|
|
29
|
+
</a>
|
|
30
|
+
</PaginationFirst>
|
|
31
|
+
|
|
32
|
+
<PaginationPrev
|
|
33
|
+
as-child
|
|
34
|
+
:class="`pagination--link ${pageClasses}`"
|
|
35
|
+
>
|
|
36
|
+
<a
|
|
37
|
+
:href="customRoute(route, current - 1).href"
|
|
38
|
+
:aria-label="t('pagination.aria.go-to-previous-page')"
|
|
39
|
+
@click="onLinkClick($event, current - 1)"
|
|
40
|
+
>
|
|
41
|
+
<slot name="prev">
|
|
42
|
+
<i-lucide-chevron-left class="w-4 h-4"/>
|
|
43
|
+
</slot>
|
|
44
|
+
</a>
|
|
45
|
+
</PaginationPrev>
|
|
46
|
+
|
|
47
|
+
<div class="pagination--spacer flex-1"/>
|
|
48
|
+
|
|
49
|
+
<template v-for="(page, index) in items">
|
|
50
|
+
<PaginationListItem
|
|
51
|
+
v-if="page.type === 'page'"
|
|
52
|
+
:value="page.value"
|
|
53
|
+
as-child
|
|
54
|
+
:key="index"
|
|
55
|
+
>
|
|
56
|
+
<a
|
|
57
|
+
:href="customRoute(route, page.value).href"
|
|
58
|
+
:aria-label="t('pagination.aria.go-to-page', { count: page.value })"
|
|
59
|
+
:class="page.value === current ? currentPageClasses : pageClasses"
|
|
60
|
+
@click="onLinkClick($event, page.value)"
|
|
61
|
+
>
|
|
62
|
+
<slot
|
|
63
|
+
name="page"
|
|
64
|
+
:value="page.value"
|
|
65
|
+
>
|
|
66
|
+
{{ page.value }}
|
|
67
|
+
</slot>
|
|
68
|
+
</a>
|
|
69
|
+
</PaginationListItem>
|
|
70
|
+
|
|
71
|
+
<!-- @vue-expect-error index is a prop... -->
|
|
72
|
+
<PaginationEllipsis
|
|
73
|
+
v-else
|
|
74
|
+
:index="index"
|
|
75
|
+
class="pagination--page-fill flex items-center justify-center w-8 h-8"
|
|
76
|
+
:key="page.type"
|
|
77
|
+
>
|
|
78
|
+
...
|
|
79
|
+
</PaginationEllipsis>
|
|
80
|
+
</template>
|
|
81
|
+
|
|
82
|
+
<div class="pagination--spacer flex-1"/>
|
|
83
|
+
|
|
84
|
+
<PaginationNext
|
|
85
|
+
as-child
|
|
86
|
+
:class="`pagination--link ${pageClasses}`"
|
|
87
|
+
>
|
|
88
|
+
<a
|
|
89
|
+
:href="customRoute(route, current + 1).href"
|
|
90
|
+
:aria-label="t('pagination.aria.go-to-next-page')"
|
|
91
|
+
@click="onLinkClick($event, current + 1)"
|
|
92
|
+
>
|
|
93
|
+
<slot name="next">
|
|
94
|
+
<i-lucide-chevron-right class="w-4 h-4"/>
|
|
95
|
+
</slot>
|
|
96
|
+
</a>
|
|
97
|
+
</PaginationNext>
|
|
98
|
+
|
|
99
|
+
<PaginationLast
|
|
100
|
+
as-child
|
|
101
|
+
:class="`pagination--link ${pageClasses}`"
|
|
102
|
+
>
|
|
103
|
+
<a
|
|
104
|
+
:href="customRoute(route, Math.ceil(total / itemsPerPage)).href"
|
|
105
|
+
:aria-label="t('pagination.aria.go-to-last-page')"
|
|
106
|
+
@click="onLinkClick($event, Math.ceil(total / itemsPerPage))"
|
|
107
|
+
>
|
|
108
|
+
<slot name="last">
|
|
109
|
+
<i-lucide-chevrons-right class="w-4 h-4"/>
|
|
110
|
+
</slot>
|
|
111
|
+
</a>
|
|
112
|
+
</PaginationLast>
|
|
113
|
+
</PaginationList>
|
|
114
|
+
</PaginationRoot>
|
|
115
|
+
</template>
|
|
116
|
+
|
|
117
|
+
<script setup>
|
|
118
|
+
import {
|
|
119
|
+
PaginationEllipsis,
|
|
120
|
+
PaginationFirst,
|
|
121
|
+
PaginationLast,
|
|
122
|
+
PaginationList,
|
|
123
|
+
PaginationListItem,
|
|
124
|
+
PaginationNext,
|
|
125
|
+
PaginationPrev,
|
|
126
|
+
PaginationRoot
|
|
127
|
+
} from "reka-ui";
|
|
128
|
+
import { useAttrs } from "vue";
|
|
129
|
+
import ILucideChevronLeft from "~icons/lucide/chevron-left";
|
|
130
|
+
import ILucideChevronRight from "~icons/lucide/chevron-right";
|
|
131
|
+
import ILucideChevronsLeft from "~icons/lucide/chevrons-left";
|
|
132
|
+
import ILucideChevronsRight from "~icons/lucide/chevrons-right";
|
|
133
|
+
import { useInjectedI18n } from "../../composables/useInjectedI18n.js";
|
|
134
|
+
import { twMerge } from "../../utils/twMerge.js";
|
|
135
|
+
defineOptions({
|
|
136
|
+
name: "WPagination",
|
|
137
|
+
inheritAttrs: false
|
|
138
|
+
});
|
|
139
|
+
const t = useInjectedI18n();
|
|
140
|
+
const $attrs = useAttrs();
|
|
141
|
+
const props = defineProps({
|
|
142
|
+
defaultPage: { type: Number, required: false, default: 1 },
|
|
143
|
+
siblingCount: { type: Number, required: false, default: 1 },
|
|
144
|
+
itemsPerPage: { type: Number, required: true, default: 1 },
|
|
145
|
+
route: { type: String, required: true },
|
|
146
|
+
customRoute: { type: Function, required: false, default: (route = "", i) => {
|
|
147
|
+
if (i <= 1) return { href: route, i: 1 };
|
|
148
|
+
return { href: `${route}${i}`, i };
|
|
149
|
+
} },
|
|
150
|
+
total: { type: Number, required: true }
|
|
151
|
+
});
|
|
152
|
+
const current = defineModel("current", { type: Number, ...{ required: true } });
|
|
153
|
+
const emit = defineEmits(["link-click"]);
|
|
154
|
+
function onLinkClick(event, pageNum) {
|
|
155
|
+
const routeInfo = props.customRoute(props.route, pageNum);
|
|
156
|
+
emit("link-click", event, routeInfo);
|
|
157
|
+
}
|
|
158
|
+
const commonClasses = `
|
|
159
|
+
flex
|
|
160
|
+
items-center
|
|
161
|
+
justify-center
|
|
162
|
+
w-8
|
|
163
|
+
h-8
|
|
164
|
+
focus-outline
|
|
165
|
+
border-b-2
|
|
166
|
+
border-transparent
|
|
167
|
+
transition-all
|
|
168
|
+
outlined:rounded-sm
|
|
169
|
+
`;
|
|
170
|
+
const pageClasses = `
|
|
171
|
+
${commonClasses}
|
|
172
|
+
focus-outline
|
|
173
|
+
hover:text-accent-600
|
|
174
|
+
hover:border-b-accent-500
|
|
175
|
+
hover:scale-125
|
|
176
|
+
`;
|
|
177
|
+
const currentPageClasses = `
|
|
178
|
+
${commonClasses}
|
|
179
|
+
border-b-accent-500
|
|
180
|
+
scale-125
|
|
181
|
+
`;
|
|
182
|
+
</script>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type PaginationRootProps } from "reka-ui";
|
|
2
|
+
import { type HTMLAttributes } from "vue";
|
|
3
|
+
import type { TailwindClassProp } from "../../types/index.js";
|
|
4
|
+
type __VLS_Props = /** @vue-ignore */ Omit<HTMLAttributes, "class"> & /** @vue-ignore */ TailwindClassProp & Pick<PaginationRootProps, "defaultPage" | "siblingCount" | "itemsPerPage"> & {
|
|
5
|
+
route: string;
|
|
6
|
+
customRoute?: (route: string, i: number) => {
|
|
7
|
+
i: number;
|
|
8
|
+
href: string;
|
|
9
|
+
};
|
|
10
|
+
total: number;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_ModelProps = {
|
|
13
|
+
"current": number;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
16
|
+
declare var __VLS_20: {}, __VLS_33: {}, __VLS_46: {
|
|
17
|
+
value: number;
|
|
18
|
+
}, __VLS_60: {}, __VLS_73: {};
|
|
19
|
+
type __VLS_Slots = {} & {
|
|
20
|
+
first?: (props: typeof __VLS_20) => any;
|
|
21
|
+
} & {
|
|
22
|
+
prev?: (props: typeof __VLS_33) => any;
|
|
23
|
+
} & {
|
|
24
|
+
page?: (props: typeof __VLS_46) => any;
|
|
25
|
+
} & {
|
|
26
|
+
next?: (props: typeof __VLS_60) => any;
|
|
27
|
+
} & {
|
|
28
|
+
last?: (props: typeof __VLS_73) => any;
|
|
29
|
+
};
|
|
30
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
|
+
"update:current": (value: number) => any;
|
|
32
|
+
} & {
|
|
33
|
+
"link-click": (event: MouseEvent, payload: {
|
|
34
|
+
i: number;
|
|
35
|
+
href: string;
|
|
36
|
+
}) => any;
|
|
37
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
38
|
+
"onLink-click"?: ((event: MouseEvent, payload: {
|
|
39
|
+
i: number;
|
|
40
|
+
href: string;
|
|
41
|
+
}) => any) | undefined;
|
|
42
|
+
"onUpdate:current"?: ((value: number) => any) | undefined;
|
|
43
|
+
}>, {
|
|
44
|
+
defaultPage: number;
|
|
45
|
+
siblingCount: number;
|
|
46
|
+
itemsPerPage: number;
|
|
47
|
+
customRoute: (route: string, i: number) => {
|
|
48
|
+
i: number;
|
|
49
|
+
href: string;
|
|
50
|
+
};
|
|
51
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
52
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
53
|
+
declare const _default: typeof __VLS_export;
|
|
54
|
+
export default _default;
|
|
55
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
56
|
+
new (): {
|
|
57
|
+
$slots: S;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Theme } from "metamorphosis";
|
|
2
|
+
import type { BaseInteractiveProps } from "../../types/index.js";
|
|
3
|
+
type __VLS_Props = BaseInteractiveProps & {
|
|
4
|
+
theme?: Theme;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
+
theme: Theme;
|
|
8
|
+
border: boolean;
|
|
9
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -25,18 +25,13 @@
|
|
|
25
25
|
</div>
|
|
26
26
|
</template>
|
|
27
27
|
|
|
28
|
-
<script>
|
|
29
|
-
export default { name: "LibPalette" };
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
28
|
<script setup>
|
|
33
29
|
import { keys } from "@alanscodelog/utils/keys";
|
|
34
30
|
const props = defineProps({
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
readonly: { type: Boolean, required: false, default: false },
|
|
31
|
+
disabled: { type: Boolean, required: false },
|
|
32
|
+
readonly: { type: Boolean, required: false },
|
|
38
33
|
border: { type: Boolean, required: false, default: true },
|
|
39
|
-
unstyle: { type: Boolean, required: false
|
|
34
|
+
unstyle: { type: Boolean, required: false },
|
|
40
35
|
theme: { type: Object, required: false, default: () => ({}) }
|
|
41
36
|
});
|
|
42
37
|
const exclude = ["--color-bg", "--color-fg"];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Theme } from "metamorphosis";
|
|
2
|
+
import type { BaseInteractiveProps } from "../../types/index.js";
|
|
3
|
+
type __VLS_Props = BaseInteractiveProps & {
|
|
4
|
+
theme?: Theme;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
+
theme: Theme;
|
|
8
|
+
border: boolean;
|
|
9
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type DialogContentEmits, type DialogRootEmits, type PopoverContentProps, type PopoverRootProps } from "reka-ui";
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import type { EmitsToProps, PopupConstrainToProps, TailwindClassProp } from "../../types/index.js";
|
|
4
|
+
type __VLS_Props = PopupConstrainToProps & {
|
|
5
|
+
backdropClass?: string;
|
|
6
|
+
showBackdrop?: boolean;
|
|
7
|
+
animationDirection?: "use-side" | "use-align" | "left" | "right" | "up" | "down";
|
|
8
|
+
/** Overrides teleport target. */
|
|
9
|
+
to?: string;
|
|
10
|
+
/** Overrides reka-ui's PopoverRootProps */
|
|
11
|
+
rootProps?: PopoverRootProps & EmitsToProps<DialogRootEmits> & Omit<HTMLAttributes, "class"> & TailwindClassProp;
|
|
12
|
+
/** Overrides reka-ui's PopoverContentProps */
|
|
13
|
+
contentProps?: PopoverContentProps & EmitsToProps<DialogContentEmits> & Omit<HTMLAttributes, "class"> & TailwindClassProp;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_ModelProps = {
|
|
16
|
+
modelValue?: boolean;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
19
|
+
declare var __VLS_14: {}, __VLS_34: {};
|
|
20
|
+
type __VLS_Slots = {} & {
|
|
21
|
+
button?: (props: typeof __VLS_14) => any;
|
|
22
|
+
} & {
|
|
23
|
+
popover?: (props: typeof __VLS_34) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
+
"update:modelValue": (value: boolean) => any;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
28
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
constrainWidthTo: number | "trigger" | "available" | string | null;
|
|
31
|
+
constrainHeightTo: number | "trigger" | "available" | string | null;
|
|
32
|
+
showBackdrop: boolean;
|
|
33
|
+
animationDirection: "use-side" | "use-align" | "left" | "right" | "up" | "down";
|
|
34
|
+
to: string;
|
|
35
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<PopoverRoot
|
|
3
|
+
v-model:open="modelValue"
|
|
4
|
+
v-bind="rootProps"
|
|
5
|
+
>
|
|
6
|
+
<PopoverAnchor
|
|
7
|
+
v-if="$slots.button"
|
|
8
|
+
as-child
|
|
9
|
+
>
|
|
10
|
+
<slot name="button"/>
|
|
11
|
+
</PopoverAnchor>
|
|
12
|
+
|
|
13
|
+
<PopoverPortal :to="to">
|
|
14
|
+
<transition>
|
|
15
|
+
<div
|
|
16
|
+
v-if="showBackdrop && modelValue"
|
|
17
|
+
:class="twMerge(`popup--backdrop absolute inset-0 bg-black/50`, backdropClass)"
|
|
18
|
+
@click="modelValue = false"
|
|
19
|
+
/>
|
|
20
|
+
</transition>
|
|
21
|
+
|
|
22
|
+
<PopoverContent
|
|
23
|
+
v-bind="{
|
|
24
|
+
disableOutsidePointerEvents: false,
|
|
25
|
+
side: 'bottom',
|
|
26
|
+
sideFlip: true,
|
|
27
|
+
align: 'center',
|
|
28
|
+
sideOffset: 0,
|
|
29
|
+
alignOffset: 0,
|
|
30
|
+
avoidCollisions: true,
|
|
31
|
+
prioritizePosition: false,
|
|
32
|
+
sticky: 'always',
|
|
33
|
+
collisionPadding: 10,
|
|
34
|
+
positionStrategy: 'absolute',
|
|
35
|
+
...contentProps,
|
|
36
|
+
style: void 0
|
|
37
|
+
}"
|
|
38
|
+
:style="contentStyle"
|
|
39
|
+
:class="twMerge(
|
|
40
|
+
`
|
|
41
|
+
popup--content-wrapper
|
|
42
|
+
focus:outline-none
|
|
43
|
+
overflow-auto
|
|
44
|
+
scrollbar-hidden
|
|
45
|
+
`,
|
|
46
|
+
animationDirection === `use-side` && `
|
|
47
|
+
data-[side=top]:animate-slideInUp
|
|
48
|
+
data-[side=bottom]:animate-slideInDown
|
|
49
|
+
data-[side=left]:animate-slideInLeft
|
|
50
|
+
data-[side=right]:animate-slideInRight
|
|
51
|
+
`,
|
|
52
|
+
animationDirection === `use-align` && (contentProps?.side === 'top' || contentProps?.side === 'bottom' || !contentProps?.side) && `
|
|
53
|
+
data-[align=start]:animate-slideInLeft
|
|
54
|
+
data-[align=end]:animate-slideInRight
|
|
55
|
+
data-[align=center]:animate-contentShow
|
|
56
|
+
`,
|
|
57
|
+
animationDirection === `use-align` && (contentProps?.side === 'left' || contentProps?.side === 'right' || !contentProps?.side) && `
|
|
58
|
+
data-[align=start]:animate-slideInDown
|
|
59
|
+
data-[align=end]:animate-slideInUp
|
|
60
|
+
data-[align=center]:animate-contentShow
|
|
61
|
+
`,
|
|
62
|
+
animationDirection === `left` && `
|
|
63
|
+
animate-slideInLeft
|
|
64
|
+
`,
|
|
65
|
+
animationDirection === `right` && `
|
|
66
|
+
animate-slideInRight
|
|
67
|
+
`,
|
|
68
|
+
animationDirection === `up` && `
|
|
69
|
+
data-[side=top]:animate-slideInUp
|
|
70
|
+
`,
|
|
71
|
+
animationDirection === `down` && `
|
|
72
|
+
animate-slideInDown
|
|
73
|
+
`,
|
|
74
|
+
contentProps?.class
|
|
75
|
+
)"
|
|
76
|
+
>
|
|
77
|
+
<div
|
|
78
|
+
:class="twMerge(`
|
|
79
|
+
popup--content
|
|
80
|
+
flex
|
|
81
|
+
flex-col
|
|
82
|
+
bg-neutral-50
|
|
83
|
+
dark:bg-neutral-900
|
|
84
|
+
rounded-sm
|
|
85
|
+
p-2
|
|
86
|
+
text-sm
|
|
87
|
+
shadow-sm
|
|
88
|
+
shadow-black/30
|
|
89
|
+
border
|
|
90
|
+
border-black/30
|
|
91
|
+
whitespace-pre-wrap
|
|
92
|
+
overflow-auto
|
|
93
|
+
`)"
|
|
94
|
+
>
|
|
95
|
+
<slot name="popover"/>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
<PopoverArrow
|
|
99
|
+
class="
|
|
100
|
+
-mt-px
|
|
101
|
+
fill-neutral-50
|
|
102
|
+
dark:fill-neutral-800
|
|
103
|
+
drop-shadow-[0_2px_1px_rgba(0,0,0,0.3)]
|
|
104
|
+
relative
|
|
105
|
+
"
|
|
106
|
+
/>
|
|
107
|
+
</PopoverContent>
|
|
108
|
+
</PopoverPortal>
|
|
109
|
+
</PopoverRoot>
|
|
110
|
+
</template>
|
|
111
|
+
|
|
112
|
+
<script setup>
|
|
113
|
+
import {
|
|
114
|
+
PopoverAnchor,
|
|
115
|
+
PopoverArrow,
|
|
116
|
+
PopoverContent,
|
|
117
|
+
PopoverPortal,
|
|
118
|
+
PopoverRoot
|
|
119
|
+
} from "reka-ui";
|
|
120
|
+
import { usePopupConstrainToStyle } from "../../composables/usePopupConstrainToStyle.js";
|
|
121
|
+
import { twMerge } from "../../utils/twMerge.js";
|
|
122
|
+
defineOptions({
|
|
123
|
+
name: "WPopup",
|
|
124
|
+
inheritAttrs: false
|
|
125
|
+
});
|
|
126
|
+
const props = defineProps({
|
|
127
|
+
constrainWidthTo: { type: [Number, String, null], required: false, default: 400 },
|
|
128
|
+
constrainHeightTo: { type: [Number, String, null], required: false, default: "available" },
|
|
129
|
+
backdropClass: { type: String, required: false },
|
|
130
|
+
showBackdrop: { type: Boolean, required: false, default: false },
|
|
131
|
+
animationDirection: { type: String, required: false, default: "use-side" },
|
|
132
|
+
to: { type: String, required: false, default: "#root" },
|
|
133
|
+
rootProps: { type: Object, required: false },
|
|
134
|
+
contentProps: { type: Object, required: false }
|
|
135
|
+
});
|
|
136
|
+
const modelValue = defineModel({ type: Boolean, ...{ default: false } });
|
|
137
|
+
const contentStyle = usePopupConstrainToStyle("popover", props, [props?.contentProps?.style]);
|
|
138
|
+
</script>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type DialogContentEmits, type DialogRootEmits, type PopoverContentProps, type PopoverRootProps } from "reka-ui";
|
|
2
|
+
import type { HTMLAttributes } from "vue";
|
|
3
|
+
import type { EmitsToProps, PopupConstrainToProps, TailwindClassProp } from "../../types/index.js";
|
|
4
|
+
type __VLS_Props = PopupConstrainToProps & {
|
|
5
|
+
backdropClass?: string;
|
|
6
|
+
showBackdrop?: boolean;
|
|
7
|
+
animationDirection?: "use-side" | "use-align" | "left" | "right" | "up" | "down";
|
|
8
|
+
/** Overrides teleport target. */
|
|
9
|
+
to?: string;
|
|
10
|
+
/** Overrides reka-ui's PopoverRootProps */
|
|
11
|
+
rootProps?: PopoverRootProps & EmitsToProps<DialogRootEmits> & Omit<HTMLAttributes, "class"> & TailwindClassProp;
|
|
12
|
+
/** Overrides reka-ui's PopoverContentProps */
|
|
13
|
+
contentProps?: PopoverContentProps & EmitsToProps<DialogContentEmits> & Omit<HTMLAttributes, "class"> & TailwindClassProp;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_ModelProps = {
|
|
16
|
+
modelValue?: boolean;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
19
|
+
declare var __VLS_14: {}, __VLS_34: {};
|
|
20
|
+
type __VLS_Slots = {} & {
|
|
21
|
+
button?: (props: typeof __VLS_14) => any;
|
|
22
|
+
} & {
|
|
23
|
+
popover?: (props: typeof __VLS_34) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
+
"update:modelValue": (value: boolean) => any;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
28
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
constrainWidthTo: number | "trigger" | "available" | string | null;
|
|
31
|
+
constrainHeightTo: number | "trigger" | "available" | string | null;
|
|
32
|
+
showBackdrop: boolean;
|
|
33
|
+
animationDirection: "use-side" | "use-align" | "left" | "right" | "up" | "down";
|
|
34
|
+
to: string;
|
|
35
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { DialogContentEmits, DialogContentProps, DialogRootEmits, DialogRootProps } from "reka-ui";
|
|
2
|
+
import type { EmitsToProps, HTMLAttributes } from "vue";
|
|
3
|
+
import type { TailwindClassProp } from "../../types/index.js";
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
backdropClass?: string;
|
|
6
|
+
/** Overrides reka-ui's DialogContentProps */
|
|
7
|
+
contentProps?: DialogContentProps & EmitsToProps<DialogContentEmits> & Omit<HTMLAttributes, "class"> & TailwindClassProp;
|
|
8
|
+
/** Overrides reka-ui's DialogRootProps */
|
|
9
|
+
rootProps?: DialogRootProps & EmitsToProps<DialogRootEmits> & Omit<HTMLAttributes, "class"> & TailwindClassProp;
|
|
10
|
+
/** Overrides teleport target. */
|
|
11
|
+
to?: string;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_ModelProps = {
|
|
14
|
+
modelValue?: boolean;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
17
|
+
declare var __VLS_14: {}, __VLS_28: {
|
|
18
|
+
class: string;
|
|
19
|
+
}, __VLS_36: {};
|
|
20
|
+
type __VLS_Slots = {} & {
|
|
21
|
+
button?: (props: typeof __VLS_14) => any;
|
|
22
|
+
} & {
|
|
23
|
+
backdrop?: (props: typeof __VLS_28) => any;
|
|
24
|
+
} & {
|
|
25
|
+
popup?: (props: typeof __VLS_36) => any;
|
|
26
|
+
};
|
|
27
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
28
|
+
"update:modelValue": (value: boolean) => any;
|
|
29
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
30
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
to: string;
|
|
33
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
|
+
declare const _default: typeof __VLS_export;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<DialogRoot
|
|
3
|
+
v-bind="rootProps"
|
|
4
|
+
v-model:open="modelValue"
|
|
5
|
+
>
|
|
6
|
+
<DialogTrigger
|
|
7
|
+
v-if="$slots.button"
|
|
8
|
+
as-child
|
|
9
|
+
>
|
|
10
|
+
<slot name="button"/>
|
|
11
|
+
</DialogTrigger>
|
|
12
|
+
|
|
13
|
+
<DialogPortal :to="to">
|
|
14
|
+
<DialogOverlay
|
|
15
|
+
as-child
|
|
16
|
+
>
|
|
17
|
+
<slot
|
|
18
|
+
name="backdrop"
|
|
19
|
+
class="popup--backdrop absolute inset-0 bg-black/50"
|
|
20
|
+
>
|
|
21
|
+
<div
|
|
22
|
+
class="popup--backdrop absolute inset-0 bg-black/50"
|
|
23
|
+
/>
|
|
24
|
+
</slot>
|
|
25
|
+
</DialogOverlay>
|
|
26
|
+
|
|
27
|
+
<DialogContent
|
|
28
|
+
v-bind="{ ...contentProps, class: void 0 }"
|
|
29
|
+
:class="twMerge(`
|
|
30
|
+
popup--content-wrapper
|
|
31
|
+
z-100
|
|
32
|
+
focus:outline-none
|
|
33
|
+
fixed
|
|
34
|
+
top-1/2
|
|
35
|
+
left-1/2
|
|
36
|
+
-translate-x-1/2
|
|
37
|
+
-translate-y-1/2
|
|
38
|
+
animate-contentShow
|
|
39
|
+
max-w-[100dvw]
|
|
40
|
+
max-h-[100dvh]
|
|
41
|
+
overflow-auto
|
|
42
|
+
scrollbar-hidden
|
|
43
|
+
p-5
|
|
44
|
+
`, contentProps?.class)"
|
|
45
|
+
>
|
|
46
|
+
<div
|
|
47
|
+
:class="twMerge(`
|
|
48
|
+
popup--content
|
|
49
|
+
flex
|
|
50
|
+
flex-col
|
|
51
|
+
bg-neutral-100
|
|
52
|
+
dark:bg-neutral-800
|
|
53
|
+
rounded-md
|
|
54
|
+
`)"
|
|
55
|
+
>
|
|
56
|
+
<slot name="popup"/>
|
|
57
|
+
</div>
|
|
58
|
+
</DialogContent>
|
|
59
|
+
</DialogPortal>
|
|
60
|
+
</DialogRoot>
|
|
61
|
+
</template>
|
|
62
|
+
|
|
63
|
+
<script setup>
|
|
64
|
+
import { DialogContent, DialogOverlay, DialogPortal, DialogRoot, DialogTrigger } from "reka-ui";
|
|
65
|
+
import { twMerge } from "../../utils/twMerge.js";
|
|
66
|
+
defineOptions({ name: "WPopup", inheritAttrs: false });
|
|
67
|
+
defineProps({
|
|
68
|
+
backdropClass: { type: String, required: false },
|
|
69
|
+
contentProps: { type: Object, required: false },
|
|
70
|
+
rootProps: { type: Object, required: false },
|
|
71
|
+
to: { type: String, required: false, default: "#root" }
|
|
72
|
+
});
|
|
73
|
+
const modelValue = defineModel({ type: Boolean, ...{ default: false } });
|
|
74
|
+
</script>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { DialogContentEmits, DialogContentProps, DialogRootEmits, DialogRootProps } from "reka-ui";
|
|
2
|
+
import type { EmitsToProps, HTMLAttributes } from "vue";
|
|
3
|
+
import type { TailwindClassProp } from "../../types/index.js";
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
backdropClass?: string;
|
|
6
|
+
/** Overrides reka-ui's DialogContentProps */
|
|
7
|
+
contentProps?: DialogContentProps & EmitsToProps<DialogContentEmits> & Omit<HTMLAttributes, "class"> & TailwindClassProp;
|
|
8
|
+
/** Overrides reka-ui's DialogRootProps */
|
|
9
|
+
rootProps?: DialogRootProps & EmitsToProps<DialogRootEmits> & Omit<HTMLAttributes, "class"> & TailwindClassProp;
|
|
10
|
+
/** Overrides teleport target. */
|
|
11
|
+
to?: string;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_ModelProps = {
|
|
14
|
+
modelValue?: boolean;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
17
|
+
declare var __VLS_14: {}, __VLS_28: {
|
|
18
|
+
class: string;
|
|
19
|
+
}, __VLS_36: {};
|
|
20
|
+
type __VLS_Slots = {} & {
|
|
21
|
+
button?: (props: typeof __VLS_14) => any;
|
|
22
|
+
} & {
|
|
23
|
+
backdrop?: (props: typeof __VLS_28) => any;
|
|
24
|
+
} & {
|
|
25
|
+
popup?: (props: typeof __VLS_36) => any;
|
|
26
|
+
};
|
|
27
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
28
|
+
"update:modelValue": (value: boolean) => any;
|
|
29
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
30
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
to: string;
|
|
33
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
|
+
declare const _default: typeof __VLS_export;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|