vueless 0.0.226 → 0.0.227
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/package.json
CHANGED
|
@@ -4,38 +4,52 @@ export default /*tw*/ {
|
|
|
4
4
|
variants: {
|
|
5
5
|
variant: {
|
|
6
6
|
primary: `bg-{color}-500 text-white`,
|
|
7
|
-
secondary: `bg-transparent border border-{color}-500`,
|
|
7
|
+
secondary: `bg-transparent border border-{color}-500 text-{color}-500`,
|
|
8
8
|
thirdary: `bg-{color}-50 text-{color}-700`,
|
|
9
9
|
},
|
|
10
10
|
},
|
|
11
11
|
compoundVariants: [
|
|
12
|
-
{ color: "grayscale", bordered: true, class: "border-gray-200" },
|
|
13
12
|
{ variant: "thirdary", bordered: true, class: "border border-{color}-100" },
|
|
13
|
+
{ color: "white", variant: "primary", class: "text-gray-900 bg-white" },
|
|
14
|
+
{ color: "white", variant: "secondary", class: "text-gray-900 bg-white border-gray-500" },
|
|
15
|
+
{ color: "white", variant: "thirdary", bordered: true, class: "text-gray-900 bg-white border border-gray-500" },
|
|
16
|
+
{ color: "grayscale", variant: "primary", class: `bg-gray-900` },
|
|
17
|
+
{ color: "grayscale", variant: "secondary", class: `text-gray-900 border-gray-900` },
|
|
18
|
+
{ color: "grayscale", variant: "thirdary", bordered: true, class: `text-gray-900 border border-gray-500` },
|
|
14
19
|
],
|
|
15
20
|
},
|
|
16
21
|
body: {
|
|
17
|
-
base:
|
|
18
|
-
flex gap-2 items-baseline
|
|
19
|
-
font-normal leading-normal
|
|
20
|
-
[&_b]:font-bold [&_i]:italic [&_em]:italic [&_p]:font-normal
|
|
21
|
-
[&_a:not([class])]:underline [&_a:not([class])]:underline-offset-4
|
|
22
|
-
[&_a:not([class]):hover]:no-underline [&_a:not([class])]:font-bold
|
|
23
|
-
[&_ul]:font-normal [&_ol]:font-normal
|
|
24
|
-
[&_ul]:leading-normal [&_ol]:leading-normal
|
|
25
|
-
[&_ul]:list-disc [&_ol]:list-decimal
|
|
26
|
-
[&_ul]:ml-2 [&_ol]:ml-2
|
|
27
|
-
`,
|
|
22
|
+
base: "{UText} flex gap-2 items-baseline",
|
|
28
23
|
variants: {
|
|
29
24
|
size: {
|
|
30
|
-
xs: "text-xs
|
|
31
|
-
sm: "text-sm
|
|
32
|
-
md: "text-base
|
|
33
|
-
lg: "text-lg
|
|
25
|
+
xs: "text-xs",
|
|
26
|
+
sm: "text-sm",
|
|
27
|
+
md: "text-base",
|
|
28
|
+
lg: "text-lg",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
title: {
|
|
33
|
+
base: "font-bold leading-tight",
|
|
34
|
+
variants: {
|
|
35
|
+
size: {
|
|
36
|
+
xs: "text-sm",
|
|
37
|
+
sm: "text-base",
|
|
38
|
+
md: "text-lg",
|
|
39
|
+
lg: "text-xl",
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
description: {
|
|
44
|
+
variants: {
|
|
45
|
+
size: {
|
|
46
|
+
xs: "text-xs",
|
|
47
|
+
sm: "text-xs",
|
|
48
|
+
md: "text-sm",
|
|
49
|
+
lg: "text-base",
|
|
34
50
|
},
|
|
35
51
|
},
|
|
36
52
|
},
|
|
37
|
-
title: "font-bold text-lg leading-tight",
|
|
38
|
-
description: "text-sm",
|
|
39
53
|
button: "{UButton}",
|
|
40
54
|
icon: "{UIcon}",
|
|
41
55
|
iconName: "close",
|
|
@@ -51,6 +65,7 @@ export default /*tw*/ {
|
|
|
51
65
|
safelist: (colors) => [
|
|
52
66
|
{ pattern: `bg-(${colors})-50` },
|
|
53
67
|
{ pattern: `bg-(${colors})-500` },
|
|
68
|
+
{ pattern: `text-(${colors})-500` },
|
|
54
69
|
{ pattern: `text-(${colors})-700` },
|
|
55
70
|
{ pattern: `border-(${colors})-100` },
|
|
56
71
|
{ pattern: `border-(${colors})-500` },
|
|
@@ -12,25 +12,21 @@ export default {
|
|
|
12
12
|
id: "4030",
|
|
13
13
|
title: "Text & Content / Alert",
|
|
14
14
|
component: UAlert,
|
|
15
|
-
args: {
|
|
16
|
-
text: "UHint",
|
|
17
|
-
slotDefaultTemplate: `
|
|
18
|
-
<template #default>
|
|
19
|
-
<p>
|
|
20
|
-
<b>Lorem ipsum dolor sit amet,</b>
|
|
21
|
-
<u>consectetur adipiscing elit,</u>
|
|
22
|
-
<em>sed do eiusmod tempor incididunt
|
|
23
|
-
ut labore et dolore magna aliqua.</em>
|
|
24
|
-
<a href="https://uk.wikipedia.org/wiki/Lorem_ipsum" target="_blank">Wikipedia</a>
|
|
25
|
-
</p>
|
|
26
|
-
</template>
|
|
27
|
-
`,
|
|
28
|
-
},
|
|
15
|
+
args: {},
|
|
29
16
|
argTypes: {
|
|
30
17
|
...getArgTypes(UAlert.name),
|
|
31
18
|
},
|
|
32
19
|
};
|
|
33
20
|
|
|
21
|
+
const defaultTemplate = `
|
|
22
|
+
<p>
|
|
23
|
+
<b>Please note that your session is about to expire </b>
|
|
24
|
+
<u>in 5 minutes,</u>
|
|
25
|
+
<em> so make sure to save your work to avoid any data loss. </em>
|
|
26
|
+
<a href="https://uk.wikipedia.org/wiki/Lorem_ipsum" target="_blank">Wikipedia</a>
|
|
27
|
+
</p>
|
|
28
|
+
`;
|
|
29
|
+
|
|
34
30
|
const DefaultTemplate = (args) => ({
|
|
35
31
|
components: { UAlert, UIcon },
|
|
36
32
|
setup() {
|
|
@@ -40,8 +36,20 @@ const DefaultTemplate = (args) => ({
|
|
|
40
36
|
},
|
|
41
37
|
template: `
|
|
42
38
|
<UAlert v-bind="args" v-model="args.value">
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
${args.template || defaultTemplate}
|
|
40
|
+
</UAlert>
|
|
41
|
+
`,
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const SlotTemplate = (args) => ({
|
|
45
|
+
components: { UAlert, UIcon },
|
|
46
|
+
setup() {
|
|
47
|
+
return { args };
|
|
48
|
+
},
|
|
49
|
+
template: `
|
|
50
|
+
<UAlert v-bind="args" v-model="args.value">
|
|
51
|
+
${args.slotTemplate}
|
|
52
|
+
${defaultTemplate}
|
|
45
53
|
</UAlert>
|
|
46
54
|
`,
|
|
47
55
|
});
|
|
@@ -122,7 +130,10 @@ const HTMLTemplate = (args) => ({
|
|
|
122
130
|
});
|
|
123
131
|
|
|
124
132
|
export const Default = DefaultTemplate.bind({});
|
|
125
|
-
Default.args = {
|
|
133
|
+
Default.args = {
|
|
134
|
+
title: "Default Title",
|
|
135
|
+
description: "Default Description",
|
|
136
|
+
};
|
|
126
137
|
|
|
127
138
|
export const variants = VariantsTemplate.bind({});
|
|
128
139
|
variants.args = {};
|
|
@@ -137,11 +148,10 @@ export const HTML = HTMLTemplate.bind({});
|
|
|
137
148
|
HTML.args = {
|
|
138
149
|
html: `
|
|
139
150
|
<p>
|
|
140
|
-
<b>
|
|
141
|
-
<u>
|
|
142
|
-
<em>
|
|
143
|
-
|
|
144
|
-
<a href="https://uk.wikipedia.org/wiki/Lorem_ipsum" target="_blank">Wikipedia</a>
|
|
151
|
+
<b>Important Security Update: </b>
|
|
152
|
+
<u>Your account password will expire in 10 days,</u>
|
|
153
|
+
<em> please update it to maintain account security. </em>
|
|
154
|
+
<a href="https://security.example.com/password-update" target="_blank">Update Password</a>
|
|
145
155
|
</p>
|
|
146
156
|
`,
|
|
147
157
|
};
|
|
@@ -149,7 +159,7 @@ HTML.args = {
|
|
|
149
159
|
export const closable = DefaultTemplate.bind({});
|
|
150
160
|
closable.args = {
|
|
151
161
|
closable: true,
|
|
152
|
-
|
|
162
|
+
template: `
|
|
153
163
|
<template #default>
|
|
154
164
|
some text
|
|
155
165
|
</template>
|
|
@@ -158,55 +168,51 @@ closable.args = {
|
|
|
158
168
|
|
|
159
169
|
export const paragraphs = DefaultTemplate.bind({});
|
|
160
170
|
paragraphs.args = {
|
|
161
|
-
|
|
171
|
+
template: `
|
|
162
172
|
<template #default>
|
|
163
173
|
<p>
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
|
|
170
|
-
occaecat cupidatat non proident, sunt in culpa qui officia
|
|
171
|
-
deserunt mollit anim id est laborum.
|
|
174
|
+
Please be aware that the scheduled maintenance will occur this Saturday,
|
|
175
|
+
from 12 AM to 4 AM. During this time, some services may be temporarily
|
|
176
|
+
unavailable. We apologize for any inconvenience this may cause and
|
|
177
|
+
appreciate your understanding. Our team is committed to improving
|
|
178
|
+
the system's performance and reliability.
|
|
172
179
|
</p>
|
|
173
|
-
|
|
174
180
|
</template>
|
|
175
|
-
|
|
181
|
+
`,
|
|
176
182
|
};
|
|
177
183
|
|
|
178
184
|
export const list = DefaultTemplate.bind({});
|
|
179
185
|
list.args = {
|
|
180
|
-
|
|
186
|
+
template: `
|
|
181
187
|
<URow>
|
|
182
188
|
<ul>
|
|
183
|
-
<li>
|
|
184
|
-
<li>
|
|
185
|
-
<li>
|
|
189
|
+
<li>Check your email for verification link.</li>
|
|
190
|
+
<li>Update your password regularly to enhance security.</li>
|
|
191
|
+
<li>Enable two-factor authentication for added protection.</li>
|
|
186
192
|
</ul>
|
|
187
193
|
|
|
188
194
|
<ol>
|
|
189
|
-
<li>
|
|
190
|
-
<li>
|
|
191
|
-
<li>
|
|
195
|
+
<li>Sign in to your account using your credentials.</li>
|
|
196
|
+
<li>Navigate to the settings menu to update your profile.</li>
|
|
197
|
+
<li>Review your privacy settings and adjust them as needed.</li>
|
|
192
198
|
</ol>
|
|
193
199
|
</URow>
|
|
194
200
|
`,
|
|
195
201
|
};
|
|
196
202
|
|
|
197
|
-
export const slotTitleAndDescription =
|
|
203
|
+
export const slotTitleAndDescription = SlotTemplate.bind({});
|
|
198
204
|
slotTitleAndDescription.args = {
|
|
199
205
|
slotTemplate: `
|
|
200
206
|
<template #title>
|
|
201
|
-
<div>
|
|
207
|
+
<div class="text-lg font-semibold">This is a custom title for the alert.</div>
|
|
202
208
|
</template>
|
|
203
209
|
<template #description>
|
|
204
|
-
<div>This is a custom description for the alert.</div>
|
|
210
|
+
<div class="italic">This is a custom description for the alert.</div>
|
|
205
211
|
</template>
|
|
206
212
|
`,
|
|
207
213
|
};
|
|
208
214
|
|
|
209
|
-
export const slotAlertLeft =
|
|
215
|
+
export const slotAlertLeft = SlotTemplate.bind({});
|
|
210
216
|
slotAlertLeft.args = {
|
|
211
217
|
slotTemplate: `
|
|
212
218
|
<template #left>
|
|
@@ -218,7 +224,7 @@ slotAlertLeft.args = {
|
|
|
218
224
|
`,
|
|
219
225
|
};
|
|
220
226
|
|
|
221
|
-
export const slotAlertRight =
|
|
227
|
+
export const slotAlertRight = SlotTemplate.bind({});
|
|
222
228
|
slotAlertRight.args = {
|
|
223
229
|
slotTemplate: `
|
|
224
230
|
<template #right>
|
|
@@ -230,7 +236,7 @@ slotAlertRight.args = {
|
|
|
230
236
|
`,
|
|
231
237
|
};
|
|
232
238
|
|
|
233
|
-
export const slotAlertTop =
|
|
239
|
+
export const slotAlertTop = SlotTemplate.bind({});
|
|
234
240
|
slotAlertTop.args = {
|
|
235
241
|
slotTemplate: `
|
|
236
242
|
<template #top>
|
|
@@ -242,7 +248,7 @@ slotAlertTop.args = {
|
|
|
242
248
|
`,
|
|
243
249
|
};
|
|
244
250
|
|
|
245
|
-
export const slotAlertBottom =
|
|
251
|
+
export const slotAlertBottom = SlotTemplate.bind({});
|
|
246
252
|
slotAlertBottom.args = {
|
|
247
253
|
slotTemplate: `
|
|
248
254
|
<template #bottom>
|
package/ui.text-alert/index.vue
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
@binding {string} title
|
|
9
9
|
-->
|
|
10
10
|
<slot name="title" :title="title">
|
|
11
|
-
<div v-bind="titleAttrs" v-text="title" />
|
|
11
|
+
<div v-if="title" v-bind="titleAttrs" v-text="title" />
|
|
12
12
|
</slot>
|
|
13
13
|
|
|
14
14
|
<!--
|
|
@@ -16,16 +16,22 @@
|
|
|
16
16
|
@binding {string} description
|
|
17
17
|
-->
|
|
18
18
|
<slot name="description" :description="description">
|
|
19
|
-
<div v-bind="descriptionAttrs" v-text="description" />
|
|
19
|
+
<div v-if="description" v-bind="descriptionAttrs" v-text="description" />
|
|
20
20
|
</slot>
|
|
21
21
|
|
|
22
22
|
<div v-bind="bodyAttrs">
|
|
23
23
|
<!-- @slot Use it to add something before the text. -->
|
|
24
24
|
<slot name="left" />
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
<UText
|
|
27
|
+
v-if="hasSlotContent($slots.default) || html"
|
|
28
|
+
v-bind="bodyAttrs"
|
|
29
|
+
:size="size"
|
|
30
|
+
:html="html"
|
|
31
|
+
>
|
|
32
|
+
<!-- @slot Use it to add something inside. -->
|
|
33
|
+
<slot />
|
|
34
|
+
</UText>
|
|
29
35
|
|
|
30
36
|
<UButton
|
|
31
37
|
v-if="closable"
|
|
@@ -39,7 +45,7 @@
|
|
|
39
45
|
<UIcon
|
|
40
46
|
internal
|
|
41
47
|
size="xs"
|
|
42
|
-
:color="
|
|
48
|
+
:color="iconColor"
|
|
43
49
|
:name="config.iconName"
|
|
44
50
|
:data-cy="`${dataCy}-button`"
|
|
45
51
|
v-bind="iconAttrs"
|
|
@@ -56,10 +62,11 @@
|
|
|
56
62
|
</template>
|
|
57
63
|
|
|
58
64
|
<script setup>
|
|
59
|
-
import { onMounted, ref } from "vue";
|
|
65
|
+
import { onMounted, ref, computed } from "vue";
|
|
60
66
|
|
|
61
67
|
import UIcon from "../ui.image-icon";
|
|
62
68
|
import UButton from "../ui.button";
|
|
69
|
+
import UText from "../ui.text-block";
|
|
63
70
|
import UIService from "../service.ui";
|
|
64
71
|
|
|
65
72
|
import { UAlert } from "./constatns";
|
|
@@ -191,4 +198,12 @@ function onClickClose() {
|
|
|
191
198
|
isShownAlert.value = false;
|
|
192
199
|
emit("hidden");
|
|
193
200
|
}
|
|
201
|
+
|
|
202
|
+
const iconColor = computed(() => {
|
|
203
|
+
if (props.color === "white") {
|
|
204
|
+
return "gray";
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
return props.variant === "primary" ? "white" : props.color;
|
|
208
|
+
});
|
|
194
209
|
</script>
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "vueless",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.227",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -558,7 +558,7 @@
|
|
|
558
558
|
},
|
|
559
559
|
{
|
|
560
560
|
"name": "default",
|
|
561
|
-
"description": "
|
|
561
|
+
"description": "Use it to add something inside."
|
|
562
562
|
},
|
|
563
563
|
{
|
|
564
564
|
"name": "right",
|