@zanichelli/albe-web-components 19.1.3 → 19.1.4-RC1
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/cjs/index-96af6326.js +8 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-app-header_12.cjs.entry.js +31 -26
- package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
- package/dist/cjs/z-myz-card-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-info.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-list.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card_4.cjs.entry.js +4 -4
- package/dist/cjs/z-myz-list-item.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-list.cjs.entry.js +1 -1
- package/dist/cjs/z-otp.cjs.entry.js +2 -2
- package/dist/cjs/z-tool.cjs.entry.js +105 -0
- package/dist/cjs/z-tool.cjs.entry.js.map +1 -0
- package/dist/cjs/z-toolbar.cjs.entry.js +150 -0
- package/dist/cjs/z-toolbar.cjs.entry.js.map +1 -0
- package/dist/cjs/z-tooltip.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/css-components/z-label/styles.css +10 -0
- package/dist/collection/components/z-searchbar/index.js +41 -5
- package/dist/collection/components/z-searchbar/index.js.map +1 -1
- package/dist/collection/components/z-searchbar/index.stories.js +13 -1
- package/dist/collection/components/z-searchbar/index.stories.js.map +1 -1
- package/dist/collection/components/z-tool/index.js +268 -0
- package/dist/collection/components/z-tool/index.js.map +1 -0
- package/dist/collection/components/z-tool/index.stories.js +70 -0
- package/dist/collection/components/z-tool/index.stories.js.map +1 -0
- package/dist/collection/components/z-tool/styles.css +91 -0
- package/dist/collection/components/z-toolbar/index.js +227 -0
- package/dist/collection/components/z-toolbar/index.js.map +1 -0
- package/dist/collection/components/z-toolbar/index.stories.js +437 -0
- package/dist/collection/components/z-toolbar/index.stories.js.map +1 -0
- package/dist/collection/components/z-toolbar/styles.css +55 -0
- package/dist/collection/components/z-tooltip/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +1 -1
- package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +1 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +1 -1
- package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +1 -1
- package/dist/collection/snowflakes/myz/z-alert/index.js +1 -1
- package/dist/collection/snowflakes/myz/z-otp/index.js +2 -2
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/index18.js +1 -1
- package/dist/components/index19.js +1 -1
- package/dist/components/index20.js +1 -1
- package/dist/components/index21.js +1 -1
- package/dist/components/index22.js +1 -1
- package/dist/components/index25.js +13 -6
- package/dist/components/index25.js.map +1 -1
- package/dist/components/index3.js +1 -1
- package/dist/components/z-myz-card-alert.js +1 -1
- package/dist/components/z-myz-card-dictionary.js +1 -1
- package/dist/components/z-myz-card-footer-sections.js +1 -1
- package/dist/components/z-myz-card-footer.js +1 -1
- package/dist/components/z-myz-card-icon.js +1 -1
- package/dist/components/z-myz-card-info.js +1 -1
- package/dist/components/z-myz-card-list.js +1 -1
- package/dist/components/z-myz-list.js +1 -1
- package/dist/components/z-otp.js +2 -2
- package/dist/components/z-tool.d.ts +11 -0
- package/dist/components/z-tool.js +144 -0
- package/dist/components/z-tool.js.map +1 -0
- package/dist/components/z-toolbar.d.ts +11 -0
- package/dist/components/z-toolbar.js +168 -0
- package/dist/components/z-toolbar.js.map +1 -0
- package/dist/components/z-tooltip.js +1 -1
- package/dist/esm/index-c8ceadeb.js +8 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-alert.entry.js +1 -1
- package/dist/esm/z-app-header_12.entry.js +31 -26
- package/dist/esm/z-app-header_12.entry.js.map +1 -1
- package/dist/esm/z-myz-card-alert.entry.js +1 -1
- package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
- package/dist/esm/z-myz-card-footer-sections.entry.js +1 -1
- package/dist/esm/z-myz-card-footer.entry.js +1 -1
- package/dist/esm/z-myz-card-icon.entry.js +1 -1
- package/dist/esm/z-myz-card-info.entry.js +1 -1
- package/dist/esm/z-myz-card-list.entry.js +1 -1
- package/dist/esm/z-myz-card_4.entry.js +4 -4
- package/dist/esm/z-myz-list-item.entry.js +1 -1
- package/dist/esm/z-myz-list.entry.js +1 -1
- package/dist/esm/z-otp.entry.js +2 -2
- package/dist/esm/z-tool.entry.js +101 -0
- package/dist/esm/z-tool.entry.js.map +1 -0
- package/dist/esm/z-toolbar.entry.js +146 -0
- package/dist/esm/z-toolbar.entry.js.map +1 -0
- package/dist/esm/z-tooltip.entry.js +1 -1
- package/dist/types/components/z-searchbar/index.d.ts +4 -0
- package/dist/types/components/z-searchbar/index.stories.d.ts +2 -0
- package/dist/types/components/z-tool/index.d.ts +39 -0
- package/dist/types/components/z-tool/index.stories.d.ts +44 -0
- package/dist/types/components/z-toolbar/index.d.ts +29 -0
- package/dist/types/components/z-toolbar/index.stories.d.ts +49 -0
- package/dist/types/components.d.ts +165 -0
- package/dist/web-components-library/{p-307c9c33.entry.js → p-04f80811.entry.js} +2 -2
- package/dist/web-components-library/{p-75e47ecf.entry.js → p-17e1abca.entry.js} +2 -2
- package/dist/web-components-library/p-17e1abca.entry.js.map +1 -0
- package/dist/web-components-library/p-198b1692.entry.js +2 -0
- package/dist/web-components-library/{p-33d2a5db.entry.js → p-22128478.entry.js} +2 -2
- package/dist/web-components-library/{p-daa1ffe9.entry.js → p-2aeffcf9.entry.js} +2 -2
- package/{www/build/p-28534fb5.entry.js → dist/web-components-library/p-2f948bac.entry.js} +2 -2
- package/dist/web-components-library/{p-028dd72a.entry.js → p-34975328.entry.js} +2 -2
- package/dist/web-components-library/{p-5c5882c6.entry.js → p-375f8542.entry.js} +2 -2
- package/dist/web-components-library/{p-dc086eb5.entry.js → p-44459393.entry.js} +2 -2
- package/dist/web-components-library/{p-863fd1c4.entry.js → p-5159edb1.entry.js} +2 -2
- package/dist/web-components-library/{p-af5e8524.entry.js → p-60e3fa30.entry.js} +2 -2
- package/dist/web-components-library/{p-f487290e.entry.js → p-8687691b.entry.js} +2 -2
- package/dist/web-components-library/p-bc7fd8af.entry.js +2 -0
- package/dist/web-components-library/p-bc7fd8af.entry.js.map +1 -0
- package/dist/web-components-library/{p-2ffdfbb1.entry.js → p-bdbcf353.entry.js} +2 -2
- package/dist/web-components-library/{p-460b2068.entry.js → p-d9c9de15.entry.js} +2 -2
- package/dist/web-components-library/p-f5dfd04d.entry.js +2 -0
- package/dist/web-components-library/p-f5dfd04d.entry.js.map +1 -0
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/dist/web-components-library/web-components-library.esm.js.map +1 -1
- package/package.json +4 -3
- package/react/components.d.ts +2 -0
- package/react/components.js +3 -1
- package/react/components.js.map +1 -1
- package/www/build/{p-307c9c33.entry.js → p-04f80811.entry.js} +2 -2
- package/www/build/p-0aba9c42.js +2 -0
- package/www/build/{p-75e47ecf.entry.js → p-17e1abca.entry.js} +2 -2
- package/www/build/p-17e1abca.entry.js.map +1 -0
- package/www/build/p-198b1692.entry.js +2 -0
- package/www/build/{p-33d2a5db.entry.js → p-22128478.entry.js} +2 -2
- package/www/build/{p-daa1ffe9.entry.js → p-2aeffcf9.entry.js} +2 -2
- package/{dist/web-components-library/p-28534fb5.entry.js → www/build/p-2f948bac.entry.js} +2 -2
- package/www/build/{p-028dd72a.entry.js → p-34975328.entry.js} +2 -2
- package/www/build/{p-5c5882c6.entry.js → p-375f8542.entry.js} +2 -2
- package/www/build/{p-dc086eb5.entry.js → p-44459393.entry.js} +2 -2
- package/www/build/{p-863fd1c4.entry.js → p-5159edb1.entry.js} +2 -2
- package/www/build/{p-af5e8524.entry.js → p-60e3fa30.entry.js} +2 -2
- package/www/build/{p-f487290e.entry.js → p-8687691b.entry.js} +2 -2
- package/www/build/p-bc7fd8af.entry.js +2 -0
- package/www/build/p-bc7fd8af.entry.js.map +1 -0
- package/www/build/{p-2ffdfbb1.entry.js → p-bdbcf353.entry.js} +2 -2
- package/www/build/{p-460b2068.entry.js → p-d9c9de15.entry.js} +2 -2
- package/www/build/p-f5dfd04d.entry.js +2 -0
- package/www/build/p-f5dfd04d.entry.js.map +1 -0
- package/www/build/web-components-library.esm.js +1 -1
- package/www/build/web-components-library.esm.js.map +1 -1
- package/www/index.html +1 -1
- package/dist/web-components-library/p-75e47ecf.entry.js.map +0 -1
- package/dist/web-components-library/p-a2e87cec.entry.js +0 -2
- package/www/build/p-75e47ecf.entry.js.map +0 -1
- package/www/build/p-7646bea0.js +0 -2
- package/www/build/p-a2e87cec.entry.js +0 -2
- /package/dist/web-components-library/{p-307c9c33.entry.js.map → p-04f80811.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-a2e87cec.entry.js.map → p-198b1692.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-33d2a5db.entry.js.map → p-22128478.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-daa1ffe9.entry.js.map → p-2aeffcf9.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-28534fb5.entry.js.map → p-2f948bac.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-028dd72a.entry.js.map → p-34975328.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-5c5882c6.entry.js.map → p-375f8542.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-dc086eb5.entry.js.map → p-44459393.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-863fd1c4.entry.js.map → p-5159edb1.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-af5e8524.entry.js.map → p-60e3fa30.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-f487290e.entry.js.map → p-8687691b.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-2ffdfbb1.entry.js.map → p-bdbcf353.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-460b2068.entry.js.map → p-d9c9de15.entry.js.map} +0 -0
- /package/www/build/{p-307c9c33.entry.js.map → p-04f80811.entry.js.map} +0 -0
- /package/www/build/{p-a2e87cec.entry.js.map → p-198b1692.entry.js.map} +0 -0
- /package/www/build/{p-33d2a5db.entry.js.map → p-22128478.entry.js.map} +0 -0
- /package/www/build/{p-daa1ffe9.entry.js.map → p-2aeffcf9.entry.js.map} +0 -0
- /package/www/build/{p-28534fb5.entry.js.map → p-2f948bac.entry.js.map} +0 -0
- /package/www/build/{p-028dd72a.entry.js.map → p-34975328.entry.js.map} +0 -0
- /package/www/build/{p-5c5882c6.entry.js.map → p-375f8542.entry.js.map} +0 -0
- /package/www/build/{p-dc086eb5.entry.js.map → p-44459393.entry.js.map} +0 -0
- /package/www/build/{p-863fd1c4.entry.js.map → p-5159edb1.entry.js.map} +0 -0
- /package/www/build/{p-af5e8524.entry.js.map → p-60e3fa30.entry.js.map} +0 -0
- /package/www/build/{p-f487290e.entry.js.map → p-8687691b.entry.js.map} +0 -0
- /package/www/build/{p-2ffdfbb1.entry.js.map → p-bdbcf353.entry.js.map} +0 -0
- /package/www/build/{p-460b2068.entry.js.map → p-d9c9de15.entry.js.map} +0 -0
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import "../z-divider/index";
|
|
3
|
+
import "../z-tool/index";
|
|
4
|
+
import "./index";
|
|
5
|
+
const StoryMeta = {
|
|
6
|
+
title: "ZToolbar",
|
|
7
|
+
component: "z-toolbar",
|
|
8
|
+
parameters: {
|
|
9
|
+
docs: {
|
|
10
|
+
description: {
|
|
11
|
+
component: [
|
|
12
|
+
"The `z-toolbar` component implements the WCAG toolbar pattern with roving tabindex keyboard navigation.",
|
|
13
|
+
"",
|
|
14
|
+
"### Active state",
|
|
15
|
+
"The `active` state of each `z-tool` must be managed manually by the consumer. The component does not toggle `active` on click by itself. In these stories, a click listener (decorator) is applied to toggle `active` on tools without a submenu, for demonstration purposes.",
|
|
16
|
+
"",
|
|
17
|
+
"### Visual grouping with `z-divider`",
|
|
18
|
+
'Use `<z-divider orientation="vertical">` between tools to visually separate them into groups. On tablet viewports and below, dividers are automatically hidden.',
|
|
19
|
+
"",
|
|
20
|
+
"### Multiline layout with `--z-toolbar-columns`",
|
|
21
|
+
"Set the CSS custom property `--z-toolbar-columns` on a parent element to control the number of columns in the toolbar grid. When set, the toolbar switches to a grid layout on tablet viewports and below (max-width: 1151px), wrapping tools across multiple rows with a separator line between rows.",
|
|
22
|
+
].join("\n"),
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
args: {
|
|
27
|
+
htmlAriaLabel: "Toolbar principale",
|
|
28
|
+
},
|
|
29
|
+
decorators: [
|
|
30
|
+
(story) => html `<div
|
|
31
|
+
style="display: flex; justify-content: center; align-items: center; min-height: 100px;"
|
|
32
|
+
@click=${(e) => {
|
|
33
|
+
const tool = e.target.closest("z-tool");
|
|
34
|
+
if (tool && !tool.disabled && !tool.querySelector("z-toolbar")) {
|
|
35
|
+
tool.active = !tool.active;
|
|
36
|
+
}
|
|
37
|
+
}}
|
|
38
|
+
>
|
|
39
|
+
${story()}
|
|
40
|
+
</div>`,
|
|
41
|
+
],
|
|
42
|
+
};
|
|
43
|
+
export default StoryMeta;
|
|
44
|
+
export const Default = {
|
|
45
|
+
render: (args) => html `
|
|
46
|
+
<z-toolbar html-aria-label=${args.htmlAriaLabel}>
|
|
47
|
+
<z-tool
|
|
48
|
+
icon="gear"
|
|
49
|
+
tooltip="Impostazioni"
|
|
50
|
+
></z-tool>
|
|
51
|
+
<z-tool
|
|
52
|
+
icon="download"
|
|
53
|
+
tooltip="Scarica"
|
|
54
|
+
></z-tool>
|
|
55
|
+
<z-tool
|
|
56
|
+
icon="upload"
|
|
57
|
+
tooltip="Carica"
|
|
58
|
+
></z-tool>
|
|
59
|
+
</z-toolbar>
|
|
60
|
+
`,
|
|
61
|
+
};
|
|
62
|
+
export const WithDividers = {
|
|
63
|
+
render: (args) => html `
|
|
64
|
+
<z-toolbar html-aria-label=${args.htmlAriaLabel}>
|
|
65
|
+
<z-tool
|
|
66
|
+
icon="gear"
|
|
67
|
+
tooltip="Impostazioni"
|
|
68
|
+
></z-tool>
|
|
69
|
+
<z-tool
|
|
70
|
+
icon="chevron-up"
|
|
71
|
+
tooltip="Su"
|
|
72
|
+
></z-tool>
|
|
73
|
+
<z-tool
|
|
74
|
+
icon="chevron-down"
|
|
75
|
+
tooltip="Giù"
|
|
76
|
+
></z-tool>
|
|
77
|
+
<z-divider orientation="vertical"></z-divider>
|
|
78
|
+
<z-tool
|
|
79
|
+
icon="download"
|
|
80
|
+
tooltip="Scarica"
|
|
81
|
+
></z-tool>
|
|
82
|
+
<z-tool
|
|
83
|
+
icon="upload"
|
|
84
|
+
tooltip="Carica"
|
|
85
|
+
></z-tool>
|
|
86
|
+
<z-tool
|
|
87
|
+
icon="copy"
|
|
88
|
+
tooltip="Copia"
|
|
89
|
+
></z-tool>
|
|
90
|
+
</z-toolbar>
|
|
91
|
+
`,
|
|
92
|
+
};
|
|
93
|
+
export const WithNestedToolbar = {
|
|
94
|
+
render: (args) => html `
|
|
95
|
+
<div style="display: flex; justify-content: center; align-items: flex-start; min-height: 200px; padding-top: 20px;">
|
|
96
|
+
<z-toolbar html-aria-label=${args.htmlAriaLabel}>
|
|
97
|
+
<z-tool
|
|
98
|
+
icon="gear"
|
|
99
|
+
tooltip="Impostazioni"
|
|
100
|
+
>
|
|
101
|
+
<z-toolbar html-aria-label="Sotto-toolbar">
|
|
102
|
+
<z-tool
|
|
103
|
+
icon="chevron-up"
|
|
104
|
+
tooltip="Su"
|
|
105
|
+
></z-tool>
|
|
106
|
+
<z-tool
|
|
107
|
+
icon="chevron-down"
|
|
108
|
+
tooltip="Giù"
|
|
109
|
+
></z-tool>
|
|
110
|
+
<z-divider orientation="vertical"></z-divider>
|
|
111
|
+
<z-tool
|
|
112
|
+
icon="chevron-up"
|
|
113
|
+
tooltip="Su"
|
|
114
|
+
></z-tool>
|
|
115
|
+
</z-toolbar>
|
|
116
|
+
</z-tool>
|
|
117
|
+
<z-tool
|
|
118
|
+
icon="chevron-up"
|
|
119
|
+
tooltip="Su"
|
|
120
|
+
></z-tool>
|
|
121
|
+
<z-tool
|
|
122
|
+
icon="chevron-up"
|
|
123
|
+
tooltip="Su"
|
|
124
|
+
></z-tool>
|
|
125
|
+
<z-divider orientation="vertical"></z-divider>
|
|
126
|
+
<z-tool
|
|
127
|
+
icon="download"
|
|
128
|
+
tooltip="Scarica"
|
|
129
|
+
></z-tool>
|
|
130
|
+
<z-tool
|
|
131
|
+
icon="gear"
|
|
132
|
+
tooltip="Impostazioni"
|
|
133
|
+
>
|
|
134
|
+
<z-toolbar html-aria-label="Sotto-toolbar">
|
|
135
|
+
<z-tool
|
|
136
|
+
icon="chevron-up"
|
|
137
|
+
tooltip="Su"
|
|
138
|
+
></z-tool>
|
|
139
|
+
<z-tool
|
|
140
|
+
icon="chevron-down"
|
|
141
|
+
tooltip="Giù"
|
|
142
|
+
></z-tool>
|
|
143
|
+
<z-divider orientation="vertical"></z-divider>
|
|
144
|
+
<z-tool
|
|
145
|
+
icon="chevron-up"
|
|
146
|
+
tooltip="Su"
|
|
147
|
+
></z-tool>
|
|
148
|
+
</z-toolbar>
|
|
149
|
+
</z-tool>
|
|
150
|
+
<z-tool
|
|
151
|
+
icon="gear"
|
|
152
|
+
tooltip="Impostazioni"
|
|
153
|
+
>
|
|
154
|
+
<z-toolbar html-aria-label="Sotto-toolbar">
|
|
155
|
+
<z-tool
|
|
156
|
+
icon="chevron-up"
|
|
157
|
+
tooltip="Su"
|
|
158
|
+
></z-tool>
|
|
159
|
+
<z-tool
|
|
160
|
+
icon="chevron-down"
|
|
161
|
+
tooltip="Giù"
|
|
162
|
+
></z-tool>
|
|
163
|
+
<z-divider orientation="vertical"></z-divider>
|
|
164
|
+
<z-tool
|
|
165
|
+
icon="chevron-up"
|
|
166
|
+
tooltip="Su"
|
|
167
|
+
></z-tool>
|
|
168
|
+
</z-toolbar>
|
|
169
|
+
</z-tool>
|
|
170
|
+
<z-tool
|
|
171
|
+
icon="upload"
|
|
172
|
+
tooltip="Carica"
|
|
173
|
+
></z-tool>
|
|
174
|
+
</z-toolbar>
|
|
175
|
+
</div>
|
|
176
|
+
`,
|
|
177
|
+
};
|
|
178
|
+
export const ProgrammaticSubmenuClosure = {
|
|
179
|
+
render: (args) => html `
|
|
180
|
+
<div
|
|
181
|
+
style="display: flex; flex-direction: column; align-items: center; gap: 20px; min-height: 200px; padding-top: 20px;"
|
|
182
|
+
>
|
|
183
|
+
<z-toolbar
|
|
184
|
+
id="toolbar-close-demo"
|
|
185
|
+
html-aria-label=${args.htmlAriaLabel}
|
|
186
|
+
>
|
|
187
|
+
<z-tool
|
|
188
|
+
icon="gear"
|
|
189
|
+
tooltip="Impostazioni"
|
|
190
|
+
>
|
|
191
|
+
<z-toolbar html-aria-label="Sotto-toolbar">
|
|
192
|
+
<z-tool
|
|
193
|
+
icon="chevron-up"
|
|
194
|
+
tooltip="Su"
|
|
195
|
+
></z-tool>
|
|
196
|
+
<z-tool
|
|
197
|
+
icon="chevron-down"
|
|
198
|
+
tooltip="Giù"
|
|
199
|
+
></z-tool>
|
|
200
|
+
</z-toolbar>
|
|
201
|
+
</z-tool>
|
|
202
|
+
<z-tool
|
|
203
|
+
icon="download"
|
|
204
|
+
tooltip="Scarica"
|
|
205
|
+
></z-tool>
|
|
206
|
+
<z-tool
|
|
207
|
+
icon="upload"
|
|
208
|
+
tooltip="Carica"
|
|
209
|
+
></z-tool>
|
|
210
|
+
<z-divider orientation="vertical"></z-divider>
|
|
211
|
+
<z-tool
|
|
212
|
+
icon="copy"
|
|
213
|
+
tooltip="Copia"
|
|
214
|
+
>
|
|
215
|
+
<z-toolbar html-aria-label="Sotto-toolbar">
|
|
216
|
+
<z-tool
|
|
217
|
+
icon="chevron-up"
|
|
218
|
+
tooltip="Su"
|
|
219
|
+
></z-tool>
|
|
220
|
+
<z-tool
|
|
221
|
+
icon="chevron-down"
|
|
222
|
+
tooltip="Giù"
|
|
223
|
+
></z-tool>
|
|
224
|
+
</z-toolbar>
|
|
225
|
+
</z-tool>
|
|
226
|
+
<z-tool
|
|
227
|
+
icon="gear"
|
|
228
|
+
tooltip="Impostazioni 2"
|
|
229
|
+
></z-tool>
|
|
230
|
+
<z-tool
|
|
231
|
+
icon="download"
|
|
232
|
+
tooltip="Scarica 2"
|
|
233
|
+
></z-tool>
|
|
234
|
+
</z-toolbar>
|
|
235
|
+
<button
|
|
236
|
+
type="button"
|
|
237
|
+
onclick="this.parentElement.querySelector('z-toolbar').closeSubmenus()"
|
|
238
|
+
>
|
|
239
|
+
call closeSubmenus()
|
|
240
|
+
</button>
|
|
241
|
+
</div>
|
|
242
|
+
`,
|
|
243
|
+
};
|
|
244
|
+
export const ProgrammaticActivation = {
|
|
245
|
+
render: (args) => html `
|
|
246
|
+
<div
|
|
247
|
+
style="display: flex; flex-direction: column; align-items: center; gap: 20px; min-height: 200px; padding-top: 20px;"
|
|
248
|
+
>
|
|
249
|
+
<z-toolbar html-aria-label=${args.htmlAriaLabel}>
|
|
250
|
+
<z-tool
|
|
251
|
+
icon="gear"
|
|
252
|
+
tooltip="Impostazioni"
|
|
253
|
+
>
|
|
254
|
+
<z-toolbar html-aria-label="Sotto-toolbar">
|
|
255
|
+
<z-tool
|
|
256
|
+
icon="chevron-up"
|
|
257
|
+
tooltip="Su"
|
|
258
|
+
></z-tool>
|
|
259
|
+
<z-tool
|
|
260
|
+
icon="chevron-down"
|
|
261
|
+
tooltip="Giù"
|
|
262
|
+
></z-tool>
|
|
263
|
+
</z-toolbar>
|
|
264
|
+
</z-tool>
|
|
265
|
+
<z-tool
|
|
266
|
+
icon="download"
|
|
267
|
+
tooltip="Scarica"
|
|
268
|
+
></z-tool>
|
|
269
|
+
<z-tool
|
|
270
|
+
icon="upload"
|
|
271
|
+
tooltip="Carica"
|
|
272
|
+
></z-tool>
|
|
273
|
+
<z-divider orientation="vertical"></z-divider>
|
|
274
|
+
<z-tool
|
|
275
|
+
icon="copy"
|
|
276
|
+
tooltip="Copia"
|
|
277
|
+
></z-tool>
|
|
278
|
+
<z-tool
|
|
279
|
+
icon="gear"
|
|
280
|
+
tooltip="Impostazioni 2"
|
|
281
|
+
></z-tool>
|
|
282
|
+
<z-tool
|
|
283
|
+
icon="download"
|
|
284
|
+
tooltip="Scarica 2"
|
|
285
|
+
></z-tool>
|
|
286
|
+
</z-toolbar>
|
|
287
|
+
<div style="display: flex; gap: 8px; margin-top:50px;">
|
|
288
|
+
<button
|
|
289
|
+
type="button"
|
|
290
|
+
onclick="var toolbar = this.parentElement.previousElementSibling; var tools = toolbar.querySelectorAll(':scope > z-tool'); tools[0].open = !tools[0].open;"
|
|
291
|
+
>
|
|
292
|
+
toggle 1st tool (submenu)
|
|
293
|
+
</button>
|
|
294
|
+
<button
|
|
295
|
+
type="button"
|
|
296
|
+
onclick="var toolbar = this.parentElement.previousElementSibling; var tools = toolbar.querySelectorAll(':scope > z-tool'); tools[3].active = !tools[3].active;"
|
|
297
|
+
>
|
|
298
|
+
toggle 4th tool
|
|
299
|
+
</button>
|
|
300
|
+
</div>
|
|
301
|
+
</div>
|
|
302
|
+
`,
|
|
303
|
+
};
|
|
304
|
+
export const WithDisabledTool = {
|
|
305
|
+
render: (args) => html `
|
|
306
|
+
<z-toolbar html-aria-label=${args.htmlAriaLabel}>
|
|
307
|
+
<z-tool
|
|
308
|
+
icon="gear"
|
|
309
|
+
tooltip="Impostazioni"
|
|
310
|
+
></z-tool>
|
|
311
|
+
<z-tool
|
|
312
|
+
icon="download"
|
|
313
|
+
tooltip="Scarica"
|
|
314
|
+
disabled
|
|
315
|
+
></z-tool>
|
|
316
|
+
<z-tool
|
|
317
|
+
icon="upload"
|
|
318
|
+
tooltip="Carica"
|
|
319
|
+
></z-tool>
|
|
320
|
+
</z-toolbar>
|
|
321
|
+
`,
|
|
322
|
+
};
|
|
323
|
+
export const WithActiveTool = {
|
|
324
|
+
render: (args) => html `
|
|
325
|
+
<z-toolbar html-aria-label=${args.htmlAriaLabel}>
|
|
326
|
+
<z-tool
|
|
327
|
+
icon="gear"
|
|
328
|
+
tooltip="Impostazioni"
|
|
329
|
+
active
|
|
330
|
+
></z-tool>
|
|
331
|
+
<z-tool
|
|
332
|
+
icon="download"
|
|
333
|
+
tooltip="Scarica"
|
|
334
|
+
></z-tool>
|
|
335
|
+
<z-tool
|
|
336
|
+
icon="upload"
|
|
337
|
+
tooltip="Carica"
|
|
338
|
+
></z-tool>
|
|
339
|
+
</z-toolbar>
|
|
340
|
+
`,
|
|
341
|
+
};
|
|
342
|
+
export const MultilineMobile = {
|
|
343
|
+
parameters: {
|
|
344
|
+
viewport: {
|
|
345
|
+
defaultViewport: "mobile",
|
|
346
|
+
},
|
|
347
|
+
},
|
|
348
|
+
render: (args) => html `
|
|
349
|
+
<style>
|
|
350
|
+
.multiline-container {
|
|
351
|
+
--z-toolbar-columns: 4;
|
|
352
|
+
}
|
|
353
|
+
.inner-different-columns {
|
|
354
|
+
--z-toolbar-columns: 2;
|
|
355
|
+
}
|
|
356
|
+
</style>
|
|
357
|
+
<div
|
|
358
|
+
style="display: flex; justify-content: center; align-items: flex-start; min-height: 300px; padding-top: 150px;"
|
|
359
|
+
>
|
|
360
|
+
<z-toolbar
|
|
361
|
+
class="multiline-container"
|
|
362
|
+
html-aria-label=${args.htmlAriaLabel}
|
|
363
|
+
>
|
|
364
|
+
<z-tool
|
|
365
|
+
icon="gear"
|
|
366
|
+
tooltip="Impostazioni"
|
|
367
|
+
></z-tool>
|
|
368
|
+
<z-tool
|
|
369
|
+
icon="download"
|
|
370
|
+
tooltip="Scarica"
|
|
371
|
+
></z-tool>
|
|
372
|
+
<z-divider orientation="vertical"></z-divider>
|
|
373
|
+
<z-tool
|
|
374
|
+
icon="upload"
|
|
375
|
+
tooltip="Carica"
|
|
376
|
+
></z-tool>
|
|
377
|
+
<z-tool
|
|
378
|
+
icon="copy"
|
|
379
|
+
tooltip="Copia"
|
|
380
|
+
>
|
|
381
|
+
<z-toolbar
|
|
382
|
+
class="inner-different-columns"
|
|
383
|
+
html-aria-label="Sotto-toolbar copia"
|
|
384
|
+
>
|
|
385
|
+
<z-tool
|
|
386
|
+
icon="chevron-up"
|
|
387
|
+
tooltip="Su"
|
|
388
|
+
></z-tool>
|
|
389
|
+
<z-tool
|
|
390
|
+
icon="chevron-down"
|
|
391
|
+
tooltip="Giù"
|
|
392
|
+
></z-tool>
|
|
393
|
+
<z-tool
|
|
394
|
+
icon="chevron-up"
|
|
395
|
+
tooltip="Su"
|
|
396
|
+
></z-tool>
|
|
397
|
+
<z-tool
|
|
398
|
+
icon="chevron-up"
|
|
399
|
+
tooltip="Su"
|
|
400
|
+
></z-tool>
|
|
401
|
+
<z-tool
|
|
402
|
+
icon="chevron-down"
|
|
403
|
+
tooltip="Giù"
|
|
404
|
+
></z-tool>
|
|
405
|
+
</z-toolbar>
|
|
406
|
+
</z-tool>
|
|
407
|
+
<z-divider orientation="vertical"></z-divider>
|
|
408
|
+
<z-tool
|
|
409
|
+
icon="gear"
|
|
410
|
+
tooltip="Impostazioni 2"
|
|
411
|
+
></z-tool>
|
|
412
|
+
<z-tool
|
|
413
|
+
icon="download"
|
|
414
|
+
tooltip="Scarica 2"
|
|
415
|
+
></z-tool>
|
|
416
|
+
<z-tool
|
|
417
|
+
icon="upload"
|
|
418
|
+
tooltip="Carica 2"
|
|
419
|
+
></z-tool>
|
|
420
|
+
<z-tool
|
|
421
|
+
icon="copy"
|
|
422
|
+
tooltip="Copia 2"
|
|
423
|
+
></z-tool>
|
|
424
|
+
<z-tool
|
|
425
|
+
icon="gear"
|
|
426
|
+
tooltip="Impostazioni 3"
|
|
427
|
+
disabled
|
|
428
|
+
></z-tool>
|
|
429
|
+
<z-tool
|
|
430
|
+
icon="upload"
|
|
431
|
+
tooltip="Carica 3"
|
|
432
|
+
></z-tool>
|
|
433
|
+
</z-toolbar>
|
|
434
|
+
</div>
|
|
435
|
+
`,
|
|
436
|
+
};
|
|
437
|
+
//# sourceMappingURL=index.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../../../src/components/z-toolbar/index.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,iBAAiB,CAAC;AACzB,OAAO,SAAS,CAAC;AAEjB,MAAM,SAAS,GAAG;IAChB,KAAK,EAAE,UAAU;IACjB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,WAAW,EAAE;gBACX,SAAS,EAAE;oBACT,yGAAyG;oBACzG,EAAE;oBACF,kBAAkB;oBAClB,+QAA+Q;oBAC/Q,EAAE;oBACF,sCAAsC;oBACtC,iKAAiK;oBACjK,EAAE;oBACF,iDAAiD;oBACjD,wSAAwS;iBACzS,CAAC,IAAI,CAAC,IAAI,CAAC;aACb;SACF;KACF;IACD,IAAI,EAAE;QACJ,aAAa,EAAE,oBAAoB;KACpC;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CACR,IAAI,CAAA;;iBAEO,CAAC,CAAQ,EAAE,EAAE;YACpB,MAAM,IAAI,GAAI,CAAC,CAAC,MAAsB,CAAC,OAAO,CAAC,QAAQ,CAA4B,CAAC;YACpF,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC;gBAC/D,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;YAC7B,CAAC;QACH,CAAC;;UAEC,KAAK,EAAE;aACJ;KACV;CACuB,CAAC;AAE3B,eAAe,SAAS,CAAC;AAIzB,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;iCACS,IAAI,CAAC,aAAa;;;;;;;;;;;;;;GAchD;CACc,CAAC;AAElB,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;iCACS,IAAI,CAAC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BhD;CACc,CAAC;AAElB,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;;mCAEW,IAAI,CAAC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgFlD;CACc,CAAC;AAElB,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;0BAME,IAAI,CAAC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDzC;CACc,CAAC;AAElB,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;;;;mCAIW,IAAI,CAAC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDlD;CACc,CAAC;AAElB,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;iCACS,IAAI,CAAC,aAAa;;;;;;;;;;;;;;;GAehD;CACc,CAAC;AAElB,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;iCACS,IAAI,CAAC,aAAa;;;;;;;;;;;;;;;GAehD;CACc,CAAC;AAElB,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,UAAU,EAAE;QACV,QAAQ,EAAE;YACR,eAAe,EAAE,QAAQ;SAC1B;KACF;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;0BAcE,IAAI,CAAC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEzC;CACc,CAAC","sourcesContent":["import type {Meta, StoryObj} from \"@storybook/web-components\";\nimport {html} from \"lit\";\nimport {type ZToolbar} from \".\";\nimport \"../z-divider/index\";\nimport \"../z-tool/index\";\nimport \"./index\";\n\nconst StoryMeta = {\n title: \"ZToolbar\",\n component: \"z-toolbar\",\n parameters: {\n docs: {\n description: {\n component: [\n \"The `z-toolbar` component implements the WCAG toolbar pattern with roving tabindex keyboard navigation.\",\n \"\",\n \"### Active state\",\n \"The `active` state of each `z-tool` must be managed manually by the consumer. The component does not toggle `active` on click by itself. In these stories, a click listener (decorator) is applied to toggle `active` on tools without a submenu, for demonstration purposes.\",\n \"\",\n \"### Visual grouping with `z-divider`\",\n 'Use `<z-divider orientation=\"vertical\">` between tools to visually separate them into groups. On tablet viewports and below, dividers are automatically hidden.',\n \"\",\n \"### Multiline layout with `--z-toolbar-columns`\",\n \"Set the CSS custom property `--z-toolbar-columns` on a parent element to control the number of columns in the toolbar grid. When set, the toolbar switches to a grid layout on tablet viewports and below (max-width: 1151px), wrapping tools across multiple rows with a separator line between rows.\",\n ].join(\"\\n\"),\n },\n },\n },\n args: {\n htmlAriaLabel: \"Toolbar principale\",\n },\n decorators: [\n (story) =>\n html`<div\n style=\"display: flex; justify-content: center; align-items: center; min-height: 100px;\"\n @click=${(e: Event) => {\n const tool = (e.target as HTMLElement).closest(\"z-tool\") as HTMLZToolElement | null;\n if (tool && !tool.disabled && !tool.querySelector(\"z-toolbar\")) {\n tool.active = !tool.active;\n }\n }}\n >\n ${story()}\n </div>`,\n ],\n} satisfies Meta<ZToolbar>;\n\nexport default StoryMeta;\n\ntype Story = StoryObj<ZToolbar>;\n\nexport const Default = {\n render: (args) => html`\n <z-toolbar html-aria-label=${args.htmlAriaLabel}>\n <z-tool\n icon=\"gear\"\n tooltip=\"Impostazioni\"\n ></z-tool>\n <z-tool\n icon=\"download\"\n tooltip=\"Scarica\"\n ></z-tool>\n <z-tool\n icon=\"upload\"\n tooltip=\"Carica\"\n ></z-tool>\n </z-toolbar>\n `,\n} satisfies Story;\n\nexport const WithDividers = {\n render: (args) => html`\n <z-toolbar html-aria-label=${args.htmlAriaLabel}>\n <z-tool\n icon=\"gear\"\n tooltip=\"Impostazioni\"\n ></z-tool>\n <z-tool\n icon=\"chevron-up\"\n tooltip=\"Su\"\n ></z-tool>\n <z-tool\n icon=\"chevron-down\"\n tooltip=\"Giù\"\n ></z-tool>\n <z-divider orientation=\"vertical\"></z-divider>\n <z-tool\n icon=\"download\"\n tooltip=\"Scarica\"\n ></z-tool>\n <z-tool\n icon=\"upload\"\n tooltip=\"Carica\"\n ></z-tool>\n <z-tool\n icon=\"copy\"\n tooltip=\"Copia\"\n ></z-tool>\n </z-toolbar>\n `,\n} satisfies Story;\n\nexport const WithNestedToolbar = {\n render: (args) => html`\n <div style=\"display: flex; justify-content: center; align-items: flex-start; min-height: 200px; padding-top: 20px;\">\n <z-toolbar html-aria-label=${args.htmlAriaLabel}>\n <z-tool\n icon=\"gear\"\n tooltip=\"Impostazioni\"\n >\n <z-toolbar html-aria-label=\"Sotto-toolbar\">\n <z-tool\n icon=\"chevron-up\"\n tooltip=\"Su\"\n ></z-tool>\n <z-tool\n icon=\"chevron-down\"\n tooltip=\"Giù\"\n ></z-tool>\n <z-divider orientation=\"vertical\"></z-divider>\n <z-tool\n icon=\"chevron-up\"\n tooltip=\"Su\"\n ></z-tool>\n </z-toolbar>\n </z-tool>\n <z-tool\n icon=\"chevron-up\"\n tooltip=\"Su\"\n ></z-tool>\n <z-tool\n icon=\"chevron-up\"\n tooltip=\"Su\"\n ></z-tool>\n <z-divider orientation=\"vertical\"></z-divider>\n <z-tool\n icon=\"download\"\n tooltip=\"Scarica\"\n ></z-tool>\n <z-tool\n icon=\"gear\"\n tooltip=\"Impostazioni\"\n >\n <z-toolbar html-aria-label=\"Sotto-toolbar\">\n <z-tool\n icon=\"chevron-up\"\n tooltip=\"Su\"\n ></z-tool>\n <z-tool\n icon=\"chevron-down\"\n tooltip=\"Giù\"\n ></z-tool>\n <z-divider orientation=\"vertical\"></z-divider>\n <z-tool\n icon=\"chevron-up\"\n tooltip=\"Su\"\n ></z-tool>\n </z-toolbar>\n </z-tool>\n <z-tool\n icon=\"gear\"\n tooltip=\"Impostazioni\"\n >\n <z-toolbar html-aria-label=\"Sotto-toolbar\">\n <z-tool\n icon=\"chevron-up\"\n tooltip=\"Su\"\n ></z-tool>\n <z-tool\n icon=\"chevron-down\"\n tooltip=\"Giù\"\n ></z-tool>\n <z-divider orientation=\"vertical\"></z-divider>\n <z-tool\n icon=\"chevron-up\"\n tooltip=\"Su\"\n ></z-tool>\n </z-toolbar>\n </z-tool>\n <z-tool\n icon=\"upload\"\n tooltip=\"Carica\"\n ></z-tool>\n </z-toolbar>\n </div>\n `,\n} satisfies Story;\n\nexport const ProgrammaticSubmenuClosure = {\n render: (args) => html`\n <div\n style=\"display: flex; flex-direction: column; align-items: center; gap: 20px; min-height: 200px; padding-top: 20px;\"\n >\n <z-toolbar\n id=\"toolbar-close-demo\"\n html-aria-label=${args.htmlAriaLabel}\n >\n <z-tool\n icon=\"gear\"\n tooltip=\"Impostazioni\"\n >\n <z-toolbar html-aria-label=\"Sotto-toolbar\">\n <z-tool\n icon=\"chevron-up\"\n tooltip=\"Su\"\n ></z-tool>\n <z-tool\n icon=\"chevron-down\"\n tooltip=\"Giù\"\n ></z-tool>\n </z-toolbar>\n </z-tool>\n <z-tool\n icon=\"download\"\n tooltip=\"Scarica\"\n ></z-tool>\n <z-tool\n icon=\"upload\"\n tooltip=\"Carica\"\n ></z-tool>\n <z-divider orientation=\"vertical\"></z-divider>\n <z-tool\n icon=\"copy\"\n tooltip=\"Copia\"\n >\n <z-toolbar html-aria-label=\"Sotto-toolbar\">\n <z-tool\n icon=\"chevron-up\"\n tooltip=\"Su\"\n ></z-tool>\n <z-tool\n icon=\"chevron-down\"\n tooltip=\"Giù\"\n ></z-tool>\n </z-toolbar>\n </z-tool>\n <z-tool\n icon=\"gear\"\n tooltip=\"Impostazioni 2\"\n ></z-tool>\n <z-tool\n icon=\"download\"\n tooltip=\"Scarica 2\"\n ></z-tool>\n </z-toolbar>\n <button\n type=\"button\"\n onclick=\"this.parentElement.querySelector('z-toolbar').closeSubmenus()\"\n >\n call closeSubmenus()\n </button>\n </div>\n `,\n} satisfies Story;\n\nexport const ProgrammaticActivation = {\n render: (args) => html`\n <div\n style=\"display: flex; flex-direction: column; align-items: center; gap: 20px; min-height: 200px; padding-top: 20px;\"\n >\n <z-toolbar html-aria-label=${args.htmlAriaLabel}>\n <z-tool\n icon=\"gear\"\n tooltip=\"Impostazioni\"\n >\n <z-toolbar html-aria-label=\"Sotto-toolbar\">\n <z-tool\n icon=\"chevron-up\"\n tooltip=\"Su\"\n ></z-tool>\n <z-tool\n icon=\"chevron-down\"\n tooltip=\"Giù\"\n ></z-tool>\n </z-toolbar>\n </z-tool>\n <z-tool\n icon=\"download\"\n tooltip=\"Scarica\"\n ></z-tool>\n <z-tool\n icon=\"upload\"\n tooltip=\"Carica\"\n ></z-tool>\n <z-divider orientation=\"vertical\"></z-divider>\n <z-tool\n icon=\"copy\"\n tooltip=\"Copia\"\n ></z-tool>\n <z-tool\n icon=\"gear\"\n tooltip=\"Impostazioni 2\"\n ></z-tool>\n <z-tool\n icon=\"download\"\n tooltip=\"Scarica 2\"\n ></z-tool>\n </z-toolbar>\n <div style=\"display: flex; gap: 8px; margin-top:50px;\">\n <button\n type=\"button\"\n onclick=\"var toolbar = this.parentElement.previousElementSibling; var tools = toolbar.querySelectorAll(':scope > z-tool'); tools[0].open = !tools[0].open;\"\n >\n toggle 1st tool (submenu)\n </button>\n <button\n type=\"button\"\n onclick=\"var toolbar = this.parentElement.previousElementSibling; var tools = toolbar.querySelectorAll(':scope > z-tool'); tools[3].active = !tools[3].active;\"\n >\n toggle 4th tool\n </button>\n </div>\n </div>\n `,\n} satisfies Story;\n\nexport const WithDisabledTool = {\n render: (args) => html`\n <z-toolbar html-aria-label=${args.htmlAriaLabel}>\n <z-tool\n icon=\"gear\"\n tooltip=\"Impostazioni\"\n ></z-tool>\n <z-tool\n icon=\"download\"\n tooltip=\"Scarica\"\n disabled\n ></z-tool>\n <z-tool\n icon=\"upload\"\n tooltip=\"Carica\"\n ></z-tool>\n </z-toolbar>\n `,\n} satisfies Story;\n\nexport const WithActiveTool = {\n render: (args) => html`\n <z-toolbar html-aria-label=${args.htmlAriaLabel}>\n <z-tool\n icon=\"gear\"\n tooltip=\"Impostazioni\"\n active\n ></z-tool>\n <z-tool\n icon=\"download\"\n tooltip=\"Scarica\"\n ></z-tool>\n <z-tool\n icon=\"upload\"\n tooltip=\"Carica\"\n ></z-tool>\n </z-toolbar>\n `,\n} satisfies Story;\n\nexport const MultilineMobile = {\n parameters: {\n viewport: {\n defaultViewport: \"mobile\",\n },\n },\n render: (args) => html`\n <style>\n .multiline-container {\n --z-toolbar-columns: 4;\n }\n .inner-different-columns {\n --z-toolbar-columns: 2;\n }\n </style>\n <div\n style=\"display: flex; justify-content: center; align-items: flex-start; min-height: 300px; padding-top: 150px;\"\n >\n <z-toolbar\n class=\"multiline-container\"\n html-aria-label=${args.htmlAriaLabel}\n >\n <z-tool\n icon=\"gear\"\n tooltip=\"Impostazioni\"\n ></z-tool>\n <z-tool\n icon=\"download\"\n tooltip=\"Scarica\"\n ></z-tool>\n <z-divider orientation=\"vertical\"></z-divider>\n <z-tool\n icon=\"upload\"\n tooltip=\"Carica\"\n ></z-tool>\n <z-tool\n icon=\"copy\"\n tooltip=\"Copia\"\n >\n <z-toolbar\n class=\"inner-different-columns\"\n html-aria-label=\"Sotto-toolbar copia\"\n >\n <z-tool\n icon=\"chevron-up\"\n tooltip=\"Su\"\n ></z-tool>\n <z-tool\n icon=\"chevron-down\"\n tooltip=\"Giù\"\n ></z-tool>\n <z-tool\n icon=\"chevron-up\"\n tooltip=\"Su\"\n ></z-tool>\n <z-tool\n icon=\"chevron-up\"\n tooltip=\"Su\"\n ></z-tool>\n <z-tool\n icon=\"chevron-down\"\n tooltip=\"Giù\"\n ></z-tool>\n </z-toolbar>\n </z-tool>\n <z-divider orientation=\"vertical\"></z-divider>\n <z-tool\n icon=\"gear\"\n tooltip=\"Impostazioni 2\"\n ></z-tool>\n <z-tool\n icon=\"download\"\n tooltip=\"Scarica 2\"\n ></z-tool>\n <z-tool\n icon=\"upload\"\n tooltip=\"Carica 2\"\n ></z-tool>\n <z-tool\n icon=\"copy\"\n tooltip=\"Copia 2\"\n ></z-tool>\n <z-tool\n icon=\"gear\"\n tooltip=\"Impostazioni 3\"\n disabled\n ></z-tool>\n <z-tool\n icon=\"upload\"\n tooltip=\"Carica 3\"\n ></z-tool>\n </z-toolbar>\n </div>\n `,\n} satisfies Story;\n"]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
:host,
|
|
2
|
+
* {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
:host {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
padding: 0;
|
|
10
|
+
border: var(--border-size-small) solid var(--color-surface03);
|
|
11
|
+
background-color: var(--color-surface01);
|
|
12
|
+
border-radius: var(--border-radius);
|
|
13
|
+
box-shadow: var(--shadow-4);
|
|
14
|
+
gap: calc(var(--space-unit) / 2);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
::slotted(z-divider) {
|
|
18
|
+
height: calc(var(--space-unit) * 4.5) !important;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@media (max-width: 767px) {
|
|
22
|
+
:host {
|
|
23
|
+
--z-toolbar-columns: 8;
|
|
24
|
+
|
|
25
|
+
position: relative;
|
|
26
|
+
display: inline-grid;
|
|
27
|
+
align-items: stretch;
|
|
28
|
+
background: repeating-linear-gradient(
|
|
29
|
+
to bottom,
|
|
30
|
+
transparent 0,
|
|
31
|
+
transparent calc(var(--space-unit) * 5.5),
|
|
32
|
+
var(--color-surface03) calc(var(--space-unit) * 5.5),
|
|
33
|
+
var(--color-surface03) calc(var(--space-unit) * 5.5 + 1px)
|
|
34
|
+
)
|
|
35
|
+
center / calc(100% - var(--space-unit)) 100% no-repeat var(--color-surface01);
|
|
36
|
+
column-gap: calc(var(--space-unit) / 2);
|
|
37
|
+
grid-template-columns: repeat(var(--z-toolbar-columns, auto-fill), auto);
|
|
38
|
+
row-gap: var(--border-size-small);
|
|
39
|
+
|
|
40
|
+
/* Overrides z-tool submenu positioning */
|
|
41
|
+
--z-tool-host-position: static;
|
|
42
|
+
--z-tool-submenu-top: auto;
|
|
43
|
+
--z-tool-submenu-bottom: calc(100% + calc(var(--space-unit) / 2));
|
|
44
|
+
--z-tool-submenu-left: 0;
|
|
45
|
+
--z-tool-submenu-transform: none;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
::slotted(z-divider) {
|
|
49
|
+
display: none !important;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
::slotted(z-tool) {
|
|
53
|
+
border-radius: var(--border-radius);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -20,7 +20,7 @@ export class ZTooltip {
|
|
|
20
20
|
this.open = this.popoverEl.open;
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (h("z-popover", { key: '
|
|
23
|
+
return (h("z-popover", { key: 'fe8da17a58d70db3756fb35f8230d95b4546ee8a', ref: (el) => (this.popoverEl = el), bindTo: this.bindTo, open: this.open, position: this.position, closable: this.closable, center: true, showArrow: true }, h("slot", { key: 'cc8f284849ce1a08a6fdbe2b521006babd87de24' })));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "z-tooltip"; }
|
|
26
26
|
static get encapsulation() { return "shadow"; }
|
|
@@ -33,7 +33,7 @@ export class ZMyzCardComponent {
|
|
|
33
33
|
return elemClasses;
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
|
-
return (h("div", { key: '
|
|
36
|
+
return (h("div", { key: '7adb7b75ea965adc868514cf96d3098522d6b4bb', class: this.retrieveClass(), tabindex: "0" }, h("slot", { key: 'b1a3947eee9d39c8677e3e37b9f5a9da6887e7a1' })));
|
|
37
37
|
}
|
|
38
38
|
static get is() { return "z-myz-card"; }
|
|
39
39
|
static get encapsulation() { return "shadow"; }
|
|
@@ -46,7 +46,7 @@ export class ZMyzCardAlert {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
render() {
|
|
49
|
-
return (h("div", { key: '
|
|
49
|
+
return (h("div", { key: '78631a84365b1c5c436dde0fd52b2c2866deebfe', class: "alert-external-wrapper " + this.retrieveClass() }, h("z-alert", { key: '8e54a3f758e17f6fff72efdd994c00a237965153', type: this.getAlertType() }, h("div", { key: '17029eac681c851ce079a4471b229f105ac018ad', class: "relative-container" }, h("z-icon", { key: 'bbbe8c42c16d3571e5acdd56d3c2332a2eb36c18', name: this.iconname, width: 18, height: 18, class: this.retrieveClass() }), h("span", { key: '7ca5d395e3631b20f50b9cd62724a56721f3ec77', class: "content-text" }, this.contenttext), this.actiontext && !!this.actiontext.trim().length && (h("span", { key: 'ac7627ad12844fa386e550d48ac0267579e3a2e0', role: "button", tabindex: "0", class: "content-action", onClick: (e) => {
|
|
50
50
|
this.handleActionButtonClick(e);
|
|
51
51
|
}, onKeyPress: (e) => {
|
|
52
52
|
this.handleSpaceKeyPress(e);
|
|
@@ -5,7 +5,7 @@ import { h } from "@stencil/core";
|
|
|
5
5
|
*/
|
|
6
6
|
export class ZMyzCardBody {
|
|
7
7
|
render() {
|
|
8
|
-
return (h("div", { key: '
|
|
8
|
+
return (h("div", { key: '0d02c2eac0ea628074ca649483b983e9c32673b7' }, h("slot", { key: '18354bf9d35e688c4ec5d6be8fe4e961dd5152e6', name: "alert" }), h("slot", { key: 'e81ab31f9de5bcbfb71b01e4a3578ec990a6cee2', name: "cover" })));
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "z-myz-card-body"; }
|
|
11
11
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,7 +10,7 @@ export class ZMyzCardCover {
|
|
|
10
10
|
this.img = this.defaultimg;
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (h("img", { key: '
|
|
13
|
+
return (h("img", { key: '8e57d894119bd3c99b76a26b87f31856670aabec', class: this.faded && "faded", onError: this.hadleOnImageError.bind(this), alt: this.titolo, src: this.img }));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "z-myz-card-cover"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -21,7 +21,7 @@ export class ZMyzCardDictionary {
|
|
|
21
21
|
this.cardFlipped.emit(showBack);
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return (h("div", { key: '
|
|
24
|
+
return (h("div", { key: '4a22e906f15a897300c47195338a4ac7a8d097e0' }, h("z-myz-card", { key: '10ed7010f036216a498600fd7203ffb12c9dcdbe' }, h("z-myz-card-header", { key: 'df5a2bacb28913152f3f26172c6de9ea284722b1', titolo: this.name }), h("div", { key: 'df91b83426145ccf632233e2c0443e4f48c8b435', class: `content ${this.flipped ? "flipped" : ""}` }, h("div", { key: 'dfc0904493c116f39fd773fa93bac35eb8291c56', class: "front" }, h("z-myz-card-body", { key: '92c03400d1bafe40b1832cc5385d234acdcb589d' }, h("z-myz-card-cover", { key: 'de77df38946fa1dfcea760e46c371474bc034515', slot: "cover", titolo: this.name, img: this.cover, faded: this.disabled })), h("z-button", { key: 'c01d012aab0f5fe885482b3cc56614f1944faa95', class: { "hide-info": this.hideinfobtn }, variant: ButtonVariant.SECONDARY, icon: "informationsource", size: ButtonSize.X_SMALL, onClick: () => this.flipCard(true), disabled: this.flipped }, this.flipbuttonlabel)), h("div", { key: '8ce8e9790fa052fc7fcbd82063b77bbce10e2eb4', class: "back" }, h("slot", { key: '8f8136511b5e5e297d09e40f244d77df22e90dfb', name: "info" }))), h("slot", { key: 'bb52dcbe9f214bb84159a0d271d16a35978b82ac' }))));
|
|
25
25
|
}
|
|
26
26
|
static get is() { return "z-myz-card-dictionary"; }
|
|
27
27
|
static get encapsulation() { return "shadow"; }
|
|
@@ -59,7 +59,7 @@ export class ZMyzCardFooter {
|
|
|
59
59
|
return this.host.querySelector("[slot=list] > li a");
|
|
60
60
|
}
|
|
61
61
|
render() {
|
|
62
|
-
return (h("div", { key: '
|
|
62
|
+
return (h("div", { key: '83e5307ed8967021822985e89efa8558d0018e72', class: Object.assign(Object.assign({}, this.retrieveClass()), { wrapper: true }) }, h("footer", { key: 'cf70e9a043cb396ae4aabc3f8e01d1dcfa3d5665', class: this.retrieveClass(), onTransitionEnd: (e) => this.footerTransitionHandler(e) }, h("span", { key: 'd6bdb1b37ad753489715fafdc5304de27bf85edc', class: "toggle" }, h("slot", { key: 'b35d85cf87e3cd59d9989c1c7d4d7139fbc4d549', name: "toggle" })), this.titolo && h("p", { key: '36ad25e514b88f22927ee74d4a0a81ccfe52cc62', class: { "custom-content": this.customContent } }, this.titolo), h("div", { key: '56c2b85852b762e305a69a7f977f2a8fb7ec12a3', class: { "content": true, "custom-content": this.customContent } }, h("div", { key: '1cbc7add9f6238292fc9ea7567a51ccfc62b46c7' }, h("p", { key: 'c0404f81e382330d6e56320f02aceee17e085926', class: "authors", ref: (el) => (this.ellipsisAuthors = el) }, h("span", { key: '0ec1e3a90d09bc379b34269b276da18e3a4f9388', title: this.getTitleAuthors() }, h("span", { key: '8d65743c8185c0ee4eb3c071f535eb5cda8dabab', "aria-description": "Autori", class: "bold" }, this.autori))), h("p", { key: '744e7e705826acfc3f2a9f9305250a0ecb293274', class: "year-isbn" }, h("span", { key: '9d29d231ed9186ffeb7376cf947613a581b626da', class: "isbn" }, h("span", { key: 'b3f8863a8d5e21438dfcaef4394c2f92ae513913' }, h("span", { key: 'b88062286041d060510ff4d17362a2f29485d15f', "aria-description": "ISBN edizione cartacea", class: "bold" }, this.isbn), " ", "(ed. cartacea)")))), h("div", { key: 'ded3e83f86629e34067e1dd316e54427b65cac6f', class: `slot-handler ${this.isOpen ? "visible" : "hidden"}` }, h("slot", { key: 'a5239567c931b5b880eef53a09e934dd8e7b65de', name: "list" })))), this.customContent && h("slot", { key: '42670c82172f6f86102f0d51209e2297cdf2c338', name: "content" })));
|
|
63
63
|
}
|
|
64
64
|
static get is() { return "z-myz-card-footer"; }
|
|
65
65
|
static get encapsulation() { return "shadow"; }
|
|
@@ -5,7 +5,7 @@ import { h } from "@stencil/core";
|
|
|
5
5
|
*/
|
|
6
6
|
export class ZMyzCardFooterSections {
|
|
7
7
|
render() {
|
|
8
|
-
return (h("div", { key: '
|
|
8
|
+
return (h("div", { key: '4376492df8f4ac40ddb747fbb84702d7306a087d' }, h("footer", { key: '65ad57d32ecfa342c12900d2341c120fb2b13287' }, h("div", { key: 'a76dc6bd6b6e0702a0290f19226a5545993b8d87', class: "top" }, h("slot", { key: 'bce482d729d4f3d3e74eee129994e7d4593e6c8e', name: "top" })), h("div", { key: '8e440e41d186ffc5673bf0dcf0dc99fff504c043', class: "bottom" }, h("slot", { key: '8b685dd25a9049c960aa2272ced67556a3490654', name: "bottom" })))));
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "z-myz-card-footer-sections"; }
|
|
11
11
|
static get encapsulation() { return "shadow"; }
|
|
@@ -30,7 +30,7 @@ export class ZMyzCardHeader {
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
|
-
return (h("header", { key: '
|
|
33
|
+
return (h("header", { key: '3441319103ffb2f4a1097b78233793b57f5cb601', class: this.retrieveClass() }, h("slot", { key: 'bade30d0e781d514d7280971c673091c6831f1a2', name: "aria-heading" }), h("span", { key: 'eee042b64a4aa2e01af89f0ebea2a93ef6df7c14', class: "card-title", ref: (el) => (this.ellipsis = el), title: this.getTitle() }, this.titolo), h("slot", { key: 'c94d1b4a500ab3efcb19cdf26652580d0d054a84', name: "icon" })));
|
|
34
34
|
}
|
|
35
35
|
static get is() { return "z-myz-card-header"; }
|
|
36
36
|
static get encapsulation() { return "shadow"; }
|
|
@@ -6,7 +6,7 @@ export class ZMyzCardIcon {
|
|
|
6
6
|
this.ariaLabel = "";
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
|
-
return (h("button", { key: '
|
|
9
|
+
return (h("button", { key: '9635ccd0f31e2fdf3e23cb14093b5eba6849c398', disabled: this.isdisabled, "aria-label": this.ariaLabel }, h("span", { key: 'de736d5eb1390564e2ffafb5a250594c8cf7a880' }, h("z-icon", { key: 'f93ea254dc71bf5ffae324ebab7bc467f511e403', name: this.icon, width: 16, height: 16 }))));
|
|
10
10
|
}
|
|
11
11
|
static get is() { return "z-myz-card-icon"; }
|
|
12
12
|
static get encapsulation() { return "shadow"; }
|