@sveltia/ui 0.2.5 → 0.3.1
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 +3 -2
- package/package/components/{core → button}/button.svelte.d.ts +5 -4
- package/package/components/{composite → button}/select-button-group.svelte +6 -3
- 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 +1 -1
- package/package/components/{composite → checkbox}/checkbox-group.svelte.d.ts +2 -2
- package/package/components/{core → checkbox}/checkbox.svelte +7 -5
- package/package/components/{core → checkbox}/checkbox.svelte.d.ts +4 -2
- package/package/components/{core → dialog}/dialog.svelte +4 -3
- package/package/components/{core → dialog}/dialog.svelte.d.ts +1 -0
- 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 +4 -3
- package/package/components/{core → drawer}/drawer.svelte.d.ts +1 -0
- 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 +2 -0
- 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 +2 -16
- 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 +2 -1
- package/package/components/{composite → menu}/menu.svelte.d.ts +1 -0
- package/package/components/{composite → radio}/radio-group.svelte +6 -2
- package/package/components/{composite → radio}/radio-group.svelte.d.ts +1 -1
- package/package/components/{core → radio}/radio.svelte +6 -4
- package/package/components/{core → radio}/radio.svelte.d.ts +4 -2
- package/package/components/{composite → select}/combobox.svelte +7 -6
- package/package/components/{composite → select}/combobox.svelte.d.ts +3 -2
- 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 +58 -47
- 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 +3 -2
- 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 +6 -5
- package/package/components/{core → tabs}/tab-panel.svelte +1 -0
- package/package/components/{core → tabs}/tab-panel.svelte.d.ts +1 -0
- package/package/components/{core → tabs}/tab.svelte +2 -1
- package/package/components/{core → tabs}/tab.svelte.d.ts +1 -0
- 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 +13 -7
- package/package/components/{core → text-field}/number-input.svelte.d.ts +7 -3
- package/package/components/{core → text-field}/password-input.svelte +6 -3
- 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 +3 -1
- package/package/components/{core → text-field}/text-area.svelte.d.ts +9 -5
- package/package/components/{core → text-field}/text-input.svelte +6 -4
- package/package/components/{core → text-field}/text-input.svelte.d.ts +11 -7
- package/package/components/{core → toolbar}/toolbar.svelte +1 -0
- package/package/components/{core → toolbar}/toolbar.svelte.d.ts +2 -1
- package/package/components/util/app-shell.svelte +11 -40
- 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 +20 -25
- 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 +6 -8
- package/package.json +351 -317
- 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/core/grid-cell.svelte +0 -13
- package/package/components/core/grid-cell.svelte.d.ts +0 -29
- 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 -253
- 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/{composite → button}/select-button-group.svelte.d.ts +4 -4
- /package/package/components/{core → button}/select-button.svelte +0 -0
- /package/package/components/{core → button}/select-button.svelte.d.ts +0 -0
- /package/package/components/{helpers → util}/group.d.ts +0 -0
|
@@ -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
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.
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
<style>.tab-list {
|
|
42
43
|
display: flex;
|
|
43
44
|
align-items: center;
|
|
44
|
-
border-color: var(--
|
|
45
|
+
border-color: var(--control-border-color);
|
|
45
46
|
}
|
|
46
47
|
.tab-list[aria-orientation=horizontal] {
|
|
47
48
|
gap: 16px;
|
|
@@ -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
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: {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
@component
|
|
3
|
+
A tab widget.
|
|
3
4
|
@see https://w3c.github.io/aria/#tab
|
|
4
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.
|
|
@@ -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} />
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} MarkdownEditorProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} MarkdownEditorEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} MarkdownEditorSlots */
|
|
4
|
+
/** A Markdown text editor. */
|
|
5
|
+
export default class MarkdownEditor extends SvelteComponentTyped<{
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
value?: string;
|
|
8
|
+
}, {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
}, {}> {
|
|
11
|
+
}
|
|
12
|
+
export type MarkdownEditorProps = typeof __propDef.props;
|
|
13
|
+
export type MarkdownEditorEvents = typeof __propDef.events;
|
|
14
|
+
export type MarkdownEditorSlots = typeof __propDef.slots;
|
|
15
|
+
import { SvelteComponentTyped } from "svelte";
|
|
16
|
+
declare const __propDef: {
|
|
17
|
+
props: {
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
value?: string | null;
|
|
20
|
+
};
|
|
21
|
+
events: {
|
|
22
|
+
[evt: string]: CustomEvent<any>;
|
|
23
|
+
};
|
|
24
|
+
slots: {};
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
@component
|
|
3
|
+
The equivalent of the HTML `<input type="number">` element.
|
|
4
|
+
@see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number
|
|
3
5
|
@see https://w3c.github.io/aria/#textbox
|
|
4
6
|
-->
|
|
5
7
|
<script>
|
|
6
8
|
import { _ } from 'svelte-i18n';
|
|
7
|
-
import Button from '
|
|
8
|
-
import Icon from '
|
|
9
|
+
import Button from '../button/button.svelte';
|
|
10
|
+
import Icon from '../icon/icon.svelte';
|
|
9
11
|
import TextInput from './text-input.svelte';
|
|
10
12
|
|
|
11
13
|
/**
|
|
@@ -64,13 +66,14 @@
|
|
|
64
66
|
{...$$restProps}
|
|
65
67
|
on:keydown={(event) => {
|
|
66
68
|
const { key, ctrlKey, metaKey, altKey, shiftKey } = event;
|
|
69
|
+
const hasModifier = shiftKey || altKey || ctrlKey || metaKey;
|
|
67
70
|
|
|
68
|
-
if (key === 'ArrowDown' && !
|
|
71
|
+
if (key === 'ArrowDown' && !hasModifier) {
|
|
69
72
|
event.preventDefault();
|
|
70
73
|
decrease();
|
|
71
74
|
}
|
|
72
75
|
|
|
73
|
-
if (key === 'ArrowUp' && !
|
|
76
|
+
if (key === 'ArrowUp' && !hasModifier) {
|
|
74
77
|
event.preventDefault();
|
|
75
78
|
increase();
|
|
76
79
|
}
|
|
@@ -108,13 +111,16 @@
|
|
|
108
111
|
}
|
|
109
112
|
.number-input :global(button) {
|
|
110
113
|
flex: none;
|
|
111
|
-
margin-left: -1px;
|
|
112
114
|
border-width: 1px;
|
|
113
|
-
border-color: var(--
|
|
115
|
+
border-color: var(--control-border-color);
|
|
114
116
|
width: 32px;
|
|
115
117
|
height: var(--input--medium--height);
|
|
116
118
|
}
|
|
117
|
-
.number-input :global(button):
|
|
119
|
+
.number-input :global(button):first-of-type {
|
|
120
|
+
border-radius: 0;
|
|
121
|
+
border-width: 1px 0;
|
|
122
|
+
}
|
|
123
|
+
.number-input :global(button):last-of-type {
|
|
118
124
|
border-radius: 0 4px 4px 0;
|
|
119
125
|
}
|
|
120
126
|
.number-input :global(button) :global(.icon) {
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
/** @typedef {typeof __propDef.props} NumberInputProps */
|
|
2
2
|
/** @typedef {typeof __propDef.events} NumberInputEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} NumberInputSlots */
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* The equivalent of the HTML `<input type="number">` element.
|
|
6
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number
|
|
7
|
+
* @see https://w3c.github.io/aria/#textbox
|
|
8
|
+
*/
|
|
5
9
|
export default class NumberInput extends SvelteComponentTyped<{
|
|
6
10
|
[x: string]: any;
|
|
7
|
-
class?: string;
|
|
8
11
|
disabled?: boolean;
|
|
9
12
|
value?: string;
|
|
13
|
+
class?: string;
|
|
10
14
|
min?: any;
|
|
11
15
|
max?: any;
|
|
12
16
|
step?: number;
|
|
@@ -24,9 +28,9 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
24
28
|
declare const __propDef: {
|
|
25
29
|
props: {
|
|
26
30
|
[x: string]: any;
|
|
27
|
-
class?: string;
|
|
28
31
|
disabled?: boolean;
|
|
29
32
|
value?: string | null;
|
|
33
|
+
class?: string;
|
|
30
34
|
min?: any;
|
|
31
35
|
max?: any;
|
|
32
36
|
step?: number;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
@component
|
|
3
|
+
The equivalent of the HTML `<input type="password">` element, but it comes with the Show/Hide
|
|
4
|
+
button.
|
|
5
|
+
@see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/password
|
|
3
6
|
@see https://w3c.github.io/aria/#textbox
|
|
4
7
|
-->
|
|
5
8
|
<script>
|
|
6
9
|
import { _ } from 'svelte-i18n';
|
|
7
|
-
import Button from '
|
|
8
|
-
import Icon from '
|
|
10
|
+
import Button from '../button/button.svelte';
|
|
11
|
+
import Icon from '../icon/icon.svelte';
|
|
9
12
|
import TextInput from './text-input.svelte';
|
|
10
13
|
|
|
11
14
|
/**
|
|
@@ -69,7 +72,7 @@
|
|
|
69
72
|
flex: none;
|
|
70
73
|
margin-left: -1px;
|
|
71
74
|
border-width: 1px;
|
|
72
|
-
border-color: var(--
|
|
75
|
+
border-color: var(--control-border-color);
|
|
73
76
|
height: var(--input--medium--height);
|
|
74
77
|
aspect-ratio: 1/1;
|
|
75
78
|
}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
/** @typedef {typeof __propDef.props} PasswordInputProps */
|
|
2
2
|
/** @typedef {typeof __propDef.events} PasswordInputEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} PasswordInputSlots */
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* The equivalent of the HTML `<input type="password">` element, but it comes with the Show/Hide
|
|
6
|
+
* button.
|
|
7
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/password
|
|
8
|
+
* @see https://w3c.github.io/aria/#textbox
|
|
9
|
+
*/
|
|
5
10
|
export default class PasswordInput extends SvelteComponentTyped<{
|
|
6
11
|
[x: string]: any;
|
|
7
|
-
class?: string;
|
|
8
12
|
value?: string;
|
|
13
|
+
class?: string;
|
|
9
14
|
}, {
|
|
10
15
|
input: Event;
|
|
11
16
|
keypress: KeyboardEvent;
|
|
@@ -21,8 +26,8 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
21
26
|
declare const __propDef: {
|
|
22
27
|
props: {
|
|
23
28
|
[x: string]: any;
|
|
24
|
-
class?: string;
|
|
25
29
|
value?: string | null;
|
|
30
|
+
class?: string;
|
|
26
31
|
};
|
|
27
32
|
events: {
|
|
28
33
|
input: Event;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
@component
|
|
3
|
+
The equivalent of the HTML `<input type="search">` element. It comes with a magnifier icon and
|
|
4
|
+
clear button.
|
|
5
|
+
@see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/search
|
|
3
6
|
@see https://w3c.github.io/aria/#search
|
|
4
7
|
-->
|
|
5
8
|
<svelte:options accessors={true} />
|
|
6
9
|
|
|
7
10
|
<script>
|
|
8
11
|
import { _ } from 'svelte-i18n';
|
|
9
|
-
import Button from '
|
|
10
|
-
import Icon from '
|
|
12
|
+
import Button from '../button/button.svelte';
|
|
13
|
+
import Icon from '../icon/icon.svelte';
|
|
11
14
|
import TextInput from './text-input.svelte';
|
|
12
15
|
|
|
13
16
|
/**
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
/** @typedef {typeof __propDef.props} SearchBarProps */
|
|
2
2
|
/** @typedef {typeof __propDef.events} SearchBarEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} SearchBarSlots */
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* The equivalent of the HTML `<input type="search">` element. It comes with a magnifier icon and
|
|
6
|
+
* clear button.
|
|
7
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/search
|
|
8
|
+
* @see https://w3c.github.io/aria/#search
|
|
9
|
+
*/
|
|
5
10
|
export default class SearchBar extends SvelteComponentTyped<{
|
|
6
11
|
[x: string]: any;
|
|
7
12
|
focus?: () => void;
|
|
8
|
-
class?: string;
|
|
9
13
|
value?: string;
|
|
14
|
+
class?: string;
|
|
10
15
|
}, {
|
|
11
16
|
input: Event;
|
|
12
17
|
keydown: KeyboardEvent;
|
|
@@ -32,8 +37,8 @@ declare const __propDef: {
|
|
|
32
37
|
props: {
|
|
33
38
|
[x: string]: any;
|
|
34
39
|
focus?: () => void;
|
|
35
|
-
class?: string;
|
|
36
40
|
value?: string;
|
|
41
|
+
class?: string;
|
|
37
42
|
};
|
|
38
43
|
events: {
|
|
39
44
|
input: Event;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
@component
|
|
3
|
+
A multi-line text field. The equivalent of the HTML `<textarea>` element.
|
|
4
|
+
@see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
|
|
3
5
|
@see https://w3c.github.io/aria/#textbox
|
|
4
6
|
-->
|
|
5
7
|
<svelte:options accessors={true} />
|
|
@@ -101,7 +103,7 @@ textarea {
|
|
|
101
103
|
display: block;
|
|
102
104
|
margin: 0;
|
|
103
105
|
border-width: 1px;
|
|
104
|
-
border-color: var(--
|
|
106
|
+
border-color: var(--control-border-color);
|
|
105
107
|
border-radius: var(--input--medium--border-radius);
|
|
106
108
|
background-color: var(--control-background-color);
|
|
107
109
|
padding: 8px;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
/** @typedef {typeof __propDef.props} TextAreaProps */
|
|
2
2
|
/** @typedef {typeof __propDef.events} TextAreaEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} TextAreaSlots */
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* A multi-line text field. The equivalent of the HTML `<textarea>` element.
|
|
6
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
|
|
7
|
+
* @see https://w3c.github.io/aria/#textbox
|
|
8
|
+
*/
|
|
5
9
|
export default class TextArea extends SvelteComponentTyped<{
|
|
6
10
|
[x: string]: any;
|
|
7
|
-
class?: string;
|
|
8
|
-
element?: HTMLTextAreaElement;
|
|
9
11
|
name?: string;
|
|
10
12
|
value?: string;
|
|
13
|
+
class?: string;
|
|
14
|
+
element?: HTMLTextAreaElement;
|
|
11
15
|
autoResize?: boolean;
|
|
12
16
|
}, {
|
|
13
17
|
click: MouseEvent;
|
|
@@ -39,10 +43,10 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
39
43
|
declare const __propDef: {
|
|
40
44
|
props: {
|
|
41
45
|
[x: string]: any;
|
|
42
|
-
class?: string;
|
|
43
|
-
element?: HTMLTextAreaElement | null;
|
|
44
46
|
name?: string;
|
|
45
47
|
value?: string | null;
|
|
48
|
+
class?: string;
|
|
49
|
+
element?: HTMLTextAreaElement | null;
|
|
46
50
|
autoResize?: boolean;
|
|
47
51
|
};
|
|
48
52
|
events: {
|