@wikicasa-dev/components 2.1.4-alpha.24 → 2.1.4-alpha.4

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 (119) hide show
  1. package/dist/UIKit/AccessibleSelect.d.ts +2 -2
  2. package/dist/UIKit/Accordion/BaseAccordion.d.ts +28 -26
  3. package/dist/UIKit/Accordion/BaseAccordionContent.d.ts +4 -4
  4. package/dist/UIKit/Accordion/BaseAccordionItem.d.ts +40 -14
  5. package/dist/UIKit/Accordion/BaseAccordionItem.js +2 -3
  6. package/dist/UIKit/BaseAutocomplete.d.ts +13 -15
  7. package/dist/UIKit/BaseAutocomplete.js +2 -3
  8. package/dist/UIKit/BaseBadge.d.ts +38 -2
  9. package/dist/UIKit/BaseDropDown.d.ts +36 -21
  10. package/dist/UIKit/BaseDropDown.js +2 -3
  11. package/dist/UIKit/BaseInput.d.ts +7 -6
  12. package/dist/UIKit/BaseModal.d.ts +2 -2
  13. package/dist/UIKit/BasePagination.d.ts +1 -7
  14. package/dist/UIKit/BaseSelect.d.ts +2 -2
  15. package/dist/UIKit/BaseTextarea.d.ts +2 -2
  16. package/dist/UIKit/BaseTextarea.js +2 -2
  17. package/dist/UIKit/Checkbox/CheckboxBtn.d.ts +2 -2
  18. package/dist/UIKit/Checkbox/CheckboxGroup.d.ts +3 -3
  19. package/dist/UIKit/Radio/RadioButton.d.ts +2 -2
  20. package/dist/UIKit/types.d.ts +5 -8
  21. package/dist/assets/packages/components/lib/UIKit/BaseAlert.css +1 -1
  22. package/dist/assets/packages/components/lib/UIKit/BaseBadge.css +1 -1
  23. package/dist/assets/packages/components/lib/UIKit/BaseComplexToggle.css +1 -1
  24. package/dist/assets/packages/components/lib/UIKit/BaseInput.css +1 -1
  25. package/dist/assets/packages/components/lib/UIKit/BasePin.css +1 -1
  26. package/dist/assets/packages/components/lib/UIKit/BaseSelect.css +1 -1
  27. package/dist/assets/packages/components/lib/UIKit/BaseTextarea.css +1 -1
  28. package/dist/assets/packages/components/src/tailwind.css +1 -1
  29. package/dist/index.js +91 -94
  30. package/dist/node_modules/.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev/utilities/dist/utils/ObjectUtils.js +10 -0
  31. package/dist/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/modules/keyboard.js +13 -13
  32. package/dist/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/shared/classes-to-selector.js +1 -1
  33. package/dist/packages/components/lazyModules/Swiper/autoplay.js +2 -2
  34. package/dist/packages/components/lazyModules/Swiper/controller.js +2 -2
  35. package/dist/packages/components/lazyModules/Swiper/free-mode.js +2 -2
  36. package/dist/packages/components/lazyModules/Swiper/keyboard.js +2 -2
  37. package/dist/packages/components/lazyModules/Swiper/navigation.js +2 -2
  38. package/dist/packages/components/lazyModules/Swiper/pagination.js +2 -2
  39. package/dist/packages/components/lazyModules/Swiper/thumbs.js +2 -2
  40. package/dist/packages/components/lib/UIKit/AccessibleSelect.vue.js +24 -24
  41. package/dist/packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js +28 -25
  42. package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionBtn.vue.js +2 -2
  43. package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js +128 -59
  44. package/dist/packages/components/lib/UIKit/BaseAlert.vue.js +2 -2
  45. package/dist/packages/components/lib/UIKit/BaseAutocomplete.vue.js +143 -110
  46. package/dist/packages/components/lib/UIKit/BaseBadge.vue.js +45 -16
  47. package/dist/packages/components/lib/UIKit/BaseBanner.vue.js +9 -9
  48. package/dist/packages/components/lib/UIKit/BaseButton.vue.js +26 -23
  49. package/dist/packages/components/lib/UIKit/BaseChip.vue.js +2 -2
  50. package/dist/packages/components/lib/UIKit/BaseCollapse.vue.js +2 -2
  51. package/dist/packages/components/lib/UIKit/BaseDropDown.vue.js +99 -83
  52. package/dist/packages/components/lib/UIKit/BaseFloatingLabel.vue.js +4 -4
  53. package/dist/packages/components/lib/UIKit/BaseInput.vue.js +51 -52
  54. package/dist/packages/components/lib/UIKit/BaseModal.vue.js +2 -2
  55. package/dist/packages/components/lib/UIKit/BaseNotificationBadge.vue.js +1 -1
  56. package/dist/packages/components/lib/UIKit/BasePagination.vue.js +40 -63
  57. package/dist/packages/components/lib/UIKit/BasePin.vue.js +1 -1
  58. package/dist/packages/components/lib/UIKit/BaseSelect.vue.js +14 -14
  59. package/dist/packages/components/lib/UIKit/BaseSnackbar.vue.js +2 -2
  60. package/dist/packages/components/lib/UIKit/BaseTextarea.vue.js +8 -8
  61. package/dist/packages/components/lib/UIKit/BaseUploadFile.vue.js +1 -1
  62. package/dist/packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js +4 -4
  63. package/dist/packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js +9 -7
  64. package/dist/packages/components/lib/UIKit/DatePicker.vue.js +2 -2
  65. package/dist/packages/components/lib/UIKit/InputDropdown.vue.js +38 -39
  66. package/dist/packages/components/lib/UIKit/ShimmerLoader/BaseShimmerLoader.vue.js +1 -1
  67. package/dist/packages/components/lib/components/carousel/SwiperCarousel.vue.js +6 -7
  68. package/package.json +31 -24
  69. package/dist/_virtual/_commonjsHelpers.js +0 -6
  70. package/dist/_virtual/cloneDeep.js +0 -4
  71. package/dist/_virtual/create-plugin.js +0 -4
  72. package/dist/_virtual/createPlugin.js +0 -4
  73. package/dist/_virtual/default-theme.js +0 -4
  74. package/dist/_virtual/defaultTheme.js +0 -7
  75. package/dist/_virtual/plugin.js +0 -7
  76. package/dist/assets/packages/components/lib/UIKit/Accordion/BaseAccordionItem.css +0 -1
  77. package/dist/assets/packages/components/lib/UIKit/BaseAutocomplete.css +0 -1
  78. package/dist/assets/packages/components/lib/UIKit/BaseDropDown.css +0 -1
  79. package/dist/node_modules/.pnpm/@wikicasa-dev_utilities@1.1.22-alpha.4/node_modules/@wikicasa-dev/utilities/dist/utils/ObjectUtils.js +0 -8
  80. package/dist/node_modules/.pnpm/tailwindcss@3.4.15_ts-node@10.9.2_@types_node@24.0.1_typescript@5.8.3_/node_modules/tailwindcss/defaultTheme.js +0 -11
  81. package/dist/node_modules/.pnpm/tailwindcss@3.4.15_ts-node@10.9.2_@types_node@24.0.1_typescript@5.8.3_/node_modules/tailwindcss/lib/public/create-plugin.js +0 -25
  82. package/dist/node_modules/.pnpm/tailwindcss@3.4.15_ts-node@10.9.2_@types_node@24.0.1_typescript@5.8.3_/node_modules/tailwindcss/lib/public/default-theme.js +0 -26
  83. package/dist/node_modules/.pnpm/tailwindcss@3.4.15_ts-node@10.9.2_@types_node@24.0.1_typescript@5.8.3_/node_modules/tailwindcss/lib/util/cloneDeep.js +0 -23
  84. package/dist/node_modules/.pnpm/tailwindcss@3.4.15_ts-node@10.9.2_@types_node@24.0.1_typescript@5.8.3_/node_modules/tailwindcss/lib/util/createPlugin.js +0 -34
  85. package/dist/node_modules/.pnpm/tailwindcss@3.4.15_ts-node@10.9.2_@types_node@24.0.1_typescript@5.8.3_/node_modules/tailwindcss/plugin.js +0 -11
  86. package/dist/node_modules/.pnpm/tailwindcss@3.4.15_ts-node@10.9.2_@types_node@24.0.1_typescript@5.8.3_/node_modules/tailwindcss/stubs/config.full.js +0 -1068
  87. package/dist/packages/components/plugins/buttonPlugin.js +0 -232
  88. package/dist/tailwind.config.js +0 -147
  89. package/plugins/buttonPlugin.ts +0 -290
  90. /package/dist/assets/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/modules/free-mode.css +0 -0
  91. /package/dist/assets/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/modules/navigation.css +0 -0
  92. /package/dist/assets/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/modules/pagination.css +0 -0
  93. /package/dist/assets/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/modules/zoom.css +0 -0
  94. /package/dist/assets/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/swiper.css +0 -0
  95. /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.15-alpha.1_vue@3.5.16_typescript@5.8.3_ → @wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3}/node_modules/@wikicasa-dev/svg-icons/dist/ArrowFilledIcon.js +0 -0
  96. /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.15-alpha.1_vue@3.5.16_typescript@5.8.3_ → @wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3}/node_modules/@wikicasa-dev/svg-icons/dist/ArrowIcon.js +0 -0
  97. /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.15-alpha.1_vue@3.5.16_typescript@5.8.3_ → @wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3}/node_modules/@wikicasa-dev/svg-icons/dist/CheckIcon.js +0 -0
  98. /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.15-alpha.1_vue@3.5.16_typescript@5.8.3_ → @wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3}/node_modules/@wikicasa-dev/svg-icons/dist/CloseIcon.js +0 -0
  99. /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.15-alpha.1_vue@3.5.16_typescript@5.8.3_ → @wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3}/node_modules/@wikicasa-dev/svg-icons/dist/DefaultValues-CpabIgVz.js +0 -0
  100. /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.15-alpha.1_vue@3.5.16_typescript@5.8.3_ → @wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3}/node_modules/@wikicasa-dev/svg-icons/dist/PharmacyIcon.js +0 -0
  101. /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.15-alpha.1_vue@3.5.16_typescript@5.8.3_ → @wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3}/node_modules/@wikicasa-dev/svg-icons/dist/WarningIconRounded.js +0 -0
  102. /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.15-alpha.1_vue@3.5.16_typescript@5.8.3_ → @wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3}/node_modules/@wikicasa-dev/svg-icons/dist/svgIconFactory-BpnFimFz.js +0 -0
  103. /package/dist/node_modules/.pnpm/{@wikicasa-dev_utilities@1.1.22-alpha.4 → @wikicasa-dev_utilities@1.1.21}/node_modules/@wikicasa-dev/utilities/dist/utils/FunctionUtils.js +0 -0
  104. /package/dist/node_modules/.pnpm/{@wikicasa-dev_vue-composables@0.0.24-alpha.5_vue@3.5.16_typescript@5.8.3_ → @wikicasa-dev_vue-composables@0.0.23_typescript@5.8.3}/node_modules/@wikicasa-dev/vue-composables/dist/useBreakpoints.js +0 -0
  105. /package/dist/node_modules/.pnpm/{@wikicasa-dev_vue-composables@0.0.24-alpha.5_vue@3.5.16_typescript@5.8.3_ → @wikicasa-dev_vue-composables@0.0.23_typescript@5.8.3}/node_modules/@wikicasa-dev/vue-composables/dist/useKeyboardController.js +0 -0
  106. /package/dist/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/modules/autoplay.css.js +0 -0
  107. /package/dist/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/modules/autoplay.js +0 -0
  108. /package/dist/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/modules/controller.css.js +0 -0
  109. /package/dist/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/modules/controller.js +0 -0
  110. /package/dist/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/modules/free-mode.js +0 -0
  111. /package/dist/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/modules/keyboard.css.js +0 -0
  112. /package/dist/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/modules/navigation.js +0 -0
  113. /package/dist/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/modules/pagination.js +0 -0
  114. /package/dist/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/modules/thumbs.css.js +0 -0
  115. /package/dist/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/modules/thumbs.js +0 -0
  116. /package/dist/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/modules/zoom.js +0 -0
  117. /package/dist/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/shared/create-element-if-not-defined.js +0 -0
  118. /package/dist/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/shared/ssr-window.esm.js +0 -0
  119. /package/dist/node_modules/.pnpm/{swiper@11.2.10 → swiper@11.2.8}/node_modules/swiper/shared/utils.js +0 -0
