@kubex/zinc 1.1.12 → 1.1.14
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/custom-elements.json +1814 -1084
- package/dist/vscode.html-custom-data.json +228 -88
- package/dist/web-types.json +521 -213
- package/dist/zn.d.ts +180 -1
- package/dist/zn.min.css +1 -1
- package/dist/zn.min.js +522 -459
- package/docs/pages/components/channel-tile.md +168 -0
- package/docs/pages/components/chat-message-attachment.md +54 -0
- package/docs/pages/components/chat-message.md +18 -1
- package/docs/pages/components/data-table.md +1 -3
- package/package.json +1 -1
- package/scss/shared/_table.scss +9 -23
- package/scss/themes/_dark.scss +3 -0
- package/scss/themes/_light.scss +4 -0
- package/scss/themes/_typography.scss +1 -0
- package/src/components/button/button.scss +4 -0
- package/src/components/channel-tile/channel-tile.component.ts +280 -0
- package/src/components/channel-tile/channel-tile.scss +197 -0
- package/src/components/channel-tile/index.ts +12 -0
- package/src/components/chat-message/chat-message.component.ts +14 -5
- package/src/components/chat-message/chat-message.scss +37 -12
- package/src/components/chat-message-attachment/chat-message-attachment.component.ts +78 -0
- package/src/components/chat-message-attachment/chat-message-attachment.scss +32 -0
- package/src/components/chat-message-attachment/chat-message-attachment.test.ts +36 -0
- package/src/components/chat-message-attachment/index.ts +12 -0
- package/src/components/data-table/data-table.component.ts +65 -46
- package/src/components/data-table/data-table.scss +32 -58
- package/src/components/icon/icon.component.ts +1 -1
- package/src/components/icon/icon.scss +2 -1
- package/src/components/page/page.component.ts +32 -1
- package/src/components/page/page.scss +6 -5
- package/src/components/tooltip/tooltip.scss +1 -1
- package/src/events/events.ts +2 -0
- package/src/events/zn-accept.ts +7 -0
- package/src/events/zn-reject.ts +7 -0
- package/src/zinc.ts +2 -0
|
@@ -13,6 +13,17 @@
|
|
|
13
13
|
}
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
|
+
{
|
|
17
|
+
"name": "zn-action-bar",
|
|
18
|
+
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
19
|
+
"attributes": [],
|
|
20
|
+
"references": [
|
|
21
|
+
{
|
|
22
|
+
"name": "Documentation",
|
|
23
|
+
"url": "https://zinc.style/components/action-bar"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
16
27
|
{
|
|
17
28
|
"name": "zn-alert",
|
|
18
29
|
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
@@ -52,17 +63,6 @@
|
|
|
52
63
|
}
|
|
53
64
|
]
|
|
54
65
|
},
|
|
55
|
-
{
|
|
56
|
-
"name": "zn-action-bar",
|
|
57
|
-
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
58
|
-
"attributes": [],
|
|
59
|
-
"references": [
|
|
60
|
-
{
|
|
61
|
-
"name": "Documentation",
|
|
62
|
-
"url": "https://zinc.style/components/action-bar"
|
|
63
|
-
}
|
|
64
|
-
]
|
|
65
|
-
},
|
|
66
66
|
{
|
|
67
67
|
"name": "zn-animated-button",
|
|
68
68
|
"description": "\n---\n\n\n### **Methods:**\n - **purchase(): _void_** - Programmatically trigger the purchase flow\n- **setSuccess(): _void_** - Set the button to success state manually\n- **setFailure(message): _void_** - Set the button to failure state manually with optional error message\n- **reset(): _void_** - Reset the button to idle state",
|
|
@@ -324,6 +324,109 @@
|
|
|
324
324
|
}
|
|
325
325
|
]
|
|
326
326
|
},
|
|
327
|
+
{
|
|
328
|
+
"name": "zn-channel-tile",
|
|
329
|
+
"description": "A channel/queue slot tile with two faces: an active (occupied) state\nshowing an in-progress item, and an available (empty) state advertising\ncapacity — optionally reserving an incoming item with an auto-accept countdown.\n---\n\n\n### **Events:**\n - **zn-accept** - Emitted when an available tile is accepted (click or auto-accept). Cancelable — call `preventDefault()` to suppress the built-in `accept-uri` fetch.\n- **zn-reject** - Emitted when the reject control is pressed.\n\n### **Slots:**\n - **leading** - Replaces the leading icon in the active state.\n- **action** - Action content for the available state (e.g. a form). Falls back to a default accept button.\n- **footer** - Trailing content (e.g. status badges) in the active state.\n\n### **CSS Properties:**\n - **--channel-tile-color** - Resolved accent color (set from the `color` property). _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **progress** - The progress indicator (incoming countdown overlay or active progress bar).",
|
|
330
|
+
"attributes": [
|
|
331
|
+
{
|
|
332
|
+
"name": "available",
|
|
333
|
+
"description": "Renders the empty/available face instead of the active face.",
|
|
334
|
+
"values": []
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"name": "incoming",
|
|
338
|
+
"description": "(Available only) the tile is reserving an incoming item awaiting acceptance.",
|
|
339
|
+
"values": []
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"name": "variant",
|
|
343
|
+
"description": "Free-form grouping/theming key (reflected so consumers can query/style by it).",
|
|
344
|
+
"values": []
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"name": "header",
|
|
348
|
+
"description": "Top-bar text (e.g. brand).",
|
|
349
|
+
"values": []
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"name": "icon",
|
|
353
|
+
"description": "Leading icon (active state).",
|
|
354
|
+
"values": []
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"name": "color",
|
|
358
|
+
"description": "Accent color driving the leading icon and `--channel-tile-color`.",
|
|
359
|
+
"values": [{ "name": "ChannelTileColor" }]
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"name": "title",
|
|
363
|
+
"description": "Primary line. Defaults to \"Available\" in the available state when unset.",
|
|
364
|
+
"values": []
|
|
365
|
+
},
|
|
366
|
+
{ "name": "subtitle", "description": "Secondary line.", "values": [] },
|
|
367
|
+
{
|
|
368
|
+
"name": "progress",
|
|
369
|
+
"description": "(Active only) progress bar fill, 0–100.",
|
|
370
|
+
"values": []
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"name": "progress-color",
|
|
374
|
+
"description": "(Active only) CSS color for the progress bar fill.",
|
|
375
|
+
"values": []
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"name": "item-id",
|
|
379
|
+
"description": "Identifier carried in `zn-accept` / `zn-reject` event details.",
|
|
380
|
+
"values": []
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"name": "accept-uri",
|
|
384
|
+
"description": "(Available only) when set, accepting fetches this URI unless `zn-accept` is canceled.",
|
|
385
|
+
"values": []
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"name": "reserved-until",
|
|
389
|
+
"description": "(Available/incoming) epoch (seconds or millis) at which the reservation window ends.",
|
|
390
|
+
"values": []
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"name": "auto-accept-delay",
|
|
394
|
+
"description": "(Available/incoming) auto-accept window length in milliseconds.",
|
|
395
|
+
"values": []
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"name": "rejectable",
|
|
399
|
+
"description": "(Available/incoming) whether a reject control is offered.",
|
|
400
|
+
"values": []
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"name": "accept-icon",
|
|
404
|
+
"description": "Icon for the built-in accept button.",
|
|
405
|
+
"values": []
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"name": "accept-gaid",
|
|
409
|
+
"description": "Optional analytics id forwarded to the built-in accept button.",
|
|
410
|
+
"values": []
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"name": "reject-icon",
|
|
414
|
+
"description": "Icon for the reject control.",
|
|
415
|
+
"values": []
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"name": "reject-label",
|
|
419
|
+
"description": "Accessible label for the reject control.",
|
|
420
|
+
"values": []
|
|
421
|
+
}
|
|
422
|
+
],
|
|
423
|
+
"references": [
|
|
424
|
+
{
|
|
425
|
+
"name": "Documentation",
|
|
426
|
+
"url": "https://zinc.style/components/channel-tile"
|
|
427
|
+
}
|
|
428
|
+
]
|
|
429
|
+
},
|
|
327
430
|
{
|
|
328
431
|
"name": "zn-chart",
|
|
329
432
|
"description": "Chart component powered by Apache ECharts.\n---\n\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
@@ -361,7 +464,7 @@
|
|
|
361
464
|
},
|
|
362
465
|
{
|
|
363
466
|
"name": "zn-chat-message",
|
|
364
|
-
"description": "A single message in a chat-style conversation: avatar, sender,\ntime, optional badge, and a message bubble with optional actions. Also renders\nsystem events (connections, transfers, etc.) as a centred card.\n---\n\n\n### **Slots:**\n - _default_ - The message content. Ignored when the `message` attribute is set.\n- **badge** - Rendered in the header after the sender and time (e.g. an INTERNAL NOTE chip).\n- **edit-dialog-trigger** - Action rendered at the end of the bubble (e.g. a remove icon button).\n- **edit-dialog** - Pass-through for an associated dialog element.\n\n### **CSS Properties:**\n - **--message-background** - The bubble's background
|
|
467
|
+
"description": "A single message in a chat-style conversation: avatar, sender,\ntime, optional badge, and a message bubble with optional actions. Also renders\nsystem events (connections, transfers, etc.) as a centred card.\n---\n\n\n### **Slots:**\n - _default_ - The message content. Ignored when the `message` attribute is set.\n- **badge** - Rendered in the header after the sender and time (e.g. an INTERNAL NOTE chip).\n- **attachments** - Attachments displayed beneath the message content. Use `zn-chat-message-attachment`, which auto-assigns itself to this slot.\n- **edit-dialog-trigger** - Action rendered at the end of the bubble (e.g. a remove icon button).\n- **edit-dialog** - Pass-through for an associated dialog element.\n\n### **CSS Properties:**\n - **--message-background** - The bubble's background color. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **avatar** - The avatar column.\n- **body** - The header and bubble column.\n- **header** - The sender/time/badge row.\n- **bubble** - The message bubble.\n- **content** - The message content within the bubble.\n- **attachments** - The attachments row beneath the message content.\n- **system-card** - The card rendered for system action types.",
|
|
365
468
|
"attributes": [
|
|
366
469
|
{
|
|
367
470
|
"name": "sender",
|
|
@@ -406,6 +509,43 @@
|
|
|
406
509
|
}
|
|
407
510
|
]
|
|
408
511
|
},
|
|
512
|
+
{
|
|
513
|
+
"name": "zn-chat-message-attachment",
|
|
514
|
+
"description": "A single file or link attachment for a `zn-chat-message`. Renders an\nicon and a label as a link, styled to match the message's attachments row. It is\nintended to be used only inside a `zn-chat-message` and is automatically placed in\nthat component's `attachments` slot.\n---\n\n\n### **Slots:**\n - _default_ - The attachment label. Falls back to the `name` attribute when empty.\n\n### **CSS Parts:**\n - **base** - The attachment link.\n- **icon** - The leading icon.\n- **label** - The attachment label.",
|
|
515
|
+
"attributes": [
|
|
516
|
+
{
|
|
517
|
+
"name": "href",
|
|
518
|
+
"description": "The URL the attachment links to.",
|
|
519
|
+
"values": []
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
"name": "name",
|
|
523
|
+
"description": "The attachment label (e.g. the file name). Used when the default slot is empty.",
|
|
524
|
+
"values": []
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
"name": "icon",
|
|
528
|
+
"description": "The leading icon name.",
|
|
529
|
+
"values": []
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"name": "target",
|
|
533
|
+
"description": "Where to open the link. Defaults to a new tab.",
|
|
534
|
+
"values": []
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"name": "download",
|
|
538
|
+
"description": "Prompt a download rather than navigating to the link.",
|
|
539
|
+
"values": []
|
|
540
|
+
}
|
|
541
|
+
],
|
|
542
|
+
"references": [
|
|
543
|
+
{
|
|
544
|
+
"name": "Documentation",
|
|
545
|
+
"url": "https://zinc.style/components/chat-message-attachment"
|
|
546
|
+
}
|
|
547
|
+
]
|
|
548
|
+
},
|
|
409
549
|
{
|
|
410
550
|
"name": "zn-checkbox",
|
|
411
551
|
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-blur** - Emitted when the checkbox loses focus.\n- **zn-change** - Emitted when the checked state changes.\n- **zn-focus** - Emitted when the checkbox gains focus.\n- **zn-input** - Emitted when the checkbox receives input.\n- **zn-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Methods:**\n - **click()** - Simulates a click on the checkbox.\n- **focus(options: _FocusOptions_)** - Sets focus on the checkbox.\n- **blur()** - Removes focus from the checkbox.\n- **checkValidity()** - Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid.\n- **getForm(): _HTMLFormElement | null_** - Gets the associated form, if one exists.\n- **reportValidity()** - Checks for validity and shows the browser's validation message if the control is invalid.\n- **setCustomValidity(message: _string_)** - Sets a custom validation message. The value provided will be shown to the user when the form is submitted. To clear\nthe custom validation message, call this method with an empty string.\n\n### **Slots:**\n - _default_ - The checkbox's label.\n- **description** - A description of the checkbox's label. Serves as help text for a checkbox item. Alternatively, you can use the `description` attribute.\n- **selected-content** - Use to nest rich content (like an input) inside a selected checkbox item. Use only with the contained style.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **control** - The square container that wraps the checkbox's checked state.\n- **control--checked** - Matches the control part when the checkbox is checked.\n- **control--indeterminate** - Matches the control part when the checkbox is indeterminate.\n- **checked-icon** - The checked icon, an `<zn-icon>` element.\n- **unchecked-icon** - The unchecked icon, an `<zn-icon>` element.\n- **indeterminate-icon** - The indeterminate icon, an `<zn-icon>` element.\n- **label** - The container that wraps the checkbox's label.\n- **description** - The container that wraps the checkbox's description.\n- **selected-content** - The container that wraps optional content that appears when a checkbox is checked.",
|
|
@@ -2448,82 +2588,6 @@
|
|
|
2448
2588
|
}
|
|
2449
2589
|
]
|
|
2450
2590
|
},
|
|
2451
|
-
{
|
|
2452
|
-
"name": "zn-priority-list",
|
|
2453
|
-
"description": "A reorderable list where each item receives a numerical priority based on its position. Supports drag-and-drop\nand keyboard reordering. Priority values are submitted as form data via hidden inputs.\n---\n\n\n### **Events:**\n - **zn-change** - Emitted when the order of items changes.\n- **zn-reorder** - Emitted when items are reordered. Call `getPriorityMap()` on the component to get the updated `{ key: string, priority: number }[]` array.\n\n### **Methods:**\n - **getPriorityMap(): _PriorityItem[]_** - Returns the priority map: an array of { key, priority } objects.\n- **checkValidity(): _boolean_** - Checks for validity but does not show a validation message.\n- **getForm(): _HTMLFormElement | null_** - Gets the associated form, if one exists.\n- **reportValidity(): _boolean_** - Checks for validity and shows the browser's validation message if the control is invalid.\n- **setCustomValidity(_message)** - Sets a custom validation message. Pass an empty string to restore validity.\n\n### **Slots:**\n - _default_ - The default slot where list items are placed. Each slotted element must have a `value` attribute that uniquely identifies the item. The component automatically assigns slot names to project each item into the correct position. The item's position in the list determines its priority (top = `priority-start`, incrementing).\n- **label** - The component's label. Required for proper accessibility. Alternatively, use the `label` attribute.\n- **label-tooltip** - Used to add text displayed in a tooltip next to the label.\n- **help-text** - Text that describes how to use the component. Alternatively, use the `help-text` attribute.\n\n### **CSS Properties:**\n - **--zn-priority-list-item-gap** - The gap between list items. Defaults to `var(--zn-spacing-2x-small)`. _(default: undefined)_\n- **--zn-priority-list-item-padding** - The padding inside each item. Defaults to `var(--zn-spacing-small) var(--zn-spacing-medium)`. _(default: undefined)_\n- **--zn-priority-list-handle-color** - The color of the drag handle. Defaults to `var(--zn-color-neutral-500)`. _(default: undefined)_\n- **--zn-priority-list-priority-color** - The color of the priority number. Defaults to `var(--zn-color-neutral-600)`. _(default: undefined)_\n\n### **CSS Parts:**\n - **form-control** - The form control wrapper.\n- **form-control-label** - The label wrapper.\n- **form-control-input** - The input area wrapper.\n- **form-control-help-text** - The help text wrapper.\n- **list** - The list container.\n- **item** - An individual list item row.\n- **drag-handle** - The drag handle icon.\n- **priority** - The priority number badge.\n- **content** - The content area of an item.",
|
|
2454
|
-
"attributes": [
|
|
2455
|
-
{
|
|
2456
|
-
"name": "name",
|
|
2457
|
-
"description": "The name prefix for form submission. Each item generates a hidden input named `{name}[{itemValue}]`\nwith the priority number as its value.",
|
|
2458
|
-
"values": []
|
|
2459
|
-
},
|
|
2460
|
-
{
|
|
2461
|
-
"name": "value",
|
|
2462
|
-
"description": "The current ordered list of item keys, reflecting the visual order. This is the source of truth for ordering.\nEach entry should match a `value` attribute on a slotted child element.",
|
|
2463
|
-
"values": [{ "name": "string[]" }]
|
|
2464
|
-
},
|
|
2465
|
-
{
|
|
2466
|
-
"name": "label",
|
|
2467
|
-
"description": "The component's label. Required for proper accessibility.",
|
|
2468
|
-
"values": []
|
|
2469
|
-
},
|
|
2470
|
-
{
|
|
2471
|
-
"name": "label-tooltip",
|
|
2472
|
-
"description": "Text that appears in a tooltip next to the label.",
|
|
2473
|
-
"values": []
|
|
2474
|
-
},
|
|
2475
|
-
{
|
|
2476
|
-
"name": "help-text",
|
|
2477
|
-
"description": "Help text that describes how to use the component.",
|
|
2478
|
-
"values": []
|
|
2479
|
-
},
|
|
2480
|
-
{
|
|
2481
|
-
"name": "form",
|
|
2482
|
-
"description": "Associates the control with a form by id. The form must be in the same document or shadow root.",
|
|
2483
|
-
"values": []
|
|
2484
|
-
},
|
|
2485
|
-
{
|
|
2486
|
-
"name": "size",
|
|
2487
|
-
"description": "The size of the list items.",
|
|
2488
|
-
"values": [
|
|
2489
|
-
{ "name": "small" },
|
|
2490
|
-
{ "name": "medium" },
|
|
2491
|
-
{ "name": "large" }
|
|
2492
|
-
]
|
|
2493
|
-
},
|
|
2494
|
-
{
|
|
2495
|
-
"name": "disabled",
|
|
2496
|
-
"description": "Whether the priority list is disabled.",
|
|
2497
|
-
"values": []
|
|
2498
|
-
},
|
|
2499
|
-
{
|
|
2500
|
-
"name": "required",
|
|
2501
|
-
"description": "Ensures the form control has a value before allowing submission.",
|
|
2502
|
-
"values": []
|
|
2503
|
-
},
|
|
2504
|
-
{
|
|
2505
|
-
"name": "priority-start",
|
|
2506
|
-
"description": "The starting priority number. Defaults to 1.",
|
|
2507
|
-
"values": []
|
|
2508
|
-
},
|
|
2509
|
-
{
|
|
2510
|
-
"name": "formaction",
|
|
2511
|
-
"description": "When set, the associated form will be submitted with the given action URL whenever items are reordered.\nIf set to an empty string, the form will be submitted using its existing action.",
|
|
2512
|
-
"values": []
|
|
2513
|
-
},
|
|
2514
|
-
{
|
|
2515
|
-
"name": "order",
|
|
2516
|
-
"description": "A comma-separated list of item keys defining the initial display order.\nKeys must match the `value` attributes on slotted children.\nAny slotted items not listed are appended at the end in DOM order.",
|
|
2517
|
-
"values": []
|
|
2518
|
-
}
|
|
2519
|
-
],
|
|
2520
|
-
"references": [
|
|
2521
|
-
{
|
|
2522
|
-
"name": "Documentation",
|
|
2523
|
-
"url": "https://zinc.style/components/priority-list"
|
|
2524
|
-
}
|
|
2525
|
-
]
|
|
2526
|
-
},
|
|
2527
2591
|
{
|
|
2528
2592
|
"name": "zn-popup",
|
|
2529
2593
|
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Methods:**\n - **reposition()** - Forces the popup to recalculate and reposition itself.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
@@ -2673,6 +2737,82 @@
|
|
|
2673
2737
|
}
|
|
2674
2738
|
]
|
|
2675
2739
|
},
|
|
2740
|
+
{
|
|
2741
|
+
"name": "zn-priority-list",
|
|
2742
|
+
"description": "A reorderable list where each item receives a numerical priority based on its position. Supports drag-and-drop\nand keyboard reordering. Priority values are submitted as form data via hidden inputs.\n---\n\n\n### **Events:**\n - **zn-change** - Emitted when the order of items changes.\n- **zn-reorder** - Emitted when items are reordered. Call `getPriorityMap()` on the component to get the updated `{ key: string, priority: number }[]` array.\n\n### **Methods:**\n - **getPriorityMap(): _PriorityItem[]_** - Returns the priority map: an array of { key, priority } objects.\n- **checkValidity(): _boolean_** - Checks for validity but does not show a validation message.\n- **getForm(): _HTMLFormElement | null_** - Gets the associated form, if one exists.\n- **reportValidity(): _boolean_** - Checks for validity and shows the browser's validation message if the control is invalid.\n- **setCustomValidity(_message)** - Sets a custom validation message. Pass an empty string to restore validity.\n\n### **Slots:**\n - _default_ - The default slot where list items are placed. Each slotted element must have a `value` attribute that uniquely identifies the item. The component automatically assigns slot names to project each item into the correct position. The item's position in the list determines its priority (top = `priority-start`, incrementing).\n- **label** - The component's label. Required for proper accessibility. Alternatively, use the `label` attribute.\n- **label-tooltip** - Used to add text displayed in a tooltip next to the label.\n- **help-text** - Text that describes how to use the component. Alternatively, use the `help-text` attribute.\n\n### **CSS Properties:**\n - **--zn-priority-list-item-gap** - The gap between list items. Defaults to `var(--zn-spacing-2x-small)`. _(default: undefined)_\n- **--zn-priority-list-item-padding** - The padding inside each item. Defaults to `var(--zn-spacing-small) var(--zn-spacing-medium)`. _(default: undefined)_\n- **--zn-priority-list-handle-color** - The color of the drag handle. Defaults to `var(--zn-color-neutral-500)`. _(default: undefined)_\n- **--zn-priority-list-priority-color** - The color of the priority number. Defaults to `var(--zn-color-neutral-600)`. _(default: undefined)_\n\n### **CSS Parts:**\n - **form-control** - The form control wrapper.\n- **form-control-label** - The label wrapper.\n- **form-control-input** - The input area wrapper.\n- **form-control-help-text** - The help text wrapper.\n- **list** - The list container.\n- **item** - An individual list item row.\n- **drag-handle** - The drag handle icon.\n- **priority** - The priority number badge.\n- **content** - The content area of an item.",
|
|
2743
|
+
"attributes": [
|
|
2744
|
+
{
|
|
2745
|
+
"name": "name",
|
|
2746
|
+
"description": "The name prefix for form submission. Each item generates a hidden input named `{name}[{itemValue}]`\nwith the priority number as its value.",
|
|
2747
|
+
"values": []
|
|
2748
|
+
},
|
|
2749
|
+
{
|
|
2750
|
+
"name": "value",
|
|
2751
|
+
"description": "The current ordered list of item keys, reflecting the visual order. This is the source of truth for ordering.\nEach entry should match a `value` attribute on a slotted child element.",
|
|
2752
|
+
"values": [{ "name": "string[]" }]
|
|
2753
|
+
},
|
|
2754
|
+
{
|
|
2755
|
+
"name": "label",
|
|
2756
|
+
"description": "The component's label. Required for proper accessibility.",
|
|
2757
|
+
"values": []
|
|
2758
|
+
},
|
|
2759
|
+
{
|
|
2760
|
+
"name": "label-tooltip",
|
|
2761
|
+
"description": "Text that appears in a tooltip next to the label.",
|
|
2762
|
+
"values": []
|
|
2763
|
+
},
|
|
2764
|
+
{
|
|
2765
|
+
"name": "help-text",
|
|
2766
|
+
"description": "Help text that describes how to use the component.",
|
|
2767
|
+
"values": []
|
|
2768
|
+
},
|
|
2769
|
+
{
|
|
2770
|
+
"name": "form",
|
|
2771
|
+
"description": "Associates the control with a form by id. The form must be in the same document or shadow root.",
|
|
2772
|
+
"values": []
|
|
2773
|
+
},
|
|
2774
|
+
{
|
|
2775
|
+
"name": "size",
|
|
2776
|
+
"description": "The size of the list items.",
|
|
2777
|
+
"values": [
|
|
2778
|
+
{ "name": "small" },
|
|
2779
|
+
{ "name": "medium" },
|
|
2780
|
+
{ "name": "large" }
|
|
2781
|
+
]
|
|
2782
|
+
},
|
|
2783
|
+
{
|
|
2784
|
+
"name": "disabled",
|
|
2785
|
+
"description": "Whether the priority list is disabled.",
|
|
2786
|
+
"values": []
|
|
2787
|
+
},
|
|
2788
|
+
{
|
|
2789
|
+
"name": "required",
|
|
2790
|
+
"description": "Ensures the form control has a value before allowing submission.",
|
|
2791
|
+
"values": []
|
|
2792
|
+
},
|
|
2793
|
+
{
|
|
2794
|
+
"name": "priority-start",
|
|
2795
|
+
"description": "The starting priority number. Defaults to 1.",
|
|
2796
|
+
"values": []
|
|
2797
|
+
},
|
|
2798
|
+
{
|
|
2799
|
+
"name": "formaction",
|
|
2800
|
+
"description": "When set, the associated form will be submitted with the given action URL whenever items are reordered.\nIf set to an empty string, the form will be submitted using its existing action.",
|
|
2801
|
+
"values": []
|
|
2802
|
+
},
|
|
2803
|
+
{
|
|
2804
|
+
"name": "order",
|
|
2805
|
+
"description": "A comma-separated list of item keys defining the initial display order.\nKeys must match the `value` attributes on slotted children.\nAny slotted items not listed are appended at the end in DOM order.",
|
|
2806
|
+
"values": []
|
|
2807
|
+
}
|
|
2808
|
+
],
|
|
2809
|
+
"references": [
|
|
2810
|
+
{
|
|
2811
|
+
"name": "Documentation",
|
|
2812
|
+
"url": "https://zinc.style/components/priority-list"
|
|
2813
|
+
}
|
|
2814
|
+
]
|
|
2815
|
+
},
|
|
2676
2816
|
{
|
|
2677
2817
|
"name": "zn-progress-bar",
|
|
2678
2818
|
"description": "Progress bars provide visual feedback about the completion status of a task or process.\n---\n\n\n### **CSS Properties:**\n - **--zn-border-color** - The color of the progress bar background track. _(default: undefined)_\n- **--zn-progress-bar-color** - The color of the progress bar fill. _(default: undefined)_\n- **--zn-text-heading** - The color of the caption text. _(default: undefined)_\n- **--zn-text** - The color of the progress percentage and description text. _(default: undefined)_\n- **--zn-spacing-x-small** - The spacing between header/footer and the progress bar. _(default: undefined)_\n\n### **CSS Parts:**\n - **header** - The header container that contains the caption and progress text.\n- **caption** - The caption text element.\n- **progress** - The progress percentage text element.\n- **bar** - The SVG element containing the progress bar.\n- **track** - The background track of the progress bar.\n- **fill** - The filled portion of the progress bar indicating progress.\n- **footer** - The footer container that contains the description.\n- **info** - The description text element.",
|