@duyluonganduin/acl-web-components 0.0.69 → 0.0.71
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/acl-web-components.cjs +1 -1
- package/dist/acl-web-components.d.ts +2142 -50
- package/dist/acl-web-components.iife.js +2394 -533
- package/dist/acl-web-components.js +292 -162
- package/dist/{anduin-table-CbHX7iBE.js → anduin-autocomplete-Dd3keEWR.js} +9564 -2868
- package/dist/{anduin-table-CNwdR3yo.cjs → anduin-autocomplete-GGzA9JWU.cjs} +2367 -506
- package/dist/jsx.d.ts +489 -13
- package/dist/react.cjs +1 -1
- package/dist/react.d.ts +2277 -36
- package/dist/react.js +480 -261
- package/package.json +6 -2
package/dist/jsx.d.ts
CHANGED
|
@@ -104,8 +104,11 @@ declare module 'react' {
|
|
|
104
104
|
|
|
105
105
|
// ── anduin-dot ────────────────────────────────────────────────────────
|
|
106
106
|
'anduin-dot': Base & {
|
|
107
|
-
/** 'gray' | 'primary' | 'success' | 'danger' | 'warning'
|
|
107
|
+
/** 'gray' | 'primary' | 'success' | 'danger' | 'warning' | 'purple', or a tag custom color
|
|
108
|
+
* ('customBlue', …) (default: 'gray') */
|
|
108
109
|
variant?: string
|
|
110
|
+
/** Colors the dot from an ID, as an avatar is: the same ID always gets the same color. Wins over variant */
|
|
111
|
+
uid?: string
|
|
109
112
|
}
|
|
110
113
|
|
|
111
114
|
// ── anduin-progress ───────────────────────────────────────────────────
|
|
@@ -247,29 +250,94 @@ declare module 'react' {
|
|
|
247
250
|
|
|
248
251
|
// ── anduin-popover ────────────────────────────────────────────────────
|
|
249
252
|
'anduin-popover': Base & {
|
|
250
|
-
/** Whether the panel is open (default: false) */
|
|
253
|
+
/** Whether the panel is open (default: false). Design: `open="false"` is closed. */
|
|
251
254
|
open?: boolean | string
|
|
252
|
-
/** 'bottom-start' | 'bottom' | 'bottom-end' | 'top-start' | 'top' | 'top-end'
|
|
255
|
+
/** Old API: 'bottom-start' | 'bottom' | 'bottom-end' | 'top-start' | 'top' | 'top-end'. With design parts: 'top|bottom|left|right' + '-start|-center|-end' (default: 'bottom-start') */
|
|
253
256
|
placement?: string
|
|
254
|
-
/** Make trigger span the host's full width (
|
|
257
|
+
/** Make trigger span the host's full width (old API). Panel width is independent — customize via `--popover-min-width`, `--popover-max-width`, `--popover-max-height` */
|
|
255
258
|
'full-width'?: boolean | string
|
|
259
|
+
/** Design: start open (uncontrolled) */
|
|
260
|
+
'default-open'?: boolean | string
|
|
261
|
+
/** Design: the trigger does nothing; closes if open */
|
|
262
|
+
disabled?: boolean | string
|
|
263
|
+
/** Design: px shift after placement */
|
|
264
|
+
'offset-x'?: number | string
|
|
265
|
+
'offset-y'?: number | string
|
|
266
|
+
/** Design: default true */
|
|
267
|
+
'close-on-escape'?: boolean | string
|
|
268
|
+
/** Design: default true */
|
|
269
|
+
'close-on-click-outside'?: boolean | string
|
|
270
|
+
/** Old event — detail: the new open state */
|
|
271
|
+
'onanduin-popover:open-change'?: (e: CustomEvent<boolean>) => void
|
|
272
|
+
'onanduin-popover-open-change'?: (e: CustomEvent<{ value: boolean }>) => void
|
|
273
|
+
'onanduin-popover-on-open'?: (e: CustomEvent<{ value: undefined }>) => void
|
|
274
|
+
'onanduin-popover-on-close'?: (e: CustomEvent<{ value: undefined }>) => void
|
|
256
275
|
}
|
|
276
|
+
'anduin-popover-trigger': Base
|
|
277
|
+
'anduin-popover-content': Base & {
|
|
278
|
+
/** Move focus inside on open (default true) */
|
|
279
|
+
'auto-focus'?: boolean | string
|
|
280
|
+
/** aria-modal="true" on the dialog */
|
|
281
|
+
modal?: boolean | string
|
|
282
|
+
/** Accessible name (defaults to the anduin-popover-title text) */
|
|
283
|
+
label?: string
|
|
284
|
+
}
|
|
285
|
+
'anduin-popover-title': Base
|
|
257
286
|
|
|
258
287
|
// ── anduin-menu ───────────────────────────────────────────────────────
|
|
259
288
|
'anduin-menu': Base & {
|
|
260
|
-
/** Whether the menu is open (default: false) */
|
|
289
|
+
/** Whether the menu is open (default: false). Design: `open="false"` is closed. */
|
|
261
290
|
open?: boolean | string
|
|
262
|
-
/** 'bottom-start' | 'bottom' | 'bottom-end' | 'top-start' | 'top' | 'top-end'
|
|
291
|
+
/** Old API: 'bottom-start' | 'bottom' | 'bottom-end' | 'top-start' | 'top' | 'top-end'. With design parts: the 12 design placements (default: 'bottom-start') */
|
|
292
|
+
placement?: string
|
|
293
|
+
'default-open'?: boolean | string
|
|
294
|
+
disabled?: boolean | string
|
|
295
|
+
'offset-x'?: number | string
|
|
296
|
+
'offset-y'?: number | string
|
|
297
|
+
'onanduin-menu-open-change'?: (e: CustomEvent<{ value: boolean }>) => void
|
|
298
|
+
}
|
|
299
|
+
'anduin-menu-trigger': Base
|
|
300
|
+
'anduin-menu-content': Base & {
|
|
301
|
+
/** Accessible name (defaults to the trigger's text) */
|
|
302
|
+
label?: string
|
|
303
|
+
/** Render inline without trigger/popup (e.g. inside a popover) */
|
|
304
|
+
standalone?: boolean | string
|
|
305
|
+
}
|
|
306
|
+
'anduin-menu-group': Base
|
|
307
|
+
'anduin-menu-label': Base
|
|
308
|
+
'anduin-menu-separator': Base
|
|
309
|
+
'anduin-menu-sub': Base & {
|
|
310
|
+
/** default 'right-start' */
|
|
263
311
|
placement?: string
|
|
264
312
|
}
|
|
313
|
+
'anduin-menu-sub-trigger': Base & {
|
|
314
|
+
'start-icon'?: string
|
|
315
|
+
inset?: boolean | string
|
|
316
|
+
disabled?: boolean | string
|
|
317
|
+
}
|
|
318
|
+
'anduin-menu-sub-content': Base
|
|
265
319
|
|
|
266
320
|
// ── anduin-menu-item ──────────────────────────────────────────────────
|
|
267
321
|
'anduin-menu-item': Base & {
|
|
268
|
-
/** anduin-icon name shown before the label */
|
|
322
|
+
/** anduin-icon name shown before the label (old API; same as start-icon) */
|
|
269
323
|
icon?: string
|
|
270
|
-
|
|
271
|
-
|
|
324
|
+
'start-icon'?: string
|
|
325
|
+
/** 'default' | 'gray' | 'danger' (default: 'default') */
|
|
326
|
+
variant?: 'default' | 'gray' | 'danger'
|
|
272
327
|
disabled?: boolean | string
|
|
328
|
+
/** Present = checkable item with a check; "false" = unchecked */
|
|
329
|
+
checked?: boolean | string
|
|
330
|
+
radio?: boolean | string
|
|
331
|
+
inset?: boolean | string
|
|
332
|
+
loading?: boolean | string
|
|
333
|
+
href?: string
|
|
334
|
+
'open-new-tab'?: boolean | string
|
|
335
|
+
/** 'medium' | 'free' */
|
|
336
|
+
size?: 'medium' | 'free'
|
|
337
|
+
description?: string
|
|
338
|
+
label?: string
|
|
339
|
+
'onanduin-menu-item-selected'?: (e: CustomEvent<{ value: true }>) => void
|
|
340
|
+
'onanduin-menu-item:click'?: (e: CustomEvent<void>) => void
|
|
273
341
|
}
|
|
274
342
|
|
|
275
343
|
// ── anduin-tabs ───────────────────────────────────────────────────────
|
|
@@ -311,8 +379,14 @@ declare module 'react' {
|
|
|
311
379
|
'anduin-tag': Base & {
|
|
312
380
|
/** See TagVariant in anduin-tag.ts for all accepted values (default: 'gray') */
|
|
313
381
|
variant?: string
|
|
382
|
+
/** 'filled' | 'outlined' (default: 'filled'). Outlined: transparent, drawn by a border */
|
|
383
|
+
appearance?: 'filled' | 'outlined'
|
|
314
384
|
/** anduin-icon name shown before the label */
|
|
315
385
|
icon?: string
|
|
386
|
+
/** Colors `icon` (never adds one): a dot color ('purple', 'customBlue', …) or an ID marked 'uid:<id>' */
|
|
387
|
+
'icon-color'?: string
|
|
388
|
+
/** Colors the icon from an ID (design-repo name); wins over icon-color */
|
|
389
|
+
'icon-color-uid'?: string
|
|
316
390
|
disabled?: boolean | string
|
|
317
391
|
}
|
|
318
392
|
|
|
@@ -425,10 +499,16 @@ declare module 'react' {
|
|
|
425
499
|
alt?: string
|
|
426
500
|
/** anduin-icon name to show instead of initials */
|
|
427
501
|
icon?: string
|
|
428
|
-
/** 16 | 20 | 24 | 32 (default: 32) */
|
|
429
|
-
size?: 16 | 20 | 24 | 32 | string
|
|
430
|
-
/** 'circle' | 'rounded' (default: 'circle') */
|
|
431
|
-
shape?: 'circle' | 'rounded'
|
|
502
|
+
/** 16 | 20 | 24 | 32 | 40, or design names 'small' | 'medium' | 'large' | 'extraLarge' (default: 32 / 'large') */
|
|
503
|
+
size?: 16 | 20 | 24 | 32 | 40 | 'small' | 'medium' | 'large' | 'extraLarge' | string
|
|
504
|
+
/** 'circle' | 'rounded' | 'square' ('square' = 'rounded') (default: 'circle') */
|
|
505
|
+
shape?: 'circle' | 'rounded' | 'square'
|
|
506
|
+
/** Design API: colour seed. Setting uid or value switches to the design behaviour. '' = inactive (shows children), 'anduin' = Anduin logo */
|
|
507
|
+
uid?: string
|
|
508
|
+
/** Design API: full name; initials are the first letters of the first two words */
|
|
509
|
+
value?: string
|
|
510
|
+
/** Design API: accessible name (replaces value) */
|
|
511
|
+
label?: string
|
|
432
512
|
}
|
|
433
513
|
|
|
434
514
|
// ── anduin-toast ──────────────────────────────────────────────────────
|
|
@@ -485,6 +565,20 @@ declare module 'react' {
|
|
|
485
565
|
onChange?: (e: CustomEvent<boolean>) => void
|
|
486
566
|
}
|
|
487
567
|
|
|
568
|
+
// ── anduin-switch (design-repo name) ──────────────────────────────────
|
|
569
|
+
'anduin-switch': Base & {
|
|
570
|
+
/** Controlled state; setting it makes clicks only request a change */
|
|
571
|
+
checked?: boolean | string
|
|
572
|
+
/** Initial state when uncontrolled */
|
|
573
|
+
'default-checked'?: boolean | string
|
|
574
|
+
/** Disables interaction ("false" reads as false) */
|
|
575
|
+
disabled?: boolean | string
|
|
576
|
+
/** Accessible name (an enclosing field's label otherwise) */
|
|
577
|
+
label?: string
|
|
578
|
+
/** Fired on toggle — detail: { value: boolean } */
|
|
579
|
+
'onanduin-switch-checked-change'?: (e: CustomEvent<{ value: boolean }>) => void
|
|
580
|
+
}
|
|
581
|
+
|
|
488
582
|
// ── anduin-drawer ─────────────────────────────────────────────────────
|
|
489
583
|
'anduin-drawer': Base & {
|
|
490
584
|
/** Whether the drawer is open */
|
|
@@ -804,6 +898,388 @@ declare module 'react' {
|
|
|
804
898
|
/** Drag a column edge to resize; on by default. Pass "false" to disable. */
|
|
805
899
|
'resizable-columns'?: string
|
|
806
900
|
}
|
|
901
|
+
|
|
902
|
+
// ── anduin-navigation-bar (design-repo name) ──────────────────────────
|
|
903
|
+
'anduin-navigation-bar': Base & {
|
|
904
|
+
/** Controlled selected value; clicks only request a change */
|
|
905
|
+
value?: string
|
|
906
|
+
/** Selected value when uncontrolled (kept in sync on click). Neither set → first item */
|
|
907
|
+
'default-value'?: string
|
|
908
|
+
/** 'light' | 'dark' (fixed dark surface) | 'custom' (reads --anduin-navigation-bar-* colors) (default: 'light') */
|
|
909
|
+
theme?: 'light' | 'dark' | 'custom'
|
|
910
|
+
/** Fired on every item activation (also the selected one) — detail: { value: string } */
|
|
911
|
+
'onanduin-navigation-bar-value-change'?: (e: CustomEvent<{ value: string }>) => void
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
// ── anduin-navigation-bar-item (design-repo name) ─────────────────────
|
|
915
|
+
'anduin-navigation-bar-item': Base & {
|
|
916
|
+
/** Value reported to the bar */
|
|
917
|
+
value?: string
|
|
918
|
+
/** Renders a native <a> instead of a <button> */
|
|
919
|
+
href?: string
|
|
920
|
+
/** With href: target="_blank" rel="noreferrer noopener" ("false" reads as false) */
|
|
921
|
+
'open-new-tab'?: boolean | string
|
|
922
|
+
/** Overrides the bar's selection for this item ("false" reads as false; absent → follow the bar) */
|
|
923
|
+
selected?: boolean | string
|
|
924
|
+
/** anduin-icon name shown before the label (camelCase, e.g. "folderClose") */
|
|
925
|
+
'start-icon'?: string
|
|
926
|
+
/** Dimmed and inert ("false" reads as false) */
|
|
927
|
+
disabled?: boolean | string
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
// ── anduin-clipboard ──────────────────────────────────────────────────
|
|
931
|
+
'anduin-clipboard': Base & {
|
|
932
|
+
/** The text to copy (read at click time) */
|
|
933
|
+
value?: string
|
|
934
|
+
/** What the value is ("Invoice number"): names icon-only triggers and the announcement */
|
|
935
|
+
label?: string
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
// ── anduin-clipboard-trigger ──────────────────────────────────────────
|
|
939
|
+
'anduin-clipboard-trigger': Base
|
|
940
|
+
|
|
941
|
+
// ── anduin-clipboard-indicator ────────────────────────────────────────
|
|
942
|
+
'anduin-clipboard-indicator': Base & {
|
|
943
|
+
/** 'plain' (32×32 icon button, default) | 'text' (bare inline icon) */
|
|
944
|
+
appearance?: 'plain' | 'text'
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
// ── anduin-collapsible ────────────────────────────────────────────────
|
|
948
|
+
'anduin-collapsible': Base & {
|
|
949
|
+
/** Controlled open state; setting it makes clicks only request a change */
|
|
950
|
+
open?: boolean | string
|
|
951
|
+
/** Initial state when uncontrolled */
|
|
952
|
+
'default-open'?: boolean | string
|
|
953
|
+
/** Ignores the trigger ("false" reads as false) */
|
|
954
|
+
disabled?: boolean | string
|
|
955
|
+
/** 'vertical' (animates height, default) | 'horizontal' (animates width) */
|
|
956
|
+
direction?: 'vertical' | 'horizontal'
|
|
957
|
+
/** 'off', or a duration such as '400ms' (default 150ms) */
|
|
958
|
+
animation?: string
|
|
959
|
+
/** Fired on trigger click (does not bubble) — detail: { value: boolean } */
|
|
960
|
+
'onanduin-collapsible-open-change'?: (e: CustomEvent<{ value: boolean }>) => void
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
// ── anduin-collapsible-trigger ────────────────────────────────────────
|
|
964
|
+
'anduin-collapsible-trigger': Base
|
|
965
|
+
|
|
966
|
+
// ── anduin-collapsible-content ────────────────────────────────────────
|
|
967
|
+
'anduin-collapsible-content': Base
|
|
968
|
+
|
|
969
|
+
// ── anduin-collapsible-icon ───────────────────────────────────────────
|
|
970
|
+
'anduin-collapsible-icon': Base & {
|
|
971
|
+
/** Degrees the icon turns to when open; negative = counterclockwise (default 90) */
|
|
972
|
+
rotation?: number | string
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
// ── anduin-truncated (design-repo name) ───────────────────────────────
|
|
976
|
+
'anduin-truncated': Base & {
|
|
977
|
+
/** Lines before clipping; absent = single-line ellipsis. Non-positive/invalid = 1 */
|
|
978
|
+
'line-clamp'?: number | string
|
|
979
|
+
/** Tooltip text override; absent = the content's normalized text */
|
|
980
|
+
tooltip?: string
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
// ── anduin-non-ideal-state (design-repo name) ─────────────────────────
|
|
984
|
+
'anduin-non-ideal-state': Base
|
|
985
|
+
'anduin-non-ideal-state-icon': Base
|
|
986
|
+
'anduin-non-ideal-state-title': Base & {
|
|
987
|
+
/** 1–6, anything else = 2 (default: 2) */
|
|
988
|
+
'heading-level'?: number | string
|
|
989
|
+
}
|
|
990
|
+
'anduin-non-ideal-state-description': Base
|
|
991
|
+
'anduin-non-ideal-state-action': Base
|
|
992
|
+
|
|
993
|
+
// ── anduin-avatar-block (design-repo name) ────────────────────────────
|
|
994
|
+
'anduin-avatar-block': Base & {
|
|
995
|
+
/** Avatar colour seed; '' = inactive avatar, 'anduin' = Anduin logo */
|
|
996
|
+
uid?: string
|
|
997
|
+
/** Full name: displayed name + avatar initials */
|
|
998
|
+
value?: string
|
|
999
|
+
/** Email under the name with a copy button; empty = no email row */
|
|
1000
|
+
email?: string
|
|
1001
|
+
/** 'circle' | 'square' (default: 'circle') */
|
|
1002
|
+
shape?: 'circle' | 'square'
|
|
1003
|
+
/** 'small' | 'medium' | 'large' | 'extraLarge' (default: 'large') */
|
|
1004
|
+
size?: 'small' | 'medium' | 'large' | 'extraLarge'
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
// ── anduin-dialog ─────────────────────────────────────────────────────
|
|
1008
|
+
'anduin-dialog': Base & {
|
|
1009
|
+
/** Controlled open state ("true" | "false"); omit for uncontrolled */
|
|
1010
|
+
open?: boolean | string
|
|
1011
|
+
/** Uncontrolled: start open */
|
|
1012
|
+
'default-open'?: boolean | string
|
|
1013
|
+
/** Escape closes the topmost dialog (default true; "false" disables) */
|
|
1014
|
+
'close-on-escape'?: boolean | string
|
|
1015
|
+
/** Overlay click closes (default true, false for an `alert` content); "false" shakes instead */
|
|
1016
|
+
'close-on-click-outside'?: boolean | string
|
|
1017
|
+
/** Controlled: open/close requested — detail: { value: boolean } (does not bubble) */
|
|
1018
|
+
'onanduin-dialog-open-change'?: (e: CustomEvent<{ value: boolean }>) => void
|
|
1019
|
+
/** Became visible — detail: { value: undefined } */
|
|
1020
|
+
'onanduin-dialog-on-open'?: (e: CustomEvent<{ value: undefined }>) => void
|
|
1021
|
+
/** Became hidden — detail: { value: undefined } */
|
|
1022
|
+
'onanduin-dialog-on-close'?: (e: CustomEvent<{ value: undefined }>) => void
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
// ── anduin-dialog-trigger ─────────────────────────────────────────────
|
|
1026
|
+
'anduin-dialog-trigger': Base
|
|
1027
|
+
|
|
1028
|
+
// ── anduin-dialog-content ─────────────────────────────────────────────
|
|
1029
|
+
'anduin-dialog-content': Base & {
|
|
1030
|
+
/** 'small' (480) | 'medium' (720) | 'large' (960) | 'extraLarge' (1160) | 'full' | 'fitContent', or any CSS width (default 480px) */
|
|
1031
|
+
width?: 'small' | 'medium' | 'large' | 'extraLarge' | 'full' | 'fitContent' | string
|
|
1032
|
+
/** 'fill' (75vh) or any CSS height; omit to fit content */
|
|
1033
|
+
height?: 'fill' | string
|
|
1034
|
+
/** Move focus into the dialog on open (default true) */
|
|
1035
|
+
'auto-focus'?: boolean | string
|
|
1036
|
+
/** Alert dialog: role="alertdialog", focus on the first anduin-dialog-close, overlay click ignored */
|
|
1037
|
+
alert?: boolean | string
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
// ── anduin-dialog-header ──────────────────────────────────────────────
|
|
1041
|
+
'anduin-dialog-header': Base & {
|
|
1042
|
+
/** Line below the header */
|
|
1043
|
+
divider?: boolean | string
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
// ── anduin-dialog-title ───────────────────────────────────────────────
|
|
1047
|
+
'anduin-dialog-title': Base & {
|
|
1048
|
+
/** Built-in × button (default true; "false" hides it) */
|
|
1049
|
+
'show-close-button'?: boolean | string
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
// ── anduin-dialog-description ─────────────────────────────────────────
|
|
1053
|
+
'anduin-dialog-description': Base
|
|
1054
|
+
|
|
1055
|
+
// ── anduin-dialog-body ────────────────────────────────────────────────
|
|
1056
|
+
'anduin-dialog-body': Base & {
|
|
1057
|
+
/** Remove the 16px 24px padding */
|
|
1058
|
+
flush?: boolean | string
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
// ── anduin-dialog-footer ──────────────────────────────────────────────
|
|
1062
|
+
'anduin-dialog-footer': Base & {
|
|
1063
|
+
/** Line above the footer */
|
|
1064
|
+
divider?: boolean | string
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
// ── anduin-dialog-close ───────────────────────────────────────────────
|
|
1068
|
+
'anduin-dialog-close': Base
|
|
1069
|
+
|
|
1070
|
+
// ── anduin-dialog-overlay ─────────────────────────────────────────────
|
|
1071
|
+
'anduin-dialog-overlay': Base
|
|
1072
|
+
|
|
1073
|
+
// ── anduin-select (design-repo compound select) ─────────────────────
|
|
1074
|
+
'anduin-select': Base & {
|
|
1075
|
+
/** Selected item's value; a pick writes it back */
|
|
1076
|
+
value?: string
|
|
1077
|
+
/** 'bottom-start' (default) | 'bottom-end' | 'bottom-center' | 'top-*' | 'left-*' | 'right-*' */
|
|
1078
|
+
placement?: string
|
|
1079
|
+
/** List shows a spinner, selection pauses ("false" reads as false) */
|
|
1080
|
+
loading?: boolean | string
|
|
1081
|
+
/** Row height for every item, px (default 32) */
|
|
1082
|
+
'item-height'?: number | string
|
|
1083
|
+
/** Dropdown closed — detail: { value: undefined } (does not bubble). Value changes fire `change` — detail: { value: string }; use the React wrapper's onValueChange or addEventListener('change') */
|
|
1084
|
+
'onanduin-select-on-close'?: (e: CustomEvent<{ value: undefined }>) => void
|
|
1085
|
+
}
|
|
1086
|
+
'anduin-select-trigger': Base & {
|
|
1087
|
+
/** Accessible name of the combobox */
|
|
1088
|
+
label?: string
|
|
1089
|
+
}
|
|
1090
|
+
'anduin-select-content': Base & {
|
|
1091
|
+
/** Fixed popup width: px number or CSS length (default: shrink-wrap, min 160) */
|
|
1092
|
+
width?: number | string
|
|
1093
|
+
}
|
|
1094
|
+
'anduin-select-list': Base & {
|
|
1095
|
+
/** Cap on the list: CSS length or 'none' (default: popup's 80vh / the room beside the trigger) */
|
|
1096
|
+
'max-height'?: string
|
|
1097
|
+
}
|
|
1098
|
+
'anduin-select-item': Base & {
|
|
1099
|
+
value?: string
|
|
1100
|
+
/** Display label for the trigger/search (default: the item's text) */
|
|
1101
|
+
label?: string
|
|
1102
|
+
/** Second line under the label (or slot="description") */
|
|
1103
|
+
description?: string
|
|
1104
|
+
/** Visible but unselectable ("false" reads as false) */
|
|
1105
|
+
disabled?: boolean | string
|
|
1106
|
+
/** 'medium' (default) | 'free' (content sets the height) */
|
|
1107
|
+
size?: 'medium' | 'free'
|
|
1108
|
+
/** Icon name shown before the label */
|
|
1109
|
+
'start-icon'?: string
|
|
1110
|
+
/** Picked — detail: { value: string }; cancelable: preventDefault() keeps the select open */
|
|
1111
|
+
'onanduin-select-item-selected'?: (e: CustomEvent<{ value: string }>) => void
|
|
1112
|
+
}
|
|
1113
|
+
'anduin-select-input': Base & {
|
|
1114
|
+
placeholder?: string
|
|
1115
|
+
/** 'small' (24px) | 'default' (32px) | 'large' (40px) */
|
|
1116
|
+
size?: 'small' | 'default' | 'large'
|
|
1117
|
+
/** Accessible name of the search box (the placeholder otherwise) */
|
|
1118
|
+
label?: string
|
|
1119
|
+
}
|
|
1120
|
+
'anduin-select-selected-label': Base & {
|
|
1121
|
+
/** Shown (muted) when nothing is selected */
|
|
1122
|
+
placeholder?: string
|
|
1123
|
+
}
|
|
1124
|
+
'anduin-select-clear': Base
|
|
1125
|
+
'anduin-select-empty': Base
|
|
1126
|
+
'anduin-select-group': Base
|
|
1127
|
+
'anduin-select-label': Base
|
|
1128
|
+
'anduin-select-separator': Base
|
|
1129
|
+
'anduin-select-header': Base
|
|
1130
|
+
'anduin-select-footer': Base
|
|
1131
|
+
|
|
1132
|
+
// ── anduin-sheet ──────────────────────────────────────────────────────
|
|
1133
|
+
'anduin-sheet': Base & {
|
|
1134
|
+
/** Controlled open state; its presence switches to controlled mode ("false" is false) */
|
|
1135
|
+
open?: boolean | string
|
|
1136
|
+
/** Uncontrolled: open on mount */
|
|
1137
|
+
'default-open'?: boolean | string
|
|
1138
|
+
/** Edge the panel slides in from (default: 'right') */
|
|
1139
|
+
side?: 'right' | 'left' | 'top' | 'bottom'
|
|
1140
|
+
/** Escape closes the topmost sheet (default true; "false" disables) */
|
|
1141
|
+
'close-on-escape'?: boolean | string
|
|
1142
|
+
/** Controlled mode: open/close requested — detail: { value: boolean }. Does not bubble. */
|
|
1143
|
+
'onanduin-sheet-open-change'?: (e: CustomEvent<{ value: boolean }>) => void
|
|
1144
|
+
/** The sheet opened (both modes) */
|
|
1145
|
+
'onanduin-sheet-on-open'?: (e: CustomEvent) => void
|
|
1146
|
+
/** The sheet closed (both modes) */
|
|
1147
|
+
'onanduin-sheet-on-close'?: (e: CustomEvent) => void
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
// ── anduin-sheet-trigger / -close ─────────────────────────────────────
|
|
1151
|
+
'anduin-sheet-trigger': Base
|
|
1152
|
+
'anduin-sheet-close': Base
|
|
1153
|
+
|
|
1154
|
+
// ── anduin-sheet-content ──────────────────────────────────────────────
|
|
1155
|
+
'anduin-sheet-content': Base & {
|
|
1156
|
+
/** 'small' (320) | 'medium' (360) | 'large' (400) | 'extraLarge' (640) | 'fitContent', or any CSS length.
|
|
1157
|
+
* Drives the height for top/bottom sheets. (default: 320px) */
|
|
1158
|
+
width?: 'small' | 'medium' | 'large' | 'extraLarge' | 'fitContent' | string
|
|
1159
|
+
/** "false": no overlay, no scroll lock, no focus trap — the page stays usable (default true) */
|
|
1160
|
+
modal?: boolean | string
|
|
1161
|
+
/** Split the viewport instead of covering the page; implies non-modal */
|
|
1162
|
+
dock?: boolean | string
|
|
1163
|
+
/** Drag handle on the edge facing the page (min 240px, max viewport) */
|
|
1164
|
+
resizable?: boolean | string
|
|
1165
|
+
/** "false" leaves focus where it was on open (default true: [autofocus]/[data-autofocus], else the panel) */
|
|
1166
|
+
'auto-focus'?: boolean | string
|
|
1167
|
+
/** A dock toggle flipped `dock` — detail: { value: boolean } (now docked) */
|
|
1168
|
+
'onanduin-sheet-dock-change'?: (e: CustomEvent<{ value: boolean }>) => void
|
|
1169
|
+
/** The user resized the panel — detail: { value: number } (px) */
|
|
1170
|
+
'onanduin-sheet-on-resize'?: (e: CustomEvent<{ value: number }>) => void
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
// ── anduin-sheet parts ────────────────────────────────────────────────
|
|
1174
|
+
'anduin-sheet-header': Base
|
|
1175
|
+
'anduin-sheet-title': Base
|
|
1176
|
+
'anduin-sheet-description': Base
|
|
1177
|
+
'anduin-sheet-footer': Base
|
|
1178
|
+
'anduin-sheet-dock-toggle': Base
|
|
1179
|
+
'anduin-sheet-dock-toggle-on': Base
|
|
1180
|
+
'anduin-sheet-dock-toggle-off': Base
|
|
1181
|
+
|
|
1182
|
+
// ── anduin-combobox (design name; pick ONE OF the items) ───────────────
|
|
1183
|
+
'anduin-combobox': Base & {
|
|
1184
|
+
/** The chosen item's value. Written back on a pick. */
|
|
1185
|
+
value?: string
|
|
1186
|
+
/** 'bottom-start' (default) | 'bottom-end' | 'bottom-center' | 'top-*' | 'left-*' | 'right-*' */
|
|
1187
|
+
placement?: string
|
|
1188
|
+
/** Row height in px for every item (default 32) */
|
|
1189
|
+
'item-height'?: number | string
|
|
1190
|
+
/** Fired when the user picks an item — detail: { value } */
|
|
1191
|
+
onChange?: (e: CustomEvent<{ value: string }>) => void
|
|
1192
|
+
}
|
|
1193
|
+
'anduin-combobox-input': Base & {
|
|
1194
|
+
placeholder?: string
|
|
1195
|
+
/** Accessible name (else aria-label, an enclosing field label, then the placeholder) */
|
|
1196
|
+
label?: string
|
|
1197
|
+
}
|
|
1198
|
+
'anduin-combobox-content': Base & {
|
|
1199
|
+
/** Fixed panel width in px (default: shrink-wrap, min 160) */
|
|
1200
|
+
width?: number | string
|
|
1201
|
+
}
|
|
1202
|
+
'anduin-combobox-list': Base & {
|
|
1203
|
+
/** Cap on the list: any CSS length, e.g. '400px', '50vh' */
|
|
1204
|
+
'max-height'?: string
|
|
1205
|
+
}
|
|
1206
|
+
'anduin-combobox-item': Base & {
|
|
1207
|
+
value?: string
|
|
1208
|
+
/** Text shown in the input and matched by the filter (default: the item's text) */
|
|
1209
|
+
label?: string
|
|
1210
|
+
/** Secondary line under the label */
|
|
1211
|
+
description?: string
|
|
1212
|
+
/** 'true' | 'false' */
|
|
1213
|
+
disabled?: boolean | string
|
|
1214
|
+
/** Cancelable — detail: { value }; preventDefault keeps the list open */
|
|
1215
|
+
'onanduin-combobox-item-selected'?: (e: CustomEvent<{ value: string }>) => void
|
|
1216
|
+
}
|
|
1217
|
+
'anduin-combobox-group': Base
|
|
1218
|
+
'anduin-combobox-label': Base
|
|
1219
|
+
'anduin-combobox-separator': Base
|
|
1220
|
+
'anduin-combobox-empty': Base
|
|
1221
|
+
|
|
1222
|
+
// ── anduin-autocomplete (design name; free text + suggestions) ─────────
|
|
1223
|
+
'anduin-autocomplete': Base & {
|
|
1224
|
+
/** The text in the field. Written back on every keystroke. */
|
|
1225
|
+
value?: string
|
|
1226
|
+
placement?: string
|
|
1227
|
+
'item-height'?: number | string
|
|
1228
|
+
/** The text changed — detail: { value } (every keystroke, and the label on a pick) */
|
|
1229
|
+
onChange?: (e: CustomEvent<{ value: string }>) => void
|
|
1230
|
+
/** A suggestion was picked — detail: { value } (the item's value) */
|
|
1231
|
+
'onanduin-autocomplete-on-choose'?: (e: CustomEvent<{ value: string }>) => void
|
|
1232
|
+
/** The list closed (does not bubble) */
|
|
1233
|
+
'onanduin-autocomplete-on-close'?: (e: CustomEvent) => void
|
|
1234
|
+
}
|
|
1235
|
+
'anduin-autocomplete-input': Base & {
|
|
1236
|
+
placeholder?: string
|
|
1237
|
+
label?: string
|
|
1238
|
+
/** 'small' (24px) | 'default' (32px) | 'large' (40px) */
|
|
1239
|
+
size?: 'small' | 'default' | 'large'
|
|
1240
|
+
/** 'valid' | 'invalid' | 'warning' | 'none' — border colour only */
|
|
1241
|
+
status?: string
|
|
1242
|
+
/** 'true' | 'false' (a bare `disabled="false"` stays enabled) */
|
|
1243
|
+
disabled?: boolean | string
|
|
1244
|
+
/** Open the list on every focus, not only when the field is empty */
|
|
1245
|
+
'open-on-focus'?: boolean | string
|
|
1246
|
+
/** Focus left the field — detail: { value } */
|
|
1247
|
+
'onanduin-autocomplete-on-blur'?: (e: CustomEvent<{ value: string }>) => void
|
|
1248
|
+
/** Enter with nothing highlighted — detail: { value }; cancelable (claims the key) */
|
|
1249
|
+
'onanduin-autocomplete-on-submit'?: (e: CustomEvent<{ value: string }>) => void
|
|
1250
|
+
/** Before an insertion lands — detail: { value } (the candidate text); cancelable (refuses it) */
|
|
1251
|
+
'onanduin-autocomplete-on-before-input'?: (e: CustomEvent<{ value: string }>) => void
|
|
1252
|
+
}
|
|
1253
|
+
'anduin-autocomplete-textarea': Base & {
|
|
1254
|
+
placeholder?: string
|
|
1255
|
+
label?: string
|
|
1256
|
+
size?: 'small' | 'default' | 'large'
|
|
1257
|
+
status?: string
|
|
1258
|
+
disabled?: boolean | string
|
|
1259
|
+
'open-on-focus'?: boolean | string
|
|
1260
|
+
/** Lines it starts at (default 3) */
|
|
1261
|
+
rows?: number | string
|
|
1262
|
+
/** Lines it grows to before scrolling (default 6) */
|
|
1263
|
+
'max-rows'?: number | string
|
|
1264
|
+
'onanduin-autocomplete-on-blur'?: (e: CustomEvent<{ value: string }>) => void
|
|
1265
|
+
'onanduin-autocomplete-on-submit'?: (e: CustomEvent<{ value: string }>) => void
|
|
1266
|
+
'onanduin-autocomplete-on-before-input'?: (e: CustomEvent<{ value: string }>) => void
|
|
1267
|
+
}
|
|
1268
|
+
'anduin-autocomplete-clear': Base
|
|
1269
|
+
'anduin-autocomplete-content': Base & { width?: number | string }
|
|
1270
|
+
'anduin-autocomplete-list': Base & { 'max-height'?: string }
|
|
1271
|
+
'anduin-autocomplete-item': Base & {
|
|
1272
|
+
value?: string
|
|
1273
|
+
label?: string
|
|
1274
|
+
/** anduin-icon name before the label */
|
|
1275
|
+
'start-icon'?: string
|
|
1276
|
+
disabled?: boolean | string
|
|
1277
|
+
'onanduin-autocomplete-item-selected'?: (e: CustomEvent<{ value: string }>) => void
|
|
1278
|
+
}
|
|
1279
|
+
'anduin-autocomplete-group': Base
|
|
1280
|
+
'anduin-autocomplete-label': Base
|
|
1281
|
+
'anduin-autocomplete-separator': Base
|
|
1282
|
+
'anduin-autocomplete-empty': Base
|
|
807
1283
|
}
|
|
808
1284
|
}
|
|
809
1285
|
}
|