@kubex/zinc 1.0.23 → 1.0.24
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 +168 -168
- package/dist/vscode.html-custom-data.json +20 -20
- package/dist/web-types.json +48 -48
- package/dist/zn.d.ts +2 -2
- package/dist/zn.min.js +6 -5
- package/package.json +1 -1
- package/src/components/input-group/input-group.scss +1 -0
- package/src/components/item/item.component.ts +1 -1
- package/src/components/navbar/navbar.component.ts +5 -4
- package/src/components/translations/translations.component.ts +18 -18
- package/src/components/translations/translations.scss +26 -1
|
@@ -1644,6 +1644,171 @@
|
|
|
1644
1644
|
}
|
|
1645
1645
|
]
|
|
1646
1646
|
},
|
|
1647
|
+
{
|
|
1648
|
+
"kind": "javascript-module",
|
|
1649
|
+
"path": "components/button-group/button-group.js",
|
|
1650
|
+
"declarations": [
|
|
1651
|
+
{
|
|
1652
|
+
"kind": "class",
|
|
1653
|
+
"description": "",
|
|
1654
|
+
"name": "ZnButtonGroup",
|
|
1655
|
+
"cssProperties": [
|
|
1656
|
+
{
|
|
1657
|
+
"description": "Use flex-grow to fill available space.",
|
|
1658
|
+
"name": "--grow"
|
|
1659
|
+
},
|
|
1660
|
+
{
|
|
1661
|
+
"description": "Justify content at the start of the flex space.",
|
|
1662
|
+
"name": "--start"
|
|
1663
|
+
}
|
|
1664
|
+
],
|
|
1665
|
+
"cssParts": [
|
|
1666
|
+
{
|
|
1667
|
+
"description": "The component's base wrapper.",
|
|
1668
|
+
"name": "base"
|
|
1669
|
+
}
|
|
1670
|
+
],
|
|
1671
|
+
"slots": [
|
|
1672
|
+
{
|
|
1673
|
+
"description": "The default slot.",
|
|
1674
|
+
"name": ""
|
|
1675
|
+
}
|
|
1676
|
+
],
|
|
1677
|
+
"members": [
|
|
1678
|
+
{
|
|
1679
|
+
"kind": "field",
|
|
1680
|
+
"name": "direction",
|
|
1681
|
+
"type": {
|
|
1682
|
+
"text": "'horizontal' | 'vertical'"
|
|
1683
|
+
},
|
|
1684
|
+
"default": "'horizontal'",
|
|
1685
|
+
"attribute": "direction"
|
|
1686
|
+
},
|
|
1687
|
+
{
|
|
1688
|
+
"kind": "field",
|
|
1689
|
+
"name": "grow",
|
|
1690
|
+
"type": {
|
|
1691
|
+
"text": "boolean"
|
|
1692
|
+
},
|
|
1693
|
+
"default": "false",
|
|
1694
|
+
"attribute": "grow"
|
|
1695
|
+
},
|
|
1696
|
+
{
|
|
1697
|
+
"kind": "field",
|
|
1698
|
+
"name": "wrap",
|
|
1699
|
+
"type": {
|
|
1700
|
+
"text": "boolean"
|
|
1701
|
+
},
|
|
1702
|
+
"default": "false",
|
|
1703
|
+
"attribute": "wrap"
|
|
1704
|
+
},
|
|
1705
|
+
{
|
|
1706
|
+
"kind": "field",
|
|
1707
|
+
"name": "start",
|
|
1708
|
+
"type": {
|
|
1709
|
+
"text": "boolean"
|
|
1710
|
+
},
|
|
1711
|
+
"default": "false",
|
|
1712
|
+
"attribute": "start"
|
|
1713
|
+
},
|
|
1714
|
+
{
|
|
1715
|
+
"kind": "field",
|
|
1716
|
+
"name": "gap",
|
|
1717
|
+
"type": {
|
|
1718
|
+
"text": "boolean"
|
|
1719
|
+
},
|
|
1720
|
+
"default": "false",
|
|
1721
|
+
"attribute": "gap"
|
|
1722
|
+
},
|
|
1723
|
+
{
|
|
1724
|
+
"kind": "field",
|
|
1725
|
+
"name": "defaultSlot",
|
|
1726
|
+
"type": {
|
|
1727
|
+
"text": "HTMLSlotElement"
|
|
1728
|
+
}
|
|
1729
|
+
},
|
|
1730
|
+
{
|
|
1731
|
+
"kind": "method",
|
|
1732
|
+
"name": "handleSlotChange",
|
|
1733
|
+
"privacy": "private"
|
|
1734
|
+
}
|
|
1735
|
+
],
|
|
1736
|
+
"events": [
|
|
1737
|
+
{
|
|
1738
|
+
"description": "Emitted as an example.",
|
|
1739
|
+
"name": "zn-event-name"
|
|
1740
|
+
}
|
|
1741
|
+
],
|
|
1742
|
+
"attributes": [
|
|
1743
|
+
{
|
|
1744
|
+
"name": "direction",
|
|
1745
|
+
"type": {
|
|
1746
|
+
"text": "'horizontal' | 'vertical'"
|
|
1747
|
+
},
|
|
1748
|
+
"default": "'horizontal'",
|
|
1749
|
+
"fieldName": "direction"
|
|
1750
|
+
},
|
|
1751
|
+
{
|
|
1752
|
+
"name": "grow",
|
|
1753
|
+
"type": {
|
|
1754
|
+
"text": "boolean"
|
|
1755
|
+
},
|
|
1756
|
+
"default": "false",
|
|
1757
|
+
"fieldName": "grow"
|
|
1758
|
+
},
|
|
1759
|
+
{
|
|
1760
|
+
"name": "wrap",
|
|
1761
|
+
"type": {
|
|
1762
|
+
"text": "boolean"
|
|
1763
|
+
},
|
|
1764
|
+
"default": "false",
|
|
1765
|
+
"fieldName": "wrap"
|
|
1766
|
+
},
|
|
1767
|
+
{
|
|
1768
|
+
"name": "start",
|
|
1769
|
+
"type": {
|
|
1770
|
+
"text": "boolean"
|
|
1771
|
+
},
|
|
1772
|
+
"default": "false",
|
|
1773
|
+
"fieldName": "start"
|
|
1774
|
+
},
|
|
1775
|
+
{
|
|
1776
|
+
"name": "gap",
|
|
1777
|
+
"type": {
|
|
1778
|
+
"text": "boolean"
|
|
1779
|
+
},
|
|
1780
|
+
"default": "false",
|
|
1781
|
+
"fieldName": "gap"
|
|
1782
|
+
}
|
|
1783
|
+
],
|
|
1784
|
+
"superclass": {
|
|
1785
|
+
"name": "ZincElement",
|
|
1786
|
+
"module": "/src/internal/zinc-element"
|
|
1787
|
+
},
|
|
1788
|
+
"summary": "Short summary of the component's intended use.",
|
|
1789
|
+
"tagNameWithoutPrefix": "button-group",
|
|
1790
|
+
"tagName": "zn-button-group",
|
|
1791
|
+
"customElement": true,
|
|
1792
|
+
"jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/button-group\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-example\n *\n * @event zn-event-name - Emitted as an example.\n *\n * @slot - The default slot.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --grow - Use flex-grow to fill available space.\n * @cssproperty --start - Justify content at the start of the flex space.\n */",
|
|
1793
|
+
"documentation": "https://zinc.style/components/button-group",
|
|
1794
|
+
"status": "experimental",
|
|
1795
|
+
"since": "1.0",
|
|
1796
|
+
"dependencies": [
|
|
1797
|
+
"zn-example"
|
|
1798
|
+
]
|
|
1799
|
+
}
|
|
1800
|
+
],
|
|
1801
|
+
"exports": [
|
|
1802
|
+
{
|
|
1803
|
+
"kind": "js",
|
|
1804
|
+
"name": "default",
|
|
1805
|
+
"declaration": {
|
|
1806
|
+
"name": "ZnButtonGroup",
|
|
1807
|
+
"module": "components/button-group/button-group.js"
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
]
|
|
1811
|
+
},
|
|
1647
1812
|
{
|
|
1648
1813
|
"kind": "javascript-module",
|
|
1649
1814
|
"path": "components/button-menu/button-menu.js",
|
|
@@ -1929,171 +2094,6 @@
|
|
|
1929
2094
|
}
|
|
1930
2095
|
]
|
|
1931
2096
|
},
|
|
1932
|
-
{
|
|
1933
|
-
"kind": "javascript-module",
|
|
1934
|
-
"path": "components/button-group/button-group.js",
|
|
1935
|
-
"declarations": [
|
|
1936
|
-
{
|
|
1937
|
-
"kind": "class",
|
|
1938
|
-
"description": "",
|
|
1939
|
-
"name": "ZnButtonGroup",
|
|
1940
|
-
"cssProperties": [
|
|
1941
|
-
{
|
|
1942
|
-
"description": "Use flex-grow to fill available space.",
|
|
1943
|
-
"name": "--grow"
|
|
1944
|
-
},
|
|
1945
|
-
{
|
|
1946
|
-
"description": "Justify content at the start of the flex space.",
|
|
1947
|
-
"name": "--start"
|
|
1948
|
-
}
|
|
1949
|
-
],
|
|
1950
|
-
"cssParts": [
|
|
1951
|
-
{
|
|
1952
|
-
"description": "The component's base wrapper.",
|
|
1953
|
-
"name": "base"
|
|
1954
|
-
}
|
|
1955
|
-
],
|
|
1956
|
-
"slots": [
|
|
1957
|
-
{
|
|
1958
|
-
"description": "The default slot.",
|
|
1959
|
-
"name": ""
|
|
1960
|
-
}
|
|
1961
|
-
],
|
|
1962
|
-
"members": [
|
|
1963
|
-
{
|
|
1964
|
-
"kind": "field",
|
|
1965
|
-
"name": "direction",
|
|
1966
|
-
"type": {
|
|
1967
|
-
"text": "'horizontal' | 'vertical'"
|
|
1968
|
-
},
|
|
1969
|
-
"default": "'horizontal'",
|
|
1970
|
-
"attribute": "direction"
|
|
1971
|
-
},
|
|
1972
|
-
{
|
|
1973
|
-
"kind": "field",
|
|
1974
|
-
"name": "grow",
|
|
1975
|
-
"type": {
|
|
1976
|
-
"text": "boolean"
|
|
1977
|
-
},
|
|
1978
|
-
"default": "false",
|
|
1979
|
-
"attribute": "grow"
|
|
1980
|
-
},
|
|
1981
|
-
{
|
|
1982
|
-
"kind": "field",
|
|
1983
|
-
"name": "wrap",
|
|
1984
|
-
"type": {
|
|
1985
|
-
"text": "boolean"
|
|
1986
|
-
},
|
|
1987
|
-
"default": "false",
|
|
1988
|
-
"attribute": "wrap"
|
|
1989
|
-
},
|
|
1990
|
-
{
|
|
1991
|
-
"kind": "field",
|
|
1992
|
-
"name": "start",
|
|
1993
|
-
"type": {
|
|
1994
|
-
"text": "boolean"
|
|
1995
|
-
},
|
|
1996
|
-
"default": "false",
|
|
1997
|
-
"attribute": "start"
|
|
1998
|
-
},
|
|
1999
|
-
{
|
|
2000
|
-
"kind": "field",
|
|
2001
|
-
"name": "gap",
|
|
2002
|
-
"type": {
|
|
2003
|
-
"text": "boolean"
|
|
2004
|
-
},
|
|
2005
|
-
"default": "false",
|
|
2006
|
-
"attribute": "gap"
|
|
2007
|
-
},
|
|
2008
|
-
{
|
|
2009
|
-
"kind": "field",
|
|
2010
|
-
"name": "defaultSlot",
|
|
2011
|
-
"type": {
|
|
2012
|
-
"text": "HTMLSlotElement"
|
|
2013
|
-
}
|
|
2014
|
-
},
|
|
2015
|
-
{
|
|
2016
|
-
"kind": "method",
|
|
2017
|
-
"name": "handleSlotChange",
|
|
2018
|
-
"privacy": "private"
|
|
2019
|
-
}
|
|
2020
|
-
],
|
|
2021
|
-
"events": [
|
|
2022
|
-
{
|
|
2023
|
-
"description": "Emitted as an example.",
|
|
2024
|
-
"name": "zn-event-name"
|
|
2025
|
-
}
|
|
2026
|
-
],
|
|
2027
|
-
"attributes": [
|
|
2028
|
-
{
|
|
2029
|
-
"name": "direction",
|
|
2030
|
-
"type": {
|
|
2031
|
-
"text": "'horizontal' | 'vertical'"
|
|
2032
|
-
},
|
|
2033
|
-
"default": "'horizontal'",
|
|
2034
|
-
"fieldName": "direction"
|
|
2035
|
-
},
|
|
2036
|
-
{
|
|
2037
|
-
"name": "grow",
|
|
2038
|
-
"type": {
|
|
2039
|
-
"text": "boolean"
|
|
2040
|
-
},
|
|
2041
|
-
"default": "false",
|
|
2042
|
-
"fieldName": "grow"
|
|
2043
|
-
},
|
|
2044
|
-
{
|
|
2045
|
-
"name": "wrap",
|
|
2046
|
-
"type": {
|
|
2047
|
-
"text": "boolean"
|
|
2048
|
-
},
|
|
2049
|
-
"default": "false",
|
|
2050
|
-
"fieldName": "wrap"
|
|
2051
|
-
},
|
|
2052
|
-
{
|
|
2053
|
-
"name": "start",
|
|
2054
|
-
"type": {
|
|
2055
|
-
"text": "boolean"
|
|
2056
|
-
},
|
|
2057
|
-
"default": "false",
|
|
2058
|
-
"fieldName": "start"
|
|
2059
|
-
},
|
|
2060
|
-
{
|
|
2061
|
-
"name": "gap",
|
|
2062
|
-
"type": {
|
|
2063
|
-
"text": "boolean"
|
|
2064
|
-
},
|
|
2065
|
-
"default": "false",
|
|
2066
|
-
"fieldName": "gap"
|
|
2067
|
-
}
|
|
2068
|
-
],
|
|
2069
|
-
"superclass": {
|
|
2070
|
-
"name": "ZincElement",
|
|
2071
|
-
"module": "/src/internal/zinc-element"
|
|
2072
|
-
},
|
|
2073
|
-
"summary": "Short summary of the component's intended use.",
|
|
2074
|
-
"tagNameWithoutPrefix": "button-group",
|
|
2075
|
-
"tagName": "zn-button-group",
|
|
2076
|
-
"customElement": true,
|
|
2077
|
-
"jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/button-group\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-example\n *\n * @event zn-event-name - Emitted as an example.\n *\n * @slot - The default slot.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --grow - Use flex-grow to fill available space.\n * @cssproperty --start - Justify content at the start of the flex space.\n */",
|
|
2078
|
-
"documentation": "https://zinc.style/components/button-group",
|
|
2079
|
-
"status": "experimental",
|
|
2080
|
-
"since": "1.0",
|
|
2081
|
-
"dependencies": [
|
|
2082
|
-
"zn-example"
|
|
2083
|
-
]
|
|
2084
|
-
}
|
|
2085
|
-
],
|
|
2086
|
-
"exports": [
|
|
2087
|
-
{
|
|
2088
|
-
"kind": "js",
|
|
2089
|
-
"name": "default",
|
|
2090
|
-
"declaration": {
|
|
2091
|
-
"name": "ZnButtonGroup",
|
|
2092
|
-
"module": "components/button-group/button-group.js"
|
|
2093
|
-
}
|
|
2094
|
-
}
|
|
2095
|
-
]
|
|
2096
|
-
},
|
|
2097
2097
|
{
|
|
2098
2098
|
"kind": "javascript-module",
|
|
2099
2099
|
"path": "components/chart/chart.js",
|
|
@@ -26867,7 +26867,7 @@
|
|
|
26867
26867
|
"type": {
|
|
26868
26868
|
"text": "Record<string, string>"
|
|
26869
26869
|
},
|
|
26870
|
-
"default": "{ 'en': '
|
|
26870
|
+
"default": "{ 'en': 'EN' }",
|
|
26871
26871
|
"attribute": "languages"
|
|
26872
26872
|
},
|
|
26873
26873
|
{
|
|
@@ -27002,7 +27002,7 @@
|
|
|
27002
27002
|
"type": {
|
|
27003
27003
|
"text": "Record<string, string>"
|
|
27004
27004
|
},
|
|
27005
|
-
"default": "{ 'en': '
|
|
27005
|
+
"default": "{ 'en': 'EN' }",
|
|
27006
27006
|
"fieldName": "languages"
|
|
27007
27007
|
},
|
|
27008
27008
|
{
|
|
@@ -27275,7 +27275,7 @@
|
|
|
27275
27275
|
"package": {
|
|
27276
27276
|
"name": "@kubex/zinc",
|
|
27277
27277
|
"description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
|
|
27278
|
-
"version": "1.0.
|
|
27278
|
+
"version": "1.0.24",
|
|
27279
27279
|
"author": "",
|
|
27280
27280
|
"license": "MIT"
|
|
27281
27281
|
}
|
|
@@ -212,6 +212,26 @@
|
|
|
212
212
|
}
|
|
213
213
|
]
|
|
214
214
|
},
|
|
215
|
+
{
|
|
216
|
+
"name": "zn-button-group",
|
|
217
|
+
"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\n### **CSS Properties:**\n - **--grow** - Use flex-grow to fill available space. _(default: undefined)_\n- **--start** - Justify content at the start of the flex space. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
218
|
+
"attributes": [
|
|
219
|
+
{
|
|
220
|
+
"name": "direction",
|
|
221
|
+
"values": [{ "name": "horizontal" }, { "name": "vertical" }]
|
|
222
|
+
},
|
|
223
|
+
{ "name": "grow", "values": [] },
|
|
224
|
+
{ "name": "wrap", "values": [] },
|
|
225
|
+
{ "name": "start", "values": [] },
|
|
226
|
+
{ "name": "gap", "values": [] }
|
|
227
|
+
],
|
|
228
|
+
"references": [
|
|
229
|
+
{
|
|
230
|
+
"name": "Documentation",
|
|
231
|
+
"url": "https://zinc.style/components/button-group"
|
|
232
|
+
}
|
|
233
|
+
]
|
|
234
|
+
},
|
|
215
235
|
{
|
|
216
236
|
"name": "zn-button-menu",
|
|
217
237
|
"description": "Automatically hides buttons in a menu when the screen is too small.\n---\n\n\n### **Slots:**\n - _default_ - The default slot.",
|
|
@@ -241,26 +261,6 @@
|
|
|
241
261
|
}
|
|
242
262
|
]
|
|
243
263
|
},
|
|
244
|
-
{
|
|
245
|
-
"name": "zn-button-group",
|
|
246
|
-
"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\n### **CSS Properties:**\n - **--grow** - Use flex-grow to fill available space. _(default: undefined)_\n- **--start** - Justify content at the start of the flex space. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
247
|
-
"attributes": [
|
|
248
|
-
{
|
|
249
|
-
"name": "direction",
|
|
250
|
-
"values": [{ "name": "horizontal" }, { "name": "vertical" }]
|
|
251
|
-
},
|
|
252
|
-
{ "name": "grow", "values": [] },
|
|
253
|
-
{ "name": "wrap", "values": [] },
|
|
254
|
-
{ "name": "start", "values": [] },
|
|
255
|
-
{ "name": "gap", "values": [] }
|
|
256
|
-
],
|
|
257
|
-
"references": [
|
|
258
|
-
{
|
|
259
|
-
"name": "Documentation",
|
|
260
|
-
"url": "https://zinc.style/components/button-group"
|
|
261
|
-
}
|
|
262
|
-
]
|
|
263
|
-
},
|
|
264
264
|
{
|
|
265
265
|
"name": "zn-chart",
|
|
266
266
|
"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.0.
|
|
4
|
+
"version": "1.0.24",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -395,52 +395,6 @@
|
|
|
395
395
|
]
|
|
396
396
|
}
|
|
397
397
|
},
|
|
398
|
-
{
|
|
399
|
-
"name": "zn-button-menu",
|
|
400
|
-
"description": "Automatically hides buttons in a menu when the screen is too small.\n---\n\n\n### **Slots:**\n - _default_ - The default slot.",
|
|
401
|
-
"doc-url": "",
|
|
402
|
-
"attributes": [
|
|
403
|
-
{ "name": "max-width", "value": { "type": "number" } },
|
|
404
|
-
{ "name": "containerWidth", "value": { "type": "number" } },
|
|
405
|
-
{ "name": "limit", "value": { "type": "number", "default": "-1" } },
|
|
406
|
-
{
|
|
407
|
-
"name": "max-level",
|
|
408
|
-
"value": { "type": "number", "default": "2" }
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
"name": "size",
|
|
412
|
-
"value": {
|
|
413
|
-
"type": "'content' | 'x-small' | 'small' | 'medium' | 'large'",
|
|
414
|
-
"default": "'medium'"
|
|
415
|
-
}
|
|
416
|
-
},
|
|
417
|
-
{
|
|
418
|
-
"name": "icon-size",
|
|
419
|
-
"value": { "type": "number", "default": "24" }
|
|
420
|
-
},
|
|
421
|
-
{ "name": "no-gap", "value": { "type": "boolean" } },
|
|
422
|
-
{ "name": "no-padding", "value": { "type": "boolean" } }
|
|
423
|
-
],
|
|
424
|
-
"slots": [{ "name": "", "description": "The default slot." }],
|
|
425
|
-
"events": [],
|
|
426
|
-
"js": {
|
|
427
|
-
"properties": [
|
|
428
|
-
{ "name": "maxWidth", "type": "number" },
|
|
429
|
-
{ "name": "containerWidth", "type": "number" },
|
|
430
|
-
{ "name": "limit", "type": "number" },
|
|
431
|
-
{ "name": "maxLevel", "type": "number" },
|
|
432
|
-
{
|
|
433
|
-
"name": "size",
|
|
434
|
-
"type": "'content' | 'x-small' | 'small' | 'medium' | 'large'"
|
|
435
|
-
},
|
|
436
|
-
{ "name": "iconSize", "type": "number" },
|
|
437
|
-
{ "name": "noGap", "type": "boolean" },
|
|
438
|
-
{ "name": "noPadding", "type": "boolean" },
|
|
439
|
-
{ "name": "handleResize" }
|
|
440
|
-
],
|
|
441
|
-
"events": []
|
|
442
|
-
}
|
|
443
|
-
},
|
|
444
398
|
{
|
|
445
399
|
"name": "zn-button-group",
|
|
446
400
|
"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\n### **CSS Properties:**\n - **--grow** - Use flex-grow to fill available space. _(default: undefined)_\n- **--start** - Justify content at the start of the flex space. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
@@ -491,6 +445,52 @@
|
|
|
491
445
|
]
|
|
492
446
|
}
|
|
493
447
|
},
|
|
448
|
+
{
|
|
449
|
+
"name": "zn-button-menu",
|
|
450
|
+
"description": "Automatically hides buttons in a menu when the screen is too small.\n---\n\n\n### **Slots:**\n - _default_ - The default slot.",
|
|
451
|
+
"doc-url": "",
|
|
452
|
+
"attributes": [
|
|
453
|
+
{ "name": "max-width", "value": { "type": "number" } },
|
|
454
|
+
{ "name": "containerWidth", "value": { "type": "number" } },
|
|
455
|
+
{ "name": "limit", "value": { "type": "number", "default": "-1" } },
|
|
456
|
+
{
|
|
457
|
+
"name": "max-level",
|
|
458
|
+
"value": { "type": "number", "default": "2" }
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"name": "size",
|
|
462
|
+
"value": {
|
|
463
|
+
"type": "'content' | 'x-small' | 'small' | 'medium' | 'large'",
|
|
464
|
+
"default": "'medium'"
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
"name": "icon-size",
|
|
469
|
+
"value": { "type": "number", "default": "24" }
|
|
470
|
+
},
|
|
471
|
+
{ "name": "no-gap", "value": { "type": "boolean" } },
|
|
472
|
+
{ "name": "no-padding", "value": { "type": "boolean" } }
|
|
473
|
+
],
|
|
474
|
+
"slots": [{ "name": "", "description": "The default slot." }],
|
|
475
|
+
"events": [],
|
|
476
|
+
"js": {
|
|
477
|
+
"properties": [
|
|
478
|
+
{ "name": "maxWidth", "type": "number" },
|
|
479
|
+
{ "name": "containerWidth", "type": "number" },
|
|
480
|
+
{ "name": "limit", "type": "number" },
|
|
481
|
+
{ "name": "maxLevel", "type": "number" },
|
|
482
|
+
{
|
|
483
|
+
"name": "size",
|
|
484
|
+
"type": "'content' | 'x-small' | 'small' | 'medium' | 'large'"
|
|
485
|
+
},
|
|
486
|
+
{ "name": "iconSize", "type": "number" },
|
|
487
|
+
{ "name": "noGap", "type": "boolean" },
|
|
488
|
+
{ "name": "noPadding", "type": "boolean" },
|
|
489
|
+
{ "name": "handleResize" }
|
|
490
|
+
],
|
|
491
|
+
"events": []
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
494
|
{
|
|
495
495
|
"name": "zn-chart",
|
|
496
496
|
"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.",
|
|
@@ -6998,7 +6998,7 @@
|
|
|
6998
6998
|
"name": "languages",
|
|
6999
6999
|
"value": {
|
|
7000
7000
|
"type": "Record<string, string>",
|
|
7001
|
-
"default": "{ 'en': '
|
|
7001
|
+
"default": "{ 'en': 'EN' }"
|
|
7002
7002
|
}
|
|
7003
7003
|
},
|
|
7004
7004
|
{
|
package/dist/zn.d.ts
CHANGED
|
@@ -6688,12 +6688,12 @@ declare module "components/audio-select/index" {
|
|
|
6688
6688
|
}
|
|
6689
6689
|
}
|
|
6690
6690
|
declare module "components/translations/translations.component" {
|
|
6691
|
+
import type { PropertyValues } from 'lit';
|
|
6692
|
+
import type { ZincFormControl } from "internal/zinc-element";
|
|
6691
6693
|
import ZincElement from "internal/zinc-element";
|
|
6692
6694
|
import ZnInlineEdit from "components/inline-edit/index";
|
|
6693
6695
|
import ZnInput from "components/input/index";
|
|
6694
6696
|
import ZnNavbar from "components/navbar/index";
|
|
6695
|
-
import type { PropertyValues } from 'lit';
|
|
6696
|
-
import type { ZincFormControl } from "internal/zinc-element";
|
|
6697
6697
|
export default class ZnTranslations extends ZincElement implements ZincFormControl {
|
|
6698
6698
|
static styles: import("lit").CSSResult;
|
|
6699
6699
|
static dependencies: {
|
package/dist/zn.min.js
CHANGED
|
@@ -1887,12 +1887,13 @@ rect.legend-mouseover-inactive,
|
|
|
1887
1887
|
}
|
|
1888
1888
|
</style>${d}`:d}};Ui.styles=Z(uA),y([_({attribute:"full-location"})],Ui.prototype,"fullLocation",2),y([_({attribute:"entity-id"})],Ui.prototype,"entityId",2),y([_({attribute:"entity-id-show",type:Boolean})],Ui.prototype,"entityIdShow",2),y([_({type:Boolean})],Ui.prototype,"transparent",2),y([_()],Ui.prototype,"caption",2),y([_()],Ui.prototype,"icon",2),y([_()],Ui.prototype,"description",2),y([_({type:Array})],Ui.prototype,"navigation",2),y([_({attribute:"full-width",type:Boolean})],Ui.prototype,"fullWidth",2),y([_({attribute:"previous-path"})],Ui.prototype,"previousPath",2),y([_({attribute:"previous-target"})],Ui.prototype,"previousTarget",2),y([He("navigation",{waitUntilFirstUpdate:!0})],Ui.prototype,"updateNav",1);var OU=Ui;Ui.define("zn-header");var pA=te`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:0 auto}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.navbar__container{display:flex;flex-direction:row;position:relative;justify-content:space-between}.navbar{margin:0;padding-left:var(--zn-spacing-medium)}.navbar--flush{padding:0}ul.navbar li{padding-top:0;font-size:var(--zn-font-size-medium);white-space:nowrap}:host([baseless]) .navbar__container{border-bottom:none}:host([stacked]){width:unset;height:100%;margin:0 0}:host([stacked]) .navbar__container{border-bottom:none;height:100%}:host([stacked]) ul.navbar.navbar--no-pad li{padding:0 !important}:host([stacked]) ul.navbar{padding:0;flex-direction:column;gap:0}:host([stacked]) ul.navbar li{border-bottom:1px solid rgb(var(--zn-border-color));padding:var(--zn-spacing-medium)}:host([stacked]) ul.navbar li.active:before,:host([stacked]) ul.navbar li.zn-tb-active:before{display:none}:host([stacked]) ul.navbar li.zn-tb-active{background-color:rgb(var(--zn-panel))}:host([stacked]) ul.navbar li:hover:before{left:0;right:0}:host([stacked]) ul.navbar--slim li{padding:var(--zn-spacing-small)}:host([stacked][slot=left]) ul.navbar--border{border-right:1px solid rgb(var(--zn-border-color))}:host([stacked][slot=right]) ul.navbar--border{border-left:1px solid rgb(var(--zn-border-color))}:host([panel]){background:rgb(var(--zn-panel))}:host([icon-bar]) ul.navbar{display:flex;flex-direction:row;gap:5px;padding:5px;border-radius:10px;margin:0;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));flex-basis:100%;min-height:50px}:host([icon-bar]) ul.navbar li{flex-direction:column;border-radius:6px;flex-basis:100%;padding:5px 10px}:host([icon-bar]) ul.navbar li:before{display:none !important}:host([icon-bar]) ul.navbar li.active,:host([icon-bar]) ul.navbar li.zn-tb-active{background:rgba(0,0,0,0.03);color:rgb(var(--zn-primary))}:host([icon-bar]) ul.navbar li:hover{color:rgb(var(--zn-primary))}:host([icon-bar]) .navbar__container{border-bottom:0}.navbar__container--stacked{display:inline}ul.navbar.navbar--stacked.navbar--icon-bar{flex-direction:column;padding:0;gap:0}ul.navbar.navbar--stacked.navbar--icon-bar li{border-radius:0;align-items:flex-start;padding:8px}:host(:not([stacked]):not([icon-bar])) ul.navbar{height:35px;align-self:end}:host([pad]) ul.navbar{padding:var(--zn-spacing-medium) var(--zn-spacing-medium) 0}:host{display:block;width:100%}:host .navbar__container{border-bottom:1px solid rgb(var(--zn-border-color))}:host ul.navbar{display:flex;flex-basis:fit-content;gap:30px;list-style:none}:host ul.navbar li.more{display:none}:host ul.navbar.has-hidden li.more{display:flex}:host ul.navbar li{-webkit-user-select:none;-moz-user-select:none;user-select:none;font-weight:500;padding:0 0 var(--zn-spacing-small);position:relative;display:flex;align-items:center;justify-content:center;gap:3px;cursor:pointer}:host ul.navbar li.hidden{visibility:hidden;position:absolute;pointer-events:none}:host ul.navbar li .closer{display:none}:host ul.navbar li zn-icon,:host ul.navbar li zn-tooltip{pointer-events:none}:host ul.navbar li#dropdown-item{flex-grow:1;justify-content:flex-start;padding:0}:host ul.navbar li#dropdown-item zn-dropdown{height:100%}:host ul.navbar li#dropdown-item zn-dropdown zn-button{height:100%}:host ul.navbar li::before{content:"";left:50%;right:50%;bottom:0;position:absolute;background-color:rgb(var(--zn-primary));transition:all 300ms ease-in-out;height:2px}:host ul.navbar li:hover:before:not(#dropdown-item){left:-2px;right:-2px}:host ul.navbar li.active,:host ul.navbar li.zn-tb-active{color:rgb(var(--zn-primary));font-weight:var(--zn-font-weight-semibold)}:host ul.navbar li.active::before,:host ul.navbar li.zn-tb-active::before{left:calc(var(--zn-spacing-medium) * -1);right:calc(var(--zn-spacing-medium) * -1)}:host ul.navbar li[closable] .closer{display:block;margin-left:10px;pointer-events:all;opacity:0.8}:host ul.navbar li[closable] .closer:hover{opacity:1}:host([small]){width:unset}:host([small]) ul.navbar{padding:0;gap:0;border-radius:5px}:host([small]) ul.navbar li{border-left:1px solid rgb(var(--zn-border-color));border-radius:0}:host([small]) ul.navbar li:first-of-type{border-left:none}button[popovertarget]{display:flex;justify-content:center;align-items:center}:host([highlight]){margin:0 0}:host([highlight]) .navbar__container{border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(var(--zn-border-color));height:35px}:host([highlight]):host([dropdown]) li{border-bottom:0}:host([highlight]) ul.navbar{gap:0;overflow:initial}:host([highlight]) ul.navbar li{padding-left:var(--zn-spacing-medium);padding-right:var(--zn-spacing-medium);padding-top:var(--zn-spacing-small);position:relative}:host([highlight]) ul.navbar li:hover::before,:host([highlight]) ul.navbar li::before:not(.active):not(#dropdown-item){display:none}:host([highlight]) ul.navbar li.active{border-right:1px solid rgb(var(--zn-border-color))}:host([highlight]) ul.navbar li.active::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;background-color:rgb(var(--zn-panel))}:host([highlight]) .active{background-color:rgb(var(--zn-panel))}:host([dropdown]) ul.navbar li{border-bottom:1px solid rgb(var(--zn-border-color));border-right:1px solid rgb(var(--zn-border-color));border-right:1px solid rgb(var(--zn-border-color));border-left:0}:host([dropdown]) ul.navbar li.active{border-bottom:0}:host([dropdown]) ul.navbar li:before{display:none}:host([dropdown]) ul.navbar li#dropdown-item{border-right:0}.expandables{flex-grow:0;flex-shrink:1;margin:0 var(--zn-spacing-medium);display:flex;align-items:center;width:-moz-fit-content;width:fit-content;height:100%;gap:var(--zn-spacing-2x-small)}.expandables:empty{display:none}:host ul.navbar li.more zn-button::part(base){padding-left:0;padding-right:0}:host ul.navbar li.more zn-button::part(base):hover{background-color:transparent}:host ul.navbar li.more ul#extended-menu{box-shadow:var(--zn-shadow-medium);background:rgb(var(--zn-border-color));display:flex;flex-direction:column;gap:1px;height:auto;width:-moz-fit-content;width:fit-content;margin:0;padding:1px}:host ul.navbar li.more ul#extended-menu li{justify-content:left;background:rgb(var(--zn-panel));color:rgb(var(--zn-text));padding:var(--zn-spacing-small)}:host ul.navbar li.more ul#extended-menu li.active::before,:host ul.navbar li.more ul#extended-menu li.zn-tb-active::before{left:0;right:0}`;var Ti=class extends J{constructor(){super(...arguments);this.navigation=[];this.flush=!1;this.dropdown=[];this.manualAddItems=!1;this.isolated=!1;this._openedTabs=[];this.resizeObserver=null;this._navItems=null;this._expandable=null;this._extendedMenu=null;this._navItemsGap=0;this._expandableMargin=0;this._totalItemWidth=0;this.handleResize=()=>{var d,f,h,p,m,v;if(this._totalItemWidth===0||this._extendedMenu===null||this.iconBar||this.stacked)return;let i=this._expandableMargin+(((d=this._expandable)==null?void 0:d.offsetWidth)||0),n=(((f=this._navItems)==null?void 0:f.querySelectorAll("li.hidden").length)||0)>0;if(!n&&i+this._totalItemWidth<=this.offsetWidth){(h=this._navItems)==null||h.classList.toggle("has-hidden",!1);return}let r=this.parentElement,a=this.offsetWidth||(r==null?void 0:r.offsetWidth)||0;for(;a===0&&(r!=null&&r.parentElement);)r=r.parentElement,a=r.offsetWidth||0;a-=i;let s=0,l=!1,c=((p=this._navItems)==null?void 0:p.querySelectorAll(":scope > li"))||[];this._extendedMenu.innerHTML="";for(let b of c){if(b.classList.contains("more")||!(b instanceof HTMLElement))continue;let x=b.offsetWidth+this._navItemsGap+5;if(l||x+s>a){let k=b.cloneNode(!0);k.classList.remove("hidden"),k.addEventListener("click",()=>{var z,E;b.click(),(E=((z=this.shadowRoot)==null?void 0:z.querySelector("#extended-dropdown"))||null)==null||E.hide()}),(m=this._extendedMenu)==null||m.appendChild(k),b.classList.add("hidden"),n=!0,l=!0}else b.classList.remove("hidden"),s+=x}(v=this._navItems)==null||v.classList.toggle("has-hidden",n&&l)};this.handleClick=i=>{let n=i.composedPath(),r=this.isolated?"data-tab":"tab",a=n.find(s=>s instanceof HTMLElement&&s.tagName==="LI"&&(s.hasAttribute(r)||s.hasAttribute("tab-uri")));a&&(i.stopPropagation(),this.emit("zn-select",{detail:{item:a}}))}}appendItem(i){this._appended=this._appended||[],this._appended.push(i)}connectedCallback(){super.connectedCallback(),this._preItems=this.querySelectorAll("li:not([suffix])"),this._postItems=this.querySelectorAll("li[suffix]"),this._expanding=this.querySelectorAll("zn-expanding-action"),this.resizeObserver=new ResizeObserver(this.handleResize.bind(this)),this.resizeObserver.observe(this)}addItem(i){var s,l;let n=i.getAttribute("tab-uri");if(typeof n!="string"||this._openedTabs.includes(n))return;this._openedTabs.push(n);let r=(s=this.shadowRoot)==null?void 0:s.querySelector("ul"),a=(l=this.shadowRoot)==null?void 0:l.querySelector('[id="dropdown-item"]');a.querySelector("zn-dropdown").hide(),a?r==null||r.insertBefore(i,a):r==null||r.appendChild(i)}firstUpdated(i){var n,r,a,s;if(super.firstUpdated(i),this._extendedMenu=((n=this.shadowRoot)==null?void 0:n.querySelector("#extended-menu"))||null,this._expandable=((r=this.shadowRoot)==null?void 0:r.querySelector(".navbar__container > div.expandables"))||null,this._expandable){let l=getComputedStyle(this._expandable);this._expandableMargin=parseInt(l.marginLeft)+parseInt(l.marginRight)}if(this._navItems=((a=this.shadowRoot)==null?void 0:a.querySelector(".navbar__container > ul"))||null,this._navItems){let l=getComputedStyle(this._navItems);this._navItemsGap=parseInt(l.columnGap)}if(setTimeout(()=>{var c;let l=((c=this._navItems)==null?void 0:c.querySelectorAll("li"))||[];for(let d of l)this._totalItemWidth+=d.offsetWidth+this._navItemsGap;this.handleResize()},100),this.dropdown.length>0){let l=(s=this.shadowRoot)==null?void 0:s.querySelector("zn-menu");l&&l.addEventListener("zn-menu-select",c=>{if(this.manualAddItems)return;if(c.detail.element.hasAttribute("data-path")){let f=document.createElement("li");f.setAttribute("tab-uri",c.detail.element.getAttribute("data-path")),f.innerText=c.detail.value,this.addItem(f),setTimeout(()=>{f.click()},300)}})}}showMore(){}render(){var n,r,a;this.navigation||(this.navigation=[]);let i=((n=this.navigation)==null?void 0:n.length)+((r=this._preItems)==null?void 0:r.length)+((a=this._postItems)==null?void 0:a.length);return this._expanding.length===0&&(i===0||i<2&&this.hideOne)&&(this.style.display="none"),T`
|
|
1889
1889
|
<div class="${ce({navbar__container:!0,"navbar__container--stacked":this.stacked,"navbar__container--icon-bar":this.iconBar})}">
|
|
1890
|
-
<ul @click="${this.handleClick}" class="${ce({navbar:!0,"navbar--slim":this.slim,"navbar--border":this.border,"navbar--flush":this.flush,"navbar--no-pad":this.noPad,"navbar--stacked":this.stacked,"navbar--icon-bar":this.iconBar})}">
|
|
1890
|
+
<ul @click="${this.handleClick}" part="navbar" class="${ce({navbar:!0,"navbar--slim":this.slim,"navbar--border":this.border,"navbar--flush":this.flush,"navbar--no-pad":this.noPad,"navbar--stacked":this.stacked,"navbar--icon-bar":this.iconBar})}">
|
|
1891
1891
|
${this._preItems}
|
|
1892
1892
|
${this.navigation.map(s=>{let l=T`${s.title}`;return s.icon!=null&&s.icon!=""&&(l=T`
|
|
1893
1893
|
<zn-icon src="${s.icon}"></zn-icon>${l}`),s.path!=null?T`
|
|
1894
|
-
<li class="${ce({active:s.active})}" tab-uri="${s.path}">${l}</li>`:T`
|
|
1894
|
+
<li class="${ce({active:s.active})}" part="navbar-item" tab-uri="${s.path}">${l}</li>`:T`
|
|
1895
1895
|
<li class="${ce({active:s.active})}"
|
|
1896
|
+
part="navbar-item"
|
|
1896
1897
|
tab="${ke(this.isolated?void 0:s.tab)}"
|
|
1897
1898
|
data-tab="${ke(this.isolated?s.tab:void 0)}">
|
|
1898
1899
|
${l}
|
|
@@ -1909,7 +1910,7 @@ rect.legend-mouseover-inactive,
|
|
|
1909
1910
|
${this.dropdown&&this.dropdown.length>0?T`
|
|
1910
1911
|
<li id="dropdown-item">
|
|
1911
1912
|
<zn-dropdown>
|
|
1912
|
-
<zn-button slot="trigger" color="secondary" square grow>
|
|
1913
|
+
<zn-button slot="trigger" part="button" exportparts="base:button__base" color="secondary" square grow>
|
|
1913
1914
|
<zn-icon src="add" size="18"></zn-icon>
|
|
1914
1915
|
</zn-button>
|
|
1915
1916
|
<zn-menu actions="${JSON.stringify(this.dropdown)}"></zn-menu>
|
|
@@ -4314,7 +4315,7 @@ button {
|
|
|
4314
4315
|
<slot></slot>
|
|
4315
4316
|
</div>
|
|
4316
4317
|
</zn-cols>
|
|
4317
|
-
</fieldset>`}};Sa.styles=Z(KL),y([_()],Sa.prototype,"label",2),y([_({attribute:"label-tooltip"})],Sa.prototype,"labelTooltip",2),y([_({attribute:"help-text"})],Sa.prototype,"helpText",2);var Nre=Sa;Sa.define("zn-form-group");var JL=te`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:0 auto}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.form-control-input{margin:var(--zn-spacing-2x-small) 3px 3px}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control--has-label .form-control__label{display:inline-block;color:var(--zn-input-label-color);font-weight:var(--zn-font-weight-semibold);margin-bottom:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--zn-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control__label{font-size:var(--zn-input-label-font-size-large)}:host([required]) .form-control--has-label .form-control__label::after{content:var(--zn-input-required-content);margin-inline-start:var(--zn-input-required-content-offset);color:var(--zn-input-required-content-color)}.form-control--has-label.form-control--radio-group .form-control__label,.form-control--has-label.form-control--checkbox-group .form-control__label{margin-bottom:0}.form-control--has-label.form-control--has-label-tooltip .form-control__label{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--small .form-control__label{font-size:var(--zn-input-label-font-size-small)}.form-control--label-tooltip{color:var(--zn-color-neutral-700);font-size:var(--zn-font-size-small)}.form-control--label-tooltip zn-icon{--icon-color:var(--zn-color-neutral-700);--icon-size:var(--zn-font-size-small)}.form-control--has-label.form-control--has-context-note{display:flex;justify-content:space-between;flex-wrap:wrap}.form-control__label-context-note{color:var(--zn-input-help-text-color);font-size:var(--zn-font-size-small);margin-bottom:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--has-context-note .form-control-input{width:100%}.form-control--has-help-text .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{display:block;color:var(--zn-input-help-text-color);margin-top:var(--zn-spacing-x-small)}.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{margin-top:0.375rem}.radio--has-selected-content .radio__selected-content,.checkbox--has-selected-content .checkbox__selected-content{display:block;margin-top:var(--zn-spacing-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--zn-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{font-size:var(--zn-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--zn-input-help-text-font-size-large)}.form-control--has-help-text.form-control--radio-group .form-control__help-text,.form-control--has-help-text.form-control--checkbox-group .form-control__help-text{margin-top:var(--zn-spacing-medium)}.form-control--has-help-text .switch .form-control__help-text{margin-top:var(--zn-spacing-3x-small)}.form-control--checkbox-contained-wrapper{height:100%}:host{display:block}.input-group{display:flex;flex-wrap:nowrap;align-items:center;width:100%}::slotted([data-zn-input-group__input]){margin-inline-end:-1px;position:relative;z-index:1}::slotted([data-zn-input-group__input]:focus-within){z-index:2}::slotted([data-zn-input-group__input--first]){--zn-input-border-radius-x-small:var(--zn-border-radius-medium) 0 0 var(--zn-border-radius-medium);--zn-input-border-radius-small:var(--zn-border-radius-medium) 0 0 var(--zn-border-radius-medium);--zn-input-border-radius-medium:var(--zn-border-radius-medium) 0 0 var(--zn-border-radius-medium);--zn-input-border-radius-large:var(--zn-border-radius-medium) 0 0 var(--zn-border-radius-medium)}::slotted([data-zn-input-group__input--inner]){--zn-input-border-radius-x-small:0;--zn-input-border-radius-small:0;--zn-input-border-radius-medium:0;--zn-input-border-radius-large:0}::slotted([data-zn-input-group__input--last]){--zn-input-border-radius-x-small:0 var(--zn-border-radius-medium) var(--zn-border-radius-medium) 0;--zn-input-border-radius-small:0 var(--zn-border-radius-medium) var(--zn-border-radius-medium) 0;--zn-input-border-radius-medium:0 var(--zn-border-radius-medium) var(--zn-border-radius-medium) 0;--zn-input-border-radius-large:0 var(--zn-border-radius-medium) var(--zn-border-radius-medium) 0;margin-inline-end:0}::slotted(zn-button[data-zn-input-group__input])::part(base){border-radius:0}::slotted(zn-button[data-zn-input-group__input--first])::part(base){border-start-start-radius:var(--zn-border-radius-medium);border-end-start-radius:var(--zn-border-radius-medium)}::slotted(zn-button[data-zn-input-group__input--last])::part(base){border-start-end-radius:var(--zn-border-radius-medium);border-end-end-radius:var(--zn-border-radius-medium)}`;var Ms=class extends J{constructor(){super(...arguments);this.hasSlotController=new Ue(this,"label");this.label=""}handleSlotChange(){let i=[...this.defaultSlot.assignedElements({flatten:!0})],n=["ZN-INPUT","ZN-SELECT","ZN-BUTTON"],r=i.filter(a=>n.includes(a.tagName));r.forEach(a=>{let s=r.indexOf(a);a.toggleAttribute("data-zn-input-group__input",!0),a.toggleAttribute("data-zn-input-group__input--first",s===0),a.toggleAttribute("data-zn-input-group__input--inner",s>0&&s<r.length-1),a.toggleAttribute("data-zn-input-group__input--last",s===r.length-1)})}render(){let i=this.hasSlotController.test("label"),n=this.label?!0:i;return T`
|
|
4318
|
+
</fieldset>`}};Sa.styles=Z(KL),y([_()],Sa.prototype,"label",2),y([_({attribute:"label-tooltip"})],Sa.prototype,"labelTooltip",2),y([_({attribute:"help-text"})],Sa.prototype,"helpText",2);var Nre=Sa;Sa.define("zn-form-group");var JL=te`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:0 auto}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.form-control-input{margin:var(--zn-spacing-2x-small) 3px 3px}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control--has-label .form-control__label{display:inline-block;color:var(--zn-input-label-color);font-weight:var(--zn-font-weight-semibold);margin-bottom:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--zn-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control__label{font-size:var(--zn-input-label-font-size-large)}:host([required]) .form-control--has-label .form-control__label::after{content:var(--zn-input-required-content);margin-inline-start:var(--zn-input-required-content-offset);color:var(--zn-input-required-content-color)}.form-control--has-label.form-control--radio-group .form-control__label,.form-control--has-label.form-control--checkbox-group .form-control__label{margin-bottom:0}.form-control--has-label.form-control--has-label-tooltip .form-control__label{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--small .form-control__label{font-size:var(--zn-input-label-font-size-small)}.form-control--label-tooltip{color:var(--zn-color-neutral-700);font-size:var(--zn-font-size-small)}.form-control--label-tooltip zn-icon{--icon-color:var(--zn-color-neutral-700);--icon-size:var(--zn-font-size-small)}.form-control--has-label.form-control--has-context-note{display:flex;justify-content:space-between;flex-wrap:wrap}.form-control__label-context-note{color:var(--zn-input-help-text-color);font-size:var(--zn-font-size-small);margin-bottom:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--has-context-note .form-control-input{width:100%}.form-control--has-help-text .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{display:block;color:var(--zn-input-help-text-color);margin-top:var(--zn-spacing-x-small)}.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{margin-top:0.375rem}.radio--has-selected-content .radio__selected-content,.checkbox--has-selected-content .checkbox__selected-content{display:block;margin-top:var(--zn-spacing-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--zn-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{font-size:var(--zn-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--zn-input-help-text-font-size-large)}.form-control--has-help-text.form-control--radio-group .form-control__help-text,.form-control--has-help-text.form-control--checkbox-group .form-control__help-text{margin-top:var(--zn-spacing-medium)}.form-control--has-help-text .switch .form-control__help-text{margin-top:var(--zn-spacing-3x-small)}.form-control--checkbox-contained-wrapper{height:100%}:host{display:block}.input-group{display:flex;flex-wrap:nowrap;align-items:center;width:100%}::slotted([data-zn-input-group__input]){margin-inline-end:-1px;position:relative;z-index:1;flex:1}::slotted([data-zn-input-group__input]:focus-within){z-index:2}::slotted([data-zn-input-group__input--first]){--zn-input-border-radius-x-small:var(--zn-border-radius-medium) 0 0 var(--zn-border-radius-medium);--zn-input-border-radius-small:var(--zn-border-radius-medium) 0 0 var(--zn-border-radius-medium);--zn-input-border-radius-medium:var(--zn-border-radius-medium) 0 0 var(--zn-border-radius-medium);--zn-input-border-radius-large:var(--zn-border-radius-medium) 0 0 var(--zn-border-radius-medium)}::slotted([data-zn-input-group__input--inner]){--zn-input-border-radius-x-small:0;--zn-input-border-radius-small:0;--zn-input-border-radius-medium:0;--zn-input-border-radius-large:0}::slotted([data-zn-input-group__input--last]){--zn-input-border-radius-x-small:0 var(--zn-border-radius-medium) var(--zn-border-radius-medium) 0;--zn-input-border-radius-small:0 var(--zn-border-radius-medium) var(--zn-border-radius-medium) 0;--zn-input-border-radius-medium:0 var(--zn-border-radius-medium) var(--zn-border-radius-medium) 0;--zn-input-border-radius-large:0 var(--zn-border-radius-medium) var(--zn-border-radius-medium) 0;margin-inline-end:0}::slotted(zn-button[data-zn-input-group__input])::part(base){border-radius:0}::slotted(zn-button[data-zn-input-group__input--first])::part(base){border-start-start-radius:var(--zn-border-radius-medium);border-end-start-radius:var(--zn-border-radius-medium)}::slotted(zn-button[data-zn-input-group__input--last])::part(base){border-start-end-radius:var(--zn-border-radius-medium);border-end-end-radius:var(--zn-border-radius-medium)}`;var Ms=class extends J{constructor(){super(...arguments);this.hasSlotController=new Ue(this,"label");this.label=""}handleSlotChange(){let i=[...this.defaultSlot.assignedElements({flatten:!0})],n=["ZN-INPUT","ZN-SELECT","ZN-BUTTON"],r=i.filter(a=>n.includes(a.tagName));r.forEach(a=>{let s=r.indexOf(a);a.toggleAttribute("data-zn-input-group__input",!0),a.toggleAttribute("data-zn-input-group__input--first",s===0),a.toggleAttribute("data-zn-input-group__input--inner",s>0&&s<r.length-1),a.toggleAttribute("data-zn-input-group__input--last",s===r.length-1)})}render(){let i=this.hasSlotController.test("label"),n=this.label?!0:i;return T`
|
|
4318
4319
|
<div part="form-control"
|
|
4319
4320
|
class="${ce({"form-control":!0,"form-control--has-label":n})}">
|
|
4320
4321
|
|
|
@@ -5000,7 +5001,7 @@ button {
|
|
|
5000
5001
|
<zn-option value="${i.url}">${i.name}</zn-option>
|
|
5001
5002
|
`)}
|
|
5002
5003
|
</zn-select>
|
|
5003
|
-
`}};_o.styles=Z(U7),y([We()],_o.prototype,"_isPlaying",2),y([_()],_o.prototype,"value",2),y([_()],_o.prototype,"label",2),y([_()],_o.prototype,"placeholder",2),y([_({type:Object})],_o.prototype,"files",2);var zoe=_o;_o.define("zn-audio-select");var G7=te`.form-control-input{margin:var(--zn-spacing-2x-small) 3px 3px}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control--has-label .form-control__label{display:inline-block;color:var(--zn-input-label-color);font-weight:var(--zn-font-weight-semibold);margin-bottom:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--zn-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control__label{font-size:var(--zn-input-label-font-size-large)}:host([required]) .form-control--has-label .form-control__label::after{content:var(--zn-input-required-content);margin-inline-start:var(--zn-input-required-content-offset);color:var(--zn-input-required-content-color)}.form-control--has-label.form-control--radio-group .form-control__label,.form-control--has-label.form-control--checkbox-group .form-control__label{margin-bottom:0}.form-control--has-label.form-control--has-label-tooltip .form-control__label{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--small .form-control__label{font-size:var(--zn-input-label-font-size-small)}.form-control--label-tooltip{color:var(--zn-color-neutral-700);font-size:var(--zn-font-size-small)}.form-control--label-tooltip zn-icon{--icon-color:var(--zn-color-neutral-700);--icon-size:var(--zn-font-size-small)}.form-control--has-label.form-control--has-context-note{display:flex;justify-content:space-between;flex-wrap:wrap}.form-control__label-context-note{color:var(--zn-input-help-text-color);font-size:var(--zn-font-size-small);margin-bottom:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--has-context-note .form-control-input{width:100%}.form-control--has-help-text .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{display:block;color:var(--zn-input-help-text-color);margin-top:var(--zn-spacing-x-small)}.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{margin-top:0.375rem}.radio--has-selected-content .radio__selected-content,.checkbox--has-selected-content .checkbox__selected-content{display:block;margin-top:var(--zn-spacing-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--zn-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{font-size:var(--zn-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--zn-input-help-text-font-size-large)}.form-control--has-help-text.form-control--radio-group .form-control__help-text,.form-control--has-help-text.form-control--checkbox-group .form-control__help-text{margin-top:var(--zn-spacing-medium)}.form-control--has-help-text .switch .form-control__help-text{margin-top:var(--zn-spacing-3x-small)}.form-control--checkbox-contained-wrapper{height:100%}:host{display:block}.translations{display:flex;flex-direction:column;padding:0 var(--zn-spacing-medium);gap:var(--zn-spacing-small)}.input-container{padding:var(--zn-spacing-small) 0}`;var xn=class extends J{constructor(){super(...arguments);this.formControlController=new rt(this);this.hasSlotController=new Ue(this,"label");this.name="";this.value='{"en":""}';this.label="";this.disabled=!1;this.required=!1;this.flush=!1;this.languages={en:"
|
|
5004
|
+
`}};_o.styles=Z(U7),y([We()],_o.prototype,"_isPlaying",2),y([_()],_o.prototype,"value",2),y([_()],_o.prototype,"label",2),y([_()],_o.prototype,"placeholder",2),y([_({type:Object})],_o.prototype,"files",2);var zoe=_o;_o.define("zn-audio-select");var G7=te`.form-control-input{margin:var(--zn-spacing-2x-small) 3px 3px}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control--has-label .form-control__label{display:inline-block;color:var(--zn-input-label-color);font-weight:var(--zn-font-weight-semibold);margin-bottom:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--zn-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control__label{font-size:var(--zn-input-label-font-size-large)}:host([required]) .form-control--has-label .form-control__label::after{content:var(--zn-input-required-content);margin-inline-start:var(--zn-input-required-content-offset);color:var(--zn-input-required-content-color)}.form-control--has-label.form-control--radio-group .form-control__label,.form-control--has-label.form-control--checkbox-group .form-control__label{margin-bottom:0}.form-control--has-label.form-control--has-label-tooltip .form-control__label{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--small .form-control__label{font-size:var(--zn-input-label-font-size-small)}.form-control--label-tooltip{color:var(--zn-color-neutral-700);font-size:var(--zn-font-size-small)}.form-control--label-tooltip zn-icon{--icon-color:var(--zn-color-neutral-700);--icon-size:var(--zn-font-size-small)}.form-control--has-label.form-control--has-context-note{display:flex;justify-content:space-between;flex-wrap:wrap}.form-control__label-context-note{color:var(--zn-input-help-text-color);font-size:var(--zn-font-size-small);margin-bottom:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--has-context-note .form-control-input{width:100%}.form-control--has-help-text .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{display:block;color:var(--zn-input-help-text-color);margin-top:var(--zn-spacing-x-small)}.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{margin-top:0.375rem}.radio--has-selected-content .radio__selected-content,.checkbox--has-selected-content .checkbox__selected-content{display:block;margin-top:var(--zn-spacing-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--zn-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{font-size:var(--zn-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--zn-input-help-text-font-size-large)}.form-control--has-help-text.form-control--radio-group .form-control__help-text,.form-control--has-help-text.form-control--checkbox-group .form-control__help-text{margin-top:var(--zn-spacing-medium)}.form-control--has-help-text .switch .form-control__help-text{margin-top:var(--zn-spacing-3x-small)}.form-control--checkbox-contained-wrapper{height:100%}:host{display:block}.translations{display:flex;flex-direction:column;padding:0 var(--zn-spacing-medium);gap:var(--zn-spacing-3x-small)}.input-container{padding:var(--zn-spacing-small) 0}.form-control__label{margin-bottom:0 !important}zn-navbar{overflow:hidden;margin-top:var(--zn-spacing-x-small)}zn-navbar::part(navbar){padding:0;gap:15px}zn-navbar::part(navbar-item){font-size:var(--zn-font-size-small);--zn-spacing-medium:7px}`;var xn=class extends J{constructor(){super(...arguments);this.formControlController=new rt(this);this.hasSlotController=new Ue(this,"label");this.name="";this.value='{"en":""}';this.label="";this.disabled=!1;this.required=!1;this.flush=!1;this.languages={en:"EN"};this.values={};this._activeLanguage="en";this.handleLanguageAdd=i=>{let r=i.detail.element.getAttribute("data-path");r&&(this.values=et(Ce({},this.values),{[r]:""}),this._activeLanguage=r,this.updateValue())};this.handleNavbarClick=i=>{i.stopPropagation();let n=i.detail.item;if(n){let r=n.getAttribute("tab")||n.getAttribute("data-tab");r&&(this._activeLanguage=r,this.requestUpdate())}};this.handleValueUpdate=i=>{let n=i.target;if(this._activeLanguage){let r=n.value;r!==this.values[this._activeLanguage]&&(this.values=et(Ce({},this.values),{[this._activeLanguage]:r}),this.updateValue())}};this.handleKeyDown=i=>{if(i.key==="Enter"){if(i.target instanceof Tb)return;!(i.altKey||i.ctrlKey||i.metaKey||i.shiftKey)&&!i.defaultPrevented&&!i.isComposing&&this.formControlController.submit()}};this.handleSubmit=()=>{this.formControlController.submit()}}get validity(){return _n}get validationMessage(){return""}checkValidity(){return!0}getForm(){return this.formControlController.getForm()}reportValidity(){return!0}setCustomValidity(){}firstUpdated(){this.formControlController.updateValidity()}willUpdate(i){let n=i.has("value"),r=i.has("values");if(n&&r){let a=this.value==='{"en":""}',s=Object.keys(this.values).length===0;a&&!s?n=!1:!a&&s?r=!1:this.hasAttribute("values")&&!this.hasAttribute("value")?n=!1:this.hasAttribute("value")&&!this.hasAttribute("values")&&(r=!1)}if(n)try{let a=JSON.parse(this.value||"{}");JSON.stringify(a)!==JSON.stringify(this.values)&&(this.values=a)}catch(a){}if(r&&(this.value=JSON.stringify(this.values),!this._activeLanguage||!Object.prototype.hasOwnProperty.call(this.values,this._activeLanguage)&&this._activeLanguage!=="en")){let a=Object.keys(this.values);a.length>0?this._activeLanguage=a[0]:this._activeLanguage="en"}}updateValue(){this.value=JSON.stringify(this.values),this.emit("zn-change"),this.emit("zn-input")}render(){let i=Object.entries(this.languages).filter(([c])=>c!=="en"&&!Object.prototype.hasOwnProperty.call(this.values,c)).map(([c,d])=>({title:d,type:"dropdown",path:c})),n=Object.keys(this.values);n.includes("en")||n.unshift("en");let r=n.map(c=>({title:c.toUpperCase(),active:c===this._activeLanguage,tab:c})),a=this.values[this._activeLanguage],s=this.hasSlotController.test("label"),l=this.label?!0:s;return T`
|
|
5004
5005
|
<div part="form-control"
|
|
5005
5006
|
class="${ce({translations:!0,"form-control":!0,"form-control--medium":!0,"form-control--has-label":l})}"
|
|
5006
5007
|
@keydown="${this.handleKeyDown}">
|
package/package.json
CHANGED
|
@@ -52,7 +52,7 @@ export default class ZnItem extends ZincElement {
|
|
|
52
52
|
@property({type: Boolean, attribute: 'align-end'}) alignEnd: boolean;
|
|
53
53
|
|
|
54
54
|
// align items in the center
|
|
55
|
-
@property({type: Boolean, attribute: 'align-center'})
|
|
55
|
+
@property({type: Boolean, attribute: 'align-center'}) alignCenter: boolean;
|
|
56
56
|
|
|
57
57
|
connectedCallback() {
|
|
58
58
|
super.connectedCallback();
|
|
@@ -224,7 +224,7 @@ export default class ZnNavbar extends ZincElement {
|
|
|
224
224
|
'navbar__container--stacked': this.stacked,
|
|
225
225
|
'navbar__container--icon-bar': this.iconBar
|
|
226
226
|
})}">
|
|
227
|
-
<ul @click="${this.handleClick}" class="${classMap({
|
|
227
|
+
<ul @click="${this.handleClick}" part="navbar" class="${classMap({
|
|
228
228
|
'navbar': true,
|
|
229
229
|
'navbar--slim': this.slim,
|
|
230
230
|
'navbar--border': this.border,
|
|
@@ -242,10 +242,11 @@ export default class ZnNavbar extends ZincElement {
|
|
|
242
242
|
}
|
|
243
243
|
if (item.path != undefined) {
|
|
244
244
|
return html`
|
|
245
|
-
<li class="${classMap({'active': item.active})}" tab-uri="${item.path}">${content}</li>`;
|
|
245
|
+
<li class="${classMap({'active': item.active})}" part="navbar-item" tab-uri="${item.path}">${content}</li>`;
|
|
246
246
|
}
|
|
247
247
|
return html`
|
|
248
|
-
<li class="${classMap({'active': item.active})}"
|
|
248
|
+
<li class="${classMap({ 'active': item.active })}"
|
|
249
|
+
part="navbar-item"
|
|
249
250
|
tab="${ifDefined(!this.isolated ? item.tab : undefined)}"
|
|
250
251
|
data-tab="${ifDefined(this.isolated ? item.tab : undefined)}">
|
|
251
252
|
${content}
|
|
@@ -263,7 +264,7 @@ export default class ZnNavbar extends ZincElement {
|
|
|
263
264
|
${this.dropdown && this.dropdown.length > 0 ? html`
|
|
264
265
|
<li id="dropdown-item">
|
|
265
266
|
<zn-dropdown>
|
|
266
|
-
<zn-button slot="trigger" color="secondary" square grow>
|
|
267
|
+
<zn-button slot="trigger" part="button" exportparts="base:button__base" color="secondary" square grow>
|
|
267
268
|
<zn-icon src="add" size="18"></zn-icon>
|
|
268
269
|
</zn-button>
|
|
269
270
|
<zn-menu actions="${JSON.stringify(this.dropdown)}"></zn-menu>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {classMap} from 'lit/directives/class-map.js';
|
|
2
|
-
import {FormControlController, validValidityState} from '../../internal/form';
|
|
3
|
-
import {HasSlotController} from '../../internal/slot';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
2
|
+
import { FormControlController, validValidityState } from '../../internal/form';
|
|
3
|
+
import { HasSlotController } from '../../internal/slot';
|
|
4
|
+
import type { PropertyValues } from 'lit';
|
|
5
|
+
import { html, nothing, unsafeCSS } from 'lit';
|
|
6
|
+
import { property, state } from 'lit/decorators.js';
|
|
7
|
+
import type { ZincFormControl } from '../../internal/zinc-element';
|
|
6
8
|
import ZincElement from '../../internal/zinc-element';
|
|
7
9
|
import ZnInlineEdit from '../inline-edit';
|
|
8
10
|
import ZnInput from '../input';
|
|
9
11
|
import ZnNavbar from '../navbar';
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
12
|
-
import type {ZnMenuSelectEvent} from '../../events/zn-menu-select';
|
|
13
|
-
import type {ZnSelectEvent} from "../../events/zn-select";
|
|
12
|
+
import type { ZnMenuSelectEvent } from '../../events/zn-menu-select';
|
|
13
|
+
import type { ZnSelectEvent } from "../../events/zn-select";
|
|
14
14
|
|
|
15
15
|
import styles from './translations.scss';
|
|
16
16
|
|
|
@@ -28,14 +28,14 @@ export default class ZnTranslations extends ZincElement implements ZincFormContr
|
|
|
28
28
|
@property() name = '';
|
|
29
29
|
@property() value = '{"en":""}';
|
|
30
30
|
@property() label: string = '';
|
|
31
|
-
@property({type: Boolean, reflect: true}) disabled = false;
|
|
32
|
-
@property({type: Boolean, reflect: true}) required = false;
|
|
33
|
-
@property({type: Boolean, reflect: true}) flush = false;
|
|
31
|
+
@property({ type: Boolean, reflect: true }) disabled = false;
|
|
32
|
+
@property({ type: Boolean, reflect: true }) required = false;
|
|
33
|
+
@property({ type: Boolean, reflect: true }) flush = false;
|
|
34
34
|
|
|
35
|
-
@property({type: Object}) languages: Record<string, string> = {
|
|
36
|
-
'en': '
|
|
35
|
+
@property({ type: Object }) languages: Record<string, string> = {
|
|
36
|
+
'en': 'EN'
|
|
37
37
|
};
|
|
38
|
-
@property({type: Object}) values: Record<string, string> = {};
|
|
38
|
+
@property({ type: Object }) values: Record<string, string> = {};
|
|
39
39
|
|
|
40
40
|
@state() private _activeLanguage = 'en';
|
|
41
41
|
|
|
@@ -117,7 +117,7 @@ export default class ZnTranslations extends ZincElement implements ZincFormContr
|
|
|
117
117
|
const languageCode = element.getAttribute('data-path');
|
|
118
118
|
if (languageCode) {
|
|
119
119
|
// Add new language with empty string
|
|
120
|
-
this.values = {...this.values, [languageCode]: ''};
|
|
120
|
+
this.values = { ...this.values, [languageCode]: '' };
|
|
121
121
|
this._activeLanguage = languageCode;
|
|
122
122
|
this.updateValue();
|
|
123
123
|
}
|
|
@@ -140,7 +140,7 @@ export default class ZnTranslations extends ZincElement implements ZincFormContr
|
|
|
140
140
|
if (this._activeLanguage) {
|
|
141
141
|
const newValue: string = target.value as string;
|
|
142
142
|
if (newValue !== this.values[this._activeLanguage]) {
|
|
143
|
-
this.values = {...this.values, [this._activeLanguage]: newValue};
|
|
143
|
+
this.values = { ...this.values, [this._activeLanguage]: newValue };
|
|
144
144
|
this.updateValue();
|
|
145
145
|
}
|
|
146
146
|
}
|
|
@@ -185,7 +185,7 @@ export default class ZnTranslations extends ZincElement implements ZincFormContr
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
const navigation = visibleTabs.map(code => ({
|
|
188
|
-
title:
|
|
188
|
+
title: code.toUpperCase(),
|
|
189
189
|
active: code === this._activeLanguage,
|
|
190
190
|
tab: code
|
|
191
191
|
}));
|
|
@@ -8,9 +8,34 @@
|
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
10
10
|
padding: 0 var(--zn-spacing-medium);
|
|
11
|
-
gap: var(--zn-spacing-small);
|
|
11
|
+
gap: var(--zn-spacing-3x-small);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.input-container {
|
|
15
15
|
padding: var(--zn-spacing-small) 0;
|
|
16
16
|
}
|
|
17
|
+
|
|
18
|
+
.form-control__label {
|
|
19
|
+
margin-bottom: 0 !important;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
zn-navbar {
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
margin-top: var(--zn-spacing-x-small);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
zn-navbar::part(navbar) {
|
|
29
|
+
padding: 0;
|
|
30
|
+
gap: 15px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
zn-navbar::part(navbar-item) {
|
|
34
|
+
font-size: var(--zn-font-size-small);
|
|
35
|
+
|
|
36
|
+
--zn-spacing-medium: 7px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
zn-navbar::part(button__base) {
|
|
40
|
+
//padding: 0 5px;
|
|
41
|
+
}
|