vueless 0.0.321 → 0.0.323
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 +1 -1
- package/preset.tailwind/index.js +14 -0
- package/preset.tailwind.js +1 -1
- package/ui.dropdown-badge/configs/default.config.js +4 -4
- package/ui.dropdown-badge/index.vue +4 -4
- package/ui.dropdown-button/configs/default.config.js +4 -4
- package/ui.dropdown-button/index.vue +4 -4
- package/ui.dropdown-link/configs/default.config.js +4 -4
- package/ui.dropdown-link/index.vue +4 -4
- package/ui.loader/configs/default.config.js +0 -1
- package/ui.text-alert/configs/default.config.js +2 -2
- package/ui.text-alert/index.vue +14 -14
- package/ui.text-badge/configs/default.config.js +1 -1
- package/ui.text-badge/index.vue +8 -8
- package/ui.text-empty/configs/default.config.js +1 -1
- package/ui.text-empty/index.vue +4 -4
- package/ui.text-file/configs/default.config.js +3 -15
- package/ui.text-file/index.vue +10 -7
- package/ui.text-files/configs/default.config.js +3 -3
- package/ui.text-files/index.vue +27 -20
- package/ui.text-header/configs/default.config.js +3 -9
- package/ui.text-header/index.stories.js +3 -6
- package/ui.text-header/index.vue +6 -15
- package/ui.text-money/configs/default.config.js +9 -14
- package/ui.text-money/index.stories.js +0 -3
- package/ui.text-money/index.vue +66 -64
- package/ui.text-notify/configs/default.config.js +1 -0
- package/web-types.json +94 -109
|
@@ -2,20 +2,14 @@ export default /*tw*/ {
|
|
|
2
2
|
money: {
|
|
3
3
|
base: "whitespace-nowrap flex items-center text-{color}-600",
|
|
4
4
|
variants: {
|
|
5
|
-
align: {
|
|
6
|
-
left: "justify-start",
|
|
7
|
-
right: "justify-end",
|
|
8
|
-
},
|
|
9
|
-
weight: {
|
|
10
|
-
regular: "font-normal",
|
|
11
|
-
medium: "font-medium",
|
|
12
|
-
bold: "font-bold",
|
|
13
|
-
},
|
|
14
5
|
color: {
|
|
15
|
-
brand: "text-brand",
|
|
16
6
|
white: "text-white",
|
|
17
7
|
grayscale: "text-gray-900",
|
|
18
8
|
},
|
|
9
|
+
align: {
|
|
10
|
+
left: "justify-start",
|
|
11
|
+
right: "justify-end",
|
|
12
|
+
},
|
|
19
13
|
},
|
|
20
14
|
},
|
|
21
15
|
slotLeft: "mr-2",
|
|
@@ -36,6 +30,9 @@ export default /*tw*/ {
|
|
|
36
30
|
},
|
|
37
31
|
},
|
|
38
32
|
},
|
|
33
|
+
symbol: "",
|
|
34
|
+
mathSign: "",
|
|
35
|
+
integer: "",
|
|
39
36
|
penny: {
|
|
40
37
|
variants: {
|
|
41
38
|
size: {
|
|
@@ -50,19 +47,17 @@ export default /*tw*/ {
|
|
|
50
47
|
},
|
|
51
48
|
},
|
|
52
49
|
},
|
|
53
|
-
symbol: "",
|
|
54
50
|
defaults: {
|
|
55
51
|
color: "grayscale",
|
|
56
52
|
size: "md",
|
|
57
53
|
sign: "default",
|
|
58
|
-
align: "
|
|
54
|
+
align: "left",
|
|
59
55
|
symbolAlign: "right",
|
|
60
|
-
weight: "regular",
|
|
61
56
|
decimalScale: 2,
|
|
62
57
|
delimiter: ",",
|
|
63
58
|
planned: false,
|
|
64
59
|
integer: false,
|
|
65
|
-
|
|
60
|
+
symbolDivided: true,
|
|
66
61
|
},
|
|
67
62
|
safelist: (colors) => [{ pattern: `text-(${colors})-600` }],
|
|
68
63
|
};
|
|
@@ -90,9 +90,6 @@ colors.args = {
|
|
|
90
90
|
export const sizes = EnumVariantTemplate.bind({});
|
|
91
91
|
sizes.args = { enum: "size" };
|
|
92
92
|
|
|
93
|
-
export const weights = EnumVariantTemplate.bind({});
|
|
94
|
-
weights.args = { enum: "weight" };
|
|
95
|
-
|
|
96
93
|
export const sign = EnumVariantTemplate.bind({});
|
|
97
94
|
sign.args = { enum: "sign" };
|
|
98
95
|
|
package/ui.text-money/index.vue
CHANGED
|
@@ -6,21 +6,27 @@
|
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
8
|
<div :data-test="dataTest" v-bind="sumAttrs">
|
|
9
|
-
<span
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<span
|
|
16
|
-
|
|
17
|
-
<span v-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
9
|
+
<span
|
|
10
|
+
v-if="currencySymbolPosition.left"
|
|
11
|
+
v-bind="symbolAttrs"
|
|
12
|
+
v-text="symbol + currencySpace"
|
|
13
|
+
/>
|
|
14
|
+
|
|
15
|
+
<span v-if="sum" v-bind="mathSignAttrs" v-text="mathSign" />
|
|
16
|
+
|
|
17
|
+
<span v-bind="integerAttrs" v-text="preparedMoney.integer" />
|
|
18
|
+
|
|
19
|
+
<span
|
|
20
|
+
v-if="!integer"
|
|
21
|
+
v-bind="pennyAttrs"
|
|
22
|
+
v-text="preparedMoney.delimiter + preparedMoney.penny"
|
|
23
|
+
/>
|
|
24
|
+
|
|
25
|
+
<span
|
|
26
|
+
v-if="currencySymbolPosition.right"
|
|
27
|
+
v-bind="symbolAttrs"
|
|
28
|
+
v-text="currencySpace + symbol"
|
|
29
|
+
/>
|
|
24
30
|
</div>
|
|
25
31
|
|
|
26
32
|
<div v-if="hasSlotContent($slots['right'])" v-bind="slotRightAttrs">
|
|
@@ -45,7 +51,7 @@ defineOptions({ name: "UMoney", inheritAttrs: false });
|
|
|
45
51
|
|
|
46
52
|
const props = defineProps({
|
|
47
53
|
/**
|
|
48
|
-
*
|
|
54
|
+
* Money value.
|
|
49
55
|
*/
|
|
50
56
|
sum: {
|
|
51
57
|
type: Number,
|
|
@@ -53,40 +59,33 @@ const props = defineProps({
|
|
|
53
59
|
},
|
|
54
60
|
|
|
55
61
|
/**
|
|
56
|
-
*
|
|
62
|
+
* Money size.
|
|
63
|
+
* @values xs, sm, md, lg, xl, 2xl, 3xl, 4xl
|
|
57
64
|
*/
|
|
58
|
-
|
|
65
|
+
size: {
|
|
59
66
|
type: String,
|
|
60
|
-
default:
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Make sum planned (add brackets).
|
|
65
|
-
*/
|
|
66
|
-
planned: {
|
|
67
|
-
type: Boolean,
|
|
68
|
-
default: getDefault(defaultConfig, UMoney).planned,
|
|
67
|
+
default: getDefault(defaultConfig, UMoney).size,
|
|
69
68
|
},
|
|
70
69
|
|
|
71
70
|
/**
|
|
72
|
-
*
|
|
71
|
+
* Money color.
|
|
72
|
+
* @values brand, grayscale, gray, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose, white
|
|
73
73
|
*/
|
|
74
|
-
|
|
75
|
-
type:
|
|
76
|
-
default: getDefault(defaultConfig, UMoney).
|
|
74
|
+
color: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: getDefault(defaultConfig, UMoney).color,
|
|
77
77
|
},
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
81
|
-
* @values default, positive, negative
|
|
80
|
+
* Money currency symbol.
|
|
82
81
|
*/
|
|
83
|
-
|
|
82
|
+
symbol: {
|
|
84
83
|
type: String,
|
|
85
|
-
default:
|
|
84
|
+
default: "",
|
|
86
85
|
},
|
|
87
86
|
|
|
88
87
|
/**
|
|
89
|
-
*
|
|
88
|
+
* Money currency symbol align.
|
|
90
89
|
* @values right, left
|
|
91
90
|
*/
|
|
92
91
|
symbolAlign: {
|
|
@@ -95,30 +94,20 @@ const props = defineProps({
|
|
|
95
94
|
},
|
|
96
95
|
|
|
97
96
|
/**
|
|
98
|
-
*
|
|
99
|
-
* @values xs, sm, md, lg, xl, 2xl, 3xl, 4xl
|
|
97
|
+
* Add space between currency symbol and sum.
|
|
100
98
|
*/
|
|
101
|
-
|
|
102
|
-
type:
|
|
103
|
-
default: getDefault(defaultConfig, UMoney).
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Set weight.
|
|
108
|
-
* @values regular, medium, bold
|
|
109
|
-
*/
|
|
110
|
-
weight: {
|
|
111
|
-
type: String,
|
|
112
|
-
default: getDefault(defaultConfig, UMoney).weight,
|
|
99
|
+
symbolDivided: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
default: getDefault(defaultConfig, UMoney).symbolDivided,
|
|
113
102
|
},
|
|
114
103
|
|
|
115
104
|
/**
|
|
116
|
-
*
|
|
117
|
-
* @values
|
|
105
|
+
* Money sign.
|
|
106
|
+
* @values default, positive, negative
|
|
118
107
|
*/
|
|
119
|
-
|
|
108
|
+
sign: {
|
|
120
109
|
type: String,
|
|
121
|
-
default: getDefault(defaultConfig, UMoney).
|
|
110
|
+
default: getDefault(defaultConfig, UMoney).sign,
|
|
122
111
|
},
|
|
123
112
|
|
|
124
113
|
/**
|
|
@@ -138,7 +127,7 @@ const props = defineProps({
|
|
|
138
127
|
},
|
|
139
128
|
|
|
140
129
|
/**
|
|
141
|
-
*
|
|
130
|
+
* Money align.
|
|
142
131
|
* @values right, left
|
|
143
132
|
*/
|
|
144
133
|
align: {
|
|
@@ -147,16 +136,27 @@ const props = defineProps({
|
|
|
147
136
|
},
|
|
148
137
|
|
|
149
138
|
/**
|
|
150
|
-
*
|
|
139
|
+
* Make money sum integer.
|
|
151
140
|
*/
|
|
152
|
-
|
|
153
|
-
type:
|
|
154
|
-
default: (
|
|
141
|
+
integer: {
|
|
142
|
+
type: Boolean,
|
|
143
|
+
default: getDefault(defaultConfig, UMoney).integer,
|
|
155
144
|
},
|
|
156
145
|
|
|
157
|
-
|
|
146
|
+
/**
|
|
147
|
+
* Make money planned (add brackets).
|
|
148
|
+
*/
|
|
149
|
+
planned: {
|
|
158
150
|
type: Boolean,
|
|
159
|
-
default: getDefault(defaultConfig, UMoney).
|
|
151
|
+
default: getDefault(defaultConfig, UMoney).planned,
|
|
152
|
+
},
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Component ui config object.
|
|
156
|
+
*/
|
|
157
|
+
config: {
|
|
158
|
+
type: Object,
|
|
159
|
+
default: () => ({}),
|
|
160
160
|
},
|
|
161
161
|
|
|
162
162
|
/**
|
|
@@ -169,9 +169,11 @@ const props = defineProps({
|
|
|
169
169
|
});
|
|
170
170
|
|
|
171
171
|
const {
|
|
172
|
+
moneyAttrs,
|
|
172
173
|
sumAttrs,
|
|
174
|
+
mathSignAttrs,
|
|
175
|
+
integerAttrs,
|
|
173
176
|
pennyAttrs,
|
|
174
|
-
moneyAttrs,
|
|
175
177
|
slotLeftAttrs,
|
|
176
178
|
symbolAttrs,
|
|
177
179
|
slotRightAttrs,
|
|
@@ -186,10 +188,10 @@ const currencySymbolPosition = computed(() => {
|
|
|
186
188
|
});
|
|
187
189
|
|
|
188
190
|
const currencySpace = computed(() => {
|
|
189
|
-
return props.
|
|
191
|
+
return props.symbolDivided ? " " : "";
|
|
190
192
|
});
|
|
191
193
|
|
|
192
|
-
const
|
|
194
|
+
const mathSign = computed(() => {
|
|
193
195
|
let type = "";
|
|
194
196
|
|
|
195
197
|
if (props.sign === MONEY_SIGN_TYPE.positive) type = "+";
|