@zanichelli/albe-web-components 6.5.0 → 6.5.2

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.
Files changed (136) hide show
  1. package/CHANGELOG.md +2153 -0
  2. package/dist/cjs/index-e3299e0a.js +14 -30
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/web-components-library.cjs.js +1 -1
  5. package/dist/cjs/z-app-switcher.cjs.entry.js +29 -0
  6. package/dist/cjs/z-combobox.cjs.entry.js +13 -10
  7. package/dist/cjs/{z-modal.cjs.entry.js → z-dragdrop-area_3.cjs.entry.js} +43 -0
  8. package/dist/cjs/z-input_2.cjs.entry.js +1 -1
  9. package/dist/cjs/{z-app-switcher_2.cjs.entry.js → z-logo.cjs.entry.js} +0 -23
  10. package/dist/cjs/z-offcanvas.cjs.entry.js +7 -1
  11. package/dist/cjs/z-table-row.cjs.entry.js +2 -2
  12. package/dist/collection/collection-manifest.json +0 -4
  13. package/dist/collection/components/inputs/z-combobox/index.js +14 -9
  14. package/dist/collection/components/inputs/z-input/styles.css +3 -0
  15. package/dist/collection/components/z-offcanvas/index.js +7 -1
  16. package/dist/collection/components/z-table/z-table-row/index.js +2 -2
  17. package/dist/esm/index-a2ca4b97.js +14 -30
  18. package/dist/esm/index.js +1 -1
  19. package/dist/esm/loader.js +1 -1
  20. package/dist/esm/{utils-ccb4d66f.js → utils-6cf7efe2.js} +1 -1
  21. package/dist/esm/web-components-library.js +1 -1
  22. package/dist/esm/z-app-switcher.entry.js +25 -0
  23. package/dist/esm/z-chip.entry.js +1 -1
  24. package/dist/esm/z-combobox.entry.js +14 -11
  25. package/dist/esm/{z-modal.entry.js → z-dragdrop-area_3.entry.js} +42 -1
  26. package/dist/esm/z-file-upload.entry.js +1 -1
  27. package/dist/esm/z-input_2.entry.js +2 -2
  28. package/dist/esm/{z-app-switcher_2.entry.js → z-logo.entry.js} +2 -24
  29. package/dist/esm/z-myz-card-info.entry.js +1 -1
  30. package/dist/esm/z-myz-list-item.entry.js +1 -1
  31. package/dist/esm/z-offcanvas.entry.js +7 -1
  32. package/dist/esm/z-pocket_3.entry.js +1 -1
  33. package/dist/esm/z-popover.entry.js +1 -1
  34. package/dist/esm/z-select.entry.js +1 -1
  35. package/dist/esm/z-skip-to-content.entry.js +1 -1
  36. package/dist/esm/z-slideshow.entry.js +1 -1
  37. package/dist/esm/z-table-header.entry.js +1 -1
  38. package/dist/esm/z-table-row.entry.js +2 -2
  39. package/dist/esm/z-toggle-switch.entry.js +1 -1
  40. package/dist/types/components/inputs/z-combobox/index.d.ts +2 -0
  41. package/dist/types/components/z-offcanvas/index.d.ts +1 -0
  42. package/dist/types/components.d.ts +2 -230
  43. package/dist/web-components-library/index.esm.js +1 -1
  44. package/dist/web-components-library/p-1d66b265.entry.js +1 -0
  45. package/{www/build/p-9965827d.entry.js → dist/web-components-library/p-26033729.entry.js} +1 -1
  46. package/dist/web-components-library/{p-8bf0844b.entry.js → p-53065788.entry.js} +1 -1
  47. package/dist/web-components-library/p-56d2b76d.entry.js +1 -0
  48. package/dist/web-components-library/{p-1b6279a6.entry.js → p-5c62387a.entry.js} +1 -1
  49. package/dist/web-components-library/{p-20a3247c.entry.js → p-6c163539.entry.js} +1 -1
  50. package/dist/web-components-library/{p-279655eb.entry.js → p-7b3b99ee.entry.js} +1 -1
  51. package/{www/build/p-3d9ecc23.entry.js → dist/web-components-library/p-7ea553e9.entry.js} +1 -1
  52. package/dist/web-components-library/{p-cd43f80d.js → p-8ebe4adf.js} +1 -1
  53. package/{www/build/p-98c94e81.entry.js → dist/web-components-library/p-91a74348.entry.js} +1 -1
  54. package/dist/web-components-library/{p-c25b0b2a.entry.js → p-93142fac.entry.js} +1 -1
  55. package/dist/web-components-library/p-9a613586.entry.js +1 -0
  56. package/dist/web-components-library/{p-411cbcd6.entry.js → p-a05ce0a6.entry.js} +1 -1
  57. package/{www/build/p-bdc6f2e5.entry.js → dist/web-components-library/p-a6c0f149.entry.js} +1 -1
  58. package/dist/web-components-library/p-ae79573a.entry.js +1 -0
  59. package/dist/web-components-library/p-bdefe224.entry.js +1 -0
  60. package/dist/web-components-library/{p-8980398c.entry.js → p-d2127d84.entry.js} +1 -1
  61. package/dist/web-components-library/{p-8b960526.entry.js → p-dd000757.entry.js} +1 -1
  62. package/dist/web-components-library/p-de55c171.entry.js +1 -0
  63. package/dist/web-components-library/web-components-library.esm.js +1 -1
  64. package/package.json +1 -1
  65. package/react/components.d.ts +0 -4
  66. package/react/components.js +2 -6
  67. package/react/components.js.map +1 -1
  68. package/src-react/index.ts +1 -0
  69. package/www/build/index.esm.js +1 -1
  70. package/www/build/p-1674fd9c.js +1 -0
  71. package/www/build/p-1d66b265.entry.js +1 -0
  72. package/{dist/web-components-library/p-9965827d.entry.js → www/build/p-26033729.entry.js} +1 -1
  73. package/www/build/{p-8bf0844b.entry.js → p-53065788.entry.js} +1 -1
  74. package/www/build/p-56d2b76d.entry.js +1 -0
  75. package/www/build/{p-1b6279a6.entry.js → p-5c62387a.entry.js} +1 -1
  76. package/www/build/{p-20a3247c.entry.js → p-6c163539.entry.js} +1 -1
  77. package/www/build/{p-279655eb.entry.js → p-7b3b99ee.entry.js} +1 -1
  78. package/{dist/web-components-library/p-3d9ecc23.entry.js → www/build/p-7ea553e9.entry.js} +1 -1
  79. package/www/build/{p-cd43f80d.js → p-8ebe4adf.js} +1 -1
  80. package/{dist/web-components-library/p-98c94e81.entry.js → www/build/p-91a74348.entry.js} +1 -1
  81. package/www/build/{p-c25b0b2a.entry.js → p-93142fac.entry.js} +1 -1
  82. package/www/build/p-9a613586.entry.js +1 -0
  83. package/www/build/{p-411cbcd6.entry.js → p-a05ce0a6.entry.js} +1 -1
  84. package/{dist/web-components-library/p-bdc6f2e5.entry.js → www/build/p-a6c0f149.entry.js} +1 -1
  85. package/www/build/p-ae79573a.entry.js +1 -0
  86. package/www/build/p-bdefe224.entry.js +1 -0
  87. package/www/build/{p-8980398c.entry.js → p-d2127d84.entry.js} +1 -1
  88. package/www/build/{p-8b960526.entry.js → p-dd000757.entry.js} +1 -1
  89. package/www/build/p-de55c171.entry.js +1 -0
  90. package/www/build/web-components-library.esm.js +1 -1
  91. package/www/index.html +1 -1
  92. package/www/pages/file-upload.html +0 -33
  93. package/www/pages/notification.html +0 -33
  94. package/dist/cjs/z-app-topbar.cjs.entry.js +0 -41
  95. package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +0 -49
  96. package/dist/cjs/z-menu-dropdown.cjs.entry.js +0 -59
  97. package/dist/cjs/z-modal-login.cjs.entry.js +0 -84
  98. package/dist/cjs/z-user-dropdown.cjs.entry.js +0 -93
  99. package/dist/collection/components/modal/z-modal-login/index.js +0 -251
  100. package/dist/collection/components/modal/z-modal-login/styles.css +0 -150
  101. package/dist/collection/components/navigation/z-app-topbar/index.js +0 -156
  102. package/dist/collection/components/navigation/z-app-topbar/styles.css +0 -65
  103. package/dist/collection/components/navigation/z-menu-dropdown/index.js +0 -124
  104. package/dist/collection/components/navigation/z-menu-dropdown/styles.css +0 -146
  105. package/dist/collection/components/navigation/z-user-dropdown/index.js +0 -247
  106. package/dist/collection/components/navigation/z-user-dropdown/styles.css +0 -306
  107. package/dist/esm/z-app-topbar.entry.js +0 -37
  108. package/dist/esm/z-dragdrop-area_2.entry.js +0 -44
  109. package/dist/esm/z-menu-dropdown.entry.js +0 -55
  110. package/dist/esm/z-modal-login.entry.js +0 -80
  111. package/dist/esm/z-user-dropdown.entry.js +0 -89
  112. package/dist/types/components/modal/z-modal-login/index.d.ts +0 -41
  113. package/dist/types/components/navigation/z-app-topbar/index.d.ts +0 -20
  114. package/dist/types/components/navigation/z-menu-dropdown/index.d.ts +0 -19
  115. package/dist/types/components/navigation/z-user-dropdown/index.d.ts +0 -39
  116. package/dist/web-components-library/p-1ba8d432.entry.js +0 -1
  117. package/dist/web-components-library/p-3c2d438b.entry.js +0 -1
  118. package/dist/web-components-library/p-4cd6c6f4.entry.js +0 -1
  119. package/dist/web-components-library/p-4e8fd5be.entry.js +0 -1
  120. package/dist/web-components-library/p-547d3b1f.entry.js +0 -1
  121. package/dist/web-components-library/p-682528b2.entry.js +0 -1
  122. package/dist/web-components-library/p-9ed27651.entry.js +0 -1
  123. package/dist/web-components-library/p-a2b67e2d.entry.js +0 -1
  124. package/dist/web-components-library/p-b17981a4.entry.js +0 -1
  125. package/dist/web-components-library/p-f20d1242.entry.js +0 -1
  126. package/www/build/p-13cf5e67.js +0 -1
  127. package/www/build/p-1ba8d432.entry.js +0 -1
  128. package/www/build/p-3c2d438b.entry.js +0 -1
  129. package/www/build/p-4cd6c6f4.entry.js +0 -1
  130. package/www/build/p-4e8fd5be.entry.js +0 -1
  131. package/www/build/p-547d3b1f.entry.js +0 -1
  132. package/www/build/p-682528b2.entry.js +0 -1
  133. package/www/build/p-9ed27651.entry.js +0 -1
  134. package/www/build/p-a2b67e2d.entry.js +0 -1
  135. package/www/build/p-b17981a4.entry.js +0 -1
  136. package/www/build/p-f20d1242.entry.js +0 -1
