@duyluonganduin/acl-web-components 0.0.11 → 0.0.13

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/dist/jsx.d.ts ADDED
@@ -0,0 +1,366 @@
1
+ /**
2
+ * React JSX type declarations for @duyluonganduin/acl-web-components.
3
+ *
4
+ * Augments React.JSX.IntrinsicElements so TypeScript accepts custom elements
5
+ * (e.g. <anduin-button>) in .tsx files without errors.
6
+ *
7
+ * Usage — add one of these to your project:
8
+ * // tsconfig.json → "types": ["@duyluonganduin/acl-web-components/react"]
9
+ * // or a .d.ts file → /// <reference types="@duyluonganduin/acl-web-components/react" />
10
+ */
11
+
12
+ import type { HTMLAttributes } from 'react'
13
+
14
+ type Base = HTMLAttributes<HTMLElement>
15
+
16
+ declare module 'react' {
17
+ // eslint-disable-next-line @typescript-eslint/no-namespace
18
+ namespace JSX {
19
+ interface IntrinsicElements {
20
+ // ── anduin-spinner ────────────────────────────────────────────────────
21
+ 'anduin-spinner': Base & {
22
+ /** 'small' | 'medium' | 'large' | 'extraLarge' (default: 'medium') */
23
+ size?: string
24
+ /** 0–1 fill fraction; omit for indeterminate */
25
+ percent?: string
26
+ }
27
+
28
+ // ── anduin-icon ───────────────────────────────────────────────────────
29
+ 'anduin-icon': Base & {
30
+ /** Icon name from the icon set */
31
+ name?: string
32
+ /** Pixel size (default: 16) */
33
+ size?: number | string
34
+ }
35
+
36
+ // ── anduin-badge ──────────────────────────────────────────────────────
37
+ 'anduin-badge': Base & {
38
+ /** 'gray' | 'primary' | 'success' | 'warning' | 'danger'
39
+ * | 'boldGray' | 'boldPrimary' | 'boldSuccess' | 'boldWarning' | 'boldDanger'
40
+ * (default: 'gray') */
41
+ variant?: string
42
+ }
43
+
44
+ // ── anduin-badge-count ────────────────────────────────────────────────
45
+ 'anduin-badge-count': Base & {
46
+ /** Same values as anduin-badge (default: 'gray') */
47
+ variant?: string
48
+ /** Numeric count; hidden when 0, capped at '99+' */
49
+ count?: number | string
50
+ }
51
+
52
+ // ── anduin-button ─────────────────────────────────────────────────────
53
+ 'anduin-button': Base & {
54
+ /** 'filled' | 'outlined' | 'plain' | 'text' (default: 'filled') */
55
+ appearance?: 'filled' | 'outlined' | 'plain' | 'text'
56
+ /** 'gray0' | 'gray9' | 'primary' | 'danger' | 'success' | 'warning' */
57
+ variant?: 'gray0' | 'gray9' | 'primary' | 'danger' | 'success' | 'warning'
58
+ /** 'tiny' | 'extraSmall' | 'small' | 'medium' | 'large' | 'free' (default: 'medium') */
59
+ size?: 'tiny' | 'extraSmall' | 'small' | 'medium' | 'large' | 'free'
60
+ disabled?: boolean | string
61
+ loading?: boolean | string
62
+ 'full-width'?: boolean | string
63
+ pill?: boolean | string
64
+ selected?: boolean | string
65
+ /** Renders an <a> tag when provided */
66
+ href?: string
67
+ 'open-new-tab'?: boolean | string
68
+ download?: string
69
+ /** anduin-icon name placed before the label */
70
+ 'start-icon'?: string
71
+ /** anduin-icon name placed after the label */
72
+ 'end-icon'?: string
73
+ /** aria-label shorthand */
74
+ label?: string
75
+ }
76
+
77
+ // ── anduin-callout ────────────────────────────────────────────────────
78
+ 'anduin-callout': Base & {
79
+ /** 'gray' | 'primary' | 'success' | 'danger' | 'warning' (default: 'gray') */
80
+ variant?: string
81
+ }
82
+
83
+ // ── anduin-divider ────────────────────────────────────────────────────
84
+ 'anduin-divider': Base & {
85
+ /** 'horizontal' | 'vertical' (default: 'horizontal') */
86
+ direction?: 'horizontal' | 'vertical'
87
+ }
88
+
89
+ // ── anduin-dot ────────────────────────────────────────────────────────
90
+ 'anduin-dot': Base & {
91
+ /** 'gray' | 'primary' | 'success' | 'danger' | 'warning' (default: 'gray') */
92
+ variant?: string
93
+ }
94
+
95
+ // ── anduin-progress ───────────────────────────────────────────────────
96
+ 'anduin-progress': Base & {
97
+ /** 0–1 fill fraction; omit for indeterminate */
98
+ percent?: string
99
+ /** 'medium' | 'large' (default: 'medium') */
100
+ height?: string
101
+ }
102
+
103
+ // ── anduin-skeleton ───────────────────────────────────────────────────
104
+ 'anduin-skeleton': Base & {
105
+ /** 'pulse' | 'wave' (default: 'pulse') */
106
+ effect?: string
107
+ /** 'rectangle' | 'rounded' | 'circle' | 'text' (default: 'rectangle') */
108
+ shape?: string
109
+ height?: string
110
+ width?: string
111
+ /** Animation duration in ms (default: 1500) */
112
+ duration?: number | string
113
+ /** CSS font-size for shape='text' */
114
+ 'font-size'?: string
115
+ }
116
+
117
+ // ── anduin-loading-state ──────────────────────────────────────────────
118
+ 'anduin-loading-state': Base & {
119
+ /** CSS height of the container (default: '256px') */
120
+ height?: string
121
+ }
122
+
123
+ // ── anduin-field ──────────────────────────────────────────────────────
124
+ 'anduin-field': Base & {
125
+ /** 'vertical' | 'horizontal' (default: 'vertical') */
126
+ orientation?: 'vertical' | 'horizontal'
127
+ }
128
+
129
+ // ── anduin-field-label ────────────────────────────────────────────────
130
+ 'anduin-field-label': Base & {
131
+ /** id of the associated input (mirrors <label for="…">) */
132
+ htmlfor?: string
133
+ required?: boolean | string
134
+ }
135
+
136
+ // ── anduin-field-description ──────────────────────────────────────────
137
+ 'anduin-field-description': Base
138
+
139
+ // ── anduin-field-error ────────────────────────────────────────────────
140
+ 'anduin-field-error': Base
141
+
142
+ // ── anduin-field-group ────────────────────────────────────────────────
143
+ 'anduin-field-group': Base
144
+
145
+ // ── anduin-radio ──────────────────────────────────────────────────────
146
+ 'anduin-radio': Base & {
147
+ checked?: boolean | string
148
+ disabled?: boolean | string
149
+ readonly?: boolean | string
150
+ value?: string
151
+ name?: string
152
+ inputid?: string
153
+ }
154
+
155
+ // ── anduin-radio-group ────────────────────────────────────────────────
156
+ 'anduin-radio-group': Base & {
157
+ /** Currently selected value */
158
+ value?: string
159
+ name?: string
160
+ /** 'vertical' | 'horizontal' (default: 'vertical') */
161
+ orientation?: 'vertical' | 'horizontal'
162
+ }
163
+
164
+ // ── anduin-checkbox ───────────────────────────────────────────────────
165
+ 'anduin-checkbox': Base & {
166
+ checked?: boolean | string
167
+ disabled?: boolean | string
168
+ indeterminate?: boolean | string
169
+ readonly?: boolean | string
170
+ /** id linking this checkbox to an anduin-field-label */
171
+ inputid?: string
172
+ }
173
+
174
+ // ── anduin-input ──────────────────────────────────────────────────────
175
+ 'anduin-input': Base & {
176
+ value?: string
177
+ /** 'small' | 'default' | 'large' (default: 'default') */
178
+ size?: 'small' | 'default' | 'large'
179
+ disabled?: boolean | string
180
+ readonly?: boolean | string
181
+ placeholder?: string
182
+ /** id attribute on the inner <input> */
183
+ inputid?: string
184
+ /** 'valid' | 'invalid' | 'warning' | 'loading' */
185
+ status?: string
186
+ /** anduin-icon name shown on the left */
187
+ 'start-icon'?: string
188
+ /** anduin-icon name shown on the right */
189
+ 'end-icon'?: string
190
+ /** Show a clear button when value is non-empty */
191
+ clearable?: boolean | string
192
+ }
193
+
194
+ // ── anduin-textarea ───────────────────────────────────────────────────
195
+ 'anduin-textarea': Base & {
196
+ value?: string
197
+ disabled?: boolean | string
198
+ readonly?: boolean | string
199
+ placeholder?: string
200
+ /** id attribute on the inner <textarea> */
201
+ inputid?: string
202
+ rows?: number | string
203
+ /** 'valid' | 'invalid' | 'warning' | 'loading' */
204
+ status?: string
205
+ }
206
+
207
+ // ── anduin-popover ────────────────────────────────────────────────────
208
+ 'anduin-popover': Base & {
209
+ /** Whether the panel is open (default: false) */
210
+ open?: boolean | string
211
+ /** 'bottom-start' | 'bottom' | 'bottom-end' | 'top-start' | 'top' | 'top-end' (default: 'bottom-start') */
212
+ placement?: string
213
+ }
214
+
215
+ // ── anduin-menu ───────────────────────────────────────────────────────
216
+ 'anduin-menu': Base & {
217
+ /** Whether the menu is open (default: false) */
218
+ open?: boolean | string
219
+ /** 'bottom-start' | 'bottom' | 'bottom-end' | 'top-start' | 'top' | 'top-end' (default: 'bottom-start') */
220
+ placement?: string
221
+ }
222
+
223
+ // ── anduin-menu-item ──────────────────────────────────────────────────
224
+ 'anduin-menu-item': Base & {
225
+ /** anduin-icon name shown before the label */
226
+ icon?: string
227
+ /** 'default' | 'danger' (default: 'default') */
228
+ variant?: 'default' | 'danger'
229
+ disabled?: boolean | string
230
+ }
231
+
232
+ // ── anduin-tabs ───────────────────────────────────────────────────────
233
+ 'anduin-tabs': Base & {
234
+ /** Initially active tab value */
235
+ 'default-value'?: string
236
+ /** Controlled active tab value */
237
+ value?: string
238
+ /** Stretch tabs + active panel to fill parent height */
239
+ fill?: boolean | string
240
+ }
241
+
242
+ // ── anduin-tabs-list ──────────────────────────────────────────────────
243
+ 'anduin-tabs-list': Base & {
244
+ /** 'left' | 'center' | 'right' (default: 'left') */
245
+ alignment?: 'left' | 'center' | 'right'
246
+ }
247
+
248
+ // ── anduin-tab-trigger ────────────────────────────────────────────────
249
+ 'anduin-tab-trigger': Base & {
250
+ /** Must match a corresponding anduin-tab-content value */
251
+ value?: string
252
+ /** anduin-icon name */
253
+ 'start-icon'?: string
254
+ disabled?: boolean | string
255
+ /** Show a count badge on the trigger */
256
+ 'show-badge'?: boolean | string
257
+ /** Text shown inside the badge */
258
+ 'badge-count'?: string
259
+ }
260
+
261
+ // ── anduin-tab-content ────────────────────────────────────────────────
262
+ 'anduin-tab-content': Base & {
263
+ /** Must match a corresponding anduin-tab-trigger value */
264
+ value?: string
265
+ }
266
+
267
+ // ── anduin-tag ────────────────────────────────────────────────────────
268
+ 'anduin-tag': Base & {
269
+ /** See TagVariant in anduin-tag.ts for all accepted values (default: 'gray') */
270
+ variant?: string
271
+ /** anduin-icon name shown before the label */
272
+ icon?: string
273
+ disabled?: boolean | string
274
+ }
275
+
276
+ // ── anduin-tag-close ──────────────────────────────────────────────────
277
+ 'anduin-tag-close': Base
278
+
279
+ // ── anduin-tooltip ────────────────────────────────────────────────────
280
+ 'anduin-tooltip': Base & {
281
+ disabled?: boolean | string
282
+ /** e.g. 'top-center' | 'bottom-start' | 'right-end' … (default: 'top-center') */
283
+ placement?: string
284
+ }
285
+
286
+ // ── anduin-tooltip-trigger ────────────────────────────────────────────
287
+ 'anduin-tooltip-trigger': Base
288
+
289
+ // ── anduin-tooltip-content ────────────────────────────────────────────
290
+ 'anduin-tooltip-content': Base
291
+
292
+ // ── anduin-well ───────────────────────────────────────────────────────
293
+ 'anduin-well': Base & {
294
+ /** 'gray' | 'primary' | 'success' | 'danger' | 'warning' (default: 'gray') */
295
+ variant?: string
296
+ }
297
+
298
+ // ── anduin-well-close ─────────────────────────────────────────────────
299
+ 'anduin-well-close': Base
300
+
301
+ // ── anduin-modal ──────────────────────────────────────────────────────
302
+ 'anduin-modal': Base & {
303
+ /** Whether the modal is open */
304
+ open?: boolean | string
305
+ /** Modal title text */
306
+ heading?: string
307
+ /** Max-width preset: '480' | '600' | '720' | '960' | '1160', or any CSS value (default: '480') */
308
+ 'max-width'?: '480' | '600' | '720' | '960' | '1160' | string
309
+ /** Hide the header (title + close button) */
310
+ 'hide-header'?: boolean | string
311
+ /** Hide the footer slot container */
312
+ 'hide-footer'?: boolean | string
313
+ /** Cover the full viewport; hides overlay and removes border-radius */
314
+ fullscreen?: boolean | string
315
+ /** Fired when the modal should close (X, overlay click, or anduin-modal-close).
316
+ * Import MODAL_CLOSE_EVENT for the event name string.
317
+ * @example ref.current.addEventListener(MODAL_CLOSE_EVENT, () => setOpen(false)) */
318
+ }
319
+
320
+ // ── anduin-modal-close ────────────────────────────────────────────────
321
+ 'anduin-modal-close': Base
322
+
323
+ // ── anduin-avatar ─────────────────────────────────────────────────────
324
+ 'anduin-avatar': Base & {
325
+ /** Image URL */
326
+ src?: string
327
+ /** Name used for initials and color */
328
+ name?: string
329
+ /** Alt text for the image */
330
+ alt?: string
331
+ /** anduin-icon name to show instead of initials */
332
+ icon?: string
333
+ /** 16 | 20 | 24 | 32 (default: 32) */
334
+ size?: 16 | 20 | 24 | 32 | string
335
+ /** 'circle' | 'rounded' (default: 'circle') */
336
+ shape?: 'circle' | 'rounded'
337
+ }
338
+
339
+ // ── anduin-toast ──────────────────────────────────────────────────────
340
+ 'anduin-toast': Base & {
341
+ /** 'gray' | 'primary' | 'success' | 'warning' | 'danger' (default: 'gray') */
342
+ variant?: 'gray' | 'primary' | 'success' | 'warning' | 'danger'
343
+ /** Bold title text */
344
+ heading?: string
345
+ /** Body text (or use slot content) */
346
+ description?: string
347
+ }
348
+
349
+ // ── anduin-toaster ────────────────────────────────────────────────────
350
+ 'anduin-toaster': Base & {
351
+ /** 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' (default: 'top-right') */
352
+ position?: string
353
+ }
354
+
355
+ // ── anduin-file-icon ──────────────────────────────────────────────────
356
+ 'anduin-file-icon': Base & {
357
+ /** 'archive' | 'audio' | 'blueprint' | 'box' | 'csv' | 'excel' | 'folder'
358
+ * | 'folder-empty' | 'form' | 'generic' | 'image' | 'link' | 'pdf'
359
+ * | 'powerpoint' | 'signed' | 'text' | 'video' | 'word' */
360
+ type?: string
361
+ /** 16 | 24 | 32 (default: 32) */
362
+ size?: 16 | 24 | 32 | string
363
+ }
364
+ }
365
+ }
366
+ }
package/dist/react.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),t=require("@lit/react"),e=require("./anduin-toast-B-9dgTkL.cjs"),a=t.createComponent({react:n,tagName:"anduin-spinner",elementClass:e.AnduinSpinner}),o=t.createComponent({react:n,tagName:"anduin-icon",elementClass:e.AnduinIcon}),s=t.createComponent({react:n,tagName:"anduin-badge",elementClass:e.AnduinBadge}),l=t.createComponent({react:n,tagName:"anduin-badge-count",elementClass:e.AnduinBadgeCount}),i=t.createComponent({react:n,tagName:"anduin-button",elementClass:e.AnduinButton}),C=t.createComponent({react:n,tagName:"anduin-callout",elementClass:e.AnduinCallout}),r=t.createComponent({react:n,tagName:"anduin-divider",elementClass:e.AnduinDivider}),c=t.createComponent({react:n,tagName:"anduin-dot",elementClass:e.AnduinDot}),d=t.createComponent({react:n,tagName:"anduin-progress",elementClass:e.AnduinProgress}),m=t.createComponent({react:n,tagName:"anduin-skeleton",elementClass:e.AnduinSkeleton}),u=t.createComponent({react:n,tagName:"anduin-loading-state",elementClass:e.AnduinLoadingState}),g=t.createComponent({react:n,tagName:"anduin-field",elementClass:e.AnduinField}),A=t.createComponent({react:n,tagName:"anduin-field-label",elementClass:e.AnduinFieldLabel}),p=t.createComponent({react:n,tagName:"anduin-field-description",elementClass:e.AnduinFieldDescription}),N=t.createComponent({react:n,tagName:"anduin-field-error",elementClass:e.AnduinFieldError}),T=t.createComponent({react:n,tagName:"anduin-field-group",elementClass:e.AnduinFieldGroup}),E=t.createComponent({react:n,tagName:"anduin-radio",elementClass:e.AnduinRadio,events:{onChange:e.RADIO_CHANGE}}),_=t.createComponent({react:n,tagName:"anduin-radio-group",elementClass:e.AnduinRadioGroup,events:{onChange:e.RADIO_GROUP_CHANGE}}),L=t.createComponent({react:n,tagName:"anduin-checkbox",elementClass:e.AnduinCheckbox,events:{onChange:e.CHECKBOX_CHANGE}}),I=t.createComponent({react:n,tagName:"anduin-input",elementClass:e.AnduinInput,events:{onChange:e.INPUT_CHANGE,onClear:e.INPUT_CLEAR}}),G=t.createComponent({react:n,tagName:"anduin-textarea",elementClass:e.AnduinTextarea,events:{onChange:e.TEXTAREA_CHANGE}}),b=t.createComponent({react:n,tagName:"anduin-popover",elementClass:e.AnduinPopover}),v=t.createComponent({react:n,tagName:"anduin-popover-close",elementClass:e.AnduinPopoverClose}),O=t.createComponent({react:n,tagName:"anduin-menu",elementClass:e.AnduinMenu}),M=t.createComponent({react:n,tagName:"anduin-menu-item",elementClass:e.AnduinMenuItem,events:{onClick:e.MENU_ITEM_CLICK}}),R=t.createComponent({react:n,tagName:"anduin-modal",elementClass:e.AnduinModal,events:{onClose:e.MODAL_CLOSE_EVENT}}),H=t.createComponent({react:n,tagName:"anduin-modal-close",elementClass:e.AnduinModalClose}),S=t.createComponent({react:n,tagName:"anduin-tabs",elementClass:e.AnduinTabs,events:{onChange:e.TAB_CHANGE}}),P=t.createComponent({react:n,tagName:"anduin-tabs-list",elementClass:e.AnduinTabsList}),D=t.createComponent({react:n,tagName:"anduin-tab-trigger",elementClass:e.AnduinTabTrigger}),F=t.createComponent({react:n,tagName:"anduin-tab-content",elementClass:e.AnduinTabContent}),B=t.createComponent({react:n,tagName:"anduin-tag",elementClass:e.AnduinTag}),K=t.createComponent({react:n,tagName:"anduin-tag-close",elementClass:e.AnduinTagClose,events:{onClick:e.TAG_CLOSE_CLICK}}),U=t.createComponent({react:n,tagName:"anduin-tooltip",elementClass:e.AnduinTooltip}),k=t.createComponent({react:n,tagName:"anduin-tooltip-trigger",elementClass:e.AnduinTooltipTrigger}),h=t.createComponent({react:n,tagName:"anduin-tooltip-content",elementClass:e.AnduinTooltipContent}),W=t.createComponent({react:n,tagName:"anduin-well",elementClass:e.AnduinWell}),x=t.createComponent({react:n,tagName:"anduin-well-close",elementClass:e.AnduinWellClose,events:{onClick:e.WELL_CLOSE_CLICK}}),f=t.createComponent({react:n,tagName:"anduin-avatar",elementClass:e.AnduinAvatar}),X=t.createComponent({react:n,tagName:"anduin-file-icon",elementClass:e.AnduinFileIcon}),q=t.createComponent({react:n,tagName:"anduin-toast",elementClass:e.AnduinToast}),V=t.createComponent({react:n,tagName:"anduin-toaster",elementClass:e.AnduinToaster});exports.CHECKBOX_CHANGE=e.CHECKBOX_CHANGE;exports.INPUT_CHANGE=e.INPUT_CHANGE;exports.INPUT_CLEAR=e.INPUT_CLEAR;exports.MENU_ITEM_CLICK=e.MENU_ITEM_CLICK;exports.MODAL_CLOSE_EVENT=e.MODAL_CLOSE_EVENT;exports.RADIO_CHANGE=e.RADIO_CHANGE;exports.RADIO_GROUP_CHANGE=e.RADIO_GROUP_CHANGE;exports.TAB_CHANGE=e.TAB_CHANGE;exports.TAG_CLOSE_CLICK=e.TAG_CLOSE_CLICK;exports.TEXTAREA_CHANGE=e.TEXTAREA_CHANGE;exports.WELL_CLOSE_CLICK=e.WELL_CLOSE_CLICK;exports.Avatar=f;exports.Badge=s;exports.BadgeCount=l;exports.Button=i;exports.Callout=C;exports.Checkbox=L;exports.Divider=r;exports.Dot=c;exports.Field=g;exports.FieldDescription=p;exports.FieldError=N;exports.FieldGroup=T;exports.FieldLabel=A;exports.FileIcon=X;exports.Icon=o;exports.Input=I;exports.LoadingState=u;exports.Menu=O;exports.MenuItem=M;exports.Modal=R;exports.ModalClose=H;exports.Popover=b;exports.PopoverClose=v;exports.Progress=d;exports.Radio=E;exports.RadioGroup=_;exports.Skeleton=m;exports.Spinner=a;exports.TabContent=F;exports.TabTrigger=D;exports.Tabs=S;exports.TabsList=P;exports.Tag=B;exports.TagClose=K;exports.Textarea=G;exports.Toast=q;exports.Toaster=V;exports.Tooltip=U;exports.TooltipContent=h;exports.TooltipTrigger=k;exports.Well=W;exports.WellClose=x;