@threadlabs/looma 0.6.0-rc.1 → 0.6.0
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/components/ui-button/ui-button.html +35 -13
- package/components/ui-icon-button/ui-icon-button.html +8 -7
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-button.css +34 -13
- package/styles/ui-icon-button.css +8 -7
- package/theme-dark.css +4 -0
- package/theme-high-contrast.css +4 -0
- package/theme-light.css +2 -0
- package/tokens.css +5 -0
- package/vanilla/UiButton.d.ts +1 -0
- package/vanilla/UiButton.js +1 -1
- package/vue/UiButton.d.ts +2 -0
- package/vue/UiButton.vue +37 -28
- package/vue/UiIconButton.vue +8 -22
- package/vue/chunks/UiButton.js +4 -2
- package/vue/chunks/UiIconButton.js +1 -1
- package/vue/components.css +103 -113
- package/vue/editor/index.js +10 -2
package/package.json
CHANGED
package/styles/ui-button.css
CHANGED
|
@@ -113,6 +113,23 @@
|
|
|
113
113
|
transform: translateY(0);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
/* An accent-tinted secondary action: the outline, ghost, and link variants in the accent colour.
|
|
117
|
+
Solid and danger already carry their own intent. */
|
|
118
|
+
:scope[data-ui-button-state~="tone=accent"]:scope[data-ui-button-state~="variant=outline"] {
|
|
119
|
+
border-color: var(--ui-button-accent-border, var(--ui-accent));
|
|
120
|
+
background: var(--ui-button-accent-surface, var(--ui-accent-subtle));
|
|
121
|
+
color: var(--ui-button-accent-text, var(--ui-accent-active));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
:scope[data-ui-button-state~="tone=accent"]:scope[data-ui-button-state~="variant=outline"]:hover:enabled {
|
|
125
|
+
border-color: var(--ui-button-accent-hover-border, var(--ui-accent-hover));
|
|
126
|
+
background: var(--ui-button-accent-hover-surface, color-mix(in srgb, var(--ui-accent) 16%, var(--ui-surface)));
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
:scope[data-ui-button-state~="tone=accent"]:is(:scope[data-ui-button-state~="variant=ghost"], :scope[data-ui-button-state~="variant=link"]) {
|
|
130
|
+
color: var(--ui-button-accent-text, var(--ui-accent-active));
|
|
131
|
+
}
|
|
132
|
+
|
|
116
133
|
:scope[data-ui-button-state~="variant=ghost"] {
|
|
117
134
|
border-color: transparent;
|
|
118
135
|
background: transparent;
|
|
@@ -147,29 +164,29 @@
|
|
|
147
164
|
|
|
148
165
|
/* Disabled colours fall back to each variant's own; ghost and link take only the text colour. */
|
|
149
166
|
:scope:disabled {
|
|
150
|
-
opacity: var(--ui-button-disabled-opacity,
|
|
167
|
+
opacity: var(--ui-button-disabled-opacity, 1);
|
|
151
168
|
cursor: not-allowed;
|
|
152
|
-
border-color: var(--ui-button-disabled-border, var(--ui-
|
|
153
|
-
background-color: var(--ui-button-disabled-surface, var(--ui-
|
|
154
|
-
color: var(--ui-button-disabled-text, var(--ui-
|
|
169
|
+
border-color: var(--ui-button-disabled-border, var(--ui-border));
|
|
170
|
+
background-color: var(--ui-button-disabled-surface, var(--ui-disabled-surface));
|
|
171
|
+
color: var(--ui-button-disabled-text, var(--ui-disabled-text));
|
|
155
172
|
}
|
|
156
173
|
|
|
157
174
|
:scope[data-ui-button-state~="variant=solid"]:disabled {
|
|
158
|
-
border-color: var(--ui-button-disabled-border, var(--ui-
|
|
159
|
-
background-color: var(--ui-button-disabled-surface, var(--ui-
|
|
160
|
-
color: var(--ui-button-disabled-text, var(--ui-
|
|
175
|
+
border-color: var(--ui-button-disabled-border, var(--ui-border));
|
|
176
|
+
background-color: var(--ui-button-disabled-surface, var(--ui-disabled-surface));
|
|
177
|
+
color: var(--ui-button-disabled-text, var(--ui-disabled-text));
|
|
161
178
|
}
|
|
162
179
|
|
|
163
180
|
:scope[data-ui-button-state~="variant=danger"]:disabled {
|
|
164
|
-
border-color: var(--ui-button-disabled-border, var(--ui-
|
|
165
|
-
background-color: var(--ui-button-disabled-surface, var(--ui-
|
|
166
|
-
color: var(--ui-button-disabled-text, var(--ui-text
|
|
181
|
+
border-color: var(--ui-button-disabled-border, var(--ui-border));
|
|
182
|
+
background-color: var(--ui-button-disabled-surface, var(--ui-disabled-surface));
|
|
183
|
+
color: var(--ui-button-disabled-text, var(--ui-disabled-text));
|
|
167
184
|
}
|
|
168
185
|
|
|
169
186
|
:scope[data-ui-button-state~="variant=ghost"]:disabled {
|
|
187
|
+
background: none;
|
|
170
188
|
border-color: transparent;
|
|
171
|
-
|
|
172
|
-
color: var(--ui-button-disabled-text, var(--ui-button-ghost-text, var(--ui-action-secondary-text, var(--ui-text-primary))));
|
|
189
|
+
color: var(--ui-button-disabled-text, var(--ui-disabled-text));
|
|
173
190
|
}
|
|
174
191
|
|
|
175
192
|
@media (pointer: coarse) {
|
|
@@ -211,7 +228,8 @@
|
|
|
211
228
|
|
|
212
229
|
:scope[data-ui-button-state~="variant=link"]:disabled {
|
|
213
230
|
background: none;
|
|
214
|
-
color:
|
|
231
|
+
border-color: transparent;
|
|
232
|
+
color: var(--ui-button-disabled-text, var(--ui-disabled-text));
|
|
215
233
|
}
|
|
216
234
|
|
|
217
235
|
:scope[data-ui-button-state~="variant=link"]:focus-visible {
|
|
@@ -230,6 +248,9 @@
|
|
|
230
248
|
@supports (text-box-trim: trim-both) {
|
|
231
249
|
}
|
|
232
250
|
|
|
251
|
+
/* An accent-tinted secondary action: the outline, ghost, and link variants in the accent colour.
|
|
252
|
+
Solid and danger already carry their own intent. */
|
|
253
|
+
|
|
233
254
|
/* Tints derive from the text colour, not a surface token, so hover and press show on any background. */
|
|
234
255
|
|
|
235
256
|
/* A soft halo that transitions in with the other box-shadow changes, layered on the raised shadow. */
|
|
@@ -162,20 +162,21 @@
|
|
|
162
162
|
|
|
163
163
|
/* Disabled colours fall back to each variant's own; ghost takes only the icon colour. */
|
|
164
164
|
:scope:disabled {
|
|
165
|
-
opacity: var(--ui-icon-button-disabled-opacity,
|
|
166
|
-
color: var(--ui-icon-button-disabled-text,
|
|
165
|
+
opacity: var(--ui-icon-button-disabled-opacity, 1);
|
|
166
|
+
color: var(--ui-icon-button-disabled-text, var(--ui-disabled-text));
|
|
167
167
|
cursor: not-allowed;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
:scope[data-ui-icon-button-state~="variant=outline"]:disabled {
|
|
171
|
-
border-color: var(--ui-icon-button-disabled-border, var(--ui-
|
|
172
|
-
background-color: var(--ui-icon-button-disabled-surface, var(--ui-
|
|
173
|
-
color: var(--ui-icon-button-disabled-text, var(--ui-
|
|
171
|
+
border-color: var(--ui-icon-button-disabled-border, var(--ui-border));
|
|
172
|
+
background-color: var(--ui-icon-button-disabled-surface, var(--ui-disabled-surface));
|
|
173
|
+
color: var(--ui-icon-button-disabled-text, var(--ui-disabled-text));
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
:scope[data-ui-icon-button-state~="variant=solid"]:disabled {
|
|
177
|
-
|
|
178
|
-
color: var(--ui-icon-button-disabled-
|
|
177
|
+
border-color: var(--ui-icon-button-disabled-border, var(--ui-border));
|
|
178
|
+
background-color: var(--ui-icon-button-disabled-surface, var(--ui-disabled-surface));
|
|
179
|
+
color: var(--ui-icon-button-disabled-text, var(--ui-disabled-text));
|
|
179
180
|
}
|
|
180
181
|
|
|
181
182
|
:scope {
|
package/theme-dark.css
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
--ui-text: #f0f0ec;
|
|
10
10
|
--ui-text-secondary: #a0a09c;
|
|
11
11
|
--ui-text-muted: #6a6a66;
|
|
12
|
+
--ui-disabled-surface: #242424;
|
|
13
|
+
--ui-disabled-text: #6a6a66;
|
|
12
14
|
--ui-on-accent: #1a1a1a;
|
|
13
15
|
--ui-on-danger: #1a1a1a;
|
|
14
16
|
|
|
@@ -47,6 +49,8 @@
|
|
|
47
49
|
--ui-text: #f0f0ec;
|
|
48
50
|
--ui-text-secondary: #a0a09c;
|
|
49
51
|
--ui-text-muted: #6a6a66;
|
|
52
|
+
--ui-disabled-surface: #242424;
|
|
53
|
+
--ui-disabled-text: #6a6a66;
|
|
50
54
|
--ui-on-accent: #1a1a1a;
|
|
51
55
|
--ui-on-danger: #1a1a1a;
|
|
52
56
|
|
package/theme-high-contrast.css
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
--ui-text: #000000;
|
|
9
9
|
--ui-text-secondary: #111111;
|
|
10
10
|
--ui-text-muted: #222222;
|
|
11
|
+
--ui-disabled-surface: #e6e6e6;
|
|
12
|
+
--ui-disabled-text: #333333;
|
|
11
13
|
--ui-border: #000000;
|
|
12
14
|
--ui-border-strong: #000000;
|
|
13
15
|
--ui-control-border: #000000;
|
|
@@ -29,6 +31,8 @@
|
|
|
29
31
|
--ui-text: #000000;
|
|
30
32
|
--ui-text-secondary: #111111;
|
|
31
33
|
--ui-text-muted: #222222;
|
|
34
|
+
--ui-disabled-surface: #e6e6e6;
|
|
35
|
+
--ui-disabled-text: #333333;
|
|
32
36
|
--ui-border: #000000;
|
|
33
37
|
--ui-border-strong: #000000;
|
|
34
38
|
--ui-control-border: #000000;
|
package/theme-light.css
CHANGED
package/tokens.css
CHANGED
|
@@ -28,6 +28,11 @@
|
|
|
28
28
|
--ui-border: #e4e4e0;
|
|
29
29
|
--ui-border-strong: #c8c8c4;
|
|
30
30
|
|
|
31
|
+
/* Disabled is one decision, not a per-component one: a neutral surface and text, at full
|
|
32
|
+
opacity, so a disabled control reads as unavailable rather than as a faded variant. */
|
|
33
|
+
--ui-disabled-surface: #f0f0ec;
|
|
34
|
+
--ui-disabled-text: #9b9b9b;
|
|
35
|
+
|
|
31
36
|
/* Focus. */
|
|
32
37
|
--ui-focus-ring: #5b55d6;
|
|
33
38
|
--ui-focus-halo: 0 0 0 3px color-mix(in srgb, var(--ui-focus-ring) 40%, transparent);
|
package/vanilla/UiButton.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface UiButtonProps {
|
|
|
10
10
|
disabled?: boolean | null;
|
|
11
11
|
size?: "sm" | "md" | "lg" | null;
|
|
12
12
|
stretch?: boolean | null;
|
|
13
|
+
tone?: "neutral" | "accent" | null;
|
|
13
14
|
variant?: "outline" | "solid" | "danger" | "ghost" | "link" | null;
|
|
14
15
|
attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
|
|
15
16
|
children?: readonly (string | Node)[];
|
package/vanilla/UiButton.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { manageComponentLifecycle } from "@nextwebwg/html-next/runtime";
|
|
3
3
|
import "../styles/ui-button.css";
|
|
4
4
|
|
|
5
|
-
const definition = {...{"contract":{"tag":"ui-button","props":{"align":{"type":{"enum":["center","start"]},"required":false,"target":{"attribute":"align"},"default":"center"},"disabled":{"type":"boolean","required":false,"target":{"attribute":"disabled"},"default":false},"size":{"type":{"enum":["sm","md","lg"]},"required":false,"target":{"attribute":"size"},"default":"md"},"stretch":{"type":"boolean","required":false,"target":{"attribute":"stretch"},"default":false},"variant":{"type":{"enum":["outline","solid","danger","ghost","link"]},"required":false,"target":{"attribute":"variant"},"default":"outline"}}},"template":{"kind":"element","name":"button","attributes":[{"kind":"literal","name":"type","value":"button"},{"kind":"attribute","name":"disabled","expression":"disabled","expressionPlan":{"source":"disabled","ast":{"kind":"id","name":"disabled"},"dependencies":["disabled"]}}],"children":[{"kind":"slot"}]},"declarations":[],"root":{"kind":"native","element":"button","choices":["button"]}},source:{file:import.meta.url},css:""};
|
|
5
|
+
const definition = {...{"contract":{"tag":"ui-button","props":{"align":{"type":{"enum":["center","start"]},"required":false,"target":{"attribute":"align"},"default":"center"},"disabled":{"type":"boolean","required":false,"target":{"attribute":"disabled"},"default":false},"size":{"type":{"enum":["sm","md","lg"]},"required":false,"target":{"attribute":"size"},"default":"md"},"stretch":{"type":"boolean","required":false,"target":{"attribute":"stretch"},"default":false},"tone":{"type":{"enum":["neutral","accent"]},"required":false,"target":{"attribute":"tone"},"default":"neutral"},"variant":{"type":{"enum":["outline","solid","danger","ghost","link"]},"required":false,"target":{"attribute":"variant"},"default":"outline"}}},"template":{"kind":"element","name":"button","attributes":[{"kind":"literal","name":"type","value":"button"},{"kind":"attribute","name":"disabled","expression":"disabled","expressionPlan":{"source":"disabled","ast":{"kind":"id","name":"disabled"},"dependencies":["disabled"]}}],"children":[{"kind":"slot"}]},"declarations":[],"root":{"kind":"native","element":"button","choices":["button"]}},source:{file:import.meta.url},css:""};
|
|
6
6
|
|
|
7
7
|
export function createUiButton(options = {}) {
|
|
8
8
|
const { attributes = {}, children = [], slots = {}, as, ...componentProps } = options;
|
package/vue/UiButton.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ type __VLS_Props = {
|
|
|
3
3
|
disabled?: boolean;
|
|
4
4
|
size?: 'sm' | 'md' | 'lg';
|
|
5
5
|
stretch?: boolean;
|
|
6
|
+
tone?: 'neutral' | 'accent';
|
|
6
7
|
variant?: 'outline' | 'solid' | 'danger' | 'ghost' | 'link';
|
|
7
8
|
};
|
|
8
9
|
declare var __VLS_1: {};
|
|
@@ -10,6 +11,7 @@ type __VLS_Slots = {} & {
|
|
|
10
11
|
default?: (props: typeof __VLS_1) => any;
|
|
11
12
|
};
|
|
12
13
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
14
|
+
tone: "neutral" | "accent";
|
|
13
15
|
variant: "outline" | "solid" | "danger" | "ghost" | "link";
|
|
14
16
|
align: "center" | "start";
|
|
15
17
|
disabled: boolean;
|
package/vue/UiButton.vue
CHANGED
|
@@ -10,6 +10,7 @@ const props = withDefaults(
|
|
|
10
10
|
disabled?: boolean
|
|
11
11
|
size?: 'sm' | 'md' | 'lg'
|
|
12
12
|
stretch?: boolean
|
|
13
|
+
tone?: 'neutral' | 'accent'
|
|
13
14
|
variant?: 'outline' | 'solid' | 'danger' | 'ghost' | 'link'
|
|
14
15
|
}>(),
|
|
15
16
|
{
|
|
@@ -17,6 +18,7 @@ const props = withDefaults(
|
|
|
17
18
|
disabled: false,
|
|
18
19
|
size: 'md',
|
|
19
20
|
stretch: false,
|
|
21
|
+
tone: 'neutral',
|
|
20
22
|
variant: 'outline',
|
|
21
23
|
},
|
|
22
24
|
)
|
|
@@ -28,6 +30,7 @@ const hostState = computed(() =>
|
|
|
28
30
|
props.align && `align align=${props.align}`,
|
|
29
31
|
props.stretch && 'stretch',
|
|
30
32
|
props.size && `size size=${props.size}`,
|
|
33
|
+
props.tone && `tone tone=${props.tone}`,
|
|
31
34
|
].filter(Boolean).join(' ')
|
|
32
35
|
)
|
|
33
36
|
</script>
|
|
@@ -166,6 +169,26 @@ const hostState = computed(() =>
|
|
|
166
169
|
transform: translateY(0);
|
|
167
170
|
}
|
|
168
171
|
|
|
172
|
+
/* An accent-tinted secondary action: the outline, ghost, and link variants in the accent colour.
|
|
173
|
+
Solid and danger already carry their own intent. */
|
|
174
|
+
[data-component~="ui-button"][data-ui-button-state~="tone=accent"][data-component~="ui-button"][data-ui-button-state~="variant=outline"] {
|
|
175
|
+
border-color: var(--ui-button-accent-border, var(--ui-accent));
|
|
176
|
+
background: var(--ui-button-accent-surface, var(--ui-accent-subtle));
|
|
177
|
+
color: var(--ui-button-accent-text, var(--ui-accent-active));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
[data-component~="ui-button"][data-ui-button-state~="tone=accent"][data-component~="ui-button"][data-ui-button-state~="variant=outline"]:hover:enabled {
|
|
181
|
+
border-color: var(--ui-button-accent-hover-border, var(--ui-accent-hover));
|
|
182
|
+
background: var(
|
|
183
|
+
--ui-button-accent-hover-surface,
|
|
184
|
+
color-mix(in srgb, var(--ui-accent) 16%, var(--ui-surface))
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
[data-component~="ui-button"][data-ui-button-state~="tone=accent"]:is([data-component~="ui-button"][data-ui-button-state~="variant=ghost"], [data-component~="ui-button"][data-ui-button-state~="variant=link"]) {
|
|
189
|
+
color: var(--ui-button-accent-text, var(--ui-accent-active));
|
|
190
|
+
}
|
|
191
|
+
|
|
169
192
|
[data-component~="ui-button"][data-ui-button-state~="variant=ghost"] {
|
|
170
193
|
border-color: transparent;
|
|
171
194
|
background: transparent;
|
|
@@ -206,44 +229,29 @@ const hostState = computed(() =>
|
|
|
206
229
|
|
|
207
230
|
/* Disabled colours fall back to each variant's own; ghost and link take only the text colour. */
|
|
208
231
|
[data-component~="ui-button"]:disabled {
|
|
209
|
-
opacity: var(--ui-button-disabled-opacity,
|
|
232
|
+
opacity: var(--ui-button-disabled-opacity, 1);
|
|
210
233
|
cursor: not-allowed;
|
|
211
|
-
border-color: var(--ui-button-disabled-border, var(--ui-
|
|
212
|
-
background-color: var(
|
|
213
|
-
|
|
214
|
-
var(--ui-button-surface, var(--ui-surface-elevated))
|
|
215
|
-
);
|
|
216
|
-
color: var(
|
|
217
|
-
--ui-button-disabled-text,
|
|
218
|
-
var(--ui-button-text, var(--ui-action-secondary-text, var(--ui-text-primary)))
|
|
219
|
-
);
|
|
234
|
+
border-color: var(--ui-button-disabled-border, var(--ui-border));
|
|
235
|
+
background-color: var(--ui-button-disabled-surface, var(--ui-disabled-surface));
|
|
236
|
+
color: var(--ui-button-disabled-text, var(--ui-disabled-text));
|
|
220
237
|
}
|
|
221
238
|
|
|
222
239
|
[data-component~="ui-button"][data-ui-button-state~="variant=solid"]:disabled {
|
|
223
|
-
border-color: var(
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
);
|
|
227
|
-
background-color: var(
|
|
228
|
-
--ui-button-disabled-surface,
|
|
229
|
-
var(--ui-action-primary-surface, var(--ui-accent-solid))
|
|
230
|
-
);
|
|
231
|
-
color: var(--ui-button-disabled-text, var(--ui-action-primary-text, var(--ui-text-on-accent)));
|
|
240
|
+
border-color: var(--ui-button-disabled-border, var(--ui-border));
|
|
241
|
+
background-color: var(--ui-button-disabled-surface, var(--ui-disabled-surface));
|
|
242
|
+
color: var(--ui-button-disabled-text, var(--ui-disabled-text));
|
|
232
243
|
}
|
|
233
244
|
|
|
234
245
|
[data-component~="ui-button"][data-ui-button-state~="variant=danger"]:disabled {
|
|
235
|
-
border-color: var(--ui-button-disabled-border, var(--ui-
|
|
236
|
-
background-color: var(--ui-button-disabled-surface, var(--ui-
|
|
237
|
-
color: var(--ui-button-disabled-text, var(--ui-text
|
|
246
|
+
border-color: var(--ui-button-disabled-border, var(--ui-border));
|
|
247
|
+
background-color: var(--ui-button-disabled-surface, var(--ui-disabled-surface));
|
|
248
|
+
color: var(--ui-button-disabled-text, var(--ui-disabled-text));
|
|
238
249
|
}
|
|
239
250
|
|
|
240
251
|
[data-component~="ui-button"][data-ui-button-state~="variant=ghost"]:disabled {
|
|
252
|
+
background: none;
|
|
241
253
|
border-color: transparent;
|
|
242
|
-
|
|
243
|
-
color: var(
|
|
244
|
-
--ui-button-disabled-text,
|
|
245
|
-
var(--ui-button-ghost-text, var(--ui-action-secondary-text, var(--ui-text-primary)))
|
|
246
|
-
);
|
|
254
|
+
color: var(--ui-button-disabled-text, var(--ui-disabled-text));
|
|
247
255
|
}
|
|
248
256
|
|
|
249
257
|
@media (pointer: coarse) {
|
|
@@ -287,7 +295,8 @@ const hostState = computed(() =>
|
|
|
287
295
|
|
|
288
296
|
[data-component~="ui-button"][data-ui-button-state~="variant=link"]:disabled {
|
|
289
297
|
background: none;
|
|
290
|
-
color:
|
|
298
|
+
border-color: transparent;
|
|
299
|
+
color: var(--ui-button-disabled-text, var(--ui-disabled-text));
|
|
291
300
|
}
|
|
292
301
|
|
|
293
302
|
[data-component~="ui-button"][data-ui-button-state~="variant=link"]:focus-visible {
|
package/vue/UiIconButton.vue
CHANGED
|
@@ -294,35 +294,21 @@ html[data-ui-input-modality="touch"] [data-component~="ui-icon-button"]::after {
|
|
|
294
294
|
|
|
295
295
|
/* Disabled colours fall back to each variant's own; ghost takes only the icon colour. */
|
|
296
296
|
[data-component~="ui-icon-button"]:disabled {
|
|
297
|
-
opacity: var(--ui-icon-button-disabled-opacity,
|
|
298
|
-
color: var(--ui-icon-button-disabled-text,
|
|
297
|
+
opacity: var(--ui-icon-button-disabled-opacity, 1);
|
|
298
|
+
color: var(--ui-icon-button-disabled-text, var(--ui-disabled-text));
|
|
299
299
|
cursor: not-allowed;
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
[data-component~="ui-icon-button"][data-ui-icon-button-state~="variant=outline"]:disabled {
|
|
303
|
-
border-color: var(
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
);
|
|
307
|
-
background-color: var(
|
|
308
|
-
--ui-icon-button-disabled-surface,
|
|
309
|
-
var(--ui-icon-button-outline-surface, var(--ui-surface-default))
|
|
310
|
-
);
|
|
311
|
-
color: var(
|
|
312
|
-
--ui-icon-button-disabled-text,
|
|
313
|
-
var(--ui-icon-button-outline-text, var(--ui-text-primary))
|
|
314
|
-
);
|
|
303
|
+
border-color: var(--ui-icon-button-disabled-border, var(--ui-border));
|
|
304
|
+
background-color: var(--ui-icon-button-disabled-surface, var(--ui-disabled-surface));
|
|
305
|
+
color: var(--ui-icon-button-disabled-text, var(--ui-disabled-text));
|
|
315
306
|
}
|
|
316
307
|
|
|
317
308
|
[data-component~="ui-icon-button"][data-ui-icon-button-state~="variant=solid"]:disabled {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
);
|
|
322
|
-
color: var(
|
|
323
|
-
--ui-icon-button-disabled-text,
|
|
324
|
-
var(--ui-icon-button-solid-text, var(--ui-text-on-accent))
|
|
325
|
-
);
|
|
309
|
+
border-color: var(--ui-icon-button-disabled-border, var(--ui-border));
|
|
310
|
+
background-color: var(--ui-icon-button-disabled-surface, var(--ui-disabled-surface));
|
|
311
|
+
color: var(--ui-icon-button-disabled-text, var(--ui-disabled-text));
|
|
326
312
|
}
|
|
327
313
|
|
|
328
314
|
[data-component~="ui-icon-button"] {
|
package/vue/chunks/UiButton.js
CHANGED
|
@@ -18,6 +18,7 @@ var UiButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
18
18
|
type: Boolean,
|
|
19
19
|
default: false
|
|
20
20
|
},
|
|
21
|
+
tone: { default: "neutral" },
|
|
21
22
|
variant: { default: "outline" }
|
|
22
23
|
},
|
|
23
24
|
setup(__props) {
|
|
@@ -27,7 +28,8 @@ var UiButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
27
28
|
props.variant && `variant variant=${props.variant}`,
|
|
28
29
|
props.align && `align align=${props.align}`,
|
|
29
30
|
props.stretch && "stretch",
|
|
30
|
-
props.size && `size size=${props.size}
|
|
31
|
+
props.size && `size size=${props.size}`,
|
|
32
|
+
props.tone && `tone tone=${props.tone}`
|
|
31
33
|
].filter(Boolean).join(" "));
|
|
32
34
|
return (_ctx, _cache) => {
|
|
33
35
|
return openBlock(), createElementBlock("button", mergeProps({
|
|
@@ -39,6 +41,6 @@ var UiButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
39
41
|
}), [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16, _hoisted_1);
|
|
40
42
|
};
|
|
41
43
|
}
|
|
42
|
-
}), [["__scopeId", "data-v-
|
|
44
|
+
}), [["__scopeId", "data-v-405b2c60"]]);
|
|
43
45
|
//#endregion
|
|
44
46
|
export { UiButton_default as t };
|
|
@@ -124,6 +124,6 @@ var UiIconButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
124
124
|
}), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1);
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
}), [["__scopeId", "data-v-
|
|
127
|
+
}), [["__scopeId", "data-v-80722d12"]]);
|
|
128
128
|
//#endregion
|
|
129
129
|
export { UiIconButton_default as t };
|