@kubex/zinc 2.0.3 → 2.0.4

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.
@@ -13,17 +13,6 @@
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
- },
27
16
  {
28
17
  "name": "zn-alert",
29
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.",
@@ -71,6 +60,17 @@
71
60
  }
72
61
  ]
73
62
  },
63
+ {
64
+ "name": "zn-action-bar",
65
+ "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.",
66
+ "attributes": [],
67
+ "references": [
68
+ {
69
+ "name": "Documentation",
70
+ "url": "https://zinc.style/components/action-bar"
71
+ }
72
+ ]
73
+ },
74
74
  {
75
75
  "name": "zn-animated-button",
76
76
  "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",
@@ -2299,7 +2299,7 @@
2299
2299
  },
2300
2300
  {
2301
2301
  "name": "zn-form-actions",
2302
- "description": "Standard action row for the bottom of a form. Renders a submit button by default; opt in to more\nwith `with-cancel` and `with-reset`.\n---\n\n\n### **Events:**\n - **zn-cancel** - Emitted when the cancel button is clicked.\n\n### **Slots:**\n - _default_ - Extra actions, placed before the buttons. `align=\"start\"` on a child moves it to the start of the row; any number can sit on either side. Write them in the order they should be read — the sides are set by CSS ordering, so markup order is what a keyboard follows.\n\n### **CSS Parts:**\n - **cancel-button** - The cancel button.\n- **reset-button** - The reset button.\n- **submit-button** - The submit button.",
2302
+ "description": "\n---\n",
2303
2303
  "attributes": [
2304
2304
  {
2305
2305
  "name": "submit-text",
@@ -2350,6 +2350,11 @@
2350
2350
  "name": "loading-on-submit",
2351
2351
  "description": "Shows the submit button loading and ignores further submits until the console reports the request finished,\nso a slow save such as an upload can't be sent twice. Only for forms the console submits.",
2352
2352
  "values": []
2353
+ },
2354
+ {
2355
+ "name": "hide-until-changed",
2356
+ "description": "Hides the row until the form's values differ from when it loaded or was last saved, and hides it again once\nthey match.",
2357
+ "values": []
2353
2358
  }
2354
2359
  ],
2355
2360
  "references": [
@@ -3055,7 +3060,7 @@
3055
3060
  { "name": "name", "values": [] },
3056
3061
  {
3057
3062
  "name": "value",
3058
- "description": "The pairs as a JSON object, such as `{\"1\": \"{{recipient.firstName}}\"}`.",
3063
+ "description": "The pairs as a JSON object, such as `{\"1\": \"{{recipient.firstName}}\"}`. With `list`, the names as a JSON array,\nsuch as `[\"10.0.0.0/24\"]`.",
3059
3064
  "values": []
3060
3065
  },
3061
3066
  { "name": "label", "values": [] },
@@ -3068,6 +3073,16 @@
3068
3073
  "description": "Passed to each value input, so its slash menu can insert merge fields.",
3069
3074
  "values": []
3070
3075
  },
3076
+ {
3077
+ "name": "value-options",
3078
+ "description": "Makes each value a choice instead of free text: a JSON object of option values to labels, such as\n`{\"default\": \"System default\", \"auto\": \"Auto approve\"}`. New rows take the first option.",
3079
+ "values": [{ "name": "Record<string, string>" }]
3080
+ },
3081
+ {
3082
+ "name": "list",
3083
+ "description": "Edits a plain list of names with no values, submitted as a JSON array.",
3084
+ "values": []
3085
+ },
3071
3086
  { "name": "form", "values": [] },
3072
3087
  { "name": "disabled", "values": [] }
3073
3088
  ],
@@ -3679,14 +3694,6 @@
3679
3694
  }
3680
3695
  ]
3681
3696
  },
3682
- {
3683
- "name": "zn-pane",
3684
- "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.",
3685
- "attributes": [{ "name": "flush", "values": [] }],
3686
- "references": [
3687
- { "name": "Documentation", "url": "https://zinc.style/components/pane" }
3688
- ]
3689
- },
3690
3697
  {
3691
3698
  "name": "zn-pagination",
3692
3699
  "description": "Pagination component for navigating through pages of content.\n---\n",
@@ -3703,6 +3710,14 @@
3703
3710
  }
