@sveltia/ui 0.4.0 → 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/package/components/alert/alert.svelte +55 -0
- package/package/components/alert/alert.svelte.d.ts +36 -0
- package/package/components/button/button.svelte +29 -29
- package/package/components/button/button.svelte.d.ts +6 -6
- package/package/components/button/select-button-group.svelte +3 -3
- package/package/components/button/select-button-group.svelte.d.ts +4 -4
- package/package/components/button/select-button.svelte.d.ts +2 -2
- package/package/components/calendar/calendar.svelte +8 -8
- package/package/components/calendar/calendar.svelte.d.ts +2 -2
- package/package/components/checkbox/checkbox-group.svelte.d.ts +2 -2
- package/package/components/checkbox/checkbox.svelte +7 -7
- package/package/components/checkbox/checkbox.svelte.d.ts +6 -6
- package/package/components/dialog/dialog.svelte +5 -5
- package/package/components/dialog/dialog.svelte.d.ts +4 -4
- package/package/components/disclosure/disclosure.svelte.d.ts +4 -4
- package/package/components/divider/divider.svelte +1 -1
- package/package/components/divider/divider.svelte.d.ts +2 -2
- package/package/components/divider/spacer.svelte.d.ts +2 -2
- package/package/components/drawer/drawer.svelte +5 -5
- package/package/components/drawer/drawer.svelte.d.ts +4 -4
- package/package/components/icon/icon.svelte.d.ts +6 -6
- package/package/components/listbox/listbox.svelte +4 -4
- package/package/components/listbox/listbox.svelte.d.ts +2 -2
- package/package/components/listbox/option-group.svelte +2 -2
- package/package/components/listbox/option-group.svelte.d.ts +4 -4
- package/package/components/listbox/option.svelte +4 -4
- package/package/components/listbox/option.svelte.d.ts +4 -4
- package/package/components/menu/menu-button.svelte.d.ts +2 -2
- package/package/components/menu/menu-item-checkbox.svelte.d.ts +2 -2
- package/package/components/menu/menu-item-group.svelte.d.ts +4 -4
- package/package/components/menu/menu-item-radio.svelte.d.ts +2 -2
- package/package/components/menu/menu-item.svelte +4 -4
- package/package/components/menu/menu-item.svelte.d.ts +4 -4
- package/package/components/menu/menu.svelte +1 -1
- package/package/components/menu/menu.svelte.d.ts +2 -2
- package/package/components/radio/radio-group.svelte.d.ts +2 -2
- package/package/components/radio/radio.svelte +5 -5
- package/package/components/radio/radio.svelte.d.ts +6 -6
- package/package/components/select/combobox.svelte +9 -9
- package/package/components/select/combobox.svelte.d.ts +8 -5
- package/package/components/select/select.svelte.d.ts +4 -4
- package/package/components/slider/slider.svelte +6 -6
- package/package/components/slider/slider.svelte.d.ts +4 -4
- package/package/components/switch/switch.svelte +6 -6
- package/package/components/switch/switch.svelte.d.ts +4 -4
- package/package/components/table/table-body.svelte.d.ts +2 -2
- package/package/components/table/table-cell.svelte.d.ts +2 -2
- package/package/components/table/table-col-header.svelte.d.ts +2 -2
- package/package/components/table/table-foot.svelte.d.ts +2 -2
- package/package/components/table/table-head.svelte.d.ts +2 -2
- package/package/components/table/table-row-header.svelte.d.ts +2 -2
- package/package/components/table/table-row.svelte.d.ts +2 -2
- package/package/components/table/table.svelte +1 -1
- package/package/components/table/table.svelte.d.ts +2 -2
- package/package/components/tabs/tab-list.svelte +3 -3
- package/package/components/tabs/tab-list.svelte.d.ts +4 -4
- package/package/components/tabs/tab-panel.svelte.d.ts +2 -2
- package/package/components/tabs/tab.svelte.d.ts +2 -2
- package/package/components/text-field/markdown-editor.svelte +1 -1
- package/package/components/text-field/markdown-editor.svelte.d.ts +2 -2
- package/package/components/text-field/number-input.svelte +3 -3
- package/package/components/text-field/number-input.svelte.d.ts +4 -4
- package/package/components/text-field/password-input.svelte +3 -3
- package/package/components/text-field/password-input.svelte.d.ts +4 -4
- package/package/components/text-field/search-bar.svelte +2 -2
- package/package/components/text-field/search-bar.svelte.d.ts +4 -4
- package/package/components/text-field/text-area.svelte +5 -5
- package/package/components/text-field/text-area.svelte.d.ts +4 -4
- package/package/components/text-field/text-input.svelte +13 -13
- package/package/components/text-field/text-input.svelte.d.ts +6 -6
- package/package/components/toolbar/toolbar.svelte +6 -6
- package/package/components/toolbar/toolbar.svelte.d.ts +2 -2
- package/package/components/util/app-shell.svelte +168 -163
- package/package/components/util/app-shell.svelte.d.ts +4 -4
- package/package/components/util/group.svelte.d.ts +2 -2
- package/package/components/util/popup.svelte +4 -4
- package/package/components/util/popup.svelte.d.ts +2 -2
- package/package/components/util/portal.svelte.d.ts +2 -2
- package/package/index.d.ts +1 -0
- package/package/index.js +1 -0
- package/package/styles/core.scss +5 -5
- package/package/styles/variables.scss +158 -153
- package/package.json +26 -18
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
Inline alert message.
|
|
4
|
+
@see https://w3c.github.io/aria/#alert
|
|
5
|
+
@see https://www.w3.org/WAI/ARIA/apg/patterns/alert/
|
|
6
|
+
-->
|
|
7
|
+
<script>
|
|
8
|
+
import Icon from '../icon/icon.svelte';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Alert type.
|
|
12
|
+
* @type {'error' | 'warning' | 'info' | 'success'}
|
|
13
|
+
*/
|
|
14
|
+
export let type = 'error';
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<div class="sui alert {type}" role="alert" {...$$restProps}>
|
|
18
|
+
{#if $$slots.icon}
|
|
19
|
+
<slot name="icon" />
|
|
20
|
+
{:else}
|
|
21
|
+
<Icon name={type === 'success' ? 'check_circle' : type} />
|
|
22
|
+
{/if}
|
|
23
|
+
<slot />
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<style>.alert {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: var(--gap, 8px);
|
|
30
|
+
padding: var(--padding, 8px);
|
|
31
|
+
border-width: var(--border-width, var(--sui-control-medium-border-width));
|
|
32
|
+
border-style: var(--border-style, solid);
|
|
33
|
+
border-radius: var(--border-radius, var(--sui-control-medium-border-radius));
|
|
34
|
+
font-size: var(--font-size, var(--sui-font-size-default));
|
|
35
|
+
}
|
|
36
|
+
.alert.error {
|
|
37
|
+
border-color: var(--sui-error-border-color);
|
|
38
|
+
color: var(--sui-error-foreground-color);
|
|
39
|
+
background-color: var(--sui-error-background-color);
|
|
40
|
+
}
|
|
41
|
+
.alert.warning {
|
|
42
|
+
border-color: var(--sui-warning-border-color);
|
|
43
|
+
color: var(--sui-warning-foreground-color);
|
|
44
|
+
background-color: var(--sui-warning-background-color);
|
|
45
|
+
}
|
|
46
|
+
.alert.info {
|
|
47
|
+
border-color: var(--sui-info-border-color);
|
|
48
|
+
color: var(--sui-info-foreground-color);
|
|
49
|
+
background-color: var(--sui-info-background-color);
|
|
50
|
+
}
|
|
51
|
+
.alert.success {
|
|
52
|
+
border-color: var(--sui-success-border-color);
|
|
53
|
+
color: var(--sui-success-foreground-color);
|
|
54
|
+
background-color: var(--sui-success-background-color);
|
|
55
|
+
}</style>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} AlertProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} AlertEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} AlertSlots */
|
|
4
|
+
/**
|
|
5
|
+
* Inline alert message.
|
|
6
|
+
* @see https://w3c.github.io/aria/#alert
|
|
7
|
+
* @see https://www.w3.org/WAI/ARIA/apg/patterns/alert/
|
|
8
|
+
*/
|
|
9
|
+
export default class Alert extends SvelteComponent<{
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
type?: "error" | "warning" | "info" | "success";
|
|
12
|
+
}, {
|
|
13
|
+
[evt: string]: CustomEvent<any>;
|
|
14
|
+
}, {
|
|
15
|
+
icon: {};
|
|
16
|
+
default: {};
|
|
17
|
+
}> {
|
|
18
|
+
}
|
|
19
|
+
export type AlertProps = typeof __propDef.props;
|
|
20
|
+
export type AlertEvents = typeof __propDef.events;
|
|
21
|
+
export type AlertSlots = typeof __propDef.slots;
|
|
22
|
+
import { SvelteComponent } from "svelte";
|
|
23
|
+
declare const __propDef: {
|
|
24
|
+
props: {
|
|
25
|
+
[x: string]: any;
|
|
26
|
+
type?: 'error' | 'warning' | 'info' | 'success';
|
|
27
|
+
};
|
|
28
|
+
events: {
|
|
29
|
+
[evt: string]: CustomEvent<any>;
|
|
30
|
+
};
|
|
31
|
+
slots: {
|
|
32
|
+
icon: {};
|
|
33
|
+
default: {};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export {};
|
|
@@ -144,72 +144,72 @@ button[disabled] {
|
|
|
144
144
|
button:global(.primary), button:global(.secondary), button:global(.tertiary), button:global(.ghost) {
|
|
145
145
|
justify-content: center;
|
|
146
146
|
border-width: 1px;
|
|
147
|
-
border-radius: var(--button
|
|
148
|
-
padding: var(--button
|
|
149
|
-
height: var(--button
|
|
147
|
+
border-radius: var(--sui-button-medium-border-radius);
|
|
148
|
+
padding: var(--sui-button-medium-padding, 0 8px);
|
|
149
|
+
height: var(--sui-button-medium-height);
|
|
150
150
|
}
|
|
151
151
|
button:global(.primary) :global(.label:only-child), button:global(.secondary) :global(.label:only-child), button:global(.tertiary) :global(.label:only-child), button:global(.ghost) :global(.label:only-child) {
|
|
152
152
|
padding: 0 4px;
|
|
153
153
|
}
|
|
154
154
|
button:global(.primary) {
|
|
155
|
-
border-color: var(--control-border-color);
|
|
156
|
-
color: var(--primary-accent-color-foreground);
|
|
157
|
-
background-color: var(--primary-accent-color);
|
|
155
|
+
border-color: var(--sui-control-border-color);
|
|
156
|
+
color: var(--sui-primary-accent-color-foreground);
|
|
157
|
+
background-color: var(--sui-primary-accent-color);
|
|
158
158
|
}
|
|
159
159
|
button:global(.primary):hover, button:global(.primary):focus-visible {
|
|
160
|
-
background-color: var(--primary-accent-color-lighter);
|
|
160
|
+
background-color: var(--sui-primary-accent-color-lighter);
|
|
161
161
|
}
|
|
162
162
|
button:global(.primary):active {
|
|
163
|
-
background-color: var(--primary-accent-color-darker);
|
|
163
|
+
background-color: var(--sui-primary-accent-color-darker);
|
|
164
164
|
}
|
|
165
165
|
button:global(.secondary) {
|
|
166
|
-
border-color: var(--primary-accent-color);
|
|
167
|
-
color: var(--primary-accent-color-lighter);
|
|
168
|
-
background-color: var(--tertiary-background-color);
|
|
166
|
+
border-color: var(--sui-primary-accent-color);
|
|
167
|
+
color: var(--sui-primary-accent-color-lighter);
|
|
168
|
+
background-color: var(--sui-tertiary-background-color);
|
|
169
169
|
}
|
|
170
170
|
button:global(.secondary):hover, button:global(.secondary):focus-visible {
|
|
171
|
-
background-color: var(--highlight-background-color);
|
|
171
|
+
background-color: var(--sui-highlight-background-color);
|
|
172
172
|
}
|
|
173
173
|
button:global(.secondary)[aria-pressed=true] {
|
|
174
|
-
background-color: var(--primary-accent-color);
|
|
174
|
+
background-color: var(--sui-primary-accent-color);
|
|
175
175
|
}
|
|
176
176
|
button:global(.tertiary) {
|
|
177
|
-
border-color: var(--control-border-color);
|
|
178
|
-
color: var(--highlight-foreground-color);
|
|
179
|
-
background-color: var(--tertiary-background-color);
|
|
177
|
+
border-color: var(--sui-control-border-color);
|
|
178
|
+
color: var(--sui-highlight-foreground-color);
|
|
179
|
+
background-color: var(--sui-tertiary-background-color);
|
|
180
180
|
}
|
|
181
181
|
button:global(.tertiary):hover, button:global(.tertiary):focus-visible {
|
|
182
|
-
background-color: var(--highlight-background-color);
|
|
182
|
+
background-color: var(--sui-highlight-background-color);
|
|
183
183
|
}
|
|
184
184
|
button:global(.tertiary)[aria-pressed=true] {
|
|
185
|
-
background-color: var(--highlight-background-color);
|
|
185
|
+
background-color: var(--sui-highlight-background-color);
|
|
186
186
|
}
|
|
187
187
|
button:global(.ghost):hover, button:global(.ghost):focus-visible {
|
|
188
|
-
background-color: var(--highlight-background-color);
|
|
188
|
+
background-color: var(--sui-highlight-background-color);
|
|
189
189
|
}
|
|
190
190
|
button:global(.ghost)[aria-pressed=true] {
|
|
191
|
-
background-color: var(--highlight-background-color);
|
|
191
|
+
background-color: var(--sui-highlight-background-color);
|
|
192
192
|
}
|
|
193
193
|
button:global(.danger) {
|
|
194
|
-
background-color: var(--
|
|
194
|
+
background-color: var(--sui-error-background-color);
|
|
195
195
|
}
|
|
196
196
|
button:global(.large) {
|
|
197
|
-
height: var(--button
|
|
197
|
+
height: var(--sui-button-large-height);
|
|
198
198
|
}
|
|
199
199
|
button:global(.small) {
|
|
200
|
-
padding: var(--button
|
|
201
|
-
height: var(--button
|
|
202
|
-
font-size: var(--font-size
|
|
200
|
+
padding: var(--sui-button-small-padding, 0 8px);
|
|
201
|
+
height: var(--sui-button-small-height);
|
|
202
|
+
font-size: var(--sui-font-size-small);
|
|
203
203
|
}
|
|
204
204
|
button:global(.small) :global(.icon) {
|
|
205
|
-
font-size: var(--font-size
|
|
205
|
+
font-size: var(--sui-font-size-large);
|
|
206
206
|
}
|
|
207
207
|
button:global(.pill) {
|
|
208
|
-
border-radius: var(--button
|
|
209
|
-
padding: var(--button
|
|
208
|
+
border-radius: var(--sui-button-medium-pill-height, 16px);
|
|
209
|
+
padding: var(--sui-button-medium-pill-padding, 0 16px);
|
|
210
210
|
}
|
|
211
211
|
button:global(.link) {
|
|
212
|
-
color: var(--primary-accent-color-lighter);
|
|
212
|
+
color: var(--sui-primary-accent-color-lighter);
|
|
213
213
|
}
|
|
214
214
|
button:global(.iconic) {
|
|
215
215
|
justify-content: center;
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* @see https://w3c.github.io/aria/#button
|
|
7
7
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/button/
|
|
8
8
|
*/
|
|
9
|
-
export default class Button extends
|
|
9
|
+
export default class Button extends SvelteComponent<{
|
|
10
10
|
[x: string]: any;
|
|
11
|
+
class?: string;
|
|
11
12
|
label?: string;
|
|
12
|
-
disabled?: boolean;
|
|
13
13
|
type?: "reset" | "submit" | "button";
|
|
14
|
-
|
|
14
|
+
disabled?: boolean;
|
|
15
15
|
element?: HTMLButtonElement;
|
|
16
16
|
role?: string;
|
|
17
17
|
size?: "small" | "medium" | "large";
|
|
@@ -71,14 +71,14 @@ export default class Button extends SvelteComponentTyped<{
|
|
|
71
71
|
export type ButtonProps = typeof __propDef.props;
|
|
72
72
|
export type ButtonEvents = typeof __propDef.events;
|
|
73
73
|
export type ButtonSlots = typeof __propDef.slots;
|
|
74
|
-
import {
|
|
74
|
+
import { SvelteComponent } from "svelte";
|
|
75
75
|
declare const __propDef: {
|
|
76
76
|
props: {
|
|
77
77
|
[x: string]: any;
|
|
78
|
+
class?: string;
|
|
78
79
|
label?: string;
|
|
79
|
-
disabled?: boolean;
|
|
80
80
|
type?: ('button' | 'submit' | 'reset');
|
|
81
|
-
|
|
81
|
+
disabled?: boolean;
|
|
82
82
|
element?: HTMLButtonElement | null;
|
|
83
83
|
role?: string;
|
|
84
84
|
size?: ('small' | 'medium' | 'large');
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
}
|
|
58
58
|
.select-button-group :global(button) {
|
|
59
59
|
border-radius: 0;
|
|
60
|
-
color: var(--secondary-foreground-color);
|
|
60
|
+
color: var(--sui-secondary-foreground-color);
|
|
61
61
|
}
|
|
62
62
|
.select-button-group :global(button):first-child {
|
|
63
63
|
border-radius: 4px 0 0 4px;
|
|
@@ -69,6 +69,6 @@
|
|
|
69
69
|
border-radius: 0 4px 4px 0;
|
|
70
70
|
}
|
|
71
71
|
.select-button-group :global(button[aria-checked="true"]) {
|
|
72
|
-
color: var(--highlight-foreground-color);
|
|
73
|
-
background-color: var(--highlight-background-color);
|
|
72
|
+
color: var(--sui-highlight-foreground-color);
|
|
73
|
+
background-color: var(--sui-highlight-background-color);
|
|
74
74
|
}</style>
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* @see https://w3c.github.io/aria/#radiogroup
|
|
7
7
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/radio/
|
|
8
8
|
*/
|
|
9
|
-
export default class SelectButtonGroup extends
|
|
9
|
+
export default class SelectButtonGroup extends SvelteComponent<{
|
|
10
|
+
class?: string;
|
|
10
11
|
disabled?: boolean;
|
|
11
12
|
value?: string;
|
|
12
|
-
class?: string;
|
|
13
13
|
element?: HTMLElement;
|
|
14
14
|
ariaLabel?: string;
|
|
15
15
|
}, {
|
|
@@ -23,12 +23,12 @@ export default class SelectButtonGroup extends SvelteComponentTyped<{
|
|
|
23
23
|
export type SelectButtonGroupProps = typeof __propDef.props;
|
|
24
24
|
export type SelectButtonGroupEvents = typeof __propDef.events;
|
|
25
25
|
export type SelectButtonGroupSlots = typeof __propDef.slots;
|
|
26
|
-
import {
|
|
26
|
+
import { SvelteComponent } from "svelte";
|
|
27
27
|
declare const __propDef: {
|
|
28
28
|
props: {
|
|
29
|
+
class?: string;
|
|
29
30
|
disabled?: boolean;
|
|
30
31
|
value?: string;
|
|
31
|
-
class?: string;
|
|
32
32
|
element?: HTMLElement | null;
|
|
33
33
|
ariaLabel?: string;
|
|
34
34
|
};
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @see https://w3c.github.io/aria/#radio
|
|
7
7
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/radio/
|
|
8
8
|
*/
|
|
9
|
-
export default class SelectButton extends
|
|
9
|
+
export default class SelectButton extends SvelteComponent<{
|
|
10
10
|
[x: string]: any;
|
|
11
11
|
class?: string;
|
|
12
12
|
selected?: boolean;
|
|
@@ -27,7 +27,7 @@ export default class SelectButton extends SvelteComponentTyped<{
|
|
|
27
27
|
export type SelectButtonProps = typeof __propDef.props;
|
|
28
28
|
export type SelectButtonEvents = typeof __propDef.events;
|
|
29
29
|
export type SelectButtonSlots = typeof __propDef.slots;
|
|
30
|
-
import {
|
|
30
|
+
import { SvelteComponent } from "svelte";
|
|
31
31
|
declare const __propDef: {
|
|
32
32
|
props: {
|
|
33
33
|
[x: string]: any;
|
|
@@ -195,17 +195,17 @@
|
|
|
195
195
|
align-items: center;
|
|
196
196
|
width: 24px;
|
|
197
197
|
height: 24px;
|
|
198
|
-
font-size: var(--font-size
|
|
198
|
+
font-size: var(--sui-font-size-small);
|
|
199
199
|
}
|
|
200
200
|
.grid div.weekday {
|
|
201
|
-
color: var(--secondary-foreground-color);
|
|
201
|
+
color: var(--sui-secondary-foreground-color);
|
|
202
202
|
}
|
|
203
203
|
.grid div.other-month {
|
|
204
|
-
color: var(--tertiary-foreground-color);
|
|
204
|
+
color: var(--sui-tertiary-foreground-color);
|
|
205
205
|
}
|
|
206
206
|
.grid div.today :global(button) {
|
|
207
|
-
color: var(--highlight-foreground-color);
|
|
208
|
-
background-color: var(--primary-accent-color);
|
|
207
|
+
color: var(--sui-highlight-foreground-color);
|
|
208
|
+
background-color: var(--sui-primary-accent-color);
|
|
209
209
|
}
|
|
210
210
|
.grid div :global(button) {
|
|
211
211
|
justify-content: center;
|
|
@@ -214,15 +214,15 @@
|
|
|
214
214
|
border-radius: 50%;
|
|
215
215
|
}
|
|
216
216
|
.grid div :global(button):hover {
|
|
217
|
-
background-color: var(--highlight-background-color);
|
|
217
|
+
background-color: var(--sui-highlight-background-color);
|
|
218
218
|
}
|
|
219
219
|
.grid div :global(button):focus {
|
|
220
220
|
border-width: 1px;
|
|
221
|
-
border-color: var(--primary-accent-color-lighter);
|
|
221
|
+
border-color: var(--sui-primary-accent-color-lighter);
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
.footer :global(button) {
|
|
225
|
-
font-size: var(--font-size
|
|
225
|
+
font-size: var(--sui-font-size-small);
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
.popup-inner {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/** @typedef {typeof __propDef.events} CalendarEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} CalendarSlots */
|
|
4
4
|
/** A calendar (date picker) widget. */
|
|
5
|
-
export default class Calendar extends
|
|
5
|
+
export default class Calendar extends SvelteComponent<{
|
|
6
6
|
value?: string;
|
|
7
7
|
}, {
|
|
8
8
|
click: MouseEvent;
|
|
@@ -13,7 +13,7 @@ export default class Calendar extends SvelteComponentTyped<{
|
|
|
13
13
|
export type CalendarProps = typeof __propDef.props;
|
|
14
14
|
export type CalendarEvents = typeof __propDef.events;
|
|
15
15
|
export type CalendarSlots = typeof __propDef.slots;
|
|
16
|
-
import {
|
|
16
|
+
import { SvelteComponent } from "svelte";
|
|
17
17
|
declare const __propDef: {
|
|
18
18
|
props: {
|
|
19
19
|
value?: string | null;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/** @typedef {typeof __propDef.events} CheckboxGroupEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} CheckboxGroupSlots */
|
|
4
4
|
/** The layout container of `<Checkbox>`es. */
|
|
5
|
-
export default class CheckboxGroup extends
|
|
5
|
+
export default class CheckboxGroup extends SvelteComponent<{
|
|
6
6
|
[x: string]: any;
|
|
7
7
|
class?: string;
|
|
8
8
|
orientation?: "vertical" | "horizontal";
|
|
@@ -16,7 +16,7 @@ export default class CheckboxGroup extends SvelteComponentTyped<{
|
|
|
16
16
|
export type CheckboxGroupProps = typeof __propDef.props;
|
|
17
17
|
export type CheckboxGroupEvents = typeof __propDef.events;
|
|
18
18
|
export type CheckboxGroupSlots = typeof __propDef.slots;
|
|
19
|
-
import {
|
|
19
|
+
import { SvelteComponent } from "svelte";
|
|
20
20
|
declare const __propDef: {
|
|
21
21
|
props: {
|
|
22
22
|
[x: string]: any;
|
|
@@ -103,30 +103,30 @@
|
|
|
103
103
|
cursor: default;
|
|
104
104
|
}
|
|
105
105
|
.checkbox.disabled label {
|
|
106
|
-
color: var(--disabled-foreground-color);
|
|
106
|
+
color: var(--sui-disabled-foreground-color);
|
|
107
107
|
}
|
|
108
108
|
.checkbox :global(button) {
|
|
109
109
|
align-items: center;
|
|
110
110
|
justify-content: center;
|
|
111
111
|
overflow: hidden;
|
|
112
112
|
border-width: 2px;
|
|
113
|
-
border-color: var(--checkbox-border-color);
|
|
113
|
+
border-color: var(--sui-checkbox-border-color);
|
|
114
114
|
border-radius: 4px;
|
|
115
115
|
width: 20px;
|
|
116
116
|
height: 20px;
|
|
117
|
-
color: var(--primary-accent-color-lighter);
|
|
117
|
+
color: var(--sui-primary-accent-color-lighter);
|
|
118
118
|
transition: all 200ms;
|
|
119
119
|
}
|
|
120
120
|
.checkbox :global(button) :global(.icon) {
|
|
121
121
|
font-size: 20px;
|
|
122
122
|
}
|
|
123
123
|
.checkbox :global(button[aria-checked="true"]) {
|
|
124
|
-
border-color: var(--primary-accent-color-lighter);
|
|
125
|
-
color: var(--control-background-color);
|
|
126
|
-
background-color: var(--primary-accent-color-lighter);
|
|
124
|
+
border-color: var(--sui-primary-accent-color-lighter);
|
|
125
|
+
color: var(--sui-control-background-color);
|
|
126
|
+
background-color: var(--sui-primary-accent-color-lighter);
|
|
127
127
|
}
|
|
128
128
|
.checkbox :global(button[aria-checked="mixed"]) {
|
|
129
|
-
color: var(--checkbox-border-color);
|
|
129
|
+
color: var(--sui-checkbox-border-color);
|
|
130
130
|
}
|
|
131
131
|
.checkbox :global(button[aria-checked="false"]) {
|
|
132
132
|
color: transparent;
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
* @see https://w3c.github.io/aria/#checkbox
|
|
8
8
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/
|
|
9
9
|
*/
|
|
10
|
-
export default class Checkbox extends
|
|
10
|
+
export default class Checkbox extends SvelteComponent<{
|
|
11
11
|
[x: string]: any;
|
|
12
|
+
class?: string;
|
|
13
|
+
name?: string;
|
|
12
14
|
label?: string;
|
|
13
15
|
disabled?: boolean;
|
|
14
|
-
name?: string;
|
|
15
16
|
value?: string;
|
|
16
|
-
class?: string;
|
|
17
17
|
checked?: string | boolean;
|
|
18
18
|
indeterminate?: boolean;
|
|
19
19
|
}, {
|
|
@@ -27,15 +27,15 @@ export default class Checkbox extends SvelteComponentTyped<{
|
|
|
27
27
|
export type CheckboxProps = typeof __propDef.props;
|
|
28
28
|
export type CheckboxEvents = typeof __propDef.events;
|
|
29
29
|
export type CheckboxSlots = typeof __propDef.slots;
|
|
30
|
-
import {
|
|
30
|
+
import { SvelteComponent } from "svelte";
|
|
31
31
|
declare const __propDef: {
|
|
32
32
|
props: {
|
|
33
33
|
[x: string]: any;
|
|
34
|
+
class?: string;
|
|
35
|
+
name?: string;
|
|
34
36
|
label?: string | null;
|
|
35
37
|
disabled?: boolean;
|
|
36
|
-
name?: string;
|
|
37
38
|
value?: string | null;
|
|
38
|
-
class?: string;
|
|
39
39
|
checked?: (boolean | string | undefined);
|
|
40
40
|
indeterminate?: boolean;
|
|
41
41
|
};
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
justify-content: center;
|
|
218
218
|
align-items: center;
|
|
219
219
|
outline: 0;
|
|
220
|
-
background-color: var(--popup-backdrop-color);
|
|
220
|
+
background-color: var(--sui-popup-backdrop-color);
|
|
221
221
|
}
|
|
222
222
|
dialog.open form {
|
|
223
223
|
opacity: 1;
|
|
@@ -247,9 +247,9 @@ dialog form {
|
|
|
247
247
|
display: flex;
|
|
248
248
|
flex-direction: column;
|
|
249
249
|
border-radius: 4px;
|
|
250
|
-
background-color: var(--secondary-background-color-translucent);
|
|
250
|
+
background-color: var(--sui-secondary-background-color-translucent);
|
|
251
251
|
backdrop-filter: blur(16px);
|
|
252
|
-
box-shadow: 0 8px 16px var(--popup-shadow-color);
|
|
252
|
+
box-shadow: 0 8px 16px var(--sui-popup-shadow-color);
|
|
253
253
|
will-change: opacity, transform;
|
|
254
254
|
transition-property: opacity, transform;
|
|
255
255
|
}
|
|
@@ -281,12 +281,12 @@ dialog.x-large form {
|
|
|
281
281
|
box-sizing: content-box;
|
|
282
282
|
margin: 0 16px;
|
|
283
283
|
border-width: 0 0 1px;
|
|
284
|
-
border-color: var(--secondary-border-color);
|
|
284
|
+
border-color: var(--sui-secondary-border-color);
|
|
285
285
|
padding: 16px 8px;
|
|
286
286
|
height: 32px;
|
|
287
287
|
}
|
|
288
288
|
.header .title {
|
|
289
|
-
font-size: var(--font-size
|
|
289
|
+
font-size: var(--sui-font-size-large);
|
|
290
290
|
}
|
|
291
291
|
|
|
292
292
|
.footer {
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* @see https://w3c.github.io/aria/#dialog
|
|
7
7
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/
|
|
8
8
|
*/
|
|
9
|
-
export default class Dialog extends
|
|
9
|
+
export default class Dialog extends SvelteComponent<{
|
|
10
10
|
[x: string]: any;
|
|
11
|
+
class?: string;
|
|
11
12
|
title?: string;
|
|
12
13
|
open?: boolean;
|
|
13
|
-
class?: string;
|
|
14
14
|
size?: "small" | "medium" | "large" | "x-large";
|
|
15
15
|
modal?: boolean;
|
|
16
16
|
showCancel?: boolean;
|
|
@@ -39,13 +39,13 @@ export default class Dialog extends SvelteComponentTyped<{
|
|
|
39
39
|
export type DialogProps = typeof __propDef.props;
|
|
40
40
|
export type DialogEvents = typeof __propDef.events;
|
|
41
41
|
export type DialogSlots = typeof __propDef.slots;
|
|
42
|
-
import {
|
|
42
|
+
import { SvelteComponent } from "svelte";
|
|
43
43
|
declare const __propDef: {
|
|
44
44
|
props: {
|
|
45
45
|
[x: string]: any;
|
|
46
|
+
class?: string;
|
|
46
47
|
title?: string;
|
|
47
48
|
open?: boolean;
|
|
48
|
-
class?: string;
|
|
49
49
|
size?: ('small' | 'medium' | 'large' | 'x-large');
|
|
50
50
|
modal?: boolean;
|
|
51
51
|
showCancel?: boolean;
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details
|
|
7
7
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/
|
|
8
8
|
*/
|
|
9
|
-
export default class Disclosure extends
|
|
9
|
+
export default class Disclosure extends SvelteComponent<{
|
|
10
10
|
[x: string]: any;
|
|
11
|
-
label?: string;
|
|
12
11
|
class?: string;
|
|
12
|
+
label?: string;
|
|
13
13
|
expanded?: boolean;
|
|
14
14
|
}, {
|
|
15
15
|
[evt: string]: CustomEvent<any>;
|
|
@@ -20,12 +20,12 @@ export default class Disclosure extends SvelteComponentTyped<{
|
|
|
20
20
|
export type DisclosureProps = typeof __propDef.props;
|
|
21
21
|
export type DisclosureEvents = typeof __propDef.events;
|
|
22
22
|
export type DisclosureSlots = typeof __propDef.slots;
|
|
23
|
-
import {
|
|
23
|
+
import { SvelteComponent } from "svelte";
|
|
24
24
|
declare const __propDef: {
|
|
25
25
|
props: {
|
|
26
26
|
[x: string]: any;
|
|
27
|
-
label?: string;
|
|
28
27
|
class?: string;
|
|
28
|
+
label?: string;
|
|
29
29
|
expanded?: boolean;
|
|
30
30
|
};
|
|
31
31
|
events: {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* A content divider with a visible vertical/horizontal line.
|
|
6
6
|
* @see https://w3c.github.io/aria/#separator
|
|
7
7
|
*/
|
|
8
|
-
export default class Divider extends
|
|
8
|
+
export default class Divider extends SvelteComponent<{
|
|
9
9
|
[x: string]: any;
|
|
10
10
|
class?: string;
|
|
11
11
|
orientation?: "vertical" | "horizontal";
|
|
@@ -16,7 +16,7 @@ export default class Divider extends SvelteComponentTyped<{
|
|
|
16
16
|
export type DividerProps = typeof __propDef.props;
|
|
17
17
|
export type DividerEvents = typeof __propDef.events;
|
|
18
18
|
export type DividerSlots = typeof __propDef.slots;
|
|
19
|
-
import {
|
|
19
|
+
import { SvelteComponent } from "svelte";
|
|
20
20
|
declare const __propDef: {
|
|
21
21
|
props: {
|
|
22
22
|
[x: string]: any;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/** @typedef {typeof __propDef.events} SpacerEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} SpacerSlots */
|
|
4
4
|
/** A content divider with no line. It can be flexible. */
|
|
5
|
-
export default class Spacer extends
|
|
5
|
+
export default class Spacer extends SvelteComponent<{
|
|
6
6
|
[x: string]: any;
|
|
7
7
|
class?: string;
|
|
8
8
|
flex?: boolean;
|
|
@@ -13,7 +13,7 @@ export default class Spacer extends SvelteComponentTyped<{
|
|
|
13
13
|
export type SpacerProps = typeof __propDef.props;
|
|
14
14
|
export type SpacerEvents = typeof __propDef.events;
|
|
15
15
|
export type SpacerSlots = typeof __propDef.slots;
|
|
16
|
-
import {
|
|
16
|
+
import { SvelteComponent } from "svelte";
|
|
17
17
|
declare const __propDef: {
|
|
18
18
|
props: {
|
|
19
19
|
[x: string]: any;
|
|
@@ -201,7 +201,7 @@
|
|
|
201
201
|
<style>dialog {
|
|
202
202
|
overflow: hidden;
|
|
203
203
|
outline: 0;
|
|
204
|
-
background-color: var(--popup-backdrop-color);
|
|
204
|
+
background-color: var(--sui-popup-backdrop-color);
|
|
205
205
|
}
|
|
206
206
|
dialog.open form {
|
|
207
207
|
opacity: 1;
|
|
@@ -232,9 +232,9 @@ dialog form {
|
|
|
232
232
|
display: flex;
|
|
233
233
|
flex-direction: column;
|
|
234
234
|
border-radius: 4px;
|
|
235
|
-
background-color: var(--secondary-background-color-translucent);
|
|
235
|
+
background-color: var(--sui-secondary-background-color-translucent);
|
|
236
236
|
backdrop-filter: blur(16px);
|
|
237
|
-
box-shadow: 0 8px 16px var(--popup-shadow-color);
|
|
237
|
+
box-shadow: 0 8px 16px var(--sui-popup-shadow-color);
|
|
238
238
|
will-change: opacity, transform;
|
|
239
239
|
transition-property: opacity, transform;
|
|
240
240
|
}
|
|
@@ -330,12 +330,12 @@ dialog.horizontal.x-large form {
|
|
|
330
330
|
box-sizing: content-box;
|
|
331
331
|
margin: 0 16px;
|
|
332
332
|
border-width: 0 0 1px;
|
|
333
|
-
border-color: var(--secondary-border-color);
|
|
333
|
+
border-color: var(--sui-secondary-border-color);
|
|
334
334
|
padding: 16px 8px;
|
|
335
335
|
height: 32px;
|
|
336
336
|
}
|
|
337
337
|
.header .title {
|
|
338
|
-
font-size: var(--font-size
|
|
338
|
+
font-size: var(--sui-font-size-large);
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
.footer {
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* @see https://w3c.github.io/aria/#dialog
|
|
7
7
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/
|
|
8
8
|
*/
|
|
9
|
-
export default class Drawer extends
|
|
9
|
+
export default class Drawer extends SvelteComponent<{
|
|
10
10
|
[x: string]: any;
|
|
11
|
+
class?: string;
|
|
11
12
|
title?: string;
|
|
12
13
|
position?: "top" | "right" | "bottom" | "left";
|
|
13
14
|
open?: boolean;
|
|
14
|
-
class?: string;
|
|
15
15
|
size?: "small" | "medium" | "large" | "x-large";
|
|
16
16
|
showClose?: false | "inside" | "outside";
|
|
17
17
|
closeOnBackdropClick?: boolean;
|
|
@@ -32,14 +32,14 @@ export default class Drawer extends SvelteComponentTyped<{
|
|
|
32
32
|
export type DrawerProps = typeof __propDef.props;
|
|
33
33
|
export type DrawerEvents = typeof __propDef.events;
|
|
34
34
|
export type DrawerSlots = typeof __propDef.slots;
|
|
35
|
-
import {
|
|
35
|
+
import { SvelteComponent } from "svelte";
|
|
36
36
|
declare const __propDef: {
|
|
37
37
|
props: {
|
|
38
38
|
[x: string]: any;
|
|
39
|
+
class?: string;
|
|
39
40
|
title?: string;
|
|
40
41
|
position?: ('top' | 'right' | 'bottom' | 'left');
|
|
41
42
|
open?: boolean;
|
|
42
|
-
class?: string;
|
|
43
43
|
size?: ('small' | 'medium' | 'large' | 'x-large');
|
|
44
44
|
showClose?: ('inside' | 'outside' | false);
|
|
45
45
|
closeOnBackdropClick?: boolean;
|