@sveltia/ui 0.2.4 → 0.3.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/{core → button}/button.svelte +2 -1
- package/package/components/{core → button}/button.svelte.d.ts +6 -5
- package/package/components/{composite → button}/select-button-group.svelte +8 -5
- package/package/components/{composite → button}/select-button-group.svelte.d.ts +6 -6
- package/package/components/{core → button}/select-button.svelte +2 -2
- package/package/components/{core → button}/select-button.svelte.d.ts +2 -2
- package/package/components/{composite → calendar}/calendar.svelte +9 -5
- package/package/components/{composite → calendar}/calendar.svelte.d.ts +1 -0
- package/package/components/{composite → checkbox}/checkbox-group.svelte +3 -2
- package/package/components/{composite → checkbox}/checkbox-group.svelte.d.ts +2 -2
- package/package/components/{core → checkbox}/checkbox.svelte +38 -17
- package/package/components/{core → checkbox}/checkbox.svelte.d.ts +7 -3
- package/package/components/{core → dialog}/dialog.svelte +5 -4
- package/package/components/{core → dialog}/dialog.svelte.d.ts +2 -1
- package/package/components/{composite → disclosure}/disclosure.svelte +5 -4
- package/package/components/{composite → disclosure}/disclosure.svelte.d.ts +2 -1
- package/package/components/{core/separator.svelte → divider/divider.svelte} +5 -4
- package/package/components/divider/divider.svelte.d.ts +29 -0
- package/package/components/{core → divider}/spacer.svelte +4 -0
- package/package/components/{core → divider}/spacer.svelte.d.ts +1 -0
- package/package/components/{core → drawer}/drawer.svelte +5 -4
- package/package/components/{core → drawer}/drawer.svelte.d.ts +2 -1
- package/package/components/{core → icon}/icon.svelte +5 -0
- package/package/components/{core → icon}/icon.svelte.d.ts +6 -2
- package/package/components/listbox/listbox.svelte +74 -0
- package/package/components/{composite → listbox}/listbox.svelte.d.ts +3 -1
- package/package/components/listbox/option-group.svelte +47 -0
- package/package/components/listbox/option-group.svelte.d.ts +38 -0
- package/package/components/{core → listbox}/option.svelte +34 -2
- package/package/components/{core → listbox}/option.svelte.d.ts +7 -3
- package/package/components/{core → menu}/menu-button.svelte +3 -17
- package/package/components/{core → menu}/menu-button.svelte.d.ts +4 -1
- package/package/components/{core → menu}/menu-item-checkbox.svelte +1 -0
- package/package/components/{core → menu}/menu-item-checkbox.svelte.d.ts +4 -1
- package/package/components/{composite → menu}/menu-item-group.svelte +5 -1
- package/package/components/{composite → menu}/menu-item-group.svelte.d.ts +1 -0
- package/package/components/{core → menu}/menu-item-radio.svelte +2 -0
- package/package/components/{core → menu}/menu-item-radio.svelte.d.ts +5 -1
- package/package/components/{core → menu}/menu-item.svelte +6 -6
- package/package/components/{core → menu}/menu-item.svelte.d.ts +4 -1
- package/package/components/{composite → menu}/menu.svelte +3 -2
- package/package/components/{composite → menu}/menu.svelte.d.ts +2 -1
- package/package/components/{composite/radio-button-group.svelte → radio/radio-group.svelte} +15 -10
- package/package/components/radio/radio-group.svelte.d.ts +40 -0
- package/package/components/{core/radio-button.svelte → radio/radio.svelte} +45 -18
- package/package/components/radio/radio.svelte.d.ts +43 -0
- package/package/components/{composite → select}/combobox.svelte +7 -6
- package/package/components/{composite → select}/combobox.svelte.d.ts +4 -3
- package/package/components/{composite → select}/select.svelte +3 -1
- package/package/components/{composite → select}/select.svelte.d.ts +7 -3
- package/package/components/{core → slider}/slider.svelte +82 -57
- package/package/components/{core → slider}/slider.svelte.d.ts +12 -10
- package/package/components/{core → switch}/switch.svelte +36 -19
- package/package/components/{core → switch}/switch.svelte.d.ts +4 -3
- package/package/components/table/table-body.svelte +23 -0
- package/package/components/table/table-body.svelte.d.ts +34 -0
- package/package/components/table/table-cell.svelte +23 -0
- package/package/components/table/table-cell.svelte.d.ts +34 -0
- package/package/components/table/table-col-header.svelte +23 -0
- package/package/components/table/table-col-header.svelte.d.ts +34 -0
- package/package/components/table/table-foot.svelte +23 -0
- package/package/components/table/table-foot.svelte.d.ts +34 -0
- package/package/components/table/table-head.svelte +23 -0
- package/package/components/table/table-head.svelte.d.ts +34 -0
- package/package/components/table/table-row-header.svelte +23 -0
- package/package/components/table/table-row-header.svelte.d.ts +34 -0
- package/package/components/table/table-row.svelte +23 -0
- package/package/components/table/table-row.svelte.d.ts +38 -0
- package/package/components/table/table.svelte +44 -0
- package/package/components/table/table.svelte.d.ts +36 -0
- package/package/components/{composite → tabs}/tab-list.svelte +3 -2
- package/package/components/{composite → tabs}/tab-list.svelte.d.ts +7 -6
- package/package/components/{core → tabs}/tab-panel.svelte +2 -1
- package/package/components/{core → tabs}/tab-panel.svelte.d.ts +2 -1
- package/package/components/{core → tabs}/tab.svelte +3 -2
- package/package/components/{core → tabs}/tab.svelte.d.ts +2 -1
- package/package/components/{editor/markdown.svelte → text-field/markdown-editor.svelte} +10 -6
- package/package/components/text-field/markdown-editor.svelte.d.ts +26 -0
- package/package/components/{core → text-field}/number-input.svelte +22 -12
- package/package/components/{core → text-field}/number-input.svelte.d.ts +7 -3
- package/package/components/{core → text-field}/password-input.svelte +5 -2
- package/package/components/{core → text-field}/password-input.svelte.d.ts +8 -3
- package/package/components/{core → text-field}/search-bar.svelte +5 -2
- package/package/components/{core → text-field}/search-bar.svelte.d.ts +8 -3
- package/package/components/{core → text-field}/text-area.svelte +2 -0
- package/package/components/{core → text-field}/text-area.svelte.d.ts +9 -5
- package/package/components/{core → text-field}/text-input.svelte +3 -1
- package/package/components/{core → text-field}/text-input.svelte.d.ts +11 -7
- package/package/components/{core → toolbar}/toolbar.svelte +2 -1
- package/package/components/{core → toolbar}/toolbar.svelte.d.ts +3 -2
- package/package/components/util/app-shell.svelte +10 -36
- package/package/components/util/group.js +305 -0
- package/package/components/{core → util}/group.svelte +5 -11
- package/package/components/{core → util}/group.svelte.d.ts +4 -2
- package/package/components/util/popup.d.ts +30 -0
- package/package/components/{helpers → util}/popup.js +36 -26
- package/package/components/util/popup.svelte +14 -5
- package/package/components/util/{misc.d.ts → util.d.ts} +1 -0
- package/package/components/util/{misc.js → util.js} +15 -0
- package/package/index.d.ts +46 -41
- package/package/index.js +48 -83
- package/package/styles/core.scss +5 -34
- package/package/styles/variables.scss +5 -4
- package/package.json +362 -328
- package/package/components/composite/grid.svelte +0 -24
- package/package/components/composite/grid.svelte.d.ts +0 -31
- package/package/components/composite/listbox.svelte +0 -63
- package/package/components/composite/radio-button-group.svelte.d.ts +0 -36
- package/package/components/core/grid-cell.svelte +0 -13
- package/package/components/core/grid-cell.svelte.d.ts +0 -29
- package/package/components/core/radio-button.svelte.d.ts +0 -37
- package/package/components/core/row-group.svelte +0 -13
- package/package/components/core/row-group.svelte.d.ts +0 -29
- package/package/components/core/row.svelte +0 -13
- package/package/components/core/row.svelte.d.ts +0 -33
- package/package/components/core/separator.svelte.d.ts +0 -26
- package/package/components/editor/markdown.svelte.d.ts +0 -25
- package/package/components/helpers/group.js +0 -251
- package/package/components/helpers/popup.d.ts +0 -30
- package/package/components/helpers/util.d.ts +0 -1
- package/package/components/helpers/util.js +0 -14
- /package/package/components/{helpers → util}/group.d.ts +0 -0
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
/** @typedef {typeof __propDef.events} SwitchEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} SwitchSlots */
|
|
4
4
|
/**
|
|
5
|
+
* A variant of `<Checkbox>`, looking like a switch that can be often seen on mobile apps.
|
|
5
6
|
* @see https://w3c.github.io/aria/#switch
|
|
6
|
-
* @see https://
|
|
7
|
+
* @see https://www.w3.org/WAI/ARIA/apg/patterns/switch/
|
|
7
8
|
*/
|
|
8
9
|
export default class Switch extends SvelteComponentTyped<{
|
|
9
10
|
label?: string;
|
|
10
|
-
class?: string;
|
|
11
11
|
disabled?: boolean;
|
|
12
|
+
class?: string;
|
|
12
13
|
checked?: boolean;
|
|
13
14
|
}, {
|
|
14
15
|
[evt: string]: CustomEvent<any>;
|
|
@@ -23,8 +24,8 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
23
24
|
declare const __propDef: {
|
|
24
25
|
props: {
|
|
25
26
|
label?: string;
|
|
26
|
-
class?: string;
|
|
27
27
|
disabled?: boolean;
|
|
28
|
+
class?: string;
|
|
28
29
|
checked?: boolean;
|
|
29
30
|
};
|
|
30
31
|
events: {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
The equivalent of the HTML `<tbody>` element.
|
|
4
|
+
@see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody
|
|
5
|
+
@see https://w3c.github.io/aria/#rowgroup
|
|
6
|
+
-->
|
|
7
|
+
<script>
|
|
8
|
+
/**
|
|
9
|
+
* CSS class name on the button.
|
|
10
|
+
* @type {string}
|
|
11
|
+
*/
|
|
12
|
+
let className = '';
|
|
13
|
+
|
|
14
|
+
export { className as class };
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<div role="rowgroup" class="sui table-body {className}" {...$$restProps}>
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<style>.table-body {
|
|
22
|
+
display: table-row-group;
|
|
23
|
+
}</style>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} TableBodyProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} TableBodyEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} TableBodySlots */
|
|
4
|
+
/**
|
|
5
|
+
* The equivalent of the HTML `<tbody>` element.
|
|
6
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody
|
|
7
|
+
* @see https://w3c.github.io/aria/#rowgroup
|
|
8
|
+
*/
|
|
9
|
+
export default class TableBody extends SvelteComponentTyped<{
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
class?: string;
|
|
12
|
+
}, {
|
|
13
|
+
[evt: string]: CustomEvent<any>;
|
|
14
|
+
}, {
|
|
15
|
+
default: {};
|
|
16
|
+
}> {
|
|
17
|
+
}
|
|
18
|
+
export type TableBodyProps = typeof __propDef.props;
|
|
19
|
+
export type TableBodyEvents = typeof __propDef.events;
|
|
20
|
+
export type TableBodySlots = typeof __propDef.slots;
|
|
21
|
+
import { SvelteComponentTyped } from "svelte";
|
|
22
|
+
declare const __propDef: {
|
|
23
|
+
props: {
|
|
24
|
+
[x: string]: any;
|
|
25
|
+
class?: string;
|
|
26
|
+
};
|
|
27
|
+
events: {
|
|
28
|
+
[evt: string]: CustomEvent<any>;
|
|
29
|
+
};
|
|
30
|
+
slots: {
|
|
31
|
+
default: {};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
The equivalent of the HTML `<td>` element.
|
|
4
|
+
@see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td
|
|
5
|
+
@see https://w3c.github.io/aria/#gridcell
|
|
6
|
+
-->
|
|
7
|
+
<script>
|
|
8
|
+
/**
|
|
9
|
+
* CSS class name on the button.
|
|
10
|
+
* @type {string}
|
|
11
|
+
*/
|
|
12
|
+
let className = '';
|
|
13
|
+
|
|
14
|
+
export { className as class };
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<div role="gridcell" class="sui table-cell {className}" {...$$restProps}>
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<style>.table-cell {
|
|
22
|
+
display: table-cell;
|
|
23
|
+
}</style>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} TableCellProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} TableCellEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} TableCellSlots */
|
|
4
|
+
/**
|
|
5
|
+
* The equivalent of the HTML `<td>` element.
|
|
6
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td
|
|
7
|
+
* @see https://w3c.github.io/aria/#gridcell
|
|
8
|
+
*/
|
|
9
|
+
export default class TableCell extends SvelteComponentTyped<{
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
class?: string;
|
|
12
|
+
}, {
|
|
13
|
+
[evt: string]: CustomEvent<any>;
|
|
14
|
+
}, {
|
|
15
|
+
default: {};
|
|
16
|
+
}> {
|
|
17
|
+
}
|
|
18
|
+
export type TableCellProps = typeof __propDef.props;
|
|
19
|
+
export type TableCellEvents = typeof __propDef.events;
|
|
20
|
+
export type TableCellSlots = typeof __propDef.slots;
|
|
21
|
+
import { SvelteComponentTyped } from "svelte";
|
|
22
|
+
declare const __propDef: {
|
|
23
|
+
props: {
|
|
24
|
+
[x: string]: any;
|
|
25
|
+
class?: string;
|
|
26
|
+
};
|
|
27
|
+
events: {
|
|
28
|
+
[evt: string]: CustomEvent<any>;
|
|
29
|
+
};
|
|
30
|
+
slots: {
|
|
31
|
+
default: {};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
The equivalent of the HTML `<th scope="col">` element.
|
|
4
|
+
@see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th
|
|
5
|
+
@see https://w3c.github.io/aria/#columnheader
|
|
6
|
+
-->
|
|
7
|
+
<script>
|
|
8
|
+
/**
|
|
9
|
+
* CSS class name on the button.
|
|
10
|
+
* @type {string}
|
|
11
|
+
*/
|
|
12
|
+
let className = '';
|
|
13
|
+
|
|
14
|
+
export { className as class };
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<div role="columnheader" class="sui table-col-header {className}" {...$$restProps}>
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<style>.table-col-header {
|
|
22
|
+
display: table-cell;
|
|
23
|
+
}</style>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} TableColHeaderProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} TableColHeaderEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} TableColHeaderSlots */
|
|
4
|
+
/**
|
|
5
|
+
* The equivalent of the HTML `<th scope="col">` element.
|
|
6
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th
|
|
7
|
+
* @see https://w3c.github.io/aria/#columnheader
|
|
8
|
+
*/
|
|
9
|
+
export default class TableColHeader extends SvelteComponentTyped<{
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
class?: string;
|
|
12
|
+
}, {
|
|
13
|
+
[evt: string]: CustomEvent<any>;
|
|
14
|
+
}, {
|
|
15
|
+
default: {};
|
|
16
|
+
}> {
|
|
17
|
+
}
|
|
18
|
+
export type TableColHeaderProps = typeof __propDef.props;
|
|
19
|
+
export type TableColHeaderEvents = typeof __propDef.events;
|
|
20
|
+
export type TableColHeaderSlots = typeof __propDef.slots;
|
|
21
|
+
import { SvelteComponentTyped } from "svelte";
|
|
22
|
+
declare const __propDef: {
|
|
23
|
+
props: {
|
|
24
|
+
[x: string]: any;
|
|
25
|
+
class?: string;
|
|
26
|
+
};
|
|
27
|
+
events: {
|
|
28
|
+
[evt: string]: CustomEvent<any>;
|
|
29
|
+
};
|
|
30
|
+
slots: {
|
|
31
|
+
default: {};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
The equivalent of the HTML `<tfoot>` element.
|
|
4
|
+
@see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot
|
|
5
|
+
@see https://w3c.github.io/aria/#rowgroup
|
|
6
|
+
-->
|
|
7
|
+
<script>
|
|
8
|
+
/**
|
|
9
|
+
* CSS class name on the button.
|
|
10
|
+
* @type {string}
|
|
11
|
+
*/
|
|
12
|
+
let className = '';
|
|
13
|
+
|
|
14
|
+
export { className as class };
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<div role="rowgroup" class="sui table-foot {className}" {...$$restProps}>
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<style>.table-foot {
|
|
22
|
+
display: table-footer-group;
|
|
23
|
+
}</style>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} TableFootProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} TableFootEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} TableFootSlots */
|
|
4
|
+
/**
|
|
5
|
+
* The equivalent of the HTML `<tfoot>` element.
|
|
6
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot
|
|
7
|
+
* @see https://w3c.github.io/aria/#rowgroup
|
|
8
|
+
*/
|
|
9
|
+
export default class TableFoot extends SvelteComponentTyped<{
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
class?: string;
|
|
12
|
+
}, {
|
|
13
|
+
[evt: string]: CustomEvent<any>;
|
|
14
|
+
}, {
|
|
15
|
+
default: {};
|
|
16
|
+
}> {
|
|
17
|
+
}
|
|
18
|
+
export type TableFootProps = typeof __propDef.props;
|
|
19
|
+
export type TableFootEvents = typeof __propDef.events;
|
|
20
|
+
export type TableFootSlots = typeof __propDef.slots;
|
|
21
|
+
import { SvelteComponentTyped } from "svelte";
|
|
22
|
+
declare const __propDef: {
|
|
23
|
+
props: {
|
|
24
|
+
[x: string]: any;
|
|
25
|
+
class?: string;
|
|
26
|
+
};
|
|
27
|
+
events: {
|
|
28
|
+
[evt: string]: CustomEvent<any>;
|
|
29
|
+
};
|
|
30
|
+
slots: {
|
|
31
|
+
default: {};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
The equivalent of the HTML `<thead>` element.
|
|
4
|
+
@see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead
|
|
5
|
+
@see https://w3c.github.io/aria/#rowgroup
|
|
6
|
+
-->
|
|
7
|
+
<script>
|
|
8
|
+
/**
|
|
9
|
+
* CSS class name on the button.
|
|
10
|
+
* @type {string}
|
|
11
|
+
*/
|
|
12
|
+
let className = '';
|
|
13
|
+
|
|
14
|
+
export { className as class };
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<div role="rowgroup" class="sui table-head {className}" {...$$restProps}>
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<style>.table-head {
|
|
22
|
+
display: table-header-group;
|
|
23
|
+
}</style>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} TableHeadProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} TableHeadEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} TableHeadSlots */
|
|
4
|
+
/**
|
|
5
|
+
* The equivalent of the HTML `<thead>` element.
|
|
6
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead
|
|
7
|
+
* @see https://w3c.github.io/aria/#rowgroup
|
|
8
|
+
*/
|
|
9
|
+
export default class TableHead extends SvelteComponentTyped<{
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
class?: string;
|
|
12
|
+
}, {
|
|
13
|
+
[evt: string]: CustomEvent<any>;
|
|
14
|
+
}, {
|
|
15
|
+
default: {};
|
|
16
|
+
}> {
|
|
17
|
+
}
|
|
18
|
+
export type TableHeadProps = typeof __propDef.props;
|
|
19
|
+
export type TableHeadEvents = typeof __propDef.events;
|
|
20
|
+
export type TableHeadSlots = typeof __propDef.slots;
|
|
21
|
+
import { SvelteComponentTyped } from "svelte";
|
|
22
|
+
declare const __propDef: {
|
|
23
|
+
props: {
|
|
24
|
+
[x: string]: any;
|
|
25
|
+
class?: string;
|
|
26
|
+
};
|
|
27
|
+
events: {
|
|
28
|
+
[evt: string]: CustomEvent<any>;
|
|
29
|
+
};
|
|
30
|
+
slots: {
|
|
31
|
+
default: {};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
The equivalent of the HTML `<th scope="row">` element.
|
|
4
|
+
@see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th
|
|
5
|
+
@see https://w3c.github.io/aria/#rowheader
|
|
6
|
+
-->
|
|
7
|
+
<script>
|
|
8
|
+
/**
|
|
9
|
+
* CSS class name on the button.
|
|
10
|
+
* @type {string}
|
|
11
|
+
*/
|
|
12
|
+
let className = '';
|
|
13
|
+
|
|
14
|
+
export { className as class };
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<div role="rowheader" class="sui table-row-header {className}" {...$$restProps}>
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<style>.table-row-header {
|
|
22
|
+
display: table-cell;
|
|
23
|
+
}</style>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} TableRowHeaderProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} TableRowHeaderEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} TableRowHeaderSlots */
|
|
4
|
+
/**
|
|
5
|
+
* The equivalent of the HTML `<th scope="row">` element.
|
|
6
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th
|
|
7
|
+
* @see https://w3c.github.io/aria/#rowheader
|
|
8
|
+
*/
|
|
9
|
+
export default class TableRowHeader extends SvelteComponentTyped<{
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
class?: string;
|
|
12
|
+
}, {
|
|
13
|
+
[evt: string]: CustomEvent<any>;
|
|
14
|
+
}, {
|
|
15
|
+
default: {};
|
|
16
|
+
}> {
|
|
17
|
+
}
|
|
18
|
+
export type TableRowHeaderProps = typeof __propDef.props;
|
|
19
|
+
export type TableRowHeaderEvents = typeof __propDef.events;
|
|
20
|
+
export type TableRowHeaderSlots = typeof __propDef.slots;
|
|
21
|
+
import { SvelteComponentTyped } from "svelte";
|
|
22
|
+
declare const __propDef: {
|
|
23
|
+
props: {
|
|
24
|
+
[x: string]: any;
|
|
25
|
+
class?: string;
|
|
26
|
+
};
|
|
27
|
+
events: {
|
|
28
|
+
[evt: string]: CustomEvent<any>;
|
|
29
|
+
};
|
|
30
|
+
slots: {
|
|
31
|
+
default: {};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
The equivalent of the HTML `<tr>` element.
|
|
4
|
+
@see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr
|
|
5
|
+
@see https://w3c.github.io/aria/#row
|
|
6
|
+
-->
|
|
7
|
+
<script>
|
|
8
|
+
/**
|
|
9
|
+
* CSS class name on the button.
|
|
10
|
+
* @type {string}
|
|
11
|
+
*/
|
|
12
|
+
let className = '';
|
|
13
|
+
|
|
14
|
+
export { className as class };
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<div role="row" tabindex="0" class="sui table-row {className}" {...$$restProps} on:click>
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<style>.table-row {
|
|
22
|
+
display: table-row;
|
|
23
|
+
}</style>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} TableRowProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} TableRowEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} TableRowSlots */
|
|
4
|
+
/**
|
|
5
|
+
* The equivalent of the HTML `<tr>` element.
|
|
6
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr
|
|
7
|
+
* @see https://w3c.github.io/aria/#row
|
|
8
|
+
*/
|
|
9
|
+
export default class TableRow extends SvelteComponentTyped<{
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
class?: string;
|
|
12
|
+
}, {
|
|
13
|
+
click: MouseEvent;
|
|
14
|
+
} & {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {
|
|
17
|
+
default: {};
|
|
18
|
+
}> {
|
|
19
|
+
}
|
|
20
|
+
export type TableRowProps = typeof __propDef.props;
|
|
21
|
+
export type TableRowEvents = typeof __propDef.events;
|
|
22
|
+
export type TableRowSlots = typeof __propDef.slots;
|
|
23
|
+
import { SvelteComponentTyped } from "svelte";
|
|
24
|
+
declare const __propDef: {
|
|
25
|
+
props: {
|
|
26
|
+
[x: string]: any;
|
|
27
|
+
class?: string;
|
|
28
|
+
};
|
|
29
|
+
events: {
|
|
30
|
+
click: MouseEvent;
|
|
31
|
+
} & {
|
|
32
|
+
[evt: string]: CustomEvent<any>;
|
|
33
|
+
};
|
|
34
|
+
slots: {
|
|
35
|
+
default: {};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
The equivalent of the HTML `<table>` element.
|
|
4
|
+
@see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table
|
|
5
|
+
@see https://w3c.github.io/aria/#grid
|
|
6
|
+
-->
|
|
7
|
+
<script>
|
|
8
|
+
import { activateGroup } from '../util/group';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* CSS class name on the button.
|
|
12
|
+
* @type {string}
|
|
13
|
+
*/
|
|
14
|
+
let className = '';
|
|
15
|
+
|
|
16
|
+
export { className as class };
|
|
17
|
+
|
|
18
|
+
/** @type {HTMLElement?} */
|
|
19
|
+
export let element = undefined;
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<div
|
|
23
|
+
role="grid"
|
|
24
|
+
class="sui table {className}"
|
|
25
|
+
{...$$restProps}
|
|
26
|
+
bind:this={element}
|
|
27
|
+
use:activateGroup
|
|
28
|
+
>
|
|
29
|
+
<slot />
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<style>.table {
|
|
33
|
+
display: table;
|
|
34
|
+
width: 100%;
|
|
35
|
+
}
|
|
36
|
+
.table:global(.data) {
|
|
37
|
+
border-collapse: collapse;
|
|
38
|
+
}
|
|
39
|
+
.table:global(.data) :global(.table-col-header),
|
|
40
|
+
.table:global(.data) :global(.table-row-header),
|
|
41
|
+
.table:global(.data) :global(.table-cell) {
|
|
42
|
+
border: 1px solid var(--secondary-border-color);
|
|
43
|
+
padding: 8px 8px;
|
|
44
|
+
}</style>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} TableProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} TableEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} TableSlots */
|
|
4
|
+
/**
|
|
5
|
+
* The equivalent of the HTML `<table>` element.
|
|
6
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table
|
|
7
|
+
* @see https://w3c.github.io/aria/#grid
|
|
8
|
+
*/
|
|
9
|
+
export default class Table extends SvelteComponentTyped<{
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
class?: string;
|
|
12
|
+
element?: HTMLElement;
|
|
13
|
+
}, {
|
|
14
|
+
[evt: string]: CustomEvent<any>;
|
|
15
|
+
}, {
|
|
16
|
+
default: {};
|
|
17
|
+
}> {
|
|
18
|
+
}
|
|
19
|
+
export type TableProps = typeof __propDef.props;
|
|
20
|
+
export type TableEvents = typeof __propDef.events;
|
|
21
|
+
export type TableSlots = typeof __propDef.slots;
|
|
22
|
+
import { SvelteComponentTyped } from "svelte";
|
|
23
|
+
declare const __propDef: {
|
|
24
|
+
props: {
|
|
25
|
+
[x: string]: any;
|
|
26
|
+
class?: string;
|
|
27
|
+
element?: HTMLElement | null;
|
|
28
|
+
};
|
|
29
|
+
events: {
|
|
30
|
+
[evt: string]: CustomEvent<any>;
|
|
31
|
+
};
|
|
32
|
+
slots: {
|
|
33
|
+
default: {};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
@component
|
|
3
|
+
A tab list widget.
|
|
3
4
|
@see https://w3c.github.io/aria/#tablist
|
|
4
|
-
@see https://
|
|
5
|
+
@see https://www.w3.org/WAI/ARIA/apg/patterns/tabs/
|
|
5
6
|
-->
|
|
6
7
|
<svelte:options accessors={true} />
|
|
7
8
|
|
|
8
9
|
<script>
|
|
9
|
-
import { activateGroup } from '../
|
|
10
|
+
import { activateGroup } from '../util/group';
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* CSS class name on the button.
|
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
/** @typedef {typeof __propDef.events} TabListEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} TabListSlots */
|
|
4
4
|
/**
|
|
5
|
+
* A tab list widget.
|
|
5
6
|
* @see https://w3c.github.io/aria/#tablist
|
|
6
|
-
* @see https://
|
|
7
|
+
* @see https://www.w3.org/WAI/ARIA/apg/patterns/tabs/
|
|
7
8
|
*/
|
|
8
9
|
export default class TabList extends SvelteComponentTyped<{
|
|
9
10
|
[x: string]: any;
|
|
11
|
+
name?: string;
|
|
10
12
|
class?: string;
|
|
11
13
|
element?: HTMLElement;
|
|
12
|
-
|
|
13
|
-
orientation?: "horizontal" | "vertical";
|
|
14
|
+
orientation?: "vertical" | "horizontal";
|
|
14
15
|
}, {
|
|
15
16
|
select: Event;
|
|
16
17
|
} & {
|
|
@@ -25,8 +26,8 @@ export default class TabList extends SvelteComponentTyped<{
|
|
|
25
26
|
set element(arg: HTMLElement);
|
|
26
27
|
get element(): HTMLElement;
|
|
27
28
|
/**accessor*/
|
|
28
|
-
set orientation(arg: "
|
|
29
|
-
get orientation(): "
|
|
29
|
+
set orientation(arg: "vertical" | "horizontal");
|
|
30
|
+
get orientation(): "vertical" | "horizontal";
|
|
30
31
|
/**accessor*/
|
|
31
32
|
set name(arg: string);
|
|
32
33
|
get name(): string;
|
|
@@ -38,9 +39,9 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
38
39
|
declare const __propDef: {
|
|
39
40
|
props: {
|
|
40
41
|
[x: string]: any;
|
|
42
|
+
name?: string;
|
|
41
43
|
class?: string;
|
|
42
44
|
element?: HTMLElement | null;
|
|
43
|
-
name?: string;
|
|
44
45
|
orientation?: ('horizontal' | 'vertical');
|
|
45
46
|
};
|
|
46
47
|
events: {
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
/** @typedef {typeof __propDef.events} TabPanelEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} TabPanelSlots */
|
|
4
4
|
/**
|
|
5
|
+
* A tab content panel.
|
|
5
6
|
* @see https://w3c.github.io/aria/#tabpanel
|
|
6
|
-
* @see https://
|
|
7
|
+
* @see https://www.w3.org/WAI/ARIA/apg/patterns/tabs/
|
|
7
8
|
*/
|
|
8
9
|
export default class TabPanel extends SvelteComponentTyped<{
|
|
9
10
|
[x: string]: any;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
@component
|
|
3
|
+
A tab widget.
|
|
3
4
|
@see https://w3c.github.io/aria/#tab
|
|
4
|
-
@see https://
|
|
5
|
+
@see https://www.w3.org/WAI/ARIA/apg/patterns/tabs/
|
|
5
6
|
-->
|
|
6
7
|
<script>
|
|
7
|
-
import Button from '
|
|
8
|
+
import Button from '../button/button.svelte';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* CSS class name on the button.
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
/** @typedef {typeof __propDef.events} TabEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} TabSlots */
|
|
4
4
|
/**
|
|
5
|
+
* A tab widget.
|
|
5
6
|
* @see https://w3c.github.io/aria/#tab
|
|
6
|
-
* @see https://
|
|
7
|
+
* @see https://www.w3.org/WAI/ARIA/apg/patterns/tabs/
|
|
7
8
|
*/
|
|
8
9
|
export default class Tab extends SvelteComponentTyped<{
|
|
9
10
|
[x: string]: any;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
A Markdown text editor.
|
|
4
|
+
-->
|
|
1
5
|
<script>
|
|
2
6
|
import { _ } from 'svelte-i18n';
|
|
3
|
-
import Button from '../
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
7
|
+
import Button from '../button/button.svelte';
|
|
8
|
+
import Divider from '../divider/divider.svelte';
|
|
9
|
+
import Icon from '../icon/icon.svelte';
|
|
10
|
+
import Toolbar from '../toolbar/toolbar.svelte';
|
|
11
|
+
import TextArea from './text-area.svelte';
|
|
8
12
|
|
|
9
13
|
/** @type {string?} */
|
|
10
14
|
export let value = undefined;
|
|
@@ -46,7 +50,7 @@
|
|
|
46
50
|
<Toolbar aria-label={$_('_sui.markdown_editor.markdown_editor')}>
|
|
47
51
|
{#each defaultButtons as { label, icon, separator }}
|
|
48
52
|
{#if separator}
|
|
49
|
-
<
|
|
53
|
+
<Divider />
|
|
50
54
|
{:else}
|
|
51
55
|
<Button {disabled}>
|
|
52
56
|
<Icon slot="start-icon" name={icon} {label} />
|