@sveltia/ui 0.1.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.
Files changed (104) hide show
  1. package/LICENSE.txt +21 -0
  2. package/package/components/composite/calendar.svelte +240 -0
  3. package/package/components/composite/calendar.svelte.d.ts +27 -0
  4. package/package/components/composite/checkbox-group.svelte +43 -0
  5. package/package/components/composite/checkbox-group.svelte.d.ts +34 -0
  6. package/package/components/composite/combobox.svelte +179 -0
  7. package/package/components/composite/combobox.svelte.d.ts +47 -0
  8. package/package/components/composite/disclosure.svelte +60 -0
  9. package/package/components/composite/disclosure.svelte.d.ts +35 -0
  10. package/package/components/composite/grid.svelte +24 -0
  11. package/package/components/composite/grid.svelte.d.ts +31 -0
  12. package/package/components/composite/listbox.svelte +63 -0
  13. package/package/components/composite/listbox.svelte.d.ts +52 -0
  14. package/package/components/composite/menu-item-group.svelte +31 -0
  15. package/package/components/composite/menu-item-group.svelte.d.ts +33 -0
  16. package/package/components/composite/menu.svelte +44 -0
  17. package/package/components/composite/menu.svelte.d.ts +41 -0
  18. package/package/components/composite/radio-button-group.svelte +44 -0
  19. package/package/components/composite/radio-button-group.svelte.d.ts +36 -0
  20. package/package/components/composite/select-button-group.svelte +69 -0
  21. package/package/components/composite/select-button-group.svelte.d.ts +44 -0
  22. package/package/components/composite/select.svelte +34 -0
  23. package/package/components/composite/select.svelte.d.ts +38 -0
  24. package/package/components/composite/tab-list.svelte +76 -0
  25. package/package/components/composite/tab-list.svelte.d.ts +55 -0
  26. package/package/components/core/button.svelte +209 -0
  27. package/package/components/core/button.svelte.d.ts +113 -0
  28. package/package/components/core/checkbox.svelte +105 -0
  29. package/package/components/core/checkbox.svelte.d.ts +43 -0
  30. package/package/components/core/dialog.svelte +258 -0
  31. package/package/components/core/dialog.svelte.d.ts +73 -0
  32. package/package/components/core/grid-cell.svelte +14 -0
  33. package/package/components/core/grid-cell.svelte.d.ts +29 -0
  34. package/package/components/core/group.svelte +31 -0
  35. package/package/components/core/group.svelte.d.ts +33 -0
  36. package/package/components/core/icon.svelte +21 -0
  37. package/package/components/core/icon.svelte.d.ts +27 -0
  38. package/package/components/core/menu-button.svelte +65 -0
  39. package/package/components/core/menu-button.svelte.d.ts +36 -0
  40. package/package/components/core/menu-item-checkbox.svelte +24 -0
  41. package/package/components/core/menu-item-checkbox.svelte.d.ts +34 -0
  42. package/package/components/core/menu-item-radio.svelte +19 -0
  43. package/package/components/core/menu-item-radio.svelte.d.ts +34 -0
  44. package/package/components/core/menu-item.svelte +113 -0
  45. package/package/components/core/menu-item.svelte.d.ts +44 -0
  46. package/package/components/core/number-input.svelte +109 -0
  47. package/package/components/core/number-input.svelte.d.ts +40 -0
  48. package/package/components/core/option.svelte +57 -0
  49. package/package/components/core/option.svelte.d.ts +44 -0
  50. package/package/components/core/password-input.svelte +76 -0
  51. package/package/components/core/password-input.svelte.d.ts +36 -0
  52. package/package/components/core/radio-button.svelte +91 -0
  53. package/package/components/core/radio-button.svelte.d.ts +37 -0
  54. package/package/components/core/row-group.svelte +14 -0
  55. package/package/components/core/row-group.svelte.d.ts +29 -0
  56. package/package/components/core/row.svelte +14 -0
  57. package/package/components/core/row.svelte.d.ts +33 -0
  58. package/package/components/core/search-bar.svelte +90 -0
  59. package/package/components/core/search-bar.svelte.d.ts +49 -0
  60. package/package/components/core/select-button.svelte +29 -0
  61. package/package/components/core/select-button.svelte.d.ts +40 -0
  62. package/package/components/core/separator.svelte +28 -0
  63. package/package/components/core/separator.svelte.d.ts +26 -0
  64. package/package/components/core/spacer.svelte +22 -0
  65. package/package/components/core/spacer.svelte.d.ts +25 -0
  66. package/package/components/core/switch.svelte +80 -0
  67. package/package/components/core/switch.svelte.d.ts +37 -0
  68. package/package/components/core/tab-panel.svelte +23 -0
  69. package/package/components/core/tab-panel.svelte.d.ts +33 -0
  70. package/package/components/core/tab.svelte +20 -0
  71. package/package/components/core/tab.svelte.d.ts +33 -0
  72. package/package/components/core/text-area.svelte +90 -0
  73. package/package/components/core/text-area.svelte.d.ts +57 -0
  74. package/package/components/core/text-input.svelte +145 -0
  75. package/package/components/core/text-input.svelte.d.ts +71 -0
  76. package/package/components/core/toolbar.svelte +74 -0
  77. package/package/components/core/toolbar.svelte.d.ts +35 -0
  78. package/package/components/editor/markdown.svelte +75 -0
  79. package/package/components/editor/markdown.svelte.d.ts +25 -0
  80. package/package/components/helpers/group.d.ts +37 -0
  81. package/package/components/helpers/group.js +246 -0
  82. package/package/components/helpers/popup.d.ts +31 -0
  83. package/package/components/helpers/popup.js +134 -0
  84. package/package/components/helpers/util.d.ts +1 -0
  85. package/package/components/helpers/util.js +8 -0
  86. package/package/components/util/app-shell.svelte +282 -0
  87. package/package/components/util/app-shell.svelte.d.ts +38 -0
  88. package/package/components/util/misc.d.ts +2 -0
  89. package/package/components/util/misc.js +22 -0
  90. package/package/components/util/popup.svelte +110 -0
  91. package/package/components/util/popup.svelte.d.ts +46 -0
  92. package/package/components/util/portal.svelte +34 -0
  93. package/package/components/util/portal.svelte.d.ts +28 -0
  94. package/package/index.d.ts +40 -0
  95. package/package/index.js +65 -0
  96. package/package/locales/en.d.ts +42 -0
  97. package/package/locales/en.js +41 -0
  98. package/package/locales/ja.d.ts +42 -0
  99. package/package/locales/ja.js +41 -0
  100. package/package/styles/core.scss +134 -0
  101. package/package/styles/variables.scss +113 -0
  102. package/package/typedef.d.ts +0 -0
  103. package/package/typedef.js +0 -0
  104. package/package.json +461 -0
