@duyluonganduin/acl-web-components 0.0.10 → 0.0.12

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,347 @@
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-checkbox ───────────────────────────────────────────────────
146
+ 'anduin-checkbox': Base & {
147
+ checked?: boolean | string
148
+ disabled?: boolean | string
149
+ indeterminate?: boolean | string
150
+ readonly?: boolean | string
151
+ /** id linking this checkbox to an anduin-field-label */
152
+ inputid?: string
153
+ }
154
+
155
+ // ── anduin-input ──────────────────────────────────────────────────────
156
+ 'anduin-input': Base & {
157
+ value?: string
158
+ /** 'small' | 'default' | 'large' (default: 'default') */
159
+ size?: 'small' | 'default' | 'large'
160
+ disabled?: boolean | string
161
+ readonly?: boolean | string
162
+ placeholder?: string
163
+ /** id attribute on the inner <input> */
164
+ inputid?: string
165
+ /** 'valid' | 'invalid' | 'warning' | 'loading' */
166
+ status?: string
167
+ /** anduin-icon name shown on the left */
168
+ 'start-icon'?: string
169
+ /** anduin-icon name shown on the right */
170
+ 'end-icon'?: string
171
+ /** Show a clear button when value is non-empty */
172
+ clearable?: boolean | string
173
+ }
174
+
175
+ // ── anduin-textarea ───────────────────────────────────────────────────
176
+ 'anduin-textarea': Base & {
177
+ value?: string
178
+ disabled?: boolean | string
179
+ readonly?: boolean | string
180
+ placeholder?: string
181
+ /** id attribute on the inner <textarea> */
182
+ inputid?: string
183
+ rows?: number | string
184
+ /** 'valid' | 'invalid' | 'warning' | 'loading' */
185
+ status?: string
186
+ }
187
+
188
+ // ── anduin-popover ────────────────────────────────────────────────────
189
+ 'anduin-popover': Base & {
190
+ /** Whether the panel is open (default: false) */
191
+ open?: boolean | string
192
+ /** 'bottom-start' | 'bottom' | 'bottom-end' | 'top-start' | 'top' | 'top-end' (default: 'bottom-start') */
193
+ placement?: string
194
+ }
195
+
196
+ // ── anduin-menu ───────────────────────────────────────────────────────
197
+ 'anduin-menu': Base & {
198
+ /** Whether the menu is open (default: false) */
199
+ open?: boolean | string
200
+ /** 'bottom-start' | 'bottom' | 'bottom-end' | 'top-start' | 'top' | 'top-end' (default: 'bottom-start') */
201
+ placement?: string
202
+ }
203
+
204
+ // ── anduin-menu-item ──────────────────────────────────────────────────
205
+ 'anduin-menu-item': Base & {
206
+ /** anduin-icon name shown before the label */
207
+ icon?: string
208
+ /** 'default' | 'danger' (default: 'default') */
209
+ variant?: 'default' | 'danger'
210
+ disabled?: boolean | string
211
+ }
212
+
213
+ // ── anduin-tabs ───────────────────────────────────────────────────────
214
+ 'anduin-tabs': Base & {
215
+ /** Initially active tab value */
216
+ 'default-value'?: string
217
+ /** Controlled active tab value */
218
+ value?: string
219
+ /** Stretch tabs + active panel to fill parent height */
220
+ fill?: boolean | string
221
+ }
222
+
223
+ // ── anduin-tabs-list ──────────────────────────────────────────────────
224
+ 'anduin-tabs-list': Base & {
225
+ /** 'left' | 'center' | 'right' (default: 'left') */
226
+ alignment?: 'left' | 'center' | 'right'
227
+ }
228
+
229
+ // ── anduin-tab-trigger ────────────────────────────────────────────────
230
+ 'anduin-tab-trigger': Base & {
231
+ /** Must match a corresponding anduin-tab-content value */
232
+ value?: string
233
+ /** anduin-icon name */
234
+ 'start-icon'?: string
235
+ disabled?: boolean | string
236
+ /** Show a count badge on the trigger */
237
+ 'show-badge'?: boolean | string
238
+ /** Text shown inside the badge */
239
+ 'badge-count'?: string
240
+ }
241
+
242
+ // ── anduin-tab-content ────────────────────────────────────────────────
243
+ 'anduin-tab-content': Base & {
244
+ /** Must match a corresponding anduin-tab-trigger value */
245
+ value?: string
246
+ }
247
+
248
+ // ── anduin-tag ────────────────────────────────────────────────────────
249
+ 'anduin-tag': Base & {
250
+ /** See TagVariant in anduin-tag.ts for all accepted values (default: 'gray') */
251
+ variant?: string
252
+ /** anduin-icon name shown before the label */
253
+ icon?: string
254
+ disabled?: boolean | string
255
+ }
256
+
257
+ // ── anduin-tag-close ──────────────────────────────────────────────────
258
+ 'anduin-tag-close': Base
259
+
260
+ // ── anduin-tooltip ────────────────────────────────────────────────────
261
+ 'anduin-tooltip': Base & {
262
+ disabled?: boolean | string
263
+ /** e.g. 'top-center' | 'bottom-start' | 'right-end' … (default: 'top-center') */
264
+ placement?: string
265
+ }
266
+
267
+ // ── anduin-tooltip-trigger ────────────────────────────────────────────
268
+ 'anduin-tooltip-trigger': Base
269
+
270
+ // ── anduin-tooltip-content ────────────────────────────────────────────
271
+ 'anduin-tooltip-content': Base
272
+
273
+ // ── anduin-well ───────────────────────────────────────────────────────
274
+ 'anduin-well': Base & {
275
+ /** 'gray' | 'primary' | 'success' | 'danger' | 'warning' (default: 'gray') */
276
+ variant?: string
277
+ }
278
+
279
+ // ── anduin-well-close ─────────────────────────────────────────────────
280
+ 'anduin-well-close': Base
281
+
282
+ // ── anduin-modal ──────────────────────────────────────────────────────
283
+ 'anduin-modal': Base & {
284
+ /** Whether the modal is open */
285
+ open?: boolean | string
286
+ /** Modal title text */
287
+ heading?: string
288
+ /** Max-width preset: '480' | '600' | '720' | '960' | '1160', or any CSS value (default: '480') */
289
+ 'max-width'?: '480' | '600' | '720' | '960' | '1160' | string
290
+ /** Hide the header (title + close button) */
291
+ 'hide-header'?: boolean | string
292
+ /** Hide the footer slot container */
293
+ 'hide-footer'?: boolean | string
294
+ /** Cover the full viewport; hides overlay and removes border-radius */
295
+ fullscreen?: boolean | string
296
+ /** Fired when the modal should close (X, overlay click, or anduin-modal-close).
297
+ * Import MODAL_CLOSE_EVENT for the event name string.
298
+ * @example ref.current.addEventListener(MODAL_CLOSE_EVENT, () => setOpen(false)) */
299
+ }
300
+
301
+ // ── anduin-modal-close ────────────────────────────────────────────────
302
+ 'anduin-modal-close': Base
303
+
304
+ // ── anduin-avatar ─────────────────────────────────────────────────────
305
+ 'anduin-avatar': Base & {
306
+ /** Image URL */
307
+ src?: string
308
+ /** Name used for initials and color */
309
+ name?: string
310
+ /** Alt text for the image */
311
+ alt?: string
312
+ /** anduin-icon name to show instead of initials */
313
+ icon?: string
314
+ /** 16 | 20 | 24 | 32 (default: 32) */
315
+ size?: 16 | 20 | 24 | 32 | string
316
+ /** 'circle' | 'rounded' (default: 'circle') */
317
+ shape?: 'circle' | 'rounded'
318
+ }
319
+
320
+ // ── anduin-toast ──────────────────────────────────────────────────────
321
+ 'anduin-toast': Base & {
322
+ /** 'gray' | 'primary' | 'success' | 'warning' | 'danger' (default: 'gray') */
323
+ variant?: 'gray' | 'primary' | 'success' | 'warning' | 'danger'
324
+ /** Bold title text */
325
+ heading?: string
326
+ /** Body text (or use slot content) */
327
+ description?: string
328
+ }
329
+
330
+ // ── anduin-toaster ────────────────────────────────────────────────────
331
+ 'anduin-toaster': Base & {
332
+ /** 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' (default: 'top-right') */
333
+ position?: string
334
+ }
335
+
336
+ // ── anduin-file-icon ──────────────────────────────────────────────────
337
+ 'anduin-file-icon': Base & {
338
+ /** 'archive' | 'audio' | 'blueprint' | 'box' | 'csv' | 'excel' | 'folder'
339
+ * | 'folder-empty' | 'form' | 'generic' | 'image' | 'link' | 'pdf'
340
+ * | 'powerpoint' | 'signed' | 'text' | 'video' | 'word' */
341
+ type?: string
342
+ /** 16 | 24 | 32 (default: 32) */
343
+ size?: 16 | 24 | 32 | string
344
+ }
345
+ }
346
+ }
347
+ }
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-BajvdhLP.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}),r=t.createComponent({react:n,tagName:"anduin-callout",elementClass:e.AnduinCallout}),C=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}),p=t.createComponent({react:n,tagName:"anduin-field-label",elementClass:e.AnduinFieldLabel}),A=t.createComponent({react:n,tagName:"anduin-field-description",elementClass:e.AnduinFieldDescription}),T=t.createComponent({react:n,tagName:"anduin-field-error",elementClass:e.AnduinFieldError}),N=t.createComponent({react:n,tagName:"anduin-field-group",elementClass:e.AnduinFieldGroup}),E=t.createComponent({react:n,tagName:"anduin-checkbox",elementClass:e.AnduinCheckbox,events:{onChange:e.CHECKBOX_CHANGE}}),L=t.createComponent({react:n,tagName:"anduin-input",elementClass:e.AnduinInput,events:{onChange:e.INPUT_CHANGE,onClear:e.INPUT_CLEAR}}),_=t.createComponent({react:n,tagName:"anduin-textarea",elementClass:e.AnduinTextarea,events:{onChange:e.TEXTAREA_CHANGE}}),I=t.createComponent({react:n,tagName:"anduin-popover",elementClass:e.AnduinPopover}),b=t.createComponent({react:n,tagName:"anduin-popover-close",elementClass:e.AnduinPopoverClose}),v=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}}),S=t.createComponent({react:n,tagName:"anduin-modal",elementClass:e.AnduinModal,events:{onClose:e.MODAL_CLOSE_EVENT}}),F=t.createComponent({react:n,tagName:"anduin-modal-close",elementClass:e.AnduinModalClose}),G=t.createComponent({react:n,tagName:"anduin-tabs",elementClass:e.AnduinTabs,events:{onChange:e.TAB_CHANGE}}),O=t.createComponent({react:n,tagName:"anduin-tabs-list",elementClass:e.AnduinTabsList}),P=t.createComponent({react:n,tagName:"anduin-tab-trigger",elementClass:e.AnduinTabTrigger}),B=t.createComponent({react:n,tagName:"anduin-tab-content",elementClass:e.AnduinTabContent}),H=t.createComponent({react:n,tagName:"anduin-tag",elementClass:e.AnduinTag}),D=t.createComponent({react:n,tagName:"anduin-tag-close",elementClass:e.AnduinTagClose,events:{onClick:e.TAG_CLOSE_CLICK}}),K=t.createComponent({react:n,tagName:"anduin-tooltip",elementClass:e.AnduinTooltip}),k=t.createComponent({react:n,tagName:"anduin-tooltip-trigger",elementClass:e.AnduinTooltipTrigger}),U=t.createComponent({react:n,tagName:"anduin-tooltip-content",elementClass:e.AnduinTooltipContent}),W=t.createComponent({react:n,tagName:"anduin-well",elementClass:e.AnduinWell}),h=t.createComponent({react:n,tagName:"anduin-well-close",elementClass:e.AnduinWellClose,events:{onClick:e.WELL_CLOSE_CLICK}}),x=t.createComponent({react:n,tagName:"anduin-avatar",elementClass:e.AnduinAvatar}),f=t.createComponent({react:n,tagName:"anduin-file-icon",elementClass:e.AnduinFileIcon}),R=t.createComponent({react:n,tagName:"anduin-toast",elementClass:e.AnduinToast}),X=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.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=x;exports.Badge=s;exports.BadgeCount=l;exports.Button=i;exports.Callout=r;exports.Checkbox=E;exports.Divider=C;exports.Dot=c;exports.Field=g;exports.FieldDescription=A;exports.FieldError=T;exports.FieldGroup=N;exports.FieldLabel=p;exports.FileIcon=f;exports.Icon=o;exports.Input=L;exports.LoadingState=u;exports.Menu=v;exports.MenuItem=M;exports.Modal=S;exports.ModalClose=F;exports.Popover=I;exports.PopoverClose=b;exports.Progress=d;exports.Skeleton=m;exports.Spinner=a;exports.TabContent=B;exports.TabTrigger=P;exports.Tabs=G;exports.TabsList=O;exports.Tag=H;exports.TagClose=D;exports.Textarea=_;exports.Toast=R;exports.Toaster=X;exports.Tooltip=K;exports.TooltipContent=U;exports.TooltipTrigger=k;exports.Well=W;exports.WellClose=h;