3704
3711
  ]
3705
3712
  },
3713
+ {
3714
+ "name": "zn-pane",
3715
+ "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.",
3716
+ "attributes": [{ "name": "flush", "values": [] }],
3717
+ "references": [
3718
+ { "name": "Documentation", "url": "https://zinc.style/components/pane" }
3719
+ ]
3720
+ },
3706
3721
  {
3707
3722
  "name": "zn-panel",
3708
3723
  "description": "Panels are versatile containers that provide structure for organizing content with optional headers and footers.\n---\n\n\n### **Slots:**\n - _default_ - The panel's main content.\n- **actions** - Actions displayed in the panel header (buttons, chips, etc).\n- **footer** - Content displayed in the panel footer.\n\n### **CSS Properties:**\n - **--zn-panel-basis** - The flex-basis of the panel. Can be set using the basis-px attribute. _(default: undefined)_\n- **--zn-panel-header-padding** - Padding around the header row. Defaults to `--zn-base-gap`. _(default: undefined)_\n- **--zn-panel-footer-padding** - Padding around the footer row. _(default: undefined)_\n- **--zn-panel-padding** - Padding around the body. Defaults to `--zn-base-gap`. _(default: undefined)_\n- **--zn-panel-shadow** - Resting shadow. Defaults to none. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **header** - The header region, when a caption or actions are given.\n- **header-content** - The padded row inside the header, forwarded from zn-header.\n- **header-left** - The caption and description, forwarded from zn-header.\n- **footer** - The footer region, when the footer slot is filled.",
@@ -4432,27 +4447,6 @@
4432
4447
  }
4433
4448
  ]
4434
4449
  },
4435
- {
4436
- "name": "zn-reveal",
4437
- "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.",
4438
- "attributes": [
4439
- { "name": "duration", "values": [] },
4440
- { "name": "initial", "values": [] },
4441
- { "name": "revealed", "values": [] },
4442
- { "name": "hide-delay", "values": [] },
4443
- {
4444
- "name": "no-toggle",
4445
- "description": "Disables click-to-toggle so the value is only revealed on hover. Clicks still bubble to the parent.",
4446
- "values": []
4447
- }
4448
- ],
4449
- "references": [
4450
- {
4451
- "name": "Documentation",
4452
- "url": "https://zinc.style/components/reveal"
4453
- }
4454
- ]
4455
- },
4456
4450
  {
4457
4451
  "name": "zn-report-table",
4458
4452
  "description": "A grouped report: one row per value of a dimension, read column by column, with a total row.\n---\n\n\n### **Events:**\n - **zn-report-change** - Emitted when the type, group by, date range or filter is changed, before the report is fetched again.\n\n### **Slots:**\n - **inputs** - Inputs whose name and value are sent with every request (csrf tokens and similar).\n- **empty-state** - Replaces the default empty state.",
@@ -4526,6 +4520,27 @@
4526
4520
  }
4527
4521
  ]
4528
4522
  },