@@ -1,251 +0,0 @@
1
- import { h } from "@stencil/core";
2
- import { ButtonVariant, InputStatus, InputType } from "../../../beans";
3
- /**
4
- * @slot username - username input
5
- * @slot password - password input
6
- * @slot login - login button
7
- * @slot signup - signup button
8
- * @slot provider - expternal providers login buttons
9
- */
10
- export class ZModalLogin {
11
- constructor() {
12
- /** Login modal title */
13
- this.heading = "Entra in MyZanichelli";
14
- this.externalProviderCheck = false;
15
- }
16
- componentDidLoad() {
17
- this.externalProviderCheck = !!this.hostElement.querySelectorAll('[slot="provider"]').length;
18
- }
19
- emitLoginSubmit() {
20
- const usernameInput = this.hostElement.querySelector("z-input#username");
21
- const passwordInput = this.hostElement.querySelector("z-input#password");
22
- // INFO: slotted inputs
23
- if (!usernameInput || !passwordInput) {
24
- return;
25
- }
26
- let username = usernameInput.value;
27
- const password = passwordInput.value;
28
- if (!username || !password) {
29
- this.status = InputStatus.ERROR;
30
- return;
31
- }
32
- username = this.cleanUsername(username);
33
- this.loginSubmit.emit({
34
- username,
35
- password,
36
- originalUsername: usernameInput.value,
37
- });
38
- }
39
- emitStatusUpdate(status) {
40
- this.statusUpdate.emit(status);
41
- }
42
- emitSignupClick() {
43
- this.signupClick.emit();
44
- }
45
- emitZainoDigitaleClick() {
46
- this.zainoDigitaleClick.emit();
47
- }
48
- handleInputKeyUp(e) {
49
- if (e.code !== "Enter") {
50
- return;
51
- }
52
- this.emitLoginSubmit();
53
- }
54
- handleInputChange() {
55
- this.status = null;
56
- this.emitStatusUpdate(this.status);
57
- }
58
- cleanUsername(username) {
59
- username = username.trim().toLowerCase();
60
- const mobileRegex = /^[+]?[\s./0-9]*[(]?[0-9]{1,4}[)]?[(]?[0-9]{1,4}[)]?[-\s./0-9]*$/g;
61
- if (mobileRegex.test(username)) {
62
- username = username.replace(/[- .)(]/g, "");
63
- if (/^[\d ]*$/.test(username)) {
64
- username = "+39" + username;
65
- }
66
- }
67
- return username;
68
- }
69
- renderZainoDigitaleButton() {
70
- return (h("z-button", { variant: ButtonVariant.SECONDARY, onClick: () => this.emitZainoDigitaleClick(), class: "zainoDigitale" }, h("div", { class: "zd" }, h("svg", { width: "18px", height: "24px", viewBox: "0 0 18 24" }, h("g", { stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd" }, h("g", { transform: "translate(-313.000000, -329.000000)", fill: "#E2001A", "fill-rule": "nonzero" }, h("g", { transform: "translate(25.000000, 191.000000)" }, h("g", null, h("g", { transform: "translate(0.000000, 100.000000)" }, h("g", null, h("g", { transform: "translate(276.000000, 28.000000)" }, h("path", { d: "M29.8953704,30.5632326 C29.9143039,30.3327754 29.5356326,30.0447041 29.1380277,29.8142469 C29.2516291,28.7963947 29.4409647,26.9719425 29.2705626,26.3189807 C29.0433598,25.416357 28.3428178,24.8018047 28.380685,23.822362 C28.4185521,22.8429193 28.1913493,16.5437582 27.0364017,15.1802202 C26.1654576,14.162368 25.4649156,12.8372396 23.4390239,12.2418921 C23.4390239,12.0498445 23.4390239,11.8770016 23.4200903,11.7425683 C23.3822232,10.9167637 21.9622056,10.090959 21.6214014,10.0525495 C21.2805972,10.01414 20.371786,9.95652568 20.0309818,10.0525495 C19.6901775,10.1293685 19.0464362,11.128016 18.7434992,11.4352922 C18.5920306,11.5889302 18.5541635,11.9538207 18.5730971,12.3187111 C17.437083,12.6836015 16.1306669,13.4325871 15.4490584,14.9497631 C14.2941108,17.676839 13.4799674,18.9251483 13.6693031,24.1680477 C13.5935688,25.1090809 13.2906318,25.6084046 13.1012961,25.6852237 C12.9119604,25.7620427 12.798359,25.9156808 12.7604919,26.1077284 C12.7226247,26.2805712 12.5522226,28.37389 12.7415583,29.8718612 C12.3818205,30.1023183 12.0788834,30.3519802 12.097817,30.5632326 C12.1546177,31.0625563 11.8516806,31.7731324 12.097817,32.0612038 C12.230352,32.2148419 12.7226247,32.5413228 13.3284989,32.8293942 C13.6125024,33.4631512 14.199443,33.9240655 15.467992,33.9816797 C18.1565586,34.0584988 26.2601254,33.8664512 26.5630625,33.9048607 C26.847066,33.9432702 28.4374857,34.0008845 28.683622,32.8293942 C29.2894962,32.5413228 29.781769,32.2148419 29.9143039,32.0612038 C30.1415067,31.7731324 29.8385697,31.0625563 29.8953704,30.5632326 Z M12.0319858,31.2 C12.1173988,31.1230769 12.3736379,31.0461538 12.743761,31 C12.857645,31.3230769 12.914587,31.6615385 13,32 C12.4021089,31.8153846 11.8611598,31.5692308 12.0319858,31.2 Z M21.1618497,12.8394441 C21.1618497,12.8394441 20.6763006,12.8165075 20,13 L20,12.9770634 C20,12.5642053 20.3121387,11.3256309 20.3988439,11.1192018 C20.4855491,10.9127728 21.265896,11.0274556 21.8554913,11.0733287 C22.6358382,11.0503922 22.4624277,11.2568212 22.8092486,11.9907912 C22.9306358,12.2889666 22.982659,12.6559516 23,13 C22.4797688,12.8623806 21.8728324,12.8165075 21.1618497,12.8394441 Z M28.3324094,30 C28.6648189,30.0833333 28.9085858,30.2222222 28.9750677,30.3888889 C29.1301921,31.1666667 28.5318551,31.6388889 28,32 C28.0221606,31.5 28.0664819,31.1111111 28.0664819,31.1111111 L28.2437669,30.6111111 L28.3324094,30 Z M21.8571429,23 L21.8571429,23.8 L22.7142857,23.8 L22.7142857,24.6 L23.5714286,24.6 L23.5714286,25.4 L24.4285714,25.4 L24.4285714,26.2 L25.2857143,26.2 L25.2857143,27 L26.1428571,27 L26.1428571,27.8 L27,27.8 L27,28.6 L24.4285714,28.6 L24.4285714,29.4 L25.2857143,29.4 L25.2857143,31 L24.4285714,31 L24.4285714,30.2 L23.5714286,30.2 L23.5714286,29.4 L22.7142857,29.4 L22.7142857,30.2 L21.8571429,30.2 L21.8571429,31 L21,31 L21,23 L21.8571429,23 Z" }))))))))), h("span", null, "ZAINO DIGITALE"))));
71
- }
72
- render() {
73
- return (h("z-modal", { modaltitle: this.heading }, h("div", { class: "wrapper", slot: "modalContent" }, h("form", { method: "post" }, h("div", { class: "username" }, h("slot", { name: "username" }, h("z-input", { id: "username", label: "email o numero di cellulare", placeholder: "Inserisci l'email o il cellulare", autocomplete: "username", name: "username", status: this.status, message: this.message, onKeyUp: (e) => this.handleInputKeyUp(e), onInputChange: () => this.handleInputChange() }))), h("div", { class: "password" }, h("slot", { name: "password" }, h("z-input", { id: "password", label: "password", placeholder: "Inserisci la tua password", type: InputType.PASSWORD, name: "password", autocomplete: "current-password", status: this.status, message: this.pwdmessage, onKeyUp: (e) => this.handleInputKeyUp(e), onInputChange: () => this.handleInputChange() }))), h("z-link", { class: "forget", href: this.forgotPasswordUrl }, "Password dimenticata?"), h("div", { class: "login" }, h("slot", { name: "login" }, h("z-button", { variant: ButtonVariant.PRIMARY, onClick: () => this.emitLoginSubmit() }, "Accedi")))), h("hr", null), h("z-body", { class: "signup", level: 4, variant: "semibold" }, "Non hai ancora un account?"), h("div", { class: "signup" }, h("slot", { name: "signup" }, h("z-button", { variant: ButtonVariant.SECONDARY, onClick: () => this.emitSignupClick() }, "Registrati"))), !this.externalProviderCheck && (h("div", { class: "providers" }, h("z-body", { class: "provider", level: 5, variant: "regular" }, "OPPURE ACCEDI CON:"), h("slot", { name: "provider" }, this.renderZainoDigitaleButton(), h("z-link", { icon: "informationsource", href: "https://www.zainodigitale.it/#/landing" }, "Cos'\u00E8 Zaino Digitale?")))))));
74
- }
75
- static get is() { return "z-modal-login"; }
76
- static get encapsulation() { return "scoped"; }
77
- static get originalStyleUrls() {
78
- return {
79
- "$": ["styles.css"]
80
- };
81
- }
82
- static get styleUrls() {
83
- return {
84
- "$": ["styles.css"]
85
- };
86
- }
87
- static get properties() {
88
- return {
89
- "forgotPasswordUrl": {
90
- "type": "string",
91
- "mutable": false,
92
- "complexType": {
93
- "original": "string",
94
- "resolved": "string",
95
- "references": {}
96
- },
97
- "required": false,
98
- "optional": false,
99
- "docs": {
100
- "tags": [],
101
- "text": "Forgot Password Url"
102
- },
103
- "attribute": "forgot-password-url",
104
- "reflect": false
105
- },
106
- "heading": {
107
- "type": "string",
108
- "mutable": false,
109
- "complexType": {
110
- "original": "string",
111
- "resolved": "string",
112
- "references": {}
113
- },
114
- "required": false,
115
- "optional": true,
116
- "docs": {
117
- "tags": [],
118
- "text": "Login modal title"
119
- },
120
- "attribute": "heading",
121
- "reflect": false,
122
- "defaultValue": "\"Entra in MyZanichelli\""
123
- },
124
- "status": {
125
- "type": "string",
126
- "mutable": true,
127
- "complexType": {
128
- "original": "InputStatus",
129
- "resolved": "InputStatus.ERROR | InputStatus.SUCCESS | InputStatus.WARNING",
130
- "references": {
131
- "InputStatus": {
132
- "location": "import",
133
- "path": "../../../beans"
134
- }
135
- }
136
- },
137
- "required": false,
138
- "optional": true,
139
- "docs": {
140
- "tags": [],
141
- "text": "Username/password input status"
142
- },
143
- "attribute": "status",
144
- "reflect": false
145
- },
146
- "message": {
147
- "type": "string",
148
- "mutable": false,
149
- "complexType": {
150
- "original": "string",
151
- "resolved": "string",
152
- "references": {}
153
- },
154
- "required": false,
155
- "optional": true,
156
- "docs": {
157
- "tags": [],
158
- "text": "Username helper message"
159
- },
160
- "attribute": "message",
161
- "reflect": false
162
- },
163
- "pwdmessage": {
164
- "type": "string",
165
- "mutable": false,
166
- "complexType": {
167
- "original": "string",
168
- "resolved": "string",
169
- "references": {}
170
- },
171
- "required": false,
172
- "optional": true,
173
- "docs": {
174
- "tags": [],
175
- "text": "Password helper message"
176
- },
177
- "attribute": "pwdmessage",
178
- "reflect": false
179
- }
180
- };
181
- }
182
- static get states() {
183
- return {
184
- "externalProviderCheck": {}
185
- };
186
- }
187
- static get events() {
188
- return [{
189
- "method": "loginSubmit",
190
- "name": "loginSubmit",
191
- "bubbles": true,
192
- "cancelable": true,
193
- "composed": true,
194
- "docs": {
195
- "tags": [],
196
- "text": "Emitted on login submit"
197
- },
198
- "complexType": {
199
- "original": "any",
200
- "resolved": "any",
201
- "references": {}
202
- }
203
- }, {
204
- "method": "statusUpdate",
205
- "name": "statusUpdate",
206
- "bubbles": true,
207
- "cancelable": true,
208
- "composed": true,
209
- "docs": {
210
- "tags": [],
211
- "text": "Emitted on status update"
212
- },
213
- "complexType": {
214
- "original": "any",
215
- "resolved": "any",
216
- "references": {}
217
- }
218
- }, {
219
- "method": "signupClick",
220
- "name": "signupClick",
221
- "bubbles": true,
222
- "cancelable": true,
223
- "composed": true,
224
- "docs": {
225
- "tags": [],
226
- "text": "Emitted on signup button click"
227
- },
228
- "complexType": {
229
- "original": "any",
230
- "resolved": "any",
231
- "references": {}
232
- }
233
- }, {
234
- "method": "zainoDigitaleClick",
235
- "name": "zainoDigitaleClick",
236
- "bubbles": true,
237
- "cancelable": true,
238
- "composed": true,
239
- "docs": {
240
- "tags": [],
241
- "text": "Emitted on zaino digitale button click"
242
- },
243
- "complexType": {
244
- "original": "any",
245
- "resolved": "any",
246
- "references": {}
247
- }
248
- }];
249
- }
250
- static get elementRef() { return "hostElement"; }
251
- }
@@ -1,150 +0,0 @@
1
- :host {
2
- font-family: var(--dashboard-font);
3
- font-weight: var(--font-rg);
4
- }
5
-
6
- :host div.wrapper {
7
- display: flex;
8
- box-sizing: border-box;
9
- flex-flow: column nowrap;
10
- align-items: stretch;
11
- justify-content: flex-start;
12
- padding: calc(var(--space-unit) * 4) calc(var(--space-unit) * 2) calc(var(--space-unit) * 3)
13
- calc(var(--space-unit) * 2);
14
- color: var(--text-grey-800);
15
- }
16
-
17
- z-button,
18
- z-input,
19
- ::slotted(z-button),
20
- ::slotted(z-input) {
21
- display: inline-block;
22
- width: 100%;
23
- }
24
-
25
- z-link,
26
- ::slotted(z-link) {
27
- font-size: 12px;
28
- }
29
-
30
- :host div.wrapper > form {
31
- display: flex;
32
- flex-flow: column nowrap;
33
- align-items: stretch;
34
- justify-content: flex-start;
35
- }
36
-
37
- div.wrapper > form > div.username::slotted(z-input),
38
- div.wrapper > form > div.password::slotted(z-input),
39
- :host div.wrapper > form > div.username z-input,
40
- :host div.wrapper > form > div.password z-input {
41
- margin-bottom: var(--space-unit);
42
- }
43
-
44
- :host div.wrapper > form > z-link.forget {
45
- align-self: flex-end;
46
- font-size: 12px;
47
- }
48
-
49
- div.wrapper > form > div.login::slotted(z-button),
50
- :host div.wrapper > form > div.login z-button {
51
- align-self: flex-start;
52
- margin: calc(var(--space-unit) * 3) 0;
53
- }
54
-
55
- :host div.wrapper > hr {
56
- width: 100%;
57
- border: none;
58
- border-top: var(--border-size-medium) solid var(--bg-grey-200);
59
- margin-bottom: calc(var(--space-unit) * 3);
60
- margin-block-start: unset;
61
- }
62
-
63
- div.wrapper > div.signup::slotted(z-button),
64
- :host div.wrapper > div.signup z-button {
65
- display: inline-block;
66
- margin: calc(var(--space-unit) * 2) 0;
67
- }
68
-
69
- :host div.providers {
70
- display: grid;
71
- gap: calc(var(--space-unit) * 2) 0;
72
- grid-auto-rows: auto;
73
- grid-template-columns: 1fr;
74
- }
75
-
76
- slot-fb[name="provider"] {
77
- display: grid;
78
- gap: calc(var(--space-unit) * 2) 0;
79
- grid-auto-rows: auto;
80
- grid-template-columns: 1fr;
81
- }
82
-
83
- :host div.providers > z-body {
84
- padding-top: calc(var(--space-unit) * 2);
85
- }
86
-
87
- :host div.wrapper > div.providers .zd {
88
- display: flex;
89
- flex-flow: row nowrap;
90
- align-content: center;
91
- align-items: center;
92
- justify-content: center;
93
- }
94
-
95
- :host div.wrapper > div.providers .zd > svg {
96
- margin-right: var(--space-unit);
97
- }
98
-
99
- /* Tablet breakpoint */
100
- @media only screen and (min-width: 768px) {
101
- z-button,
102
- ::slotted(z-button) {
103
- width: initial;
104
- }
105
-
106
- :host div.wrapper {
107
- width: 396px;
108
- padding: calc(var(--space-unit) * 3);
109
- }
110
-
111
- :host div.providers {
112
- display: grid;
113
- align-items: center;
114
- justify-content: center;
115
- gap: var(--space-unit);
116
- grid-auto-rows: auto;
117
- grid-template-columns: 1fr 1fr;
118
- }
119
-
120
- :host div.providers > z-body {
121
- padding-bottom: var(--space-unit);
122
- grid-column: 1 / 3;
123
- }
124
-
125
- ::slotted([slot="provider"]) {
126
- width: 100%;
127
- }
128
-
129
- slot-fb[name="provider"] {
130
- display: grid;
131
- align-items: center;
132
- justify-content: center;
133
- gap: var(--space-unit);
134
- grid-auto-rows: auto;
135
- grid-column: 1 / 3;
136
- grid-template-columns: 1fr 1fr;
137
- }
138
-
139
- slot-fb[name="provider"] > * {
140
- width: 100%;
141
- }
142
- }
143
-
144
- /* Wide breakpoint */
145
- @media only screen and (min-width: 1366px) {
146
- :host div.wrapper {
147
- width: 477px;
148
- padding: calc(var(--space-unit) * 4);
149
- }
150
- }
@@ -1,156 +0,0 @@
1
- import { h, Host } from "@stencil/core";
2
- import { DividerOrientation, ThemeVariant } from "../../../beans";
3
- import { mobileBreakpoint } from "../../../constants/breakpoints";
4
- export class ZAppTopbar {
5
- constructor() {
6
- /** theme variant, default 'dark' */
7
- this.theme = ThemeVariant.DARK;
8
- this.topbarLinks = [];
9
- }
10
- handleResize() {
11
- this.isMobile = window.innerWidth <= mobileBreakpoint;
12
- }
13
- componentWillLoad() {
14
- this.isMobile = window.screen.width <= mobileBreakpoint || window.innerWidth <= mobileBreakpoint;
15
- }
16
- componentWillRender() {
17
- if (this.topbarContent) {
18
- this.topbarLinks = typeof this.topbarContent === "string" ? JSON.parse(this.topbarContent) : this.topbarContent;
19
- }
20
- }
21
- renderTopbarLinks() {
22
- return this.topbarLinks.map((link) => (h("z-link", { htmlid: link.id, textcolor: this.theme === ThemeVariant.LIGHT ? "black" : "white", href: link.link, target: link.target, icon: this.isMobile ? link.icon : undefined }, !this.isMobile && link.label)));
23
- }
24
- render() {
25
- return (h(Host, { class: {
26
- [this.theme]: true,
27
- "limited-width": !!this.contentMaxWidth,
28
- } }, h("div", { id: "content-container", style: this.contentMaxWidth ? { "--mw": `${this.contentMaxWidth}px` } : {} }, h("div", { id: "left-panel", class: "content-panel" }, h("z-logo", { mobileLogo: this.isMobile, width: this.isMobile ? 32 : 128, height: this.isMobile ? 40 : 32, imageAlt: "zanichelli-logo", link: this.logoLink, targetBlank: true }), this.isMobile && this.renderTopbarLinks()), h("div", { id: "right-panel", class: "content-panel" }, !this.isMobile && this.renderTopbarLinks(), this.showAppSwitcher && h("z-app-switcher", { theme: this.theme }), h("div", { id: "divider-container" }, h("z-divider", { orientation: DividerOrientation.VERTICAL, color: this.theme === ThemeVariant.LIGHT ? "gray800" : "color-white" })), h("slot", { name: "login" })))));
29
- }
30
- static get is() { return "z-app-topbar"; }
31
- static get encapsulation() { return "shadow"; }
32
- static get originalStyleUrls() {
33
- return {
34
- "$": ["styles.css"]
35
- };
36
- }
37
- static get styleUrls() {
38
- return {
39
- "$": ["styles.css"]
40
- };
41
- }
42
- static get properties() {
43
- return {
44
- "theme": {
45
- "type": "string",
46
- "mutable": false,
47
- "complexType": {
48
- "original": "ThemeVariant",
49
- "resolved": "ThemeVariant.DARK | ThemeVariant.LIGHT",
50
- "references": {
51
- "ThemeVariant": {
52
- "location": "import",
53
- "path": "../../../beans"
54
- }
55
- }
56
- },
57
- "required": false,
58
- "optional": true,
59
- "docs": {
60
- "tags": [],
61
- "text": "theme variant, default 'dark'"
62
- },
63
- "attribute": "theme",
64
- "reflect": false,
65
- "defaultValue": "ThemeVariant.DARK"
66
- },
67
- "contentMaxWidth": {
68
- "type": "number",
69
- "mutable": false,
70
- "complexType": {
71
- "original": "number",
72
- "resolved": "number",
73
- "references": {}
74
- },
75
- "required": false,
76
- "optional": true,
77
- "docs": {
78
- "tags": [],
79
- "text": "maximum width of topbar content"
80
- },
81
- "attribute": "content-max-width",
82
- "reflect": false
83
- },
84
- "topbarContent": {
85
- "type": "string",
86
- "mutable": false,
87
- "complexType": {
88
- "original": "string | MenuItem[]",
89
- "resolved": "MenuItem[] | string",
90
- "references": {
91
- "MenuItem": {
92
- "location": "import",
93
- "path": "../../../beans"
94
- }
95
- }
96
- },
97
- "required": false,
98
- "optional": true,
99
- "docs": {
100
- "tags": [],
101
- "text": "JSON string or MenuItem array to define topbar links"
102
- },
103
- "attribute": "topbar-content",
104
- "reflect": false
105
- },
106
- "logoLink": {
107
- "type": "string",
108
- "mutable": false,
109
- "complexType": {
110
- "original": "string",
111
- "resolved": "string",
112
- "references": {}
113
- },
114
- "required": false,
115
- "optional": true,
116
- "docs": {
117
- "tags": [],
118
- "text": "link URL used by z-logo"
119
- },
120
- "attribute": "logo-link",
121
- "reflect": false
122
- },
123
- "showAppSwitcher": {
124
- "type": "boolean",
125
- "mutable": false,
126
- "complexType": {
127
- "original": "boolean",
128
- "resolved": "boolean",
129
- "references": {}
130
- },
131
- "required": false,
132
- "optional": false,
133
- "docs": {
134
- "tags": [],
135
- "text": "add app-switcher"
136
- },
137
- "attribute": "show-app-switcher",
138
- "reflect": false
139
- }
140
- };
141
- }
142
- static get states() {
143
- return {
144
- "isMobile": {}
145
- };
146
- }
147
- static get listeners() {
148
- return [{
149
- "name": "resize",
150
- "method": "handleResize",
151
- "target": "window",
152
- "capture": false,
153
- "passive": true
154
- }];
155
- }
156
- }
@@ -1,65 +0,0 @@
1
- :host {
2
- position: sticky;
3
- z-index: 99;
4
- top: 0;
5
- display: block;
6
- height: calc(var(--space-unit) * 6);
7
- box-sizing: border-box;
8
- padding: calc(var(--space-unit) / 2) calc(var(--space-unit) * 2);
9
- background-color: var(--gray900);
10
- border-radius: var(--border-no-radius);
11
- }
12
-
13
- :host(.light) {
14
- background-color: var(--color-white);
15
- }
16
-
17
- :host > div {
18
- display: flex;
19
- align-items: center;
20
- justify-content: space-between;
21
- }
22
-
23
- :host(.limited-width) #content-container {
24
- --mw: none;
25
-
26
- max-width: var(--mw);
27
- margin: auto;
28
- }
29
-
30
- .content-panel {
31
- display: flex;
32
- align-items: center;
33
- }
34
-
35
- .content-panel > :not(:last-child) {
36
- margin-right: calc(var(--space-unit) * 2);
37
- }
38
-
39
- #divider-container {
40
- display: none;
41
- }
42
-
43
- z-link {
44
- font-family: var(--font-family-sans);
45
- font-size: 14px;
46
- font-weight: var(--font-sb);
47
- letter-spacing: 0.3px;
48
- line-height: 20px;
49
- }
50
-
51
- /* Tablet breakpoint */
52
- @media only screen and (min-width: 768px) {
53
- :host {
54
- padding: var(--space-unit) calc(var(--space-unit) * 2) var(--space-unit) var(--space-unit);
55
- }
56
-
57
- :host(.limited-width) {
58
- padding: var(--space-unit);
59
- }
60
-
61
- #divider-container {
62
- display: block;
63
- height: calc(var(--space-unit) * 3);
64
- }
65
- }