@loomlyne/ui-system-react 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +18 -2
- package/dist/Avatar.d.ts +21 -0
- package/dist/Icon.d.ts +448 -0
- package/dist/Logo.d.ts +33 -0
- package/dist/Motion.d.ts +40 -0
- package/dist/Root.d.ts +64 -0
- package/dist/bundle.d.ts +2 -0
- package/dist/context.d.ts +13 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +8977 -0
- package/dist/nav/back.d.ts +59 -0
- package/dist/nav/front.d.ts +69 -0
- package/dist/nav/shared.d.ts +48 -0
- package/dist/primitives.d.ts +243 -0
- package/dist/ui.css +485 -0
- package/dist/uis.bundle.js +176 -0
- package/package.json +53 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Koussay Zayani
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @loomlyne/ui-system-react
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
React components for [UI System](https://github.com/Loomlyne/ui-system): `Root` (theme provider), `Logo`, primitives, frontend navs and backend app shells, all themed by one `ui.config.json`.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm i @loomlyne/ui-system-react @loomlyne/ui-system-core
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import '@loomlyne/ui-system-react/ui.css';
|
|
11
|
+
import { Root, Button } from '@loomlyne/ui-system-react';
|
|
12
|
+
import config from './ui.config.json';
|
|
13
|
+
|
|
14
|
+
export default function App() {
|
|
15
|
+
return <Root config={config}><Button>Save</Button></Root>;
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`@loomlyne/ui-system-react/bundle` is a browser build exposing `window.UIS` (React from `window.React`). Needs React 18 or later. ESM only. Playground: https://loomlyne.github.io/ui-system/ · MIT
|
package/dist/Avatar.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { AvatarStyle } from '@loomlyne/ui-system-core';
|
|
3
|
+
export declare const AVATAR_STYLES: readonly ["notionists-neutral", "lorelei-neutral", "thumbs", "glass", "shapes", "initials"];
|
|
4
|
+
/** SVG markup for a seed in a DiceBear style (memoized). */
|
|
5
|
+
export declare function avatarSvg(seed: string, style?: Exclude<AvatarStyle, 'initials'>): string;
|
|
6
|
+
export interface AvatarProps {
|
|
7
|
+
name?: string;
|
|
8
|
+
initials?: string;
|
|
9
|
+
/** A real photo. When absent the DiceBear style from the theme is drawn. */
|
|
10
|
+
src?: string;
|
|
11
|
+
/** Override the theme's avatar style for this avatar. */
|
|
12
|
+
avatarStyle?: AvatarStyle;
|
|
13
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
}
|
|
17
|
+
export declare function Avatar({ name, initials, src, avatarStyle, size, className, style }: AvatarProps): React.JSX.Element;
|
|
18
|
+
export declare function AvatarGroup({ people, size }: {
|
|
19
|
+
people: AvatarProps[];
|
|
20
|
+
size?: AvatarProps['size'];
|
|
21
|
+
}): React.JSX.Element;
|
package/dist/Icon.d.ts
ADDED
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/** One Hugeicons node: [tag, attributes]. */
|
|
3
|
+
export type IconNode = readonly [string, Readonly<Record<string, string | number>>];
|
|
4
|
+
/**
|
|
5
|
+
* Every icon comes from Hugeicons (https://hugeicons.com, free stroke-rounded set, MIT,
|
|
6
|
+
* package @hugeicons/core-free-icons). Names stay short and stable; the Hugeicons glyph
|
|
7
|
+
* behind each name may change without breaking callers. Never draw a custom icon here:
|
|
8
|
+
* pick the closest Hugeicons glyph and add a name.
|
|
9
|
+
*/
|
|
10
|
+
declare const SOURCE: {
|
|
11
|
+
readonly menu: [string, {
|
|
12
|
+
[key: string]: string | number;
|
|
13
|
+
}][] | readonly (readonly [string, {
|
|
14
|
+
readonly [key: string]: string | number;
|
|
15
|
+
}])[];
|
|
16
|
+
readonly x: [string, {
|
|
17
|
+
[key: string]: string | number;
|
|
18
|
+
}][] | readonly (readonly [string, {
|
|
19
|
+
readonly [key: string]: string | number;
|
|
20
|
+
}])[];
|
|
21
|
+
readonly search: [string, {
|
|
22
|
+
[key: string]: string | number;
|
|
23
|
+
}][] | readonly (readonly [string, {
|
|
24
|
+
readonly [key: string]: string | number;
|
|
25
|
+
}])[];
|
|
26
|
+
readonly bell: [string, {
|
|
27
|
+
[key: string]: string | number;
|
|
28
|
+
}][] | readonly (readonly [string, {
|
|
29
|
+
readonly [key: string]: string | number;
|
|
30
|
+
}])[];
|
|
31
|
+
readonly home: [string, {
|
|
32
|
+
[key: string]: string | number;
|
|
33
|
+
}][] | readonly (readonly [string, {
|
|
34
|
+
readonly [key: string]: string | number;
|
|
35
|
+
}])[];
|
|
36
|
+
readonly grid: [string, {
|
|
37
|
+
[key: string]: string | number;
|
|
38
|
+
}][] | readonly (readonly [string, {
|
|
39
|
+
readonly [key: string]: string | number;
|
|
40
|
+
}])[];
|
|
41
|
+
readonly chart: [string, {
|
|
42
|
+
[key: string]: string | number;
|
|
43
|
+
}][] | readonly (readonly [string, {
|
|
44
|
+
readonly [key: string]: string | number;
|
|
45
|
+
}])[];
|
|
46
|
+
readonly activity: [string, {
|
|
47
|
+
[key: string]: string | number;
|
|
48
|
+
}][] | readonly (readonly [string, {
|
|
49
|
+
readonly [key: string]: string | number;
|
|
50
|
+
}])[];
|
|
51
|
+
readonly trend: [string, {
|
|
52
|
+
[key: string]: string | number;
|
|
53
|
+
}][] | readonly (readonly [string, {
|
|
54
|
+
readonly [key: string]: string | number;
|
|
55
|
+
}])[];
|
|
56
|
+
readonly users: [string, {
|
|
57
|
+
[key: string]: string | number;
|
|
58
|
+
}][] | readonly (readonly [string, {
|
|
59
|
+
readonly [key: string]: string | number;
|
|
60
|
+
}])[];
|
|
61
|
+
readonly user: [string, {
|
|
62
|
+
[key: string]: string | number;
|
|
63
|
+
}][] | readonly (readonly [string, {
|
|
64
|
+
readonly [key: string]: string | number;
|
|
65
|
+
}])[];
|
|
66
|
+
readonly settings: [string, {
|
|
67
|
+
[key: string]: string | number;
|
|
68
|
+
}][] | readonly (readonly [string, {
|
|
69
|
+
readonly [key: string]: string | number;
|
|
70
|
+
}])[];
|
|
71
|
+
readonly target: [string, {
|
|
72
|
+
[key: string]: string | number;
|
|
73
|
+
}][] | readonly (readonly [string, {
|
|
74
|
+
readonly [key: string]: string | number;
|
|
75
|
+
}])[];
|
|
76
|
+
readonly sliders: [string, {
|
|
77
|
+
[key: string]: string | number;
|
|
78
|
+
}][] | readonly (readonly [string, {
|
|
79
|
+
readonly [key: string]: string | number;
|
|
80
|
+
}])[];
|
|
81
|
+
readonly bag: [string, {
|
|
82
|
+
[key: string]: string | number;
|
|
83
|
+
}][] | readonly (readonly [string, {
|
|
84
|
+
readonly [key: string]: string | number;
|
|
85
|
+
}])[];
|
|
86
|
+
readonly cart: [string, {
|
|
87
|
+
[key: string]: string | number;
|
|
88
|
+
}][] | readonly (readonly [string, {
|
|
89
|
+
readonly [key: string]: string | number;
|
|
90
|
+
}])[];
|
|
91
|
+
readonly calendar: [string, {
|
|
92
|
+
[key: string]: string | number;
|
|
93
|
+
}][] | readonly (readonly [string, {
|
|
94
|
+
readonly [key: string]: string | number;
|
|
95
|
+
}])[];
|
|
96
|
+
readonly inbox: [string, {
|
|
97
|
+
[key: string]: string | number;
|
|
98
|
+
}][] | readonly (readonly [string, {
|
|
99
|
+
readonly [key: string]: string | number;
|
|
100
|
+
}])[];
|
|
101
|
+
readonly file: [string, {
|
|
102
|
+
[key: string]: string | number;
|
|
103
|
+
}][] | readonly (readonly [string, {
|
|
104
|
+
readonly [key: string]: string | number;
|
|
105
|
+
}])[];
|
|
106
|
+
readonly folder: [string, {
|
|
107
|
+
[key: string]: string | number;
|
|
108
|
+
}][] | readonly (readonly [string, {
|
|
109
|
+
readonly [key: string]: string | number;
|
|
110
|
+
}])[];
|
|
111
|
+
readonly plus: [string, {
|
|
112
|
+
[key: string]: string | number;
|
|
113
|
+
}][] | readonly (readonly [string, {
|
|
114
|
+
readonly [key: string]: string | number;
|
|
115
|
+
}])[];
|
|
116
|
+
readonly check: [string, {
|
|
117
|
+
[key: string]: string | number;
|
|
118
|
+
}][] | readonly (readonly [string, {
|
|
119
|
+
readonly [key: string]: string | number;
|
|
120
|
+
}])[];
|
|
121
|
+
readonly 'chevron-down': [string, {
|
|
122
|
+
[key: string]: string | number;
|
|
123
|
+
}][] | readonly (readonly [string, {
|
|
124
|
+
readonly [key: string]: string | number;
|
|
125
|
+
}])[];
|
|
126
|
+
readonly 'chevron-up': [string, {
|
|
127
|
+
[key: string]: string | number;
|
|
128
|
+
}][] | readonly (readonly [string, {
|
|
129
|
+
readonly [key: string]: string | number;
|
|
130
|
+
}])[];
|
|
131
|
+
readonly 'chevron-right': [string, {
|
|
132
|
+
[key: string]: string | number;
|
|
133
|
+
}][] | readonly (readonly [string, {
|
|
134
|
+
readonly [key: string]: string | number;
|
|
135
|
+
}])[];
|
|
136
|
+
readonly 'chevron-left': [string, {
|
|
137
|
+
[key: string]: string | number;
|
|
138
|
+
}][] | readonly (readonly [string, {
|
|
139
|
+
readonly [key: string]: string | number;
|
|
140
|
+
}])[];
|
|
141
|
+
readonly 'chevrons-updown': [string, {
|
|
142
|
+
[key: string]: string | number;
|
|
143
|
+
}][] | readonly (readonly [string, {
|
|
144
|
+
readonly [key: string]: string | number;
|
|
145
|
+
}])[];
|
|
146
|
+
readonly 'arrow-right': [string, {
|
|
147
|
+
[key: string]: string | number;
|
|
148
|
+
}][] | readonly (readonly [string, {
|
|
149
|
+
readonly [key: string]: string | number;
|
|
150
|
+
}])[];
|
|
151
|
+
readonly 'arrow-up-right': [string, {
|
|
152
|
+
[key: string]: string | number;
|
|
153
|
+
}][] | readonly (readonly [string, {
|
|
154
|
+
readonly [key: string]: string | number;
|
|
155
|
+
}])[];
|
|
156
|
+
readonly clock: [string, {
|
|
157
|
+
[key: string]: string | number;
|
|
158
|
+
}][] | readonly (readonly [string, {
|
|
159
|
+
readonly [key: string]: string | number;
|
|
160
|
+
}])[];
|
|
161
|
+
readonly pin: [string, {
|
|
162
|
+
[key: string]: string | number;
|
|
163
|
+
}][] | readonly (readonly [string, {
|
|
164
|
+
readonly [key: string]: string | number;
|
|
165
|
+
}])[];
|
|
166
|
+
readonly phone: [string, {
|
|
167
|
+
[key: string]: string | number;
|
|
168
|
+
}][] | readonly (readonly [string, {
|
|
169
|
+
readonly [key: string]: string | number;
|
|
170
|
+
}])[];
|
|
171
|
+
readonly mail: [string, {
|
|
172
|
+
[key: string]: string | number;
|
|
173
|
+
}][] | readonly (readonly [string, {
|
|
174
|
+
readonly [key: string]: string | number;
|
|
175
|
+
}])[];
|
|
176
|
+
readonly message: [string, {
|
|
177
|
+
[key: string]: string | number;
|
|
178
|
+
}][] | readonly (readonly [string, {
|
|
179
|
+
readonly [key: string]: string | number;
|
|
180
|
+
}])[];
|
|
181
|
+
readonly logout: [string, {
|
|
182
|
+
[key: string]: string | number;
|
|
183
|
+
}][] | readonly (readonly [string, {
|
|
184
|
+
readonly [key: string]: string | number;
|
|
185
|
+
}])[];
|
|
186
|
+
readonly command: [string, {
|
|
187
|
+
[key: string]: string | number;
|
|
188
|
+
}][] | readonly (readonly [string, {
|
|
189
|
+
readonly [key: string]: string | number;
|
|
190
|
+
}])[];
|
|
191
|
+
readonly sun: [string, {
|
|
192
|
+
[key: string]: string | number;
|
|
193
|
+
}][] | readonly (readonly [string, {
|
|
194
|
+
readonly [key: string]: string | number;
|
|
195
|
+
}])[];
|
|
196
|
+
readonly moon: [string, {
|
|
197
|
+
[key: string]: string | number;
|
|
198
|
+
}][] | readonly (readonly [string, {
|
|
199
|
+
readonly [key: string]: string | number;
|
|
200
|
+
}])[];
|
|
201
|
+
readonly sparkle: [string, {
|
|
202
|
+
[key: string]: string | number;
|
|
203
|
+
}][] | readonly (readonly [string, {
|
|
204
|
+
readonly [key: string]: string | number;
|
|
205
|
+
}])[];
|
|
206
|
+
readonly layers: [string, {
|
|
207
|
+
[key: string]: string | number;
|
|
208
|
+
}][] | readonly (readonly [string, {
|
|
209
|
+
readonly [key: string]: string | number;
|
|
210
|
+
}])[];
|
|
211
|
+
readonly box: [string, {
|
|
212
|
+
[key: string]: string | number;
|
|
213
|
+
}][] | readonly (readonly [string, {
|
|
214
|
+
readonly [key: string]: string | number;
|
|
215
|
+
}])[];
|
|
216
|
+
readonly card: [string, {
|
|
217
|
+
[key: string]: string | number;
|
|
218
|
+
}][] | readonly (readonly [string, {
|
|
219
|
+
readonly [key: string]: string | number;
|
|
220
|
+
}])[];
|
|
221
|
+
readonly help: [string, {
|
|
222
|
+
[key: string]: string | number;
|
|
223
|
+
}][] | readonly (readonly [string, {
|
|
224
|
+
readonly [key: string]: string | number;
|
|
225
|
+
}])[];
|
|
226
|
+
readonly filter: [string, {
|
|
227
|
+
[key: string]: string | number;
|
|
228
|
+
}][] | readonly (readonly [string, {
|
|
229
|
+
readonly [key: string]: string | number;
|
|
230
|
+
}])[];
|
|
231
|
+
readonly more: [string, {
|
|
232
|
+
[key: string]: string | number;
|
|
233
|
+
}][] | readonly (readonly [string, {
|
|
234
|
+
readonly [key: string]: string | number;
|
|
235
|
+
}])[];
|
|
236
|
+
readonly star: [string, {
|
|
237
|
+
[key: string]: string | number;
|
|
238
|
+
}][] | readonly (readonly [string, {
|
|
239
|
+
readonly [key: string]: string | number;
|
|
240
|
+
}])[];
|
|
241
|
+
readonly heart: [string, {
|
|
242
|
+
[key: string]: string | number;
|
|
243
|
+
}][] | readonly (readonly [string, {
|
|
244
|
+
readonly [key: string]: string | number;
|
|
245
|
+
}])[];
|
|
246
|
+
readonly globe: [string, {
|
|
247
|
+
[key: string]: string | number;
|
|
248
|
+
}][] | readonly (readonly [string, {
|
|
249
|
+
readonly [key: string]: string | number;
|
|
250
|
+
}])[];
|
|
251
|
+
readonly lock: [string, {
|
|
252
|
+
[key: string]: string | number;
|
|
253
|
+
}][] | readonly (readonly [string, {
|
|
254
|
+
readonly [key: string]: string | number;
|
|
255
|
+
}])[];
|
|
256
|
+
readonly download: [string, {
|
|
257
|
+
[key: string]: string | number;
|
|
258
|
+
}][] | readonly (readonly [string, {
|
|
259
|
+
readonly [key: string]: string | number;
|
|
260
|
+
}])[];
|
|
261
|
+
readonly upload: [string, {
|
|
262
|
+
[key: string]: string | number;
|
|
263
|
+
}][] | readonly (readonly [string, {
|
|
264
|
+
readonly [key: string]: string | number;
|
|
265
|
+
}])[];
|
|
266
|
+
readonly copy: [string, {
|
|
267
|
+
[key: string]: string | number;
|
|
268
|
+
}][] | readonly (readonly [string, {
|
|
269
|
+
readonly [key: string]: string | number;
|
|
270
|
+
}])[];
|
|
271
|
+
readonly edit: [string, {
|
|
272
|
+
[key: string]: string | number;
|
|
273
|
+
}][] | readonly (readonly [string, {
|
|
274
|
+
readonly [key: string]: string | number;
|
|
275
|
+
}])[];
|
|
276
|
+
readonly trash: [string, {
|
|
277
|
+
[key: string]: string | number;
|
|
278
|
+
}][] | readonly (readonly [string, {
|
|
279
|
+
readonly [key: string]: string | number;
|
|
280
|
+
}])[];
|
|
281
|
+
readonly eye: [string, {
|
|
282
|
+
[key: string]: string | number;
|
|
283
|
+
}][] | readonly (readonly [string, {
|
|
284
|
+
readonly [key: string]: string | number;
|
|
285
|
+
}])[];
|
|
286
|
+
readonly 'eye-off': [string, {
|
|
287
|
+
[key: string]: string | number;
|
|
288
|
+
}][] | readonly (readonly [string, {
|
|
289
|
+
readonly [key: string]: string | number;
|
|
290
|
+
}])[];
|
|
291
|
+
readonly link: [string, {
|
|
292
|
+
[key: string]: string | number;
|
|
293
|
+
}][] | readonly (readonly [string, {
|
|
294
|
+
readonly [key: string]: string | number;
|
|
295
|
+
}])[];
|
|
296
|
+
readonly bolt: [string, {
|
|
297
|
+
[key: string]: string | number;
|
|
298
|
+
}][] | readonly (readonly [string, {
|
|
299
|
+
readonly [key: string]: string | number;
|
|
300
|
+
}])[];
|
|
301
|
+
readonly tag: [string, {
|
|
302
|
+
[key: string]: string | number;
|
|
303
|
+
}][] | readonly (readonly [string, {
|
|
304
|
+
readonly [key: string]: string | number;
|
|
305
|
+
}])[];
|
|
306
|
+
readonly truck: [string, {
|
|
307
|
+
[key: string]: string | number;
|
|
308
|
+
}][] | readonly (readonly [string, {
|
|
309
|
+
readonly [key: string]: string | number;
|
|
310
|
+
}])[];
|
|
311
|
+
readonly image: [string, {
|
|
312
|
+
[key: string]: string | number;
|
|
313
|
+
}][] | readonly (readonly [string, {
|
|
314
|
+
readonly [key: string]: string | number;
|
|
315
|
+
}])[];
|
|
316
|
+
readonly play: [string, {
|
|
317
|
+
[key: string]: string | number;
|
|
318
|
+
}][] | readonly (readonly [string, {
|
|
319
|
+
readonly [key: string]: string | number;
|
|
320
|
+
}])[];
|
|
321
|
+
readonly sidebar: [string, {
|
|
322
|
+
[key: string]: string | number;
|
|
323
|
+
}][] | readonly (readonly [string, {
|
|
324
|
+
readonly [key: string]: string | number;
|
|
325
|
+
}])[];
|
|
326
|
+
readonly currency: [string, {
|
|
327
|
+
[key: string]: string | number;
|
|
328
|
+
}][] | readonly (readonly [string, {
|
|
329
|
+
readonly [key: string]: string | number;
|
|
330
|
+
}])[];
|
|
331
|
+
readonly briefcase: [string, {
|
|
332
|
+
[key: string]: string | number;
|
|
333
|
+
}][] | readonly (readonly [string, {
|
|
334
|
+
readonly [key: string]: string | number;
|
|
335
|
+
}])[];
|
|
336
|
+
readonly building: [string, {
|
|
337
|
+
[key: string]: string | number;
|
|
338
|
+
}][] | readonly (readonly [string, {
|
|
339
|
+
readonly [key: string]: string | number;
|
|
340
|
+
}])[];
|
|
341
|
+
readonly receipt: [string, {
|
|
342
|
+
[key: string]: string | number;
|
|
343
|
+
}][] | readonly (readonly [string, {
|
|
344
|
+
readonly [key: string]: string | number;
|
|
345
|
+
}])[];
|
|
346
|
+
readonly wallet: [string, {
|
|
347
|
+
[key: string]: string | number;
|
|
348
|
+
}][] | readonly (readonly [string, {
|
|
349
|
+
readonly [key: string]: string | number;
|
|
350
|
+
}])[];
|
|
351
|
+
readonly map: [string, {
|
|
352
|
+
[key: string]: string | number;
|
|
353
|
+
}][] | readonly (readonly [string, {
|
|
354
|
+
readonly [key: string]: string | number;
|
|
355
|
+
}])[];
|
|
356
|
+
readonly car: [string, {
|
|
357
|
+
[key: string]: string | number;
|
|
358
|
+
}][] | readonly (readonly [string, {
|
|
359
|
+
readonly [key: string]: string | number;
|
|
360
|
+
}])[];
|
|
361
|
+
readonly shield: [string, {
|
|
362
|
+
[key: string]: string | number;
|
|
363
|
+
}][] | readonly (readonly [string, {
|
|
364
|
+
readonly [key: string]: string | number;
|
|
365
|
+
}])[];
|
|
366
|
+
readonly share: [string, {
|
|
367
|
+
[key: string]: string | number;
|
|
368
|
+
}][] | readonly (readonly [string, {
|
|
369
|
+
readonly [key: string]: string | number;
|
|
370
|
+
}])[];
|
|
371
|
+
readonly refresh: [string, {
|
|
372
|
+
[key: string]: string | number;
|
|
373
|
+
}][] | readonly (readonly [string, {
|
|
374
|
+
readonly [key: string]: string | number;
|
|
375
|
+
}])[];
|
|
376
|
+
readonly ruler: [string, {
|
|
377
|
+
[key: string]: string | number;
|
|
378
|
+
}][] | readonly (readonly [string, {
|
|
379
|
+
readonly [key: string]: string | number;
|
|
380
|
+
}])[];
|
|
381
|
+
readonly bookmark: [string, {
|
|
382
|
+
[key: string]: string | number;
|
|
383
|
+
}][] | readonly (readonly [string, {
|
|
384
|
+
readonly [key: string]: string | number;
|
|
385
|
+
}])[];
|
|
386
|
+
readonly camera: [string, {
|
|
387
|
+
[key: string]: string | number;
|
|
388
|
+
}][] | readonly (readonly [string, {
|
|
389
|
+
readonly [key: string]: string | number;
|
|
390
|
+
}])[];
|
|
391
|
+
readonly store: [string, {
|
|
392
|
+
[key: string]: string | number;
|
|
393
|
+
}][] | readonly (readonly [string, {
|
|
394
|
+
readonly [key: string]: string | number;
|
|
395
|
+
}])[];
|
|
396
|
+
readonly list: [string, {
|
|
397
|
+
[key: string]: string | number;
|
|
398
|
+
}][] | readonly (readonly [string, {
|
|
399
|
+
readonly [key: string]: string | number;
|
|
400
|
+
}])[];
|
|
401
|
+
readonly route: [string, {
|
|
402
|
+
[key: string]: string | number;
|
|
403
|
+
}][] | readonly (readonly [string, {
|
|
404
|
+
readonly [key: string]: string | number;
|
|
405
|
+
}])[];
|
|
406
|
+
readonly 'check-circle': [string, {
|
|
407
|
+
[key: string]: string | number;
|
|
408
|
+
}][] | readonly (readonly [string, {
|
|
409
|
+
readonly [key: string]: string | number;
|
|
410
|
+
}])[];
|
|
411
|
+
readonly 'alert-circle': [string, {
|
|
412
|
+
[key: string]: string | number;
|
|
413
|
+
}][] | readonly (readonly [string, {
|
|
414
|
+
readonly [key: string]: string | number;
|
|
415
|
+
}])[];
|
|
416
|
+
readonly info: [string, {
|
|
417
|
+
[key: string]: string | number;
|
|
418
|
+
}][] | readonly (readonly [string, {
|
|
419
|
+
readonly [key: string]: string | number;
|
|
420
|
+
}])[];
|
|
421
|
+
readonly warning: [string, {
|
|
422
|
+
[key: string]: string | number;
|
|
423
|
+
}][] | readonly (readonly [string, {
|
|
424
|
+
readonly [key: string]: string | number;
|
|
425
|
+
}])[];
|
|
426
|
+
readonly 'x-circle': [string, {
|
|
427
|
+
[key: string]: string | number;
|
|
428
|
+
}][] | readonly (readonly [string, {
|
|
429
|
+
readonly [key: string]: string | number;
|
|
430
|
+
}])[];
|
|
431
|
+
readonly health: [string, {
|
|
432
|
+
[key: string]: string | number;
|
|
433
|
+
}][] | readonly (readonly [string, {
|
|
434
|
+
readonly [key: string]: string | number;
|
|
435
|
+
}])[];
|
|
436
|
+
};
|
|
437
|
+
export type IconName = keyof typeof SOURCE;
|
|
438
|
+
export declare const ICONS: Record<IconName, IconNode[]>;
|
|
439
|
+
/** Hugeicons stroke width. */
|
|
440
|
+
export declare const ICON_STROKE = 1.5;
|
|
441
|
+
export interface IconProps extends Omit<React.SVGProps<SVGSVGElement>, 'name'> {
|
|
442
|
+
name: IconName | string;
|
|
443
|
+
size?: number;
|
|
444
|
+
strokeWidth?: number;
|
|
445
|
+
label?: string;
|
|
446
|
+
}
|
|
447
|
+
export declare function Icon({ name, size, strokeWidth, label, className, style, ...rest }: IconProps): React.JSX.Element;
|
|
448
|
+
export {};
|
package/dist/Logo.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { LogoMark as MarkKind, LogoVariant } from '@loomlyne/ui-system-core';
|
|
3
|
+
export interface LogoMarkProps {
|
|
4
|
+
mark?: MarkKind;
|
|
5
|
+
initials?: string;
|
|
6
|
+
tone?: 'current' | 'primary';
|
|
7
|
+
src?: string;
|
|
8
|
+
svg?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Generated brand marks. They follow the system: the monogram's corners track
|
|
14
|
+
* the roundness setting, and color follows either the text color or primary.
|
|
15
|
+
*/
|
|
16
|
+
export declare function LogoMark(props: LogoMarkProps): React.JSX.Element | null;
|
|
17
|
+
export interface LogoProps {
|
|
18
|
+
variant?: LogoVariant;
|
|
19
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
20
|
+
wordmark?: string;
|
|
21
|
+
caption?: string;
|
|
22
|
+
mark?: MarkKind;
|
|
23
|
+
initials?: string;
|
|
24
|
+
tone?: 'current' | 'primary';
|
|
25
|
+
/** Full logo image; replaces the generated lockup. */
|
|
26
|
+
src?: string;
|
|
27
|
+
markSrc?: string;
|
|
28
|
+
href?: string;
|
|
29
|
+
className?: string;
|
|
30
|
+
style?: React.CSSProperties;
|
|
31
|
+
}
|
|
32
|
+
/** The brand logo in four arrangements: lockup, stacked, mark, wordmark. */
|
|
33
|
+
export declare function Logo(props: LogoProps): React.JSX.Element;
|
package/dist/Motion.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { animate, stagger, createTimeline, onScroll, utils, eases } from 'animejs';
|
|
3
|
+
/** anime.js, re-exported so projects and Claude Design (UIS.anime) use one engine. */
|
|
4
|
+
export declare const anime: {
|
|
5
|
+
animate: typeof animate;
|
|
6
|
+
stagger: typeof stagger;
|
|
7
|
+
createTimeline: typeof createTimeline;
|
|
8
|
+
onScroll: typeof onScroll;
|
|
9
|
+
utils: typeof utils;
|
|
10
|
+
eases: typeof eases;
|
|
11
|
+
};
|
|
12
|
+
export type RevealEffect = 'fade-up' | 'fade' | 'scale-in' | 'slide-left' | 'slide-right' | 'blur-in';
|
|
13
|
+
/** True when the theme allows motion and the visitor has not asked for less. */
|
|
14
|
+
export declare function useMotionEnabled(): boolean;
|
|
15
|
+
export interface RevealProps {
|
|
16
|
+
as?: 'div' | 'section' | 'ul' | 'span';
|
|
17
|
+
effect?: RevealEffect;
|
|
18
|
+
/** ms between children. When set, each direct child animates in turn. */
|
|
19
|
+
stagger?: number;
|
|
20
|
+
delay?: number;
|
|
21
|
+
duration?: number;
|
|
22
|
+
/** Start when scrolled into view (default) or immediately. */
|
|
23
|
+
trigger?: 'view' | 'mount';
|
|
24
|
+
className?: string;
|
|
25
|
+
style?: React.CSSProperties;
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
}
|
|
28
|
+
/** Entrance animation powered by anime.js. Follows config.motion and reduced motion. */
|
|
29
|
+
export declare function Reveal({ as, effect, stagger: gap, delay, duration, trigger, className, style, children }: RevealProps): React.JSX.Element;
|
|
30
|
+
/** Counts a number up when it comes into view (stats, prices, KPIs). */
|
|
31
|
+
export declare function CountUp({ to, from, decimals, prefix, suffix, duration, className, style }: {
|
|
32
|
+
to: number;
|
|
33
|
+
from?: number;
|
|
34
|
+
decimals?: number;
|
|
35
|
+
prefix?: string;
|
|
36
|
+
suffix?: string;
|
|
37
|
+
duration?: number;
|
|
38
|
+
className?: string;
|
|
39
|
+
style?: React.CSSProperties;
|
|
40
|
+
}): React.JSX.Element;
|
package/dist/Root.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type AvatarStyle, type BackNav, type Density, type MotionIntensity, type FloatSurface, type FontPresetId, type FrontNav, type LogoMark, type LogoVariant, type KindId, type LegacyPresetId, type Mode, type Placement, type PresetId, type ShadowDepth, type UIConfigInput } from '@loomlyne/ui-system-core';
|
|
3
|
+
/**
|
|
4
|
+
* Flat props mirror ui.config.json so the same component works from code
|
|
5
|
+
* (pass `config`) and from visual tools like Claude Design (pass attributes).
|
|
6
|
+
* Flat props win over `config`.
|
|
7
|
+
*/
|
|
8
|
+
export interface RootProps {
|
|
9
|
+
config?: UIConfigInput;
|
|
10
|
+
/** Preset, a way of designing ('ledger' round, 'atelier' sharp). Other props still win over it. */
|
|
11
|
+
preset?: PresetId | LegacyPresetId;
|
|
12
|
+
/** What you build (shop, app, website, booking, portfolio). Sets no values. */
|
|
13
|
+
kind?: KindId;
|
|
14
|
+
primary?: string;
|
|
15
|
+
accent?: string;
|
|
16
|
+
neutral?: string;
|
|
17
|
+
mode?: Mode;
|
|
18
|
+
roundness?: number;
|
|
19
|
+
pill?: boolean;
|
|
20
|
+
fontPreset?: FontPresetId;
|
|
21
|
+
displayFont?: string;
|
|
22
|
+
bodyFont?: string;
|
|
23
|
+
buttonCase?: 'normal' | 'upper';
|
|
24
|
+
density?: Density;
|
|
25
|
+
surface?: FloatSurface;
|
|
26
|
+
shadow?: ShadowDepth;
|
|
27
|
+
border?: 'hairline' | 'none';
|
|
28
|
+
projectName?: string;
|
|
29
|
+
wordmark?: string;
|
|
30
|
+
caption?: string;
|
|
31
|
+
initials?: string;
|
|
32
|
+
logoMark?: LogoMark;
|
|
33
|
+
logoVariant?: LogoVariant;
|
|
34
|
+
logoPlacement?: Placement;
|
|
35
|
+
logoSrc?: string;
|
|
36
|
+
markSrc?: string;
|
|
37
|
+
markSvg?: string;
|
|
38
|
+
wordmarkCase?: 'normal' | 'upper';
|
|
39
|
+
wordmarkFont?: 'display' | 'body';
|
|
40
|
+
markTone?: 'current' | 'primary';
|
|
41
|
+
avatarStyle?: AvatarStyle;
|
|
42
|
+
motion?: boolean;
|
|
43
|
+
motionIntensity?: MotionIntensity;
|
|
44
|
+
frontNav?: FrontNav;
|
|
45
|
+
backNav?: BackNav;
|
|
46
|
+
/** Inject the Google Fonts stylesheet for the active fonts. Default true. */
|
|
47
|
+
loadFonts?: boolean;
|
|
48
|
+
/** Paint the page background and text color. Default true. */
|
|
49
|
+
page?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Write the theme's CSS variables on this element. Default true. Set false
|
|
52
|
+
* when a stylesheet already provides them (theme.css, or the Claude Design
|
|
53
|
+
* tokens.css bridge) and Root should only supply brand context and fonts.
|
|
54
|
+
*/
|
|
55
|
+
vars?: boolean;
|
|
56
|
+
/** Stretch to the parent's height. */
|
|
57
|
+
fill?: boolean;
|
|
58
|
+
className?: string;
|
|
59
|
+
style?: React.CSSProperties;
|
|
60
|
+
children?: React.ReactNode;
|
|
61
|
+
}
|
|
62
|
+
export declare function configFromProps(p: RootProps): UIConfigInput;
|
|
63
|
+
/** Theme provider. Computes every variable from the config and scopes it to this subtree. */
|
|
64
|
+
export declare function Root(props: RootProps): React.JSX.Element;
|
package/dist/bundle.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from './index';
|
|
2
|
+
export { buildTheme, resolveConfig, DEFAULT_CONFIG, RADIUS_PRESETS, FONT_PRESETS, PRESETS, PRESET_ALIASES, presetId, KINDS, contrastReport, toCSS, toTailwind, toDesignTokens, allPresetFontsUrl, googleFontsUrl, contrast, scaleFrom, } from '@loomlyne/ui-system-core';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { resolveConfig, type BrandConfig, type Placement, type Theme } from '@loomlyne/ui-system-core';
|
|
3
|
+
export interface UISContextValue {
|
|
4
|
+
theme: Theme;
|
|
5
|
+
brand: BrandConfig;
|
|
6
|
+
}
|
|
7
|
+
export declare const UISContext: React.Context<UISContextValue>;
|
|
8
|
+
export declare const useUIS: () => UISContextValue;
|
|
9
|
+
export declare function cx(...parts: Array<string | false | null | undefined>): string;
|
|
10
|
+
/** Treat '', 'default' and undefined as "inherit from the theme". */
|
|
11
|
+
export declare function pick<T>(value: T | '' | 'default' | undefined | null, fallbackValue: T): T;
|
|
12
|
+
export declare function usePlacement(p?: Placement | 'default' | ''): Placement;
|
|
13
|
+
export { resolveConfig };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { Root, configFromProps, type RootProps } from './Root';
|
|
2
|
+
export { UISContext, useUIS, cx } from './context';
|
|
3
|
+
export { Icon, ICONS, ICON_STROKE, type IconName, type IconNode, type IconProps } from './Icon';
|
|
4
|
+
export { Logo, LogoMark, type LogoProps, type LogoMarkProps } from './Logo';
|
|
5
|
+
export * from './primitives';
|
|
6
|
+
export * from './nav/shared';
|
|
7
|
+
export * from './nav/front';
|
|
8
|
+
export * from './nav/back';
|
|
9
|
+
export { Reveal, CountUp, anime, useMotionEnabled, type RevealProps, type RevealEffect } from './Motion';
|