4523
+ {
4524
+ "name": "zn-reveal",
4525
+ "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.",
4526
+ "attributes": [
4527
+ { "name": "duration", "values": [] },
4528
+ { "name": "initial", "values": [] },
4529
+ { "name": "revealed", "values": [] },
4530
+ { "name": "hide-delay", "values": [] },
4531
+ {
4532
+ "name": "no-toggle",
4533
+ "description": "Disables click-to-toggle so the value is only revealed on hover. Clicks still bubble to the parent.",
4534
+ "values": []
4535
+ }
4536
+ ],
4537
+ "references": [
4538
+ {
4539
+ "name": "Documentation",
4540
+ "url": "https://zinc.style/components/reveal"
4541
+ }
4542
+ ]
4543
+ },
4529
4544
  {
4530
4545
  "name": "zn-schedule-builder",
4531
4546
  "description": "Builds a weekly opening-hours schedule as a drag-to-paint calendar or a compact list of\ntime ranges, and posts the result as JSON.\n---\n\n\n### **Events:**\n - **zn-change** - Emitted when the schedule changes.\n\n### **Methods:**\n - **checkValidity(): _boolean_** - Checks 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: _string_)** - Sets a custom validation message. Pass an empty string to restore validity.\n- **setDay(day: _ScheduleDay_, ranges: _ScheduleRange[]_)** - Replaces the hours for a single day, in the save timezone.\n- **getDay(day: _ScheduleDay_): _ScheduleRange[]_** - Reads the hours for a single day, in the save timezone.\n- **setDisplayDay(day: _ScheduleDay_, ranges: _ScheduleRange[]_)** - Replaces the hours for a single day, given in the display timezone.\n\n### **Slots:**\n - **label** - The schedule's label. Alternatively, use the `label` attribute.\n- **help-text** - Text that describes how to use the schedule. Alternatively, use the `help-text` attribute.\n\n### **CSS Properties:**\n - **--slot-height** - The height of a single time slot in the calendar. Defaults to `18px`. _(default: undefined)_\n- **--gutter-width** - The width of the calendar's time gutter. Defaults to `64px`. _(default: undefined)_\n- **--open-color** - The fill used for open hours. _(default: undefined)_\n- **--reduced-color** - The fill used for hours an exception removes. _(default: undefined)_\n\n### **CSS Parts:**\n - **form-control** - The form control that wraps the builder, label and help text.\n- **base** - The component's base wrapper.\n- **toolbar** - The row above the builder holding the hint, legend and view toggle.\n- **calendar** - The calendar view wrapper.\n- **list** - The form (list) view wrapper.\n- **summary** - The summary panel beside the calendar.",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@kubex/zinc",
4
- "version": "2.0.3",
4
+ "version": "2.0.4",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -15,28 +15,6 @@
15
15
  "events": [],
16
16
  "js": { "properties": [], "events": [] }
17
17
  },
18
- {
19
- "name": "zn-action-bar",
20
- "description": "Short summary of the component's intended use.\n\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.",
21
- "doc-url": "",
22
- "attributes": [],
23
- "slots": [
24
- { "name": "", "description": "The default slot." },
25
- { "name": "example", "description": "An example slot." }
26
- ],
27
- "events": [
28
- { "name": "zn-event-name", "description": "Emitted as an example." }
29
- ],
30
- "js": {
31
- "properties": [],
32
- "events": [
33
- {
34
- "name": "zn-event-name",
35
- "description": "Emitted as an example."
36
- }
37
- ]
38
- }
39
- },
40
18
  {
41
19
  "name": "zn-alert",
42
20
  "description": "Short summary of the component's intended use.\n\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.",
@@ -117,6 +95,28 @@
117
95
  ]
118
96
  }
119
97
  },
98
+ {
99
+ "name": "zn-action-bar",
100
+ "description": "Short summary of the component's intended use.\n\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.",
101
+ "doc-url": "",
102
+ "attributes": [],
103
+ "slots": [
104
+ { "name": "", "description": "The default slot." },
105
+ { "name": "example", "description": "An example slot." }
106
+ ],
107
+ "events": [
108
+ { "name": "zn-event-name", "description": "Emitted as an example." }
109
+ ],
110
+ "js": {
111
+ "properties": [],
112
+ "events": [
113
+ {
114
+ "name": "zn-event-name",
115
+ "description": "Emitted as an example."
116
+ }
117
+ ]
118
+ }
119
+ },
120
120
  {
121
121
  "name": "zn-animated-button",
122
122
  "description": "\n\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",
@@ -5273,7 +5273,7 @@
5273
5273
  },
