@kubex/zinc 1.1.134 → 1.1.136

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.",
@@ -64,6 +53,17 @@
64
53
  }
65
54
  ]
66
55
  },
56
+ {
57
+ "name": "zn-action-bar",
58
+ "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.",
59
+ "attributes": [],
60
+ "references": [
61
+ {
62
+ "name": "Documentation",
63
+ "url": "https://zinc.style/components/action-bar"
64
+ }
65
+ ]
66
+ },
67
67
  {
68
68
  "name": "zn-animated-button",
69
69
  "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",
@@ -138,6 +138,21 @@
138
138
  }
139
139
  ]
140
140
  },
141
+ {
142
+ "name": "zn-bulk-actions",
143
+ "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.",
144
+ "attributes": [
145
+ { "name": "name", "values": [] },
146
+ { "name": "value", "values": [{ "name": "PropertyKey" }] },
147
+ { "name": "actions", "values": [{ "name": "BulkActionData" }] }
148
+ ],
149
+ "references": [
150
+ {
151
+ "name": "Documentation",
152
+ "url": "https://zinc.style/components/bulk-actions"
153
+ }
154
+ ]
155
+ },
141
156
  {
142
157
  "name": "zn-background",
143
158
  "description": "Composes a colour, decorative image, image strength, optional motion and contrast overlay behind slotted content.\n---\n\n\n### **Slots:**\n - _default_ - Content displayed above the background layers.\n\n### **CSS Properties:**\n - **--zn-background-color** - Fallback colour when the `color` attribute is not set. _(default: undefined)_\n- **--zn-background-image-position** - Position of the background image. Defaults to `center`. _(default: undefined)_\n- **--zn-background-overlay-angle** - Direction of the overlay gradient. Defaults to `110deg`. _(default: undefined)_\n- **--zn-background-floating-icon-color** - Colour of the floating icons. Defaults to `currentColor`. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's full-size background canvas.\n- **image** - The decorative background image.\n- **overlay** - The contrast overlay between the image and content.\n- **floating-icons** - The non-interactive layer containing the floating icons.\n- **floating-icon** - Each floating `zn-icon`.\n- **content** - The wrapper around the default slot.",
@@ -190,21 +205,6 @@
190
205
  }
191
206
  ]
192
207
  },
193
- {
194
- "name": "zn-bulk-actions",
195
- "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.",
196
- "attributes": [
197
- { "name": "name", "values": [] },
198
- { "name": "value", "values": [{ "name": "PropertyKey" }] },
199
- { "name": "actions", "values": [{ "name": "BulkActionData" }] }
200
- ],
201
- "references": [
202
- {
203
- "name": "Documentation",
204
- "url": "https://zinc.style/components/bulk-actions"
205
- }
206
- ]
207
- },
208
208
  {
209
209
  "name": "zn-button",
210
210
  "description": "Buttons represent actions that are available to the user.\n---\n\n\n### **Events:**\n - **zn-blur** - Emitted when the button loses focus.\n- **zn-focus** - Emitted when the button gains focus.\n- **zn-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Slots:**\n - _default_ - The button's label.\n- **prefix** - A presentational prefix icon or similar element.\n- **suffix** - A presentational suffix icon or similar element.\n- **cancel** - Slot for custom cancel button/content when autoClick is active.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **prefix** - The container that wraps the prefix.\n- **label** - The button's label.\n- **suffix** - The container that wraps the suffix.\n- **caret** - The button's caret icon, an `<zn-icon>` element.\n- **spinner** - The spinner that shows when the button is in the loading state.",
@@ -1182,7 +1182,12 @@
1182
1182
  { "name": "multiple", "values": [] },
1183
1183
  { "name": "select-first", "values": [] },
1184
1184
  { "name": "distinct", "values": [] },
1185
- { "name": "conditional", "values": [] }
1185
+ { "name": "conditional", "values": [] },
1186
+ {
1187
+ "name": "requires",
1188
+ "description": "Ids or names of controls that must have a value before this one becomes\nusable, comma separated. Forwarded to the underlying select.",
1189
+ "values": []
1190
+ }
1186
1191
  ],
1187
1192
  "references": [
1188
1193
  {
@@ -2098,6 +2103,11 @@
2098
2103
  "values": []
2099
2104
  },
2100
2105
  { "name": "conditional", "values": [] },
2106
+ {
2107
+ "name": "requires",
2108
+ "description": "Ids or names of controls that must have a value before this one becomes\nusable, comma separated.",
2109
+ "values": []
2110
+ },
2101
2111
  { "name": "disabled", "values": [] },
2102
2112
  { "name": "inline", "values": [] },
2103
2113
  { "name": "padded", "values": [] },
@@ -4008,6 +4018,11 @@
4008
4018
  },
