@rcarls/rc-webcomponents 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.
- package/README.md +65 -0
- package/dist/rc-webcomponents-define.js +39 -0
- package/dist/rc-webcomponents-define.js.map +1 -0
- package/dist/rc-webcomponents.js +20 -0
- package/dist/rc-webcomponents.js.map +1 -0
- package/dist/types/define.d.ts +1 -0
- package/dist/types/index.d.ts +19 -0
- package/package.json +77 -0
- package/src/solid.d.ts +497 -0
package/README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# `@rcarls/rc-webcomponents`
|
|
2
|
+
|
|
3
|
+
Aggregate package for the `@rcarls` web component collection. Import this package
|
|
4
|
+
when an application wants one dependency that re-exports the component classes
|
|
5
|
+
and can define every custom element at once.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
PowerShell:
|
|
10
|
+
|
|
11
|
+
```powershell
|
|
12
|
+
yarn.cmd add @rcarls/rc-webcomponents
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Bash/zsh:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
yarn add @rcarls/rc-webcomponents
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Import All Definitions
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import '@rcarls/rc-webcomponents/define';
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Import Classes
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import {
|
|
31
|
+
RCCombobox,
|
|
32
|
+
RCDialog,
|
|
33
|
+
RCListbox,
|
|
34
|
+
RCMenu,
|
|
35
|
+
RCMenuButton,
|
|
36
|
+
RCMenubar,
|
|
37
|
+
RCSelect,
|
|
38
|
+
RCSplitter,
|
|
39
|
+
RCTextarea,
|
|
40
|
+
RCToolbar,
|
|
41
|
+
} from '@rcarls/rc-webcomponents';
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Included Packages
|
|
45
|
+
|
|
46
|
+
| Package | Purpose |
|
|
47
|
+
| --- | --- |
|
|
48
|
+
| `rc-app-bar` | Headless app bar with exact-center composition and scroll behaviors. |
|
|
49
|
+
| `rc-combobox` | Editable ARIA combobox. |
|
|
50
|
+
| `rc-dialog` | Native `<dialog>` enhancement wrapper. |
|
|
51
|
+
| `rc-listbox` | Light-DOM ARIA listbox. |
|
|
52
|
+
| `rc-menu` | ARIA menu popup. |
|
|
53
|
+
| `rc-menu-button` | Trigger button for ARIA menus. |
|
|
54
|
+
| `rc-menubar` | ARIA menubar controller. |
|
|
55
|
+
| `rc-select` | Select-only ARIA combobox. |
|
|
56
|
+
| `rc-splitter` | Resizable splitter panes. |
|
|
57
|
+
| `rc-textarea` | Enhanced plain-text editor. |
|
|
58
|
+
| `rc-toolbar` | ARIA toolbar with roving tabindex. |
|
|
59
|
+
|
|
60
|
+
## Notes
|
|
61
|
+
|
|
62
|
+
- Use individual packages when bundle size matters and the app only needs one or
|
|
63
|
+
two components.
|
|
64
|
+
- Use this aggregate package for app-level convenience, framework integration,
|
|
65
|
+
and demo/documentation surfaces.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import "@rcarls/rc-app-bar/define";
|
|
2
|
+
import "@rcarls/rc-combobox/define";
|
|
3
|
+
import "@rcarls/rc-dialog/define";
|
|
4
|
+
import "@rcarls/rc-disclosure/define";
|
|
5
|
+
import "@rcarls/rc-fab/define";
|
|
6
|
+
import "@rcarls/rc-accordion/define";
|
|
7
|
+
import "@rcarls/rc-listbox/define";
|
|
8
|
+
import "@rcarls/rc-menubar/define";
|
|
9
|
+
import "@rcarls/rc-menu-button/define";
|
|
10
|
+
import "@rcarls/rc-menu/define";
|
|
11
|
+
import "@rcarls/rc-range-slider/define";
|
|
12
|
+
import "@rcarls/rc-search-bar/define";
|
|
13
|
+
import "@rcarls/rc-select/define";
|
|
14
|
+
import "@rcarls/rc-slider/define";
|
|
15
|
+
import "@rcarls/rc-splitter/define";
|
|
16
|
+
import "@rcarls/rc-markdown-editor/define";
|
|
17
|
+
import "@rcarls/rc-textarea/define";
|
|
18
|
+
import "@rcarls/rc-toolbar/define";
|
|
19
|
+
import "@rcarls/rc-transfer-list/define";
|
|
20
|
+
export * from "@rcarls/rc-accordion";
|
|
21
|
+
export * from "@rcarls/rc-app-bar";
|
|
22
|
+
export * from "@rcarls/rc-combobox";
|
|
23
|
+
export * from "@rcarls/rc-dialog";
|
|
24
|
+
export * from "@rcarls/rc-disclosure";
|
|
25
|
+
export * from "@rcarls/rc-fab";
|
|
26
|
+
export * from "@rcarls/rc-listbox";
|
|
27
|
+
export * from "@rcarls/rc-markdown-editor";
|
|
28
|
+
export * from "@rcarls/rc-menu";
|
|
29
|
+
export * from "@rcarls/rc-menu-button";
|
|
30
|
+
export * from "@rcarls/rc-menubar";
|
|
31
|
+
export * from "@rcarls/rc-range-slider";
|
|
32
|
+
export * from "@rcarls/rc-search-bar";
|
|
33
|
+
export * from "@rcarls/rc-select";
|
|
34
|
+
export * from "@rcarls/rc-slider";
|
|
35
|
+
export * from "@rcarls/rc-splitter";
|
|
36
|
+
export * from "@rcarls/rc-textarea";
|
|
37
|
+
export * from "@rcarls/rc-toolbar";
|
|
38
|
+
export * from "@rcarls/rc-transfer-list";
|
|
39
|
+
//# sourceMappingURL=rc-webcomponents-define.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rc-webcomponents-define.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from "@rcarls/rc-accordion";
|
|
2
|
+
export * from "@rcarls/rc-app-bar";
|
|
3
|
+
export * from "@rcarls/rc-combobox";
|
|
4
|
+
export * from "@rcarls/rc-dialog";
|
|
5
|
+
export * from "@rcarls/rc-disclosure";
|
|
6
|
+
export * from "@rcarls/rc-fab";
|
|
7
|
+
export * from "@rcarls/rc-listbox";
|
|
8
|
+
export * from "@rcarls/rc-markdown-editor";
|
|
9
|
+
export * from "@rcarls/rc-menu";
|
|
10
|
+
export * from "@rcarls/rc-menu-button";
|
|
11
|
+
export * from "@rcarls/rc-menubar";
|
|
12
|
+
export * from "@rcarls/rc-range-slider";
|
|
13
|
+
export * from "@rcarls/rc-search-bar";
|
|
14
|
+
export * from "@rcarls/rc-select";
|
|
15
|
+
export * from "@rcarls/rc-slider";
|
|
16
|
+
export * from "@rcarls/rc-splitter";
|
|
17
|
+
export * from "@rcarls/rc-textarea";
|
|
18
|
+
export * from "@rcarls/rc-toolbar";
|
|
19
|
+
export * from "@rcarls/rc-transfer-list";
|
|
20
|
+
//# sourceMappingURL=rc-webcomponents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rc-webcomponents.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './index.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from '@rcarls/rc-accordion';
|
|
2
|
+
export * from '@rcarls/rc-app-bar';
|
|
3
|
+
export * from '@rcarls/rc-combobox';
|
|
4
|
+
export * from '@rcarls/rc-dialog';
|
|
5
|
+
export * from '@rcarls/rc-disclosure';
|
|
6
|
+
export * from '@rcarls/rc-fab';
|
|
7
|
+
export * from '@rcarls/rc-listbox';
|
|
8
|
+
export * from '@rcarls/rc-markdown-editor';
|
|
9
|
+
export * from '@rcarls/rc-menu';
|
|
10
|
+
export * from '@rcarls/rc-menu-button';
|
|
11
|
+
export * from '@rcarls/rc-menubar';
|
|
12
|
+
export * from '@rcarls/rc-range-slider';
|
|
13
|
+
export * from '@rcarls/rc-search-bar';
|
|
14
|
+
export * from '@rcarls/rc-select';
|
|
15
|
+
export * from '@rcarls/rc-slider';
|
|
16
|
+
export * from '@rcarls/rc-splitter';
|
|
17
|
+
export * from '@rcarls/rc-textarea';
|
|
18
|
+
export * from '@rcarls/rc-toolbar';
|
|
19
|
+
export * from '@rcarls/rc-transfer-list';
|
package/package.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rcarls/rc-webcomponents",
|
|
3
|
+
"publishConfig": {
|
|
4
|
+
"access": "public"
|
|
5
|
+
},
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"description": "Aggregate package — all @rcarls WAI-ARIA compliant headless web components",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/richardcarls/rc-webcomponents.git",
|
|
11
|
+
"directory": "packages/rc-webcomponents"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/richardcarls/rc-webcomponents#readme",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"src/solid.d.ts"
|
|
19
|
+
],
|
|
20
|
+
"module": "./dist/rc-webcomponents.js",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"import": {
|
|
24
|
+
"types": "./dist/types/index.d.ts",
|
|
25
|
+
"default": "./dist/rc-webcomponents.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"./define": {
|
|
29
|
+
"import": {
|
|
30
|
+
"types": "./dist/types/define.d.ts",
|
|
31
|
+
"default": "./dist/rc-webcomponents-define.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"./solid": {
|
|
35
|
+
"types": "./src/solid.d.ts"
|
|
36
|
+
},
|
|
37
|
+
"./themes/base.css": "../../themes/base.css"
|
|
38
|
+
},
|
|
39
|
+
"types": "./dist/types/index.d.ts",
|
|
40
|
+
"sideEffects": [
|
|
41
|
+
"./dist/rc-webcomponents-define.js"
|
|
42
|
+
],
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "tsc && vite build",
|
|
45
|
+
"yalc:publish": "yalc publish --push"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@rcarls/rc-accordion": "workspace:^",
|
|
49
|
+
"@rcarls/rc-app-bar": "workspace:^",
|
|
50
|
+
"@rcarls/rc-combobox": "workspace:^",
|
|
51
|
+
"@rcarls/rc-dialog": "workspace:^",
|
|
52
|
+
"@rcarls/rc-disclosure": "workspace:^",
|
|
53
|
+
"@rcarls/rc-fab": "workspace:^",
|
|
54
|
+
"@rcarls/rc-listbox": "workspace:^",
|
|
55
|
+
"@rcarls/rc-markdown-editor": "workspace:^",
|
|
56
|
+
"@rcarls/rc-menu": "workspace:^",
|
|
57
|
+
"@rcarls/rc-menu-button": "workspace:^",
|
|
58
|
+
"@rcarls/rc-menubar": "workspace:^",
|
|
59
|
+
"@rcarls/rc-range-slider": "workspace:^",
|
|
60
|
+
"@rcarls/rc-search-bar": "workspace:^",
|
|
61
|
+
"@rcarls/rc-select": "workspace:^",
|
|
62
|
+
"@rcarls/rc-slider": "workspace:^",
|
|
63
|
+
"@rcarls/rc-splitter": "workspace:^",
|
|
64
|
+
"@rcarls/rc-textarea": "workspace:^",
|
|
65
|
+
"@rcarls/rc-toolbar": "workspace:^",
|
|
66
|
+
"@rcarls/rc-transfer-list": "workspace:^"
|
|
67
|
+
},
|
|
68
|
+
"peerDependencies": {
|
|
69
|
+
"lit": "^3.0.0"
|
|
70
|
+
},
|
|
71
|
+
"devDependencies": {
|
|
72
|
+
"lit": "^3.0.0",
|
|
73
|
+
"typescript": "~5.9.3",
|
|
74
|
+
"vite": "^7.1.7",
|
|
75
|
+
"vite-plugin-dts": "^4.5.4"
|
|
76
|
+
}
|
|
77
|
+
}
|
package/src/solid.d.ts
ADDED
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SolidJS JSX type augmentation for rc-webcomponents.
|
|
3
|
+
*
|
|
4
|
+
* Import this file once in your SolidJS project (e.g. in vite.config.ts or
|
|
5
|
+
* a global types file):
|
|
6
|
+
*
|
|
7
|
+
* /// <reference types="@rcarls/rc-webcomponents/solid" />
|
|
8
|
+
*
|
|
9
|
+
* Ref types use HTMLElement intersections — not LitElement — so TypeScript
|
|
10
|
+
* resolves correctly without requiring `lit` in your tsconfig paths.
|
|
11
|
+
*
|
|
12
|
+
* Boolean attributes are typed as `boolean | string` because SolidJS passes
|
|
13
|
+
* `""` (empty string) for a boolean `true`.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import type { RCTextareaPlugin } from '@rcarls/rc-textarea';
|
|
17
|
+
|
|
18
|
+
// ---- Ref types --------------------------------------------------------------
|
|
19
|
+
|
|
20
|
+
/** Public API surface of `<rc-disclosure>`. */
|
|
21
|
+
export type RCDisclosureRef = HTMLElement & {
|
|
22
|
+
open: boolean;
|
|
23
|
+
fragment: boolean;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type RCDisclosureToggleDetail = {
|
|
27
|
+
open: boolean;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** Public API surface of `<rc-accordion>`. */
|
|
31
|
+
export type RCAccordionRef = HTMLElement;
|
|
32
|
+
|
|
33
|
+
/** Public API surface of `<rc-listbox>`. */
|
|
34
|
+
export type RCListboxRef = HTMLElement & {
|
|
35
|
+
multiple: boolean;
|
|
36
|
+
filterStrategy: 'prefix' | 'contains' | ((label: string, query: string) => boolean);
|
|
37
|
+
value: RCSelectValue;
|
|
38
|
+
defaultValue: RCSelectValue | undefined;
|
|
39
|
+
options: RCSelectOption[];
|
|
40
|
+
readonly allOptions: ReadonlyArray<{ value: string; label: string; disabled?: boolean }>;
|
|
41
|
+
readonly filteredOptions: ReadonlyArray<{ value: string; label: string; disabled?: boolean }>;
|
|
42
|
+
readonly selectedValues: string[];
|
|
43
|
+
readonly navigableItems: Element[];
|
|
44
|
+
toggleOption(value: string): void;
|
|
45
|
+
clearSelection(): void;
|
|
46
|
+
filterOptions(text: string): void;
|
|
47
|
+
clearFilter(): void;
|
|
48
|
+
setCreateOption(label: string | null): void;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** Public API surface of `<rc-select>`. */
|
|
52
|
+
export type RCSelectOption = {
|
|
53
|
+
value: string;
|
|
54
|
+
label: string;
|
|
55
|
+
disabled?: boolean;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export type RCSelectValue = string | string[];
|
|
59
|
+
|
|
60
|
+
export type RCSelectChangeDetail = {
|
|
61
|
+
value: RCSelectValue;
|
|
62
|
+
selectedValues: string[];
|
|
63
|
+
selectedOptions: RCSelectOption[];
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export type RCListboxChangeDetail = RCSelectChangeDetail & {
|
|
67
|
+
selected: boolean;
|
|
68
|
+
optionValue: string;
|
|
69
|
+
option: RCSelectOption | null;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export type RCSelectRef = HTMLElement & {
|
|
73
|
+
open: boolean;
|
|
74
|
+
multiple: boolean;
|
|
75
|
+
disabled: boolean;
|
|
76
|
+
placeholder: string;
|
|
77
|
+
display: 'auto' | 'chips' | 'compact';
|
|
78
|
+
value: RCSelectValue;
|
|
79
|
+
defaultValue: RCSelectValue | undefined;
|
|
80
|
+
options: RCSelectOption[] | undefined;
|
|
81
|
+
readonly selectedValues: string[];
|
|
82
|
+
openPopup(): void;
|
|
83
|
+
closePopup(returnFocus?: boolean): void;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/** Public API surface of `<rc-combobox>`. */
|
|
87
|
+
export type RCComboboxRef = RCSelectRef & {
|
|
88
|
+
allowCreate: boolean;
|
|
89
|
+
filterStrategy: 'prefix' | 'contains' | ((label: string, query: string) => boolean);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/** Public API surface of `<rc-dialog>`. */
|
|
93
|
+
export type RCDialogRef = HTMLElement & {
|
|
94
|
+
open: boolean | undefined;
|
|
95
|
+
defaultOpen: boolean;
|
|
96
|
+
movable: boolean;
|
|
97
|
+
moveHandle: string;
|
|
98
|
+
moveBounds: 'viewport' | 'parent';
|
|
99
|
+
moveStep: number;
|
|
100
|
+
resize: 'none' | 'both' | 'horizontal' | 'vertical';
|
|
101
|
+
resizeThreshold: number;
|
|
102
|
+
resizeStep: number;
|
|
103
|
+
closedBy: 'any' | 'closerequest' | 'none' | '';
|
|
104
|
+
lightDismiss: boolean;
|
|
105
|
+
readonly returnValue: string;
|
|
106
|
+
showModal(): void;
|
|
107
|
+
show(): void;
|
|
108
|
+
close(returnValue?: string): void;
|
|
109
|
+
requestClose(returnValue?: string): void;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export type RCDialogToggleDetail = {
|
|
113
|
+
open: boolean;
|
|
114
|
+
returnValue: string;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/** Public API surface of `<rc-menu>`. */
|
|
118
|
+
export type RCMenuRef = HTMLElement & {
|
|
119
|
+
label: string;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export type RCMenuActivateDetail = {
|
|
123
|
+
item: HTMLElement;
|
|
124
|
+
value: string;
|
|
125
|
+
text: string;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/** Public API surface of `<rc-menu-button>`. */
|
|
129
|
+
export type RCMenuButtonRef = HTMLElement & {
|
|
130
|
+
open: boolean | undefined;
|
|
131
|
+
defaultOpen: boolean;
|
|
132
|
+
orientation: 'horizontal' | 'vertical' | undefined;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
/** Public API surface of `<rc-menubar>`. */
|
|
136
|
+
export type RCMenubarRef = HTMLElement;
|
|
137
|
+
|
|
138
|
+
/** Public API surface of `<rc-toolbar>`. */
|
|
139
|
+
export type RCToolbarRef = HTMLElement & {
|
|
140
|
+
label: string;
|
|
141
|
+
orientation: string;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
/** Public API surface of `<rc-splitter>`. */
|
|
145
|
+
export type RCSplitterRef = HTMLElement & {
|
|
146
|
+
label: string;
|
|
147
|
+
orientation: 'horizontal' | 'vertical';
|
|
148
|
+
mode: 'length' | 'percent';
|
|
149
|
+
step: number;
|
|
150
|
+
value: number;
|
|
151
|
+
defaultValue: number | undefined;
|
|
152
|
+
fixed: boolean;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
export type RCTextareaRef = HTMLElement & {
|
|
156
|
+
value: string;
|
|
157
|
+
defaultValue: string | undefined;
|
|
158
|
+
plugin: RCTextareaPlugin | null;
|
|
159
|
+
lineNumbers: boolean;
|
|
160
|
+
listNumbers: boolean;
|
|
161
|
+
gutter: boolean;
|
|
162
|
+
wordWrap: boolean;
|
|
163
|
+
autoGrow: boolean;
|
|
164
|
+
readOnly: boolean;
|
|
165
|
+
label: string | null;
|
|
166
|
+
usePlugin(plugin: RCTextareaPlugin): void;
|
|
167
|
+
removePlugin(): void;
|
|
168
|
+
wrapSelection(prefix: string, suffix: string): void;
|
|
169
|
+
replaceSelection(text: string): void;
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
export type RCTextEditorRef = RCTextareaRef & {
|
|
173
|
+
toolbar: boolean;
|
|
174
|
+
markdown: boolean;
|
|
175
|
+
preview: boolean;
|
|
176
|
+
defaultPreview: boolean;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
export type RCSliderRef = HTMLElement & {
|
|
180
|
+
min: number;
|
|
181
|
+
max: number;
|
|
182
|
+
step: number;
|
|
183
|
+
value: number;
|
|
184
|
+
defaultValue: number | undefined;
|
|
185
|
+
disabled: boolean;
|
|
186
|
+
readonly: boolean;
|
|
187
|
+
display: 'float' | 'inline-start' | 'inline-end' | null;
|
|
188
|
+
valueText: string;
|
|
189
|
+
orientation: 'horizontal' | 'vertical';
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
export type RCRangeSliderRef = HTMLElement & {
|
|
193
|
+
min: number;
|
|
194
|
+
max: number;
|
|
195
|
+
step: number;
|
|
196
|
+
value: [number, number];
|
|
197
|
+
defaultValue: [number, number] | undefined;
|
|
198
|
+
disabled: boolean;
|
|
199
|
+
lowLabel: string;
|
|
200
|
+
highLabel: string;
|
|
201
|
+
lowValueText: string;
|
|
202
|
+
highValueText: string;
|
|
203
|
+
display: 'float' | 'inline-start' | 'inline-end' | null;
|
|
204
|
+
orientation: 'horizontal' | 'vertical';
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
export type RCTransferListOption = {
|
|
208
|
+
value: string;
|
|
209
|
+
label: string;
|
|
210
|
+
disabled?: boolean;
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
export type RCTransferListRef = HTMLElement & {
|
|
214
|
+
multiple: boolean;
|
|
215
|
+
availableLabel: string;
|
|
216
|
+
selectedLabel: string;
|
|
217
|
+
available: RCTransferListOption[];
|
|
218
|
+
selected: RCTransferListOption[];
|
|
219
|
+
defaultSelected: RCTransferListOption[] | undefined;
|
|
220
|
+
addSelected(): void;
|
|
221
|
+
addAll(): void;
|
|
222
|
+
removeSelected(): void;
|
|
223
|
+
clearSelected(): void;
|
|
224
|
+
moveSelected(delta: number): void;
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
/** Public API surface of `<rc-app-bar>`. */
|
|
228
|
+
export type RCAppBarRef = HTMLElement & {
|
|
229
|
+
variant: 'compact' | 'expanded';
|
|
230
|
+
scrollBehavior: 'pinned' | 'collapse' | 'hide';
|
|
231
|
+
scrolled: boolean | undefined;
|
|
232
|
+
scrollTarget: Element | Document | Window | string | null;
|
|
233
|
+
scrollThreshold: number;
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
export type RCAppBarScrollDetail = {
|
|
237
|
+
scrolled: boolean;
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
/** Public API surface of `<rc-search-bar>`. */
|
|
241
|
+
export type RCSearchBarRef = HTMLElement & {
|
|
242
|
+
value: string;
|
|
243
|
+
defaultValue: string | undefined;
|
|
244
|
+
debounce: number;
|
|
245
|
+
clearLabel: string;
|
|
246
|
+
placeholder: string | undefined;
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
export type RCSearchBarInputDetail = {
|
|
250
|
+
value: string;
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
// ---- JSX augmentation -------------------------------------------------------
|
|
254
|
+
|
|
255
|
+
declare module 'solid-js' {
|
|
256
|
+
namespace JSX {
|
|
257
|
+
interface IntrinsicElements {
|
|
258
|
+
'rc-disclosure': JSX.HTMLAttributes<RCDisclosureRef> & {
|
|
259
|
+
open?: boolean | string;
|
|
260
|
+
fragment?: boolean | string;
|
|
261
|
+
'on:rc-disclosure-toggle'?: (e: CustomEvent<RCDisclosureToggleDetail>) => void;
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
'rc-accordion': JSX.HTMLAttributes<RCAccordionRef> & {
|
|
265
|
+
name?: string;
|
|
266
|
+
'on:rc-disclosure-toggle'?: (e: CustomEvent<RCDisclosureToggleDetail>) => void;
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
'rc-listbox': JSX.HTMLAttributes<RCListboxRef> & {
|
|
270
|
+
multiple?: boolean | string;
|
|
271
|
+
'filter-strategy'?: 'prefix' | 'contains';
|
|
272
|
+
value?: RCSelectValue;
|
|
273
|
+
defaultValue?: RCSelectValue;
|
|
274
|
+
options?: RCSelectOption[];
|
|
275
|
+
'prop:value'?: RCSelectValue | undefined;
|
|
276
|
+
'prop:defaultValue'?: RCSelectValue | undefined;
|
|
277
|
+
'prop:options'?: RCSelectOption[] | undefined;
|
|
278
|
+
'on:rc-listbox-change'?: (e: CustomEvent<RCListboxChangeDetail>) => void;
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
'rc-select': JSX.HTMLAttributes<RCSelectRef> & {
|
|
282
|
+
open?: boolean | string;
|
|
283
|
+
multiple?: boolean | string;
|
|
284
|
+
disabled?: boolean | string;
|
|
285
|
+
placeholder?: string;
|
|
286
|
+
display?: 'auto' | 'chips' | 'compact';
|
|
287
|
+
value?: RCSelectValue;
|
|
288
|
+
defaultValue?: RCSelectValue;
|
|
289
|
+
options?: RCSelectOption[];
|
|
290
|
+
'prop:value'?: RCSelectValue | undefined;
|
|
291
|
+
'prop:defaultValue'?: RCSelectValue | undefined;
|
|
292
|
+
'prop:options'?: RCSelectOption[] | undefined;
|
|
293
|
+
'on:rc-select-change'?: (e: CustomEvent<RCSelectChangeDetail>) => void;
|
|
294
|
+
'on:rc-select-open'?: (e: CustomEvent) => void;
|
|
295
|
+
'on:rc-select-close'?: (e: CustomEvent) => void;
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
'rc-combobox': JSX.HTMLAttributes<RCComboboxRef> & {
|
|
299
|
+
open?: boolean | string;
|
|
300
|
+
multiple?: boolean | string;
|
|
301
|
+
disabled?: boolean | string;
|
|
302
|
+
placeholder?: string;
|
|
303
|
+
display?: 'auto' | 'chips' | 'compact';
|
|
304
|
+
allowcreate?: boolean | string;
|
|
305
|
+
'filter-strategy'?: 'prefix' | 'contains';
|
|
306
|
+
value?: RCSelectValue;
|
|
307
|
+
defaultValue?: RCSelectValue;
|
|
308
|
+
options?: RCSelectOption[];
|
|
309
|
+
'prop:value'?: RCSelectValue | undefined;
|
|
310
|
+
'prop:defaultValue'?: RCSelectValue | undefined;
|
|
311
|
+
'prop:options'?: RCSelectOption[] | undefined;
|
|
312
|
+
'on:rc-select-change'?: (e: CustomEvent<RCSelectChangeDetail>) => void;
|
|
313
|
+
'on:rc-select-open'?: (e: CustomEvent) => void;
|
|
314
|
+
'on:rc-select-close'?: (e: CustomEvent) => void;
|
|
315
|
+
'on:rc-combobox-create'?: (e: CustomEvent<{ text: string }>) => void;
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
'rc-dialog': JSX.HTMLAttributes<RCDialogRef> & {
|
|
319
|
+
open?: boolean | string;
|
|
320
|
+
defaultOpen?: boolean | string;
|
|
321
|
+
'prop:open'?: boolean | undefined;
|
|
322
|
+
'prop:defaultOpen'?: boolean | undefined;
|
|
323
|
+
movable?: boolean | string;
|
|
324
|
+
'move-handle'?: string;
|
|
325
|
+
'move-bounds'?: 'viewport' | 'parent';
|
|
326
|
+
'move-step'?: number | string;
|
|
327
|
+
resize?: 'none' | 'both' | 'horizontal' | 'vertical';
|
|
328
|
+
'resize-threshold'?: number | string;
|
|
329
|
+
'resize-step'?: number | string;
|
|
330
|
+
'closed-by'?: 'any' | 'closerequest' | 'none';
|
|
331
|
+
'light-dismiss'?: boolean | string;
|
|
332
|
+
'on:rc-dialog-open'?: (e: CustomEvent) => void;
|
|
333
|
+
'on:rc-dialog-toggle'?: (e: CustomEvent<RCDialogToggleDetail>) => void;
|
|
334
|
+
'on:rc-dialog-close'?: (e: CustomEvent<{ returnValue: string }>) => void;
|
|
335
|
+
'on:rc-dialog-request-close'?: (e: CustomEvent<{ returnValue: string }>) => void;
|
|
336
|
+
'on:rc-dialog-cancel'?: (e: CustomEvent) => void;
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
'rc-menu': JSX.HTMLAttributes<RCMenuRef> & {
|
|
340
|
+
label?: string;
|
|
341
|
+
'on:rc-menu-activate'?: (e: CustomEvent<RCMenuActivateDetail>) => void;
|
|
342
|
+
'on:rc-menu-close'?: (e: CustomEvent<{ reason: 'escape' }>) => void;
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
'rc-menu-button': JSX.HTMLAttributes<RCMenuButtonRef> & {
|
|
346
|
+
open?: boolean | string;
|
|
347
|
+
defaultOpen?: boolean | string;
|
|
348
|
+
'prop:open'?: boolean | undefined;
|
|
349
|
+
'prop:defaultOpen'?: boolean | undefined;
|
|
350
|
+
orientation?: 'horizontal' | 'vertical';
|
|
351
|
+
'on:rc-menu-button-toggle'?: (e: CustomEvent<{ open: boolean }>) => void;
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
'rc-menubar': JSX.HTMLAttributes<RCMenubarRef>;
|
|
355
|
+
|
|
356
|
+
'rc-toolbar': JSX.HTMLAttributes<RCToolbarRef> & {
|
|
357
|
+
label?: string;
|
|
358
|
+
orientation?: string;
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
'rc-slider': JSX.HTMLAttributes<RCSliderRef> & {
|
|
362
|
+
min?: number | string;
|
|
363
|
+
max?: number | string;
|
|
364
|
+
step?: number | string;
|
|
365
|
+
value?: number | string;
|
|
366
|
+
defaultValue?: number | string;
|
|
367
|
+
'default-value'?: number | string;
|
|
368
|
+
'prop:value'?: number | undefined;
|
|
369
|
+
'prop:defaultValue'?: number | undefined;
|
|
370
|
+
disabled?: boolean | string;
|
|
371
|
+
readonly?: boolean | string;
|
|
372
|
+
display?: 'float' | 'inline-start' | 'inline-end';
|
|
373
|
+
'value-text'?: string;
|
|
374
|
+
orientation?: 'horizontal' | 'vertical';
|
|
375
|
+
'on:rc-slider-input'?: (e: CustomEvent<{ value: number }>) => void;
|
|
376
|
+
'on:rc-slider-change'?: (e: CustomEvent<{ value: number }>) => void;
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
'rc-range-slider': JSX.HTMLAttributes<RCRangeSliderRef> & {
|
|
380
|
+
min?: number | string;
|
|
381
|
+
max?: number | string;
|
|
382
|
+
step?: number | string;
|
|
383
|
+
'prop:value'?: [number, number] | undefined;
|
|
384
|
+
'prop:defaultValue'?: [number, number] | undefined;
|
|
385
|
+
disabled?: boolean | string;
|
|
386
|
+
'low-label'?: string;
|
|
387
|
+
'high-label'?: string;
|
|
388
|
+
'low-value-text'?: string;
|
|
389
|
+
'high-value-text'?: string;
|
|
390
|
+
display?: 'float' | 'inline-start' | 'inline-end';
|
|
391
|
+
orientation?: 'horizontal' | 'vertical';
|
|
392
|
+
'on:rc-range-slider-input'?: (e: CustomEvent<{ value: [number, number] }>) => void;
|
|
393
|
+
'on:rc-range-slider-change'?: (e: CustomEvent<{ value: [number, number] }>) => void;
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
'rc-transfer-list': JSX.HTMLAttributes<RCTransferListRef> & {
|
|
397
|
+
multiple?: boolean | string;
|
|
398
|
+
'available-label'?: string;
|
|
399
|
+
'selected-label'?: string;
|
|
400
|
+
'prop:available'?: RCTransferListOption[] | undefined;
|
|
401
|
+
'prop:selected'?: RCTransferListOption[] | undefined;
|
|
402
|
+
'prop:defaultSelected'?: RCTransferListOption[] | undefined;
|
|
403
|
+
'on:rc-transfer-list-change'?: (e: CustomEvent<{ selected: RCTransferListOption[] }>) => void;
|
|
404
|
+
};
|
|
405
|
+
|
|
406
|
+
'rc-splitter': JSX.HTMLAttributes<RCSplitterRef> & {
|
|
407
|
+
label?: string;
|
|
408
|
+
orientation?: 'horizontal' | 'vertical';
|
|
409
|
+
mode?: 'length' | 'percent';
|
|
410
|
+
step?: number | string;
|
|
411
|
+
value?: number | string;
|
|
412
|
+
defaultValue?: number | string;
|
|
413
|
+
'default-value'?: number | string;
|
|
414
|
+
'prop:value'?: number | undefined;
|
|
415
|
+
'prop:defaultValue'?: number | undefined;
|
|
416
|
+
fixed?: boolean | string;
|
|
417
|
+
'on:rc-splitter-change'?: (e: CustomEvent<{ value: number; valueText: string }>) => void;
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
'rc-editor-toolbar': JSX.HTMLAttributes<HTMLElement> & {
|
|
421
|
+
label?: string;
|
|
422
|
+
'on:rc-toolbar-action'?: (e: CustomEvent<{ action: string }>) => void;
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
'rc-text-editor': JSX.HTMLAttributes<RCTextEditorRef> & {
|
|
426
|
+
value?: string;
|
|
427
|
+
defaultValue?: string;
|
|
428
|
+
plugin?: RCTextareaPlugin | null;
|
|
429
|
+
'prop:value'?: string | undefined;
|
|
430
|
+
'prop:defaultValue'?: string | undefined;
|
|
431
|
+
'prop:plugin'?: RCTextareaPlugin | null;
|
|
432
|
+
toolbar?: boolean | string;
|
|
433
|
+
markdown?: boolean | string;
|
|
434
|
+
preview?: boolean | string;
|
|
435
|
+
'default-preview'?: boolean | string;
|
|
436
|
+
'prop:preview'?: boolean | undefined;
|
|
437
|
+
'prop:defaultPreview'?: boolean | undefined;
|
|
438
|
+
'line-numbers'?: boolean | string;
|
|
439
|
+
'list-numbers'?: boolean | string;
|
|
440
|
+
gutter?: boolean | string;
|
|
441
|
+
'word-wrap'?: boolean | string;
|
|
442
|
+
'auto-grow'?: boolean | string;
|
|
443
|
+
'read-only'?: boolean | string;
|
|
444
|
+
label?: string;
|
|
445
|
+
'on:rc-textarea-change'?: (e: CustomEvent<{ value: string }>) => void;
|
|
446
|
+
'on:rc-preview-change'?: (e: CustomEvent<{ preview: boolean }>) => void;
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
'rc-fab': JSX.HTMLAttributes<HTMLElement> & {
|
|
450
|
+
variant?: 'regular' | 'extended';
|
|
451
|
+
label?: string;
|
|
452
|
+
disabled?: boolean | string;
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
'rc-app-bar': JSX.HTMLAttributes<RCAppBarRef> & {
|
|
456
|
+
variant?: 'compact' | 'expanded';
|
|
457
|
+
'scroll-behavior'?: 'pinned' | 'collapse' | 'hide';
|
|
458
|
+
'scroll-target'?: string;
|
|
459
|
+
'scroll-threshold'?: number | string;
|
|
460
|
+
'prop:scrolled'?: boolean | undefined;
|
|
461
|
+
'prop:scrollTarget'?: Element | Document | Window | string | null;
|
|
462
|
+
'on:rc-app-bar-scroll'?: (e: CustomEvent<RCAppBarScrollDetail>) => void;
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
'rc-search-bar': JSX.HTMLAttributes<RCSearchBarRef> & {
|
|
466
|
+
debounce?: number | string;
|
|
467
|
+
'clear-label'?: string;
|
|
468
|
+
placeholder?: string;
|
|
469
|
+
'default-value'?: string;
|
|
470
|
+
'prop:value'?: string | undefined;
|
|
471
|
+
'prop:defaultValue'?: string | undefined;
|
|
472
|
+
'on:rc-search-bar-input'?: (e: CustomEvent<RCSearchBarInputDetail>) => void;
|
|
473
|
+
'on:rc-search-bar-clear'?: (e: CustomEvent) => void;
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
'rc-textarea': JSX.HTMLAttributes<RCTextareaRef> & {
|
|
477
|
+
value?: string;
|
|
478
|
+
defaultValue?: string;
|
|
479
|
+
plugin?: RCTextareaPlugin | null;
|
|
480
|
+
'prop:value'?: string | undefined;
|
|
481
|
+
'prop:defaultValue'?: string | undefined;
|
|
482
|
+
'prop:plugin'?: RCTextareaPlugin | null;
|
|
483
|
+
'line-numbers'?: boolean | string;
|
|
484
|
+
'list-numbers'?: boolean | string;
|
|
485
|
+
gutter?: boolean | string;
|
|
486
|
+
'word-wrap'?: boolean | string;
|
|
487
|
+
'auto-grow'?: boolean | string;
|
|
488
|
+
'read-only'?: boolean | string;
|
|
489
|
+
label?: string;
|
|
490
|
+
'on:rc-textarea-change'?: (e: CustomEvent<{ value: string }>) => void;
|
|
491
|
+
'on:rc-textarea-focus'?: (e: CustomEvent) => void;
|
|
492
|
+
'on:rc-textarea-blur'?: (e: CustomEvent) => void;
|
|
493
|
+
'on:rc-textarea-select'?: (e: CustomEvent<{ selectionStart: number; selectionEnd: number }>) => void;
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|