5274
5274
  {
5275
5275
  "name": "zn-form-actions",
5276
- "description": "Standard action row for the bottom of a form. Renders a submit button by default; opt in to more\nwith `with-cancel` and `with-reset`.\n\n---\n\n\n### **Events:**\n - **zn-cancel** - Emitted when the cancel button is clicked.\n\n### **Slots:**\n - _default_ - Extra actions, placed before the buttons. `align=\"start\"` on a child moves it to the start of the row; any number can sit on either side. Write them in the order they should be read — the sides are set by CSS ordering, so markup order is what a keyboard follows.\n\n### **CSS Parts:**\n - **cancel-button** - The cancel button.\n- **reset-button** - The reset button.\n- **submit-button** - The submit button.",
5276
+ "description": "\n\n---\n",
5277
5277
  "doc-url": "",
5278
5278
  "attributes": [
5279
5279
  {
@@ -5325,20 +5325,14 @@
5325
5325
  "name": "loading-on-submit",
5326
5326
  "description": "Shows the submit button loading and ignores further submits until the console reports the request finished,\nso a slow save such as an upload can't be sent twice. Only for forms the console submits.",
5327
5327
  "value": { "type": "boolean", "default": "false" }
5328
- }
5329
- ],
5330
- "slots": [
5331
- {
5332
- "name": "",
5333
- "description": "Extra actions, placed before the buttons. `align=\"start\"` on a child moves it to the start of the row; any number can sit on either side. Write them in the order they should be read — the sides are set by CSS ordering, so markup order is what a keyboard follows."
5334
- }
5335
- ],
5336
- "events": [
5328
+ },
5337
5329
  {
5338
- "name": "zn-cancel",
5339
- "description": "Emitted when the cancel button is clicked."
5330
+ "name": "hide-until-changed",
5331
+ "description": "Hides the row until the form's values differ from when it loaded or was last saved, and hides it again once\nthey match.",
5332
+ "value": { "type": "boolean", "default": "false" }
5340
5333
  }
5341
5334
  ],
5335
+ "events": [],
5342
5336
  "js": {
5343
5337
  "properties": [
5344
5338
  {
@@ -5390,14 +5384,14 @@
5390
5384
  "name": "loadingOnSubmit",
5391
5385
  "description": "Shows the submit button loading and ignores further submits until the console reports the request finished,\nso a slow save such as an upload can't be sent twice. Only for forms the console submits.",
5392
5386
  "type": "boolean"
5393
- }
5394
- ],
5395
- "events": [
5387
+ },
5396
5388
  {
5397
- "name": "zn-cancel",
5398
- "description": "Emitted when the cancel button is clicked."
5389
+ "name": "hideUntilChanged",
5390
+ "description": "Hides the row until the form's values differ from when it loaded or was last saved, and hides it again once\nthey match.",
5391
+ "type": "boolean"
5399
5392
  }
5400
- ]
5393
+ ],
5394
+ "events": []
5401
5395
  }
5402
5396
  },
5403
5397
  {
@@ -6960,7 +6954,7 @@
6960
6954
  { "name": "name", "value": { "type": "string", "default": "''" } },
6961
6955
  {
6962
6956
  "name": "value",
6963
- "description": "The pairs as a JSON object, such as `{\"1\": \"{{recipient.firstName}}\"}`.",
6957
+ "description": "The pairs as a JSON object, such as `{\"1\": \"{{recipient.firstName}}\"}`. With `list`, the names as a JSON array,\nsuch as `[\"10.0.0.0/24\"]`.",
6964
6958
  "value": { "type": "string", "default": "'{}'" }
6965
6959
  },
6966
6960
  { "name": "label", "value": { "type": "string", "default": "''" } },
@@ -6985,6 +6979,19 @@
6985
6979
  "description": "Passed to each value input, so its slash menu can insert merge fields.",
6986
6980
  "value": { "type": "string", "default": "''" }
6987
6981
  },
6982
+ {
6983
+ "name": "value-options",
6984
+ "description": "Makes each value a choice instead of free text: a JSON object of option values to labels, such as\n`{\"default\": \"System default\", \"auto\": \"Auto approve\"}`. New rows take the first option.",
6985
+ "value": {
6986
+ "type": "Record<string, string> | null",
6987
+ "default": "null"
6988
+ }
6989
+ },
6990
+ {
6991
+ "name": "list",
6992
+ "description": "Edits a plain list of names with no values, submitted as a JSON array.",
6993
+ "value": { "type": "boolean", "default": "false" }
6994
+ },
6988
6995
  { "name": "form", "value": { "type": "string", "default": "''" } },