@@ -1,232 +0,0 @@
1
- import n from "../../../_virtual/plugin.js";
2
- const o = {
3
- //New colors
4
- primary: { value: "#F20282", hover: "#E30C79", outlineHover: "#FFF8FB" },
5
- secondary: { value: "#2b5dff", hover: "#244FD9" },
6
- lightgray: { value: "#C1C8D5" },
7
- ghost: { value: "#FAFBFF" },
8
- lavender: { value: "#E9EFFE" },
9
- black: { value: "#222222" },
10
- warning: { value: "#FFD167" },
11
- white: { value: "#FFF", hover: "" },
12
- danger: { value: "#FA4F64" }
13
- }, b = n(({ addComponents: r, theme: t }) => {
14
- r({
15
- ".btn": {
16
- "--btn-px": "25px",
17
- "--btn-py": "11px",
18
- "--btn-bg-color": "transparent",
19
- "--btn-text-color": o.black.value,
20
- "--btn-border-color": "unset",
21
- "--btn-border-width": "0",
22
- "--btn-border-radius": "24px",
23
- "--btn-border-style": "solid",
24
- "--btn-height": "40px",
25
- "--btn-width": "auto",
26
- "--btn-font-size": t("fontSize.16"),
27
- "--btn-transition": "color, background-color cubic-bezier(0.4, 0, 0.2, 1) 150ms",
28
- "--btn-font-weight": `${t("fontWeight.semibold")}`,
29
- display: "inline-flex",
30
- "align-items": "center",
31
- "justify-content": "center",
32
- "font-size": "var(--btn-font-size)",
33
- "font-weight": "var(--btn-font-weight)",
34
- "white-space": "nowrap",
35
- border: "var(--btn-border-width) var(--btn-border-color) var(--btn-border-style)",
36
- "border-radius": "var(--btn-border-radius)",
37
- cursor: "pointer",
38
- height: "var(--btn-height)",
39
- width: "var(--btn-width)",
40
- "background-color": "var(--btn-bg-color)",
41
- color: "var(--btn-text-color)",
42
- padding: "var(--btn-py) var(--btn-px)",
43
- transition: "var(--btn-transition)",
44
- "line-height": "1",
45
- "-webkit-tap-highlight-color": "transparent",
46
- "&.btn-lg": {
47
- "--btn-height": "48px",
48
- "--btn-px": "24px",
49
- "--btn-py": "12px"
50
- },
51
- "&.btn-sm": {
52
- "--btn-px": "24px",
53
- "--btn-py": "8px",
54
- "--btn-height": "40px"
55
- },
56
- "&.btn-rounded": {
57
- "--btn-px": "0",
58
- "--btn-py": "0"
59
- },
60
- "&.btn-outline": {
61
- "--btn-border-width": "1px",
62
- "--btn-bg-color": o.white.value
63
- },
64
- "&.btn-primary": {
65
- ...e(
66
- {
67
- bgColor: o.primary.value,
68
- textColor: o.white.value,
69
- hoverBgColor: o.primary.hover
70
- },
71
- {
72
- mainColor: o.white.hover,
73
- textColor: o.primary.value,
74
- hoverBgColor: o.primary.outlineHover
75
- }
76
- ),
77
- "text-transform": "uppercase"
78
- },
79
- "&.btn-secondary": e(
80
- {
81
- bgColor: o.secondary.value,
82
- textColor: o.white.value,
83
- hoverBgColor: o.secondary.hover
84
- },
85
- {
86
- mainColor: o.secondary.value,
87
- textColor: o.secondary.value
88
- }
89
- ),
90
- "&.btn-ternary": {
91
- ...e({
92
- bgColor: o.white.value,
93
- textColor: o.secondary.value,
94
- hoverBgColor: o.white.value,
95
- hoverTextColor: o.secondary.hover
96
- }),
97
- "--btn-border-color": o.lightgray.value,
98
- "--btn-border-width": "1px",
99
- "--btn-border-radius": "24px"
100
- },
101
- "&.btn-quaternary": {
102
- "--btn-px": "0",
103
- "--btn-py": "0",
104
- "--btn-text-color": o.secondary.value,
105
- "--btn-height": "auto",
106
- "&:hover": {
107
- "text-decoration": "underline",
108
- "--btn-text-color": o.secondary.hover
109
- },
110
- "&:disabled": {
111
- "--btn-bg-color": "transparent",
112
- "--btn-text-color": o.lightgray.value
113
- }
114
- },
115
- "&.btn-single-selection": {
116
- "--btn-px": "16px",
117
- "--btn-py": "8px",
118
- "--btn-border-radius": t("borderRadius.2xs"),
119
- "--btn-border-color": o.lightgray.value,
120
- "--btn-border-width": "1px",
121
- "--btn-font-weight": t("fontWeight.regular"),
122
- "&:hover": {
123
- "--btn-border-color": o.secondary.value
124
- },
125
- "&:active,&.active,&[data-active='true']": {
126
- "--btn-bg-color": o.ghost.value,
127
- "--btn-text-color": o.secondary.value,
128
- "--btn-border-color": o.secondary.value
129
- }
130
- }
131
- },
132
- //OLD style. Kept for retro-compatibility
133
- ".btn-light": e({
134
- textColor: o.primary.value,
135
- bgColor: o.white.value,
136
- hoverTextColor: o.primary.value,
137
- hoverBgColor: "#FAFAFA"
138
- }),
139
- ".btn-warning": e({
140
- bgColor: o.warning.value,
141
- textColor: "#2A3761",
142
- hoverBgColor: "#F2C761"
143
- }),
144
- ".btn-danger": e(
145
- {
146
- bgColor: o.danger.value,
147
- textColor: o.white.value,
148
- hoverBgColor: "#E0485A"
149
- },
150
- {
151
- mainColor: o.danger.value,
152
- textColor: o.danger.value
153
- }
154
- ),
155
- ".btn-multi-selection": {
156
- "--btn-py": "10px",
157
- "--btn-height": "40px",
158
- "font-weight": t("fontWeight.regular"),
159
- "--btn-border-radius": t("borderRadius.xs"),
160
- "--btn-border-color": "#EAEFFD",
161
- "--btn-border-width": "1px",
162
- "white-space": "normal",
163
- ...e({
164
- textColor: o.black.value,
165
- bgColor: "#F5F7FA",
166
- hoverBgColor: o.lavender.value
167
- })
168
- },
169
- ".btn-facile": {
170
- "--btn-facile-color": "#FF6600",
171
- "--btn-facile-hover-color": "#b34700",
172
- ...e({
173
- bgColor: "var(--btn-facile-color)",
174
- textColor: o.white.value,
175
- hoverBgColor: "var(--btn-facile-hover-color)",
176
- hoverTextColor: o.white.value
177
- })
178
- },
179
- ".btn-show-more": {
180
- "--btn-border-radius": "0",
181
- "--btn-border-color": o.white.value,
182
- ...e({
183
- textColor: "#2B5DFF",
184
- bgColor: o.white.value,
185
- hoverTextColor: "#3646B3",
186
- hoverBgColor: o.white.value
187
- })
188
- },
189
- ".btn-transparent": {
190
- "--border-color": "transparent",
191
- "--btn-px": "0",
192
- "--btn-py": "0",
193
- "&:hover": {
194
- "--btn-bg-color": "transparent",
195
- "--border-color": "transparent"
196
- }
197
- }
198
- });
199
- }), e = (r, t) => ({
200
- "--btn-bg-color": r.bgColor,
201
- "--btn-text-color": r.textColor,
202
- "&:disabled": {
203
- cursor: "not-allowed"
204
- },
205
- "&:hover:not(:disabled)": {
206
- "--btn-text-color": r.hoverTextColor,
207
- "--btn-bg-color": r.hoverBgColor
208
- },
209
- ...t ? {
210
- "&.btn-outline": l(t)
211
- } : {}
212
- }), l = (r) => ({
213
- "--btn-border-color": r.mainColor ?? r.borderColor,
214
- "--btn-text-color": r.textColor,
215
- "--btn-bg-color": "#fff",
216
- //By default, the active section is the same of the hover section in desktop mode
217
- "&:active": {
218
- "--btn-bg-color": (r.mainColor ?? r.activeBgColor ?? r.hoverBgColor) + " !important",
219
- //By default, on active the text is white
220
- ...r.activeTextColor || r.hoverTextColor ? {
221
- "--btn-text-color": r.activeTextColor ?? r.hoverTextColor
222
- } : {}
223
- },
224
- "&:hover": {
225
- //By default, the text color is white
226
- ...r.hoverBgColor ? { "--btn-bg-color": r.hoverBgColor } : {},
227
- "--btn-text-color": r.hoverTextColor ?? r.textColor
228
- }
229
- });
230
- export {
231
- b as buttonPlugin
232
- };
@@ -1,147 +0,0 @@
1
- import o from "./_virtual/plugin.js";
2
- import { buttonPlugin as i } from "./packages/components/plugins/buttonPlugin.js";
3
- import n from "./_virtual/defaultTheme.js";
4
- const p = {
5
- screens: {
6
- xs: "360px",
7
- sm: "640px",
8
- md: "768px",
9
- lg: "1024px",
10
- xl: "1280px"
11
- },
12
- fontFamily: {
13
- sans: ["Poppins", ...n.fontFamily.sans]
14
- },
15
- fontWeight: {
16
- regular: 400,
17
- medium: 500,
18
- semibold: 600
19
- },
20
- lineHeight: {
21
- "16px": "16px",
22
- "20px": "20px",
23
- "24px": "24px",
24
- "28px": "28px",
25
- "30px": "30px"
26
- },
27
- fontSize: {
28
- 12: "12px",
29
- 14: "14px",
30
- 16: "16px",
31
- 20: "20px",
32
- 22: "22px"
33
- },
34
- borderRadius: {
35
- none: "0",
36
- "2xs": "4px",
37
- xs: "8px",
38
- sm: "12px",
39
- md: "16px",
40
- lg: "24px",
41
- xl: "32px",
42
- "2xl": "40px",
43
- full: "9999px"
44
- },
45
- aspectRatio: {
46
- "1/1": "1 / 1",
47
- "4/3": "4 / 3",
48
- "16/9": "16 / 9"
49
- },
50
- opacity: {
51
- 0: 0,
52
- 50: "50%",
53
- 100: "100%"
54
- },
55
- colors: {
56
- "w-pink": "#F20282",
57
- "w-blue": "#2b5dff",
58
- "w-darkblue": "#162F80",
59
- "w-black": "#222222",
60
- "w-gray": "#6D7687",
61
- "w-lightgray": "#C1C8D5",
62
- "w-cultured": "#F4F7FF",
63
- "w-ghost": "#FAFBFF",
64
- "w-white": "#FFFFFF",
65
- "w-red": "#F20003",
66
- "w-warning": "#FFD167",
67
- "w-pink-hover": "#E30C79",
68
- "w-pink-outline-hover": "#FFF8FB",
69
- "w-blue-hover": "#244FD9",
70
- transparent: "transparent",
71
- white: "#fff"
72
- },
73
- spacing: {
74
- 0: "0",
75
- "2xs": "4px",
76
- xs: "8px",
77
- sm: "12px",
78
- md: "16px",
79
- lg: "24px",
80
- xl: "32px",
81
- "2xl": "40px"
82
- },
83
- boxShadow: {
84
- surface: "0px 1px 3px rgba(0,0,0,0.1)"
85
- },
86
- dropShadow: {},
87
- extend: {
88
- aria: {
89
- invalid: 'invalid="true"'
90
- }
91
- }
92
- }, l = {
93
- darkMode: ["selector", "[class*='htw-dark']"],
94
- prefix: "uikit-",
95
- content: [
96
- "./src/**/*.{vue,ts}",
97
- "./lib/**/*.{vue,ts}",
98
- "./stories/**/*.{story.vue,ts}"
99
- ],
100
- theme: p,
101
- corePlugins: {
102
- preflight: !1
103
- },
104
- plugins: [
105
- o(function({ addUtilities: t }) {
106
- t({
107
- ".no-scrollbar": {
108
- "-ms-overflow-style": "none",
109
- scrollbarWidth: "none",
110
- "&::-webkit-scrollbar": {
111
- display: "none"
112
- }
113
- },
114
- ".no-scrolling": {
115
- overflow: "hidden",
116
- "&::-webkit-scrollbar": {
117
- backgroundColor: "rgb(180 194 240 / 0.7)"
118
- }
119
- },
120
- ".container-xl": {
121
- maxWidth: "1280px"
122
- },
123
- ".safe-bottom": {
124
- paddingBottom: "env(safe-area-inset-bottom) !important"
125
- },
126
- ".visually-hidden, .visually-hidden-focusable:not(:focus):not(:focus-within)": {
127
- border: "0 !important",
128
- clip: "rect(0, 0, 0, 0) !important",
129
- height: "1px !important",
130
- margin: "-1px !important",
131
- overflow: "hidden !important",
132
- padding: "0 !important",
133
- "white-space": "nowrap !important",
134
- width: "1px !important"
135
- },
136
- ".visually-hidden:not(caption), .visually-hidden-focusable:not(:focus):not(:focus-within):not(caption)": {
137
- position: "absolute !important"
138
- }
139
- });
140
- }),
141
- i
142
- ]
143
- };
144
- export {
145
- l as default,
146
- p as twTheme
147
- };
@@ -1,290 +0,0 @@
1
- import plugin from "tailwindcss/plugin";
2
-
3
- const colors = {
4
- //New colors
5
- primary: { value: "#F20282", hover: "#E30C79", outlineHover: "#FFF8FB" },
6
- secondary: { value: "#2b5dff", hover: "#244FD9" },
7
- lightgray: { value: "#C1C8D5", hover: "" },
8
- ghost: { value: "#FAFBFF", hover: "" },
9
-
10
- //Old colors
11
- darkPrimary: { value: "#2A3761", hover: "" },
12
- lavender: { value: "#E9EFFE", hover: "" },
13
- cultured: { value: "#F4F7FF", hover: "" },
14
- carbon: { value: "#3C474D", hover: "" },
15
- gray: { value: "#6D7687", hover: "" },
16
- black: { value: "#222222", hover: "" },
17
- warning: { value: "#FFD167", hover: "" },
18
- white: { value: "#FFF", hover: "" },
19
- danger: { value: "#FA4F64", hover: "" },
20
- } as const;
21
-
22
- export const buttonPlugin = plugin(({ addComponents, theme }) => {
23
- addComponents({
24
- ".btn": {
25
- "--btn-px": "25px",
26
- "--btn-py": "11px",
27
- "--btn-bg-color": "transparent",
28
- "--btn-text-color": colors.black.value,
29
- "--btn-border-color": "unset",
30
- "--btn-border-width": "0",
31
- "--btn-border-radius": "24px",
32
- "--btn-border-style": "solid",
33
- "--btn-height": "40px",
34
- "--btn-width": "auto",
35
- "--btn-font-size": theme("fontSize.16"),
36
- "--btn-transition":
37
- "color, background-color cubic-bezier(0.4, 0, 0.2, 1) 150ms",
38
- "--btn-font-weight": `${theme("fontWeight.semibold")}`,
39
- display: "inline-flex",
40
- "align-items": "center",
41
- "justify-content": "center",
42
- "font-size": "var(--btn-font-size)",
43
- "font-weight": "var(--btn-font-weight)",
44
- "white-space": "nowrap",
45
- border:
46
- "var(--btn-border-width) var(--btn-border-color) var(--btn-border-style)",
47
- "border-radius": "var(--btn-border-radius)",
48
- cursor: "pointer",
49
- height: "var(--btn-height)",
50
- width: "var(--btn-width)",
51
- "background-color": "var(--btn-bg-color)",
52
- color: "var(--btn-text-color)",
53
- padding: "var(--btn-py) var(--btn-px)",
54
- transition: "var(--btn-transition)",
55
- "line-height": "1",
56
- "-webkit-tap-highlight-color": "transparent",
57
- "&.btn-lg": {
58
- "--btn-height": "48px",
59
- "--btn-px": "24px",
60
- "--btn-py": "12px",
61
- },
62
- "&.btn-sm": {
63
- "--btn-px": "24px",
64
- "--btn-py": "8px",
65
- "--btn-height": "40px",
66
- },
67
- "&.btn-rounded": {
68
- "--btn-px": "0",
69
- "--btn-py": "0",
70
- },
71
- "&.btn-outline": {
72
- "--btn-border-width": "1px",
73
- "--btn-bg-color": colors.white.value,
74
- },
75
- "&.btn-primary": {
76
- ...createBtn(
77
- {
78
- bgColor: colors.primary.value,
79
- textColor: colors.white.value,
80
- hoverBgColor: colors.primary.hover,
81
- hoverDisabledBgColor: colors.primary.value,
82
- },
83
- {
84
- mainColor: colors.white.hover,
85
- textColor: colors.primary.value,
86
- hoverBgColor: colors.primary.outlineHover,
87
- },
88
- ),
89
- "text-transform": "uppercase",
90
- },
91
- "&.btn-secondary": createBtn(
92
- {
93
- bgColor: colors.secondary.value,
94
- textColor: colors.white.value,
95
- hoverBgColor: colors.secondary.hover,
96
- hoverDisabledBgColor: colors.secondary.value,
97
- },
98
- {
99
- mainColor: colors.secondary.value,
100
- textColor: colors.secondary.value,
101
- },
102
- ),
103
- "&.btn-ternary": {
104
- ...createBtn({
105
- bgColor: colors.white.value,
106
- textColor: colors.secondary.value,
107
- hoverBgColor: colors.white.value,
108
- hoverDisabledBgColor: colors.secondary.value,
109
- hoverTextColor: colors.secondary.hover,
110
- }),
111
- "--btn-border-color": colors.lightgray.value,
112
- "--btn-border-width": "1px",
113
- "--btn-border-radius": "24px",
114
- },
115
- "&.btn-quaternary": {
116
- "--btn-px": "0",
117
- "--btn-py": "0",
118
- "--btn-text-color": colors.secondary.value,
119
- "--btn-height": "auto",
120
- "&:hover": {
121
- "text-decoration": "underline",
122
- "--btn-text-color": colors.secondary.hover,
123
- },
124
- "&:disabled": {
125
- "--btn-bg-color": "transparent",
126
- "--btn-text-color": colors.lightgray.value,
127
- },
128
- },
129
- "&.btn-single-selection": {
130
- "--btn-px": "16px",
131
- "--btn-py": "8px",
132
- "--btn-border-radius": theme("borderRadius.2xs"),
133
- "--btn-border-color": colors.lightgray.value,
134
- "--btn-border-width": "1px",
135
- "--btn-font-weight": theme("fontWeight.regular"),
136
- "&:hover": {
137
- "--btn-border-color": colors.secondary.value,
138
- },
139
- "&:active,&.active,&[data-active='true']": {
140
- "--btn-bg-color": colors.ghost.value,
141
- "--btn-text-color": colors.secondary.value,
142
- "--btn-border-color": colors.secondary.value,
143
- },
144
- },
145
- },
146
- //OLD style. Kept for retro-compatibility
147
- ".btn-light": createBtn({
148
- textColor: colors.primary.value,
149
- bgColor: colors.white.value,
150
- hoverTextColor: colors.primary.value,
151
- hoverBgColor: "#FAFAFA",
152
- hoverDisabledBgColor: colors.white.value,
153
- }),
154
- ".btn-warning": createBtn({
155
- bgColor: colors.warning.value,
156
- textColor: "#2A3761",
157
- hoverBgColor: "#F2C761",
158
- hoverDisabledBgColor: colors.warning.value,
159
- }),
160
- ".btn-danger": createBtn(
161
- {
162
- bgColor: colors.danger.value,
163
- textColor: colors.white.value,
164
- hoverBgColor: "#E0485A",
165
- hoverDisabledBgColor: colors.danger.value,
166
- },
167
- {
168
- mainColor: colors.danger.value,
169
- textColor: colors.danger.value,
170
- },
171
- ),
172
- ".btn-multi-selection": {
173
- "--btn-py": "10px",
174
- "--btn-height": "40px",
175
- "font-weight": theme("fontWeight.regular"),
176
- "--btn-border-radius": theme("borderRadius.xs"),
177
- "--btn-border-color": "#EAEFFD",
178
- "--btn-border-width": "1px",
179
- "white-space": "normal",
180
- ...createBtn({
181
- textColor: colors.black.value,
182
- bgColor: "#F5F7FA",
183
- hoverBgColor: colors.lavender.value,
184
- hoverDisabledBgColor: colors.white.value,
185
- hoverBorderColor: "#385CF6",
186
- }),
187
- },
188
-
189
- ".btn-facile": {
190
- "--btn-facile-color": "#FF6600",
191
- "--btn-facile-hover-color": "#b34700",
192
- ...createBtn({
193
- bgColor: "var(--btn-facile-color)",
194
- textColor: colors.white.value,
195
- hoverBgColor: "var(--btn-facile-hover-color)",
196
- hoverTextColor: colors.white.value,
197
- hoverDisabledBgColor: "var(--btn-facile-color)",
198
- }),
199
- },
200
- ".btn-show-more": {
201
- "--btn-border-radius": "0",
202
- "--btn-border-color": colors.white.value,
203
- ...createBtn({
204
- textColor: "#2B5DFF",
205
- bgColor: colors.white.value,
206
- hoverTextColor: "#3646B3",
207
- hoverBgColor: colors.white.value,
208
- hoverDisabledBgColor: colors.white.value,
209
- }),
210
- },
211
- ".btn-transparent": {
212
- "--border-color": "transparent",
213
- "--btn-px": "0",
214
- "--btn-py": "0",
215
- "&:hover": {
216
- "--btn-bg-color": "transparent",
217
- "--border-color": "transparent",
218
- },
219
- },
220
- });
221
- });
222
-
223
- type BtnAttributes = {
224
- bgColor: string;
225
- textColor: string;
226
- hoverBgColor: string;
227
- hoverTextColor?: string;
228
- /* The border color will be applied to desktop mode */
229
- hoverBorderColor?: string;
230
- activeBorderColor?: string;
231
- activeBgColor?: string;
232
- activeTextColor?: string;
233
- hoverDisabledBgColor: string;
234
- };
235
- type BtnOutlineVariantAttributes = {
236
- /* If present, it will be used to set the color to borders, text and background */
237
- mainColor?: string;
238
- borderColor?: string;
239
- textColor?: string;
240
- /* The hover bg color will be activated only from tablet mode on */
241
- hoverBgColor?: string;
242
- hoverDisabledBgColor?: string;
243
- /* The hover text color will be activated only from tablet mode on */
244
- hoverTextColor?: string;
245
- activeBgColor?: string;
246
- activeTextColor?: string;
247
- };
248
-
249
- const createBtn = (
250
- btnProps: BtnAttributes,
251
- btnOutlineProps?: BtnOutlineVariantAttributes,
252
- ): any => ({
253
- "--btn-bg-color": btnProps.bgColor,
254
- "--btn-text-color": btnProps.textColor,
255
- "&:disabled": {
256
- cursor: "not-allowed",
257
- },
258
- "&:hover:not(:disabled)": {
259
- "--btn-text-color": btnProps.hoverTextColor,
260
- "--btn-bg-color": btnProps.hoverBgColor,
261
- },
262
- ...(btnOutlineProps
263
- ? {
264
- "&.btn-outline": createOutlineVariant(btnOutlineProps),
265
- }
266
- : {}),
267
- });
268
-
269
- const createOutlineVariant = (props: BtnOutlineVariantAttributes): any => ({
270
- "--btn-border-color": props.mainColor ?? props.borderColor,
271
- "--btn-text-color": props.textColor,
272
- "--btn-bg-color": "#fff",
273
- //By default, the active section is the same of the hover section in desktop mode
274
- "&:active": {
275
- "--btn-bg-color":
276
- (props.mainColor ?? props.activeBgColor ?? props.hoverBgColor) +
277
- " !important",
278
- //By default, on active the text is white
279
- ...(props.activeTextColor || props.hoverTextColor
280
- ? {
281
- "--btn-text-color": props.activeTextColor ?? props.hoverTextColor,
282
- }
283
- : {}),
284
- },
285
- "&:hover": {
286
- //By default, the text color is white
287
- ...(props.hoverBgColor ? { "--btn-bg-color": props.hoverBgColor } : {}),
288
- "--btn-text-color": props.hoverTextColor ?? props.textColor,
289
- },
290
- });