@kubex/zinc 1.1.125 → 1.1.127
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 +2019 -1981
- package/dist/vscode.html-custom-data.json +92 -92
- package/dist/web-types.json +194 -194
- package/dist/zn.d.ts +40 -6
- package/dist/zn.min.js +256 -246
- package/package.json +1 -1
- package/src/components/collapsible/collapsible.scss +3 -0
- package/src/components/expanding-action/expanding-action.component.ts +4 -2
- package/src/components/page/page.scss +1 -1
- package/src/components/page-builder/modules/page-palette-item/page-palette-item.scss +4 -1
- package/src/components/page-builder/page-builder.component.ts +62 -13
- package/src/components/page-builder/page-builder.scss +1 -1
- package/src/components/page-builder/page-builder.test.ts +90 -0
- package/src/components/page-builder/page.types.ts +40 -5
package/dist/web-types.json
CHANGED
|
@@ -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.
|
|
4
|
+
"version": "1.1.127",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -6671,93 +6671,93 @@
|
|
|
6671
6671
|
}
|
|
6672
6672
|
},
|
|
6673
6673
|
{
|
|
6674
|
-
"name": "zn-
|
|
6675
|
-
"description": "
|
|
6674
|
+
"name": "zn-option",
|
|
6675
|
+
"description": "Short summary of the component's intended use.\n---\n\n\n### **Methods:**\n - **getTextLabel()** - Returns a plain text label based on the option's content.\n\n### **Slots:**\n - _default_ - The option's label.\n- **prefix** - Used to prepend an icon or similar element to the menu item.\n- **suffix** - Used to append an icon or similar element to the menu item.\n\n### **CSS Parts:**\n - **checked-option-icon** - The checked option icon, an `<zn-icon>` element.\n- **base** - The component's base wrapper.\n- **label** - The option's label.\n- **prefix** - The container that wraps the prefix.\n- **suffix** - The container that wraps the suffix.",
|
|
6676
6676
|
"doc-url": "",
|
|
6677
6677
|
"attributes": [
|
|
6678
6678
|
{
|
|
6679
|
-
"name": "
|
|
6680
|
-
"description": "The
|
|
6679
|
+
"name": "value",
|
|
6680
|
+
"description": "The option's value. When selected, the containing form control will receive this value. The value must be unique\nfrom other options in the same group. Values may contain spaces when using JSON array syntax on the parent select.",
|
|
6681
6681
|
"value": { "type": "string", "default": "''" }
|
|
6682
6682
|
},
|
|
6683
6683
|
{
|
|
6684
6684
|
"name": "disabled",
|
|
6685
|
-
"description": "
|
|
6685
|
+
"description": "Draws the option in a disabled state, preventing selection.",
|
|
6686
|
+
"value": { "type": "boolean", "default": "false" }
|
|
6687
|
+
},
|
|
6688
|
+
{
|
|
6689
|
+
"name": "selected",
|
|
6686
6690
|
"value": { "type": "boolean", "default": "false" }
|
|
6687
6691
|
}
|
|
6688
6692
|
],
|
|
6689
6693
|
"slots": [
|
|
6694
|
+
{ "name": "", "description": "The option's label." },
|
|
6690
6695
|
{
|
|
6691
|
-
"name": "",
|
|
6692
|
-
"description": "
|
|
6696
|
+
"name": "prefix",
|
|
6697
|
+
"description": "Used to prepend an icon or similar element to the menu item."
|
|
6698
|
+
},
|
|
6699
|
+
{
|
|
6700
|
+
"name": "suffix",
|
|
6701
|
+
"description": "Used to append an icon or similar element to the menu item."
|
|
6693
6702
|
}
|
|
6694
6703
|
],
|
|
6695
6704
|
"events": [],
|
|
6696
6705
|
"js": {
|
|
6697
6706
|
"properties": [
|
|
6707
|
+
{ "name": "multiple", "type": "boolean" },
|
|
6708
|
+
{ "name": "defaultSlot", "type": "HTMLSlotElement" },
|
|
6709
|
+
{ "name": "current", "type": "boolean" },
|
|
6710
|
+
{ "name": "hasHover", "type": "boolean" },
|
|
6698
6711
|
{
|
|
6699
|
-
"name": "
|
|
6700
|
-
"description": "The
|
|
6712
|
+
"name": "value",
|
|
6713
|
+
"description": "The option's value. When selected, the containing form control will receive this value. The value must be unique\nfrom other options in the same group. Values may contain spaces when using JSON array syntax on the parent select.",
|
|
6701
6714
|
"type": "string"
|
|
6702
6715
|
},
|
|
6703
6716
|
{
|
|
6704
6717
|
"name": "disabled",
|
|
6705
|
-
"description": "
|
|
6718
|
+
"description": "Draws the option in a disabled state, preventing selection.",
|
|
6706
6719
|
"type": "boolean"
|
|
6707
|
-
}
|
|
6720
|
+
},
|
|
6721
|
+
{ "name": "selected", "type": "boolean" }
|
|
6708
6722
|
],
|
|
6709
6723
|
"events": []
|
|
6710
6724
|
}
|
|
6711
6725
|
},
|
|
6712
6726
|
{
|
|
6713
|
-
"name": "zn-
|
|
6714
|
-
"description": "
|
|
6727
|
+
"name": "zn-opt-group",
|
|
6728
|
+
"description": "Groups options within a `<zn-select>` under a labeled header, similar to `<optgroup>` in native HTML.\n---\n\n\n### **Slots:**\n - _default_ - The default slot for `<zn-option>` elements.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **label** - The group label element.",
|
|
6715
6729
|
"doc-url": "",
|
|
6716
6730
|
"attributes": [
|
|
6717
6731
|
{
|
|
6718
|
-
"name": "
|
|
6719
|
-
"description": "The
|
|
6732
|
+
"name": "label",
|
|
6733
|
+
"description": "The label for the opt-group, displayed as a non-selectable header above the grouped options.",
|
|
6720
6734
|
"value": { "type": "string", "default": "''" }
|
|
6721
6735
|
},
|
|
6722
6736
|
{
|
|
6723
6737
|
"name": "disabled",
|
|
6724
|
-
"description": "
|
|
6725
|
-
"value": { "type": "boolean", "default": "false" }
|
|
6726
|
-
},
|
|
6727
|
-
{
|
|
6728
|
-
"name": "selected",
|
|
6738
|
+
"description": "Disables all options within the group.",
|
|
6729
6739
|
"value": { "type": "boolean", "default": "false" }
|
|
6730
6740
|
}
|
|
6731
6741
|
],
|
|
6732
6742
|
"slots": [
|
|
6733
|
-
{ "name": "", "description": "The option's label." },
|
|
6734
|
-
{
|
|
6735
|
-
"name": "prefix",
|
|
6736
|
-
"description": "Used to prepend an icon or similar element to the menu item."
|
|
6737
|
-
},
|
|
6738
6743
|
{
|
|
6739
|
-
"name": "
|
|
6740
|
-
"description": "
|
|
6744
|
+
"name": "",
|
|
6745
|
+
"description": "The default slot for `<zn-option>` elements."
|
|
6741
6746
|
}
|
|
6742
6747
|
],
|
|
6743
6748
|
"events": [],
|
|
6744
6749
|
"js": {
|
|
6745
6750
|
"properties": [
|
|
6746
|
-
{ "name": "multiple", "type": "boolean" },
|
|
6747
|
-
{ "name": "defaultSlot", "type": "HTMLSlotElement" },
|
|
6748
|
-
{ "name": "current", "type": "boolean" },
|
|
6749
|
-
{ "name": "hasHover", "type": "boolean" },
|
|
6750
6751
|
{
|
|
6751
|
-
"name": "
|
|
6752
|
-
"description": "The
|
|
6752
|
+
"name": "label",
|
|
6753
|
+
"description": "The label for the opt-group, displayed as a non-selectable header above the grouped options.",
|
|
6753
6754
|
"type": "string"
|
|
6754
6755
|
},
|
|
6755
6756
|
{
|
|
6756
6757
|
"name": "disabled",
|
|
6757
|
-
"description": "
|
|
6758
|
+
"description": "Disables all options within the group.",
|
|
6758
6759
|
"type": "boolean"
|
|
6759
|
-
}
|
|
6760
|
-
{ "name": "selected", "type": "boolean" }
|
|
6760
|
+
}
|
|
6761
6761
|
],
|
|
6762
6762
|
"events": []
|
|
6763
6763
|
}
|
|
@@ -6933,7 +6933,7 @@
|
|
|
6933
6933
|
},
|
|
6934
6934
|
{
|
|
6935
6935
|
"name": "zn-page-builder",
|
|
6936
|
-
"description": "A config-driven page composer: a palette of predefined section types, a linear\ncanvas of section cards, and an inspector for editing each section's content.\n---\n\n\n### **Events:**\n - **zn-page-change** - Emitted whenever the page state changes. `event.detail.state` is the new PageState.\n- **zn-page-selection-change** - Emitted when the selected section changes. `event.detail.sectionId`.\n\n### **Methods:**\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- **addSection(type: _string_, index: _number_): _PageSection | null_** - Adds a section of a registered type at `index` (default: end). Returns null for unknown types.\n- **addSectionToSlot(type: _string_, containerId: _string_, slotIndex: _number_): _PageSection | null_** - Adds a new section of a registered type into a container's slot. Returns null if not allowed.\n\n### **Slots:**\n - **config** - `<template type=\"…\">` declarations; never displayed. Each template's attributes (type, label, icon, icon-library, color, category, description, slots, accepts) declare a palette entry and its content declares the inspector form for that type. `slots` makes the section a container
|
|
6936
|
+
"description": "A config-driven page composer: a palette of predefined section types, a linear\ncanvas of section cards, and an inspector for editing each section's content.\n---\n\n\n### **Events:**\n - **zn-page-change** - Emitted whenever the page state changes. `event.detail.state` is the new PageState.\n- **zn-page-selection-change** - Emitted when the selected section changes. `event.detail.sectionId`.\n\n### **Methods:**\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- **addSection(type: _string_, index: _number_): _PageSection | null_** - Adds a section of a registered type at `index` (default: end). Returns null for unknown types.\n- **addSectionToSlot(type: _string_, containerId: _string_, slotIndex: _number_): _PageSection | null_** - Adds a new section of a registered type into a container's slot. Returns null if not allowed.\n- **setSectionColumns(id: _string_, columns: _number_)** - Sets how many slots per row a container whose type allows a choice lays out,\nclamped to the declared bounds. Children keep their order and reflow into the\nnew width, so nothing is lost by narrowing one.\n\n### **Slots:**\n - **config** - `<template type=\"…\">` declarations; never displayed. Each template's attributes (type, label, icon, icon-library, color, category, description, slots, accepts) declare a palette entry and its content declares the inspector form for that type. `slots` makes the section a container that many slots wide — rows are added as they fill — and `slots-min`/ `slots-max` let each placed section choose its own width; `accepts` is a comma-separated list of the type keys its slots allow.\n- **header-left** - Actions shown on the left of the header bar.\n- **header-right** - Actions shown on the right of the header bar.\n\n### **CSS Parts:**\n - **base** - The grid wrapper.\n- **header** - The full-width header action bar (only rendered when header slots are filled).\n- **palette** - The left palette panel.\n- **canvas** - The centre section-card canvas.\n- **inspector** - The right panel while a section is selected.\n- **inspector-header** - The inspector's fixed header (icon, section name, type, close).\n- **inspector-body** - The inspector's scrolling form area.",
|
|
6937
6937
|
"doc-url": "",
|
|
6938
6938
|
"attributes": [
|
|
6939
6939
|
{
|
|
@@ -6983,7 +6983,7 @@
|
|
|
6983
6983
|
"slots": [
|
|
6984
6984
|
{
|
|
6985
6985
|
"name": "config",
|
|
6986
|
-
"description": "`<template type=\"…\">` declarations; never displayed. Each template's attributes (type, label, icon, icon-library, color, category, description, slots, accepts) declare a palette entry and its content declares the inspector form for that type. `slots` makes the section a container
|
|
6986
|
+
"description": "`<template type=\"…\">` declarations; never displayed. Each template's attributes (type, label, icon, icon-library, color, category, description, slots, accepts) declare a palette entry and its content declares the inspector form for that type. `slots` makes the section a container that many slots wide — rows are added as they fill — and `slots-min`/ `slots-max` let each placed section choose its own width; `accepts` is a comma-separated list of the type keys its slots allow."
|
|
6987
6987
|
},
|
|
6988
6988
|
{
|
|
6989
6989
|
"name": "header-left",
|
|
@@ -8253,161 +8253,6 @@
|
|
|
8253
8253
|
]
|
|
8254
8254
|
}
|
|
8255
8255
|
},
|
|
8256
|
-
{
|
|
8257
|
-
"name": "zn-radio-group",
|
|
8258
|
-
"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 - **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(): _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.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--zn-radio-group-column-width** - Minimum column width used by the horizontal contained grid, or the card basis when `wrap` is set. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
8259
|
-
"doc-url": "",
|
|
8260
|
-
"attributes": [
|
|
8261
|
-
{
|
|
8262
|
-
"name": "label",
|
|
8263
|
-
"description": "The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot\ninstead.",
|
|
8264
|
-
"value": { "type": "string", "default": "''" }
|
|
8265
|
-
},
|
|
8266
|
-
{
|
|
8267
|
-
"name": "label-tooltip",
|
|
8268
|
-
"description": "Text that appears in a tooltip next to the label. If you need to display HTML in the tooltip, use the `label-tooltip` slot instead.",
|
|
8269
|
-
"value": { "type": "string", "default": "''" }
|
|
8270
|
-
},
|
|
8271
|
-
{
|
|
8272
|
-
"name": "help-text",
|
|
8273
|
-
"description": "The radio groups' help text. If you need to display HTML, use the `help-text` slot instead.",
|
|
8274
|
-
"value": { "type": "string", "default": "''" }
|
|
8275
|
-
},
|
|
8276
|
-
{
|
|
8277
|
-
"name": "name",
|
|
8278
|
-
"description": "The name of the radio group, submitted as a name/value pair with form data.",
|
|
8279
|
-
"value": { "type": "string", "default": "''" }
|
|
8280
|
-
},
|
|
8281
|
-
{
|
|
8282
|
-
"name": "value",
|
|
8283
|
-
"description": "The current value of the radio group, submitted as a name/value pair with form data.",
|
|
8284
|
-
"value": { "type": "string", "default": "''" }
|
|
8285
|
-
},
|
|
8286
|
-
{
|
|
8287
|
-
"name": "size",
|
|
8288
|
-
"description": "The radio group's size. This size will be applied to all child radios",
|
|
8289
|
-
"value": {
|
|
8290
|
-
"type": "'small' | 'medium' | 'large'",
|
|
8291
|
-
"default": "'medium'"
|
|
8292
|
-
}
|
|
8293
|
-
},
|
|
8294
|
-
{
|
|
8295
|
-
"name": "horizontal",
|
|
8296
|
-
"description": "The radio group's orientation. Changes the group's layout from the default (vertical) to horizontal.",
|
|
8297
|
-
"value": { "type": "boolean", "default": "false" }
|
|
8298
|
-
},
|
|
8299
|
-
{
|
|
8300
|
-
"name": "contained",
|
|
8301
|
-
"description": "The radio group's style. Changes the group's style from the default (plain) style to the 'contained' style. This style will be applied to all child radios.",
|
|
8302
|
-
"value": { "type": "boolean", "default": "false" }
|
|
8303
|
-
},
|
|
8304
|
-
{
|
|
8305
|
-
"name": "square",
|
|
8306
|
-
"description": "Squares off the corners of every contained radio in the group, which are rounded by default.",
|
|
8307
|
-
"value": { "type": "boolean", "default": "false" }
|
|
8308
|
-
},
|
|
8309
|
-
{
|
|
8310
|
-
"name": "wrap",
|
|
8311
|
-
"description": "Lays horizontal contained radios out as a wrapping row instead of an equal-width grid, so each one sizes from\n`--zn-radio-group-column-width` (set it to `auto` to size from content) and wraps onto a new line when needed.",
|
|
8312
|
-
"value": { "type": "boolean", "default": "false" }
|
|
8313
|
-
},
|
|
8314
|
-
{
|
|
8315
|
-
"name": "form",
|
|
8316
|
-
"description": "By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\nto place the form control outside a form and associate it with the form that has this `id`. The form must be in\nthe same document or shadow root for this to work.",
|
|
8317
|
-
"value": { "type": "string", "default": "''" }
|
|
8318
|
-
},
|
|
8319
|
-
{
|
|
8320
|
-
"name": "required",
|
|
8321
|
-
"description": "Ensures a child radio is checked before allowing the containing form to submit.",
|
|
8322
|
-
"value": { "type": "boolean", "default": "false" }
|
|
8323
|
-
}
|
|
8324
|
-
],
|
|
8325
|
-
"slots": [
|
|
8326
|
-
{ "name": "", "description": "The default slot." },
|
|
8327
|
-
{ "name": "example", "description": "An example slot." }
|
|
8328
|
-
],
|
|
8329
|
-
"events": [
|
|
8330
|
-
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
8331
|
-
],
|
|
8332
|
-
"js": {
|
|
8333
|
-
"properties": [
|
|
8334
|
-
{ "name": "defaultSlot", "type": "HTMLSlotElement" },
|
|
8335
|
-
{ "name": "validationInput", "type": "HTMLInputElement" },
|
|
8336
|
-
{ "name": "defaultValue", "type": "string" },
|
|
8337
|
-
{
|
|
8338
|
-
"name": "label",
|
|
8339
|
-
"description": "The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot\ninstead.",
|
|
8340
|
-
"type": "string"
|
|
8341
|
-
},
|
|
8342
|
-
{
|
|
8343
|
-
"name": "labelTooltip",
|
|
8344
|
-
"description": "Text that appears in a tooltip next to the label. If you need to display HTML in the tooltip, use the `label-tooltip` slot instead.",
|
|
8345
|
-
"type": "string"
|
|
8346
|
-
},
|
|
8347
|
-
{
|
|
8348
|
-
"name": "helpText",
|
|
8349
|
-
"description": "The radio groups' help text. If you need to display HTML, use the `help-text` slot instead.",
|
|
8350
|
-
"type": "string"
|
|
8351
|
-
},
|
|
8352
|
-
{
|
|
8353
|
-
"name": "name",
|
|
8354
|
-
"description": "The name of the radio group, submitted as a name/value pair with form data.",
|
|
8355
|
-
"type": "string"
|
|
8356
|
-
},
|
|
8357
|
-
{
|
|
8358
|
-
"name": "value",
|
|
8359
|
-
"description": "The current value of the radio group, submitted as a name/value pair with form data.",
|
|
8360
|
-
"type": "string"
|
|
8361
|
-
},
|
|
8362
|
-
{
|
|
8363
|
-
"name": "size",
|
|
8364
|
-
"description": "The radio group's size. This size will be applied to all child radios",
|
|
8365
|
-
"type": "'small' | 'medium' | 'large'"
|
|
8366
|
-
},
|
|
8367
|
-
{
|
|
8368
|
-
"name": "horizontal",
|
|
8369
|
-
"description": "The radio group's orientation. Changes the group's layout from the default (vertical) to horizontal.",
|
|
8370
|
-
"type": "boolean"
|
|
8371
|
-
},
|
|
8372
|
-
{
|
|
8373
|
-
"name": "contained",
|
|
8374
|
-
"description": "The radio group's style. Changes the group's style from the default (plain) style to the 'contained' style. This style will be applied to all child radios.",
|
|
8375
|
-
"type": "boolean"
|
|
8376
|
-
},
|
|
8377
|
-
{
|
|
8378
|
-
"name": "square",
|
|
8379
|
-
"description": "Squares off the corners of every contained radio in the group, which are rounded by default.",
|
|
8380
|
-
"type": "boolean"
|
|
8381
|
-
},
|
|
8382
|
-
{
|
|
8383
|
-
"name": "wrap",
|
|
8384
|
-
"description": "Lays horizontal contained radios out as a wrapping row instead of an equal-width grid, so each one sizes from\n`--zn-radio-group-column-width` (set it to `auto` to size from content) and wraps onto a new line when needed.",
|
|
8385
|
-
"type": "boolean"
|
|
8386
|
-
},
|
|
8387
|
-
{
|
|
8388
|
-
"name": "form",
|
|
8389
|
-
"description": "By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\nto place the form control outside a form and associate it with the form that has this `id`. The form must be in\nthe same document or shadow root for this to work.",
|
|
8390
|
-
"type": "string"
|
|
8391
|
-
},
|
|
8392
|
-
{
|
|
8393
|
-
"name": "required",
|
|
8394
|
-
"description": "Ensures a child radio is checked before allowing the containing form to submit.",
|
|
8395
|
-
"type": "boolean"
|
|
8396
|
-
},
|
|
8397
|
-
{ "name": "validity" },
|
|
8398
|
-
{
|
|
8399
|
-
"name": "validationMessage",
|
|
8400
|
-
"description": "Gets the validation message"
|
|
8401
|
-
}
|
|
8402
|
-
],
|
|
8403
|
-
"events": [
|
|
8404
|
-
{
|
|
8405
|
-
"name": "zn-event-name",
|
|
8406
|
-
"description": "Emitted as an example."
|
|
8407
|
-
}
|
|
8408
|
-
]
|
|
8409
|
-
}
|
|
8410
|
-
},
|
|
8411
8256
|
{
|
|
8412
8257
|
"name": "zn-rating",
|
|
8413
8258
|
"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 - **checkValidity(): _boolean_** - Checks the 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()** - Sets a custom validation message. Pass an empty string to restore validity.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n- **help-text** - Text that describes how to use the rating. Alternatively, you can use the `help-text` attribute.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n- **--preview-color** - The color of the preview value. _(default: undefined)_\n- **--preview-size** - The font size of the preview value. _(default: undefined)_\n\n### **CSS Parts:**\n - **form-control** - The form control that wraps the symbols and help text.\n- **form-control-help-text** - The help text's wrapper.\n- **base** - The component's base wrapper.\n- **preview** - The value shown next to the symbols when `preview` is enabled.",
|
|
@@ -8709,6 +8554,161 @@
|
|
|
8709
8554
|
]
|
|
8710
8555
|
}
|
|
8711
8556
|
},
|
|
8557
|
+
{
|
|
8558
|
+
"name": "zn-radio-group",
|
|
8559
|
+
"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 - **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(): _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.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--zn-radio-group-column-width** - Minimum column width used by the horizontal contained grid, or the card basis when `wrap` is set. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
8560
|
+
"doc-url": "",
|
|
8561
|
+
"attributes": [
|
|
8562
|
+
{
|
|
8563
|
+
"name": "label",
|
|
8564
|
+
"description": "The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot\ninstead.",
|
|
8565
|
+
"value": { "type": "string", "default": "''" }
|
|
8566
|
+
},
|
|
8567
|
+
{
|
|
8568
|
+
"name": "label-tooltip",
|
|
8569
|
+
"description": "Text that appears in a tooltip next to the label. If you need to display HTML in the tooltip, use the `label-tooltip` slot instead.",
|
|
8570
|
+
"value": { "type": "string", "default": "''" }
|
|
8571
|
+
},
|
|
8572
|
+
{
|
|
8573
|
+
"name": "help-text",
|
|
8574
|
+
"description": "The radio groups' help text. If you need to display HTML, use the `help-text` slot instead.",
|
|
8575
|
+
"value": { "type": "string", "default": "''" }
|
|
8576
|
+
},
|
|
8577
|
+
{
|
|
8578
|
+
"name": "name",
|
|
8579
|
+
"description": "The name of the radio group, submitted as a name/value pair with form data.",
|
|
8580
|
+
"value": { "type": "string", "default": "''" }
|
|
8581
|
+
},
|
|
8582
|
+
{
|
|
8583
|
+
"name": "value",
|
|
8584
|
+
"description": "The current value of the radio group, submitted as a name/value pair with form data.",
|
|
8585
|
+
"value": { "type": "string", "default": "''" }
|
|
8586
|
+
},
|
|
8587
|
+
{
|
|
8588
|
+
"name": "size",
|
|
8589
|
+
"description": "The radio group's size. This size will be applied to all child radios",
|
|
8590
|
+
"value": {
|
|
8591
|
+
"type": "'small' | 'medium' | 'large'",
|
|
8592
|
+
"default": "'medium'"
|
|
8593
|
+
}
|
|
8594
|
+
},
|
|
8595
|
+
{
|
|
8596
|
+
"name": "horizontal",
|
|
8597
|
+
"description": "The radio group's orientation. Changes the group's layout from the default (vertical) to horizontal.",
|
|
8598
|
+
"value": { "type": "boolean", "default": "false" }
|
|
8599
|
+
},
|
|
8600
|
+
{
|
|
8601
|
+
"name": "contained",
|
|
8602
|
+
"description": "The radio group's style. Changes the group's style from the default (plain) style to the 'contained' style. This style will be applied to all child radios.",
|
|
8603
|
+
"value": { "type": "boolean", "default": "false" }
|
|
8604
|
+
},
|
|
8605
|
+
{
|
|
8606
|
+
"name": "square",
|
|
8607
|
+
"description": "Squares off the corners of every contained radio in the group, which are rounded by default.",
|
|
8608
|
+
"value": { "type": "boolean", "default": "false" }
|
|
8609
|
+
},
|
|
8610
|
+
{
|
|
8611
|
+
"name": "wrap",
|
|
8612
|
+
"description": "Lays horizontal contained radios out as a wrapping row instead of an equal-width grid, so each one sizes from\n`--zn-radio-group-column-width` (set it to `auto` to size from content) and wraps onto a new line when needed.",
|
|
8613
|
+
"value": { "type": "boolean", "default": "false" }
|
|
8614
|
+
},
|
|
8615
|
+
{
|
|
8616
|
+
"name": "form",
|
|
8617
|
+
"description": "By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\nto place the form control outside a form and associate it with the form that has this `id`. The form must be in\nthe same document or shadow root for this to work.",
|
|
8618
|
+
"value": { "type": "string", "default": "''" }
|
|
8619
|
+
},
|
|
8620
|
+
{
|
|
8621
|
+
"name": "required",
|
|
8622
|
+
"description": "Ensures a child radio is checked before allowing the containing form to submit.",
|
|
8623
|
+
"value": { "type": "boolean", "default": "false" }
|
|
8624
|
+
}
|
|
8625
|
+
],
|
|
8626
|
+
"slots": [
|
|
8627
|
+
{ "name": "", "description": "The default slot." },
|
|
8628
|
+
{ "name": "example", "description": "An example slot." }
|
|
8629
|
+
],
|
|
8630
|
+
"events": [
|
|
8631
|
+
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
8632
|
+
],
|
|
8633
|
+
"js": {
|
|
8634
|
+
"properties": [
|
|
8635
|
+
{ "name": "defaultSlot", "type": "HTMLSlotElement" },
|
|
8636
|
+
{ "name": "validationInput", "type": "HTMLInputElement" },
|
|
8637
|
+
{ "name": "defaultValue", "type": "string" },
|
|
8638
|
+
{
|
|
8639
|
+
"name": "label",
|
|
8640
|
+
"description": "The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot\ninstead.",
|
|
8641
|
+
"type": "string"
|
|
8642
|
+
},
|
|
8643
|
+
{
|
|
8644
|
+
"name": "labelTooltip",
|
|
8645
|
+
"description": "Text that appears in a tooltip next to the label. If you need to display HTML in the tooltip, use the `label-tooltip` slot instead.",
|
|
8646
|
+
"type": "string"
|
|
8647
|
+
},
|
|
8648
|
+
{
|
|
8649
|
+
"name": "helpText",
|
|
8650
|
+
"description": "The radio groups' help text. If you need to display HTML, use the `help-text` slot instead.",
|
|
8651
|
+
"type": "string"
|
|
8652
|
+
},
|
|
8653
|
+
{
|
|
8654
|
+
"name": "name",
|
|
8655
|
+
"description": "The name of the radio group, submitted as a name/value pair with form data.",
|
|
8656
|
+
"type": "string"
|
|
8657
|
+
},
|
|
8658
|
+
{
|
|
8659
|
+
"name": "value",
|
|
8660
|
+
"description": "The current value of the radio group, submitted as a name/value pair with form data.",
|
|
8661
|
+
"type": "string"
|
|
8662
|
+
},
|
|
8663
|
+
{
|
|
8664
|
+
"name": "size",
|
|
8665
|
+
"description": "The radio group's size. This size will be applied to all child radios",
|
|
8666
|
+
"type": "'small' | 'medium' | 'large'"
|
|
8667
|
+
},
|
|
8668
|
+
{
|
|
8669
|
+
"name": "horizontal",
|
|
8670
|
+
"description": "The radio group's orientation. Changes the group's layout from the default (vertical) to horizontal.",
|
|
8671
|
+
"type": "boolean"
|
|
8672
|
+
},
|
|
8673
|
+
{
|
|
8674
|
+
"name": "contained",
|
|
8675
|
+
"description": "The radio group's style. Changes the group's style from the default (plain) style to the 'contained' style. This style will be applied to all child radios.",
|
|
8676
|
+
"type": "boolean"
|
|
8677
|
+
},
|
|
8678
|
+
{
|
|
8679
|
+
"name": "square",
|
|
8680
|
+
"description": "Squares off the corners of every contained radio in the group, which are rounded by default.",
|
|
8681
|
+
"type": "boolean"
|
|
8682
|
+
},
|
|
8683
|
+
{
|
|
8684
|
+
"name": "wrap",
|
|
8685
|
+
"description": "Lays horizontal contained radios out as a wrapping row instead of an equal-width grid, so each one sizes from\n`--zn-radio-group-column-width` (set it to `auto` to size from content) and wraps onto a new line when needed.",
|
|
8686
|
+
"type": "boolean"
|
|
8687
|
+
},
|
|
8688
|
+
{
|
|
8689
|
+
"name": "form",
|
|
8690
|
+
"description": "By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\nto place the form control outside a form and associate it with the form that has this `id`. The form must be in\nthe same document or shadow root for this to work.",
|
|
8691
|
+
"type": "string"
|
|
8692
|
+
},
|
|
8693
|
+
{
|
|
8694
|
+
"name": "required",
|
|
8695
|
+
"description": "Ensures a child radio is checked before allowing the containing form to submit.",
|
|
8696
|
+
"type": "boolean"
|
|
8697
|
+
},
|
|
8698
|
+
{ "name": "validity" },
|
|
8699
|
+
{
|
|
8700
|
+
"name": "validationMessage",
|
|
8701
|
+
"description": "Gets the validation message"
|
|
8702
|
+
}
|
|
8703
|
+
],
|
|
8704
|
+
"events": [
|
|
8705
|
+
{
|
|
8706
|
+
"name": "zn-event-name",
|
|
8707
|
+
"description": "Emitted as an example."
|
|
8708
|
+
}
|
|
8709
|
+
]
|
|
8710
|
+
}
|
|
8711
|
+
},
|
|
8712
8712
|
{
|
|
8713
8713
|
"name": "zn-schedule-builder",
|
|
8714
8714
|
"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.",
|
package/dist/zn.d.ts
CHANGED
|
@@ -11372,7 +11372,9 @@ declare module "components/page-builder/page.types" {
|
|
|
11372
11372
|
label?: string;
|
|
11373
11373
|
/** Section content, keyed by field name (the inspector's `name` attributes). */
|
|
11374
11374
|
data: Record<string, unknown>;
|
|
11375
|
-
/**
|
|
11375
|
+
/** Slots per row for a container whose type allows a choice; the type's default applies otherwise. */
|
|
11376
|
+
columns?: number;
|
|
11377
|
+
/** Slot contents for container sections, sized to {@link slotCount}. Empty slots are null. */
|
|
11376
11378
|
children?: (PageSection | null)[];
|
|
11377
11379
|
}
|
|
11378
11380
|
/** The complete serialisable state of a page. Order = render order. */
|
|
@@ -11401,14 +11403,32 @@ declare module "components/page-builder/page.types" {
|
|
|
11401
11403
|
/** Programmatic inspector body — takes precedence over `configTemplate`. */
|
|
11402
11404
|
renderConfig?: (section: PageSection, update: (data: Record<string, unknown>) => void) => TemplateResult;
|
|
11403
11405
|
/**
|
|
11404
|
-
*
|
|
11405
|
-
*
|
|
11406
|
+
* Slots per row on the canvas, and what makes a section a container. Rows are
|
|
11407
|
+
* added as they fill, so this is a width and not a capacity. Containers cannot
|
|
11408
|
+
* be placed inside other containers.
|
|
11406
11409
|
*/
|
|
11407
11410
|
slots?: number;
|
|
11411
|
+
/** Lower bound of a per-section column count. Defaults to 1 when `slotsMax` is set. */
|
|
11412
|
+
slotsMin?: number;
|
|
11413
|
+
/** Upper bound of a per-section column count. Its presence is what makes the width editable. */
|
|
11414
|
+
slotsMax?: number;
|
|
11408
11415
|
/** Section type keys allowed in this container's slots. Omit to allow any non-container type. */
|
|
11409
11416
|
accepts?: string[];
|
|
11410
11417
|
}
|
|
11411
|
-
/**
|
|
11418
|
+
/** Per-container children beyond this are dropped when external state is applied. */
|
|
11419
|
+
export const MAX_SLOTS = 24;
|
|
11420
|
+
/**
|
|
11421
|
+
* Slots per row for a placed container: its own choice when the type allows one,
|
|
11422
|
+
* clamped to the declared bounds, else the type's fixed width.
|
|
11423
|
+
*/
|
|
11424
|
+
export function slotColumns(section: PageSection, type: PageSectionType): number;
|
|
11425
|
+
/**
|
|
11426
|
+
* How many slots a placed container shows: enough rows to hold every child it
|
|
11427
|
+
* already has, plus a fresh row once the last one fills. Empty rows are never
|
|
11428
|
+
* offered ahead of being needed, and the total stays within {@link MAX_SLOTS}.
|
|
11429
|
+
*/
|
|
11430
|
+
export function slotCount(section: PageSection, type: PageSectionType): number;
|
|
11431
|
+
/** A container section's slot contents, padded/truncated to its slot count. */
|
|
11412
11432
|
export function sectionChildren(section: PageSection, type: PageSectionType): (PageSection | null)[];
|
|
11413
11433
|
/** Drag-and-drop MIME carrying a section type id from the palette to the canvas. */
|
|
11414
11434
|
export const PAGE_TYPE_MIME = "application/x-zn-page-type";
|
|
@@ -11569,8 +11589,9 @@ declare module "components/page-builder/page-builder.component" {
|
|
|
11569
11589
|
* @slot config - `<template type="…">` declarations; never displayed. Each template's attributes
|
|
11570
11590
|
* (type, label, icon, icon-library, color, category, description, slots, accepts) declare a
|
|
11571
11591
|
* palette entry and its content declares the inspector form for that type. `slots` makes the
|
|
11572
|
-
* section a container
|
|
11573
|
-
*
|
|
11592
|
+
* section a container that many slots wide — rows are added as they fill — and `slots-min`/
|
|
11593
|
+
* `slots-max` let each placed section choose its own width; `accepts` is a comma-separated
|
|
11594
|
+
* list of the type keys its slots allow.
|
|
11574
11595
|
* @slot header-left - Actions shown on the left of the header bar.
|
|
11575
11596
|
* @slot header-right - Actions shown on the right of the header bar.
|
|
11576
11597
|
*
|
|
@@ -11701,6 +11722,13 @@ declare module "components/page-builder/page-builder.component" {
|
|
|
11701
11722
|
protected willUpdate(changed: PropertyValues): void;
|
|
11702
11723
|
protected firstUpdated(changed: PropertyValues): void;
|
|
11703
11724
|
private _typeFromTemplate;
|
|
11725
|
+
/**
|
|
11726
|
+
* `slots="N"` is a container N slots wide; adding `slots-max` lets each placed
|
|
11727
|
+
* section choose its own width between `slots-min` (1 by default) and that. A
|
|
11728
|
+
* width past the slot cap would leave a container with no usable row, so an
|
|
11729
|
+
* out-of-bounds bound is ignored rather than honoured.
|
|
11730
|
+
*/
|
|
11731
|
+
private _slotsFromAttributes;
|
|
11704
11732
|
private _registerSlottedTemplates;
|
|
11705
11733
|
/** Normalises and installs an externally provided state; resets selection. */
|
|
11706
11734
|
private _applyExternalState;
|
|
@@ -11736,6 +11764,12 @@ declare module "components/page-builder/page-builder.component" {
|
|
|
11736
11764
|
addSection(type: string, index?: number): PageSection | null;
|
|
11737
11765
|
/** Adds a new section of a registered type into a container's slot. Returns null if not allowed. */
|
|
11738
11766
|
addSectionToSlot(type: string, containerId: string, slotIndex: number): PageSection | null;
|
|
11767
|
+
/**
|
|
11768
|
+
* Sets how many slots per row a container whose type allows a choice lays out,
|
|
11769
|
+
* clamped to the declared bounds. Children keep their order and reflow into the
|
|
11770
|
+
* new width, so nothing is lost by narrowing one.
|
|
11771
|
+
*/
|
|
11772
|
+
setSectionColumns(id: string, columns: number): void;
|
|
11739
11773
|
private _removeSection;
|
|
11740
11774
|
private _duplicateSection;
|
|
11741
11775
|
/** Moves a section (top-level or slotted) to a top-level position. */
|