@kubex/zinc 1.1.48 → 1.1.50
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 +300 -1
- package/dist/vscode.html-custom-data.json +43 -0
- package/dist/web-types.json +105 -1
- package/dist/zn.d.ts +68 -0
- package/dist/zn.min.js +341 -319
- package/docs/pages/components/color-select.md +34 -0
- package/package.json +1 -1
- package/src/components/channel-tile/channel-tile.component.ts +6 -2
- package/src/components/color-select/color-select.component.ts +123 -0
- package/src/components/color-select/color-select.scss +78 -0
- package/src/components/color-select/color-select.test.ts +28 -0
- package/src/components/color-select/index.ts +12 -0
- package/src/components/content-block/content-block.component.ts +1 -0
- package/src/components/content-block/content-block.scss +2 -12
- package/src/zinc.ts +1 -0
|
@@ -5684,6 +5684,305 @@
|
|
|
5684
5684
|
}
|
|
5685
5685
|
]
|
|
5686
5686
|
},
|
|
5687
|
+
{
|
|
5688
|
+
"kind": "javascript-module",
|
|
5689
|
+
"path": "components/color-select/color-select.js",
|
|
5690
|
+
"declarations": [
|
|
5691
|
+
{
|
|
5692
|
+
"kind": "class",
|
|
5693
|
+
"description": "",
|
|
5694
|
+
"name": "ZnColorSelect",
|
|
5695
|
+
"cssParts": [
|
|
5696
|
+
{
|
|
5697
|
+
"description": "The color swatch shown in the closed control.",
|
|
5698
|
+
"name": "swatch"
|
|
5699
|
+
},
|
|
5700
|
+
{
|
|
5701
|
+
"description": "The container that wraps the swatch and expand button (forwarded from zn-select).",
|
|
5702
|
+
"name": "combobox"
|
|
5703
|
+
},
|
|
5704
|
+
{
|
|
5705
|
+
"description": "The help text's wrapper (forwarded from zn-select).",
|
|
5706
|
+
"name": "form-control-help-text"
|
|
5707
|
+
},
|
|
5708
|
+
{
|
|
5709
|
+
"description": "The select's wrapper (forwarded from zn-select).",
|
|
5710
|
+
"name": "form-control-input"
|
|
5711
|
+
}
|
|
5712
|
+
],
|
|
5713
|
+
"members": [
|
|
5714
|
+
{
|
|
5715
|
+
"kind": "field",
|
|
5716
|
+
"name": "dependencies",
|
|
5717
|
+
"type": {
|
|
5718
|
+
"text": "object"
|
|
5719
|
+
},
|
|
5720
|
+
"static": true,
|
|
5721
|
+
"default": "{ 'zn-select': ZnSelect, 'zn-option': ZnOption, }"
|
|
5722
|
+
},
|
|
5723
|
+
{
|
|
5724
|
+
"kind": "field",
|
|
5725
|
+
"name": "select",
|
|
5726
|
+
"type": {
|
|
5727
|
+
"text": "ZnSelect"
|
|
5728
|
+
}
|
|
5729
|
+
},
|
|
5730
|
+
{
|
|
5731
|
+
"kind": "field",
|
|
5732
|
+
"name": "name",
|
|
5733
|
+
"type": {
|
|
5734
|
+
"text": "string"
|
|
5735
|
+
},
|
|
5736
|
+
"description": "The name of the select. Used for form submission.",
|
|
5737
|
+
"attribute": "name"
|
|
5738
|
+
},
|
|
5739
|
+
{
|
|
5740
|
+
"kind": "field",
|
|
5741
|
+
"name": "value",
|
|
5742
|
+
"type": {
|
|
5743
|
+
"text": "string"
|
|
5744
|
+
},
|
|
5745
|
+
"default": "''",
|
|
5746
|
+
"description": "The selected color (lowercase name, e.g. \"red\"). Used for form submission.",
|
|
5747
|
+
"attribute": "value"
|
|
5748
|
+
},
|
|
5749
|
+
{
|
|
5750
|
+
"kind": "field",
|
|
5751
|
+
"name": "label",
|
|
5752
|
+
"type": {
|
|
5753
|
+
"text": "string"
|
|
5754
|
+
},
|
|
5755
|
+
"default": "''",
|
|
5756
|
+
"description": "The select's label.",
|
|
5757
|
+
"attribute": "label"
|
|
5758
|
+
},
|
|
5759
|
+
{
|
|
5760
|
+
"kind": "field",
|
|
5761
|
+
"name": "helpText",
|
|
5762
|
+
"type": {
|
|
5763
|
+
"text": "string"
|
|
5764
|
+
},
|
|
5765
|
+
"default": "''",
|
|
5766
|
+
"description": "The select's help text.",
|
|
5767
|
+
"attribute": "help-text"
|
|
5768
|
+
},
|
|
5769
|
+
{
|
|
5770
|
+
"kind": "field",
|
|
5771
|
+
"name": "disabled",
|
|
5772
|
+
"type": {
|
|
5773
|
+
"text": "boolean"
|
|
5774
|
+
},
|
|
5775
|
+
"default": "false",
|
|
5776
|
+
"description": "Disables the select.",
|
|
5777
|
+
"attribute": "disabled",
|
|
5778
|
+
"reflects": true
|
|
5779
|
+
},
|
|
5780
|
+
{
|
|
5781
|
+
"kind": "field",
|
|
5782
|
+
"name": "required",
|
|
5783
|
+
"type": {
|
|
5784
|
+
"text": "boolean"
|
|
5785
|
+
},
|
|
5786
|
+
"default": "false",
|
|
5787
|
+
"description": "Makes the select a required field.",
|
|
5788
|
+
"attribute": "required",
|
|
5789
|
+
"reflects": true
|
|
5790
|
+
},
|
|
5791
|
+
{
|
|
5792
|
+
"kind": "field",
|
|
5793
|
+
"name": "clearable",
|
|
5794
|
+
"type": {
|
|
5795
|
+
"text": "boolean"
|
|
5796
|
+
},
|
|
5797
|
+
"default": "false",
|
|
5798
|
+
"description": "Shows a clear button when a color is selected.",
|
|
5799
|
+
"attribute": "clearable"
|
|
5800
|
+
},
|
|
5801
|
+
{
|
|
5802
|
+
"kind": "field",
|
|
5803
|
+
"name": "formControlController",
|
|
5804
|
+
"privacy": "private",
|
|
5805
|
+
"readonly": true,
|
|
5806
|
+
"default": "new FormControlController(this)"
|
|
5807
|
+
},
|
|
5808
|
+
{
|
|
5809
|
+
"kind": "field",
|
|
5810
|
+
"name": "validity",
|
|
5811
|
+
"type": {
|
|
5812
|
+
"text": "ValidityState"
|
|
5813
|
+
},
|
|
5814
|
+
"readonly": true
|
|
5815
|
+
},
|
|
5816
|
+
{
|
|
5817
|
+
"kind": "field",
|
|
5818
|
+
"name": "validationMessage",
|
|
5819
|
+
"type": {
|
|
5820
|
+
"text": "string"
|
|
5821
|
+
},
|
|
5822
|
+
"readonly": true
|
|
5823
|
+
},
|
|
5824
|
+
{
|
|
5825
|
+
"kind": "method",
|
|
5826
|
+
"name": "checkValidity",
|
|
5827
|
+
"return": {
|
|
5828
|
+
"type": {
|
|
5829
|
+
"text": "boolean"
|
|
5830
|
+
}
|
|
5831
|
+
}
|
|
5832
|
+
},
|
|
5833
|
+
{
|
|
5834
|
+
"kind": "method",
|
|
5835
|
+
"name": "getForm",
|
|
5836
|
+
"return": {
|
|
5837
|
+
"type": {
|
|
5838
|
+
"text": "HTMLFormElement | null"
|
|
5839
|
+
}
|
|
5840
|
+
}
|
|
5841
|
+
},
|
|
5842
|
+
{
|
|
5843
|
+
"kind": "method",
|
|
5844
|
+
"name": "reportValidity",
|
|
5845
|
+
"return": {
|
|
5846
|
+
"type": {
|
|
5847
|
+
"text": "boolean"
|
|
5848
|
+
}
|
|
5849
|
+
}
|
|
5850
|
+
},
|
|
5851
|
+
{
|
|
5852
|
+
"kind": "method",
|
|
5853
|
+
"name": "setCustomValidity",
|
|
5854
|
+
"return": {
|
|
5855
|
+
"type": {
|
|
5856
|
+
"text": "void"
|
|
5857
|
+
}
|
|
5858
|
+
},
|
|
5859
|
+
"parameters": [
|
|
5860
|
+
{
|
|
5861
|
+
"name": "message",
|
|
5862
|
+
"type": {
|
|
5863
|
+
"text": "string"
|
|
5864
|
+
}
|
|
5865
|
+
}
|
|
5866
|
+
]
|
|
5867
|
+
},
|
|
5868
|
+
{
|
|
5869
|
+
"kind": "method",
|
|
5870
|
+
"name": "handleValueChange"
|
|
5871
|
+
},
|
|
5872
|
+
{
|
|
5873
|
+
"kind": "field",
|
|
5874
|
+
"name": "handleInput",
|
|
5875
|
+
"privacy": "private"
|
|
5876
|
+
},
|
|
5877
|
+
{
|
|
5878
|
+
"kind": "field",
|
|
5879
|
+
"name": "handleClear",
|
|
5880
|
+
"privacy": "private"
|
|
5881
|
+
}
|
|
5882
|
+
],
|
|
5883
|
+
"events": [
|
|
5884
|
+
{
|
|
5885
|
+
"description": "Emitted when the selected color changes.",
|
|
5886
|
+
"name": "zn-input"
|
|
5887
|
+
},
|
|
5888
|
+
{
|
|
5889
|
+
"description": "Emitted when the clear button is activated.",
|
|
5890
|
+
"name": "zn-clear"
|
|
5891
|
+
}
|
|
5892
|
+
],
|
|
5893
|
+
"attributes": [
|
|
5894
|
+
{
|
|
5895
|
+
"name": "name",
|
|
5896
|
+
"type": {
|
|
5897
|
+
"text": "string"
|
|
5898
|
+
},
|
|
5899
|
+
"description": "The name of the select. Used for form submission.",
|
|
5900
|
+
"fieldName": "name"
|
|
5901
|
+
},
|
|
5902
|
+
{
|
|
5903
|
+
"name": "value",
|
|
5904
|
+
"type": {
|
|
5905
|
+
"text": "string"
|
|
5906
|
+
},
|
|
5907
|
+
"default": "''",
|
|
5908
|
+
"description": "The selected color (lowercase name, e.g. \"red\"). Used for form submission.",
|
|
5909
|
+
"fieldName": "value"
|
|
5910
|
+
},
|
|
5911
|
+
{
|
|
5912
|
+
"name": "label",
|
|
5913
|
+
"type": {
|
|
5914
|
+
"text": "string"
|
|
5915
|
+
},
|
|
5916
|
+
"default": "''",
|
|
5917
|
+
"description": "The select's label.",
|
|
5918
|
+
"fieldName": "label"
|
|
5919
|
+
},
|
|
5920
|
+
{
|
|
5921
|
+
"name": "help-text",
|
|
5922
|
+
"type": {
|
|
5923
|
+
"text": "string"
|
|
5924
|
+
},
|
|
5925
|
+
"default": "''",
|
|
5926
|
+
"description": "The select's help text.",
|
|
5927
|
+
"fieldName": "helpText"
|
|
5928
|
+
},
|
|
5929
|
+
{
|
|
5930
|
+
"name": "disabled",
|
|
5931
|
+
"type": {
|
|
5932
|
+
"text": "boolean"
|
|
5933
|
+
},
|
|
5934
|
+
"default": "false",
|
|
5935
|
+
"description": "Disables the select.",
|
|
5936
|
+
"fieldName": "disabled"
|
|
5937
|
+
},
|
|
5938
|
+
{
|
|
5939
|
+
"name": "required",
|
|
5940
|
+
"type": {
|
|
5941
|
+
"text": "boolean"
|
|
5942
|
+
},
|
|
5943
|
+
"default": "false",
|
|
5944
|
+
"description": "Makes the select a required field.",
|
|
5945
|
+
"fieldName": "required"
|
|
5946
|
+
},
|
|
5947
|
+
{
|
|
5948
|
+
"name": "clearable",
|
|
5949
|
+
"type": {
|
|
5950
|
+
"text": "boolean"
|
|
5951
|
+
},
|
|
5952
|
+
"default": "false",
|
|
5953
|
+
"description": "Shows a clear button when a color is selected.",
|
|
5954
|
+
"fieldName": "clearable"
|
|
5955
|
+
}
|
|
5956
|
+
],
|
|
5957
|
+
"superclass": {
|
|
5958
|
+
"name": "ZincElement",
|
|
5959
|
+
"module": "/src/internal/zinc-element"
|
|
5960
|
+
},
|
|
5961
|
+
"summary": "A simple color picker. The dropdown lists color swatches with names; the closed control shows only the selected color's swatch.",
|
|
5962
|
+
"tagNameWithoutPrefix": "color-select",
|
|
5963
|
+
"tagName": "zn-color-select",
|
|
5964
|
+
"customElement": true,
|
|
5965
|
+
"jsDoc": "/**\n * @summary A simple color picker. The dropdown lists color swatches with names; the closed control shows only the selected color's swatch.\n * @documentation https://zinc.style/components/color-select\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-select\n * @dependency zn-option\n *\n * @event zn-input - Emitted when the selected color changes.\n * @event zn-clear - Emitted when the clear button is activated.\n *\n * @csspart swatch - The color swatch shown in the closed control.\n * @csspart combobox - The container that wraps the swatch and expand button (forwarded from zn-select).\n * @csspart form-control-help-text - The help text's wrapper (forwarded from zn-select).\n * @csspart form-control-input - The select's wrapper (forwarded from zn-select).\n */",
|
|
5966
|
+
"documentation": "https://zinc.style/components/color-select",
|
|
5967
|
+
"status": "experimental",
|
|
5968
|
+
"since": "1.0",
|
|
5969
|
+
"dependencies": [
|
|
5970
|
+
"zn-select",
|
|
5971
|
+
"zn-option"
|
|
5972
|
+
]
|
|
5973
|
+
}
|
|
5974
|
+
],
|
|
5975
|
+
"exports": [
|
|
5976
|
+
{
|
|
5977
|
+
"kind": "js",
|
|
5978
|
+
"name": "default",
|
|
5979
|
+
"declaration": {
|
|
5980
|
+
"name": "ZnColorSelect",
|
|
5981
|
+
"module": "components/color-select/color-select.js"
|
|
5982
|
+
}
|
|
5983
|
+
}
|
|
5984
|
+
]
|
|
5985
|
+
},
|
|
5687
5986
|
{
|
|
5688
5987
|
"kind": "javascript-module",
|
|
5689
5988
|
"path": "components/cols/cols.js",
|
|
@@ -40324,7 +40623,7 @@
|
|
|
40324
40623
|
"package": {
|
|
40325
40624
|
"name": "@kubex/zinc",
|
|
40326
40625
|
"description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
|
|
40327
|
-
"version": "1.1.
|
|
40626
|
+
"version": "1.1.50",
|
|
40328
40627
|
"author": "",
|
|
40329
40628
|
"license": "MIT"
|
|
40330
40629
|
}
|
|
@@ -785,6 +785,49 @@
|
|
|
785
785
|
}
|
|
786
786
|
]
|
|
787
787
|
},
|
|
788
|
+
{
|
|
789
|
+
"name": "zn-color-select",
|
|
790
|
+
"description": "A simple color picker. The dropdown lists color swatches with names; the closed control shows only the selected color's swatch.\n---\n\n\n### **Events:**\n - **zn-input** - Emitted when the selected color changes.\n- **zn-clear** - Emitted when the clear button is activated.\n\n### **CSS Parts:**\n - **swatch** - The color swatch shown in the closed control.\n- **combobox** - The container that wraps the swatch and expand button (forwarded from zn-select).\n- **form-control-help-text** - The help text's wrapper (forwarded from zn-select).\n- **form-control-input** - The select's wrapper (forwarded from zn-select).",
|
|
791
|
+
"attributes": [
|
|
792
|
+
{
|
|
793
|
+
"name": "name",
|
|
794
|
+
"description": "The name of the select. Used for form submission.",
|
|
795
|
+
"values": []
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
"name": "value",
|
|
799
|
+
"description": "The selected color (lowercase name, e.g. \"red\"). Used for form submission.",
|
|
800
|
+
"values": []
|
|
801
|
+
},
|
|
802
|
+
{ "name": "label", "description": "The select's label.", "values": [] },
|
|
803
|
+
{
|
|
804
|
+
"name": "help-text",
|
|
805
|
+
"description": "The select's help text.",
|
|
806
|
+
"values": []
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
"name": "disabled",
|
|
810
|
+
"description": "Disables the select.",
|
|
811
|
+
"values": []
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
"name": "required",
|
|
815
|
+
"description": "Makes the select a required field.",
|
|
816
|
+
"values": []
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
"name": "clearable",
|
|
820
|
+
"description": "Shows a clear button when a color is selected.",
|
|
821
|
+
"values": []
|
|
822
|
+
}
|
|
823
|
+
],
|
|
824
|
+
"references": [
|
|
825
|
+
{
|
|
826
|
+
"name": "Documentation",
|
|
827
|
+
"url": "https://zinc.style/components/color-select"
|
|
828
|
+
}
|
|
829
|
+
]
|
|
830
|
+
},
|
|
788
831
|
{
|
|
789
832
|
"name": "zn-cols",
|
|
790
833
|
"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.",
|
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.50",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -1722,6 +1722,110 @@
|
|
|
1722
1722
|
"events": []
|
|
1723
1723
|
}
|
|
1724
1724
|
},
|
|
1725
|
+
{
|
|
1726
|
+
"name": "zn-color-select",
|
|
1727
|
+
"description": "A simple color picker. The dropdown lists color swatches with names; the closed control shows only the selected color's swatch.\n---\n\n\n### **Events:**\n - **zn-input** - Emitted when the selected color changes.\n- **zn-clear** - Emitted when the clear button is activated.\n\n### **CSS Parts:**\n - **swatch** - The color swatch shown in the closed control.\n- **combobox** - The container that wraps the swatch and expand button (forwarded from zn-select).\n- **form-control-help-text** - The help text's wrapper (forwarded from zn-select).\n- **form-control-input** - The select's wrapper (forwarded from zn-select).",
|
|
1728
|
+
"doc-url": "",
|
|
1729
|
+
"attributes": [
|
|
1730
|
+
{
|
|
1731
|
+
"name": "name",
|
|
1732
|
+
"description": "The name of the select. Used for form submission.",
|
|
1733
|
+
"value": { "type": "string" }
|
|
1734
|
+
},
|
|
1735
|
+
{
|
|
1736
|
+
"name": "value",
|
|
1737
|
+
"description": "The selected color (lowercase name, e.g. \"red\"). Used for form submission.",
|
|
1738
|
+
"value": { "type": "string", "default": "''" }
|
|
1739
|
+
},
|
|
1740
|
+
{
|
|
1741
|
+
"name": "label",
|
|
1742
|
+
"description": "The select's label.",
|
|
1743
|
+
"value": { "type": "string", "default": "''" }
|
|
1744
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
"name": "help-text",
|
|
1747
|
+
"description": "The select's help text.",
|
|
1748
|
+
"value": { "type": "string", "default": "''" }
|
|
1749
|
+
},
|
|
1750
|
+
{
|
|
1751
|
+
"name": "disabled",
|
|
1752
|
+
"description": "Disables the select.",
|
|
1753
|
+
"value": { "type": "boolean", "default": "false" }
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
"name": "required",
|
|
1757
|
+
"description": "Makes the select a required field.",
|
|
1758
|
+
"value": { "type": "boolean", "default": "false" }
|
|
1759
|
+
},
|
|
1760
|
+
{
|
|
1761
|
+
"name": "clearable",
|
|
1762
|
+
"description": "Shows a clear button when a color is selected.",
|
|
1763
|
+
"value": { "type": "boolean", "default": "false" }
|
|
1764
|
+
}
|
|
1765
|
+
],
|
|
1766
|
+
"events": [
|
|
1767
|
+
{
|
|
1768
|
+
"name": "zn-input",
|
|
1769
|
+
"description": "Emitted when the selected color changes."
|
|
1770
|
+
},
|
|
1771
|
+
{
|
|
1772
|
+
"name": "zn-clear",
|
|
1773
|
+
"description": "Emitted when the clear button is activated."
|
|
1774
|
+
}
|
|
1775
|
+
],
|
|
1776
|
+
"js": {
|
|
1777
|
+
"properties": [
|
|
1778
|
+
{ "name": "select", "type": "ZnSelect" },
|
|
1779
|
+
{
|
|
1780
|
+
"name": "name",
|
|
1781
|
+
"description": "The name of the select. Used for form submission.",
|
|
1782
|
+
"type": "string"
|
|
1783
|
+
},
|
|
1784
|
+
{
|
|
1785
|
+
"name": "value",
|
|
1786
|
+
"description": "The selected color (lowercase name, e.g. \"red\"). Used for form submission.",
|
|
1787
|
+
"type": "string"
|
|
1788
|
+
},
|
|
1789
|
+
{
|
|
1790
|
+
"name": "label",
|
|
1791
|
+
"description": "The select's label.",
|
|
1792
|
+
"type": "string"
|
|
1793
|
+
},
|
|
1794
|
+
{
|
|
1795
|
+
"name": "helpText",
|
|
1796
|
+
"description": "The select's help text.",
|
|
1797
|
+
"type": "string"
|
|
1798
|
+
},
|
|
1799
|
+
{
|
|
1800
|
+
"name": "disabled",
|
|
1801
|
+
"description": "Disables the select.",
|
|
1802
|
+
"type": "boolean"
|
|
1803
|
+
},
|
|
1804
|
+
{
|
|
1805
|
+
"name": "required",
|
|
1806
|
+
"description": "Makes the select a required field.",
|
|
1807
|
+
"type": "boolean"
|
|
1808
|
+
},
|
|
1809
|
+
{
|
|
1810
|
+
"name": "clearable",
|
|
1811
|
+
"description": "Shows a clear button when a color is selected.",
|
|
1812
|
+
"type": "boolean"
|
|
1813
|
+
},
|
|
1814
|
+
{ "name": "validity", "type": "ValidityState" },
|
|
1815
|
+
{ "name": "validationMessage", "type": "string" }
|
|
1816
|
+
],
|
|
1817
|
+
"events": [
|
|
1818
|
+
{
|
|
1819
|
+
"name": "zn-input",
|
|
1820
|
+
"description": "Emitted when the selected color changes."
|
|
1821
|
+
},
|
|
1822
|
+
{
|
|
1823
|
+
"name": "zn-clear",
|
|
1824
|
+
"description": "Emitted when the clear button is activated."
|
|
1825
|
+
}
|
|
1826
|
+
]
|
|
1827
|
+
}
|
|
1828
|
+
},
|
|
1725
1829
|
{
|
|
1726
1830
|
"name": "zn-cols",
|
|
1727
1831
|
"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.",
|
package/dist/zn.d.ts
CHANGED
|
@@ -7353,6 +7353,73 @@ declare module "components/item/index" {
|
|
|
7353
7353
|
}
|
|
7354
7354
|
}
|
|
7355
7355
|
}
|
|
7356
|
+
declare module "components/color-select/color-select.component" {
|
|
7357
|
+
import { type CSSResultGroup } from 'lit';
|
|
7358
|
+
import ZincElement from "internal/zinc-element";
|
|
7359
|
+
import ZnOption from "components/option/index";
|
|
7360
|
+
import ZnSelect from "components/select/index";
|
|
7361
|
+
import type { ZincFormControl } from "internal/zinc-element";
|
|
7362
|
+
/**
|
|
7363
|
+
* @summary A simple color picker. The dropdown lists color swatches with names; the closed control shows only the selected color's swatch.
|
|
7364
|
+
* @documentation https://zinc.style/components/color-select
|
|
7365
|
+
* @status experimental
|
|
7366
|
+
* @since 1.0
|
|
7367
|
+
*
|
|
7368
|
+
* @dependency zn-select
|
|
7369
|
+
* @dependency zn-option
|
|
7370
|
+
*
|
|
7371
|
+
* @event zn-input - Emitted when the selected color changes.
|
|
7372
|
+
* @event zn-clear - Emitted when the clear button is activated.
|
|
7373
|
+
*
|
|
7374
|
+
* @csspart swatch - The color swatch shown in the closed control.
|
|
7375
|
+
* @csspart combobox - The container that wraps the swatch and expand button (forwarded from zn-select).
|
|
7376
|
+
* @csspart form-control-help-text - The help text's wrapper (forwarded from zn-select).
|
|
7377
|
+
* @csspart form-control-input - The select's wrapper (forwarded from zn-select).
|
|
7378
|
+
*/
|
|
7379
|
+
export default class ZnColorSelect extends ZincElement implements ZincFormControl {
|
|
7380
|
+
static styles: CSSResultGroup;
|
|
7381
|
+
static dependencies: {
|
|
7382
|
+
'zn-select': typeof ZnSelect;
|
|
7383
|
+
'zn-option': typeof ZnOption;
|
|
7384
|
+
};
|
|
7385
|
+
select: ZnSelect;
|
|
7386
|
+
/** The name of the select. Used for form submission. */
|
|
7387
|
+
name: string;
|
|
7388
|
+
/** The selected color (lowercase name, e.g. "red"). Used for form submission. */
|
|
7389
|
+
value: string;
|
|
7390
|
+
/** The select's label. */
|
|
7391
|
+
label: string;
|
|
7392
|
+
/** The select's help text. */
|
|
7393
|
+
helpText: string;
|
|
7394
|
+
/** Disables the select. */
|
|
7395
|
+
disabled: boolean;
|
|
7396
|
+
/** Makes the select a required field. */
|
|
7397
|
+
required: boolean;
|
|
7398
|
+
/** Shows a clear button when a color is selected. */
|
|
7399
|
+
clearable: boolean;
|
|
7400
|
+
private readonly formControlController;
|
|
7401
|
+
get validity(): ValidityState;
|
|
7402
|
+
get validationMessage(): string;
|
|
7403
|
+
checkValidity(): boolean;
|
|
7404
|
+
getForm(): HTMLFormElement | null;
|
|
7405
|
+
reportValidity(): boolean;
|
|
7406
|
+
setCustomValidity(message: string): void;
|
|
7407
|
+
handleValueChange(): void;
|
|
7408
|
+
private handleInput;
|
|
7409
|
+
private handleClear;
|
|
7410
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
7411
|
+
}
|
|
7412
|
+
}
|
|
7413
|
+
declare module "components/color-select/index" {
|
|
7414
|
+
import ZnColorSelect from "components/color-select/color-select.component";
|
|
7415
|
+
export * from "components/color-select/color-select.component";
|
|
7416
|
+
export default ZnColorSelect;
|
|
7417
|
+
global {
|
|
7418
|
+
interface HTMLElementTagNameMap {
|
|
7419
|
+
'zn-color-select': ZnColorSelect;
|
|
7420
|
+
}
|
|
7421
|
+
}
|
|
7422
|
+
}
|
|
7356
7423
|
declare module "components/button-menu/button-menu.component" {
|
|
7357
7424
|
import { type CSSResultGroup, type PropertyValues } from 'lit';
|
|
7358
7425
|
import ZincElement from "internal/zinc-element";
|
|
@@ -10302,6 +10369,7 @@ declare module "zinc" {
|
|
|
10302
10369
|
export { default as CheckboxGroup } from "components/checkbox-group/index";
|
|
10303
10370
|
export { default as Item } from "components/item/index";
|
|
10304
10371
|
export { default as DataSelect } from "components/data-select/index";
|
|
10372
|
+
export { default as ColorSelect } from "components/color-select/index";
|
|
10305
10373
|
export { default as ButtonMenu } from "components/button-menu/index";
|
|
10306
10374
|
export { default as HoverContainer } from "components/hover-container/index";
|
|
10307
10375
|
export { default as Slideout } from "components/slideout/index";
|