@wikicasa-dev/components 2.9.1 → 2.10.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 +9 -8
  95. /package/dist/assets/{swiper-thumbs.css → swiper-autoplay.css} +0 -0
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: BaseFloatingLabel
3
+ status: primitive
4
+ category: Forms
5
+ summary: The floating field label used by BaseInput and BaseTextarea, for labelling custom field-like controls.
6
+ import: @wikicasa-dev/components/UIKit/BaseFloatingLabel
7
+ version: 2.10.0
8
+ ---
9
+
10
+ # BaseFloatingLabel
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 floating field label used by BaseInput and BaseTextarea, for labelling custom field-like controls.
15
+
16
+ ```ts
17
+ import BaseFloatingLabel from "@wikicasa-dev/components/UIKit/BaseFloatingLabel";
18
+ ```
19
+
20
+ `BaseInput`, `BaseTextarea` and `BaseUploadFile` already render it, so you only need it on its own to put the same label on a custom control (for example a dropdown trigger styled as a field) so it matches the other form fields.
21
+
22
+ It is absolutely positioned: place it inside a `position: relative` container that also holds the control, and nudge it with `class` / `style` / `labelClasses` (all land on the `<label>`). It doesn't animate by itself; you decide `labelState`.
23
+
24
+ ## Usage
25
+
26
+ ```vue
27
+ <script setup lang="ts">
28
+ import BaseFloatingLabel from "@wikicasa-dev/components/UIKit/BaseFloatingLabel";
29
+ </script>
30
+
31
+ <template>
32
+ <div style="position: relative; padding: 16px; border: 1px solid rgb(var(--uikit-color-w-secondary)); border-radius: var(--uikit-radius-xs)">
33
+ <button id="typology-trigger" type="button">Appartamento, Villa</button>
34
+ <BaseFloatingLabel
35
+ for="typology-trigger"
36
+ label-text="Tipologia"
37
+ label-state="floating-label"
38
+ style="top: -9px; padding: 0 5px; background: #fff"
39
+ />
40
+ </div>
41
+ </template>
42
+ ```
43
+
44
+ ## Do / Don't
45
+
46
+ - Do pass `for` with the id of the control it labels.
47
+ - Do use `labelState="floating-label"` when the control has a value or focus, `"inline-label"` (default) to sit inside the field like a placeholder.
48
+ - Do give it a white background and a little horizontal padding when it floats over a border.
49
+ - Do pass `required` to show the asterisk; `isValid` colors it (red when `false`), `disabled` greys it out.
50
+ - Don't use it as a general-purpose text label or heading; it only makes sense over a field border.
51
+ - Don't use it next to `BaseInput` / `BaseTextarea`: they already have one.
52
+
53
+ ## Styling hooks
54
+
55
+ - Root classes `floating-label` / `inline-label` reflect the state.
56
+ - `labelClasses` positions the `<label>`; `labelTextClasses` styles the text.
57
+
58
+ ## API
59
+
60
+ _Generated from the component's types. Do not edit by hand._
61
+
62
+ ### Props
63
+
64
+ | Name | Type | Default | Required | Description |
65
+ | --- | --- | --- | --- | --- |
66
+ | `labelState` | `LabelState` | `"inline-label"` | | |
67
+ | `isValid` | `Nullable<boolean>` | `null` | | |
68
+ | `labelText` | `string` | | yes | |
69
+ | `disabled` | `string \| boolean` | `false` | | |
70
+ | `labelClasses` | `ClassTypeProp` | | | |
71
+ | `labelTextClasses` | `ClassTypeProp` | | | |
72
+
73
+ ### Events
74
+
75
+ | Name | Payload |
76
+ | --- | --- |
77
+ | `click` | `any[]` |
78
+
79
+ ### v-model
80
+
81
+ None.
82
+
83
+ ### Slots
84
+
85
+ None.
86
+
87
+ ### Exposed (template ref)
88
+
89
+ None.
@@ -0,0 +1,130 @@
1
+ ---
2
+ name: BaseInput
3
+ status: preferred
4
+ category: Forms
5
+ summary: Single-line text field with floating label, validation state, feedback messages and optional icons.
6
+ import: @wikicasa-dev/components/UIKit/BaseInput
7
+ version: 2.10.0
8
+ ---
9
+
10
+ # BaseInput
11
+
12
+ Single-line text field with floating label, validation state, feedback messages and optional icons.
13
+
14
+ ```ts
15
+ import BaseInput from "@wikicasa-dev/components/UIKit/BaseInput";
16
+ ```
17
+
18
+ Use for any single-line text entry in a form (name, email, phone, price, surface). For multi-line text use `BaseTextarea`; for search-as-you-type use `ClearableAutocomplete`.
19
+
20
+ Native input attributes go straight on the component (`type`, `name`, `placeholder`, `maxlength`, `inputmode`, `pattern`, `min`, `max`, `disabled`, `readonly`, `autocomplete="on"`). `class` styles the outer wrapper; `inputClass` styles the `<input>` itself. An `id` is generated if you don't pass one.
21
+
22
+ ## Usage
23
+
24
+ ```vue
25
+ <script setup lang="ts">
26
+ import { ref } from "vue";
27
+ import BaseInput from "@wikicasa-dev/components/UIKit/BaseInput";
28
+ import { ViewPswIcon, HidePswIcon } from "@wikicasa-dev/svg-icons";
29
+
30
+ const email = ref("");
31
+ const price = ref<number | "">("");
32
+ const password = ref("");
33
+
34
+ // Shows 250000 as "250.000" while the model keeps the number
35
+ const priceFormatter = {
36
+ formatFn: (v: string) => (v && !isNaN(Number(v)) ? Number(v).toLocaleString("it-IT") : ""),
37
+ unFormatFn: (v: string) => (v.replace(/\D/g, "") ? Number(v.replace(/\D/g, "")) : null),
38
+ };
39
+ </script>
40
+
41
+ <template>
42
+ <BaseInput
43
+ v-model="email"
44
+ type="email"
45
+ name="email"
46
+ label-text="Email"
47
+ required
48
+ :is-valid="email ? email.includes('@') : null"
49
+ :feedback="{ invalid: 'Inserisci un indirizzo email valido' }"
50
+ />
51
+ <BaseInput v-model="price" label-text="Prezzo massimo (€)" inputmode="numeric" :formatter="priceFormatter" />
52
+ <BaseInput v-model="password" type="password" label-text="Password">
53
+ <template #righticon="{ handleShowPasswd, curType }">
54
+ <span class="text-input-icon right md" @click.stop="handleShowPasswd">
55
+ <ViewPswIcon v-if="curType === 'password'" />
56
+ <HidePswIcon v-else />
57
+ </span>
58
+ </template>
59
+ </BaseInput>
60
+ </template>
61
+ ```
62
+
63
+ ## Do / Don't
64
+
65
+ - Do always set `labelText`: it is the field's visible and accessible label (inline when empty, floating when focused or filled).
66
+ - Do drive `isValid` with three states: `null` (neutral, the default), `true` (blue border + check) or `false` (red border + warning icon, shows `feedback.invalid`). `feedback` strings may be HTML; an array renders one line per entry.
67
+ - Do use the `feedback` slot for richer error content, and `under-label` for a small italic hint below the field.
68
+ - Do use `formatter` for display formatting (thousands separators): the model keeps the unformatted value. `formatFn` must handle any string it gets; an emptied field sets the model to `""`.
69
+ - Do use the `righticon` slot props: `handleClean()` empties the field, `handleShowPasswd()` toggles a password field, `curType` is the current input type.
70
+ - Don't expect `required` to block form submit: it only adds the asterisk to the label. Validate yourself.
71
+ - Don't change `type` after mount: it is read once.
72
+
73
+ ## Styling hooks
74
+
75
+ - Put icons in the `leftIcon` / `righticon` slots with the class `text-input-icon` plus `left` or `right`, and a size `sm` (16px), `md` (20px) or `lg` (25px).
76
+ - `--icon-default-size` on the wrapper (default `44px`): the icon hit area.
77
+ - Wrapper state classes: `is-valid`, `is-invalid`, `floating-state` / `inline-state`, `has-left-icon`, `has-right-icon`.
78
+ - `labelClasses`, `labelTextClasses`, `fieldsetClasses` (the border) and `inputClass` accept extra utility classes.
79
+
80
+ ## API
81
+
82
+ _Generated from the component's types. Do not edit by hand._
83
+
84
+ ### Props
85
+
86
+ | Name | Type | Default | Required | Description |
87
+ | --- | --- | --- | --- | --- |
88
+ | `id` | `string` | | | |
89
+ | `inputClass` | `ClassType \| ClassType[]` | | | |
90
+ | `labelText` | `string` | `""` | | |
91
+ | `feedback` | `FeedbackLabels` | | | |
92
+ | `isValid` | `Nullable<boolean>` | `null` | | |
93
+ | `keepFloatingLabel` | `boolean` | `false` | | |
94
+ | `formatter` | `Nullable<Partial<{ formatFn: (value: string) => string; unFormatFn: (value: string) => Nullable<ModelValue>; }>>` | `null` | | |
95
+ | `labelClasses` | `ClassTypeProp` | | | |
96
+ | `fieldsetClasses` | `ClassTypeProp` | | | |
97
+ | `labelTextClasses` | `ClassTypeProp` | | | |
98
+ | `withLeftIcon` | `boolean` | `undefined` | | |
99
+ | `withRightIcon` | `boolean` | `undefined` | | |
100
+ | `dataCy` | `string` | | | |
101
+ | `modelValue` | `ModelValue` | `"" as ModelValue & {}` | | |
102
+
103
+ ### Events
104
+
105
+ | Name | Payload |
106
+ | --- | --- |
107
+ | `click` | `[MouseEvent]` |
108
+ | `keydown` | `[KeyboardEvent]` |
109
+ | `keydownEnterPressed` | |
110
+ | `focusin` | |
111
+ | `focusout` | |
112
+ | `keyup` | `[KeyboardEvent]` |
113
+ | `update:modelValue` | `[value: ModelValue]` |
114
+
115
+ ### v-model
116
+
117
+ - `v-model` binds `modelValue` (`ModelValue`)
118
+
119
+ ### Slots
120
+
121
+ | Name | Slot props |
122
+ | --- | --- |
123
+ | `leftIcon` | |
124
+ | `righticon` | `{ handleClean: () => void; handleShowPasswd: () => void; curType: InputTypeHTMLAttribute; }` |
125
+ | `feedback` | |
126
+ | `under-label` | |
127
+
128
+ ### Exposed (template ref)
129
+
130
+ None.
@@ -0,0 +1,129 @@
1
+ ---
2
+ name: BaseModal
3
+ status: preferred
4
+ category: Overlays
5
+ summary: Dialog over a dimmed backdrop: centered card on desktop, bottom sheet on mobile, with header/body/footer slots.
6
+ import: @wikicasa-dev/components/UIKit/BaseModal
7
+ version: 2.10.0
8
+ ---
9
+
10
+ # BaseModal
11
+
12
+ Dialog over a dimmed backdrop: centered card on desktop, bottom sheet on mobile, with header/body/footer slots.
13
+
14
+ ```ts
15
+ import BaseModal from "@wikicasa-dev/components/UIKit/BaseModal";
16
+ ```
17
+
18
+ Use it for focused tasks that interrupt the page: confirmations ("Eliminare questo annuncio?"), short forms (contact the agency, login), filter pickers, sort options. On screens below 576px it becomes a full-width sheet sliding up from the bottom; from 576px up it is a card slid down from the top (or vertically centered with `centered`). It locks page scroll while open and closes on Escape, on the X button and on backdrop click (disable with `:close-on-click-out="false"`).
19
+
20
+ ## Usage
21
+
22
+ ```vue
23
+ <script setup lang="ts">
24
+ import BaseModal from "@wikicasa-dev/components/UIKit/BaseModal";
25
+ import BaseButton from "@wikicasa-dev/components/UIKit/BaseButton";
26
+ import { ref } from "vue";
27
+
28
+ const showDelete = ref(false);
29
+ </script>
30
+
31
+ <template>
32
+ <BaseButton btn-class="uikit-btn-w-danger" type="button" @click="showDelete = true">
33
+ Elimina annuncio
34
+ </BaseButton>
35
+
36
+ <BaseModal
37
+ id="delete-listing-modal"
38
+ v-model:show-modal="showDelete"
39
+ size="modal-sm"
40
+ header-title="Conferma eliminazione"
41
+ custom-modal-footer-classes="modal-actions"
42
+ >
43
+ <template #body>
44
+ <p>Vuoi eliminare il trilocale in Via Garibaldi 12, Torino? L'operazione non è reversibile.</p>
45
+ </template>
46
+ <template #footer="{ closeModal }">
47
+ <BaseButton style="flex: 1" btn-class="uikit-btn-w-primary" outlined type="button" @click="closeModal">
48
+ Annulla
49
+ </BaseButton>
50
+ <BaseButton style="flex: 1" btn-class="uikit-btn-w-danger" type="button" @click="closeModal">
51
+ Elimina
52
+ </BaseButton>
53
+ </template>
54
+ </BaseModal>
55
+ </template>
56
+
57
+ <style>
58
+ .modal-actions { display: flex; gap: 20px; }
59
+ </style>
60
+ ```
61
+
62
+ ## Do / Don't
63
+
64
+ - Bind `v-model:show-modal`. Its default is `true`: a `BaseModal` without it opens as soon as it is mounted.
65
+ - Content goes in the named `body` slot, not the default slot (the default slot is not rendered). `header`, `body` and `footer` slots all receive `closeModal()`.
66
+ - The footer is sticky at the bottom and only rendered if you fill the `footer` slot. Put the actions there.
67
+ - Title: use `headerTitle` for plain text (it is inserted as HTML, so never pass user-provided text) or the `header` slot for custom markup. The X button stays on the top right unless `:with-close-icon="false"`.
68
+ - Widths: `modal-sm` 496px, `modal-md` 592px (default), `modal-lg` 670px, `modal-xxl` up to 1500px. From 576px up, sm/md/lg cap the height at 690px. `fullHeight` sets the height to 95% of the screen (within that cap): good for long lists and maps.
69
+ - Give every modal a unique `id`; the default `base-bt-modal` is shared by all instances.
70
+ - Use the `closed` / `opened` events (after the 250ms animation) to unmount the modal or move focus.
71
+ - `autoClose` (ms) closes it automatically after opening: only for pure confirmations.
72
+
73
+ ## Styling hooks
74
+
75
+ Class props for each region: `customBackdropClasses`, `customModalDialogClasses`, `customModalHeaderClasses`, `customModalBodyClasses`, `customModalFooterClasses`, `titleClasses`, `closeIconBtnClasses`, and `closeIcon` (`{ size, classes }`).
76
+ CSS custom properties on `.uikit-modal-dialog`: `--modal-max-height`, `--modal-width-sm`, `--modal-width-md`, `--modal-width-lg`, `--modal-max-width`.
77
+
78
+ ## API
79
+
80
+ _Generated from the component's types. Do not edit by hand._
81
+
82
+ ### Props
83
+
84
+ | Name | Type | Default | Required | Description |
85
+ | --- | --- | --- | --- | --- |
86
+ | `id` | `string` | `"base-bt-modal"` | | |
87
+ | `size` | `"modal-sm" \| "modal-md" \| "modal-lg" \| "modal-xxl" \| "modal-full"` | `"modal-md"` | | |
88
+ | `customBackdropClasses` | `ClassTypeProp` | | | |
89
+ | `customModalDialogClasses` | `ClassTypeProp` | | | |
90
+ | `customModalHeaderClasses` | `ClassTypeProp` | | | |
91
+ | `customModalBodyClasses` | `ClassTypeProp` | | | |
92
+ | `customModalFooterClasses` | `ClassTypeProp` | | | |
93
+ | `closeIcon` | `Partial<{ size?: number \| undefined; classes?: ClassTypeProp; }>` | | | |
94
+ | `withCloseIcon` | `boolean` | `true` | | |
95
+ | `headerTitle` | `string` | `""` | | |
96
+ | `autoClose` | `number` | | | |
97
+ | `fullHeight` | `boolean` | `false` | | |
98
+ | `closeOnClickOut` | `boolean` | `true` | | |
99
+ | `centered` | `boolean` | `false` | | If true, the modal will be centered in desktop mode |
100
+ | `dataCy` | `string` | | | |
101
+ | `closeIconBtnClasses` | `ClassTypeProp` | | | |
102
+ | `titleClasses` | `ClassTypeProp` | | | |
103
+ | `showModal` | `boolean` | `true` | | |
104
+
105
+ ### Events
106
+
107
+ | Name | Payload |
108
+ | --- | --- |
109
+ | `closed` | |
110
+ | `opened` | |
111
+ | `update:showModal` | `[value: boolean]` |
112
+ | `dialogClick` | `[MouseEvent]` |
113
+
114
+ ### v-model
115
+
116
+ - `v-model:showModal` (`boolean`)
117
+
118
+ ### Slots
119
+
120
+ | Name | Slot props |
121
+ | --- | --- |
122
+ | `header` | `{ closeModal: () => void; }` |
123
+ | `body` | `{ closeModal: () => void; }` |
124
+ | `footer` | `{ closeModal: () => void; }` |
125
+ | `fixed-bottom` | |
126
+
127
+ ### Exposed (template ref)
128
+
129
+ None.
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: BasePagination
3
+ status: preferred
4
+ category: Navigation
5
+ summary: Page navigator for result lists: prev/next arrows, first/last page, siblings and ellipses, or a compact prev/next form.
6
+ import: @wikicasa-dev/components/UIKit/BasePagination
7
+ version: 2.10.0
8
+ ---
9
+
10
+ # BasePagination
11
+
12
+ Page navigator for result lists: prev/next arrows, first/last page, siblings and ellipses, or a compact prev/next form.
13
+
14
+ ```ts
15
+ import BasePagination from "@wikicasa-dev/components/UIKit/BasePagination";
16
+ ```
17
+
18
+ Use it under paginated lists: search results, agencies, favorites, messages. It computes the pages from `count` (total items) and `limit` (items per page, default 25) and tracks the current page with `v-model:page-number` (1-based, default 1).
19
+
20
+ Two modes:
21
+ - **Full** (default): ‹ 1 … 4 5 [6] 7 8 … 40 ›. `siblings` (default 3) sets how many numbers surround the current one.
22
+ - **Compact** (`small`): only ‹ prev, current page, next ›, with optional `prevLabel` / `nextLabel` text. Use it on mobile.
23
+
24
+ Without `baseUrl` the items are clickable `<span>`s that only update the model (fine for client-side lists and mockups). With `baseUrl` every item is a real link, which is what SEO pages need.
25
+
26
+ ## Usage
27
+
28
+ ```vue
29
+ <script setup lang="ts">
30
+ import BasePagination from "@wikicasa-dev/components/UIKit/BasePagination";
31
+ import { ref } from "vue";
32
+
33
+ const page = ref(1);
34
+ const totalListings = 1234; // static mock
35
+ </script>
36
+
37
+ <template>
38
+ <BasePagination
39
+ v-model:page-number="page"
40
+ :count="totalListings"
41
+ :limit="25"
42
+ style="display: flex; justify-content: center; margin-top: 30px"
43
+ />
44
+
45
+ <BasePagination
46
+ v-model:page-number="page"
47
+ :count="totalListings"
48
+ small
49
+ prev-label="Precedente"
50
+ next-label="Successiva"
51
+ style="display: flex; justify-content: center"
52
+ />
53
+ </template>
54
+ ```
55
+
56
+ ## Do / Don't
57
+
58
+ - Render it only when there is more than one page (`v-if="count > limit"`); with `count` 0 it renders an empty `<nav>`.
59
+ - `baseUrl` must be an absolute URL (`https://www.wikicasa.it/vendita-case/milano/`). A relative path fails to parse and no `href` is produced. The page goes in the `p` query parameter (change it with `pageQueryParameter`); page 1 drops the parameter.
60
+ - In a router app pass the link component as `linkTag` (it receives both `href` and `to`) and extra link attributes via `linkProps`.
61
+ - `formatter` formats the displayed numbers (e.g. `1.234` with Italian separators); it doesn't change the values.
62
+ - `additionalCount` adds extra items to `count` when computing the number of pages.
63
+
64
+ ## Styling hooks
65
+
66
+ `arrowColor` sets the arrow color (hex string, default `#2B5DFF`). Alignment and spacing go in your own `class`/`style` on the component root (`<nav>`).
67
+
68
+ ## API
69
+
70
+ _Generated from the component's types. Do not edit by hand._
71
+
72
+ ### Props
73
+
74
+ | Name | Type | Default | Required | Description |
75
+ | --- | --- | --- | --- | --- |
76
+ | `count` | `number` | `0` | | |
77
+ | `limit` | `number` | `25` | | |
78
+ | `siblings` | `number` | `3` | | |
79
+ | `additionalCount` | `number` | `0` | | |
80
+ | `arrowColor` | `string` | `"#2B5DFF"` | | |
81
+ | `small` | `boolean` | `false` | | |
82
+ | `prevLabel` | `string` | `""` | | |
83
+ | `nextLabel` | `string` | `""` | | |
84
+ | `prevDataCy` | `string` | | | |
85
+ | `nextDataCy` | `string` | | | |
86
+ | `linkProps` | `Record<string, unknown>` | | | |
87
+ | `linkTag` | `"a" \| Component` | `"a"` | | |
88
+ | `baseUrl` | `string` | | | |
89
+ | `pageQueryParameter` | `string` | `"p"` | | |
90
+ | `formatter` | `((value?: Nullable<number> \| undefined) => string)` | | | |
91
+ | `pageNumber` | `Optional<number>` | `1` | | |
92
+
93
+ ### Events
94
+
95
+ | Name | Payload |
96
+ | --- | --- |
97
+ | `update:pageNumber` | `[value: Optional<number>]` |
98
+
99
+ ### v-model
100
+
101
+ - `v-model:pageNumber` (`Optional<number>`)
102
+
103
+ ### Slots
104
+
105
+ None.
106
+
107
+ ### Exposed (template ref)
108
+
109
+ None.
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: BaseShimmerLoader
3
+ status: preferred
4
+ category: Loading
5
+ summary: Animated skeleton block (lavender box with a moving shine) that stands in for content while it loads.
6
+ import: @wikicasa-dev/components/UIKit/ShimmerLoader/BaseShimmerLoader
7
+ version: 2.10.0
8
+ ---
9
+
10
+ # BaseShimmerLoader
11
+
12
+ Animated skeleton block (lavender box with a moving shine) that stands in for content while it loads.
13
+
14
+ ```ts
15
+ import BaseShimmerLoader from "@wikicasa-dev/components/UIKit/ShimmerLoader/BaseShimmerLoader";
16
+ ```
17
+
18
+ A skeleton placeholder: a lavender block with a light sweep animated across it. It has no size of its own, so you give it the size and radius of the thing it replaces (a price, a title line, an image). Render it with `v-if` while loading and swap in the real content with `v-else`.
19
+
20
+ For several stacked text lines use `ShimmerMultiLine`. For a spinner inside a button or small inline wait, use `StaticSpinner`.
21
+
22
+ ## Usage
23
+
24
+ ```vue
25
+ <script setup lang="ts">
26
+ import { ref } from "vue";
27
+ import BaseShimmerLoader from "@wikicasa-dev/components/UIKit/ShimmerLoader/BaseShimmerLoader";
28
+
29
+ const loading = ref(true);
30
+ const price = "€ 245.000";
31
+ </script>
32
+
33
+ <template>
34
+ <div class="valuation">
35
+ <span>Prezzo stimato</span>
36
+ <BaseShimmerLoader v-if="loading" class="price-skeleton" />
37
+ <strong v-else>{{ price }}</strong>
38
+ </div>
39
+ </template>
40
+
41
+ <style scoped>
42
+ .price-skeleton { width: 120px; height: 30px; border-radius: 8px; }
43
+ </style>
44
+ ```
45
+
46
+ ## Do / Don't
47
+
48
+ - Do always size it (`width`, `height`) and round it (`border-radius`) through `class` or `style`; without a height it collapses to nothing.
49
+ - Do match the size of the final content so nothing jumps when it arrives. For an inline value inside text, add `display: inline-block`.
50
+ - Do set `:enabled="false"` to freeze the shine (e.g. many skeletons off screen, or reduced-motion).
51
+ - Don't use it as a translucent overlay on top of real content: the block is opaque. Default slot content is rendered inside the block, under the shine.
52
+ - `shimmer-classes` styles the moving shine layer only, not the block.
53
+
54
+ ## Styling hooks
55
+
56
+ - The block's lavender background is a library utility class on the root; to recolor it, use a selector stronger than one class or `!important` (e.g. `background-color: rgb(var(--uikit-color-w-cultured)) !important`).
57
+ - The shine layer has the class `shimmer` (and `data-enabled` while animating).
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
+ | `shimmerClasses` | `ClassTypeProp` | `""` | | |
68
+ | `enabled` | `boolean` | `true` | | |
69
+
70
+ ### Events
71
+
72
+ None.
73
+
74
+ ### v-model
75
+
76
+ None.
77
+
78
+ ### Slots
79
+
80
+ | Name | Slot props |
81
+ | --- | --- |
82
+ | `default` | |
83
+
84
+ ### Exposed (template ref)
85
+
86
+ None.
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: BaseSlider
3
+ status: preferred
4
+ category: Forms
5
+ summary: Dual-thumb range slider with linked Min/Max number fields, linear or logarithmic.
6
+ import: @wikicasa-dev/components/UIKit/BaseSlider
7
+ version: 2.10.0
8
+ ---
9
+
10
+ # BaseSlider
11
+
12
+ Dual-thumb range slider with linked Min/Max number fields, linear or logarithmic.
13
+
14
+ ```ts
15
+ import BaseSlider from "@wikicasa-dev/components/UIKit/BaseSlider";
16
+ ```
17
+
18
+ Use to pick a numeric range: price from/to, surface from/to (m²). It renders two thumbs on one track plus two `BaseInput` fields labelled "Min" and "Max" that stay in sync with the thumbs. For a single value use `SimpleSlider`.
19
+
20
+ Bind the range with `v-model:min-value` and `v-model:max-value`. `min` / `max` set the limits (default 0–100) and the native `step` attribute is forwarded to both thumbs. Use `type="logarithmic"` for wide ranges such as prices, so low values get more of the track.
21
+
22
+ ## Usage
23
+
24
+ ```vue
25
+ <script setup lang="ts">
26
+ import { ref } from "vue";
27
+ import BaseSlider from "@wikicasa-dev/components/UIKit/BaseSlider";
28
+
29
+ const surfaceFrom = ref<number>();
30
+ const surfaceTo = ref<number>();
31
+ </script>
32
+
33
+ <template>
34
+ <BaseSlider
35
+ v-model:min-value="surfaceFrom"
36
+ v-model:max-value="surfaceTo"
37
+ :min="20"
38
+ :max="500"
39
+ step="5"
40
+ />
41
+ <p>Superficie: {{ surfaceFrom }}–{{ surfaceTo }} m²</p>
42
+ </template>
43
+ ```
44
+
45
+ ## Do / Don't
46
+
47
+ - Do expect it to start at the full range: on mount it sets the models to `min` and `max`, overwriting any initial value you bound.
48
+ - Do put your own heading or legend above it ("Superficie (m²)"); the thumbs have no accessible label and the fields are always labelled "Min" / "Max".
49
+ - Don't use it for a single value; use `SimpleSlider`.
50
+
51
+ ## Styling hooks
52
+
53
+ None. Track colors are fixed (primary for the selected range, light blue for the rest); size and spacing come from the parent container via `class`.
54
+
55
+ ## API
56
+
57
+ _Generated from the component's types. Do not edit by hand._
58
+
59
+ ### Props
60
+
61
+ | Name | Type | Default | Required | Description |
62
+ | --- | --- | --- | --- | --- |
63
+ | `type` | `"linear" \| "logarithmic"` | `"linear"` | | |
64
+ | `min` | `number` | `0` | | |
65
+ | `max` | `number` | `100` | | |
66
+ | `minValue` | `Optional<number>` | `0` | | |
67
+ | `maxValue` | `Optional<number>` | `0` | | |
68
+
69
+ ### Events
70
+
71
+ | Name | Payload |
72
+ | --- | --- |
73
+ | `update:minValue` | `[value: Optional<number>]` |
74
+ | `update:maxValue` | `[value: Optional<number>]` |
75
+
76
+ ### v-model
77
+
78
+ - `v-model:minValue` (`Optional<number>`)
79
+ - `v-model:maxValue` (`Optional<number>`)
80
+
81
+ ### Slots
82
+
83
+ None.
84
+
85
+ ### Exposed (template ref)
86
+
87
+ None.