@wikicasa-dev/components 2.1.4-alpha.16 → 2.1.4-alpha.18
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/dist/UIKit/BaseAutocomplete.d.ts +4 -0
- package/dist/_virtual/_commonjsHelpers.js +6 -0
- package/dist/_virtual/cloneDeep.js +4 -0
- package/dist/_virtual/create-plugin.js +4 -0
- package/dist/_virtual/createPlugin.js +4 -0
- package/dist/_virtual/default-theme.js +4 -0
- package/dist/_virtual/defaultTheme.js +7 -0
- package/dist/_virtual/plugin.js +7 -0
- package/dist/lib/UIKit/BaseAutocomplete.vue.js +66 -68
- package/dist/node_modules/tailwindcss/defaultTheme.js +11 -0
- package/dist/node_modules/tailwindcss/lib/public/create-plugin.js +25 -0
- package/dist/node_modules/tailwindcss/lib/public/default-theme.js +26 -0
- package/dist/node_modules/tailwindcss/lib/util/cloneDeep.js +23 -0
- package/dist/node_modules/tailwindcss/lib/util/createPlugin.js +34 -0
- package/dist/node_modules/tailwindcss/plugin.js +11 -0
- package/dist/node_modules/tailwindcss/stubs/config.full.js +1068 -0
- package/dist/plugins/buttonPlugin.js +232 -0
- package/dist/tailwind.config.js +143 -0
- package/package.json +3 -2
|
@@ -0,0 +1,232 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import t from "./_virtual/plugin.js";
|
|
2
|
+
import { buttonPlugin as i } from "./plugins/buttonPlugin.js";
|
|
3
|
+
import n from "./_virtual/defaultTheme.js";
|
|
4
|
+
const p = {
|
|
5
|
+
darkMode: ["selector", "[class*='htw-dark']"],
|
|
6
|
+
prefix: "uikit-",
|
|
7
|
+
content: [
|
|
8
|
+
"./src/**/*.{vue,ts}",
|
|
9
|
+
"./lib/**/*.{vue,ts}",
|
|
10
|
+
"./stories/**/*.{story.vue,ts}"
|
|
11
|
+
],
|
|
12
|
+
theme: {
|
|
13
|
+
screens: {
|
|
14
|
+
xs: "360px",
|
|
15
|
+
sm: "640px",
|
|
16
|
+
md: "768px",
|
|
17
|
+
lg: "1024px",
|
|
18
|
+
xl: "1280px"
|
|
19
|
+
},
|
|
20
|
+
fontFamily: {
|
|
21
|
+
sans: ["Poppins", ...n.fontFamily.sans]
|
|
22
|
+
},
|
|
23
|
+
fontWeight: {
|
|
24
|
+
regular: 400,
|
|
25
|
+
medium: 500,
|
|
26
|
+
semibold: 600
|
|
27
|
+
},
|
|
28
|
+
lineHeight: {
|
|
29
|
+
6: "1.5rem",
|
|
30
|
+
7: "1.75rem"
|
|
31
|
+
},
|
|
32
|
+
fontSize: {
|
|
33
|
+
10: "10px",
|
|
34
|
+
12: "12px",
|
|
35
|
+
DEFAULT: "14px",
|
|
36
|
+
16: "16px",
|
|
37
|
+
18: "18px",
|
|
38
|
+
20: "20px",
|
|
39
|
+
22: "22px"
|
|
40
|
+
},
|
|
41
|
+
borderRadius: {
|
|
42
|
+
none: "0",
|
|
43
|
+
"3xs": "4px",
|
|
44
|
+
"2xs": "8px",
|
|
45
|
+
xs: "12px",
|
|
46
|
+
DEFAULT: "20px",
|
|
47
|
+
full: "9999px"
|
|
48
|
+
},
|
|
49
|
+
aspectRatio: {
|
|
50
|
+
"1/1": "1 / 1",
|
|
51
|
+
"4/3": "4 / 3",
|
|
52
|
+
"16/9": "16 / 9"
|
|
53
|
+
},
|
|
54
|
+
opacity: {
|
|
55
|
+
0: 0,
|
|
56
|
+
50: "50%",
|
|
57
|
+
100: "100%"
|
|
58
|
+
},
|
|
59
|
+
colors: {
|
|
60
|
+
"w-pink": "#F20282",
|
|
61
|
+
"w-blue": "#2b5dff",
|
|
62
|
+
"w-darkblue": "#162F80",
|
|
63
|
+
"w-black": "#222222",
|
|
64
|
+
"w-gray": "#6D7687",
|
|
65
|
+
"w-lightgray": "#C1C8D5",
|
|
66
|
+
"w-cultured": "#F4F7FF",
|
|
67
|
+
"w-ghost": "#FAFBFF",
|
|
68
|
+
"w-white": "#FFFFFF",
|
|
69
|
+
"w-red": "#F20003",
|
|
70
|
+
"w-warning": "#FFD167",
|
|
71
|
+
"w-pink-hover": "#E30C79",
|
|
72
|
+
"w-pink-outline-hover": "#FFF8FB",
|
|
73
|
+
"w-blue-hover": "#244FD9",
|
|
74
|
+
transparent: "transparent",
|
|
75
|
+
white: "#fff"
|
|
76
|
+
},
|
|
77
|
+
spacing: {
|
|
78
|
+
0: "0",
|
|
79
|
+
"2xs": "4px",
|
|
80
|
+
xs: "8px",
|
|
81
|
+
sm: "12px",
|
|
82
|
+
md: "16px",
|
|
83
|
+
lg: "24px",
|
|
84
|
+
xl: "32px",
|
|
85
|
+
"2xl": "40px"
|
|
86
|
+
},
|
|
87
|
+
boxShadow: {
|
|
88
|
+
surface: "0px 1px 3px rgba(0,0,0,0.1)"
|
|
89
|
+
},
|
|
90
|
+
dropShadow: {},
|
|
91
|
+
extend: {
|
|
92
|
+
//TEMP: alla fine ci dovranno essere SOLO questi valori per lo spacing (e.g. margin, padding, top,left,right,bottom...)
|
|
93
|
+
aria: {
|
|
94
|
+
invalid: 'invalid="true"'
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
corePlugins: {
|
|
99
|
+
preflight: !1
|
|
100
|
+
},
|
|
101
|
+
plugins: [
|
|
102
|
+
t(function({ addUtilities: o }) {
|
|
103
|
+
o({
|
|
104
|
+
".no-scrollbar": {
|
|
105
|
+
"-ms-overflow-style": "none",
|
|
106
|
+
scrollbarWidth: "none",
|
|
107
|
+
"&::-webkit-scrollbar": {
|
|
108
|
+
display: "none"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
".no-scrolling": {
|
|
112
|
+
overflow: "hidden",
|
|
113
|
+
"&::-webkit-scrollbar": {
|
|
114
|
+
backgroundColor: "rgb(180 194 240 / 0.7)"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
".container-xl": {
|
|
118
|
+
maxWidth: "1280px"
|
|
119
|
+
},
|
|
120
|
+
".safe-bottom": {
|
|
121
|
+
paddingBottom: "env(safe-area-inset-bottom) !important"
|
|
122
|
+
},
|
|
123
|
+
".visually-hidden, .visually-hidden-focusable:not(:focus):not(:focus-within)": {
|
|
124
|
+
border: "0 !important",
|
|
125
|
+
clip: "rect(0, 0, 0, 0) !important",
|
|
126
|
+
height: "1px !important",
|
|
127
|
+
margin: "-1px !important",
|
|
128
|
+
overflow: "hidden !important",
|
|
129
|
+
padding: "0 !important",
|
|
130
|
+
"white-space": "nowrap !important",
|
|
131
|
+
width: "1px !important"
|
|
132
|
+
},
|
|
133
|
+
".visually-hidden:not(caption), .visually-hidden-focusable:not(:focus):not(:focus-within):not(caption)": {
|
|
134
|
+
position: "absolute !important"
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}),
|
|
138
|
+
i
|
|
139
|
+
]
|
|
140
|
+
};
|
|
141
|
+
export {
|
|
142
|
+
p as default
|
|
143
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wikicasa-dev/components",
|
|
3
|
-
"version": "2.1.4-alpha.
|
|
3
|
+
"version": "2.1.4-alpha.18",
|
|
4
4
|
"description": "Wikicasa frontend components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
"import": "./dist/chart/*.js",
|
|
31
31
|
"types": "./dist/chart/*.d.ts"
|
|
32
32
|
},
|
|
33
|
-
"./plugins/buttonPlugin": "./plugins/buttonPlugin.ts"
|
|
33
|
+
"./plugins/buttonPlugin": "./plugins/buttonPlugin.ts",
|
|
34
|
+
"./tailwind.config": "./tailwind.config.js"
|
|
34
35
|
},
|
|
35
36
|
"repository": {
|
|
36
37
|
"type": "git",
|