@kubex/zinc 1.1.116 → 1.1.117
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 +209 -2
- package/dist/vscode.html-custom-data.json +1 -1
- package/dist/web-types.json +2 -2
- package/dist/zn.d.ts +36 -1
- package/dist/zn.min.js +280 -280
- package/docs/pages/components/form-group.md +42 -9
- package/package.json +1 -1
- package/src/components/form-group/form-group.component.ts +156 -2
- package/src/components/form-group/form-group.scss +18 -3
- package/src/components/form-group/form-group.test.ts +64 -0
|
@@ -16461,6 +16461,18 @@
|
|
|
16461
16461
|
"kind": "class",
|
|
16462
16462
|
"description": "",
|
|
16463
16463
|
"name": "ZnFormGroup",
|
|
16464
|
+
"cssProperties": [
|
|
16465
|
+
{
|
|
16466
|
+
"description": "Offset the label column sticks at while the inputs scroll past.",
|
|
16467
|
+
"name": "--zn-form-group-sticky-top"
|
|
16468
|
+
}
|
|
16469
|
+
],
|
|
16470
|
+
"cssParts": [
|
|
16471
|
+
{
|
|
16472
|
+
"description": "The column holding the label, help text and chip.",
|
|
16473
|
+
"name": "form-control-text"
|
|
16474
|
+
}
|
|
16475
|
+
],
|
|
16464
16476
|
"slots": [
|
|
16465
16477
|
{
|
|
16466
16478
|
"description": "The default slot.",
|
|
@@ -16535,6 +16547,201 @@
|
|
|
16535
16547
|
},
|
|
16536
16548
|
"default": "false",
|
|
16537
16549
|
"attribute": "pad"
|
|
16550
|
+
},
|
|
16551
|
+
{
|
|
16552
|
+
"kind": "field",
|
|
16553
|
+
"name": "tracked",
|
|
16554
|
+
"type": {
|
|
16555
|
+
"text": "HTMLElement | null"
|
|
16556
|
+
},
|
|
16557
|
+
"privacy": "private",
|
|
16558
|
+
"default": "null",
|
|
16559
|
+
"description": "The scroller the label is tracked against by hand; null while native sticky is enough."
|
|
16560
|
+
},
|
|
16561
|
+
{
|
|
16562
|
+
"kind": "field",
|
|
16563
|
+
"name": "frame",
|
|
16564
|
+
"type": {
|
|
16565
|
+
"text": "number"
|
|
16566
|
+
},
|
|
16567
|
+
"privacy": "private",
|
|
16568
|
+
"default": "0"
|
|
16569
|
+
},
|
|
16570
|
+
{
|
|
16571
|
+
"kind": "field",
|
|
16572
|
+
"name": "rebind",
|
|
16573
|
+
"type": {
|
|
16574
|
+
"text": "boolean"
|
|
16575
|
+
},
|
|
16576
|
+
"privacy": "private",
|
|
16577
|
+
"default": "false"
|
|
16578
|
+
},
|
|
16579
|
+
{
|
|
16580
|
+
"kind": "field",
|
|
16581
|
+
"name": "offset",
|
|
16582
|
+
"type": {
|
|
16583
|
+
"text": "number"
|
|
16584
|
+
},
|
|
16585
|
+
"privacy": "private",
|
|
16586
|
+
"default": "0"
|
|
16587
|
+
},
|
|
16588
|
+
{
|
|
16589
|
+
"kind": "field",
|
|
16590
|
+
"name": "resizeObserver",
|
|
16591
|
+
"type": {
|
|
16592
|
+
"text": "ResizeObserver | null"
|
|
16593
|
+
},
|
|
16594
|
+
"privacy": "private",
|
|
16595
|
+
"default": "null"
|
|
16596
|
+
},
|
|
16597
|
+
{
|
|
16598
|
+
"kind": "field",
|
|
16599
|
+
"name": "labelColumn",
|
|
16600
|
+
"type": {
|
|
16601
|
+
"text": "HTMLElement | null"
|
|
16602
|
+
},
|
|
16603
|
+
"privacy": "private",
|
|
16604
|
+
"readonly": true
|
|
16605
|
+
},
|
|
16606
|
+
{
|
|
16607
|
+
"kind": "method",
|
|
16608
|
+
"name": "schedule",
|
|
16609
|
+
"privacy": "private",
|
|
16610
|
+
"parameters": [
|
|
16611
|
+
{
|
|
16612
|
+
"name": "rebind",
|
|
16613
|
+
"default": "false",
|
|
16614
|
+
"type": {
|
|
16615
|
+
"text": "boolean"
|
|
16616
|
+
}
|
|
16617
|
+
}
|
|
16618
|
+
],
|
|
16619
|
+
"description": "Coalesces scroll and resize work into one frame, and out of the ResizeObserver callback."
|
|
16620
|
+
},
|
|
16621
|
+
{
|
|
16622
|
+
"kind": "method",
|
|
16623
|
+
"name": "findScroller",
|
|
16624
|
+
"privacy": "private",
|
|
16625
|
+
"description": "Native sticky only follows the nearest scroll container. Where that container isn't the one\nthe user actually scrolls — a `zn-panel` body sized to its content inside a scrolling\nslideout, say — the label never moves, so it gets translated by hand instead."
|
|
16626
|
+
},
|
|
16627
|
+
{
|
|
16628
|
+
"kind": "method",
|
|
16629
|
+
"name": "trackScroller",
|
|
16630
|
+
"privacy": "private",
|
|
16631
|
+
"parameters": [
|
|
16632
|
+
{
|
|
16633
|
+
"name": "scroller",
|
|
16634
|
+
"type": {
|
|
16635
|
+
"text": "HTMLElement | null"
|
|
16636
|
+
}
|
|
16637
|
+
}
|
|
16638
|
+
]
|
|
16639
|
+
},
|
|
16640
|
+
{
|
|
16641
|
+
"kind": "method",
|
|
16642
|
+
"name": "scrollTarget",
|
|
16643
|
+
"privacy": "private",
|
|
16644
|
+
"return": {
|
|
16645
|
+
"type": {
|
|
16646
|
+
"text": "EventTarget | null"
|
|
16647
|
+
}
|
|
16648
|
+
},
|
|
16649
|
+
"parameters": [
|
|
16650
|
+
{
|
|
16651
|
+
"name": "scroller",
|
|
16652
|
+
"type": {
|
|
16653
|
+
"text": "HTMLElement | null"
|
|
16654
|
+
}
|
|
16655
|
+
}
|
|
16656
|
+
],
|
|
16657
|
+
"description": "The document scrolls through the window, every other scroller reports its own events."
|
|
16658
|
+
},
|
|
16659
|
+
{
|
|
16660
|
+
"kind": "field",
|
|
16661
|
+
"name": "onScroll",
|
|
16662
|
+
"privacy": "private",
|
|
16663
|
+
"readonly": true
|
|
16664
|
+
},
|
|
16665
|
+
{
|
|
16666
|
+
"kind": "field",
|
|
16667
|
+
"name": "onViewportResize",
|
|
16668
|
+
"privacy": "private",
|
|
16669
|
+
"readonly": true
|
|
16670
|
+
},
|
|
16671
|
+
{
|
|
16672
|
+
"kind": "method",
|
|
16673
|
+
"name": "positionLabel",
|
|
16674
|
+
"privacy": "private"
|
|
16675
|
+
},
|
|
16676
|
+
{
|
|
16677
|
+
"kind": "method",
|
|
16678
|
+
"name": "nearestScrollContainer",
|
|
16679
|
+
"privacy": "private",
|
|
16680
|
+
"return": {
|
|
16681
|
+
"type": {
|
|
16682
|
+
"text": "HTMLElement | null"
|
|
16683
|
+
}
|
|
16684
|
+
},
|
|
16685
|
+
"parameters": [
|
|
16686
|
+
{
|
|
16687
|
+
"name": "from",
|
|
16688
|
+
"type": {
|
|
16689
|
+
"text": "HTMLElement"
|
|
16690
|
+
}
|
|
16691
|
+
}
|
|
16692
|
+
],
|
|
16693
|
+
"description": "The box native sticky would anchor to, whether or not it can be scrolled."
|
|
16694
|
+
},
|
|
16695
|
+
{
|
|
16696
|
+
"kind": "method",
|
|
16697
|
+
"name": "scrollingAncestor",
|
|
16698
|
+
"privacy": "private",
|
|
16699
|
+
"return": {
|
|
16700
|
+
"type": {
|
|
16701
|
+
"text": "HTMLElement | null"
|
|
16702
|
+
}
|
|
16703
|
+
},
|
|
16704
|
+
"parameters": [
|
|
16705
|
+
{
|
|
16706
|
+
"name": "from",
|
|
16707
|
+
"type": {
|
|
16708
|
+
"text": "HTMLElement"
|
|
16709
|
+
}
|
|
16710
|
+
}
|
|
16711
|
+
],
|
|
16712
|
+
"description": "The nearest ancestor the user can actually scroll, falling back to the document."
|
|
16713
|
+
},
|
|
16714
|
+
{
|
|
16715
|
+
"kind": "method",
|
|
16716
|
+
"name": "isScrollContainer",
|
|
16717
|
+
"privacy": "private",
|
|
16718
|
+
"parameters": [
|
|
16719
|
+
{
|
|
16720
|
+
"name": "overflow",
|
|
16721
|
+
"type": {
|
|
16722
|
+
"text": "string"
|
|
16723
|
+
}
|
|
16724
|
+
}
|
|
16725
|
+
]
|
|
16726
|
+
},
|
|
16727
|
+
{
|
|
16728
|
+
"kind": "method",
|
|
16729
|
+
"name": "ancestors",
|
|
16730
|
+
"privacy": "private",
|
|
16731
|
+
"return": {
|
|
16732
|
+
"type": {
|
|
16733
|
+
"text": "HTMLElement[]"
|
|
16734
|
+
}
|
|
16735
|
+
},
|
|
16736
|
+
"parameters": [
|
|
16737
|
+
{
|
|
16738
|
+
"name": "from",
|
|
16739
|
+
"type": {
|
|
16740
|
+
"text": "HTMLElement"
|
|
16741
|
+
}
|
|
16742
|
+
}
|
|
16743
|
+
],
|
|
16744
|
+
"description": "Walks the flattened tree, so slots and shadow boundaries are crossed the way layout does."
|
|
16538
16745
|
}
|
|
16539
16746
|
],
|
|
16540
16747
|
"attributes": [
|
|
@@ -16598,7 +16805,7 @@
|
|
|
16598
16805
|
"tagNameWithoutPrefix": "form-group",
|
|
16599
16806
|
"tagName": "zn-form-group",
|
|
16600
16807
|
"customElement": true,
|
|
16601
|
-
"jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/form-group\n * @status experimental\n * @since 1.0\n *\n * @slot - The default slot.\n * @slot chip - A chip displayed under the form group's help text.\n *\n */",
|
|
16808
|
+
"jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/form-group\n * @status experimental\n * @since 1.0\n *\n * @slot - The default slot.\n * @slot chip - A chip displayed under the form group's help text.\n *\n * @csspart form-control-text - The column holding the label, help text and chip.\n *\n * @cssproperty --zn-form-group-sticky-top - Offset the label column sticks at while the inputs scroll past.\n *\n */",
|
|
16602
16809
|
"documentation": "https://zinc.style/components/form-group",
|
|
16603
16810
|
"status": "experimental",
|
|
16604
16811
|
"since": "1.0"
|
|
@@ -51125,7 +51332,7 @@
|
|
|
51125
51332
|
"package": {
|
|
51126
51333
|
"name": "@kubex/zinc",
|
|
51127
51334
|
"description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
|
|
51128
|
-
"version": "1.1.
|
|
51335
|
+
"version": "1.1.117",
|
|
51129
51336
|
"author": "",
|
|
51130
51337
|
"license": "MIT"
|
|
51131
51338
|
}
|
|
@@ -1922,7 +1922,7 @@
|
|
|
1922
1922
|
},
|
|
1923
1923
|
{
|
|
1924
1924
|
"name": "zn-form-group",
|
|
1925
|
-
"description": "Short summary of the component's intended use.\n---\n\n\n### **Slots:**\n - _default_ - The default slot.\n- **chip** - A chip displayed under the form group's help text.",
|
|
1925
|
+
"description": "Short summary of the component's intended use.\n---\n\n\n### **Slots:**\n - _default_ - The default slot.\n- **chip** - A chip displayed under the form group's help text.\n\n### **CSS Properties:**\n - **--zn-form-group-sticky-top** - Offset the label column sticks at while the inputs scroll past. _(default: undefined)_\n\n### **CSS Parts:**\n - **form-control-text** - The column holding the label, help text and chip.",
|
|
1926
1926
|
"attributes": [
|
|
1927
1927
|
{
|
|
1928
1928
|
"name": "label",
|
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.117",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -4509,7 +4509,7 @@
|
|
|
4509
4509
|
},
|
|
4510
4510
|
{
|
|
4511
4511
|
"name": "zn-form-group",
|
|
4512
|
-
"description": "Short summary of the component's intended use.\n---\n\n\n### **Slots:**\n - _default_ - The default slot.\n- **chip** - A chip displayed under the form group's help text.",
|
|
4512
|
+
"description": "Short summary of the component's intended use.\n---\n\n\n### **Slots:**\n - _default_ - The default slot.\n- **chip** - A chip displayed under the form group's help text.\n\n### **CSS Properties:**\n - **--zn-form-group-sticky-top** - Offset the label column sticks at while the inputs scroll past. _(default: undefined)_\n\n### **CSS Parts:**\n - **form-control-text** - The column holding the label, help text and chip.",
|
|
4513
4513
|
"doc-url": "",
|
|
4514
4514
|
"attributes": [
|
|
4515
4515
|
{
|
package/dist/zn.d.ts
CHANGED
|
@@ -7288,7 +7288,7 @@ declare module "components/form-actions/index" {
|
|
|
7288
7288
|
}
|
|
7289
7289
|
}
|
|
7290
7290
|
declare module "components/form-group/form-group.component" {
|
|
7291
|
-
import { type CSSResultGroup } from 'lit';
|
|
7291
|
+
import { type CSSResultGroup, type PropertyValues } from 'lit';
|
|
7292
7292
|
import ZincElement from "internal/zinc-element";
|
|
7293
7293
|
/**
|
|
7294
7294
|
* @summary Short summary of the component's intended use.
|
|
@@ -7299,6 +7299,10 @@ declare module "components/form-group/form-group.component" {
|
|
|
7299
7299
|
* @slot - The default slot.
|
|
7300
7300
|
* @slot chip - A chip displayed under the form group's help text.
|
|
7301
7301
|
*
|
|
7302
|
+
* @csspart form-control-text - The column holding the label, help text and chip.
|
|
7303
|
+
*
|
|
7304
|
+
* @cssproperty --zn-form-group-sticky-top - Offset the label column sticks at while the inputs scroll past.
|
|
7305
|
+
*
|
|
7302
7306
|
*/
|
|
7303
7307
|
export default class ZnFormGroup extends ZincElement {
|
|
7304
7308
|
static styles: CSSResultGroup;
|
|
@@ -7318,6 +7322,37 @@ declare module "components/form-group/form-group.component" {
|
|
|
7318
7322
|
forceCols: boolean;
|
|
7319
7323
|
layout: string;
|
|
7320
7324
|
pad: boolean;
|
|
7325
|
+
/** The scroller the label is tracked against by hand; null while native sticky is enough. */
|
|
7326
|
+
private tracked;
|
|
7327
|
+
private frame;
|
|
7328
|
+
private rebind;
|
|
7329
|
+
private offset;
|
|
7330
|
+
private resizeObserver;
|
|
7331
|
+
connectedCallback(): void;
|
|
7332
|
+
disconnectedCallback(): void;
|
|
7333
|
+
protected firstUpdated(changedProperties: PropertyValues): void;
|
|
7334
|
+
private get labelColumn();
|
|
7335
|
+
/** Coalesces scroll and resize work into one frame, and out of the ResizeObserver callback. */
|
|
7336
|
+
private schedule;
|
|
7337
|
+
/**
|
|
7338
|
+
* Native sticky only follows the nearest scroll container. Where that container isn't the one
|
|
7339
|
+
* the user actually scrolls — a `zn-panel` body sized to its content inside a scrolling
|
|
7340
|
+
* slideout, say — the label never moves, so it gets translated by hand instead.
|
|
7341
|
+
*/
|
|
7342
|
+
private findScroller;
|
|
7343
|
+
private trackScroller;
|
|
7344
|
+
/** The document scrolls through the window, every other scroller reports its own events. */
|
|
7345
|
+
private scrollTarget;
|
|
7346
|
+
private readonly onScroll;
|
|
7347
|
+
private readonly onViewportResize;
|
|
7348
|
+
private positionLabel;
|
|
7349
|
+
/** The box native sticky would anchor to, whether or not it can be scrolled. */
|
|
7350
|
+
private nearestScrollContainer;
|
|
7351
|
+
/** The nearest ancestor the user can actually scroll, falling back to the document. */
|
|
7352
|
+
private scrollingAncestor;
|
|
7353
|
+
private isScrollContainer;
|
|
7354
|
+
/** Walks the flattened tree, so slots and shadow boundaries are crossed the way layout does. */
|
|
7355
|
+
private ancestors;
|
|
7321
7356
|
render(): import("lit-html").TemplateResult<1>;
|
|
7322
7357
|
}
|
|
7323
7358
|
}
|