4009
4019
  { "name": "distinct", "values": [] },
4010
4020
  { "name": "conditional", "values": [] },
4021
+ {
4022
+ "name": "requires",
4023
+ "description": "Ids or names of controls that must have a value before this one becomes\nusable, comma separated. The control stays disabled until every one of them\nis filled, and is disabled again if any is cleared.",
4024
+ "values": []
4025
+ },
4011
4026
  {
4012
4027
  "name": "data-uri",
4013
4028
  "description": "The URL to fetch options from. When set, the component fetches JSON from this URL and renders the results as\noptions. The expected format is an array of objects with `key` and `value` properties:\n`[{\"key\": \"us\", \"value\": \"United States\"}, ...]`\nWhen not set, the component works exactly as before using slotted `<zn-option>` elements.",
@@ -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": "1.1.134",
4
+ "version": "1.1.136",
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### **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### **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.",
@@ -105,6 +83,28 @@
105
83
  ]
106
84
  }
107
85
  },
86
+ {
87
+ "name": "zn-action-bar",
88
+ "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.",
89
+ "doc-url": "",
90
+ "attributes": [],
91
+ "slots": [
92
+ { "name": "", "description": "The default slot." },
93
+ { "name": "example", "description": "An example slot." }
94
+ ],
95
+ "events": [
96
+ { "name": "zn-event-name", "description": "Emitted as an example." }
97
+ ],
98
+ "js": {
99
+ "properties": [],
100
+ "events": [
101
+ {
102
+ "name": "zn-event-name",
103
+ "description": "Emitted as an example."
104
+ }
105
+ ]
106
+ }
107
+ },
108
108
  {
109
109
  "name": "zn-animated-button",
110
110
  "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",
@@ -250,6 +250,44 @@
250
250
  "events": []
251
251
  }
252
252
  },
253
+ {
254
+ "name": "zn-bulk-actions",
255
+ "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.",
256
+ "doc-url": "",
257
+ "attributes": [
258
+ { "name": "name", "value": { "type": "string" } },
259
+ { "name": "value", "value": { "type": "PropertyKey" } },
260
+ {
261
+ "name": "actions",
262
+ "value": { "type": "BulkActionData", "default": "[]" }
263
+ }
264
+ ],
265
+ "slots": [
266
+ { "name": "", "description": "The default slot." },
267
+ { "name": "example", "description": "An example slot." }
268
+ ],
269
+ "events": [
270
+ { "name": "zn-event-name", "description": "Emitted as an example." }
271
+ ],
272
+ "js": {
273
+ "properties": [
274
+ { "name": "container", "type": "HTMLDivElement" },
275
+ { "name": "addRule", "type": "ZnSelect" },
276
+ { "name": "input", "type": "HTMLInputElement" },
277
+ { "name": "name", "type": "string" },
278
+ { "name": "value", "type": "PropertyKey" },
279
+ { "name": "actions", "type": "BulkActionData" },
280
+ { "name": "validationMessage", "type": "string" },
281
+ { "name": "validity", "type": "ValidityState" }
282
+ ],
283
+ "events": [
284
+ {
285
+ "name": "zn-event-name",
286
+ "description": "Emitted as an example."
287
+ }
288
+ ]
289
+ }
290
+ },
253
291
  {
254
292
  "name": "zn-background",
255
293
  "description": "Composes a colour, decorative image, image strength, optional motion and contrast overlay behind slotted content.\n---\n\n\n### **Slots:**\n - _default_ - Content displayed above the background layers.\n\n### **CSS Properties:**\n - **--zn-background-color** - Fallback colour when the `color` attribute is not set. _(default: undefined)_\n- **--zn-background-image-position** - Position of the background image. Defaults to `center`. _(default: undefined)_\n- **--zn-background-overlay-angle** - Direction of the overlay gradient. Defaults to `110deg`. _(default: undefined)_\n- **--zn-background-floating-icon-color** - Colour of the floating icons. Defaults to `currentColor`. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's full-size background canvas.\n- **image** - The decorative background image.\n- **overlay** - The contrast overlay between the image and content.\n- **floating-icons** - The non-interactive layer containing the floating icons.\n- **floating-icon** - Each floating `zn-icon`.\n- **content** - The wrapper around the default slot.",
@@ -352,44 +390,6 @@
352
390
  "events": []
353
391
  }
354
392
  },