6989
6996
  {
6990
6997
  "name": "disabled",
@@ -7012,7 +7019,12 @@
7012
7019
  { "name": "name", "type": "string" },
7013
7020
  {
7014
7021
  "name": "value",
7015
- "description": "The pairs as a JSON object, such as `{\"1\": \"{{recipient.firstName}}\"}`.",
7022
+ "description": "The pairs as a JSON object, such as `{\"1\": \"{{recipient.firstName}}\"}`. With `list`, the names as a JSON array,\nsuch as `[\"10.0.0.0/24\"]`.",
7023
+ "type": "string"
7024
+ },
7025
+ {
7026
+ "name": "defaultValue",
7027
+ "description": "The value a form reset restores, taken from the initial `value` attribute.",
7016
7028
  "type": "string"
7017
7029
  },
7018
7030
  { "name": "label", "type": "string" },
@@ -7025,6 +7037,16 @@
7025
7037
  "description": "Passed to each value input, so its slash menu can insert merge fields.",
7026
7038
  "type": "string"
7027
7039
  },
7040
+ {
7041
+ "name": "valueOptions",
7042
+ "description": "Makes each value a choice instead of free text: a JSON object of option values to labels, such as\n`{\"default\": \"System default\", \"auto\": \"Auto approve\"}`. New rows take the first option.",
7043
+ "type": "Record<string, string> | null"
7044
+ },
7045
+ {
7046
+ "name": "list",
7047
+ "description": "Edits a plain list of names with no values, submitted as a JSON array.",
7048
+ "type": "boolean"
7049
+ },
7028
7050
  { "name": "form", "type": "string" },
7029
7051
  { "name": "disabled", "type": "boolean" },
7030
7052
  { "name": "validity", "type": "ValidityState" },
@@ -8547,6 +8569,27 @@
8547
8569
  ]
8548
8570
  }
8549
8571
  },
8572
+ {
8573
+ "name": "zn-pagination",
8574
+ "description": "Pagination component for navigating through pages of content.\n\n---\n",
8575
+ "doc-url": "",
8576
+ "attributes": [
8577
+ { "name": "limit", "value": { "type": "number", "default": "10" } },
8578
+ { "name": "total", "value": { "type": "number", "default": "0" } },
8579
+ { "name": "page", "value": { "type": "number", "default": "1" } },
8580
+ { "name": "uri", "value": { "type": "string", "default": "\"\"" } }
8581
+ ],
8582
+ "events": [],
8583
+ "js": {
8584
+ "properties": [
8585
+ { "name": "limit", "type": "number" },
8586
+ { "name": "total", "type": "number" },
8587
+ { "name": "page", "type": "number" },
8588
+ { "name": "uri", "type": "string" }
8589
+ ],
8590
+ "events": []
8591
+ }
8592
+ },
8550
8593
  {
8551
8594
  "name": "zn-pane",
8552
8595
  "description": "Short summary of the component's intended use.\n\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.",
@@ -8569,27 +8612,6 @@
8569
8612
  ]
8570
8613
  }
8571
8614
  },
8572
- {
8573
- "name": "zn-pagination",
8574
- "description": "Pagination component for navigating through pages of content.\n\n---\n",
8575
- "doc-url": "",
8576
- "attributes": [
8577
- { "name": "limit", "value": { "type": "number", "default": "10" } },
8578
- { "name": "total", "value": { "type": "number", "default": "0" } },
8579
- { "name": "page", "value": { "type": "number", "default": "1" } },
8580
- { "name": "uri", "value": { "type": "string", "default": "\"\"" } }
8581
- ],
8582
- "events": [],
8583
- "js": {
8584
- "properties": [
8585
- { "name": "limit", "type": "number" },
8586
- { "name": "total", "type": "number" },
8587
- { "name": "page", "type": "number" },
8588
- { "name": "uri", "type": "string" }
8589
- ],
8590
- "events": []
8591
- }
8592
- },
8593
8615
  {
8594
8616
  "name": "zn-panel",
8595
8617
  "description": "Panels are versatile containers that provide structure for organizing content with optional headers and footers.\n\n---\n\n\n### **Slots:**\n - _default_ - The panel's main content.\n- **actions** - Actions displayed in the panel header (buttons, chips, etc).\n- **footer** - Content displayed in the panel footer.\n\n### **CSS Properties:**\n - **--zn-panel-basis** - The flex-basis of the panel. Can be set using the basis-px attribute. _(default: undefined)_\n- **--zn-panel-header-padding** - Padding around the header row. Defaults to `--zn-base-gap`. _(default: undefined)_\n- **--zn-panel-footer-padding** - Padding around the footer row. _(default: undefined)_\n- **--zn-panel-padding** - Padding around the body. Defaults to `--zn-base-gap`. _(default: undefined)_\n- **--zn-panel-shadow** - Resting shadow. Defaults to none. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **header** - The header region, when a caption or actions are given.\n- **header-content** - The padded row inside the header, forwarded from zn-header.\n- **header-left** - The caption and description, forwarded from zn-header.\n- **footer** - The footer region, when the footer slot is filled.",
@@ -10152,60 +10174,6 @@
10152
10174
  ]
