@wikicasa-dev/components 2.9.1-alpha.3 → 2.10.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/UIKit/BaseSnackbar.vue.js +1 -1
  2. package/dist/assets/AccessibleSelect.css +1 -1
  3. package/dist/assets/BaseBadge.css +1 -1
  4. package/dist/assets/BaseComplexToggle2.css +1 -1
  5. package/dist/assets/BaseDropDown.css +1 -1
  6. package/dist/assets/BaseFloatingLabel2.css +1 -1
  7. package/dist/assets/BaseSlider2.css +1 -1
  8. package/dist/assets/BaseSnackbar.css +1 -1
  9. package/dist/assets/BaseTabs.css +1 -1
  10. package/dist/assets/BaseTextarea2.css +1 -1
  11. package/dist/assets/BaseTooltip2.css +1 -1
  12. package/dist/assets/baseAlert.css +1 -1
  13. package/dist/assets/baseComplexToggle.css +1 -1
  14. package/dist/assets/baseFloatingLabel.css +1 -1
  15. package/dist/assets/baseSlider.css +1 -1
  16. package/dist/assets/baseTextarea.css +1 -1
  17. package/dist/assets/baseTooltip.css +1 -1
  18. package/dist/assets/tailwind.css +1 -1
  19. package/dist/assets/tokens.css +1 -0
  20. package/dist/docs/AccessibleSelect.md +121 -0
  21. package/dist/docs/AccordionContentPrimitive.md +70 -0
  22. package/dist/docs/AccordionHeaderPrimitive.md +70 -0
  23. package/dist/docs/AccordionItemPrimitive.md +98 -0
  24. package/dist/docs/AccordionTriggerPrimitive.md +71 -0
  25. package/dist/docs/BaseAccordion.md +98 -0
  26. package/dist/docs/BaseAccordionItem.md +100 -0
  27. package/dist/docs/BaseAlert.md +83 -0
  28. package/dist/docs/BaseAutocomplete.md +125 -0
  29. package/dist/docs/BaseBadge.md +92 -0
  30. package/dist/docs/BaseBreadcrumb.md +83 -0
  31. package/dist/docs/BaseButton.md +129 -0
  32. package/dist/docs/BaseCard.md +110 -0
  33. package/dist/docs/BaseComplexToggle.md +99 -0
  34. package/dist/docs/BaseDropDown.md +122 -0
  35. package/dist/docs/BaseFloatingLabel.md +89 -0
  36. package/dist/docs/BaseInput.md +130 -0
  37. package/dist/docs/BaseModal.md +129 -0
  38. package/dist/docs/BasePagination.md +109 -0
  39. package/dist/docs/BaseShimmerLoader.md +86 -0
  40. package/dist/docs/BaseSlider.md +87 -0
  41. package/dist/docs/BaseSnackbar.md +120 -0
  42. package/dist/docs/BaseTab.md +84 -0
  43. package/dist/docs/BaseTabView.md +90 -0
  44. package/dist/docs/BaseTabs.md +116 -0
  45. package/dist/docs/BaseTabsContent.md +71 -0
  46. package/dist/docs/BaseTabsIndicator.md +73 -0
  47. package/dist/docs/BaseTabsList.md +76 -0
  48. package/dist/docs/BaseTabsTrigger.md +70 -0
  49. package/dist/docs/BaseTextarea.md +99 -0
  50. package/dist/docs/BaseToggle.md +88 -0
  51. package/dist/docs/BaseTooltip.md +87 -0
  52. package/dist/docs/BaseUploadFile.md +96 -0
  53. package/dist/docs/CardDescriptionPrimitive.md +73 -0
  54. package/dist/docs/CardImagePrimitive.md +73 -0
  55. package/dist/docs/CardRootPrimitive.md +99 -0
  56. package/dist/docs/CheckboxBtn.md +96 -0
  57. package/dist/docs/CheckboxButtonGroup.md +115 -0
  58. package/dist/docs/CheckboxGroup.md +102 -0
  59. package/dist/docs/CheckboxGroupItemPrimitive.md +104 -0
  60. package/dist/docs/CheckboxGroupPrimitive.md +105 -0
  61. package/dist/docs/ClearableAutocomplete.md +135 -0
  62. package/dist/docs/DoughnutChart.md +88 -0
  63. package/dist/docs/INDEX.md +133 -0
  64. package/dist/docs/IntersectionObservable.md +78 -0
  65. package/dist/docs/IntersectionObserver.md +84 -0
  66. package/dist/docs/IntersectionObserverProvider.md +98 -0
  67. package/dist/docs/IntersectionObserverTarget.md +73 -0
  68. package/dist/docs/LineChart.md +98 -0
  69. package/dist/docs/ProgressIndicatorPrimitive.md +70 -0
  70. package/dist/docs/ProgressRootPrimitive.md +106 -0
  71. package/dist/docs/RadioButton.md +86 -0
  72. package/dist/docs/RadioButtonGroup.md +107 -0
  73. package/dist/docs/RadioButtonItem.md +101 -0
  74. package/dist/docs/RadioGroup.md +95 -0
  75. package/dist/docs/RadioGroupItemPrimitive.md +102 -0
  76. package/dist/docs/SelectItem.md +100 -0
  77. package/dist/docs/ShimmerMultiLine.md +79 -0
  78. package/dist/docs/SimpleSlider.md +80 -0
  79. package/dist/docs/StaticSpinner.md +76 -0
  80. package/dist/docs/SwiperCarousel.md +126 -0
  81. package/dist/docs/SwiperNavigationPrimitive.md +83 -0
  82. package/dist/docs/SwiperPaginationPrimitive.md +80 -0
  83. package/dist/docs/SwiperPrimitive.md +77 -0
  84. package/dist/docs/SwiperRootPrimitive.md +123 -0
  85. package/dist/docs/SwiperSlide.md +75 -0
  86. package/dist/docs/SwiperSlideImagePrimitive.md +98 -0
  87. package/dist/docs/SwiperThumbnailPrimitive.md +96 -0
  88. package/dist/docs/TOKENS.md +50 -0
  89. package/dist/docs/agent-index.md +86 -0
  90. package/dist/lazyModules/Swiper/Autoplay/index.js +1 -1
  91. package/dist/lazyModules/Swiper/Controller/index.js +1 -1
  92. package/dist/lazyModules/Swiper/Keyboard/index.js +1 -1
  93. package/dist/lazyModules/Swiper/Thumbs/index.js +1 -1
  94. package/package.json +7 -6
  95. /package/dist/assets/{swiper-controller.css → swiper-keyboard.css} +0 -0