355
- {
356
- "name": "zn-bulk-actions",
357
- "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.",
358
- "doc-url": "",
359
- "attributes": [
360
- { "name": "name", "value": { "type": "string" } },
361
- { "name": "value", "value": { "type": "PropertyKey" } },
362
- {
363
- "name": "actions",
364
- "value": { "type": "BulkActionData", "default": "[]" }
365
- }
366
- ],
367
- "slots": [
368
- { "name": "", "description": "The default slot." },
369
- { "name": "example", "description": "An example slot." }
370
- ],
371
- "events": [
372
- { "name": "zn-event-name", "description": "Emitted as an example." }
373
- ],
374
- "js": {
375
- "properties": [
376
- { "name": "container", "type": "HTMLDivElement" },
377
- { "name": "addRule", "type": "ZnSelect" },
378
- { "name": "input", "type": "HTMLInputElement" },
379
- { "name": "name", "type": "string" },
380
- { "name": "value", "type": "PropertyKey" },
381
- { "name": "actions", "type": "BulkActionData" },
382
- { "name": "validationMessage", "type": "string" },
383
- { "name": "validity", "type": "ValidityState" }
384
- ],
385
- "events": [
386
- {
387
- "name": "zn-event-name",
388
- "description": "Emitted as an example."
389
- }
390
- ]
391
- }
392
- },
393
393
  {
394
394
  "name": "zn-button",
395
395
  "description": "Buttons represent actions that are available to the user.\n---\n\n\n### **Events:**\n - **zn-blur** - Emitted when the button loses focus.\n- **zn-focus** - Emitted when the button gains focus.\n- **zn-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Slots:**\n - _default_ - The button's label.\n- **prefix** - A presentational prefix icon or similar element.\n- **suffix** - A presentational suffix icon or similar element.\n- **cancel** - Slot for custom cancel button/content when autoClick is active.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **prefix** - The container that wraps the prefix.\n- **label** - The button's label.\n- **suffix** - The container that wraps the suffix.\n- **caret** - The button's caret icon, an `<zn-icon>` element.\n- **spinner** - The spinner that shows when the button is in the loading state.",
@@ -2515,6 +2515,11 @@
2515
2515
  {
2516
2516
  "name": "conditional",
2517
2517
  "value": { "type": "string", "default": "\"\"" }
2518
+ },
2519
+ {
2520
+ "name": "requires",
2521
+ "description": "Ids or names of controls that must have a value before this one becomes\nusable, comma separated. Forwarded to the underlying select.",
2522
+ "value": { "type": "string", "default": "\"\"" }
2518
2523
  }
2519
2524
  ],
2520
2525
  "slots": [
@@ -2642,6 +2647,11 @@
2642
2647
  { "name": "selectFirst", "type": "boolean" },
2643
2648
  { "name": "distinct", "type": "string" },
2644
2649
  { "name": "conditional", "type": "string" },
2650
+ {
2651
+ "name": "requires",
2652
+ "description": "Ids or names of controls that must have a value before this one becomes\nusable, comma separated. Forwarded to the underlying select.",
2653
+ "type": "string"
2654
+ },
2645
2655
  { "name": "validationMessage" },
2646
2656
  { "name": "validity", "type": "ValidityState" },
2647
2657
  { "name": "closeOnTab" },
@@ -4977,6 +4987,11 @@
4977
4987
  "name": "conditional",
4978
4988
  "value": { "type": "string", "default": "''" }
4979
4989
  },
4990
+ {
4991
+ "name": "requires",
4992
+ "description": "Ids or names of controls that must have a value before this one becomes\nusable, comma separated.",
4993
+ "value": { "type": "string", "default": "''" }
4994
+ },
4980
4995
  { "name": "disabled", "value": { "type": "boolean" } },
4981
4996
  { "name": "inline", "value": { "type": "boolean" } },
4982
4997
  { "name": "padded", "value": { "type": "boolean" } },
@@ -5111,6 +5126,11 @@
5111
5126
  "type": "boolean"
5112
5127
  },
5113
5128
  { "name": "conditional", "type": "string" },
5129
+ {
5130
+ "name": "requires",
5131
+ "description": "Ids or names of controls that must have a value before this one becomes\nusable, comma separated.",
5132
+ "type": "string"
5133
+ },
5114
5134
  { "name": "disabled", "type": "boolean" },
5115
5135
  { "name": "inline", "type": "boolean" },
5116
5136
  { "name": "padded", "type": "boolean" },
@@ -9196,6 +9216,11 @@
9196
9216
  "name": "conditional",
9197
9217
  "value": { "type": "string", "default": "\"\"" }
9198
9218
  },
