@atelier-ui/spec 0.0.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.json +27 -0
- package/src/index.d.ts +168 -0
- package/src/index.js +13 -0
- package/src/index.js.map +1 -0
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atelier-ui/spec",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Framework-agnostic TypeScript interfaces for the Atelier UI component API contract",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"atelier-ui",
|
|
7
|
+
"typescript",
|
|
8
|
+
"spec",
|
|
9
|
+
"interfaces"
|
|
10
|
+
],
|
|
11
|
+
"author": "Atelier UI",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/DominikPieper/atelier-ui.git",
|
|
16
|
+
"directory": "libs/spec"
|
|
17
|
+
},
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./src/index.d.ts",
|
|
21
|
+
"default": "./src/index.js"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"types": "./src/index.d.ts",
|
|
25
|
+
"main": "./src/index.js",
|
|
26
|
+
"type": "commonjs"
|
|
27
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @atelier-ui/spec
|
|
3
|
+
*
|
|
4
|
+
* Framework-agnostic TypeScript interfaces defining the public API contract
|
|
5
|
+
* for every llm-components component. Both the Angular and React libraries
|
|
6
|
+
* import from here so the compiler enforces parity.
|
|
7
|
+
*
|
|
8
|
+
* Angular: use the union types as `input<T>()` type parameters.
|
|
9
|
+
* React: extend the spec interface from the framework-specific props interface.
|
|
10
|
+
*/
|
|
11
|
+
export type LlmButtonVariant = 'primary' | 'secondary' | 'outline';
|
|
12
|
+
export type LlmButtonSize = 'sm' | 'md' | 'lg';
|
|
13
|
+
export interface LlmButtonSpec {
|
|
14
|
+
variant?: LlmButtonVariant;
|
|
15
|
+
size?: LlmButtonSize;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export type LlmBadgeVariant = 'default' | 'success' | 'warning' | 'danger' | 'info';
|
|
20
|
+
export type LlmBadgeSize = 'sm' | 'md';
|
|
21
|
+
export interface LlmBadgeSpec {
|
|
22
|
+
variant?: LlmBadgeVariant;
|
|
23
|
+
size?: LlmBadgeSize;
|
|
24
|
+
}
|
|
25
|
+
export type LlmAvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
26
|
+
export type LlmAvatarShape = 'circle' | 'square';
|
|
27
|
+
export type LlmAvatarStatus = 'online' | 'offline' | 'away' | 'busy' | '';
|
|
28
|
+
export interface LlmAvatarSpec {
|
|
29
|
+
src?: string;
|
|
30
|
+
alt?: string;
|
|
31
|
+
name?: string;
|
|
32
|
+
size?: LlmAvatarSize;
|
|
33
|
+
shape?: LlmAvatarShape;
|
|
34
|
+
status?: LlmAvatarStatus;
|
|
35
|
+
}
|
|
36
|
+
export interface LlmAvatarGroupSpec {
|
|
37
|
+
max?: number;
|
|
38
|
+
size?: LlmAvatarSize;
|
|
39
|
+
}
|
|
40
|
+
export type LlmCardVariant = 'elevated' | 'outlined' | 'flat';
|
|
41
|
+
export type LlmCardPadding = 'none' | 'sm' | 'md' | 'lg';
|
|
42
|
+
export interface LlmCardSpec {
|
|
43
|
+
variant?: LlmCardVariant;
|
|
44
|
+
padding?: LlmCardPadding;
|
|
45
|
+
}
|
|
46
|
+
export interface LlmFormFieldSpec {
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
readonly?: boolean;
|
|
49
|
+
invalid?: boolean;
|
|
50
|
+
required?: boolean;
|
|
51
|
+
name?: string;
|
|
52
|
+
}
|
|
53
|
+
export type LlmInputType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
|
|
54
|
+
export interface LlmInputSpec extends LlmFormFieldSpec {
|
|
55
|
+
type?: LlmInputType;
|
|
56
|
+
placeholder?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface LlmTextareaSpec extends LlmFormFieldSpec {
|
|
59
|
+
rows?: number;
|
|
60
|
+
placeholder?: string;
|
|
61
|
+
autoResize?: boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface LlmCheckboxSpec extends LlmFormFieldSpec {
|
|
64
|
+
checked?: boolean;
|
|
65
|
+
indeterminate?: boolean;
|
|
66
|
+
}
|
|
67
|
+
export interface LlmToggleSpec extends LlmFormFieldSpec {
|
|
68
|
+
checked?: boolean;
|
|
69
|
+
}
|
|
70
|
+
export interface LlmRadioSpec {
|
|
71
|
+
radioValue: string;
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
}
|
|
74
|
+
export interface LlmRadioGroupSpec extends LlmFormFieldSpec {
|
|
75
|
+
value?: string;
|
|
76
|
+
}
|
|
77
|
+
export interface LlmSelectSpec extends LlmFormFieldSpec {
|
|
78
|
+
placeholder?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface LlmOptionSpec {
|
|
81
|
+
optionValue: string;
|
|
82
|
+
disabled?: boolean;
|
|
83
|
+
}
|
|
84
|
+
export type LlmAlertVariant = 'info' | 'success' | 'warning' | 'danger';
|
|
85
|
+
export interface LlmAlertSpec {
|
|
86
|
+
variant?: LlmAlertVariant;
|
|
87
|
+
dismissible?: boolean;
|
|
88
|
+
}
|
|
89
|
+
export type LlmDialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
90
|
+
export interface LlmDialogSpec {
|
|
91
|
+
open?: boolean;
|
|
92
|
+
closeOnBackdrop?: boolean;
|
|
93
|
+
size?: LlmDialogSize;
|
|
94
|
+
}
|
|
95
|
+
export type LlmTabGroupVariant = 'default' | 'pills';
|
|
96
|
+
export interface LlmTabGroupSpec {
|
|
97
|
+
selectedIndex?: number;
|
|
98
|
+
variant?: LlmTabGroupVariant;
|
|
99
|
+
}
|
|
100
|
+
export interface LlmTabSpec {
|
|
101
|
+
label: string;
|
|
102
|
+
disabled?: boolean;
|
|
103
|
+
}
|
|
104
|
+
export type LlmAccordionGroupVariant = 'default' | 'bordered' | 'separated';
|
|
105
|
+
export interface LlmAccordionGroupSpec {
|
|
106
|
+
multi?: boolean;
|
|
107
|
+
variant?: LlmAccordionGroupVariant;
|
|
108
|
+
}
|
|
109
|
+
export interface LlmAccordionItemSpec {
|
|
110
|
+
expanded?: boolean;
|
|
111
|
+
disabled?: boolean;
|
|
112
|
+
}
|
|
113
|
+
export type LlmMenuVariant = 'default' | 'compact';
|
|
114
|
+
export interface LlmMenuSpec {
|
|
115
|
+
variant?: LlmMenuVariant;
|
|
116
|
+
}
|
|
117
|
+
export interface LlmMenuItemSpec {
|
|
118
|
+
disabled?: boolean;
|
|
119
|
+
}
|
|
120
|
+
export type LlmTooltipPosition = 'above' | 'below' | 'left' | 'right';
|
|
121
|
+
export interface LlmTooltipSpec {
|
|
122
|
+
llmTooltip: string;
|
|
123
|
+
llmTooltipPosition?: LlmTooltipPosition;
|
|
124
|
+
llmTooltipDisabled?: boolean;
|
|
125
|
+
llmTooltipShowDelay?: number;
|
|
126
|
+
llmTooltipHideDelay?: number;
|
|
127
|
+
}
|
|
128
|
+
export type LlmToastVariant = 'default' | 'success' | 'warning' | 'danger' | 'info';
|
|
129
|
+
export type LlmToastContainerPosition = 'top-right' | 'top-center' | 'bottom-right' | 'bottom-center';
|
|
130
|
+
export interface LlmToastOptions {
|
|
131
|
+
variant?: LlmToastVariant;
|
|
132
|
+
duration?: number;
|
|
133
|
+
dismissible?: boolean;
|
|
134
|
+
}
|
|
135
|
+
export type LlmSkeletonVariant = 'text' | 'circular' | 'rectangular';
|
|
136
|
+
export interface LlmSkeletonSpec {
|
|
137
|
+
variant?: LlmSkeletonVariant;
|
|
138
|
+
width?: string;
|
|
139
|
+
height?: string;
|
|
140
|
+
animated?: boolean;
|
|
141
|
+
}
|
|
142
|
+
export interface LlmBreadcrumbItemSpec {
|
|
143
|
+
href?: string;
|
|
144
|
+
current?: boolean;
|
|
145
|
+
}
|
|
146
|
+
export interface LlmPaginationSpec {
|
|
147
|
+
page?: number;
|
|
148
|
+
pageCount?: number;
|
|
149
|
+
siblingCount?: number;
|
|
150
|
+
showFirstLast?: boolean;
|
|
151
|
+
}
|
|
152
|
+
export type LlmProgressVariant = 'default' | 'success' | 'warning' | 'danger';
|
|
153
|
+
export type LlmProgressSize = 'sm' | 'md' | 'lg';
|
|
154
|
+
export interface LlmProgressSpec {
|
|
155
|
+
value?: number;
|
|
156
|
+
max?: number;
|
|
157
|
+
variant?: LlmProgressVariant;
|
|
158
|
+
size?: LlmProgressSize;
|
|
159
|
+
indeterminate?: boolean;
|
|
160
|
+
}
|
|
161
|
+
export type LlmDrawerPosition = 'left' | 'right' | 'top' | 'bottom';
|
|
162
|
+
export type LlmDrawerSize = 'sm' | 'md' | 'lg' | 'full';
|
|
163
|
+
export interface LlmDrawerSpec {
|
|
164
|
+
open?: boolean;
|
|
165
|
+
position?: LlmDrawerPosition;
|
|
166
|
+
size?: LlmDrawerSize;
|
|
167
|
+
closeOnBackdrop?: boolean;
|
|
168
|
+
}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @atelier-ui/spec
|
|
4
|
+
*
|
|
5
|
+
* Framework-agnostic TypeScript interfaces defining the public API contract
|
|
6
|
+
* for every llm-components component. Both the Angular and React libraries
|
|
7
|
+
* import from here so the compiler enforces parity.
|
|
8
|
+
*
|
|
9
|
+
* Angular: use the union types as `input<T>()` type parameters.
|
|
10
|
+
* React: extend the spec interface from the framework-specific props interface.
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/spec/src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG"}
|