@@ -0,0 +1,77 @@
1
+ ---
2
+ name: SwiperPrimitive
3
+ status: primitive
4
+ category: Media
5
+ summary: The slide track (.swiper-wrapper) of a SwiperRootPrimitive carousel; holds the slides and emits click.
6
+ import: @wikicasa-dev/components/generic/carousel/Primitive/SwiperPrimitive
7
+ version: 2.10.0-alpha.0
8
+ ---
9
+
10
+ # SwiperPrimitive
11
+
12
+ > **Primitive.** A low-level building block. Prefer a `preferred` component; use primitives only to compose something that doesn't exist yet.
13
+
14
+ The slide track (.swiper-wrapper) of a SwiperRootPrimitive carousel; holds the slides and emits click.
15
+
16
+ ```ts
17
+ import SwiperPrimitive from "@wikicasa-dev/components/generic/carousel/Primitive/SwiperPrimitive";
18
+ ```
19
+
20
+ The `.swiper-wrapper` element of a primitive carousel. Place it as the first child of `SwiperRootPrimitive` and put the slides (`SwiperSlide` or `SwiperSlideImagePrimitive`) inside it. See `SwiperRootPrimitive` for the full composition.
21
+
22
+ ## Usage
23
+
24
+ ```vue
25
+ <script setup lang="ts">
26
+ import SwiperRootPrimitive from "@wikicasa-dev/components/generic/carousel/Primitive/SwiperRootPrimitive";
27
+ import SwiperPrimitive from "@wikicasa-dev/components/generic/carousel/Primitive/SwiperPrimitive";
28
+ import SwiperSlide from "@wikicasa-dev/components/generic/carousel/SwiperSlide";
29
+
30
+ const partners = ["Agenzia Duomo", "Casa Navigli", "Immobiliare Brera", "Studio Isola"];
31
+ const openGallery = () => console.log("open fullscreen gallery");
32
+ </script>
33
+
34
+ <template>
35
+ <SwiperRootPrimitive :swiper-options="{ slidesPerView: 2, loop: true, autoplay: { delay: 2000 } }">
36
+ <SwiperPrimitive @click="openGallery">
37
+ <SwiperSlide v-for="p in partners" :key="p">{{ p }}</SwiperSlide>
38
+ </SwiperPrimitive>
39
+ </SwiperRootPrimitive>
40
+ </template>
41
+ ```
42
+
43
+ ## Do / Don't
44
+
45
+ - Do use exactly one per `SwiperRootPrimitive`, as its direct child, with only slides inside.
46
+ - Do listen for `click` here (the root's own `click` is never emitted). Pagination and arrows stop their clicks, so they don't trigger it.
47
+ - `class` lands on the `.swiper-wrapper` element, e.g. vertical padding so slide shadows aren't clipped.
48
+
49
+ ## API
50
+
51
+ _Generated from the component's types. Do not edit by hand._
52
+
53
+ ### Props
54
+
55
+ | Name | Type | Default | Required | Description |
56
+ | --- | --- | --- | --- | --- |
57
+ | `dataCy` | `string` | | | |
58
+
59
+ ### Events
60
+
61
+ | Name | Payload |
62
+ | --- | --- |
63
+ | `click` | `[MouseEvent]` |
64
+
65
+ ### v-model
66
+
67
+ None.
68
+
69
+ ### Slots
70
+
71
+ | Name | Slot props |
72
+ | --- | --- |
73
+ | `default` | |
74
+
75
+ ### Exposed (template ref)
76
+
77
+ None.
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: SwiperRootPrimitive
3
+ status: primitive
4
+ category: Media
5
+ summary: Root of the composable Swiper carousel; owns the Swiper instance, deferred image loading and the reveal.
6
+ import: @wikicasa-dev/components/generic/carousel/Primitive/SwiperRootPrimitive
7
+ version: 2.10.0-alpha.0
8
+ ---
9
+
10
+ # SwiperRootPrimitive
11
+
12
+ > **Primitive.** A low-level building block. Prefer a `preferred` component; use primitives only to compose something that doesn't exist yet.
13
+
14
+ Root of the composable Swiper carousel; owns the Swiper instance, deferred image loading and the reveal.
15
+
16
+ ```ts
17
+ import SwiperRootPrimitive from "@wikicasa-dev/components/generic/carousel/Primitive/SwiperRootPrimitive";
18
+ ```
19
+
20
+ Build a custom carousel from parts when `SwiperCarousel` isn't enough: a photo gallery that downloads only the photos near the current one, a thumbnail strip, your own arrow buttons. The parts:
21
+
22
+ - `SwiperRootPrimitive`: creates and destroys the Swiper instance from `swiper-options` (any Swiper option except `pagination`/`navigation`, e.g. `slidesPerView`, `loop`, `rewind`, `keyboard`, `autoplay`, `zoom`, `breakpoints`). Slots: default (the parts below), `#placeholder` (laid over the carousel until it is ready), `#thumbs` (rendered outside the clipped `.swiper` box).
23
+ - `SwiperPrimitive`: the slide track; put the slides in it.
24
+ - `SwiperSlide` (any content) or `SwiperSlideImagePrimitive` (one image, optionally deferred with `lazy`).
25
+ - `SwiperPaginationPrimitive`, `SwiperNavigationPrimitive`: bullets/fraction and arrows, next to `SwiperPrimitive`.
26
+ - `SwiperThumbnailPrimitive`: thumbnail strip linked to the carousel, in `#thumbs`.
27
+
28
+ The carousel stays at `opacity: 0` (space reserved) until Swiper has started and the active slide's images have loaded (6s at most), then appears. Images with `data-src` (or `SwiperSlideImagePrimitive` with `lazy`) load only when their slide is on screen or within `preload-count` slides of it.
29
+
30
+ ## Usage
31
+
32
+ ```vue
33
+ <script setup lang="ts">
34
+ import SwiperRootPrimitive from "@wikicasa-dev/components/generic/carousel/Primitive/SwiperRootPrimitive";
35
+ import SwiperPrimitive from "@wikicasa-dev/components/generic/carousel/Primitive/SwiperPrimitive";
36
+ import SwiperSlideImagePrimitive from "@wikicasa-dev/components/generic/carousel/Primitive/SwiperSlideImagePrimitive";
37
+ import SwiperPaginationPrimitive from "@wikicasa-dev/components/generic/carousel/Primitive/SwiperPaginationPrimitive";
38
+ import SwiperNavigationPrimitive from "@wikicasa-dev/components/generic/carousel/Primitive/SwiperNavigationPrimitive";
39
+ import SwiperThumbnailPrimitive from "@wikicasa-dev/components/generic/carousel/Primitive/SwiperThumbnailPrimitive";
40
+
41
+ const photos = [
42
+ { src: "/img/villa-1.jpg", alt: "Villa a Lucca, facciata" },
43
+ { src: "/img/villa-2.jpg", alt: "Villa a Lucca, soggiorno" },
44
+ { src: "/img/villa-3.jpg", alt: "Villa a Lucca, giardino" },
45
+ ];
46
+ </script>
47
+
48
+ <template>
49
+ <SwiperRootPrimitive class="gallery" :preload-count="1" :swiper-options="{ slidesPerView: 1, keyboard: { enabled: true } }">
50
+ <SwiperPrimitive>
51
+ <SwiperSlideImagePrimitive
52
+ v-for="(p, i) in photos" :key="p.src" :src="p.src" :alt="p.alt" :width="800" :height="600"
53
+ :lazy="i > 0" :fetchpriority="i === 0 ? 'high' : 'low'" img-classes="gallery__img"
54
+ />
55
+ </SwiperPrimitive>
56
+ <SwiperPaginationPrimitive :options="{ type: 'fraction' }" />
57
+ <SwiperNavigationPrimitive />
58
+
59
+ <template #thumbs>
60
+ <SwiperThumbnailPrimitive :swiper-options="{ slidesPerView: 4, spaceBetween: 8, freeMode: true }">
61
+ <SwiperSlideImagePrimitive v-for="p in photos" :key="p.src" :src="p.src" :alt="p.alt" lazy img-classes="gallery__thumb" />
62
+ </SwiperThumbnailPrimitive>
63
+ </template>
64
+ </SwiperRootPrimitive>
65
+ </template>
66
+
67
+ <style scoped>
68
+ .gallery :deep(.gallery__img) { width: 100%; height: 480px; object-fit: cover; }
69
+ .gallery :deep(.gallery__thumb) { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }
70
+ </style>
71
+ ```
72
+
73
+ ## Do / Don't
74
+
75
+ - Do render pagination, navigation and thumbnail primitives unconditionally: they register with the root while it is being created; adding one later (`v-if` turning true) has no effect.
76
+ - Do give the first, visible slide's image a real `src` (not `lazy`) and `fetchpriority="high"`; defer the rest.
77
+ - Don't change `root-classes` after mount (Swiper's own classes on that element would be wiped); put toggling classes on the component itself (`class` lands on an outer wrapper).
78
+ - Don't listen for `@click` here (never emitted); put it on `SwiperPrimitive`. `init` hands you the Swiper instance (also exposed as `swiper`), handy for your own prev/next buttons: `swiper.slidePrev()`.
79
+ - Treat `swiper-options` as fixed; use the exposed `updateSlidesPerView(n)` to change slides per view.
80
+ - Swiper's stylesheets load with Swiper after mount. A server-rendered carousel whose pre-start layout must already be right imports them itself, as wikicasa-nuxt does: `@import "@wikicasa-dev/components/css/swiper-swiper";` (plus `swiper-zoom`).
81
+
82
+ ## Styling hooks
83
+
84
+ Same Swiper CSS variables as `SwiperCarousel` (`--swiper-pagination-*`, `--swiper-navigation-*`), set with `:deep()` from a wrapper. The active thumbnail slide has `.swiper-slide-thumb-active`.
85
+
86
+ ## API
87
+
88
+ _Generated from the component's types. Do not edit by hand._
89
+
90
+ ### Props
91
+
92
+ | Name | Type | Default | Required | Description |
93
+ | --- | --- | --- | --- | --- |
94
+ | `rootClasses` | `ClassTypeProp` | | | |
95
+ | `swiperOptions` | `SwiperRootPrimitiveProps` | | | |
96
+ | `preloadCount` | `number` | | | Slides to promote beyond each edge of the visible window. Falls back to `swiperOptions.lazyPreloadPrevNext` when unset, which is how this was configured before and stays supported - but that option's documented job is Swiper's own `loading="lazy"` preloading, which these slides do not use. Prefer this prop. |
97
+
98
+ ### Events
99
+
100
+ | Name | Payload |
101
+ | --- | --- |
102
+ | `click` | |
103
+ | `moved` | `[{ activeIndex: number; }]` |
104
+ | `init` | `[Swiper]` |
105
+
106
+ ### v-model
107
+
108
+ None.
109
+
110
+ ### Slots
111
+
112
+ | Name | Slot props |
113
+ | --- | --- |
114
+ | `default` | |
115
+ | `placeholder` | |
116
+ | `thumbs` | |
117
+
118
+ ### Exposed (template ref)
119
+
120
+ | Name | Type |
121
+ | --- | --- |
122
+ | `swiper` | `Nullable<Swiper>` |
123
+ | `updateSlidesPerView` | `(value: number) => void` |
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: SwiperSlide
3
+ status: preferred
4
+ category: Media
5
+ summary: One slide of a SwiperCarousel or SwiperPrimitive track; holds any content (card, image, banner).
6
+ import: @wikicasa-dev/components/generic/carousel/SwiperSlide
7
+ version: 2.10.0-alpha.0
8
+ ---
9
+
10
+ # SwiperSlide
11
+
12
+ One slide of a SwiperCarousel or SwiperPrimitive track; holds any content (card, image, banner).
13
+
14
+ ```ts
15
+ import SwiperSlide from "@wikicasa-dev/components/generic/carousel/SwiperSlide";
16
+ ```
17
+
18
+ A single slide. Put one `SwiperSlide` per item in the default slot of `SwiperCarousel`, or inside `SwiperPrimitive` when composing primitives (see `SwiperRootPrimitive`). It renders `.swiper-slide` > `.swiper-zoom-container` > your content.
19
+
20
+ The inner zoom container is a centered flex box filling the slide, so content is centered horizontally and vertically, and a direct `<img>` child is fitted with `object-fit: contain`.
21
+
22
+ ## Usage
23
+
24
+ ```vue
25
+ <script setup lang="ts">
26
+ import SwiperCarousel from "@wikicasa-dev/components/generic/carousel/SwiperCarousel";
27
+ import SwiperSlide from "@wikicasa-dev/components/generic/carousel/SwiperSlide";
28
+
29
+ const agents = ["Giulia Rossi", "Marco Bianchi", "Sara Esposito"];
30
+ </script>
31
+
32
+ <template>
33
+ <SwiperCarousel id="agents" :swiper-options="{ slidesPerView: 1, pagination: true }">
34
+ <SwiperSlide v-for="name in agents" :key="name">
35
+ <div class="agent">{{ name }} · Agente immobiliare, Napoli</div>
36
+ </SwiperSlide>
37
+ </SwiperCarousel>
38
+ </template>
39
+
40
+ <style scoped>
41
+ .agent { width: 100%; padding: 24px; }
42
+ </style>
43
+ ```
44
+
45
+ ## Do / Don't
46
+
47
+ - Do give slide content `width: 100%` when it should fill the slide; otherwise it shrinks to its content and sits centered.
48
+ - `class` and other attributes land on the `.swiper-slide` element (e.g. margins for room under the pagination).
49
+ - Don't set the slide's width yourself; Swiper computes it from `slidesPerView` and `spaceBetween`.
50
+
51
+ ## API
52
+
53
+ _Generated from the component's types. Do not edit by hand._
54
+
55
+ ### Props
56
+
57
+ None.
58
+
59
+ ### Events
60
+
61
+ None.
62
+
63
+ ### v-model
64
+
65
+ None.
66
+
67
+ ### Slots
68
+
69
+ | Name | Slot props |
70
+ | --- | --- |
71
+ | `default` | |
72
+
73
+ ### Exposed (template ref)
74
+
75
+ None.
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: SwiperSlideImagePrimitive
3
+ status: primitive
4
+ category: Media
5
+ summary: A slide holding one image, with optional deferred loading driven by SwiperRootPrimitive or SwiperThumbnailPrimitive.
6
+ import: @wikicasa-dev/components/generic/carousel/Primitive/SwiperSlideImagePrimitive
7
+ version: 2.10.0-alpha.0
8
+ ---
9
+
10
+ # SwiperSlideImagePrimitive
11
+
12
+ > **Primitive.** A low-level building block. Prefer a `preferred` component; use primitives only to compose something that doesn't exist yet.
13
+
14
+ A slide holding one image, with optional deferred loading driven by SwiperRootPrimitive or SwiperThumbnailPrimitive.
15
+
16
+ ```ts
17
+ import SwiperSlideImagePrimitive from "@wikicasa-dev/components/generic/carousel/Primitive/SwiperSlideImagePrimitive";
18
+ ```
19
+
20
+ A `SwiperSlide` containing a single `<img>`, for photo galleries built from primitives. With `lazy`, the image is rendered without `src` (as `data-src` / `data-srcset`) and the surrounding `SwiperRootPrimitive` or `SwiperThumbnailPrimitive` sets the real source only when the slide is on screen or near it, so a 30-photo gallery doesn't download 30 photos up front. See `SwiperRootPrimitive` for the full composition.
21
+
22
+ ## Usage
23
+
24
+ ```vue
25
+ <script setup lang="ts">
26
+ import SwiperRootPrimitive from "@wikicasa-dev/components/generic/carousel/Primitive/SwiperRootPrimitive";
27
+ import SwiperPrimitive from "@wikicasa-dev/components/generic/carousel/Primitive/SwiperPrimitive";
28
+ import SwiperSlideImagePrimitive from "@wikicasa-dev/components/generic/carousel/Primitive/SwiperSlideImagePrimitive";
29
+
30
+ const photos = ["/img/attico-1.jpg", "/img/attico-2.jpg", "/img/attico-3.jpg"];
31
+ </script>
32
+
33
+ <template>
34
+ <SwiperRootPrimitive class="card-photos" :swiper-options="{ rewind: true }">
35
+ <SwiperPrimitive>
36
+ <SwiperSlideImagePrimitive
37
+ v-for="(src, i) in photos"
38
+ :key="src"
39
+ :src="src"
40
+ :alt="`Attico a Roma, foto ${i + 1}`"
41
+ :width="343"
42
+ :height="184"
43
+ :lazy="i > 0"
44
+ img-classes="card-photos__img"
45
+ />
46
+ </SwiperPrimitive>
47
+ </SwiperRootPrimitive>
48
+ </template>
49
+
50
+ <style scoped>
51
+ .card-photos :deep(.card-photos__img) { width: 100%; height: 184px; object-fit: cover; }
52
+ </style>
53
+ ```
54
+
55
+ ## Do / Don't
56
+
57
+ - Do use `lazy` only inside `SwiperRootPrimitive` or `SwiperThumbnailPrimitive`; anywhere else (including `SwiperCarousel`) a lazy image never loads.
58
+ - Do leave the first visible image non-lazy, ideally with `fetchpriority="high"`.
59
+ - Do style the image with `img-classes`. `class` and other attributes (`data-*`, `itemprop`) land on the slide `<div>`, not the `<img>`.
60
+ - To crop with `object-fit: cover`, use a selector stronger than one class (as above) or `!important`: Swiper's zoom stylesheet sets `object-fit: contain` on slide images.
61
+ - `lazy` is read once when the slide is created.
62
+
63
+ ## API
64
+
65
+ _Generated from the component's types. Do not edit by hand._
66
+
67
+ ### Props
68
+
69
+ | Name | Type | Default | Required | Description |
70
+ | --- | --- | --- | --- | --- |
71
+ | `src` | `string` | | | |
72
+ | `srcset` | `string` | | | |
73
+ | `alt` | `string` | | | |
74
+ | `width` | `number` | | | |
75
+ | `height` | `number` | | | |
76
+ | `sizes` | `string` | | | |
77
+ | `imgClasses` | `ClassTypeProp` | | | |
78
+ | `decoding` | `"auto" \| "sync" \| "async"` | | | |
79
+ | `crossorigin` | `"anonymous" \| "use-credentials"` | | | |
80
+ | `fetchpriority` | `"auto" \| "high" \| "low"` | | | |
81
+ | `loading` | `"lazy" \| "eager"` | | | |
82
+ | `lazy` | `boolean` | | | |
83
+
84
+ ### Events
85
+
86
+ None.
87
+
88
+ ### v-model
89
+
90
+ None.
91
+
92
+ ### Slots
93
+
94
+ None.
95
+
96
+ ### Exposed (template ref)
97
+
98
+ None.
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: SwiperThumbnailPrimitive
3
+ status: primitive
4
+ category: Media
5
+ summary: Thumbnail strip linked to a SwiperRootPrimitive carousel; tapping a thumbnail shows that slide.
6
+ import: @wikicasa-dev/components/generic/carousel/Primitive/SwiperThumbnailPrimitive
7
+ version: 2.10.0-alpha.0
8
+ ---
9
+
10
+ # SwiperThumbnailPrimitive
11
+
12
+ > **Primitive.** A low-level building block. Prefer a `preferred` component; use primitives only to compose something that doesn't exist yet.
13
+
14
+ Thumbnail strip linked to a SwiperRootPrimitive carousel; tapping a thumbnail shows that slide.
15
+
16
+ ```ts
17
+ import SwiperThumbnailPrimitive from "@wikicasa-dev/components/generic/carousel/Primitive/SwiperThumbnailPrimitive";
18
+ ```
19
+
20
+ A second, smaller Swiper that acts as the carousel's thumbnail rail: tapping a thumbnail moves the main carousel there, and the current one gets `.swiper-slide-thumb-active`. Put it in `SwiperRootPrimitive`'s `#thumbs` slot (outside the clipped carousel box) and fill it with `SwiperSlideImagePrimitive` slides using `lazy`, so only the thumbnails on screen (plus `preload-count`, default 1, on each side) load. See `SwiperRootPrimitive` for the full composition.
21
+
22
+ `swiper-options` takes Swiper options for the strip itself (e.g. `slidesPerView`, `spaceBetween`, `freeMode: true` for free scrolling); `root-classes` and `wrapper-classes` add classes to its `.swiper` and `.swiper-wrapper` elements.
23
+
24
+ ## Usage
25
+
26
+ ```vue
27
+ <script setup lang="ts">
28
+ import SwiperRootPrimitive from "@wikicasa-dev/components/generic/carousel/Primitive/SwiperRootPrimitive";
29
+ import SwiperPrimitive from "@wikicasa-dev/components/generic/carousel/Primitive/SwiperPrimitive";
30
+ import SwiperSlideImagePrimitive from "@wikicasa-dev/components/generic/carousel/Primitive/SwiperSlideImagePrimitive";
31
+ import SwiperThumbnailPrimitive from "@wikicasa-dev/components/generic/carousel/Primitive/SwiperThumbnailPrimitive";
32
+
33
+ const photos = ["/img/rustico-1.jpg", "/img/rustico-2.jpg", "/img/rustico-3.jpg", "/img/rustico-4.jpg", "/img/rustico-5.jpg"];
34
+ </script>
35
+
36
+ <template>
37
+ <SwiperRootPrimitive class="gallery">
38
+ <SwiperPrimitive>
39
+ <SwiperSlideImagePrimitive v-for="(src, i) in photos" :key="src" :src="src" :alt="`Rustico in Umbria, foto ${i + 1}`" :lazy="i > 0" />
40
+ </SwiperPrimitive>
41
+ <template #thumbs>
42
+ <SwiperThumbnailPrimitive :swiper-options="{ slidesPerView: 4, spaceBetween: 8, freeMode: true }">
43
+ <SwiperSlideImagePrimitive v-for="(src, i) in photos" :key="src" :src="src" :alt="`Miniatura ${i + 1}`" lazy img-classes="thumb" />
44
+ </SwiperThumbnailPrimitive>
45
+ </template>
46
+ </SwiperRootPrimitive>
47
+ </template>
48
+
49
+ <style scoped>
50
+ .gallery :deep(.thumb) { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; opacity: 0.6; }
51
+ .gallery :deep(.swiper-slide-thumb-active .thumb) { opacity: 1; }
52
+ </style>
53
+ ```
54
+
55
+ ## Do / Don't
56
+
57
+ - Do place it in the root's `#thumbs` slot, rendered from the start (it registers with the root while the carousel is created).
58
+ - Do use thumbnail-sized image URLs, not the full photos.
59
+ - Don't pass `thumbs`, `watchSlidesProgress` or `slideToClickedSlide` in `swiper-options`; the link to the carousel sets them.
60
+ - The strip's Swiper instance is exposed as `swiper` and passed by `@init`.
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
+ | `dataCy` | `string` | | | |
71
+ | `rootClasses` | `ClassTypeProp` | | | |
72
+ | `wrapperClasses` | `ClassTypeProp` | | | |
73
+ | `swiperOptions` | `SwiperThumbnailPrimitiveProps` | | | |
74
+ | `preloadCount` | `number` | `1` | | Thumbnails to promote beyond each edge of the visible window. A rail whose next thumbnail pops in under the finger reads as broken, so this leans one slide out by default. Deliberately not Swiper's `lazyPreloadPrevNext`: that option drives Swiper's own `loading="lazy"` preloading, which these slides do not use - borrowing it would both misname the knob and switch on a second preloading pass on every slide change. |
75
+
76
+ ### Events
77
+
78
+ | Name | Payload |
79
+ | --- | --- |
80
+ | `init` | `[Swiper]` |
81
+
82
+ ### v-model
83
+
84
+ None.
85
+
86
+ ### Slots
87
+
88
+ | Name | Slot props |
89
+ | --- | --- |
90
+ | `default` | |
91
+
92
+ ### Exposed (template ref)
93
+
94
+ | Name | Type |
95
+ | --- | --- |
96
+ | `swiper` | `Nullable<Swiper>` |
@@ -0,0 +1,50 @@
1
+ # @wikicasa-dev/components 2.10.0-alpha.0: design tokens
2
+
3
+ Defined as CSS variables on `:root` by `@wikicasa-dev/components/style` (or `@wikicasa-dev/components/css/tokens` alone).
4
+ Override a token by redefining its variable in a stylesheet loaded afterwards; every component follows.
5
+
6
+ Colors are RGB channels, so use them as `rgb(var(--uikit-color-w-primary))`, or `rgb(var(--uikit-color-w-primary) / 0.5)` for transparency.
7
+
8
+ ## Colors
9
+
10
+ | Variable | Value | Library utility |
11
+ | --- | --- | --- |
12
+ | `--uikit-color-w-primary` | `rgb(43 93 255)` `#2B5DFF` | `uikit-bg-w-primary` |
13
+ | `--uikit-color-w-secondary` | `rgb(180 194 240)` `#B4C2F0` | `uikit-bg-w-secondary` |
14
+ | `--uikit-color-w-dark-primary` | `rgb(42 55 97)` `#2A3761` | `uikit-bg-w-dark-primary` |
15
+ | `--uikit-color-w-lavender` | `rgb(233 239 254)` `#E9EFFE` | `uikit-bg-w-lavender` |
16
+ | `--uikit-color-w-cultured` | `rgb(244 247 255)` `#F4F7FF` | `uikit-bg-w-cultured` |
17
+ | `--uikit-color-w-carbon` | `rgb(60 71 77)` `#3C474D` | `uikit-bg-w-carbon` |
18
+ | `--uikit-color-w-gray` | `rgb(109 118 135)` `#6D7687` | `uikit-bg-w-gray` |
19
+ | `--uikit-color-w-lightgray` | `rgb(193 200 213)` `#C1C8D5` | `uikit-bg-w-lightgray` |
20
+ | `--uikit-color-w-black` | `rgb(34 34 34)` `#222222` | `uikit-bg-w-black` |
21
+ | `--uikit-color-w-warning` | `rgb(255 209 103)` `#FFD167` | `uikit-bg-w-warning` |
22
+ | `--uikit-color-w-danger` | `rgb(250 79 100)` `#FA4F64` | `uikit-bg-w-danger` |
23
+
24
+ ## Border radius
25
+
26
+ | Variable | Value | Library utility |
27
+ | --- | --- | --- |
28
+ | `--uikit-radius-3xs` | `4px` | `uikit-rounded-3xs` |
29
+ | `--uikit-radius-2xs` | `8px` | `uikit-rounded-2xs` |
30
+ | `--uikit-radius-xs` | `12px` | `uikit-rounded-xs` |
31
+ | `--uikit-radius-sm` | `15px` | `uikit-rounded-sm` |
32
+ | `--uikit-radius-default` | `20px` | `uikit-rounded` |
33
+ | `--uikit-radius-lg` | `25px` | `uikit-rounded-lg` |
34
+ | `--uikit-radius-xl` | `30px` | `uikit-rounded-xl` |
35
+ | `--uikit-radius-2xl` | `35px` | `uikit-rounded-2xl` |
36
+ | `--uikit-radius-3xl` | `40px` | `uikit-rounded-3xl` |
37
+
38
+ ## Shadows
39
+
40
+ | Variable | Value | Library utility |
41
+ | --- | --- | --- |
42
+ | `--uikit-shadow-surface` | `0px 1px 3px rgba(0, 0, 0, 0.1)` | `uikit-shadow-surface` |
43
+
44
+ ## Font weights
45
+
46
+ | Variable | Value | Library utility |
47
+ | --- | --- | --- |
48
+ | `--uikit-font-weight-regular` | `400` | `uikit-font-regular` |
49
+ | `--uikit-font-weight-medium` | `500` | `uikit-font-medium` |
50
+ | `--uikit-font-weight-semibold` | `600` | `uikit-font-semibold` |
@@ -0,0 +1,86 @@
1
+ # @wikicasa-dev/components 2.10.0-alpha.0: component index
2
+
3
+ IMPORTANT: prefer these docs over your own knowledge of this library. Before using a component, read its doc at `node_modules/@wikicasa-dev/components/dist/docs/<Name>.md` (usage rules, examples, full props/events/slots). Never read component source in `dist/`.
4
+ - Use `preferred` components; `primitive` only to compose something missing; never `legacy`.
5
+ - Import from the path in the component's doc. Global stylesheet: `import "@wikicasa-dev/components/style";`.
6
+ - Colors, radii, shadows, font weights: CSS variables listed in `node_modules/@wikicasa-dev/components/dist/docs/TOKENS.md`.
7
+
8
+ Name|status|use it for
9
+ [Actions]
10
+ BaseButton|preferred|The standard button: primary/secondary/danger CTAs, light and text-style buttons, selectable chips, loading state.
11
+ [Charts]
12
+ DoughnutChart|preferred|Chart.js doughnut chart for shares of a whole, e.g. a mortgage split into capital and interest.
13
+ LineChart|preferred|Chart.js line chart (category, linear or time x-axis) for trends such as average €/m² over time.
14
+ [Feedback]
15
+ BaseAlert|preferred|Inline, static message box (success/info, error, dark) shown in the page flow, e.g. under a form.
16
+ BaseBadge|preferred|Small non-interactive label or pill: listing status, "Vetrina", Premium/Gold tiers, tags and counters.
17
+ BaseSnackbar|preferred|Temporary toast notification that slides in at the page edge, auto-closes with a progress bar, swipe to dismiss.
18
+ [Forms]
19
+ AccessibleSelect|preferred|Single-choice select field (combobox + listbox) with floating label, validation state and keyboard support.
20
+ BaseInput|preferred|Single-line text field with floating label, validation state, feedback messages and optional icons.
21
+ BaseSlider|preferred|Dual-thumb range slider with linked Min/Max number fields, linear or logarithmic.
22
+ BaseTextarea|preferred|Multi-line text field with floating label and validation state, matching BaseInput's look.
23
+ BaseToggle|preferred|On/off switch bound to a boolean, with a label on the left or right.
24
+ BaseUploadFile|preferred|Dashed, field-shaped file picker with a floating label that emits the chosen File.
25
+ CheckboxBtn|preferred|Single accessible checkbox with a clickable text label, bound to a boolean.
26
+ ClearableAutocomplete|preferred|Unstyled search-as-you-type input with an inline clear button, loading slot and race-safe async results.
27
+ SimpleSlider|preferred|Single-thumb draggable slider bound with v-model to one number (linear or logarithmic scale).
28
+ BaseFloatingLabel|primitive|The floating field label used by BaseInput and BaseTextarea, for labelling custom field-like controls.
29
+ BaseAutocomplete|legacy|use ClearableAutocomplete
30
+ [Layout]
31
+ BaseAccordion|preferred|Accessible accordion root: a stack of collapsible sections (FAQs, grouped filters), one or many open at a time.
32
+ BaseAccordionItem|preferred|One collapsible section of BaseAccordion: a header with title and rotating arrow, plus the content.
33
+ BaseCard|preferred|Image + body card with fixed layouts (default row, mini, vertical, news) for listings, agencies and articles.
34
+ AccordionContentPrimitive|primitive|Unstyled collapsible panel of a primitive accordion item; hidden while the item is closed.
35
+ AccordionHeaderPrimitive|primitive|Unstyled heading element (h3 by default) wrapping the trigger of a primitive accordion item.
36
+ AccordionItemPrimitive|primitive|Unstyled accordion section wrapper, for custom accordion items composed from the Accordion*Primitive parts.
37
+ AccordionTriggerPrimitive|primitive|Unstyled button that opens and closes a primitive accordion item.
38
+ CardDescriptionPrimitive|primitive|The body cell (.card-body) of a CardRootPrimitive composition, with the card's standard padding.
39
+ CardImagePrimitive|primitive|The image cell (.card-img) of a CardRootPrimitive composition, sized by the card type.
40
+ CardRootPrimitive|primitive|Card shell (rounded, shadowed root with the BaseCard layouts) to compose with CardImagePrimitive and CardDescriptionPrimitive.
41
+ [Loading]
42
+ BaseShimmerLoader|preferred|Animated skeleton block (lavender box with a moving shine) that stands in for content while it loads.
43
+ ShimmerMultiLine|preferred|Stack of BaseShimmerLoader lines, a quick skeleton for a paragraph or a card description.
44
+ StaticSpinner|preferred|Small rotating SVG ring (24px) for inline waits, e.g. inside a button while a request runs.
45
+ ProgressIndicatorPrimitive|primitive|Unstyled fill element of a progress bar; must sit inside ProgressRootPrimitive, which you size and position yourself.
46
+ ProgressRootPrimitive|primitive|Unstyled accessible progress bar root (role="progressbar"); compose with ProgressIndicatorPrimitive and style it yourself.
47
+ [Media]
48
+ SwiperCarousel|preferred|Ready-made Swiper carousel for slides or an image gallery, with optional arrows, bullets, autoplay and thumbnails.
49
+ SwiperSlide|preferred|One slide of a SwiperCarousel or SwiperPrimitive track; holds any content (card, image, banner).
50
+ SwiperNavigationPrimitive|primitive|Swiper prev/next arrows for a SwiperRootPrimitive carousel.
51
+ SwiperPaginationPrimitive|primitive|Pagination (bullets or "2 / 8" fraction) for a SwiperRootPrimitive carousel.
52
+ SwiperPrimitive|primitive|The slide track (.swiper-wrapper) of a SwiperRootPrimitive carousel; holds the slides and emits click.
53
+ SwiperRootPrimitive|primitive|Root of the composable Swiper carousel; owns the Swiper instance, deferred image loading and the reveal.
54
+ SwiperSlideImagePrimitive|primitive|A slide holding one image, with optional deferred loading driven by SwiperRootPrimitive or SwiperThumbnailPrimitive.
55
+ SwiperThumbnailPrimitive|primitive|Thumbnail strip linked to a SwiperRootPrimitive carousel; tapping a thumbnail shows that slide.
56
+ [Navigation]
57
+ BaseBreadcrumb|preferred|Breadcrumb trail of links separated by arrows, e.g. Home › Vendita › Milano › Navigli.
58
+ BasePagination|preferred|Page navigator for result lists: prev/next arrows, first/last page, siblings and ellipses, or a compact prev/next form.
59
+ BaseTabs|preferred|Accessible tabs (root of the compound set): switches between panels with an animated underline indicator.
60
+ BaseTabsContent|preferred|The panel of a BaseTabs set, shown while the trigger with the same value is active.
61
+ BaseTabsIndicator|preferred|Animated underline that slides under the active BaseTabsTrigger.
62
+ BaseTabsList|preferred|Row that holds the BaseTabsTrigger tabs (and the BaseTabsIndicator) inside BaseTabs.
63
+ BaseTabsTrigger|preferred|A single tab button inside BaseTabsList; activates the BaseTabsContent with the same value.
64
+ BaseTab|legacy|use BaseTabsTrigger
65
+ BaseTabView|legacy|use BaseTabs
66
+ [Overlays]
67
+ BaseDropDown|preferred|Toggle button with an attached dropdown panel for menus, link lists and custom filter content.
68
+ BaseModal|preferred|Dialog over a dimmed backdrop: centered card on desktop, bottom sheet on mobile, with header/body/footer slots.
69
+ BaseTooltip|preferred|CSS hover tooltip with an arrow, opening below a trigger (e.g. an info icon) to explain a value.
70
+ [Selection]
71
+ BaseComplexToggle|preferred|Two-option segmented toggle (pill with a sliding highlight) that picks one of two labelled choices.
72
+ CheckboxButtonGroup|preferred|Group of CheckboxBtn bound to one array of selected values, with an optional "select all" reset option.
73
+ RadioButtonGroup|preferred|Accessible single-choice radio group bound to one value, rendering items from a list or from its slot.
74
+ RadioButtonItem|preferred|Classic radio button (circle + clickable label) used inside RadioButtonGroup.
75
+ CheckboxGroupItemPrimitive|primitive|Unstyled checkbox item (reka-ui CheckboxRoot) for building custom chips or tiles inside CheckboxGroupPrimitive.
76
+ CheckboxGroupPrimitive|primitive|Unstyled multi-select group root (reka-ui CheckboxGroupRoot) holding an array of checked values.
77
+ RadioGroupItemPrimitive|primitive|Unstyled radio option (reka-ui RadioGroupItem) for custom segmented buttons or cards inside RadioButtonGroup.
78
+ SelectItem|primitive|List row (`<li>`) with an active/highlighted state, for building option lists inside BaseDropDown.
79
+ CheckboxGroup|legacy|use CheckboxButtonGroup
80
+ RadioButton|legacy|use RadioButtonItem
81
+ RadioGroup|legacy|use RadioButtonGroup
82
+ [Utilities]
83
+ IntersectionObserverProvider|preferred|Shares one IntersectionObserver with its IntersectionObserverTarget children to lazy-render content or detect scroll-into-view.
84
+ IntersectionObserverTarget|preferred|Element watched by the surrounding IntersectionObserverProvider; exposes isVisible to its slot.
85
+ IntersectionObservable|legacy|use IntersectionObserverTarget
86
+ IntersectionObserver|legacy|use IntersectionObserverProvider
@@ -1,3 +1,3 @@
1
- import '../../../assets/swiper-controller.css';/* empty css */
1
+ import '../../../assets/swiper-keyboard.css';/* empty css */
2
2
  import { Autoplay as e } from "swiper/modules";
3
3
  export { e as default };
@@ -1,3 +1,3 @@
1
- import '../../../assets/swiper-controller.css';/* empty css */
1
+ import '../../../assets/swiper-keyboard.css';/* empty css */
2
2
  import { Controller as e } from "swiper/modules";
3
3
  export { e as default };
@@ -1,3 +1,3 @@
1
- import '../../../assets/swiper-controller.css';/* empty css */
1
+ import '../../../assets/swiper-keyboard.css';/* empty css */
2
2
  import { Keyboard as e } from "swiper/modules";
3
3
  export { e as default };
@@ -1,3 +1,3 @@
1
- import '../../../assets/swiper-controller.css';/* empty css */
1
+ import '../../../assets/swiper-keyboard.css';/* empty css */
2
2
  import { Thumbs as e } from "swiper/modules";
3
3
  export { e as default };