9219
+ {
9220
+ "name": "requires",
9221
+ "description": "Ids or names of controls that must have a value before this one becomes\nusable, comma separated. The control stays disabled until every one of them\nis filled, and is disabled again if any is cleared.",
9222
+ "value": { "type": "string", "default": "\"\"" }
9223
+ },
9199
9224
  {
9200
9225
  "name": "data-uri",
9201
9226
  "description": "The URL to fetch options from. When set, the component fetches JSON from this URL and renders the results as\noptions. The expected format is an array of objects with `key` and `value` properties:\n`[{\"key\": \"us\", \"value\": \"United States\"}, ...]`\nWhen not set, the component works exactly as before using slotted `<zn-option>` elements.",
@@ -9450,6 +9475,11 @@
9450
9475
  },
9451
9476
  { "name": "distinct", "type": "string" },
9452
9477
  { "name": "conditional", "type": "string" },
9478
+ {
9479
+ "name": "requires",
9480
+ "description": "Ids or names of controls that must have a value before this one becomes\nusable, comma separated. The control stays disabled until every one of them\nis filled, and is disabled again if any is cleared.",
9481
+ "type": "string"
9482
+ },
9453
9483
  {
9454
9484
  "name": "dataUri",
9455
9485
  "description": "The URL to fetch options from. When set, the component fetches JSON from this URL and renders the results as\noptions. The expected format is an array of objects with `key` and `value` properties:\n`[{\"key\": \"us\", \"value\": \"United States\"}, ...]`\nWhen not set, the component works exactly as before using slotted `<zn-option>` elements.",
package/dist/zn.d.ts CHANGED
@@ -2560,17 +2560,25 @@ declare module "internal/conditional" {
2560
2560
  import type { ReactiveController, ReactiveControllerHost } from 'lit';
2561
2561
  export interface ConditionalHost {
2562
2562
  conditional: string;
2563
+ requires: string;
2563
2564
  disabled: boolean;
2564
2565
  }
2565
- /** A reactive controller that disables the host when linked selects have a value. */
2566
+ /**
2567
+ * A reactive controller that drives the host's disabled state from other form
2568
+ * controls: `conditional` disables the host once a linked control has a value,
2569
+ * `requires` keeps it disabled until every named control has one.
2570
+ */
2566
2571
  export class ConditionalController implements ReactiveController {
2567
2572
  host: ReactiveControllerHost & Element & ConditionalHost;
2568
2573
  private conditionals;
2574
+ private required;
2569
2575
  private initiallyDisabled;
2570
2576
  private readonly handleChange;
2571
2577
  constructor(host: ReactiveControllerHost & Element & ConditionalHost);
2572
2578
  /** Call from the host's `firstUpdated()` to parse IDs, find elements, attach listeners, and run the initial check. */
2573
2579
  setup(): void;
2580
+ /** Resolve a comma-separated list of ids or names to the controls they name. */
2581
+ private resolve;
2574
2582
  hostConnected(): void;
2575
2583
  hostDisconnected(): void;
2576
2584
  /** Re-evaluate the conditional state. Call from the host when needed. */
@@ -2862,6 +2870,12 @@ declare module "components/select/select.component" {
2862
2870
  selectFirst: boolean;
2863
2871
  distinct: string;
2864
2872
  conditional: string;
2873
+ /**
2874
+ * Ids or names of controls that must have a value before this one becomes
2875
+ * usable, comma separated. The control stays disabled until every one of them
2876
+ * is filled, and is disabled again if any is cleared.
2877
+ */
2878
+ requires: string;
2865
2879
  /**
2866
2880
  * The URL to fetch options from. When set, the component fetches JSON from this URL and renders the results as
2867
2881
  * options. The expected format is an array of objects with `key` and `value` properties:
@@ -3623,6 +3637,11 @@ declare module "components/data-select/data-select.component" {
3623
3637
  selectFirst: boolean;
3624
3638
  distinct: string;
3625
3639
  conditional: string;
3640
+ /**
3641
+ * Ids or names of controls that must have a value before this one becomes
3642
+ * usable, comma separated. Forwarded to the underlying select.
3643
+ */
3644
+ requires: string;
3626
3645
  protected readonly formControlController: FormControlController;
3627
3646
  private readonly selectObserver;
3628
3647
  get validationMessage(): string;
@@ -5534,6 +5553,11 @@ declare module "components/inline-edit/inline-edit.component" {
5534
5553
  */
5535
5554
  clearOnEdit: boolean;
5536
5555
  conditional: string;
5556
+ /**
5557
+ * Ids or names of controls that must have a value before this one becomes
5558
+ * usable, comma separated.
5559
+ */
5560
+ requires: string;
5537
5561
  disabled: boolean;
5538
5562
  inline: boolean;
5539
5563
  padded: boolean;