@wikicasa-dev/components 3.0.0-alpha.0 → 3.0.0-alpha.3
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/UIKit/AccessibleSelect.d.ts +64 -0
- package/dist/UIKit/AccessibleSelect.js +4 -0
- package/dist/UIKit/AccessibleSelect.vue.js +217 -0
- package/dist/UIKit/Accordion/AccordionContentPrimitive.d.ts +17 -0
- package/dist/UIKit/Accordion/AccordionContentPrimitive.js +4 -0
- package/dist/UIKit/Accordion/AccordionContentPrimitive.vue.js +23 -0
- package/dist/UIKit/Accordion/AccordionHeaderPrimitive.d.ts +12 -0
- package/dist/UIKit/Accordion/AccordionHeaderPrimitive.js +4 -0
- package/dist/UIKit/Accordion/AccordionHeaderPrimitive.vue.js +22 -0
- package/dist/UIKit/Accordion/AccordionItemPrimitive.d.ts +21 -0
- package/dist/UIKit/Accordion/AccordionItemPrimitive.js +4 -0
- package/dist/UIKit/Accordion/AccordionItemPrimitive.vue.js +25 -0
- package/dist/UIKit/Accordion/AccordionTriggerPrimitive.d.ts +14 -0
- package/dist/UIKit/Accordion/AccordionTriggerPrimitive.js +4 -0
- package/dist/UIKit/Accordion/AccordionTriggerPrimitive.vue.js +23 -0
- package/dist/UIKit/Accordion/BaseAccordion.d.ts +44 -0
- package/dist/UIKit/Accordion/BaseAccordion.js +4 -0
- package/dist/UIKit/Accordion/BaseAccordion.vue.js +51 -0
- package/dist/UIKit/Accordion/BaseAccordionItem.d.ts +33 -0
- package/dist/UIKit/Accordion/BaseAccordionItem.js +4 -0
- package/dist/UIKit/Accordion/BaseAccordionItem.vue.js +71 -0
- package/dist/UIKit/Autocomplete/ClearableAutocomplete.d.ts +77 -0
- package/dist/UIKit/Autocomplete/ClearableAutocomplete.js +4 -0
- package/dist/UIKit/Autocomplete/ClearableAutocomplete.vue.js +270 -0
- package/dist/UIKit/BaseAlert.d.ts +24 -0
- package/dist/UIKit/BaseAlert.js +4 -0
- package/dist/UIKit/BaseAlert.vue.js +14 -0
- package/dist/UIKit/BaseAutocomplete.d.ts +62 -0
- package/dist/UIKit/BaseAutocomplete.js +4 -0
- package/dist/UIKit/BaseAutocomplete.vue.js +192 -0
- package/dist/UIKit/BaseBadge.d.ts +20 -0
- package/dist/UIKit/BaseBadge.js +4 -0
- package/dist/UIKit/BaseBadge.vue.js +17 -0
- package/dist/UIKit/BaseBreadcrumb.d.ts +34 -0
- package/dist/UIKit/BaseBreadcrumb.js +4 -0
- package/dist/UIKit/BaseBreadcrumb.vue.js +39 -0
- package/dist/UIKit/BaseButton.d.ts +75 -0
- package/dist/UIKit/BaseButton.js +4 -0
- package/dist/UIKit/BaseButton.vue.js +90 -0
- package/dist/UIKit/BaseComplexToggle.d.ts +54 -0
- package/dist/UIKit/BaseComplexToggle.js +5 -0
- package/dist/UIKit/BaseComplexToggle.vue.js +77 -0
- package/dist/UIKit/BaseDropDown.d.ts +95 -0
- package/dist/UIKit/BaseDropDown.js +4 -0
- package/dist/UIKit/BaseDropDown.vue.js +171 -0
- package/dist/UIKit/BaseFloatingLabel.d.ts +24 -0
- package/dist/UIKit/BaseFloatingLabel.js +5 -0
- package/dist/UIKit/BaseFloatingLabel.vue.js +43 -0
- package/dist/UIKit/BaseInput.d.ts +63 -0
- package/dist/UIKit/BaseInput.js +5 -0
- package/dist/UIKit/BaseInput.vue.js +191 -0
- package/dist/UIKit/BaseModal.d.ts +72 -0
- package/dist/UIKit/BaseModal.js +4 -0
- package/dist/UIKit/BaseModal.vue.js +161 -0
- package/dist/UIKit/{BasePagination.vue.d.ts → BasePagination.d.ts} +13 -5
- package/dist/UIKit/BasePagination.js +4 -0
- package/dist/UIKit/BasePagination.vue.js +199 -0
- package/dist/UIKit/BaseSelect/SelectItem.d.ts +47 -0
- package/dist/UIKit/BaseSelect/SelectItem.js +4 -0
- package/dist/UIKit/BaseSelect/SelectItem.vue.js +38 -0
- package/dist/UIKit/{BaseSlider.vue.d.ts → BaseSlider.d.ts} +6 -7
- package/dist/UIKit/BaseSlider.js +5 -0
- package/dist/UIKit/BaseSlider.vue.js +152 -0
- package/dist/UIKit/BaseSnackbar.d.ts +64 -0
- package/dist/UIKit/BaseSnackbar.js +4 -0
- package/dist/UIKit/BaseSnackbar.vue.js +140 -0
- package/dist/UIKit/{BaseTextarea.vue.d.ts → BaseTextarea.d.ts} +10 -10
- package/dist/UIKit/BaseTextarea.js +5 -0
- package/dist/UIKit/BaseTextarea.vue.js +118 -0
- package/dist/UIKit/BaseToggle.d.ts +30 -0
- package/dist/UIKit/BaseToggle.js +4 -0
- package/dist/UIKit/BaseToggle.vue.js +37 -0
- package/dist/UIKit/BaseTooltip.d.ts +37 -0
- package/dist/UIKit/BaseTooltip.js +5 -0
- package/dist/UIKit/BaseTooltip.vue.js +31 -0
- package/dist/UIKit/BaseUploadFile.d.ts +40 -0
- package/dist/UIKit/BaseUploadFile.js +4 -0
- package/dist/UIKit/BaseUploadFile.vue.js +63 -0
- package/dist/UIKit/Card/BaseCard.d.ts +25 -0
- package/dist/UIKit/Card/BaseCard.js +4 -0
- package/dist/UIKit/Card/BaseCard.vue.js +24 -0
- package/dist/UIKit/Card/CardDescriptionPrimitive.d.ts +15 -0
- package/dist/UIKit/Card/CardDescriptionPrimitive.js +9 -0
- package/dist/UIKit/Card/CardImagePrimitive.d.ts +15 -0
- package/dist/UIKit/Card/CardImagePrimitive.js +4 -0
- package/dist/UIKit/Card/CardImagePrimitive.vue.js +11 -0
- package/dist/UIKit/Card/CardRootPrimitive.d.ts +20 -0
- package/dist/UIKit/Card/CardRootPrimitive.js +4 -0
- package/dist/UIKit/Card/CardRootPrimitive.vue.js +23 -0
- package/dist/UIKit/Card/type.d.ts +3 -0
- package/dist/UIKit/Card/type.js +3 -0
- package/dist/UIKit/Checkbox/CheckboxBtn.d.ts +52 -0
- package/dist/UIKit/Checkbox/CheckboxBtn.js +4 -0
- package/dist/UIKit/Checkbox/CheckboxBtn.vue.js +76 -0
- package/dist/UIKit/Checkbox/CheckboxGroup.d.ts +74 -0
- package/dist/UIKit/Checkbox/CheckboxGroup.js +4 -0
- package/dist/UIKit/Checkbox/CheckboxGroup.vue.js +131 -0
- package/dist/UIKit/Checkbox/v2/CheckboxButtonGroup.d.ts +45 -0
- package/dist/UIKit/Checkbox/v2/CheckboxButtonGroup.js +4 -0
- package/dist/UIKit/Checkbox/v2/CheckboxButtonGroup.vue.js +55 -0
- package/dist/UIKit/Checkbox/v2/CheckboxGroupItemPrimitive.d.ts +31 -0
- package/dist/UIKit/Checkbox/v2/CheckboxGroupItemPrimitive.js +4 -0
- package/dist/UIKit/Checkbox/v2/CheckboxGroupItemPrimitive.vue.js +37 -0
- package/dist/UIKit/Checkbox/v2/CheckboxGroupPrimitive.d.ts +26 -0
- package/dist/UIKit/Checkbox/v2/CheckboxGroupPrimitive.js +4 -0
- package/dist/UIKit/Checkbox/v2/CheckboxGroupPrimitive.vue.js +38 -0
- package/dist/UIKit/ProgressBar/ProgressIndicatorPrimitive.d.ts +4 -0
- package/dist/UIKit/ProgressBar/ProgressIndicatorPrimitive.js +4 -0
- package/dist/UIKit/ProgressBar/ProgressIndicatorPrimitive.vue.js +19 -0
- package/dist/UIKit/ProgressBar/ProgressRootPrimitive.d.ts +90 -0
- package/dist/UIKit/ProgressBar/ProgressRootPrimitive.js +4 -0
- package/dist/UIKit/ProgressBar/ProgressRootPrimitive.vue.js +33 -0
- package/dist/UIKit/Radio/RadioButton.d.ts +38 -0
- package/dist/UIKit/Radio/RadioButton.js +4 -0
- package/dist/UIKit/Radio/RadioButton.vue.js +51 -0
- package/dist/UIKit/Radio/RadioGroup.d.ts +64 -0
- package/dist/UIKit/Radio/RadioGroup.js +4 -0
- package/dist/UIKit/Radio/RadioGroup.vue.js +67 -0
- package/dist/UIKit/Radio/v2/RadioButtonGroup.d.ts +38 -0
- package/dist/UIKit/Radio/v2/RadioButtonGroup.js +4 -0
- package/dist/UIKit/Radio/v2/RadioButtonGroup.vue.js +42 -0
- package/dist/UIKit/Radio/v2/RadioButtonItem.d.ts +17 -0
- package/dist/UIKit/Radio/v2/RadioButtonItem.js +4 -0
- package/dist/UIKit/Radio/v2/RadioButtonItem.vue.js +46 -0
- package/dist/UIKit/Radio/v2/RadioGroupItemPrimitive.d.ts +28 -0
- package/dist/UIKit/Radio/v2/RadioGroupItemPrimitive.js +4 -0
- package/dist/UIKit/Radio/v2/RadioGroupItemPrimitive.vue.js +32 -0
- package/dist/UIKit/ShimmerLoader/BaseShimmerLoader.d.ts +15 -0
- package/dist/UIKit/ShimmerLoader/BaseShimmerLoader.js +5 -0
- package/dist/UIKit/ShimmerLoader/BaseShimmerLoader.vue.js +19 -0
- package/dist/UIKit/ShimmerLoader/ShimmerMultiLine.d.ts +11 -0
- package/dist/UIKit/ShimmerLoader/ShimmerMultiLine.js +4 -0
- package/dist/UIKit/ShimmerLoader/ShimmerMultiLine.vue.js +41 -0
- package/dist/UIKit/Slider/{SimpleSlider.vue.d.ts → SimpleSlider.d.ts} +6 -6
- package/dist/UIKit/Slider/SimpleSlider.js +5 -0
- package/dist/UIKit/Slider/SimpleSlider.vue.js +74 -0
- package/dist/UIKit/StaticSpinner.d.ts +7 -0
- package/dist/UIKit/StaticSpinner.js +5 -0
- package/dist/UIKit/StaticSpinner.vue.js +24 -0
- package/dist/UIKit/Tab/BaseTab.d.ts +21 -0
- package/dist/UIKit/Tab/BaseTab.js +4 -0
- package/dist/UIKit/Tab/BaseTab.vue.js +14 -0
- package/dist/UIKit/Tab/BaseTabList.d.ts +14 -0
- package/dist/UIKit/Tab/BaseTabList.js +4 -0
- package/dist/UIKit/Tab/BaseTabList.vue.js +45 -0
- package/dist/UIKit/Tab/BaseTabPanel.d.ts +22 -0
- package/dist/UIKit/Tab/BaseTabPanel.js +4 -0
- package/dist/UIKit/Tab/BaseTabPanel.vue.js +27 -0
- package/dist/UIKit/Tab/BaseTabView.d.ts +49 -0
- package/dist/UIKit/Tab/BaseTabView.js +4 -0
- package/dist/UIKit/Tab/BaseTabView.vue.js +107 -0
- package/dist/UIKit/Tab/v2/BaseTabs.d.ts +35 -0
- package/dist/UIKit/Tab/v2/BaseTabs.js +4 -0
- package/dist/UIKit/Tab/v2/BaseTabs.vue.js +42 -0
- package/dist/UIKit/Tab/v2/BaseTabsContent.d.ts +14 -0
- package/dist/UIKit/Tab/v2/BaseTabsContent.js +4 -0
- package/dist/UIKit/Tab/v2/BaseTabsContent.vue.js +25 -0
- package/dist/UIKit/Tab/v2/BaseTabsIndicator.d.ts +16 -0
- package/dist/UIKit/Tab/v2/BaseTabsIndicator.js +4 -0
- package/dist/UIKit/Tab/v2/BaseTabsIndicator.vue.js +28 -0
- package/dist/UIKit/Tab/v2/BaseTabsList.d.ts +14 -0
- package/dist/UIKit/Tab/v2/BaseTabsList.js +4 -0
- package/dist/UIKit/Tab/v2/BaseTabsList.vue.js +24 -0
- package/dist/UIKit/Tab/v2/BaseTabsTrigger.d.ts +25 -0
- package/dist/UIKit/Tab/v2/BaseTabsTrigger.js +4 -0
- package/dist/UIKit/Tab/v2/BaseTabsTrigger.vue.js +25 -0
- package/dist/UIKit/frameUtils.d.ts +14 -0
- package/dist/UIKit/frameUtils.js +5 -0
- package/dist/UIKit/types.d.ts +10 -52
- package/dist/UIKit/types.js +0 -0
- package/dist/UIKit/useScrollLock.d.ts +4 -0
- package/dist/UIKit/useScrollLock.js +27 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +7 -0
- package/dist/chart/DoughnutChart.d.ts +8 -0
- package/dist/chart/DoughnutChart.js +4 -0
- package/dist/chart/DoughnutChart.vue.js +25 -0
- package/dist/chart/LineChart.d.ts +11 -0
- package/dist/chart/LineChart.js +4 -0
- package/dist/chart/LineChart.vue.js +27 -0
- package/dist/components/IntersectionObserver/IntersectionObservable.d.ts +24 -0
- package/dist/components/IntersectionObserver/IntersectionObservable.js +4 -0
- package/dist/components/IntersectionObserver/IntersectionObservable.vue.js +24 -0
- package/dist/components/IntersectionObserver/{IntersectionObserver.vue.d.ts → IntersectionObserver.d.ts} +16 -19
- package/dist/components/IntersectionObserver/IntersectionObserver.js +4 -0
- package/dist/components/IntersectionObserver/IntersectionObserver.vue.js +50 -0
- package/dist/components/IntersectionObserver/v2/IntersectionObserverProvider.d.ts +21 -0
- package/dist/components/IntersectionObserver/v2/IntersectionObserverProvider.js +4 -0
- package/dist/components/IntersectionObserver/v2/IntersectionObserverProvider.vue.js +43 -0
- package/dist/components/IntersectionObserver/v2/IntersectionObserverTarget.d.ts +27 -0
- package/dist/components/IntersectionObserver/v2/IntersectionObserverTarget.js +4 -0
- package/dist/components/IntersectionObserver/v2/IntersectionObserverTarget.vue.js +24 -0
- package/dist/components/IntersectionObserver/v2/types.d.ts +4 -0
- package/dist/components/IntersectionObserver/v2/types.js +3 -0
- package/dist/components/carousel/Primitive/SwiperNavigationPrimitive.d.ts +9 -0
- package/dist/components/carousel/Primitive/SwiperNavigationPrimitive.js +5 -0
- package/dist/components/carousel/Primitive/SwiperNavigationPrimitive.vue.js +30 -0
- package/dist/components/carousel/Primitive/SwiperPaginationPrimitive.d.ts +9 -0
- package/dist/components/carousel/Primitive/SwiperPaginationPrimitive.js +4 -0
- package/dist/components/carousel/Primitive/SwiperPaginationPrimitive.vue.js +30 -0
- package/dist/components/carousel/Primitive/SwiperPrimitive.d.ts +22 -0
- package/dist/components/carousel/Primitive/SwiperPrimitive.js +4 -0
- package/dist/components/carousel/Primitive/SwiperPrimitive.vue.js +16 -0
- package/dist/components/carousel/Primitive/SwiperRootPrimitive.d.ts +69 -0
- package/dist/components/carousel/Primitive/SwiperRootPrimitive.js +5 -0
- package/dist/components/carousel/Primitive/SwiperRootPrimitive.vue.js +98 -0
- package/dist/components/carousel/Primitive/SwiperSlideImagePrimitive.d.ts +18 -0
- package/dist/components/carousel/Primitive/SwiperSlideImagePrimitive.js +4 -0
- package/dist/components/carousel/Primitive/SwiperSlideImagePrimitive.vue.js +45 -0
- package/dist/components/carousel/Primitive/SwiperThumbnailPrimitive.d.ts +62 -0
- package/dist/components/carousel/Primitive/SwiperThumbnailPrimitive.js +4 -0
- package/dist/components/carousel/Primitive/SwiperThumbnailPrimitive.vue.js +56 -0
- package/dist/components/carousel/Primitive/deferredImages.d.ts +17 -0
- package/dist/components/carousel/Primitive/deferredImages.js +10 -0
- package/dist/components/carousel/SwiperCarousel.d.ts +57 -0
- package/dist/components/carousel/SwiperCarousel.js +5 -0
- package/dist/components/carousel/SwiperCarousel.vue.js +197 -0
- package/dist/components/carousel/SwiperSlide.d.ts +15 -0
- package/dist/components/carousel/SwiperSlide.js +9 -0
- package/dist/composables/mock.d.ts +25 -0
- package/dist/composables/mock.js +50 -0
- package/dist/composables/useFloatingLabel.d.ts +1 -1
- package/dist/composables/useFloatingLabel.js +28 -0
- package/dist/composables/useValidator.js +5 -0
- package/dist/css/AccessibleSelect.css +1 -0
- package/dist/css/BaseAccordionItem.css +1 -0
- package/dist/css/BaseAlert.css +1 -0
- package/dist/css/BaseAutocomplete.css +1 -0
- package/dist/css/BaseBadge.css +1 -0
- package/dist/css/BaseCard.css +1 -0
- package/dist/css/BaseComplexToggle.css +1 -0
- package/dist/css/BaseDropDown.css +1 -0
- package/dist/css/BaseFloatingLabel.css +1 -0
- package/dist/css/BaseInput.css +1 -0
- package/dist/css/BaseModal.css +1 -0
- package/dist/css/BaseShimmerLoader.css +1 -0
- package/dist/css/BaseSlider.css +1 -0
- package/dist/css/BaseSnackbar.css +1 -0
- package/dist/css/BaseTabs.css +1 -0
- package/dist/css/BaseTabsIndicator.css +1 -0
- package/dist/css/BaseTextarea.css +1 -0
- package/dist/css/BaseTooltip.css +1 -0
- package/dist/css/CheckboxBtn.css +1 -0
- package/dist/css/ClearableAutocomplete.css +1 -0
- package/dist/css/RadioButtonItem.css +1 -0
- package/dist/css/SimpleSlider.css +1 -0
- package/dist/css/StaticSpinner.css +1 -0
- package/dist/css/SwiperCarousel.css +1 -0
- package/dist/css/SwiperNavigationPrimitive.css +1 -0
- package/dist/css/SwiperPaginationPrimitive.css +1 -0
- package/dist/css/SwiperRootPrimitive.css +1 -0
- package/dist/css/SwiperSlideImagePrimitive.css +1 -0
- package/dist/css/swiper-free-mode.css +1 -0
- package/dist/css/swiper-navigation.css +1 -0
- package/dist/css/swiper-pagination.css +1 -0
- package/dist/css/swiper-swiper.css +1 -0
- package/dist/css/swiper-zoom.css +1 -0
- package/dist/css/tailwind.css +1 -0
- package/dist/css/tokens.css +1 -0
- package/dist/docs/AccessibleSelect.md +123 -0
- package/dist/docs/AccordionContentPrimitive.md +70 -0
- package/dist/docs/AccordionHeaderPrimitive.md +70 -0
- package/dist/docs/AccordionItemPrimitive.md +98 -0
- package/dist/docs/AccordionTriggerPrimitive.md +71 -0
- package/dist/docs/BaseAccordion.md +98 -0
- package/dist/docs/BaseAccordionItem.md +102 -0
- package/dist/docs/BaseAlert.md +85 -0
- package/dist/docs/BaseAutocomplete.md +127 -0
- package/dist/docs/BaseBadge.md +94 -0
- package/dist/docs/BaseBreadcrumb.md +83 -0
- package/dist/docs/BaseButton.md +129 -0
- package/dist/docs/BaseCard.md +112 -0
- package/dist/docs/BaseComplexToggle.md +101 -0
- package/dist/docs/BaseDropDown.md +124 -0
- package/dist/docs/BaseFloatingLabel.md +91 -0
- package/dist/docs/BaseInput.md +132 -0
- package/dist/docs/BaseModal.md +131 -0
- package/dist/docs/BasePagination.md +109 -0
- package/dist/docs/BaseShimmerLoader.md +88 -0
- package/dist/docs/BaseSlider.md +89 -0
- package/dist/docs/BaseSnackbar.md +122 -0
- package/dist/docs/BaseTab.md +84 -0
- package/dist/docs/BaseTabView.md +90 -0
- package/dist/docs/BaseTabs.md +118 -0
- package/dist/docs/BaseTabsContent.md +71 -0
- package/dist/docs/BaseTabsIndicator.md +75 -0
- package/dist/docs/BaseTabsList.md +76 -0
- package/dist/docs/BaseTabsTrigger.md +70 -0
- package/dist/docs/BaseTextarea.md +101 -0
- package/dist/docs/BaseToggle.md +88 -0
- package/dist/docs/BaseTooltip.md +89 -0
- package/dist/docs/BaseUploadFile.md +96 -0
- package/dist/docs/CardDescriptionPrimitive.md +73 -0
- package/dist/docs/CardImagePrimitive.md +73 -0
- package/dist/docs/CardRootPrimitive.md +101 -0
- package/dist/docs/CheckboxBtn.md +98 -0
- package/dist/docs/CheckboxButtonGroup.md +115 -0
- package/dist/docs/CheckboxGroup.md +102 -0
- package/dist/docs/CheckboxGroupItemPrimitive.md +105 -0
- package/dist/docs/CheckboxGroupPrimitive.md +107 -0
- package/dist/docs/ClearableAutocomplete.md +137 -0
- package/dist/docs/DoughnutChart.md +88 -0
- package/dist/docs/INDEX.md +133 -0
- package/dist/docs/IntersectionObservable.md +78 -0
- package/dist/docs/IntersectionObserver.md +84 -0
- package/dist/docs/IntersectionObserverProvider.md +98 -0
- package/dist/docs/IntersectionObserverTarget.md +73 -0
- package/dist/docs/LineChart.md +98 -0
- package/dist/docs/ProgressIndicatorPrimitive.md +70 -0
- package/dist/docs/ProgressRootPrimitive.md +106 -0
- package/dist/docs/RadioButton.md +86 -0
- package/dist/docs/RadioButtonGroup.md +107 -0
- package/dist/docs/RadioButtonItem.md +103 -0
- package/dist/docs/RadioGroup.md +95 -0
- package/dist/docs/RadioGroupItemPrimitive.md +102 -0
- package/dist/docs/SelectItem.md +100 -0
- package/dist/docs/ShimmerMultiLine.md +79 -0
- package/dist/docs/SimpleSlider.md +82 -0
- package/dist/docs/StaticSpinner.md +78 -0
- package/dist/docs/SwiperCarousel.md +128 -0
- package/dist/docs/SwiperNavigationPrimitive.md +85 -0
- package/dist/docs/SwiperPaginationPrimitive.md +82 -0
- package/dist/docs/SwiperPrimitive.md +77 -0
- package/dist/docs/SwiperRootPrimitive.md +125 -0
- package/dist/docs/SwiperSlide.md +75 -0
- package/dist/docs/SwiperSlideImagePrimitive.md +100 -0
- package/dist/docs/SwiperThumbnailPrimitive.md +96 -0
- package/dist/docs/TOKENS.md +50 -0
- package/dist/docs/agent-index.md +86 -0
- package/dist/index.d.ts +68 -45
- package/dist/index.js +68 -86
- package/dist/lazyModules/ChartJs/Chart.d.ts +8 -0
- package/dist/lazyModules/ChartJs/Chart.js +4 -0
- package/dist/lazyModules/ChartJs/DoughnutChart/core.d.ts +2 -0
- package/dist/lazyModules/ChartJs/DoughnutChart/core.js +4 -0
- package/dist/lazyModules/ChartJs/LineChart/cartesian.d.ts +2 -0
- package/dist/lazyModules/ChartJs/LineChart/cartesian.js +4 -0
- package/dist/lazyModules/ChartJs/LineChart/core.d.ts +2 -0
- package/dist/lazyModules/ChartJs/LineChart/core.js +4 -0
- package/dist/lazyModules/ChartJs/Plugins/Legend.d.ts +1 -0
- package/dist/lazyModules/ChartJs/Plugins/Legend.js +3 -0
- package/dist/lazyModules/ChartJs/Plugins/TimeScale.d.ts +0 -0
- package/dist/lazyModules/ChartJs/Plugins/TimeScale.js +4 -0
- package/dist/lazyModules/ChartJs/Plugins/Title.d.ts +1 -0
- package/dist/lazyModules/ChartJs/Plugins/Title.js +3 -0
- package/dist/lazyModules/ChartJs/Plugins/Tooltip.d.ts +1 -0
- package/dist/lazyModules/ChartJs/Plugins/Tooltip.js +3 -0
- package/dist/lazyModules/Swiper/Autoplay/factory.d.ts +3 -0
- package/dist/lazyModules/Swiper/Autoplay/factory.js +6 -0
- package/dist/lazyModules/Swiper/Autoplay/index.d.ts +1 -0
- package/dist/lazyModules/Swiper/Autoplay/index.js +2 -0
- package/dist/lazyModules/Swiper/Controller/factory.d.ts +3 -0
- package/dist/lazyModules/Swiper/Controller/factory.js +6 -0
- package/dist/lazyModules/Swiper/Controller/index.d.ts +1 -0
- package/dist/lazyModules/Swiper/Controller/index.js +2 -0
- package/dist/lazyModules/Swiper/FreeMode/factory.d.ts +3 -0
- package/dist/lazyModules/Swiper/FreeMode/factory.js +6 -0
- package/dist/lazyModules/Swiper/FreeMode/index.d.ts +1 -0
- package/dist/lazyModules/Swiper/FreeMode/index.js +2 -0
- package/dist/lazyModules/Swiper/Keyboard/factory.d.ts +3 -0
- package/dist/lazyModules/Swiper/Keyboard/factory.js +6 -0
- package/dist/lazyModules/Swiper/Keyboard/index.d.ts +1 -0
- package/dist/lazyModules/Swiper/Keyboard/index.js +2 -0
- package/dist/lazyModules/Swiper/Navigation/factory.d.ts +3 -0
- package/dist/lazyModules/Swiper/Navigation/factory.js +6 -0
- package/dist/lazyModules/Swiper/Navigation/index.d.ts +1 -0
- package/dist/lazyModules/Swiper/Navigation/index.js +2 -0
- package/dist/lazyModules/Swiper/Pagination/factory.d.ts +3 -0
- package/dist/lazyModules/Swiper/Pagination/factory.js +6 -0
- package/dist/lazyModules/Swiper/Pagination/index.d.ts +1 -0
- package/dist/lazyModules/Swiper/Pagination/index.js +2 -0
- package/dist/lazyModules/Swiper/Thumbs/factory.d.ts +3 -0
- package/dist/lazyModules/Swiper/Thumbs/factory.js +6 -0
- package/dist/lazyModules/Swiper/Thumbs/index.d.ts +1 -0
- package/dist/lazyModules/Swiper/Thumbs/index.js +2 -0
- package/dist/lazyModules/Swiper/Zoom/factory.d.ts +3 -0
- package/dist/lazyModules/Swiper/Zoom/factory.js +6 -0
- package/dist/lazyModules/Swiper/Zoom/index.d.ts +1 -0
- package/dist/lazyModules/Swiper/Zoom/index.js +2 -0
- package/dist/lazyModules/Swiper/factory.d.ts +3 -0
- package/dist/lazyModules/Swiper/factory.js +9 -0
- package/dist/lazyModules/Swiper/index.d.ts +20 -0
- package/dist/lazyModules/Swiper/index.js +5 -0
- package/dist/lazyModules/Swiper/swiper-css.d.js +0 -0
- package/dist/lazyModules/Swiper/types.d.ts +5 -0
- package/dist/lazyModules/Swiper/types.js +0 -0
- package/dist/lazyModules/VueChartJs/Doughnut/factory.d.ts +7 -0
- package/dist/lazyModules/VueChartJs/Doughnut/factory.js +8 -0
- package/dist/lazyModules/VueChartJs/Doughnut/index.d.ts +9 -0
- package/dist/lazyModules/VueChartJs/Doughnut/index.js +4 -0
- package/dist/lazyModules/VueChartJs/Line/factory.d.ts +7 -0
- package/dist/lazyModules/VueChartJs/Line/factory.js +8 -0
- package/dist/lazyModules/VueChartJs/Line/index.d.ts +9 -0
- package/dist/lazyModules/VueChartJs/Line/index.js +4 -0
- package/dist/types/index.d.ts +33 -0
- package/dist/types/index.js +0 -0
- package/dist/types.js +0 -1
- package/dist/utils.js +3 -5
- package/package.json +73 -42
- package/dist/AccessibleSelect.js +0 -4
- package/dist/BaseAccordion.js +0 -4
- package/dist/BaseAccordionBtn.js +0 -4
- package/dist/BaseAccordionContent.js +0 -4
- package/dist/BaseAccordionItem.js +0 -4
- package/dist/BaseAlert.js +0 -4
- package/dist/BaseAutocomplete.js +0 -4
- package/dist/BaseBadge.js +0 -4
- package/dist/BaseBreadcrumb.js +0 -4
- package/dist/BaseButton.js +0 -4
- package/dist/BaseCard.js +0 -38
- package/dist/BaseComplexToggle.js +0 -107
- package/dist/BaseDropDown.js +0 -4
- package/dist/BaseFloatingLabel.js +0 -41
- package/dist/BaseIcon.js +0 -28
- package/dist/BaseInput.js +0 -212
- package/dist/BaseModal.js +0 -4
- package/dist/BasePagination.js +0 -4
- package/dist/BasePaper.js +0 -14
- package/dist/BaseShimmerLoader.js +0 -22
- package/dist/BaseSlider.js +0 -208
- package/dist/BaseSnackbar.js +0 -82
- package/dist/BaseTab.js +0 -4
- package/dist/BaseTabList.js +0 -4
- package/dist/BaseTabPanel.js +0 -4
- package/dist/BaseTabView.js +0 -4
- package/dist/BaseTextarea.js +0 -128
- package/dist/BaseToggle.js +0 -43
- package/dist/BaseTooltip.js +0 -42
- package/dist/BaseUploadFile.js +0 -4
- package/dist/CheckboxBtn.js +0 -76
- package/dist/CheckboxGroup.js +0 -4
- package/dist/DoughnutChart.js +0 -4
- package/dist/IntersectionObservable.js +0 -4
- package/dist/IntersectionObserver.js +0 -4
- package/dist/LineChart.js +0 -4
- package/dist/RadioButton.js +0 -4
- package/dist/RadioGroup.js +0 -4
- package/dist/SelectItem.js +0 -4
- package/dist/ShimmerMultiLine.js +0 -4
- package/dist/SimpleSlider.js +0 -83
- package/dist/StaticSpinner.js +0 -28
- package/dist/SwiperCarousel.js +0 -5
- package/dist/SwiperSlide.js +0 -14
- package/dist/UIKit/AccessibleSelect.vue.d.ts +0 -55
- package/dist/UIKit/Accordion/BaseAccordion.vue.d.ts +0 -32
- package/dist/UIKit/Accordion/BaseAccordionBtn.vue.d.ts +0 -34
- package/dist/UIKit/Accordion/BaseAccordionContent.vue.d.ts +0 -30
- package/dist/UIKit/Accordion/BaseAccordionItem.vue.d.ts +0 -60
- package/dist/UIKit/BaseAlert.vue.d.ts +0 -26
- package/dist/UIKit/BaseAutocomplete.vue.d.ts +0 -48
- package/dist/UIKit/BaseBadge.vue.d.ts +0 -22
- package/dist/UIKit/BaseBreadcrumb.vue.d.ts +0 -35
- package/dist/UIKit/BaseButton.vue.d.ts +0 -46
- package/dist/UIKit/BaseCard.vue.d.ts +0 -29
- package/dist/UIKit/BaseComplexToggle.vue.d.ts +0 -47
- package/dist/UIKit/BaseDropDown.vue.d.ts +0 -81
- package/dist/UIKit/BaseFloatingLabel.vue.d.ts +0 -17
- package/dist/UIKit/BaseIcon.vue.d.ts +0 -11
- package/dist/UIKit/BaseInput.vue.d.ts +0 -68
- package/dist/UIKit/BaseModal.vue.d.ts +0 -63
- package/dist/UIKit/BasePaper.vue.d.ts +0 -2
- package/dist/UIKit/BaseSelect/SelectItem.vue.d.ts +0 -38
- package/dist/UIKit/BaseSnackbar.vue.d.ts +0 -24
- package/dist/UIKit/BaseToggle.vue.d.ts +0 -32
- package/dist/UIKit/BaseTooltip.vue.d.ts +0 -38
- package/dist/UIKit/BaseUploadFile.vue.d.ts +0 -42
- package/dist/UIKit/Checkbox/CheckboxBtn.vue.d.ts +0 -53
- package/dist/UIKit/Checkbox/CheckboxGroup.vue.d.ts +0 -71
- package/dist/UIKit/Radio/RadioButton.vue.d.ts +0 -27
- package/dist/UIKit/Radio/RadioGroup.vue.d.ts +0 -54
- package/dist/UIKit/ShimmerLoader/BaseShimmerLoader.vue.d.ts +0 -21
- package/dist/UIKit/ShimmerLoader/ShimmerMultiLine.vue.d.ts +0 -63
- package/dist/UIKit/StaticSpinner.vue.d.ts +0 -6
- package/dist/UIKit/Tab/BaseTab.vue.d.ts +0 -23
- package/dist/UIKit/Tab/BaseTabList.vue.d.ts +0 -14
- package/dist/UIKit/Tab/BaseTabPanel.vue.d.ts +0 -24
- package/dist/UIKit/Tab/BaseTabView.vue.d.ts +0 -27
- package/dist/assets/BaseAlert.css +0 -1
- package/dist/assets/BaseBadge.css +0 -1
- package/dist/assets/BaseCard.css +0 -1
- package/dist/assets/BaseComplexToggle.css +0 -1
- package/dist/assets/BaseFloatingLabel.css +0 -1
- package/dist/assets/BaseIcon.css +0 -1
- package/dist/assets/BaseInput.css +0 -1
- package/dist/assets/BaseModal.css +0 -1
- package/dist/assets/BasePaper.css +0 -1
- package/dist/assets/BaseShimmerLoader.css +0 -1
- package/dist/assets/BaseSlider.css +0 -1
- package/dist/assets/BaseSnackbar.css +0 -1
- package/dist/assets/BaseTextarea.css +0 -1
- package/dist/assets/BaseToggle.css +0 -1
- package/dist/assets/BaseTooltip.css +0 -1
- package/dist/assets/CheckboxBtn.css +0 -1
- package/dist/assets/SimpleSlider.css +0 -1
- package/dist/assets/StaticSpinner.css +0 -1
- package/dist/assets/SwiperCarousel.css +0 -1
- package/dist/assets/index.css +0 -1
- package/dist/chart/DoughnutChart.vue.d.ts +0 -7
- package/dist/chart/LineChart.vue.d.ts +0 -19
- package/dist/chart/composables/useChartjsModules.d.ts +0 -10
- package/dist/chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.QU1FSgY0.js +0 -246
- package/dist/chunks/ArrowIcon.Bq6Xr3uH.js +0 -28
- package/dist/chunks/BaseAccordion.vue_vue_type_script_setup_true_lang.C34SZThb.js +0 -32
- package/dist/chunks/BaseAccordionBtn.vue_vue_type_script_setup_true_lang.DEk3SXLJ.js +0 -60
- package/dist/chunks/BaseAccordionContent.vue_vue_type_script_setup_true_lang.Qp_TWYFE.js +0 -34
- package/dist/chunks/BaseAccordionItem.vue_vue_type_script_setup_true_lang.BJB5DnDs.js +0 -143
- package/dist/chunks/BaseAlert.vue_vue_type_style_index_0_lang.DUWb9d9_.js +0 -19
- package/dist/chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.S_XFg2zV.js +0 -202
- package/dist/chunks/BaseBadge.vue_vue_type_style_index_0_lang.DvAI34Oa.js +0 -19
- package/dist/chunks/BaseBreadcrumb.vue_vue_type_script_setup_true_lang.BrzeVW2_.js +0 -58
- package/dist/chunks/BaseButton.vue_vue_type_script_setup_true_lang.DHwyd5Gb.js +0 -66
- package/dist/chunks/BaseDropDown.vue_vue_type_script_setup_true_lang.OKB0gEpo.js +0 -137
- package/dist/chunks/BaseModal.vue_vue_type_style_index_0_lang.a2qGyPhV.js +0 -150
- package/dist/chunks/BasePagination.vue_vue_type_script_setup_true_lang.DdFMVFIO.js +0 -164
- package/dist/chunks/BaseTab.vue_vue_type_script_setup_true_lang.Cu67jd8K.js +0 -15
- package/dist/chunks/BaseTabList.vue_vue_type_script_setup_true_lang.CxrS-Vq6.js +0 -43
- package/dist/chunks/BaseTabPanel.vue_vue_type_script_setup_true_lang.CVJUssBq.js +0 -24
- package/dist/chunks/BaseTabView.vue_vue_type_script_setup_true_lang.DGTsSVEG.js +0 -105
- package/dist/chunks/BaseUploadFile.vue_vue_type_script_setup_true_lang.BL98w2D8.js +0 -71
- package/dist/chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.B_9CFhd2.js +0 -111
- package/dist/chunks/CloseIcon.BZ4U3aiI.js +0 -38
- package/dist/chunks/DoughnutChart.vue_vue_type_script_setup_true_lang.B8wxbJBV.js +0 -27
- package/dist/chunks/IntersectionObservable.vue_vue_type_script_setup_true_lang.DC17cx-h.js +0 -24
- package/dist/chunks/IntersectionObserver.vue_vue_type_script_setup_true_lang.BKewKDXG.js +0 -52
- package/dist/chunks/LineChart.vue_vue_type_script_setup_true_lang.CXNsFiyD.js +0 -42
- package/dist/chunks/ObjectUtils.DwkJjVq1.js +0 -10
- package/dist/chunks/PharmacyIcon.DEQ8mOEJ.js +0 -11
- package/dist/chunks/RadioButton.vue_vue_type_script_setup_true_lang.CxVJji0G.js +0 -58
- package/dist/chunks/RadioGroup.vue_vue_type_script_setup_true_lang.BNKSEicl.js +0 -62
- package/dist/chunks/SelectItem.vue_vue_type_script_setup_true_lang.jB3LVM3c.js +0 -41
- package/dist/chunks/ShimmerMultiLine.vue_vue_type_script_setup_true_lang.CPUobRgG.js +0 -29
- package/dist/chunks/SwiperCarousel.BheiaKKw.js +0 -748
- package/dist/chunks/_plugin-vue_export-helper.CHgC5LLL.js +0 -9
- package/dist/chunks/index.BJP9rQkU.js +0 -887
- package/dist/chunks/polyline.DjpLdMaW.js +0 -5256
- package/dist/chunks/useBreakpoints.BXk8Xcw3.js +0 -5189
- package/dist/city-640x359.jpg +0 -0
- package/dist/components/IntersectionObserver/IntersectionObservable.vue.d.ts +0 -29
- package/dist/components/carousel/SwiperCarousel.vue.d.ts +0 -57
- package/dist/components/carousel/SwiperSlide.vue.d.ts +0 -17
- package/dist/favicon.ico +0 -0
- package/dist/useChartjsModules.js +0 -48
- package/dist/useFloatingLabel.js +0 -33
- package/dist/useValidator.js +0 -8
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: BaseTabView
|
|
3
|
+
status: legacy
|
|
4
|
+
category: Navigation
|
|
5
|
+
summary: First-generation tabs container driven by BaseTab children and an index-based v-model.
|
|
6
|
+
useInstead: BaseTabs
|
|
7
|
+
import: @wikicasa-dev/components/UIKit/Tab/BaseTabView
|
|
8
|
+
version: 3.0.0-alpha.3
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# BaseTabView
|
|
12
|
+
|
|
13
|
+
> **Legacy.** Don't use in new designs. Use `BaseTabs` instead.
|
|
14
|
+
|
|
15
|
+
First-generation tabs container driven by BaseTab children and an index-based v-model.
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import BaseTabView from "@wikicasa-dev/components/UIKit/Tab/BaseTabView";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Older tabs implementation, still used in existing pages. For new work use `BaseTabs` with `BaseTabsList`, `BaseTabsTrigger`, `BaseTabsContent` and `BaseTabsIndicator`: it covers the same cases (bottom tab bar, several tabs sharing one panel) with value-based selection, keyboard navigation and an animated indicator.
|
|
22
|
+
|
|
23
|
+
How it works, for reading existing code: `BaseTabView` builds the tab bar from its direct `BaseTab` children; the active tab is a 0-based index in `v-model:active-idx`. `tabViewDescription` is required (screen-reader label of the tab list) and `tabsPosition` puts the bar on `top` (default) or `bottom`.
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
```vue
|
|
28
|
+
<script setup lang="ts">
|
|
29
|
+
import BaseTabView from "@wikicasa-dev/components/UIKit/Tab/BaseTabView";
|
|
30
|
+
import BaseTab from "@wikicasa-dev/components/UIKit/Tab/BaseTab";
|
|
31
|
+
import { ref } from "vue";
|
|
32
|
+
|
|
33
|
+
const activeIdx = ref(0);
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<template>
|
|
37
|
+
<BaseTabView
|
|
38
|
+
v-model:active-idx="activeIdx"
|
|
39
|
+
tab-view-description="Dati di mercato"
|
|
40
|
+
tab-list-classes="market-tab-list"
|
|
41
|
+
>
|
|
42
|
+
<BaseTab header-title="Prezzi">Prezzo medio a Firenze: 4.150 €/m²</BaseTab>
|
|
43
|
+
<BaseTab header-title="Affitti">Affitto medio a Firenze: 18,90 €/m²</BaseTab>
|
|
44
|
+
</BaseTabView>
|
|
45
|
+
</template>
|
|
46
|
+
|
|
47
|
+
<style>
|
|
48
|
+
.market-tab-list { display: flex; gap: 15px; margin-bottom: 10px; }
|
|
49
|
+
</style>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Do / Don't
|
|
53
|
+
|
|
54
|
+
- Don't start new tab UIs with it; migrate to `BaseTabs` when touching one.
|
|
55
|
+
- Only direct `BaseTab` children (or a direct `v-for` of them) become tabs; wrappers in between are ignored.
|
|
56
|
+
- Changing a `BaseTab`'s classes re-renders its content. Style the active tab with `[aria-selected="true"]` instead of toggling classes.
|
|
57
|
+
- `tabClicked` fires with `{ tabIdx, tabElement }` on every tab click.
|
|
58
|
+
|
|
59
|
+
## API
|
|
60
|
+
|
|
61
|
+
_Generated from the component's types. Do not edit by hand._
|
|
62
|
+
|
|
63
|
+
### Props
|
|
64
|
+
|
|
65
|
+
| Name | Type | Default | Required | Description |
|
|
66
|
+
| --- | --- | --- | --- | --- |
|
|
67
|
+
| `tabsPosition` | `"top" \| "bottom"` | `"top"` | | |
|
|
68
|
+
| `tabViewDescription` | `string` | | yes | |
|
|
69
|
+
| `tabListClasses` | `ClassTypeProp` | | | |
|
|
70
|
+
| `dataCy` | `string` | | | |
|
|
71
|
+
| `activeIdx` | `number` | `0` | | Model value which keeps track of the active tab. By default, we will activate the first tab |
|
|
72
|
+
|
|
73
|
+
### Events
|
|
74
|
+
|
|
75
|
+
| Name | Payload |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| `update:activeIdx` | `[value: number \| undefined]` |
|
|
78
|
+
| `tabClicked` | `[{ tabIdx: number; tabElement: TabType; }]` |
|
|
79
|
+
|
|
80
|
+
### v-model
|
|
81
|
+
|
|
82
|
+
- `v-model:activeIdx` (`number`)
|
|
83
|
+
|
|
84
|
+
### Slots
|
|
85
|
+
|
|
86
|
+
None.
|
|
87
|
+
|
|
88
|
+
### Exposed (template ref)
|
|
89
|
+
|
|
90
|
+
None.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: BaseTabs
|
|
3
|
+
status: preferred
|
|
4
|
+
category: Navigation
|
|
5
|
+
summary: Accessible tabs (root of the compound set): switches between panels with an animated underline indicator.
|
|
6
|
+
import: @wikicasa-dev/components/UIKit/Tab/v2/BaseTabs
|
|
7
|
+
version: 3.0.0-alpha.3
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# BaseTabs
|
|
11
|
+
|
|
12
|
+
Accessible tabs (root of the compound set): switches between panels with an animated underline indicator.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import BaseTabs from "@wikicasa-dev/components/UIKit/Tab/v2/BaseTabs";
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Stylesheets: `css/BaseTabs`.
|
|
19
|
+
|
|
20
|
+
Use it to switch between sibling views of the same context without leaving the page: "Vendita / Affitto / Aste" in a search box, "Preferiti / Ricerche salvate / Visti di recente" in a user area. Don't use it for page navigation (use links) or for a filter that changes a single list (use `BaseButton` selection variants).
|
|
21
|
+
|
|
22
|
+
It is a compound component; always use the five parts together:
|
|
23
|
+
|
|
24
|
+
- `BaseTabs`: the root. Holds the active value (`v-model`, string or number).
|
|
25
|
+
- `BaseTabsList`: the row of tabs.
|
|
26
|
+
- `BaseTabsIndicator`: optional animated underline, placed inside `BaseTabsList`.
|
|
27
|
+
- `BaseTabsTrigger`: one tab button, with a `value`.
|
|
28
|
+
- `BaseTabsContent`: the panel shown when the trigger with the same `value` is active.
|
|
29
|
+
|
|
30
|
+
Keyboard support (arrow keys, Home/End) and ARIA roles come built in.
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```vue
|
|
35
|
+
<script setup lang="ts">
|
|
36
|
+
import BaseTabs from "@wikicasa-dev/components/UIKit/Tab/v2/BaseTabs";
|
|
37
|
+
import BaseTabsList from "@wikicasa-dev/components/UIKit/Tab/v2/BaseTabsList";
|
|
38
|
+
import BaseTabsIndicator from "@wikicasa-dev/components/UIKit/Tab/v2/BaseTabsIndicator";
|
|
39
|
+
import BaseTabsTrigger from "@wikicasa-dev/components/UIKit/Tab/v2/BaseTabsTrigger";
|
|
40
|
+
import BaseTabsContent from "@wikicasa-dev/components/UIKit/Tab/v2/BaseTabsContent";
|
|
41
|
+
import { ref } from "vue";
|
|
42
|
+
|
|
43
|
+
const tabs = [
|
|
44
|
+
{ value: "vendita", label: "Vendita" },
|
|
45
|
+
{ value: "affitto", label: "Affitto" },
|
|
46
|
+
{ value: "aste", label: "Aste" },
|
|
47
|
+
];
|
|
48
|
+
const active = ref("vendita");
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<template>
|
|
52
|
+
<BaseTabs v-model="active">
|
|
53
|
+
<BaseTabsList style="display: flex; justify-content: center; gap: 20px; margin-bottom: 15px">
|
|
54
|
+
<BaseTabsIndicator />
|
|
55
|
+
<BaseTabsTrigger v-for="tab in tabs" :key="tab.value" :value="tab.value">
|
|
56
|
+
{{ tab.label }}
|
|
57
|
+
</BaseTabsTrigger>
|
|
58
|
+
</BaseTabsList>
|
|
59
|
+
|
|
60
|
+
<BaseTabsContent value="vendita">Case in vendita a Bologna: 2.418 annunci</BaseTabsContent>
|
|
61
|
+
<BaseTabsContent value="affitto">Case in affitto a Bologna: 731 annunci</BaseTabsContent>
|
|
62
|
+
<BaseTabsContent value="aste">Immobili all'asta a Bologna: 96 annunci</BaseTabsContent>
|
|
63
|
+
</BaseTabs>
|
|
64
|
+
</template>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Do / Don't
|
|
68
|
+
|
|
69
|
+
- Give every trigger a unique `value` and a matching `BaseTabsContent`. Several triggers can share one panel: bind the panel's `value` to a computed that returns the active value when it is one of them.
|
|
70
|
+
- Put `BaseTabsIndicator` inside `BaseTabsList`. Without it, the active trigger still gets a static 2px underline (no animation).
|
|
71
|
+
- Inactive panels stay mounted (hidden), so their state survives tab switches. Pass `unmount-on-hide` to unmount them instead.
|
|
72
|
+
- Use `default-value` instead of `v-model` when you don't need to read the active tab. The default slot also exposes `modelValue`.
|
|
73
|
+
- To put the tabs under the panels, place `BaseTabsList` after the `BaseTabsContent`s.
|
|
74
|
+
- Style the selected tab with a `[data-state="active"]` selector on the trigger (inactive ones have `data-state="inactive"`).
|
|
75
|
+
|
|
76
|
+
## Styling hooks
|
|
77
|
+
|
|
78
|
+
Set on `BaseTabs` (with a selector more specific than `.uikit-base-tabs`, or inline `style`):
|
|
79
|
+
`--indicator-bg-color` (indicator color, default primary blue; the fallback underline without `BaseTabsIndicator` is always primary blue), `--indicator-border-radius-top`, `--indicator-border-radius-bottom`, `--indicator-bottom` (lift the underline from the bottom edge).
|
|
80
|
+
|
|
81
|
+
## API
|
|
82
|
+
|
|
83
|
+
_Generated from the component's types. Do not edit by hand._
|
|
84
|
+
|
|
85
|
+
### Props
|
|
86
|
+
|
|
87
|
+
| Name | Type | Default | Required | Description |
|
|
88
|
+
| --- | --- | --- | --- | --- |
|
|
89
|
+
| `dataCy` | `string` | | | |
|
|
90
|
+
| `unmountOnHide` | `boolean` | `false` | | When `true`, inactive panels are unmounted; when `false`, they stay mounted (hidden) and keep their state. The default is `false` here, unlike reka-ui's `true`. |
|
|
91
|
+
| `defaultValue` | `T` | | | The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs |
|
|
92
|
+
| `orientation` | `DataOrientation` | | | The orientation the tabs are laid out. Mainly so arrow navigation is done accordingly (left & right vs. up & down) |
|
|
93
|
+
| `dir` | `Direction` | | | The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. |
|
|
94
|
+
| `activationMode` | `"automatic" \| "manual"` | | | Whether a tab is activated automatically (on focus) or manually (on click). |
|
|
95
|
+
| `modelValue` | `T` | | | The controlled value of the tab to activate. Can be bind as `v-model`. |
|
|
96
|
+
| `asChild` | `boolean` | | | Change the default rendered element for the one passed as a child, merging their props and behavior. Read our [Composition](https://www.reka-ui.com/docs/guides/composition) guide for more details. |
|
|
97
|
+
| `as` | `AsTag \| Component` | | | The element or component this component should render as. Can be overwritten by `asChild`. |
|
|
98
|
+
|
|
99
|
+
### Events
|
|
100
|
+
|
|
101
|
+
| Name | Payload |
|
|
102
|
+
| --- | --- |
|
|
103
|
+
| `update:modelValue` | `[payload: T]` |
|
|
104
|
+
| `mounted` | |
|
|
105
|
+
|
|
106
|
+
### v-model
|
|
107
|
+
|
|
108
|
+
- `v-model` binds `modelValue` (`T`)
|
|
109
|
+
|
|
110
|
+
### Slots
|
|
111
|
+
|
|
112
|
+
| Name | Slot props |
|
|
113
|
+
| --- | --- |
|
|
114
|
+
| `default` | `{ modelValue: T; }` |
|
|
115
|
+
|
|
116
|
+
### Exposed (template ref)
|
|
117
|
+
|
|
118
|
+
None.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: BaseTabsContent
|
|
3
|
+
status: preferred
|
|
4
|
+
category: Navigation
|
|
5
|
+
summary: The panel of a BaseTabs set, shown while the trigger with the same value is active.
|
|
6
|
+
import: @wikicasa-dev/components/UIKit/Tab/v2/BaseTabsContent
|
|
7
|
+
version: 3.0.0-alpha.3
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# BaseTabsContent
|
|
11
|
+
|
|
12
|
+
The panel of a BaseTabs set, shown while the trigger with the same value is active.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import BaseTabsContent from "@wikicasa-dev/components/UIKit/Tab/v2/BaseTabsContent";
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Part of the `BaseTabs` compound component: see the `BaseTabs` doc for the full composition. Place the panels inside `BaseTabs`, after (or before) `BaseTabsList`.
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```vue
|
|
23
|
+
<script setup lang="ts">
|
|
24
|
+
import BaseTabsContent from "@wikicasa-dev/components/UIKit/Tab/v2/BaseTabsContent";
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<!-- inside <BaseTabs> -->
|
|
29
|
+
<BaseTabsContent value="aste" style="padding-top: 15px">
|
|
30
|
+
Immobili all'asta a Napoli: 54 annunci
|
|
31
|
+
</BaseTabsContent>
|
|
32
|
+
</template>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Do / Don't
|
|
36
|
+
|
|
37
|
+
- `value` must match a trigger's `value`. To show one panel for several tabs, bind `:value` to a computed that returns the active value when it is one of them, and something unused otherwise.
|
|
38
|
+
- Hidden panels stay mounted unless `BaseTabs` has `unmount-on-hide`; `forceMount` keeps a panel mounted in either case.
|
|
39
|
+
- No default styling: spacing goes in your own `class`/`style`.
|
|
40
|
+
|
|
41
|
+
## API
|
|
42
|
+
|
|
43
|
+
_Generated from the component's types. Do not edit by hand._
|
|
44
|
+
|
|
45
|
+
### Props
|
|
46
|
+
|
|
47
|
+
| Name | Type | Default | Required | Description |
|
|
48
|
+
| --- | --- | --- | --- | --- |
|
|
49
|
+
| `dataCy` | `string` | | | |
|
|
50
|
+
| `value` | `StringOrNumber` | | yes | A unique value that associates the content with a trigger. |
|
|
51
|
+
| `forceMount` | `boolean` | | | Used to force mounting when more control is needed. Useful when controlling animation with Vue animation libraries. |
|
|
52
|
+
| `asChild` | `boolean` | | | Change the default rendered element for the one passed as a child, merging their props and behavior. Read our [Composition](https://www.reka-ui.com/docs/guides/composition) guide for more details. |
|
|
53
|
+
| `as` | `AsTag \| Component` | | | The element or component this component should render as. Can be overwritten by `asChild`. |
|
|
54
|
+
|
|
55
|
+
### Events
|
|
56
|
+
|
|
57
|
+
None.
|
|
58
|
+
|
|
59
|
+
### v-model
|
|
60
|
+
|
|
61
|
+
None.
|
|
62
|
+
|
|
63
|
+
### Slots
|
|
64
|
+
|
|
65
|
+
| Name | Slot props |
|
|
66
|
+
| --- | --- |
|
|
67
|
+
| `default` | |
|
|
68
|
+
|
|
69
|
+
### Exposed (template ref)
|
|
70
|
+
|
|
71
|
+
None.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: BaseTabsIndicator
|
|
3
|
+
status: preferred
|
|
4
|
+
category: Navigation
|
|
5
|
+
summary: Animated underline that slides under the active BaseTabsTrigger.
|
|
6
|
+
import: @wikicasa-dev/components/UIKit/Tab/v2/BaseTabsIndicator
|
|
7
|
+
version: 3.0.0-alpha.3
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# BaseTabsIndicator
|
|
11
|
+
|
|
12
|
+
Animated underline that slides under the active BaseTabsTrigger.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import BaseTabsIndicator from "@wikicasa-dev/components/UIKit/Tab/v2/BaseTabsIndicator";
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Stylesheets: `css/BaseTabsIndicator`.
|
|
19
|
+
|
|
20
|
+
Part of the `BaseTabs` compound component: see the `BaseTabs` doc for the full composition. Optional: without it, the active trigger shows a static underline. Place it once, inside `BaseTabsList`.
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```vue
|
|
25
|
+
<script setup lang="ts">
|
|
26
|
+
import BaseTabsIndicator from "@wikicasa-dev/components/UIKit/Tab/v2/BaseTabsIndicator";
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<!-- inside <BaseTabs><BaseTabsList> -->
|
|
31
|
+
<BaseTabsIndicator />
|
|
32
|
+
</template>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Do / Don't
|
|
36
|
+
|
|
37
|
+
- It is a 2px bar positioned at the bottom of `BaseTabsList`; don't wrap it in other elements.
|
|
38
|
+
- To replace the bar's look, pass your own element in the default slot (it fills the indicator box).
|
|
39
|
+
- If the tabs' widths change after mount (fonts loading, labels changing), call the exposed `updateIndicatorStyle()` through a template ref to re-measure.
|
|
40
|
+
|
|
41
|
+
## Styling hooks
|
|
42
|
+
|
|
43
|
+
Color, radius and offset come from the CSS custom properties set on `BaseTabs`: `--indicator-bg-color`, `--indicator-border-radius-top`, `--indicator-border-radius-bottom`, `--indicator-bottom`.
|
|
44
|
+
|
|
45
|
+
## API
|
|
46
|
+
|
|
47
|
+
_Generated from the component's types. Do not edit by hand._
|
|
48
|
+
|
|
49
|
+
### Props
|
|
50
|
+
|
|
51
|
+
| Name | Type | Default | Required | Description |
|
|
52
|
+
| --- | --- | --- | --- | --- |
|
|
53
|
+
| `dataCy` | `string` | | | |
|
|
54
|
+
| `asChild` | `boolean` | | | Change the default rendered element for the one passed as a child, merging their props and behavior. Read our [Composition](https://www.reka-ui.com/docs/guides/composition) guide for more details. |
|
|
55
|
+
| `as` | `AsTag \| Component` | | | The element or component this component should render as. Can be overwritten by `asChild`. |
|
|
56
|
+
|
|
57
|
+
### Events
|
|
58
|
+
|
|
59
|
+
None.
|
|
60
|
+
|
|
61
|
+
### v-model
|
|
62
|
+
|
|
63
|
+
None.
|
|
64
|
+
|
|
65
|
+
### Slots
|
|
66
|
+
|
|
67
|
+
| Name | Slot props |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| `default` | |
|
|
70
|
+
|
|
71
|
+
### Exposed (template ref)
|
|
72
|
+
|
|
73
|
+
| Name | Type |
|
|
74
|
+
| --- | --- |
|
|
75
|
+
| `updateIndicatorStyle` | `() => void \| undefined` |
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: BaseTabsList
|
|
3
|
+
status: preferred
|
|
4
|
+
category: Navigation
|
|
5
|
+
summary: Row that holds the BaseTabsTrigger tabs (and the BaseTabsIndicator) inside BaseTabs.
|
|
6
|
+
import: @wikicasa-dev/components/UIKit/Tab/v2/BaseTabsList
|
|
7
|
+
version: 3.0.0-alpha.3
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# BaseTabsList
|
|
11
|
+
|
|
12
|
+
Row that holds the BaseTabsTrigger tabs (and the BaseTabsIndicator) inside BaseTabs.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import BaseTabsList from "@wikicasa-dev/components/UIKit/Tab/v2/BaseTabsList";
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Part of the `BaseTabs` compound component: see the `BaseTabs` doc for the full composition. Use exactly one per `BaseTabs`, as the parent of the triggers.
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```vue
|
|
23
|
+
<script setup lang="ts">
|
|
24
|
+
import BaseTabs from "@wikicasa-dev/components/UIKit/Tab/v2/BaseTabs";
|
|
25
|
+
import BaseTabsList from "@wikicasa-dev/components/UIKit/Tab/v2/BaseTabsList";
|
|
26
|
+
import BaseTabsIndicator from "@wikicasa-dev/components/UIKit/Tab/v2/BaseTabsIndicator";
|
|
27
|
+
import BaseTabsTrigger from "@wikicasa-dev/components/UIKit/Tab/v2/BaseTabsTrigger";
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<BaseTabs default-value="preferiti">
|
|
32
|
+
<BaseTabsList style="display: flex; gap: 36px; overflow-x: auto">
|
|
33
|
+
<BaseTabsIndicator />
|
|
34
|
+
<BaseTabsTrigger value="preferiti">Preferiti</BaseTabsTrigger>
|
|
35
|
+
<BaseTabsTrigger value="ricerche">Ricerche salvate</BaseTabsTrigger>
|
|
36
|
+
</BaseTabsList>
|
|
37
|
+
</BaseTabs>
|
|
38
|
+
</template>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Do / Don't
|
|
42
|
+
|
|
43
|
+
- It has no layout of its own besides `position: relative`: make it a flex row with a gap via your own `class`/`style`.
|
|
44
|
+
- On mobile, make long lists horizontally scrollable (`overflow-x: auto`) rather than wrapping.
|
|
45
|
+
- Arrow keys stop at the first and last tab; pass `loop` to make them wrap around (off by default here, unlike reka-ui).
|
|
46
|
+
|
|
47
|
+
## API
|
|
48
|
+
|
|
49
|
+
_Generated from the component's types. Do not edit by hand._
|
|
50
|
+
|
|
51
|
+
### Props
|
|
52
|
+
|
|
53
|
+
| Name | Type | Default | Required | Description |
|
|
54
|
+
| --- | --- | --- | --- | --- |
|
|
55
|
+
| `dataCy` | `string` | | | |
|
|
56
|
+
| `loop` | `boolean` | | | When `true`, keyboard navigation will loop from last tab to first, and vice versa. |
|
|
57
|
+
| `asChild` | `boolean` | | | Change the default rendered element for the one passed as a child, merging their props and behavior. Read our [Composition](https://www.reka-ui.com/docs/guides/composition) guide for more details. |
|
|
58
|
+
| `as` | `AsTag \| Component` | | | The element or component this component should render as. Can be overwritten by `asChild`. |
|
|
59
|
+
|
|
60
|
+
### Events
|
|
61
|
+
|
|
62
|
+
None.
|
|
63
|
+
|
|
64
|
+
### v-model
|
|
65
|
+
|
|
66
|
+
None.
|
|
67
|
+
|
|
68
|
+
### Slots
|
|
69
|
+
|
|
70
|
+
| Name | Slot props |
|
|
71
|
+
| --- | --- |
|
|
72
|
+
| `default` | |
|
|
73
|
+
|
|
74
|
+
### Exposed (template ref)
|
|
75
|
+
|
|
76
|
+
None.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: BaseTabsTrigger
|
|
3
|
+
status: preferred
|
|
4
|
+
category: Navigation
|
|
5
|
+
summary: A single tab button inside BaseTabsList; activates the BaseTabsContent with the same value.
|
|
6
|
+
import: @wikicasa-dev/components/UIKit/Tab/v2/BaseTabsTrigger
|
|
7
|
+
version: 3.0.0-alpha.3
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# BaseTabsTrigger
|
|
11
|
+
|
|
12
|
+
A single tab button inside BaseTabsList; activates the BaseTabsContent with the same value.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import BaseTabsTrigger from "@wikicasa-dev/components/UIKit/Tab/v2/BaseTabsTrigger";
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Part of the `BaseTabs` compound component: see the `BaseTabs` doc for the full composition. `value` (string or number) is required and must match a `BaseTabsContent` (or a computed panel value).
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```vue
|
|
23
|
+
<script setup lang="ts">
|
|
24
|
+
import BaseTabsTrigger from "@wikicasa-dev/components/UIKit/Tab/v2/BaseTabsTrigger";
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<!-- inside <BaseTabs><BaseTabsList> -->
|
|
29
|
+
<BaseTabsTrigger value="affitto" style="white-space: nowrap">Affitto</BaseTabsTrigger>
|
|
30
|
+
</template>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Do / Don't
|
|
34
|
+
|
|
35
|
+
- Default look: white background, 4px padding, 16px text, semibold when active. On a non-white container override it (`style="background: transparent"` or a class with `!important`).
|
|
36
|
+
- Style the active state with a `[data-state="active"]` selector; inactive triggers have `data-state="inactive"`.
|
|
37
|
+
- `disabled` makes the tab unselectable but has no UIKit styling; add your own via the `[data-disabled]` attribute.
|
|
38
|
+
- Keep labels short (one or two words); icons go in the default slot next to the text.
|
|
39
|
+
|
|
40
|
+
## API
|
|
41
|
+
|
|
42
|
+
_Generated from the component's types. Do not edit by hand._
|
|
43
|
+
|
|
44
|
+
### Props
|
|
45
|
+
|
|
46
|
+
| Name | Type | Default | Required | Description |
|
|
47
|
+
| --- | --- | --- | --- | --- |
|
|
48
|
+
| `dataCy` | `string` | | | |
|
|
49
|
+
| `value` | `T` | | yes | |
|
|
50
|
+
| `disabled` | `boolean` | | | When `true`, prevents the user from interacting with the tab. |
|
|
51
|
+
| `asChild` | `boolean` | | | Change the default rendered element for the one passed as a child, merging their props and behavior. Read our [Composition](https://www.reka-ui.com/docs/guides/composition) guide for more details. |
|
|
52
|
+
| `as` | `AsTag \| Component` | | | The element or component this component should render as. Can be overwritten by `asChild`. |
|
|
53
|
+
|
|
54
|
+
### Events
|
|
55
|
+
|
|
56
|
+
None.
|
|
57
|
+
|
|
58
|
+
### v-model
|
|
59
|
+
|
|
60
|
+
None.
|
|
61
|
+
|
|
62
|
+
### Slots
|
|
63
|
+
|
|
64
|
+
| Name | Slot props |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| `default` | |
|
|
67
|
+
|
|
68
|
+
### Exposed (template ref)
|
|
69
|
+
|
|
70
|
+
None.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: BaseTextarea
|
|
3
|
+
status: preferred
|
|
4
|
+
category: Forms
|
|
5
|
+
summary: Multi-line text field with floating label and validation state, matching BaseInput's look.
|
|
6
|
+
import: @wikicasa-dev/components/UIKit/BaseTextarea
|
|
7
|
+
version: 3.0.0-alpha.3
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# BaseTextarea
|
|
11
|
+
|
|
12
|
+
Multi-line text field with floating label and validation state, matching BaseInput's look.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import BaseTextarea from "@wikicasa-dev/components/UIKit/BaseTextarea";
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Stylesheets: `css/BaseTextarea`.
|
|
19
|
+
|
|
20
|
+
Use for free-text messages: contact-the-agency forms, listing descriptions, personal notes on a property. For a single line use `BaseInput`.
|
|
21
|
+
|
|
22
|
+
Only these attributes reach the `<textarea>`: `id`, `data-cy`, `rows`, `disabled`, `readonly`, plus `required` (adds the label asterisk). `class` styles the textarea itself; `wrapper-classes` styles the outer wrapper.
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
```vue
|
|
27
|
+
<script setup lang="ts">
|
|
28
|
+
import { computed, ref } from "vue";
|
|
29
|
+
import BaseTextarea from "@wikicasa-dev/components/UIKit/BaseTextarea";
|
|
30
|
+
|
|
31
|
+
const message = ref("");
|
|
32
|
+
const tooShort = computed(() => message.value.length > 0 && message.value.length < 20);
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<template>
|
|
36
|
+
<BaseTextarea
|
|
37
|
+
id="contact-agency-message"
|
|
38
|
+
v-model="message"
|
|
39
|
+
label-text="Messaggio per l'agenzia"
|
|
40
|
+
rows="5"
|
|
41
|
+
required
|
|
42
|
+
:is-valid="tooShort ? false : null"
|
|
43
|
+
:feedback="{ invalid: 'Scrivi almeno 20 caratteri' }"
|
|
44
|
+
/>
|
|
45
|
+
</template>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Do / Don't
|
|
49
|
+
|
|
50
|
+
- Do always pass an `id`: the textarea gets no generated id, and without one the floating label is not linked to it.
|
|
51
|
+
- Do always set `labelText`; it starts inline and floats when the field is focused or filled.
|
|
52
|
+
- Do use `isValid` as tri-state: `null` neutral, `true` blue, `false` red. `feedback.valid` / `feedback.invalid` show only in the matching state; pass a single string (HTML allowed).
|
|
53
|
+
- Do set `resize` to let the user resize the box vertically; it is off by default.
|
|
54
|
+
- Don't pass `placeholder`, `maxlength` or `name`: they are not forwarded to the textarea. Enforce length limits in your own logic.
|
|
55
|
+
- Don't expect `required` to block submit: it is visual only.
|
|
56
|
+
|
|
57
|
+
## Styling hooks
|
|
58
|
+
|
|
59
|
+
- `labelClasses` for the floating label; `class` for the textarea (padding, height); `wrapper-classes` for spacing around the field.
|
|
60
|
+
- Exposed methods for read-only "edit on focus" note patterns: `disableTextarea()`, `focusDisabledTextarea()`, `clearTextareaElem()`.
|
|
61
|
+
|
|
62
|
+
## API
|
|
63
|
+
|
|
64
|
+
_Generated from the component's types. Do not edit by hand._
|
|
65
|
+
|
|
66
|
+
### Props
|
|
67
|
+
|
|
68
|
+
| Name | Type | Default | Required | Description |
|
|
69
|
+
| --- | --- | --- | --- | --- |
|
|
70
|
+
| `labelText` | `string` | `""` | | |
|
|
71
|
+
| `feedback` | `FeedbackLabels` | | | |
|
|
72
|
+
| `isValid` | `Nullable<boolean>` | `null` | | |
|
|
73
|
+
| `resize` | `boolean` | `false` | | |
|
|
74
|
+
| `labelClasses` | `ClassTypeProp` | | | |
|
|
75
|
+
| `modelValue` | `string` | `""` | | |
|
|
76
|
+
|
|
77
|
+
### Events
|
|
78
|
+
|
|
79
|
+
| Name | Payload |
|
|
80
|
+
| --- | --- |
|
|
81
|
+
| `update:modelValue` | `[value: string \| undefined]` |
|
|
82
|
+
| `click` | `[MouseEvent]` |
|
|
83
|
+
| `keydown` | `[KeyboardEvent]` |
|
|
84
|
+
| `focusin` | |
|
|
85
|
+
| `focusout` | |
|
|
86
|
+
|
|
87
|
+
### v-model
|
|
88
|
+
|
|
89
|
+
- `v-model` binds `modelValue` (`string`)
|
|
90
|
+
|
|
91
|
+
### Slots
|
|
92
|
+
|
|
93
|
+
None.
|
|
94
|
+
|
|
95
|
+
### Exposed (template ref)
|
|
96
|
+
|
|
97
|
+
| Name | Type |
|
|
98
|
+
| --- | --- |
|
|
99
|
+
| `disableTextarea` | `() => void` |
|
|
100
|
+
| `clearTextareaElem` | `() => void` |
|
|
101
|
+
| `focusDisabledTextarea` | `() => void` |
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: BaseToggle
|
|
3
|
+
status: preferred
|
|
4
|
+
category: Forms
|
|
5
|
+
summary: On/off switch bound to a boolean, with a label on the left or right.
|
|
6
|
+
import: @wikicasa-dev/components/UIKit/BaseToggle
|
|
7
|
+
version: 3.0.0-alpha.3
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# BaseToggle
|
|
11
|
+
|
|
12
|
+
On/off switch bound to a boolean, with a label on the left or right.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import BaseToggle from "@wikicasa-dev/components/UIKit/BaseToggle";
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Use for a yes/no setting that applies immediately or a boolean property feature: "Balcone", "Cantina", "Giardino privato", "Ricevi avvisi via email". For choosing between two named options (e.g. "Privato" / "Agenzia") use `BaseComplexToggle`; for a consent or a choice that's submitted with a form use `CheckboxBtn`.
|
|
19
|
+
|
|
20
|
+
`v-model` is a boolean. The text comes from the `label` prop (rendered on the right, HTML allowed), or from the `leftLabel` / `rightLabel` slots. With `leftLabel` the right label is not rendered.
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```vue
|
|
25
|
+
<script setup lang="ts">
|
|
26
|
+
import { ref } from "vue";
|
|
27
|
+
import BaseToggle from "@wikicasa-dev/components/UIKit/BaseToggle";
|
|
28
|
+
|
|
29
|
+
const hasBalcony = ref(false);
|
|
30
|
+
const hasCellar = ref(true);
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<BaseToggle v-model="hasBalcony" data-cy="toggle-balcony" label="Balcone" />
|
|
35
|
+
|
|
36
|
+
<!-- Label on the left, switch pushed to the right edge of the row -->
|
|
37
|
+
<BaseToggle v-model="hasCellar" data-cy="toggle-cellar" style="justify-content: space-between">
|
|
38
|
+
<template #leftLabel>
|
|
39
|
+
<span>Cantina</span>
|
|
40
|
+
</template>
|
|
41
|
+
</BaseToggle>
|
|
42
|
+
</template>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Do / Don't
|
|
46
|
+
|
|
47
|
+
- Do always show visible text next to the switch (via `label` or a slot): the switch itself carries no accessible name, so the adjacent text is all users get.
|
|
48
|
+
- Do use it for settings that take effect right away; use a checkbox when the value is only applied on submit.
|
|
49
|
+
- Don't put the label in both slots; only one side is rendered.
|
|
50
|
+
- Don't pass `aria-label` expecting it on the switch: attributes land on the wrapper `<div>`.
|
|
51
|
+
|
|
52
|
+
## Styling hooks
|
|
53
|
+
|
|
54
|
+
- `class` / `style` go on the flex row wrapping label and switch (gap 8px); use them for layout such as `justify-content: space-between`.
|
|
55
|
+
- The switch is a `button` with `data-state="checked|unchecked"`; the checked track uses the primary color, unchecked the light (`w-cultured`) one.
|
|
56
|
+
|
|
57
|
+
## API
|
|
58
|
+
|
|
59
|
+
_Generated from the component's types. Do not edit by hand._
|
|
60
|
+
|
|
61
|
+
### Props
|
|
62
|
+
|
|
63
|
+
| Name | Type | Default | Required | Description |
|
|
64
|
+
| --- | --- | --- | --- | --- |
|
|
65
|
+
| `label` | `string` | | | |
|
|
66
|
+
| `dataCy` | `string` | | | |
|
|
67
|
+
| `modelValue` | `Optional<boolean>` | `false` | | |
|
|
68
|
+
|
|
69
|
+
### Events
|
|
70
|
+
|
|
71
|
+
| Name | Payload |
|
|
72
|
+
| --- | --- |
|
|
73
|
+
| `update:modelValue` | `[value: Optional<boolean>]` |
|
|
74
|
+
|
|
75
|
+
### v-model
|
|
76
|
+
|
|
77
|
+
- `v-model` binds `modelValue` (`Optional<boolean>`)
|
|
78
|
+
|
|
79
|
+
### Slots
|
|
80
|
+
|
|
81
|
+
| Name | Slot props |
|
|
82
|
+
| --- | --- |
|
|
83
|
+
| `leftLabel` | |
|
|
84
|
+
| `rightLabel` | |
|
|
85
|
+
|
|
86
|
+
### Exposed (template ref)
|
|
87
|
+
|
|
88
|
+
None.
|