@@ -0,0 +1,29 @@
1
+ /** @typedef {typeof __propDef.props} RowGroupProps */
2
+ /** @typedef {typeof __propDef.events} RowGroupEvents */
3
+ /** @typedef {typeof __propDef.slots} RowGroupSlots */
4
+ export default class RowGroup extends SvelteComponentTyped<{
5
+ [x: string]: any;
6
+ class?: string;
7
+ }, {
8
+ [evt: string]: CustomEvent<any>;
9
+ }, {
10
+ default: {};
11
+ }> {
12
+ }
13
+ export type RowGroupProps = typeof __propDef.props;
14
+ export type RowGroupEvents = typeof __propDef.events;
15
+ export type RowGroupSlots = typeof __propDef.slots;
16
+ import { SvelteComponentTyped } from "svelte";
17
+ declare const __propDef: {
18
+ props: {
19
+ [x: string]: any;
20
+ class?: string;
21
+ };
22
+ events: {
23
+ [evt: string]: CustomEvent<any>;
24
+ };
25
+ slots: {
26
+ default: {};
27
+ };
28
+ };
29
+ export {};
@@ -0,0 +1,14 @@
1
+ <script>
2
+ /**
3
+ * CSS class name on the button.
4
+ * @type {String}
5
+ */
6
+ // eslint-disable-next-line padding-line-between-statements
7
+ let className = '';
8
+
9
+ export { className as class };
10
+ </script>
11
+
12
+ <div role="row" tabindex="0" class="sui row {className}" {...$$restProps} on:click>
13
+ <slot />
14
+ </div>
@@ -0,0 +1,33 @@
1
+ /** @typedef {typeof __propDef.props} RowProps */
2
+ /** @typedef {typeof __propDef.events} RowEvents */
3
+ /** @typedef {typeof __propDef.slots} RowSlots */
4
+ export default class Row extends SvelteComponentTyped<{
5
+ [x: string]: any;
6
+ class?: string;
7
+ }, {
8
+ click: MouseEvent;
9
+ } & {
10
+ [evt: string]: CustomEvent<any>;
11
+ }, {
12
+ default: {};
13
+ }> {
14
+ }
15
+ export type RowProps = typeof __propDef.props;
16
+ export type RowEvents = typeof __propDef.events;
17
+ export type RowSlots = typeof __propDef.slots;
18
+ import { SvelteComponentTyped } from "svelte";
19
+ declare const __propDef: {
20
+ props: {
21
+ [x: string]: any;
22
+ class?: string;
23
+ };
24
+ events: {
25
+ click: MouseEvent;
26
+ } & {
27
+ [evt: string]: CustomEvent<any>;
28
+ };
29
+ slots: {
30
+ default: {};
31
+ };
32
+ };
33
+ export {};
@@ -0,0 +1,90 @@
1
+ <!--
2
+ @component
3
+ @see https://w3c.github.io/aria/#search
4
+ -->
5
+ <svelte:options accessors={true} />
6
+
7
+ <script>
8
+ import { _ } from 'svelte-i18n';
9
+ import Button from './button.svelte';
10
+ import Icon from './icon.svelte';
11
+ import TextInput from './text-input.svelte';
12
+
13
+ /**
14
+ * CSS class name on the button.
15
+ * @type {String}
16
+ */
17
+ let className = '';
18
+
19
+ export { className as class };
20
+
21
+ /** @type {_SvelteComponent} */
22
+ let input;
23
+
24
+ export let value = '';
25
+
26
+ /**
27
+ * Move focus to the `<input>` element.
28
+ */
29
+ export const focus = () => {
30
+ input?.element?.focus();
31
+ };
32
+ </script>
33
+
34
+ <div class="sui search-bar {className}" role="search">
35
+ <Icon name="search" />
36
+ <TextInput
37
+ bind:this={input}
38
+ bind:value
39
+ role="searchbox"
40
+ {...$$restProps}
41
+ on:input
42
+ on:keydown
43
+ on:keyup
44
+ on:keypress
45
+ on:change
46
+ />
47
+ {#if value}
48
+ <Button
49
+ class="ternary iconic"
50
+ iconName="close"
51
+ iconLabel={$_('sui._.clear')}
52
+ on:click={() => {
53
+ value = '';
54
+ input.element.focus();
55
+ window.requestIdleCallback(() => {
56
+ input.element.dispatchEvent(new KeyboardEvent('input'));
57
+ input.element.dispatchEvent(new KeyboardEvent('keypress'));
58
+ input.element.dispatchEvent(new KeyboardEvent('change'));
59
+ });
60
+ }}
61
+ />
62
+ {/if}
63
+ </div>
64
+
65
+ <style>[role=search] {
66
+ display: flex;
67
+ align-items: center;
68
+ position: relative;
69
+ }
70
+ [role=search] :global(.icon) {
71
+ font-size: 20px;
72
+ opacity: 0.5;
73
+ }
74
+ [role=search] > :global(.icon) {
75
+ position: absolute;
76
+ inset: 8px auto auto 8px;
77
+ z-index: 2;
78
+ }
79
+ [role=search] > :global(button) {
80
+ position: absolute;
81
+ inset: 0 0 auto auto;
82
+ z-index: 2;
83
+ }
84
+ [role=search] :global(.label) {
85
+ inset: 0 36px;
86
+ }
87
+ [role=search] :global(input) {
88
+ padding: 0 36px !important;
89
+ width: 100%;
90
+ }</style>
@@ -0,0 +1,49 @@
1
+ /** @typedef {typeof __propDef.props} SearchBarProps */
2
+ /** @typedef {typeof __propDef.events} SearchBarEvents */
3
+ /** @typedef {typeof __propDef.slots} SearchBarSlots */
4
+ /** @see https://w3c.github.io/aria/#search */
5
+ export default class SearchBar extends SvelteComponentTyped<{
6
+ [x: string]: any;
7
+ class?: string;
8
+ focus?: () => void;
9
+ value?: string;
10
+ }, {
11
+ input: Event;
12
+ keydown: KeyboardEvent;
13
+ keyup: KeyboardEvent;
14
+ keypress: KeyboardEvent;
15
+ change: Event;
16
+ } & {
17
+ [evt: string]: CustomEvent<any>;
18
+ }, {}> {
19
+ get focus(): () => void;
20
+ /**accessor*/
21
+ set class(arg: string);
22
+ get class(): string;
23
+ /**accessor*/
24
+ set value(arg: string);
25
+ get value(): string;
26
+ }
27
+ export type SearchBarProps = typeof __propDef.props;
28
+ export type SearchBarEvents = typeof __propDef.events;
29
+ export type SearchBarSlots = typeof __propDef.slots;
30
+ import { SvelteComponentTyped } from "svelte";
31
+ declare const __propDef: {
32
+ props: {
33
+ [x: string]: any;
34
+ class?: string;
35
+ focus?: () => void;
36
+ value?: string;
37
+ };
38
+ events: {
39
+ input: Event;
40
+ keydown: KeyboardEvent;
41
+ keyup: KeyboardEvent;
42
+ keypress: KeyboardEvent;
43
+ change: Event;
44
+ } & {
45
+ [evt: string]: CustomEvent<any>;
46
+ };
47
+ slots: {};
48
+ };
49
+ export {};
@@ -0,0 +1,29 @@
1
+ <!--
2
+ @component
3
+ A variant of `<RadioButton>`, looking like a normal button.
4
+ @see https://w3c.github.io/aria/#radio
5
+ @see https://w3c.github.io/aria-practices/#radiobutton
6
+ -->
7
+ <script>
8
+ import Button from './button.svelte';
9
+
10
+ /**
11
+ * CSS class name on the button.
12
+ * @type {String}
13
+ */
14
+ let className = '';
15
+
16
+ export { className as class };
17
+
18
+ export let selected = false;
19
+ </script>
20
+
21
+ <Button
22
+ class="sui select-button {className}"
23
+ role="radio"
24
+ aria-checked={selected}
25
+ {...$$restProps}
26
+ on:click
27
+ >
28
+ <slot />
29
+ </Button>
@@ -0,0 +1,40 @@
1
+ /** @typedef {typeof __propDef.props} SelectButtonProps */
2
+ /** @typedef {typeof __propDef.events} SelectButtonEvents */
3
+ /** @typedef {typeof __propDef.slots} SelectButtonSlots */
4
+ /**
5
+ * A variant of `<RadioButton>`, looking like a normal button.
6
+ * @see https://w3c.github.io/aria/#radio
7
+ * @see https://w3c.github.io/aria-practices/#radiobutton
8
+ */
9
+ export default class SelectButton extends SvelteComponentTyped<{
10
+ [x: string]: any;
11
+ class?: string;
12
+ selected?: boolean;
13
+ }, {
14
+ click: MouseEvent;
15
+ } & {
16
+ [evt: string]: CustomEvent<any>;
17
+ }, {
18
+ default: {};
19
+ }> {
20
+ }
21
+ export type SelectButtonProps = typeof __propDef.props;
22
+ export type SelectButtonEvents = typeof __propDef.events;
23
+ export type SelectButtonSlots = typeof __propDef.slots;
24
+ import { SvelteComponentTyped } from "svelte";
25
+ declare const __propDef: {
26
+ props: {
27
+ [x: string]: any;
28
+ class?: string;
29
+ selected?: boolean;
30
+ };
31
+ events: {
32
+ click: MouseEvent;
33
+ } & {
34
+ [evt: string]: CustomEvent<any>;
35
+ };
36
+ slots: {
37
+ default: {};
38
+ };
39
+ };
40
+ export {};
@@ -0,0 +1,28 @@
1
+ <!--
2
+ @component
3
+ @see https://w3c.github.io/aria/#separator
4
+ -->
5
+ <script>
6
+ export let orientation = 'horizontal';
7
+
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="separator" class="sui separator {className}" aria-orientation={orientation} />
18
+
19
+ <style>.separator {
20
+ flex: none;
21
+ background-color: var(--secondary-border-color);
22
+ }
23
+ .separator[aria-orientation=horizontal] {
24
+ height: 1px;
25
+ }
26
+ .separator[aria-orientation=vertical] {
27
+ width: 1px;
28
+ }</style>
@@ -0,0 +1,26 @@
1
+ /** @typedef {typeof __propDef.props} SeparatorProps */
2
+ /** @typedef {typeof __propDef.events} SeparatorEvents */
3
+ /** @typedef {typeof __propDef.slots} SeparatorSlots */
4
+ /** @see https://w3c.github.io/aria/#separator */
5
+ export default class Separator extends SvelteComponentTyped<{
6
+ class?: string;
7
+ orientation?: string;
8
+ }, {
9
+ [evt: string]: CustomEvent<any>;
10
+ }, {}> {
11
+ }
12
+ export type SeparatorProps = typeof __propDef.props;
13
+ export type SeparatorEvents = typeof __propDef.events;
14
+ export type SeparatorSlots = typeof __propDef.slots;
15
+ import { SvelteComponentTyped } from "svelte";
16
+ declare const __propDef: {
17
+ props: {
18
+ class?: string;
19
+ orientation?: string;
20
+ };
21
+ events: {
22
+ [evt: string]: CustomEvent<any>;
23
+ };
24
+ slots: {};
25
+ };
26
+ export {};
@@ -0,0 +1,22 @@
1
+ <script>
2
+ /**
3
+ * CSS class name on the button.
4
+ * @type {String}
5
+ */
6
+ let className = '';
7
+
8
+ export { className as class };
9
+
10
+ /** @type {Boolean} */
11
+ export let flex = false;
12
+ </script>
13
+
14
+ <div class="sui spacer {className}" class:flex />
15
+
16
+ <style>.spacer.flex {
17
+ flex: auto;
18
+ }
19
+ .spacer:not(.flex) {
20
+ width: 8px;
21
+ height: 8px;
22
+ }</style>
@@ -0,0 +1,25 @@
1
+ /** @typedef {typeof __propDef.props} SpacerProps */
2
+ /** @typedef {typeof __propDef.events} SpacerEvents */
3
+ /** @typedef {typeof __propDef.slots} SpacerSlots */
4
+ export default class Spacer extends SvelteComponentTyped<{
5
+ class?: string;
6
+ flex?: boolean;
7
+ }, {
8
+ [evt: string]: CustomEvent<any>;
9
+ }, {}> {
10
+ }
11
+ export type SpacerProps = typeof __propDef.props;
12
+ export type SpacerEvents = typeof __propDef.events;
13
+ export type SpacerSlots = typeof __propDef.slots;
14
+ import { SvelteComponentTyped } from "svelte";
15
+ declare const __propDef: {
16
+ props: {
17
+ class?: string;
18
+ flex?: boolean;
19
+ };
20
+ events: {
21
+ [evt: string]: CustomEvent<any>;
22
+ };
23
+ slots: {};
24
+ };
25
+ export {};
@@ -0,0 +1,80 @@
1
+ <!--
2
+ @component
3
+ @see https://w3c.github.io/aria/#switch
4
+ @see https://w3c.github.io/aria-practices/#switch
5
+ -->
6
+ <script>
7
+ /**
8
+ * CSS class name on the button.
9
+ * @type {String}
10
+ */
11
+ let className = '';
12
+
13
+ export { className as class };
14
+
15
+ export let label = '';
16
+
17
+ export let checked = false;
18
+
19
+ export let disabled = false;
20
+ </script>
21
+
22
+ <label class="sui switch {className}" class:disabled>
23
+ <input type="checkbox" role="switch" bind:checked {disabled} />
24
+ <span />
25
+ {#if label}
26
+ {label}
27
+ {:else}
28
+ <slot />
29
+ {/if}
30
+ </label>
31
+
32
+ <style>label {
33
+ display: inline-flex;
34
+ align-items: center;
35
+ gap: 8px;
36
+ cursor: pointer;
37
+ -webkit-user-select: none;
38
+ user-select: none;
39
+ }
40
+ label.disabled {
41
+ cursor: default;
42
+ }
43
+
44
+ input {
45
+ position: absolute;
46
+ left: -99999px;
47
+ }
48
+
49
+ input:checked + span {
50
+ background-color: var(--primary-accent-color);
51
+ border-color: transparent;
52
+ }
53
+ input:checked + span::before {
54
+ transform: translateX(22px);
55
+ background-color: var(--primary-accent-color-foreground);
56
+ }
57
+
58
+ input:disabled + span {
59
+ opacity: 0.4;
60
+ }
61
+
62
+ span {
63
+ position: relative;
64
+ width: 42px;
65
+ height: 20px;
66
+ padding: 2px;
67
+ display: inline-block;
68
+ border-radius: 16px;
69
+ background-color: var(--control-border-color);
70
+ transition: all 200ms;
71
+ }
72
+ span::before {
73
+ display: inline-block;
74
+ width: 16px;
75
+ height: 16px;
76
+ border-radius: 16px;
77
+ background-color: var(--primary-accent-color-foreground);
78
+ transition: all 200ms;
79
+ content: "";
80
+ }</style>
@@ -0,0 +1,37 @@
1
+ /** @typedef {typeof __propDef.props} SwitchProps */
2
+ /** @typedef {typeof __propDef.events} SwitchEvents */
3
+ /** @typedef {typeof __propDef.slots} SwitchSlots */
4
+ /**
5
+ * @see https://w3c.github.io/aria/#switch
6
+ * @see https://w3c.github.io/aria-practices/#switch
7
+ */
8
+ export default class Switch extends SvelteComponentTyped<{
9
+ class?: string;
10
+ label?: string;
11
+ disabled?: boolean;
12
+ checked?: boolean;
13
+ }, {
14
+ [evt: string]: CustomEvent<any>;
15
+ }, {
16
+ default: {};
17
+ }> {
18
+ }
19
+ export type SwitchProps = typeof __propDef.props;
20
+ export type SwitchEvents = typeof __propDef.events;
21
+ export type SwitchSlots = typeof __propDef.slots;
22
+ import { SvelteComponentTyped } from "svelte";
23
+ declare const __propDef: {
24
+ props: {
25
+ class?: string;
26
+ label?: string;
27
+ disabled?: boolean;
28
+ checked?: boolean;
29
+ };
30
+ events: {
31
+ [evt: string]: CustomEvent<any>;
32
+ };
33
+ slots: {
34
+ default: {};
35
+ };
36
+ };
37
+ export {};
@@ -0,0 +1,23 @@
1
+ <!--
2
+ @component
3
+ @see https://w3c.github.io/aria/#tabpanel
4
+ @see https://w3c.github.io/aria-practices/#tabpanel
5
+ -->
6
+ <script>
7
+ /**
8
+ * CSS class name on the button.
9
+ * @type {String}
10
+ */
11
+ // eslint-disable-next-line padding-line-between-statements
12
+ let className = '';
13
+
14
+ export { className as class };
15
+ </script>
16
+
17
+ <div class="sui tabpanel {className}" role="tabpanel" {...$$restProps}>
18
+ <slot />
19
+ </div>
20
+
21
+ <style>.tabpanel[aria-hidden=true], .tabpanel:not([aria-hidden]) {
22
+ display: none;
23
+ }</style>
@@ -0,0 +1,33 @@
1
+ /** @typedef {typeof __propDef.props} TabPanelProps */
2
+ /** @typedef {typeof __propDef.events} TabPanelEvents */
3
+ /** @typedef {typeof __propDef.slots} TabPanelSlots */
4
+ /**
5
+ * @see https://w3c.github.io/aria/#tabpanel
6
+ * @see https://w3c.github.io/aria-practices/#tabpanel
7
+ */
8
+ export default class TabPanel extends SvelteComponentTyped<{
9
+ [x: string]: any;
10
+ class?: string;
11
+ }, {
12
+ [evt: string]: CustomEvent<any>;
13
+ }, {
14
+ default: {};
15
+ }> {
16
+ }
17
+ export type TabPanelProps = typeof __propDef.props;
18
+ export type TabPanelEvents = typeof __propDef.events;
19
+ export type TabPanelSlots = typeof __propDef.slots;
20
+ import { SvelteComponentTyped } from "svelte";
21
+ declare const __propDef: {
22
+ props: {
23
+ [x: string]: any;
24
+ class?: string;
25
+ };
26
+ events: {
27
+ [evt: string]: CustomEvent<any>;
28
+ };
29
+ slots: {
30
+ default: {};
31
+ };
32
+ };
33
+ export {};
@@ -0,0 +1,20 @@
1
+ <!--
2
+ @component
3
+ @see https://w3c.github.io/aria/#tab
4
+ @see https://w3c.github.io/aria-practices/#tabpanel
5
+ -->
6
+ <script>
7
+ import Button from './button.svelte';
8
+
9
+ /**
10
+ * CSS class name on the button.
11
+ * @type {String}
12
+ */
13
+ let className = '';
14
+
15
+ export { className as class };
16
+ </script>
17
+
18
+ <Button role="tab" class="sui tab {className}" {...$$restProps}>
19
+ <slot />
20
+ </Button>
@@ -0,0 +1,33 @@
1
+ /** @typedef {typeof __propDef.props} TabProps */
2
+ /** @typedef {typeof __propDef.events} TabEvents */
3
+ /** @typedef {typeof __propDef.slots} TabSlots */
4
+ /**
5
+ * @see https://w3c.github.io/aria/#tab
6
+ * @see https://w3c.github.io/aria-practices/#tabpanel
7
+ */
8
+ export default class Tab extends SvelteComponentTyped<{
9
+ [x: string]: any;
10
+ class?: string;
11
+ }, {
12
+ [evt: string]: CustomEvent<any>;
13
+ }, {
14
+ default: {};
15
+ }> {
16
+ }
17
+ export type TabProps = typeof __propDef.props;
18
+ export type TabEvents = typeof __propDef.events;
19
+ export type TabSlots = typeof __propDef.slots;
20
+ import { SvelteComponentTyped } from "svelte";
21
+ declare const __propDef: {
22
+ props: {
23
+ [x: string]: any;
24
+ class?: string;
25
+ };
26
+ events: {
27
+ [evt: string]: CustomEvent<any>;
28
+ };
29
+ slots: {
30
+ default: {};
31
+ };
32
+ };
33
+ export {};