vueless 0.0.145 → 0.0.146
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
|
@@ -39,7 +39,7 @@ const props = defineProps({
|
|
|
39
39
|
},
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
* Toggle
|
|
42
|
+
* Toggle variant.
|
|
43
43
|
* @values primary, secondary, thirdary
|
|
44
44
|
*/
|
|
45
45
|
variant: {
|
|
@@ -65,7 +65,7 @@ const props = defineProps({
|
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* Toggle size.
|
|
68
|
-
* @values xs, sm, md, lg
|
|
68
|
+
* @values 2xs, xs, sm, md, lg, xl
|
|
69
69
|
*/
|
|
70
70
|
size: {
|
|
71
71
|
type: String,
|
|
@@ -88,6 +88,39 @@ const props = defineProps({
|
|
|
88
88
|
default: UIService.get(defaultConfig, UToggle).default.multiple,
|
|
89
89
|
},
|
|
90
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Button color.
|
|
93
|
+
* @values brand, grayscale, gray, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose, white
|
|
94
|
+
*/
|
|
95
|
+
color: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: UIService.get(defaultConfig, UToggle).default.color,
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Fill the background for thirdary variant.
|
|
102
|
+
*/
|
|
103
|
+
filled: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
default: UIService.get(defaultConfig, UToggle).default.filled,
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Set button corners rounded.
|
|
110
|
+
*/
|
|
111
|
+
pill: {
|
|
112
|
+
type: Boolean,
|
|
113
|
+
default: UIService.get(defaultConfig, UToggle).default.pill,
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Set the same paddings for the button.
|
|
118
|
+
*/
|
|
119
|
+
square: {
|
|
120
|
+
type: Boolean,
|
|
121
|
+
default: UIService.get(defaultConfig, UToggle).default.square,
|
|
122
|
+
},
|
|
123
|
+
|
|
91
124
|
/**
|
|
92
125
|
* Sets data-cy attribute for automated testing.
|
|
93
126
|
*/
|
|
@@ -129,6 +162,12 @@ provide("toggleName", () => props.name);
|
|
|
129
162
|
provide("toggleSize", () => props.size);
|
|
130
163
|
provide("toggleBlock", () => props.block);
|
|
131
164
|
provide("toggleVariant", () => props.variant);
|
|
165
|
+
provide("toggleColor", () => props.color);
|
|
166
|
+
provide("toggleFilled", () => props.filled);
|
|
167
|
+
provide("toggleDisabled", () => props.disabled);
|
|
168
|
+
provide("togglePill", () => props.pill);
|
|
169
|
+
provide("toggleSquare", () => props.square);
|
|
170
|
+
|
|
132
171
|
provide("toggleSelectedValue", {
|
|
133
172
|
selectedValue: readonly(selectedValue),
|
|
134
173
|
updateSelectedValue,
|
|
@@ -2,10 +2,14 @@ export default /*tw*/ {
|
|
|
2
2
|
button: "rounded-none",
|
|
3
3
|
input: "p-0 m-0 size-0 invisible peer absolute",
|
|
4
4
|
defaultVariants: {
|
|
5
|
+
color: "brand",
|
|
5
6
|
variant: "primary",
|
|
6
7
|
type: "radio",
|
|
7
8
|
size: "md",
|
|
8
9
|
block: false,
|
|
10
|
+
pill: false,
|
|
11
|
+
square: false,
|
|
12
|
+
filled: false,
|
|
9
13
|
disabled: false,
|
|
10
14
|
},
|
|
11
15
|
};
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
:size="toValue(size)"
|
|
8
8
|
:block="toValue(block)"
|
|
9
9
|
:variant="toValue(variant)"
|
|
10
|
+
:color="color"
|
|
11
|
+
:pill="pill"
|
|
12
|
+
:filled="filled"
|
|
13
|
+
:square="square"
|
|
10
14
|
v-bind="buttonAttrs"
|
|
11
15
|
@click="onClickSetValue"
|
|
12
16
|
>
|
|
@@ -115,6 +119,11 @@ const type = inject("toggleType", UIService.get(defaultConfig, UToggleItem).defa
|
|
|
115
119
|
const size = inject("toggleSize", UIService.get(defaultConfig, UToggleItem).default.size);
|
|
116
120
|
const block = inject("toggleBlock", UIService.get(defaultConfig, UToggleItem).default.block);
|
|
117
121
|
const variant = inject("toggleVariant", UIService.get(defaultConfig, UToggleItem).default.variant);
|
|
122
|
+
const color = inject("toggleColor", UIService.get(defaultConfig, UToggleItem).default.color);
|
|
123
|
+
const filled = inject("toggleFilled", UIService.get(defaultConfig, UToggleItem).default.filled);
|
|
124
|
+
const pill = inject("togglePill", UIService.get(defaultConfig, UToggleItem).default.pill);
|
|
125
|
+
const square = inject("toggleSquare", UIService.get(defaultConfig, UToggleItem).default.square);
|
|
126
|
+
|
|
118
127
|
const { selectedValue, updateSelectedValue } = inject("toggleSelectedValue", {});
|
|
119
128
|
|
|
120
129
|
const { buttonAttrs, inputAttrs } = useAttrs(props);
|
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.146",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -7004,7 +7004,7 @@
|
|
|
7004
7004
|
},
|
|
7005
7005
|
{
|
|
7006
7006
|
"name": "variant",
|
|
7007
|
-
"description": "Toggle
|
|
7007
|
+
"description": "Toggle variant.",
|
|
7008
7008
|
"value": {
|
|
7009
7009
|
"kind": "expression",
|
|
7010
7010
|
"type": "'primary' | 'secondary' | 'thirdary'"
|
|
@@ -7034,7 +7034,7 @@
|
|
|
7034
7034
|
"description": "Toggle size.",
|
|
7035
7035
|
"value": {
|
|
7036
7036
|
"kind": "expression",
|
|
7037
|
-
"type": "'xs' | 'sm' | 'md' | 'lg'"
|
|
7037
|
+
"type": "'2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'"
|
|
7038
7038
|
},
|
|
7039
7039
|
"default": "md"
|
|
7040
7040
|
},
|
|
@@ -7056,6 +7056,42 @@
|
|
|
7056
7056
|
},
|
|
7057
7057
|
"default": "false"
|
|
7058
7058
|
},
|
|
7059
|
+
{
|
|
7060
|
+
"name": "color",
|
|
7061
|
+
"description": "Button color.",
|
|
7062
|
+
"value": {
|
|
7063
|
+
"kind": "expression",
|
|
7064
|
+
"type": "'brand' | 'grayscale' | 'gray' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'white'"
|
|
7065
|
+
},
|
|
7066
|
+
"default": "brand"
|
|
7067
|
+
},
|
|
7068
|
+
{
|
|
7069
|
+
"name": "filled",
|
|
7070
|
+
"description": "Fill the background for thirdary variant.",
|
|
7071
|
+
"value": {
|
|
7072
|
+
"kind": "expression",
|
|
7073
|
+
"type": "boolean"
|
|
7074
|
+
},
|
|
7075
|
+
"default": "false"
|
|
7076
|
+
},
|
|
7077
|
+
{
|
|
7078
|
+
"name": "pill",
|
|
7079
|
+
"description": "Set button corners rounded.",
|
|
7080
|
+
"value": {
|
|
7081
|
+
"kind": "expression",
|
|
7082
|
+
"type": "boolean"
|
|
7083
|
+
},
|
|
7084
|
+
"default": "false"
|
|
7085
|
+
},
|
|
7086
|
+
{
|
|
7087
|
+
"name": "square",
|
|
7088
|
+
"description": "Set the same paddings for the button.",
|
|
7089
|
+
"value": {
|
|
7090
|
+
"kind": "expression",
|
|
7091
|
+
"type": "boolean"
|
|
7092
|
+
},
|
|
7093
|
+
"default": "false"
|
|
7094
|
+
},
|
|
7059
7095
|
{
|
|
7060
7096
|
"name": "dataCy",
|
|
7061
7097
|
"description": "Sets data-cy attribute for automated testing.",
|