@wikicasa-dev/components 0.1.5 → 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.
Files changed (134) hide show
  1. package/README.md +39 -11
  2. package/dist/BaseSnackbar-BiEYmHwi.js +78 -0
  3. package/dist/components.js +31 -6899
  4. package/dist/components.umd.cjs +30 -12
  5. package/dist/main-hMfaViVU.js +8193 -0
  6. package/dist/src/App.vue.d.ts +2 -0
  7. package/dist/src/UIKit/AccessibleSelect.vue.d.ts +74 -0
  8. package/dist/src/UIKit/Accordion/BaseAccordion.vue.d.ts +45 -0
  9. package/dist/src/UIKit/Accordion/BaseAccordionBtn.vue.d.ts +59 -0
  10. package/dist/src/UIKit/Accordion/BaseAccordionContent.vue.d.ts +29 -0
  11. package/dist/src/UIKit/Accordion/BaseAccordionItem.vue.d.ts +71 -0
  12. package/dist/src/UIKit/BaseAlert.vue.d.ts +41 -0
  13. package/dist/src/UIKit/BaseAutocomplete.vue.d.ts +109 -0
  14. package/dist/src/UIKit/BaseBadge.vue.d.ts +36 -0
  15. package/dist/src/UIKit/BaseBtModal.vue.d.ts +172 -0
  16. package/dist/src/UIKit/BaseButton.vue.d.ts +87 -0
  17. package/dist/src/UIKit/BaseCard.vue.d.ts +41 -0
  18. package/dist/{UIKit → src/UIKit}/BaseComplexToggle.vue.d.ts +2 -2
  19. package/dist/src/UIKit/BaseDropDown.vue.d.ts +123 -0
  20. package/dist/{UIKit → src/UIKit}/BaseFloatingLabel.vue.d.ts +4 -4
  21. package/dist/{UIKit → src/UIKit}/BaseIcon.vue.d.ts +1 -3
  22. package/dist/{UIKit → src/UIKit}/BaseInput.vue.d.ts +16 -6
  23. package/dist/{UIKit → src/UIKit}/BaseNavItem.vue.d.ts +1 -1
  24. package/dist/{UIKit → src/UIKit}/BasePagination.vue.d.ts +2 -4
  25. package/dist/src/UIKit/BasePaper.vue.d.ts +2 -0
  26. package/dist/src/UIKit/BaseSelect/SelectItem.vue.d.ts +54 -0
  27. package/dist/{UIKit → src/UIKit}/BaseSlider.vue.d.ts +4 -4
  28. package/dist/src/UIKit/BaseSnackbar.vue.d.ts +56 -0
  29. package/dist/{UIKit → src/UIKit}/BaseTab.vue.d.ts +1 -1
  30. package/dist/{UIKit → src/UIKit}/BaseTextarea.vue.d.ts +4 -4
  31. package/dist/{UIKit → src/UIKit}/BaseToggle.vue.d.ts +1 -1
  32. package/dist/{UIKit → src/UIKit}/BaseTooltip.vue.d.ts +2 -2
  33. package/dist/{UIKit → src/UIKit}/BaseUploadFile.vue.d.ts +1 -1
  34. package/dist/src/UIKit/Checkbox/CheckboxBtn.vue.d.ts +92 -0
  35. package/dist/src/UIKit/Checkbox/CheckboxGroup.vue.d.ts +78 -0
  36. package/dist/{UIKit → src/UIKit}/Radio/RadioButton.vue.d.ts +3 -3
  37. package/dist/{UIKit → src/UIKit}/Radio/RadioGroup.vue.d.ts +3 -2
  38. package/dist/src/UIKit/StaticSpinner.vue.d.ts +34 -0
  39. package/dist/src/Views/AccordionSection.vue.d.ts +2 -0
  40. package/dist/src/Views/AlertSection.vue.d.ts +2 -0
  41. package/dist/src/Views/AutocompleteSection.vue.d.ts +2 -0
  42. package/dist/src/Views/BadgeSection.vue.d.ts +2 -0
  43. package/dist/src/Views/ButtonsSection.vue.d.ts +2 -0
  44. package/dist/src/Views/CardSection.vue.d.ts +2 -0
  45. package/dist/src/Views/CheckboxSection.vue.d.ts +6 -0
  46. package/dist/src/Views/DropdownSection.vue.d.ts +35 -0
  47. package/dist/src/Views/ModalSection.vue.d.ts +4 -0
  48. package/dist/src/Views/PaginationSection.vue.d.ts +2 -0
  49. package/dist/src/Views/PaperSection.vue.d.ts +2 -0
  50. package/dist/src/Views/RadioSection.vue.d.ts +9 -0
  51. package/dist/src/Views/SliderSection.vue.d.ts +9 -0
  52. package/dist/src/Views/SnackbarSection.vue.d.ts +2 -0
  53. package/dist/src/Views/TabSection.vue.d.ts +2 -0
  54. package/dist/src/Views/TextInputSection.vue.d.ts +2 -0
  55. package/dist/src/Views/TextareaSection.vue.d.ts +6 -0
  56. package/dist/src/Views/ToggleSection.vue.d.ts +2 -0
  57. package/dist/src/Views/TooltipSection.vue.d.ts +2 -0
  58. package/dist/src/Views/UiKitSidebar.vue.d.ts +18 -0
  59. package/dist/src/Views/UploadBtnSection.vue.d.ts +2 -0
  60. package/dist/src/Views/WikicasaUiKit.vue.d.ts +19 -0
  61. package/dist/src/composables/useBreakpoints.d.ts +10 -0
  62. package/dist/{composables → src/composables}/useFloatingLabel.d.ts +1 -1
  63. package/dist/src/composables/useKeyboardController.d.ts +11 -0
  64. package/dist/{main.d.ts → src/main.d.ts} +12 -12
  65. package/dist/{stories → src/stories}/Button.stories.d.ts +2 -2
  66. package/dist/{stories → src/stories}/Header.stories.d.ts +3 -3
  67. package/dist/{stories → src/stories}/Page.stories.d.ts +3 -3
  68. package/dist/src/svgIcons/AboutUsIcon.d.ts +3 -0
  69. package/dist/src/svgIcons/ArrowIcon.d.ts +3 -0
  70. package/dist/src/svgIcons/BarChartIcon.d.ts +3 -0
  71. package/dist/src/svgIcons/BellIcon.d.ts +3 -0
  72. package/dist/src/svgIcons/BulbIcon.d.ts +3 -0
  73. package/dist/src/svgIcons/CloseIcon.d.ts +3 -0
  74. package/dist/src/svgIcons/DefaultValues.d.ts +8 -0
  75. package/dist/src/svgIcons/DeleteIcon.d.ts +3 -0
  76. package/dist/src/svgIcons/DrawIcon.d.ts +3 -0
  77. package/dist/src/svgIcons/GermanyFlagIcon.d.ts +3 -0
  78. package/dist/src/svgIcons/HeartIcon.d.ts +3 -0
  79. package/dist/src/svgIcons/HidePswIcon.d.ts +3 -0
  80. package/dist/src/svgIcons/ItalyFlagIcon.d.ts +3 -0
  81. package/dist/src/svgIcons/LocationIcon.d.ts +3 -0
  82. package/dist/src/svgIcons/LogoutIcon.d.ts +3 -0
  83. package/dist/src/svgIcons/MailIcon.d.ts +3 -0
  84. package/dist/src/svgIcons/MapIcon.d.ts +3 -0
  85. package/dist/src/svgIcons/NewsIcon.d.ts +3 -0
  86. package/dist/src/svgIcons/NotesIcon.d.ts +3 -0
  87. package/dist/src/svgIcons/PhoneIcon.d.ts +3 -0
  88. package/dist/src/svgIcons/PhotoIcon.d.ts +3 -0
  89. package/dist/src/svgIcons/PinIcon.d.ts +3 -0
  90. package/dist/src/svgIcons/PlanIcon.d.ts +3 -0
  91. package/dist/src/svgIcons/PlusIcon.d.ts +3 -0
  92. package/dist/src/svgIcons/PrestigeIcon.d.ts +3 -0
  93. package/dist/src/svgIcons/PrintIcon.d.ts +3 -0
  94. package/dist/src/svgIcons/ProfileIcon.d.ts +3 -0
  95. package/dist/src/svgIcons/QuotesIcon.d.ts +3 -0
  96. package/dist/src/svgIcons/RequestIcon.d.ts +3 -0
  97. package/dist/src/svgIcons/SearchIcon.d.ts +3 -0
  98. package/dist/src/svgIcons/ShareIcon.d.ts +3 -0
  99. package/dist/src/svgIcons/SuitcaseIcon.d.ts +3 -0
  100. package/dist/src/svgIcons/TieIcon.d.ts +3 -0
  101. package/dist/src/svgIcons/TourIcon.d.ts +3 -0
  102. package/dist/src/svgIcons/UkFlagIcon.d.ts +3 -0
  103. package/dist/src/svgIcons/ValuationIcon.d.ts +3 -0
  104. package/dist/src/svgIcons/VideoIcon.d.ts +3 -0
  105. package/dist/src/svgIcons/ViewPswIcon.d.ts +3 -0
  106. package/dist/src/svgIcons/WarningIcon.d.ts +3 -0
  107. package/dist/src/svgIcons/WarningIconRounded.d.ts +3 -0
  108. package/dist/src/svgIcons/WikiNerdIcon.d.ts +3 -0
  109. package/dist/src/svgIcons/WkAppIcon.d.ts +3 -0
  110. package/dist/style.css +1 -1
  111. package/package.json +33 -28
  112. package/dist/App.vue.d.ts +0 -2
  113. package/dist/UIKit/BaseAccordion.vue.d.ts +0 -25
  114. package/dist/UIKit/BaseAlert.vue.d.ts +0 -16
  115. package/dist/UIKit/BaseAutocomplete.vue.d.ts +0 -103
  116. package/dist/UIKit/BaseBadge.vue.d.ts +0 -14
  117. package/dist/UIKit/BaseButton.stories.d.ts +0 -10
  118. package/dist/UIKit/BaseButton.vue.d.ts +0 -90
  119. package/dist/UIKit/BaseCloseButton.vue.d.ts +0 -2
  120. package/dist/UIKit/BaseDropDown.vue.d.ts +0 -78
  121. package/dist/UIKit/BaseInput.stories.d.ts +0 -6
  122. package/dist/UIKit/BasePaper.vue.d.ts +0 -2
  123. package/dist/UIKit/BaseSearchBox.vue.d.ts +0 -4
  124. package/dist/UIKit/BaseSelect.vue.d.ts +0 -150
  125. package/dist/UIKit/BaseToggle.stories.d.ts +0 -7
  126. package/dist/UIKit/Checkbox/CheckboxBtn.vue.d.ts +0 -101
  127. package/dist/UIKit/Checkbox/CheckboxGroup.vue.d.ts +0 -55
  128. package/dist/components/HelloWorld.vue.d.ts +0 -2
  129. package/dist/components/base/StaticSpinner.vue.d.ts +0 -23
  130. /package/dist/{components → src/components}/Pera.stories.d.ts +0 -0
  131. /package/dist/{components → src/components}/base/BaseEmptyButton.stories.d.ts +0 -0
  132. /package/dist/{components → src/components}/base/StaticSpinner.stories.d.ts +0 -0
  133. /package/dist/{components → src/components}/input/TripleSelect.stories.d.ts +0 -0
  134. /package/dist/{components → src/components}/insert/QualityScore.stories.d.ts +0 -0
package/README.md CHANGED
@@ -1,18 +1,46 @@
1
- # Vue 3 + TypeScript + Vite
1
+ # @wikicasa-dev/types
2
2
 
3
- This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
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
- ## Recommended IDE Setup
6
+ yarn add @wikicasa-dev/components
6
7
 
7
- - [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
8
+ ## Sviluppo e rilascio
8
9
 
9
- ## Type Support For `.vue` Imports in TS
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
- TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
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
- If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
15
+ pnpm dev
14
16
 
15
- 1. Disable the built-in TypeScript Extension
16
- 1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
17
- 2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
18
- 2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
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
+ };