10153
10175
  }
10154
10176
  },
10155
- {
10156
- "name": "zn-reveal",
10157
- "description": "Short summary of the component's intended use.\n\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.",
10158
- "doc-url": "",
10159
- "attributes": [
10160
- {
10161
- "name": "duration",
10162
- "value": { "type": "number", "default": "2000" }
10163
- },
10164
- {
10165
- "name": "initial",
10166
- "value": { "type": "string", "default": "''" }
10167
- },
10168
- {
10169
- "name": "revealed",
10170
- "value": { "type": "string", "default": "''" }
10171
- },
10172
- {
10173
- "name": "hide-delay",
10174
- "value": { "type": "number", "default": "150" }
10175
- },
10176
- {
10177
- "name": "no-toggle",
10178
- "description": "Disables click-to-toggle so the value is only revealed on hover. Clicks still bubble to the parent.",
10179
- "value": { "type": "boolean", "default": "false" }
10180
- }
10181
- ],
10182
- "slots": [
10183
- { "name": "", "description": "The default slot." },
10184
- { "name": "example", "description": "An example slot." }
10185
- ],
10186
- "events": [
10187
- { "name": "zn-event-name", "description": "Emitted as an example." }
10188
- ],
10189
- "js": {
10190
- "properties": [
10191
- { "name": "duration", "type": "number" },
10192
- { "name": "initial", "type": "string" },
10193
- { "name": "revealed", "type": "string" },
10194
- { "name": "hideDelay", "type": "number" },
10195
- {
10196
- "name": "noToggle",
10197
- "description": "Disables click-to-toggle so the value is only revealed on hover. Clicks still bubble to the parent.",
10198
- "type": "boolean"
10199
- }
10200
- ],
10201
- "events": [
10202
- {
10203
- "name": "zn-event-name",
10204
- "description": "Emitted as an example."
10205
- }
10206
- ]
10207
- }
10208
- },
10209
10177
  {
10210
10178
  "name": "zn-report-table",
10211
10179
  "description": "A grouped report: one row per value of a dimension, read column by column, with a total row.\n\n---\n\n\n### **Events:**\n - **zn-report-change** - Emitted when the type, group by, date range or filter is changed, before the report is fetched again.\n\n### **Slots:**\n - **inputs** - Inputs whose name and value are sent with every request (csrf tokens and similar).\n- **empty-state** - Replaces the default empty state.",
@@ -10379,6 +10347,60 @@
10379
10347
  ]
10380
10348
  }
10381
10349
  },
