@wikicasa-dev/components 0.1.4 → 1.0.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.
- package/README.md +39 -11
- package/dist/BaseSnackbar-BiEYmHwi.js +78 -0
- package/dist/components.js +31 -6899
- package/dist/components.umd.cjs +30 -12
- package/dist/main-hMfaViVU.js +8193 -0
- package/dist/src/App.vue.d.ts +2 -0
- package/dist/src/UIKit/AccessibleSelect.vue.d.ts +74 -0
- package/dist/src/UIKit/Accordion/BaseAccordion.vue.d.ts +45 -0
- package/dist/src/UIKit/Accordion/BaseAccordionBtn.vue.d.ts +59 -0
- package/dist/src/UIKit/Accordion/BaseAccordionContent.vue.d.ts +29 -0
- package/dist/src/UIKit/Accordion/BaseAccordionItem.vue.d.ts +71 -0
- package/dist/src/UIKit/BaseAlert.vue.d.ts +41 -0
- package/dist/src/UIKit/BaseAutocomplete.vue.d.ts +109 -0
- package/dist/src/UIKit/BaseBadge.vue.d.ts +36 -0
- package/dist/src/UIKit/BaseBtModal.vue.d.ts +172 -0
- package/dist/src/UIKit/BaseButton.vue.d.ts +87 -0
- package/dist/src/UIKit/BaseCard.vue.d.ts +41 -0
- package/dist/{UIKit → src/UIKit}/BaseComplexToggle.vue.d.ts +2 -2
- package/dist/src/UIKit/BaseDropDown.vue.d.ts +123 -0
- package/dist/{UIKit → src/UIKit}/BaseFloatingLabel.vue.d.ts +4 -4
- package/dist/{UIKit → src/UIKit}/BaseIcon.vue.d.ts +1 -3
- package/dist/{UIKit → src/UIKit}/BaseInput.vue.d.ts +16 -6
- package/dist/{UIKit → src/UIKit}/BaseNavItem.vue.d.ts +1 -1
- package/dist/{UIKit → src/UIKit}/BasePagination.vue.d.ts +2 -4
- package/dist/src/UIKit/BasePaper.vue.d.ts +2 -0
- package/dist/src/UIKit/BaseSelect/SelectItem.vue.d.ts +54 -0
- package/dist/{UIKit → src/UIKit}/BaseSlider.vue.d.ts +4 -4
- package/dist/src/UIKit/BaseSnackbar.vue.d.ts +56 -0
- package/dist/{UIKit → src/UIKit}/BaseTab.vue.d.ts +1 -1
- package/dist/{UIKit → src/UIKit}/BaseTextarea.vue.d.ts +4 -4
- package/dist/{UIKit → src/UIKit}/BaseToggle.vue.d.ts +1 -1
- package/dist/{UIKit → src/UIKit}/BaseTooltip.vue.d.ts +2 -2
- package/dist/{UIKit → src/UIKit}/BaseUploadFile.vue.d.ts +1 -1
- package/dist/src/UIKit/Checkbox/CheckboxBtn.vue.d.ts +92 -0
- package/dist/src/UIKit/Checkbox/CheckboxGroup.vue.d.ts +78 -0
- package/dist/{UIKit → src/UIKit}/Radio/RadioButton.vue.d.ts +3 -3
- package/dist/{UIKit → src/UIKit}/Radio/RadioGroup.vue.d.ts +3 -2
- package/dist/src/UIKit/StaticSpinner.vue.d.ts +34 -0
- package/dist/src/Views/AccordionSection.vue.d.ts +2 -0
- package/dist/src/Views/AlertSection.vue.d.ts +2 -0
- package/dist/src/Views/AutocompleteSection.vue.d.ts +2 -0
- package/dist/src/Views/BadgeSection.vue.d.ts +2 -0
- package/dist/src/Views/ButtonsSection.vue.d.ts +2 -0
- package/dist/src/Views/CardSection.vue.d.ts +2 -0
- package/dist/src/Views/CheckboxSection.vue.d.ts +6 -0
- package/dist/src/Views/DropdownSection.vue.d.ts +35 -0
- package/dist/src/Views/ModalSection.vue.d.ts +4 -0
- package/dist/src/Views/PaginationSection.vue.d.ts +2 -0
- package/dist/src/Views/PaperSection.vue.d.ts +2 -0
- package/dist/src/Views/RadioSection.vue.d.ts +9 -0
- package/dist/src/Views/SliderSection.vue.d.ts +9 -0
- package/dist/src/Views/SnackbarSection.vue.d.ts +2 -0
- package/dist/src/Views/TabSection.vue.d.ts +2 -0
- package/dist/src/Views/TextInputSection.vue.d.ts +2 -0
- package/dist/src/Views/TextareaSection.vue.d.ts +6 -0
- package/dist/src/Views/ToggleSection.vue.d.ts +2 -0
- package/dist/src/Views/TooltipSection.vue.d.ts +2 -0
- package/dist/src/Views/UiKitSidebar.vue.d.ts +18 -0
- package/dist/src/Views/UploadBtnSection.vue.d.ts +2 -0
- package/dist/src/Views/WikicasaUiKit.vue.d.ts +19 -0
- package/dist/src/composables/useBreakpoints.d.ts +10 -0
- package/dist/{composables → src/composables}/useFloatingLabel.d.ts +1 -1
- package/dist/src/composables/useKeyboardController.d.ts +11 -0
- package/dist/{main.d.ts → src/main.d.ts} +12 -12
- package/dist/{stories → src/stories}/Button.stories.d.ts +2 -2
- package/dist/{stories → src/stories}/Header.stories.d.ts +3 -3
- package/dist/{stories → src/stories}/Page.stories.d.ts +3 -3
- package/dist/src/svgIcons/AboutUsIcon.d.ts +3 -0
- package/dist/src/svgIcons/ArrowIcon.d.ts +3 -0
- package/dist/src/svgIcons/BarChartIcon.d.ts +3 -0
- package/dist/src/svgIcons/BellIcon.d.ts +3 -0
- package/dist/src/svgIcons/BulbIcon.d.ts +3 -0
- package/dist/src/svgIcons/CloseIcon.d.ts +3 -0
- package/dist/src/svgIcons/DefaultValues.d.ts +8 -0
- package/dist/src/svgIcons/DeleteIcon.d.ts +3 -0
- package/dist/src/svgIcons/DrawIcon.d.ts +3 -0
- package/dist/src/svgIcons/GermanyFlagIcon.d.ts +3 -0
- package/dist/src/svgIcons/HeartIcon.d.ts +3 -0
- package/dist/src/svgIcons/HidePswIcon.d.ts +3 -0
- package/dist/src/svgIcons/ItalyFlagIcon.d.ts +3 -0
- package/dist/src/svgIcons/LocationIcon.d.ts +3 -0
- package/dist/src/svgIcons/LogoutIcon.d.ts +3 -0
- package/dist/src/svgIcons/MailIcon.d.ts +3 -0
- package/dist/src/svgIcons/MapIcon.d.ts +3 -0
- package/dist/src/svgIcons/NewsIcon.d.ts +3 -0
- package/dist/src/svgIcons/NotesIcon.d.ts +3 -0
- package/dist/src/svgIcons/PhoneIcon.d.ts +3 -0
- package/dist/src/svgIcons/PhotoIcon.d.ts +3 -0
- package/dist/src/svgIcons/PinIcon.d.ts +3 -0
- package/dist/src/svgIcons/PlanIcon.d.ts +3 -0
- package/dist/src/svgIcons/PlusIcon.d.ts +3 -0
- package/dist/src/svgIcons/PrestigeIcon.d.ts +3 -0
- package/dist/src/svgIcons/PrintIcon.d.ts +3 -0
- package/dist/src/svgIcons/ProfileIcon.d.ts +3 -0
- package/dist/src/svgIcons/QuotesIcon.d.ts +3 -0
- package/dist/src/svgIcons/RequestIcon.d.ts +3 -0
- package/dist/src/svgIcons/SearchIcon.d.ts +3 -0
- package/dist/src/svgIcons/ShareIcon.d.ts +3 -0
- package/dist/src/svgIcons/SuitcaseIcon.d.ts +3 -0
- package/dist/src/svgIcons/TieIcon.d.ts +3 -0
- package/dist/src/svgIcons/TourIcon.d.ts +3 -0
- package/dist/src/svgIcons/UkFlagIcon.d.ts +3 -0
- package/dist/src/svgIcons/ValuationIcon.d.ts +3 -0
- package/dist/src/svgIcons/VideoIcon.d.ts +3 -0
- package/dist/src/svgIcons/ViewPswIcon.d.ts +3 -0
- package/dist/src/svgIcons/WarningIcon.d.ts +3 -0
- package/dist/src/svgIcons/WarningIconRounded.d.ts +3 -0
- package/dist/src/svgIcons/WikiNerdIcon.d.ts +3 -0
- package/dist/src/svgIcons/WkAppIcon.d.ts +3 -0
- package/dist/style.css +1 -1
- package/package.json +35 -30
- package/dist/App.vue.d.ts +0 -2
- package/dist/UIKit/BaseAccordion.vue.d.ts +0 -25
- package/dist/UIKit/BaseAlert.vue.d.ts +0 -16
- package/dist/UIKit/BaseAutocomplete.vue.d.ts +0 -103
- package/dist/UIKit/BaseBadge.vue.d.ts +0 -14
- package/dist/UIKit/BaseButton.stories.d.ts +0 -10
- package/dist/UIKit/BaseButton.vue.d.ts +0 -90
- package/dist/UIKit/BaseCloseButton.vue.d.ts +0 -2
- package/dist/UIKit/BaseDropDown.vue.d.ts +0 -78
- package/dist/UIKit/BaseInput.stories.d.ts +0 -6
- package/dist/UIKit/BasePaper.vue.d.ts +0 -2
- package/dist/UIKit/BaseSearchBox.vue.d.ts +0 -4
- package/dist/UIKit/BaseSelect.vue.d.ts +0 -150
- package/dist/UIKit/BaseToggle.stories.d.ts +0 -7
- package/dist/UIKit/Checkbox/CheckboxBtn.vue.d.ts +0 -101
- package/dist/UIKit/Checkbox/CheckboxGroup.vue.d.ts +0 -55
- package/dist/components/HelloWorld.vue.d.ts +0 -2
- package/dist/components/base/StaticSpinner.vue.d.ts +0 -23
- /package/dist/{components → src/components}/Pera.stories.d.ts +0 -0
- /package/dist/{components → src/components}/base/BaseEmptyButton.stories.d.ts +0 -0
- /package/dist/{components → src/components}/base/StaticSpinner.stories.d.ts +0 -0
- /package/dist/{components → src/components}/input/TripleSelect.stories.d.ts +0 -0
- /package/dist/{components → src/components}/insert/QualityScore.stories.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,18 +1,46 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @wikicasa-dev/types
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Libreria condivisa contenente componneti scritte in Vue 3.
|
|
4
|
+
La chiave privata per la condivisione è già configurata su tutti i progetti Wikicasa, per l'installazione o l'aggiornamento della libreria basterà quindi eseguire
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
yarn add @wikicasa-dev/components
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
## Sviluppo e rilascio
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
La libreria fa parte di un monorepo insieme a `@wikicasa-dev/utilities` e `@wikicasa-dev/types`.
|
|
11
|
+
Il monorepo è gestito da **[pnpm](https://pnpm.io/it/)**. Il bundler in uso per questa libreria è **[Vite](https://pnpm.io/it/)**.
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
I file _index.html_ e _main.ts_ possono essere usati come playground per provare il funzionamento del codice. Per avviare il server di sviluppo basterà eseguire
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
pnpm dev
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
e collegarsi all'indirizzo corrispondente. Il server di sviluppo è dotato di hot reload, basterà quidni salvare il file modificato. Il file _main.ts_ è escluso dalla build quindi non bisogna preoccuparsi di sporcarlo.
|
|
18
|
+
|
|
19
|
+
### Rilascio
|
|
20
|
+
|
|
21
|
+
Come prima cosa bisogna buildare i file con
|
|
22
|
+
|
|
23
|
+
pnpm build
|
|
24
|
+
|
|
25
|
+
Successivamente bisognerà incrementare la versione. pnpm ha un comando apposito per cui si sconsiglia di andare a modificare a mano la versione nel _package.json_. Il comando è
|
|
26
|
+
|
|
27
|
+
pnpm version <major|minor|patch>
|
|
28
|
+
|
|
29
|
+
Sta allo sviluppatore scegliere l'incremento di versione più opportuno.
|
|
30
|
+
Dopodiché occorrerà eseguire il commit e push delle modifiche (pnpm blocca il rilascio in caso di modifiche non committate) per poi procedere alla pubblicazione con
|
|
31
|
+
|
|
32
|
+
pnpm publish
|
|
33
|
+
|
|
34
|
+
## Storybook
|
|
35
|
+
|
|
36
|
+
La libreria è configurata con [Storybook](https://storybook.js.org/) per testare le componenti. Per lanciare Storybook in locale basterà eseguire
|
|
37
|
+
|
|
38
|
+
pnpm storybook
|
|
39
|
+
|
|
40
|
+
L'hot reload funziona anche per le componenti e le stories, occasionalmente sarà necessario aggiornare la pagina.
|
|
41
|
+
|
|
42
|
+
Storybook può essere rilasciato su Chromatic, occorre eseguire
|
|
43
|
+
|
|
44
|
+
pnpm chromatic
|
|
45
|
+
|
|
46
|
+
per generare un link pubblico a Storybook.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { defineComponent as b, ref as l, onBeforeMount as k, openBlock as e, createElementBlock as a, createElementVNode as c, normalizeClass as f, withModifiers as m, createCommentVNode as s, createVNode as h, unref as y } from "vue";
|
|
2
|
+
import { C as x, _ } from "./main-hMfaViVU.js";
|
|
3
|
+
const v = { class: "snackbar-container tw-fixed tw-bottom-10px tw-left-10px tw-z-[2000] max-sm:tw-left-0 max-sm:tw-w-full" }, C = ["data-cy"], g = ["src", "alt"], L = {
|
|
4
|
+
key: 1,
|
|
5
|
+
class: "snackbar-type-icon tw-bg-contain tw-bg-no-repeat"
|
|
6
|
+
}, M = { class: "snackbar-text tw-px-4 tw-py-0 tw-text tw-font-regular max-sm:tw-max-w-[80%] max-sm:tw-pr-0 sm:tw-text-16" }, T = ["innerHTML"], B = ["innerHTML"], S = /* @__PURE__ */ b({
|
|
7
|
+
inheritAttrs: !1,
|
|
8
|
+
__name: "BaseSnackbar",
|
|
9
|
+
props: {
|
|
10
|
+
type: { default: "" },
|
|
11
|
+
title: {},
|
|
12
|
+
body: {},
|
|
13
|
+
icon: {},
|
|
14
|
+
timeout: { default: 55e3 },
|
|
15
|
+
cb: { default: null }
|
|
16
|
+
},
|
|
17
|
+
emits: ["snackbar-hidden"],
|
|
18
|
+
setup(d, { emit: w }) {
|
|
19
|
+
const n = d, u = w, o = l(null), r = l(null), p = () => {
|
|
20
|
+
o.value && o.value();
|
|
21
|
+
}, i = () => {
|
|
22
|
+
const t = r.value;
|
|
23
|
+
t && (t.classList.remove("snackbar-active"), t.classList.add("snackbar-hidden"), setTimeout(() => {
|
|
24
|
+
u("snackbar-hidden");
|
|
25
|
+
}, 300));
|
|
26
|
+
};
|
|
27
|
+
return k(() => {
|
|
28
|
+
n.cb && (o.value = n.cb), setTimeout(() => {
|
|
29
|
+
i();
|
|
30
|
+
}, n.timeout);
|
|
31
|
+
}), (t, H) => (e(), a("div", v, [
|
|
32
|
+
c("div", {
|
|
33
|
+
ref_key: "snackbar",
|
|
34
|
+
ref: r,
|
|
35
|
+
"data-cy": t.$attrs["data-cy"],
|
|
36
|
+
class: f(["snackbar snackbar-active tw-flex tw-items-center tw-rounded-[5px] tw-px-4 tw-py-10px tw-font-medium tw-shadow hover:tw-cursor-pointer max-sm:tw-relative max-sm:tw-mx-10px max-sm:tw-my-0", t.type]),
|
|
37
|
+
onClick: m(p, ["stop"])
|
|
38
|
+
}, [
|
|
39
|
+
t.icon ? (e(), a("img", {
|
|
40
|
+
key: 0,
|
|
41
|
+
src: t.icon.src,
|
|
42
|
+
alt: `${t.icon.alt}`,
|
|
43
|
+
width: "20",
|
|
44
|
+
height: "20"
|
|
45
|
+
}, null, 8, g)) : s("", !0),
|
|
46
|
+
t.type && !t.icon ? (e(), a("span", L)) : s("", !0),
|
|
47
|
+
c("div", M, [
|
|
48
|
+
t.title ? (e(), a("p", {
|
|
49
|
+
key: 0,
|
|
50
|
+
class: "tw-m-0",
|
|
51
|
+
innerHTML: t.title
|
|
52
|
+
}, null, 8, T)) : s("", !0),
|
|
53
|
+
t.body ? (e(), a("p", {
|
|
54
|
+
key: 1,
|
|
55
|
+
class: "tw-m-0",
|
|
56
|
+
innerHTML: t.body
|
|
57
|
+
}, null, 8, B)) : s("", !0)
|
|
58
|
+
]),
|
|
59
|
+
c("button", {
|
|
60
|
+
type: "button",
|
|
61
|
+
"data-cy": "base-snackbar-close-btn",
|
|
62
|
+
class: "tw-bg-transparent max-sm:tw-absolute max-sm:tw-right-5",
|
|
63
|
+
onClick: m(i, ["stop"])
|
|
64
|
+
}, [
|
|
65
|
+
h(y(x), {
|
|
66
|
+
class: "snackbar-close-icon",
|
|
67
|
+
width: 20,
|
|
68
|
+
height: 20,
|
|
69
|
+
"stroke-color": "#000"
|
|
70
|
+
})
|
|
71
|
+
])
|
|
72
|
+
], 10, C)
|
|
73
|
+
]));
|
|
74
|
+
}
|
|
75
|
+
}), V = /* @__PURE__ */ _(S, [["__scopeId", "data-v-81ca5c43"]]);
|
|
76
|
+
export {
|
|
77
|
+
V as default
|
|
78
|
+
};
|