10350
+ {
10351
+ "name": "zn-reveal",
10352
+ "description": "Short summary of the component's intended use.\n\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.",
10353
+ "doc-url": "",
10354
+ "attributes": [
10355
+ {
10356
+ "name": "duration",
10357
+ "value": { "type": "number", "default": "2000" }
10358
+ },
10359
+ {
10360
+ "name": "initial",
10361
+ "value": { "type": "string", "default": "''" }
10362
+ },
10363
+ {
10364
+ "name": "revealed",
10365
+ "value": { "type": "string", "default": "''" }
10366
+ },
10367
+ {
10368
+ "name": "hide-delay",
10369
+ "value": { "type": "number", "default": "150" }
10370
+ },
10371
+ {
10372
+ "name": "no-toggle",
10373
+ "description": "Disables click-to-toggle so the value is only revealed on hover. Clicks still bubble to the parent.",
10374
+ "value": { "type": "boolean", "default": "false" }
10375
+ }
10376
+ ],
10377
+ "slots": [
10378
+ { "name": "", "description": "The default slot." },
10379
+ { "name": "example", "description": "An example slot." }
10380
+ ],
10381
+ "events": [
10382
+ { "name": "zn-event-name", "description": "Emitted as an example." }
10383
+ ],
10384
+ "js": {
10385
+ "properties": [
10386
+ { "name": "duration", "type": "number" },
10387
+ { "name": "initial", "type": "string" },
10388
+ { "name": "revealed", "type": "string" },
10389
+ { "name": "hideDelay", "type": "number" },
10390
+ {
10391
+ "name": "noToggle",
10392
+ "description": "Disables click-to-toggle so the value is only revealed on hover. Clicks still bubble to the parent.",
10393
+ "type": "boolean"
10394
+ }
10395
+ ],
10396
+ "events": [
10397
+ {
10398
+ "name": "zn-event-name",
10399
+ "description": "Emitted as an example."
10400
+ }
10401
+ ]
10402
+ }
10403
+ },
10382
10404
  {
10383
10405
  "name": "zn-schedule-builder",
10384
10406
  "description": "Builds a weekly opening-hours schedule as a drag-to-paint calendar or a compact list of\ntime ranges, and posts the result as JSON.\n\n---\n\n\n### **Events:**\n - **zn-change** - Emitted when the schedule changes.\n\n### **Methods:**\n - **checkValidity(): _boolean_** - Checks 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: _string_)** - Sets a custom validation message. Pass an empty string to restore validity.\n- **setDay(day: _ScheduleDay_, ranges: _ScheduleRange[]_)** - Replaces the hours for a single day, in the save timezone.\n- **getDay(day: _ScheduleDay_): _ScheduleRange[]_** - Reads the hours for a single day, in the save timezone.\n- **setDisplayDay(day: _ScheduleDay_, ranges: _ScheduleRange[]_)** - Replaces the hours for a single day, given in the display timezone.\n\n### **Slots:**\n - **label** - The schedule's label. Alternatively, use the `label` attribute.\n- **help-text** - Text that describes how to use the schedule. Alternatively, use the `help-text` attribute.\n\n### **CSS Properties:**\n - **--slot-height** - The height of a single time slot in the calendar. Defaults to `18px`. _(default: undefined)_\n- **--gutter-width** - The width of the calendar's time gutter. Defaults to `64px`. _(default: undefined)_\n- **--open-color** - The fill used for open hours. _(default: undefined)_\n- **--reduced-color** - The fill used for hours an exception removes. _(default: undefined)_\n\n### **CSS Parts:**\n - **form-control** - The form control that wraps the builder, label and help text.\n- **base** - The component's base wrapper.\n- **toolbar** - The row above the builder holding the hint, legend and view toggle.\n- **calendar** - The calendar view wrapper.\n- **list** - The form (list) view wrapper.\n- **summary** - The summary panel beside the calendar.",
package/dist/zn.d.ts CHANGED
@@ -3121,7 +3121,9 @@ declare module "internal/conditional" {
3121
3121
  private conditionals;
3122
3122
  private required;
3123
3123
  private initiallyDisabled;
3124
+ private forms;
3124
3125
  private readonly handleChange;
3126
+ private readonly handleReset;
3125
3127
  constructor(host: ReactiveControllerHost & Element & ConditionalHost);
3126
3128
  /** Call from the host's `firstUpdated()` to parse IDs, find elements, attach listeners, and run the initial check. */
3127
3129
  setup(): void;
@@ -8913,25 +8915,6 @@ declare module "components/form-actions/form-actions.component" {
8913
8915
  import { type CSSResultGroup } from 'lit';
8914
8916
  import ZincElement from "internal/zinc-element";
8915
8917
  import ZnButton from "components/button/index";
8916
- /**
8917
- * @summary Standard action row for the bottom of a form. Renders a submit button by default; opt in to more
8918
- * with `with-cancel` and `with-reset`.
8919
- * @documentation https://zinc.style/components/form-actions
8920
- * @status experimental
8921
- * @since 1.0
8922
- *
8923
- * @dependency zn-button
8924
- *
8925
- * @event zn-cancel - Emitted when the cancel button is clicked.
8926
- *
8927
- * @slot - Extra actions, placed before the buttons. `align="start"` on a child moves it to the start of the row; any
8928
- * number can sit on either side. Write them in the order they should be read — the sides are set by CSS ordering, so
8929
- * markup order is what a keyboard follows.
8930
- *
8931
- * @csspart cancel-button - The cancel button.
8932
- * @csspart reset-button - The reset button.
8933
- * @csspart submit-button - The submit button.
8934
- */
8935
8918
  export default class ZnFormActions extends ZincElement {
8936
8919
  static styles: CSSResultGroup;
8937
8920
  static dependencies: {
@@ -8960,10 +8943,27 @@ declare module "components/form-actions/form-actions.component" {
8960
8943
  * so a slow save such as an upload can't be sent twice. Only for forms the console submits.
8961
8944
  */
8962
8945
  loadingOnSubmit: boolean;
8946
+ /**
8947
+ * Hides the row until the form's values differ from when it loaded or was last saved, and hides it again once
8948
+ * they match.
8949
+ */
8950
+ hideUntilChanged: boolean;
8963
8951
  private submitting;
8964
8952
  private watchedForm;
8953
+ private changeForm;
8954
+ private baseline;
8955
+ private interacted;
8965
8956
  connectedCallback(): void;
8966
8957
  disconnectedCallback(): void;
8958
+ /**
8959
+ * The form's values, compared against the baseline. Read from the controls directly, since building FormData runs
8960
+ * zinc controls' formdata handlers, which trim the value being typed.
8961
+ */
8962
+ private snapshot;
8963
+ private checkForChanges;
8964
+ private markSaved;
8965
+ private refreshBaseline;
8966
+ private handleFormReset;
8967
8967
  private handleFormSubmit;
8968
8968
  private handleRequested;
8969
8969
  private handleDone;
@@ -15112,6 +15112,8 @@ declare module "components/key-value/key-value.component" {
15112
15112
  * @since 1.0
15113
15113
  *
15114
15114
  * @dependency zn-input
15115
+ * @dependency zn-select
15116
+ * @dependency zn-option
15115
15117
  * @dependency zn-button
15116
15118
  *
15117
15119
  * @event zn-change - Emitted when a pair is added, removed or edited.
@@ -15127,8 +15129,13 @@ declare module "components/key-value/key-value.component" {
15127
15129
  private readonly hasSlotController;
15128
15130
  private readonly formControlController;
15129
15131
  name: string;
15130
- /** The pairs as a JSON object, such as `{"1": "{{recipient.firstName}}"}`. */
15132
+ /**
15133
+ * The pairs as a JSON object, such as `{"1": "{{recipient.firstName}}"}`. With `list`, the names as a JSON array,
15134
+ * such as `["10.0.0.0/24"]`.
15135
+ */
15131
15136
  value: string;
15137
+ /** The value a form reset restores, taken from the initial `value` attribute. */
15138
+ defaultValue: string;
15132
15139
  label: string;
15133
15140
  helpText: string;
15134
15141
  keyLabel: string;
@@ -15136,6 +15143,13 @@ declare module "components/key-value/key-value.component" {
15136
15143
  addText: string;
15137
15144
  /** Passed to each value input, so its slash menu can insert merge fields. */
15138
15145
  slashItems: string;
15146
+ /**
15147
+ * Makes each value a choice instead of free text: a JSON object of option values to labels, such as
15148
+ * `{"default": "System default", "auto": "Auto approve"}`. New rows take the first option.
15149
+ */
15150
+ valueOptions: Record<string, string> | null;
15151
+ /** Edits a plain list of names with no values, submitted as a JSON array. */
15152
+ list: boolean;
15139
15153
  form: string;
15140
15154
  disabled: boolean;
15141
15155
  private _rows;
@@ -15146,10 +15160,18 @@ declare module "components/key-value/key-value.component" {
15146
15160
  reportValidity(): boolean;
15147
15161
  setCustomValidity(): void;
15148
15162
  protected willUpdate(changed: PropertyValues): void;
15163
+ private get _defaultValue();
15164
+ private _emptyRow;
15165
+ private _withSpareRow;
15149
15166
  private _parse;
15150
15167
  private _serialise;
15151
15168
  private _update;
15152
15169
  private _edit;
15170
+ private get _reduceMotion();
15171
+ private _easing;
15172
+ private _add;
15173
+ private _remove;
15174
+ private _renderValue;
15153
15175
  render(): import("lit-html").TemplateResult<1>;
15154
15176
  }
15155
15177
  }