@zanichelli/albe-web-components 18.4.0-rc7 → 18.4.1

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 (90) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/dist/cjs/index-96af6326.js +4 -0
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{utils-a6d8a0b7.js → utils-123c371d.js} +1 -1
  5. package/dist/cjs/{utils-a6d8a0b7.js.map → utils-123c371d.js.map} +1 -1
  6. package/dist/cjs/web-components-library.cjs.js +1 -1
  7. package/dist/cjs/z-app-header_12.cjs.entry.js +3 -3
  8. package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
  9. package/dist/cjs/z-date-picker.cjs.entry.js +1 -1
  10. package/dist/cjs/z-range-picker.cjs.entry.js +1 -1
  11. package/dist/cjs/z-result-card.cjs.entry.js +80 -0
  12. package/dist/cjs/z-result-card.cjs.entry.js.map +1 -0
  13. package/dist/collection/collection-manifest.json +1 -0
  14. package/dist/collection/components/css-components/z-cover/index.stories.js +40 -0
  15. package/dist/collection/components/css-components/z-cover/index.stories.js.map +1 -0
  16. package/dist/collection/components/css-components/z-cover/styles.css +69 -0
  17. package/dist/collection/components/file-upload/z-file-upload/index.js +1 -1
  18. package/dist/collection/components/result-card/z-result-card/index.js +184 -0
  19. package/dist/collection/components/result-card/z-result-card/index.js.map +1 -0
  20. package/dist/collection/components/result-card/z-result-card/styles.css +147 -0
  21. package/dist/collection/components/result-card/z-result-card/z-result-card.stories.js +98 -0
  22. package/dist/collection/components/result-card/z-result-card/z-result-card.stories.js.map +1 -0
  23. package/dist/collection/components/z-button/index.js +7 -7
  24. package/dist/collection/components/z-button/index.js.map +1 -1
  25. package/dist/components/index.d.ts +2 -0
  26. package/dist/components/index.js +1 -0
  27. package/dist/components/index.js.map +1 -1
  28. package/dist/components/index4.js +4 -4
  29. package/dist/components/index4.js.map +1 -1
  30. package/dist/components/z-result-card.d.ts +11 -0
  31. package/dist/components/z-result-card.js +107 -0
  32. package/dist/components/z-result-card.js.map +1 -0
  33. package/dist/esm/index-c8ceadeb.js +4 -0
  34. package/dist/esm/loader.js +1 -1
  35. package/dist/esm/{utils-ae56fbe5.js → utils-5e53516d.js} +1 -1
  36. package/dist/esm/{utils-ae56fbe5.js.map → utils-5e53516d.js.map} +1 -1
  37. package/dist/esm/web-components-library.js +1 -1
  38. package/dist/esm/z-app-header_12.entry.js +3 -3
  39. package/dist/esm/z-app-header_12.entry.js.map +1 -1
  40. package/dist/esm/z-date-picker.entry.js +1 -1
  41. package/dist/esm/z-range-picker.entry.js +1 -1
  42. package/dist/esm/z-result-card.entry.js +76 -0
  43. package/dist/esm/z-result-card.entry.js.map +1 -0
  44. package/dist/types/components/css-components/z-cover/index.stories.d.ts +12 -0
  45. package/dist/types/components/result-card/z-result-card/index.d.ts +41 -0
  46. package/dist/types/components/result-card/z-result-card/z-result-card.stories.d.ts +10 -0
  47. package/dist/types/components/z-button/index.d.ts +2 -2
  48. package/dist/types/components.d.ts +65 -4
  49. package/{www/build/p-6a48d114.entry.js → dist/web-components-library/p-290f832a.entry.js} +2 -2
  50. package/dist/web-components-library/p-302041ec.entry.js +2 -0
  51. package/dist/web-components-library/p-302041ec.entry.js.map +1 -0
  52. package/{www/build/p-0bf8d989.entry.js → dist/web-components-library/p-8e43f5ee.entry.js} +2 -2
  53. package/dist/web-components-library/p-c419dba3.entry.js +2 -0
  54. package/dist/web-components-library/p-c419dba3.entry.js.map +1 -0
  55. package/dist/web-components-library/{p-00e88046.js → p-ef2484b8.js} +1 -1
  56. package/dist/web-components-library/web-components-library.css +70 -0
  57. package/dist/web-components-library/web-components-library.esm.js +1 -1
  58. package/dist/web-components-library/web-components-library.esm.js.map +1 -1
  59. package/package.json +1 -1
  60. package/react/components.d.ts +1 -0
  61. package/react/components.js +2 -1
  62. package/react/components.js.map +1 -1
  63. package/{dist/web-components-library/p-6a48d114.entry.js → www/build/p-290f832a.entry.js} +2 -2
  64. package/www/build/p-302041ec.entry.js +2 -0
  65. package/www/build/p-302041ec.entry.js.map +1 -0
  66. package/{dist/web-components-library/p-0bf8d989.entry.js → www/build/p-8e43f5ee.entry.js} +2 -2
  67. package/www/build/{p-dda8d321.css → p-92615446.css} +70 -0
  68. package/www/build/p-992ea73d.js +2 -0
  69. package/www/build/p-c419dba3.entry.js +2 -0
  70. package/www/build/p-c419dba3.entry.js.map +1 -0
  71. package/www/build/{p-00e88046.js → p-ef2484b8.js} +1 -1
  72. package/www/build/web-components-library.css +70 -0
  73. package/www/build/web-components-library.esm.js +1 -1
  74. package/www/build/web-components-library.esm.js.map +1 -1
  75. package/www/index.html +1 -1
  76. package/dist/web-components-library/p-550a5e46.entry.js +0 -2
  77. package/dist/web-components-library/p-550a5e46.entry.js.map +0 -1
  78. package/www/build/p-48f5133e.js +0 -2
  79. package/www/build/p-550a5e46.entry.js +0 -2
  80. package/www/build/p-550a5e46.entry.js.map +0 -1
  81. /package/dist/types/{home/runner/work/design-system → Users/dario/Progetti/Zanichelli}/design-system/.stencil/docs/grid/index.stories.d.ts +0 -0
  82. /package/dist/types/{home/runner/work/design-system → Users/dario/Progetti/Zanichelli}/design-system/.stencil/docs/iconset/index.stories.d.ts +0 -0
  83. /package/dist/types/{home/runner/work/design-system → Users/dario/Progetti/Zanichelli}/design-system/.stencil/docs/themes/index.stories.d.ts +0 -0
  84. /package/dist/types/{home/runner/work/design-system → Users/dario/Progetti/Zanichelli}/design-system/.stencil/docs/typography/index.stories.d.ts +0 -0
  85. /package/dist/web-components-library/{p-6a48d114.entry.js.map → p-290f832a.entry.js.map} +0 -0
  86. /package/dist/web-components-library/{p-0bf8d989.entry.js.map → p-8e43f5ee.entry.js.map} +0 -0
  87. /package/dist/web-components-library/{p-00e88046.js.map → p-ef2484b8.js.map} +0 -0
  88. /package/www/build/{p-6a48d114.entry.js.map → p-290f832a.entry.js.map} +0 -0
  89. /package/www/build/{p-0bf8d989.entry.js.map → p-8e43f5ee.entry.js.map} +0 -0
  90. /package/www/build/{p-00e88046.js.map → p-ef2484b8.js.map} +0 -0
@@ -0,0 +1,147 @@
1
+ :host {
2
+ display: flex;
3
+ overflow: hidden;
4
+ min-width: 0;
5
+ height: calc(174px - var(--space-unit) * 2);
6
+ max-height: calc(174px - var(--space-unit) * 2);
7
+ padding: var(--space-unit);
8
+ border: var(--border-size-medium) solid var(--color-surface02);
9
+ border-radius: var(--border-size-large);
10
+ cursor: pointer;
11
+ font-family: var(--font-family-sans);
12
+ }
13
+
14
+ :host(:focus:focus-visible) {
15
+ z-index: 1;
16
+ box-shadow: var(--shadow-focus-primary);
17
+ outline: none;
18
+ }
19
+
20
+ :host(.info-card:focus:focus-visible) {
21
+ z-index: 1;
22
+ box-shadow: var(--shadow-focus-primary);
23
+ outline: none;
24
+ }
25
+
26
+ .info-container {
27
+ display: flex;
28
+ overflow: hidden;
29
+ min-width: 0;
30
+ flex: 1;
31
+ flex-direction: column;
32
+ padding-left: calc(var(--space-unit) * 2);
33
+ }
34
+
35
+ .authors-label {
36
+ overflow: hidden;
37
+ color: var(--color-default-text);
38
+ font-size: var(--font-size-2);
39
+ font-weight: var(--font-rg);
40
+ text-overflow: ellipsis;
41
+ white-space: nowrap;
42
+ }
43
+
44
+ .card-title {
45
+ display: -webkit-box;
46
+ overflow: hidden;
47
+ -webkit-box-orient: vertical;
48
+ font-size: var(--font-size-3);
49
+ font-weight: var(--font-bd);
50
+ -webkit-line-clamp: 2;
51
+ line-clamp: 2;
52
+ line-height: 1.5;
53
+ word-break: break-word;
54
+ }
55
+
56
+ .card-subtitle {
57
+ overflow: hidden;
58
+ color: var(--color-default-text);
59
+ text-overflow: ellipsis;
60
+ white-space: nowrap;
61
+ }
62
+
63
+ .card-subtitle.info-subtitle {
64
+ display: -webkit-box;
65
+ overflow: hidden;
66
+ -webkit-box-orient: vertical;
67
+ -webkit-line-clamp: 2;
68
+ line-clamp: 2;
69
+ line-height: 1.2;
70
+ white-space: normal;
71
+ word-break: break-word;
72
+ }
73
+
74
+ .tags-container {
75
+ display: flex;
76
+ max-width: 100%;
77
+ flex-wrap: wrap;
78
+ margin-top: calc(var(--space-unit) * 2);
79
+ gap: var(--space-unit);
80
+ }
81
+
82
+ .volumes-label {
83
+ display: flex;
84
+ height: auto;
85
+ flex-direction: column;
86
+ margin-top: auto;
87
+ color: var(--color-default-text);
88
+ font-size: var(--font-size-1);
89
+ }
90
+
91
+ :host(.info-card) {
92
+ display: flex;
93
+ height: calc(76px - var(--space-unit) * 2);
94
+ max-height: calc(76px - var(--space-unit) * 2);
95
+ }
96
+
97
+ .info-icon-column {
98
+ display: flex;
99
+ width: 50px;
100
+ height: 100%;
101
+ align-items: center;
102
+ justify-content: center;
103
+ }
104
+
105
+ .info-icon-container {
106
+ display: flex;
107
+ width: 34px;
108
+ height: 34px;
109
+ align-items: center;
110
+ justify-content: center;
111
+ margin-bottom: calc(var(--space-unit) * 3);
112
+ background-color: var(--gray50);
113
+ border-radius: var(--border-size-large);
114
+ }
115
+
116
+ .card-title.info-title {
117
+ display: -webkit-box;
118
+ overflow: hidden;
119
+ min-width: 0;
120
+ max-width: 100%;
121
+ max-height: 2.4em;
122
+ margin-top: 0;
123
+ margin-bottom: 4px;
124
+ -webkit-box-orient: vertical;
125
+ font-size: var(--font-size-3);
126
+ font-weight: var(--font-bd);
127
+ -webkit-line-clamp: 1;
128
+ line-clamp: 1;
129
+ line-height: 1.2;
130
+ word-break: break-word;
131
+ }
132
+
133
+ .info-icon {
134
+ width: 18px;
135
+ height: 18px;
136
+ color: var(--color-default-text);
137
+ }
138
+
139
+ @media (max-width: 768px) {
140
+ .card-title {
141
+ display: block;
142
+ overflow: hidden;
143
+ line-height: normal;
144
+ text-overflow: ellipsis;
145
+ white-space: nowrap;
146
+ }
147
+ }
@@ -0,0 +1,98 @@
1
+ import { html } from "lit";
2
+ import "./index";
3
+ const StoryMeta = {
4
+ title: "ZResultCard",
5
+ component: "z-result-card",
6
+ argTypes: {
7
+ cardTitle: { control: "text" },
8
+ cardSubtitle: { control: "text" },
9
+ authors: { control: "text" },
10
+ cover: { control: "text" },
11
+ hasMultipleCovers: { control: "boolean" },
12
+ isInfoCard: { control: "boolean" },
13
+ },
14
+ };
15
+ export default StoryMeta;
16
+ const args = {
17
+ cardTitle: "Title",
18
+ cardSubtitle: "Subtitle",
19
+ authors: "John Doe",
20
+ cover: "https://place.abh.ai/s3fs-public/placeholder/DSC_0199_400x400.JPG",
21
+ hasMultipleCovers: false,
22
+ isInfoCard: false,
23
+ };
24
+ export const SingleCover = {
25
+ args: Object.assign({}, args),
26
+ render: (args) => html `
27
+ <z-result-card
28
+ .cardTitle=${args.cardTitle}
29
+ .cardSubtitle=${args.cardSubtitle}
30
+ .authors=${args.authors}
31
+ .cover=${args.cover}
32
+ .hasMultipleCovers=${args.hasMultipleCovers}
33
+ .isInfoCard=${args.isInfoCard}
34
+ >
35
+ <span slot="tags">Example tag</span>
36
+ <span slot="volumes">2 volumes</span>
37
+ </z-result-card>
38
+ `,
39
+ };
40
+ export const MultipleCovers = {
41
+ args: Object.assign(Object.assign({}, args), { hasMultipleCovers: true }),
42
+ render: (args) => html `
43
+ <z-result-card
44
+ .cardTitle=${args.cardTitle}
45
+ .cardSubtitle=${args.cardSubtitle}
46
+ .authors=${args.authors}
47
+ .cover=${args.cover}
48
+ .hasMultipleCovers=${args.hasMultipleCovers}
49
+ .isInfoCard=${args.isInfoCard}
50
+ >
51
+ <span slot="tags">Example tag</span>
52
+ <span slot="tags">Example tag</span>
53
+ <span slot="volumes">2 volumes</span>
54
+ </z-result-card>
55
+ `,
56
+ };
57
+ export const LongTitleAndSubtitle = {
58
+ args: Object.assign(Object.assign({}, args), { cardTitle: "This is a very long title that should wrap to the next line if it exceeds the width of the card, it goes on two rows for desktop devices and one row for mobile", cardSubtitle: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus tincidunt maximus tellus, eget dapibus nulla blandit sed. Nullam augue ipsum, mattis sit amet diam ut, finibus posuere libero. Fusce nec erat eu risus fermentum mattis. Nunc volutpat viverra felis, eu iaculis ipsum tempus mattis. Phasellus euismod quam eget nisl pellentesque.", hasMultipleCovers: true }),
59
+ render: (args) => html `
60
+ <z-result-card
61
+ .cardTitle=${args.cardTitle}
62
+ .cardSubtitle=${args.cardSubtitle}
63
+ .authors=${args.authors}
64
+ .cover=${args.cover}
65
+ .hasMultipleCovers=${args.hasMultipleCovers}
66
+ .isInfoCard=${args.isInfoCard}
67
+ >
68
+ <span slot="tags">Example tag</span>
69
+ <span slot="volumes">2 volumes</span>
70
+ </z-result-card>
71
+ `,
72
+ };
73
+ export const OnlyTitleAndSubtitle = {
74
+ args: Object.assign(Object.assign({}, args), { author: undefined }),
75
+ render: (args) => html `
76
+ <z-result-card
77
+ .cardTitle=${args.cardTitle}
78
+ .cardSubtitle=${args.cardSubtitle}
79
+ .cover=${args.cover}
80
+ .hasMultipleCovers=${args.hasMultipleCovers}
81
+ .isInfoCard=${args.isInfoCard}
82
+ />
83
+ `,
84
+ };
85
+ export const InfoCard = {
86
+ args: Object.assign(Object.assign({}, args), { cardTitle: "Info Card Title", cardSubtitle: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus tincidunt maximus tellus, eget dapibus nulla blandit sed. Nullam augue ipsum, mattis sit amet diam ut, finibus posuere libero. Fusce nec erat eu risus fermentum mattis.", isInfoCard: true }),
87
+ render: (args) => html `
88
+ <z-result-card
89
+ .cardTitle=${args.cardTitle}
90
+ .cardSubtitle=${args.cardSubtitle}
91
+ .authors=${args.authors}
92
+ .cover=${args.cover}
93
+ .hasMultipleCovers=${args.hasMultipleCovers}
94
+ .isInfoCard=${args.isInfoCard}
95
+ />
96
+ `,
97
+ };
98
+ //# sourceMappingURL=z-result-card.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"z-result-card.stories.js","sourceRoot":"","sources":["../../../../../src/components/result-card/z-result-card/z-result-card.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAA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7B,IAAI,CAAC,UAAU;;;;;;GAMhC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAU;IACzC,IAAI,kCACC,IAAI,KACP,SAAS,EACP,iKAAiK,EACnK,YAAY,EACV,uVAAuV,EACzV,iBAAiB,EAAE,IAAI,GACxB;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;;mBAEL,IAAI,CAAC,SAAS;sBACX,IAAI,CAAC,YAAY;iBACtB,IAAI,CAAC,OAAO;eACd,IAAI,CAAC,KAAK;2BACE,IAAI,CAAC,iBAAiB;oBAC7B,IAAI,CAAC,UAAU;;;;;GAKhC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAU;IACzC,IAAI,kCACC,IAAI,KACP,MAAM,EAAE,SAAS,GAClB;IAED,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;;mBAEL,IAAI,CAAC,SAAS;sBACX,IAAI,CAAC,YAAY;eACxB,IAAI,CAAC,KAAK;2BACE,IAAI,CAAC,iBAAiB;oBAC7B,IAAI,CAAC,UAAU;;GAEhC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,kCACC,IAAI,KACP,SAAS,EAAE,iBAAiB,EAC5B,YAAY,EACV,2OAA2O,EAC7O,UAAU,EAAE,IAAI,GACjB;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;;mBAEL,IAAI,CAAC,SAAS;sBACX,IAAI,CAAC,YAAY;iBACtB,IAAI,CAAC,OAAO;eACd,IAAI,CAAC,KAAK;2BACE,IAAI,CAAC,iBAAiB;oBAC7B,IAAI,CAAC,UAAU;;GAEhC;CACF,CAAC","sourcesContent":["import {Meta, StoryObj} from \"@storybook/web-components\";\nimport {html} from \"lit\";\nimport \"./index\";\n\nconst StoryMeta: Meta = {\n title: \"ZResultCard\",\n component: \"z-result-card\",\n argTypes: {\n cardTitle: {control: \"text\"},\n cardSubtitle: {control: \"text\"},\n authors: {control: \"text\"},\n cover: {control: \"text\"},\n hasMultipleCovers: {control: \"boolean\"},\n isInfoCard: {control: \"boolean\"},\n },\n};\n\nexport default StoryMeta;\n\ntype Story = StoryObj;\n\nconst args = {\n cardTitle: \"Title\",\n cardSubtitle: \"Subtitle\",\n authors: \"John Doe\",\n cover: \"https://place.abh.ai/s3fs-public/placeholder/DSC_0199_400x400.JPG\",\n hasMultipleCovers: false,\n isInfoCard: false,\n};\n\nexport const SingleCover: Story = {\n args: {\n ...args,\n },\n\n render: (args) => html`\n <z-result-card\n .cardTitle=${args.cardTitle}\n .cardSubtitle=${args.cardSubtitle}\n .authors=${args.authors}\n .cover=${args.cover}\n .hasMultipleCovers=${args.hasMultipleCovers}\n .isInfoCard=${args.isInfoCard}\n >\n <span slot=\"tags\">Example tag</span>\n <span slot=\"volumes\">2 volumes</span>\n </z-result-card>\n `,\n};\n\nexport const MultipleCovers: Story = {\n args: {\n ...args,\n hasMultipleCovers: true,\n },\n render: (args) => html`\n <z-result-card\n .cardTitle=${args.cardTitle}\n .cardSubtitle=${args.cardSubtitle}\n .authors=${args.authors}\n .cover=${args.cover}\n .hasMultipleCovers=${args.hasMultipleCovers}\n .isInfoCard=${args.isInfoCard}\n >\n <span slot=\"tags\">Example tag</span>\n <span slot=\"tags\">Example tag</span>\n <span slot=\"volumes\">2 volumes</span>\n </z-result-card>\n `,\n};\n\nexport const LongTitleAndSubtitle: Story = {\n args: {\n ...args,\n cardTitle:\n \"This is a very long title that should wrap to the next line if it exceeds the width of the card, it goes on two rows for desktop devices and one row for mobile\",\n cardSubtitle:\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus tincidunt maximus tellus, eget dapibus nulla blandit sed. Nullam augue ipsum, mattis sit amet diam ut, finibus posuere libero. Fusce nec erat eu risus fermentum mattis. Nunc volutpat viverra felis, eu iaculis ipsum tempus mattis. Phasellus euismod quam eget nisl pellentesque.\",\n hasMultipleCovers: true,\n },\n render: (args) => html`\n <z-result-card\n .cardTitle=${args.cardTitle}\n .cardSubtitle=${args.cardSubtitle}\n .authors=${args.authors}\n .cover=${args.cover}\n .hasMultipleCovers=${args.hasMultipleCovers}\n .isInfoCard=${args.isInfoCard}\n >\n <span slot=\"tags\">Example tag</span>\n <span slot=\"volumes\">2 volumes</span>\n </z-result-card>\n `,\n};\n\nexport const OnlyTitleAndSubtitle: Story = {\n args: {\n ...args,\n author: undefined,\n },\n\n render: (args) => html`\n <z-result-card\n .cardTitle=${args.cardTitle}\n .cardSubtitle=${args.cardSubtitle}\n .cover=${args.cover}\n .hasMultipleCovers=${args.hasMultipleCovers}\n .isInfoCard=${args.isInfoCard}\n />\n `,\n};\n\nexport const InfoCard: Story = {\n args: {\n ...args,\n cardTitle: \"Info Card Title\",\n cardSubtitle:\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus tincidunt maximus tellus, eget dapibus nulla blandit sed. Nullam augue ipsum, mattis sit amet diam ut, finibus posuere libero. Fusce nec erat eu risus fermentum mattis.\",\n isInfoCard: true,\n },\n render: (args) => html`\n <z-result-card\n .cardTitle=${args.cardTitle}\n .cardSubtitle=${args.cardSubtitle}\n .authors=${args.authors}\n .cover=${args.cover}\n .hasMultipleCovers=${args.hasMultipleCovers}\n .isInfoCard=${args.isInfoCard}\n />\n `,\n};\n"]}
@@ -5,7 +5,7 @@ import { ButtonType, ButtonVariant, ControlSize } from "../../beans";
5
5
  */
6
6
  export class ZButton {
7
7
  constructor() {
8
- this.ariaLabel = "";
8
+ this.ariaLabel = undefined;
9
9
  this.role = "";
10
10
  this.htmlrole = undefined;
11
11
  this.href = undefined;
@@ -29,9 +29,9 @@ export class ZButton {
29
29
  }
30
30
  render() {
31
31
  if (this.href) {
32
- return (h("a", Object.assign({}, this.getAttributes(), { "aria-label": this.ariaLabel, href: this.href, target: this.target }), this.icon && h("z-icon", { name: this.icon }), h("slot", null)));
32
+ return (h("a", Object.assign({}, this.getAttributes(), { "aria-label": this.ariaLabel || undefined, href: this.href, target: this.target }), this.icon && h("z-icon", { name: this.icon }), h("slot", null)));
33
33
  }
34
- return (h("button", Object.assign({}, this.getAttributes(), { "aria-label": this.ariaLabel, name: this.name, type: this.type, disabled: this.disabled, role: this.htmlrole || this.role || undefined }), this.icon && h("z-icon", { name: this.icon }), h("slot", null)));
34
+ return (h("button", Object.assign({}, this.getAttributes(), { "aria-label": this.ariaLabel || undefined, name: this.name, type: this.type, disabled: this.disabled, role: this.htmlrole || this.role || undefined }), this.icon && h("z-icon", { name: this.icon }), h("slot", null)));
35
35
  }
36
36
  static get is() { return "z-button"; }
37
37
  static get encapsulation() { return "scoped"; }
@@ -51,7 +51,7 @@ export class ZButton {
51
51
  "type": "string",
52
52
  "mutable": false,
53
53
  "complexType": {
54
- "original": "string",
54
+ "original": "string | undefined",
55
55
  "resolved": "string",
56
56
  "references": {}
57
57
  },
@@ -59,11 +59,11 @@ export class ZButton {
59
59
  "optional": false,
60
60
  "docs": {
61
61
  "tags": [],
62
- "text": "defines a string value that labels an interactive element, used for accessibility."
62
+ "text": "defines a string value that labels the internal interactive element. Used for accessibility."
63
63
  },
64
64
  "attribute": "aria-label",
65
- "reflect": true,
66
- "defaultValue": "\"\""
65
+ "reflect": false,
66
+ "defaultValue": "undefined"
67
67
  },
68
68
  "role": {
69
69
  "type": "string",
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAa,UAAU,EAAE,aAAa,EAAE,WAAW,EAAC,MAAM,aAAa,CAAC;AAE/E;;GAEG;AAOH,MAAM,OAAO,OAAO;;yBAKN,EAAE;oBAOP,EAAE;;;;;;wBAwBY,KAAK;oBAIN,UAAU,CAAC,MAAM;uBAIX,aAAa,CAAC,OAAO;;oB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":["import {Component, Element, Prop, h} from \"@stencil/core\";\nimport {JSXBase} from \"@stencil/core/internal\";\nimport {ButtonSize, ButtonType, ButtonVariant, ControlSize} from \"../../beans\";\n\n/**\n * @slot - button label\n */\n@Component({\n tag: \"z-button\",\n styleUrl: \"styles.css\",\n shadow: false,\n scoped: true,\n})\nexport class ZButton {\n @Element() hostElement: HTMLZButtonElement;\n\n /** defines a string value that labels an interactive element, used for accessibility. */\n @Prop({reflect: true})\n ariaLabel = \"\";\n\n /**\n * **Deprecated:** Use `htmlrole` instead.\n * @deprecated This prop has been deprecated in favor of `htmlrole` for better accessibility.\n */\n @Prop()\n role = \"\";\n\n /** defines role attribute, used for accessibility. */\n @Prop()\n htmlrole?: string;\n\n /** HTML <a> href attribute. If it is set, it renders an HTML <a> tag. */\n @Prop()\n href?: string;\n\n /** HTML a target attribute. */\n @Prop()\n target?: string;\n\n /** Identifier, should be unique. */\n @Prop()\n htmlid?: string;\n\n /** HTML button name attribute. */\n @Prop()\n name?: string;\n\n /** HTML button disabled attribute. */\n @Prop({reflect: true})\n disabled?: boolean = false;\n\n /** HTML button type attribute. */\n @Prop()\n type?: ButtonType = ButtonType.BUTTON;\n\n /** Graphical variant: `primary`, `secondary`, `tertiary`. Defaults to `primary`. */\n @Prop({reflect: true})\n variant?: ButtonVariant = ButtonVariant.PRIMARY;\n\n /** `z-icon` name to use (optional). */\n @Prop()\n icon?: string;\n\n /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */\n @Prop({reflect: true})\n size?: ButtonSize | ControlSize = ControlSize.BIG;\n\n private getAttributes(): JSXBase.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement> {\n return {\n id: this.htmlid,\n class: {\n \"z-button--container\": true,\n \"z-button--has-text\": !!this.hostElement.textContent.trim(),\n },\n };\n }\n\n render(): HTMLAnchorElement | HTMLButtonElement {\n if (this.href) {\n return (\n <a\n {...this.getAttributes()}\n aria-label={this.ariaLabel}\n href={this.href}\n target={this.target}\n >\n {this.icon && <z-icon name={this.icon} />}\n <slot />\n </a>\n );\n }\n\n return (\n <button\n {...this.getAttributes()}\n aria-label={this.ariaLabel}\n name={this.name}\n type={this.type}\n disabled={this.disabled}\n role={this.htmlrole || this.role || undefined}\n >\n {this.icon && <z-icon name={this.icon} />}\n <slot />\n </button>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/z-button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAC,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAa,UAAU,EAAE,aAAa,EAAE,WAAW,EAAC,MAAM,aAAa,CAAC;AAE/E;;GAEG;AAOH,MAAM,OAAO,OAAO;;yBAKc,SAAS;oBAOlC,EAAE;;;;;;wBAwBY,KAAK;oBAIN,UAAU,CAAC,MAAM;uBAIX,aAAa,CAAC,OAAO;;oBAQb,WAAW,CAAC,GAAG;;IAEzC,aAAa;QACnB,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,MAAM;YACf,KAAK,EAAE;gBACL,qBAAqB,EAAE,IAAI;gBAC3B,oBAAoB,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,EAAE;aAC5D;SACF,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CACL,yBACM,IAAI,CAAC,aAAa,EAAE,kBACZ,IAAI,CAAC,SAAS,IAAI,SAAS,EACvC,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,MAAM;gBAElB,IAAI,CAAC,IAAI,IAAI,cAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI;gBACzC,eAAQ,CACN,CACL,CAAC;QACJ,CAAC;QAED,OAAO,CACL,8BACM,IAAI,CAAC,aAAa,EAAE,kBACZ,IAAI,CAAC,SAAS,IAAI,SAAS,EACvC,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,IAAI,SAAS;YAE5C,IAAI,CAAC,IAAI,IAAI,cAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI;YACzC,eAAQ,CACD,CACV,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Element, Prop, h} from \"@stencil/core\";\nimport {JSXBase} from \"@stencil/core/internal\";\nimport {ButtonSize, ButtonType, ButtonVariant, ControlSize} from \"../../beans\";\n\n/**\n * @slot - button label\n */\n@Component({\n tag: \"z-button\",\n styleUrl: \"styles.css\",\n shadow: false,\n scoped: true,\n})\nexport class ZButton {\n @Element() hostElement: HTMLZButtonElement;\n\n /** defines a string value that labels the internal interactive element. Used for accessibility. */\n @Prop()\n ariaLabel: string | undefined = undefined;\n\n /**\n * **Deprecated:** Use `htmlrole` instead.\n * @deprecated This prop has been deprecated in favor of `htmlrole` for better accessibility.\n */\n @Prop()\n role = \"\";\n\n /** defines role attribute, used for accessibility. */\n @Prop()\n htmlrole?: string;\n\n /** HTML <a> href attribute. If it is set, it renders an HTML <a> tag. */\n @Prop()\n href?: string;\n\n /** HTML a target attribute. */\n @Prop()\n target?: string;\n\n /** Identifier, should be unique. */\n @Prop()\n htmlid?: string;\n\n /** HTML button name attribute. */\n @Prop()\n name?: string;\n\n /** HTML button disabled attribute. */\n @Prop({reflect: true})\n disabled?: boolean = false;\n\n /** HTML button type attribute. */\n @Prop()\n type?: ButtonType = ButtonType.BUTTON;\n\n /** Graphical variant: `primary`, `secondary`, `tertiary`. Defaults to `primary`. */\n @Prop({reflect: true})\n variant?: ButtonVariant = ButtonVariant.PRIMARY;\n\n /** `z-icon` name to use (optional). */\n @Prop()\n icon?: string;\n\n /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */\n @Prop({reflect: true})\n size?: ButtonSize | ControlSize = ControlSize.BIG;\n\n private getAttributes(): JSXBase.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement> {\n return {\n id: this.htmlid,\n class: {\n \"z-button--container\": true,\n \"z-button--has-text\": !!this.hostElement.textContent.trim(),\n },\n };\n }\n\n render(): HTMLAnchorElement | HTMLButtonElement {\n if (this.href) {\n return (\n <a\n {...this.getAttributes()}\n aria-label={this.ariaLabel || undefined}\n href={this.href}\n target={this.target}\n >\n {this.icon && <z-icon name={this.icon} />}\n <slot />\n </a>\n );\n }\n\n return (\n <button\n {...this.getAttributes()}\n aria-label={this.ariaLabel || undefined}\n name={this.name}\n type={this.type}\n disabled={this.disabled}\n role={this.htmlrole || this.role || undefined}\n >\n {this.icon && <z-icon name={this.icon} />}\n <slot />\n </button>\n );\n }\n}\n"]}
@@ -117,6 +117,8 @@ export { ZPopover as ZPopover } from '../types/components/z-popover/index';
117
117
  export { defineCustomElement as defineCustomElementZPopover } from './z-popover';
118
118
  export { ZRangePicker as ZRangePicker } from '../types/components/date-picker/z-range-picker/index';
119
119
  export { defineCustomElement as defineCustomElementZRangePicker } from './z-range-picker';
120
+ export { ZResultCard as ZResultCard } from '../types/components/result-card/z-result-card/index';
121
+ export { defineCustomElement as defineCustomElementZResultCard } from './z-result-card';
120
122
  export { ZSearchbar as ZSearchbar } from '../types/components/z-searchbar/index';
121
123
  export { defineCustomElement as defineCustomElementZSearchbar } from './z-searchbar';
122
124
  export { ZSectionTitle as ZSectionTitle } from '../types/components/deprecated/z-section-title/index';
@@ -60,6 +60,7 @@ export { ZPagination, defineCustomElement as defineCustomElementZPagination } fr
60
60
  export { ZPanelElem, defineCustomElement as defineCustomElementZPanelElem } from './z-panel-elem.js';
61
61
  export { ZPopover, defineCustomElement as defineCustomElementZPopover } from './z-popover.js';
62
62
  export { ZRangePicker, defineCustomElement as defineCustomElementZRangePicker } from './z-range-picker.js';
63
+ export { ZResultCard, defineCustomElement as defineCustomElementZResultCard } from './z-result-card.js';
63
64
  export { ZSearchbar, defineCustomElement as defineCustomElementZSearchbar } from './z-searchbar.js';
64
65
  export { ZSectionTitle, defineCustomElement as defineCustomElementZSectionTitle } from './z-section-title.js';
65
66
  export { ZSelect, defineCustomElement as defineCustomElementZSelect } from './z-select.js';
@@ -1 +1 @@
1
- {"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEM,KAAK,GAAG;IACZ,WAAW;;;;;","names":[],"sources":["src/index.ts"],"sourcesContent":["import {colorFromId} from \"./utils/utils\";\n\nconst UTILS = {\n colorFromId,\n};\n\nexport * from \"./beans\";\nexport * from \"./components\";\nexport {UTILS as Utils};\n"],"version":3}
1
+ {"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEM,KAAK,GAAG;IACZ,WAAW;;;;;","names":[],"sources":["src/index.ts"],"sourcesContent":["import {colorFromId} from \"./utils/utils\";\n\nconst UTILS = {\n colorFromId,\n};\n\nexport * from \"./beans\";\nexport * from \"./components\";\nexport {UTILS as Utils};\n"],"version":3}
@@ -9,7 +9,7 @@ const ZButton = /*@__PURE__*/ proxyCustomElement(class ZButton extends HTMLEleme
9
9
  constructor() {
10
10
  super();
11
11
  this.__registerHost();
12
- this.ariaLabel = "";
12
+ this.ariaLabel = undefined;
13
13
  this.role = "";
14
14
  this.htmlrole = undefined;
15
15
  this.href = undefined;
@@ -33,14 +33,14 @@ const ZButton = /*@__PURE__*/ proxyCustomElement(class ZButton extends HTMLEleme
33
33
  }
34
34
  render() {
35
35
  if (this.href) {
36
- return (h("a", Object.assign({}, this.getAttributes(), { "aria-label": this.ariaLabel, href: this.href, target: this.target }), this.icon && h("z-icon", { name: this.icon }), h("slot", null)));
36
+ return (h("a", Object.assign({}, this.getAttributes(), { "aria-label": this.ariaLabel || undefined, href: this.href, target: this.target }), this.icon && h("z-icon", { name: this.icon }), h("slot", null)));
37
37
  }
38
- return (h("button", Object.assign({}, this.getAttributes(), { "aria-label": this.ariaLabel, name: this.name, type: this.type, disabled: this.disabled, role: this.htmlrole || this.role || undefined }), this.icon && h("z-icon", { name: this.icon }), h("slot", null)));
38
+ return (h("button", Object.assign({}, this.getAttributes(), { "aria-label": this.ariaLabel || undefined, name: this.name, type: this.type, disabled: this.disabled, role: this.htmlrole || this.role || undefined }), this.icon && h("z-icon", { name: this.icon }), h("slot", null)));
39
39
  }
40
40
  get hostElement() { return this; }
41
41
  static get style() { return ZButtonStyle0; }
42
42
  }, [6, "z-button", {
43
- "ariaLabel": [513, "aria-label"],
43
+ "ariaLabel": [1, "aria-label"],
44
44
  "role": [1],
45
45
  "htmlrole": [1],
46
46
  "href": [1],
@@ -1 +1 @@
1
- {"file":"index4.js","mappings":";;;;AAAA,MAAM,SAAS,GAAG,s4HAAs4H,CAAC;AACz5H,sBAAe,SAAS;;MCYX,OAAO;;;;yBAKN,EAAE;oBAOP,EAAE;;;;;;wBAwBY,KAAK;oBAIN,UAAU,CAAC,MAAM;uBAIX,aAAa,CAAC,OAAO;;oBAQb,WAAW,CAAC,GAAG;;IAEzC,aAAa;QACnB,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,MAAM;YACf,KAAK,EAAE;gBACL,qBAAqB,EAAE,IAAI;gBAC3B,oBAAoB,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,EAAE;aAC5D;SACF,CAAC;KACH;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,QACE,yBACM,IAAI,CAAC,aAAa,EAAE,kBACZ,IAAI,CAAC,SAAS,EAC1B,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,MAAM,KAElB,IAAI,CAAC,IAAI,IAAI,cAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,EACzC,eAAQ,CACN,EACJ;SACH;QAED,QACE,8BACM,IAAI,CAAC,aAAa,EAAE,kBACZ,IAAI,CAAC,SAAS,EAC1B,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,IAAI,SAAS,KAE5C,IAAI,CAAC,IAAI,IAAI,cAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,EACzC,eAAQ,CACD,EACT;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/z-button/styles.css?tag=z-button&encapsulation=scoped","src/components/z-button/index.tsx"],"sourcesContent":[":host {\n display: inline-block;\n\n --z-icon-width: 16px;\n --z-icon-height: 16px;\n --z-icon-right-margin: 0;\n}\n\n:host([disabled]:not([disabled=\"false\"])) {\n pointer-events: none;\n}\n\n:host .z-button--container {\n display: inline-flex;\n width: 100%;\n box-sizing: border-box;\n align-items: center;\n justify-content: center;\n padding: 0;\n border-width: var(--border-size-medium);\n border-style: solid;\n border-radius: var(--border-radius);\n cursor: pointer;\n fill: currentcolor;\n font-family: var(--font-family-sans);\n font-size: 14px;\n font-weight: var(--font-sb);\n letter-spacing: 0.3px;\n line-height: 1;\n outline: none;\n text-decoration: none;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n:host .z-button--container:focus:focus-visible {\n box-shadow: var(--shadow-focus-primary);\n}\n\n:host .z-button--container.z-button--has-text {\n min-width: calc(var(--space-unit) * 8);\n padding: 0 calc(var(--space-unit) * 2);\n}\n\n:host .z-button--container.z-button--has-text z-icon {\n --z-icon-right-margin: var(--space-unit);\n}\n\n:host([size=\"big\"]) .z-button--container {\n min-width: 44px;\n height: 44px;\n}\n\n:host([size=\"small\"]) .z-button--container {\n min-width: 36px;\n height: 36px;\n}\n\n:host([size=\"x-small\"]) .z-button--container {\n min-width: 32px;\n height: 32px;\n}\n\n:host([variant=\"primary\"]) .z-button--container {\n border-color: var(--color-primary01);\n background-color: var(--color-primary01);\n color: var(--color-text-inverse);\n}\n\n@media (hover: hover) {\n :host([variant=\"primary\"]) .z-button--container:hover {\n border-color: var(--color-hover-primary);\n background-color: var(--color-hover-primary);\n color: var(--color-text-inverse);\n }\n}\n\n:host([variant=\"primary\"]) .z-button--container:active {\n border-color: var(--color-pressed-primary);\n background-color: var(--color-pressed-primary);\n box-shadow: var(--shadow-2);\n color: var(--color-text-inverse);\n}\n\n:host([variant=\"primary\"][disabled]:not([disabled=\"false\"])) .z-button--container {\n border-color: var(--color-disabled01);\n background-color: var(--color-disabled01);\n color: var(--color-disabled03);\n}\n\n:host([variant=\"secondary\"]) .z-button--container {\n border-color: var(--color-primary01);\n background-color: var(--color-button-secondary);\n color: var(--color-primary01);\n}\n\n@media (hover: hover) {\n :host([variant=\"secondary\"]) .z-button--container:hover {\n border-color: var(--color-hover-primary);\n background-color: var(--color-button-secondary);\n color: var(--color-hover-primary);\n }\n}\n\n:host([variant=\"secondary\"]) .z-button--container:active {\n border-color: var(--color-pressed-primary);\n background-color: var(--color-button-secondary);\n box-shadow: var(--shadow-2);\n color: var(--color-pressed-primary);\n}\n\n:host([variant=\"secondary\"][disabled]:not([disabled=\"false\"])) .z-button--container {\n border-color: var(--color-disabled01);\n background-color: var(--color-button-secondary);\n color: var(--color-disabled03);\n}\n\n:host([variant=\"tertiary\"]) .z-button--container {\n border-color: var(--color-primary02);\n background-color: var(--color-primary02);\n color: var(--color-primary01);\n}\n\n@media (hover: hover) {\n :host([variant=\"tertiary\"]) .z-button--container:hover {\n border-color: var(--color-primary03);\n background-color: var(--color-primary03);\n color: var(--color-hover-primary);\n }\n}\n\n:host([variant=\"tertiary\"]) .z-button--container:focus:focus-visible {\n border-color: var(--color-primary02);\n background-color: var(--color-primary02);\n color: var(--color-primary01);\n}\n\n:host([variant=\"tertiary\"]) .z-button--container:active {\n border-color: var(--color-primary02);\n background-color: var(--color-primary02);\n box-shadow: var(--shadow-2);\n color: var(--color-primary01);\n}\n\n:host([variant=\"tertiary\"][disabled]:not([disabled=\"false\"])) .z-button--container {\n border-color: var(--color-disabled01);\n background-color: var(--color-disabled01);\n color: var(--color-disabled03);\n}\n","import {Component, Element, Prop, h} from \"@stencil/core\";\nimport {JSXBase} from \"@stencil/core/internal\";\nimport {ButtonSize, ButtonType, ButtonVariant, ControlSize} from \"../../beans\";\n\n/**\n * @slot - button label\n */\n@Component({\n tag: \"z-button\",\n styleUrl: \"styles.css\",\n shadow: false,\n scoped: true,\n})\nexport class ZButton {\n @Element() hostElement: HTMLZButtonElement;\n\n /** defines a string value that labels an interactive element, used for accessibility. */\n @Prop({reflect: true})\n ariaLabel = \"\";\n\n /**\n * **Deprecated:** Use `htmlrole` instead.\n * @deprecated This prop has been deprecated in favor of `htmlrole` for better accessibility.\n */\n @Prop()\n role = \"\";\n\n /** defines role attribute, used for accessibility. */\n @Prop()\n htmlrole?: string;\n\n /** HTML <a> href attribute. If it is set, it renders an HTML <a> tag. */\n @Prop()\n href?: string;\n\n /** HTML a target attribute. */\n @Prop()\n target?: string;\n\n /** Identifier, should be unique. */\n @Prop()\n htmlid?: string;\n\n /** HTML button name attribute. */\n @Prop()\n name?: string;\n\n /** HTML button disabled attribute. */\n @Prop({reflect: true})\n disabled?: boolean = false;\n\n /** HTML button type attribute. */\n @Prop()\n type?: ButtonType = ButtonType.BUTTON;\n\n /** Graphical variant: `primary`, `secondary`, `tertiary`. Defaults to `primary`. */\n @Prop({reflect: true})\n variant?: ButtonVariant = ButtonVariant.PRIMARY;\n\n /** `z-icon` name to use (optional). */\n @Prop()\n icon?: string;\n\n /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */\n @Prop({reflect: true})\n size?: ButtonSize | ControlSize = ControlSize.BIG;\n\n private getAttributes(): JSXBase.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement> {\n return {\n id: this.htmlid,\n class: {\n \"z-button--container\": true,\n \"z-button--has-text\": !!this.hostElement.textContent.trim(),\n },\n };\n }\n\n render(): HTMLAnchorElement | HTMLButtonElement {\n if (this.href) {\n return (\n <a\n {...this.getAttributes()}\n aria-label={this.ariaLabel}\n href={this.href}\n target={this.target}\n >\n {this.icon && <z-icon name={this.icon} />}\n <slot />\n </a>\n );\n }\n\n return (\n <button\n {...this.getAttributes()}\n aria-label={this.ariaLabel}\n name={this.name}\n type={this.type}\n disabled={this.disabled}\n role={this.htmlrole || this.role || undefined}\n >\n {this.icon && <z-icon name={this.icon} />}\n <slot />\n </button>\n );\n }\n}\n"],"version":3}
1
+ {"file":"index4.js","mappings":";;;;AAAA,MAAM,SAAS,GAAG,s4HAAs4H,CAAC;AACz5H,sBAAe,SAAS;;MCYX,OAAO;;;;yBAKc,SAAS;oBAOlC,EAAE;;;;;;wBAwBY,KAAK;oBAIN,UAAU,CAAC,MAAM;uBAIX,aAAa,CAAC,OAAO;;oBAQb,WAAW,CAAC,GAAG;;IAEzC,aAAa;QACnB,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,MAAM;YACf,KAAK,EAAE;gBACL,qBAAqB,EAAE,IAAI;gBAC3B,oBAAoB,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,EAAE;aAC5D;SACF,CAAC;KACH;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,QACE,yBACM,IAAI,CAAC,aAAa,EAAE,kBACZ,IAAI,CAAC,SAAS,IAAI,SAAS,EACvC,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,MAAM,KAElB,IAAI,CAAC,IAAI,IAAI,cAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,EACzC,eAAQ,CACN,EACJ;SACH;QAED,QACE,8BACM,IAAI,CAAC,aAAa,EAAE,kBACZ,IAAI,CAAC,SAAS,IAAI,SAAS,EACvC,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,IAAI,SAAS,KAE5C,IAAI,CAAC,IAAI,IAAI,cAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,EACzC,eAAQ,CACD,EACT;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/z-button/styles.css?tag=z-button&encapsulation=scoped","src/components/z-button/index.tsx"],"sourcesContent":[":host {\n display: inline-block;\n\n --z-icon-width: 16px;\n --z-icon-height: 16px;\n --z-icon-right-margin: 0;\n}\n\n:host([disabled]:not([disabled=\"false\"])) {\n pointer-events: none;\n}\n\n:host .z-button--container {\n display: inline-flex;\n width: 100%;\n box-sizing: border-box;\n align-items: center;\n justify-content: center;\n padding: 0;\n border-width: var(--border-size-medium);\n border-style: solid;\n border-radius: var(--border-radius);\n cursor: pointer;\n fill: currentcolor;\n font-family: var(--font-family-sans);\n font-size: 14px;\n font-weight: var(--font-sb);\n letter-spacing: 0.3px;\n line-height: 1;\n outline: none;\n text-decoration: none;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n:host .z-button--container:focus:focus-visible {\n box-shadow: var(--shadow-focus-primary);\n}\n\n:host .z-button--container.z-button--has-text {\n min-width: calc(var(--space-unit) * 8);\n padding: 0 calc(var(--space-unit) * 2);\n}\n\n:host .z-button--container.z-button--has-text z-icon {\n --z-icon-right-margin: var(--space-unit);\n}\n\n:host([size=\"big\"]) .z-button--container {\n min-width: 44px;\n height: 44px;\n}\n\n:host([size=\"small\"]) .z-button--container {\n min-width: 36px;\n height: 36px;\n}\n\n:host([size=\"x-small\"]) .z-button--container {\n min-width: 32px;\n height: 32px;\n}\n\n:host([variant=\"primary\"]) .z-button--container {\n border-color: var(--color-primary01);\n background-color: var(--color-primary01);\n color: var(--color-text-inverse);\n}\n\n@media (hover: hover) {\n :host([variant=\"primary\"]) .z-button--container:hover {\n border-color: var(--color-hover-primary);\n background-color: var(--color-hover-primary);\n color: var(--color-text-inverse);\n }\n}\n\n:host([variant=\"primary\"]) .z-button--container:active {\n border-color: var(--color-pressed-primary);\n background-color: var(--color-pressed-primary);\n box-shadow: var(--shadow-2);\n color: var(--color-text-inverse);\n}\n\n:host([variant=\"primary\"][disabled]:not([disabled=\"false\"])) .z-button--container {\n border-color: var(--color-disabled01);\n background-color: var(--color-disabled01);\n color: var(--color-disabled03);\n}\n\n:host([variant=\"secondary\"]) .z-button--container {\n border-color: var(--color-primary01);\n background-color: var(--color-button-secondary);\n color: var(--color-primary01);\n}\n\n@media (hover: hover) {\n :host([variant=\"secondary\"]) .z-button--container:hover {\n border-color: var(--color-hover-primary);\n background-color: var(--color-button-secondary);\n color: var(--color-hover-primary);\n }\n}\n\n:host([variant=\"secondary\"]) .z-button--container:active {\n border-color: var(--color-pressed-primary);\n background-color: var(--color-button-secondary);\n box-shadow: var(--shadow-2);\n color: var(--color-pressed-primary);\n}\n\n:host([variant=\"secondary\"][disabled]:not([disabled=\"false\"])) .z-button--container {\n border-color: var(--color-disabled01);\n background-color: var(--color-button-secondary);\n color: var(--color-disabled03);\n}\n\n:host([variant=\"tertiary\"]) .z-button--container {\n border-color: var(--color-primary02);\n background-color: var(--color-primary02);\n color: var(--color-primary01);\n}\n\n@media (hover: hover) {\n :host([variant=\"tertiary\"]) .z-button--container:hover {\n border-color: var(--color-primary03);\n background-color: var(--color-primary03);\n color: var(--color-hover-primary);\n }\n}\n\n:host([variant=\"tertiary\"]) .z-button--container:focus:focus-visible {\n border-color: var(--color-primary02);\n background-color: var(--color-primary02);\n color: var(--color-primary01);\n}\n\n:host([variant=\"tertiary\"]) .z-button--container:active {\n border-color: var(--color-primary02);\n background-color: var(--color-primary02);\n box-shadow: var(--shadow-2);\n color: var(--color-primary01);\n}\n\n:host([variant=\"tertiary\"][disabled]:not([disabled=\"false\"])) .z-button--container {\n border-color: var(--color-disabled01);\n background-color: var(--color-disabled01);\n color: var(--color-disabled03);\n}\n","import {Component, Element, Prop, h} from \"@stencil/core\";\nimport {JSXBase} from \"@stencil/core/internal\";\nimport {ButtonSize, ButtonType, ButtonVariant, ControlSize} from \"../../beans\";\n\n/**\n * @slot - button label\n */\n@Component({\n tag: \"z-button\",\n styleUrl: \"styles.css\",\n shadow: false,\n scoped: true,\n})\nexport class ZButton {\n @Element() hostElement: HTMLZButtonElement;\n\n /** defines a string value that labels the internal interactive element. Used for accessibility. */\n @Prop()\n ariaLabel: string | undefined = undefined;\n\n /**\n * **Deprecated:** Use `htmlrole` instead.\n * @deprecated This prop has been deprecated in favor of `htmlrole` for better accessibility.\n */\n @Prop()\n role = \"\";\n\n /** defines role attribute, used for accessibility. */\n @Prop()\n htmlrole?: string;\n\n /** HTML <a> href attribute. If it is set, it renders an HTML <a> tag. */\n @Prop()\n href?: string;\n\n /** HTML a target attribute. */\n @Prop()\n target?: string;\n\n /** Identifier, should be unique. */\n @Prop()\n htmlid?: string;\n\n /** HTML button name attribute. */\n @Prop()\n name?: string;\n\n /** HTML button disabled attribute. */\n @Prop({reflect: true})\n disabled?: boolean = false;\n\n /** HTML button type attribute. */\n @Prop()\n type?: ButtonType = ButtonType.BUTTON;\n\n /** Graphical variant: `primary`, `secondary`, `tertiary`. Defaults to `primary`. */\n @Prop({reflect: true})\n variant?: ButtonVariant = ButtonVariant.PRIMARY;\n\n /** `z-icon` name to use (optional). */\n @Prop()\n icon?: string;\n\n /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */\n @Prop({reflect: true})\n size?: ButtonSize | ControlSize = ControlSize.BIG;\n\n private getAttributes(): JSXBase.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement> {\n return {\n id: this.htmlid,\n class: {\n \"z-button--container\": true,\n \"z-button--has-text\": !!this.hostElement.textContent.trim(),\n },\n };\n }\n\n render(): HTMLAnchorElement | HTMLButtonElement {\n if (this.href) {\n return (\n <a\n {...this.getAttributes()}\n aria-label={this.ariaLabel || undefined}\n href={this.href}\n target={this.target}\n >\n {this.icon && <z-icon name={this.icon} />}\n <slot />\n </a>\n );\n }\n\n return (\n <button\n {...this.getAttributes()}\n aria-label={this.ariaLabel || undefined}\n name={this.name}\n type={this.type}\n disabled={this.disabled}\n role={this.htmlrole || this.role || undefined}\n >\n {this.icon && <z-icon name={this.icon} />}\n <slot />\n </button>\n );\n }\n}\n"],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface ZResultCard extends Components.ZResultCard, HTMLElement {}
4
+ export const ZResultCard: {
5
+ prototype: ZResultCard;
6
+ new (): ZResultCard;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,107 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { d as defineCustomElement$2 } from './index9.js';
3
+
4
+ const stylesCss$1 = ":host{display:flex;overflow:hidden;min-width:0;height:calc(174px - var(--space-unit) * 2);max-height:calc(174px - var(--space-unit) * 2);padding:var(--space-unit);border:var(--border-size-medium) solid var(--color-surface02);border-radius:var(--border-size-large);cursor:pointer;font-family:var(--font-family-sans)}:host(:focus:focus-visible){z-index:1;box-shadow:var(--shadow-focus-primary);outline:none}:host(.info-card:focus:focus-visible){z-index:1;box-shadow:var(--shadow-focus-primary);outline:none}.info-container{display:flex;overflow:hidden;min-width:0;flex:1;flex-direction:column;padding-left:calc(var(--space-unit) * 2)}.authors-label{overflow:hidden;color:var(--color-default-text);font-size:var(--font-size-2);font-weight:var(--font-rg);text-overflow:ellipsis;white-space:nowrap}.card-title{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;font-size:var(--font-size-3);font-weight:var(--font-bd);-webkit-line-clamp:2;line-clamp:2;line-height:1.5;word-break:break-word}.card-subtitle{overflow:hidden;color:var(--color-default-text);text-overflow:ellipsis;white-space:nowrap}.card-subtitle.info-subtitle{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;line-height:1.2;white-space:normal;word-break:break-word}.tags-container{display:flex;max-width:100%;flex-wrap:wrap;margin-top:calc(var(--space-unit) * 2);gap:var(--space-unit)}.volumes-label{display:flex;height:auto;flex-direction:column;margin-top:auto;color:var(--color-default-text);font-size:var(--font-size-1)}:host(.info-card){display:flex;height:calc(76px - var(--space-unit) * 2);max-height:calc(76px - var(--space-unit) * 2)}.info-icon-column{display:flex;width:50px;height:100%;align-items:center;justify-content:center}.info-icon-container{display:flex;width:34px;height:34px;align-items:center;justify-content:center;margin-bottom:calc(var(--space-unit) * 3);background-color:var(--gray50);border-radius:var(--border-size-large)}.card-title.info-title{display:-webkit-box;overflow:hidden;min-width:0;max-width:100%;max-height:2.4em;margin-top:0;margin-bottom:4px;-webkit-box-orient:vertical;font-size:var(--font-size-3);font-weight:var(--font-bd);-webkit-line-clamp:1;line-clamp:1;line-height:1.2;word-break:break-word}.info-icon{width:18px;height:18px;color:var(--color-default-text)}@media (max-width: 768px){.card-title{display:block;overflow:hidden;line-height:normal;text-overflow:ellipsis;white-space:nowrap}}";
5
+ const ZResultCardStyle0 = stylesCss$1;
6
+
7
+ const stylesCss = ".z-cover-container{position:relative;display:flex;width:119px;height:158px;align-items:center;justify-items:center}.z-cover-stack{width:100%;height:100%}.z-cover-shadow,.z-cover-img{width:117px;min-width:117px;max-width:117px;height:156px;min-height:156px;max-height:156px}.z-cover-container.has-multiple .z-cover-shadow,.z-cover-container.has-multiple .z-cover-img{width:105px;min-width:105px;max-width:105px;height:140px;min-height:140px;max-height:140px}.z-cover-shadow{position:absolute;z-index:1;background-color:var(--color-white)}.z-shadow-1{z-index:1;top:var(--space-unit);right:6px;border:var(--border-size-small) solid black}.z-shadow-2{z-index:0;top:calc(var(--space-unit) * 2);right:12px;border:var(--border-size-small) solid black}.z-cover-img{position:absolute;z-index:2;top:0;right:0;border:var(--border-size-small) solid black;object-fit:cover;object-position:left}.z-cover-container.has-multiple .z-cover-img{left:12px}";
8
+ const ZResultCardStyle1 = stylesCss;
9
+
10
+ const ZResultCard$1 = /*@__PURE__*/ proxyCustomElement(class ZResultCard extends HTMLElement {
11
+ constructor() {
12
+ super();
13
+ this.__registerHost();
14
+ this.__attachShadow();
15
+ this.resizeHandler = () => {
16
+ this.setTooltipTitle(this.authorsRef);
17
+ this.setTooltipTitle(this.titleRef);
18
+ this.setTooltipTitle(this.subtitleRef);
19
+ };
20
+ this.renderOperaCard = () => {
21
+ return (h(Host, { tabIndex: 0 }, h("div", { class: `z-cover-container ${this.hasMultipleCovers ? "has-multiple" : ""}` }, h("div", { class: "z-cover-stack" }, this.hasMultipleCovers && (h("div", null, h("div", { class: "z-cover-shadow z-shadow-2" }), h("div", { class: "z-cover-shadow z-shadow-1" }))), h("img", { src: this.cover, alt: "Book Cover", class: "z-cover-img" }))), h("div", { class: "info-container" }, this.authors && (h("span", { class: "authors-label", ref: (el) => (this.authorsRef = el) }, this.authors)), h("span", { class: "card-title", ref: (el) => (this.titleRef = el) }, this.cardTitle), h("span", { class: "card-subtitle", ref: (el) => (this.subtitleRef = el) }, this.cardSubtitle), h("div", { class: "tags-container" }, h("slot", { name: "tags" })), h("div", { class: "volumes-label" }, h("slot", { name: "volumes" })))));
22
+ };
23
+ this.renderInfoCard = () => {
24
+ return (h(Host, { tabIndex: 0, class: "info-card" }, h("div", { class: "info-icon-column" }, h("div", { class: "info-icon-container" }, h("z-icon", { class: "info-icon", name: "link", width: 18, height: 18 }))), h("div", { class: "info-container" }, h("span", { class: "card-title info-title", ref: (el) => (this.titleRef = el) }, this.cardTitle), h("span", { class: "card-subtitle info-subtitle", ref: (el) => (this.subtitleRef = el) }, this.cardSubtitle))));
25
+ };
26
+ this.cardTitle = undefined;
27
+ this.cardSubtitle = undefined;
28
+ this.authors = undefined;
29
+ this.cover = undefined;
30
+ this.hasMultipleCovers = false;
31
+ this.isInfoCard = false;
32
+ }
33
+ setTooltipTitle(el) {
34
+ if (!el) {
35
+ return;
36
+ }
37
+ // Check if element uses line-clamp
38
+ const style = window.getComputedStyle(el);
39
+ const hasLineClamp = style.getPropertyValue("-webkit-line-clamp") !== "none";
40
+ let isTruncated;
41
+ if (hasLineClamp) {
42
+ // For elements with line-clamp, check if content height exceeds line-clamp height
43
+ const lineHeight = parseInt(style.lineHeight);
44
+ const maxLines = parseInt(style.getPropertyValue("-webkit-line-clamp"));
45
+ const maxHeight = lineHeight * maxLines;
46
+ isTruncated = el.scrollHeight > maxHeight;
47
+ }
48
+ else {
49
+ // Original check for elements without line-clamp
50
+ isTruncated = el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight;
51
+ }
52
+ if (isTruncated) {
53
+ el.setAttribute("title", el.textContent.trim());
54
+ }
55
+ else {
56
+ el.removeAttribute("title");
57
+ }
58
+ }
59
+ componentDidRender() {
60
+ this.setTooltipTitle(this.authorsRef);
61
+ this.setTooltipTitle(this.titleRef);
62
+ this.setTooltipTitle(this.subtitleRef);
63
+ }
64
+ componentDidLoad() {
65
+ window.addEventListener("resize", this.resizeHandler);
66
+ }
67
+ disconnectedCallback() {
68
+ window.removeEventListener("resize", this.resizeHandler);
69
+ }
70
+ render() {
71
+ return this.isInfoCard ? this.renderInfoCard() : this.renderOperaCard();
72
+ }
73
+ get hostElement() { return this; }
74
+ static get style() { return ZResultCardStyle0 + ZResultCardStyle1; }
75
+ }, [1, "z-result-card", {
76
+ "cardTitle": [1, "card-title"],
77
+ "cardSubtitle": [1, "card-subtitle"],
78
+ "authors": [1],
79
+ "cover": [1],
80
+ "hasMultipleCovers": [4, "has-multiple-covers"],
81
+ "isInfoCard": [4, "is-info-card"]
82
+ }]);
83
+ function defineCustomElement$1() {
84
+ if (typeof customElements === "undefined") {
85
+ return;
86
+ }
87
+ const components = ["z-result-card", "z-icon"];
88
+ components.forEach(tagName => { switch (tagName) {
89
+ case "z-result-card":
90
+ if (!customElements.get(tagName)) {
91
+ customElements.define(tagName, ZResultCard$1);
92
+ }
93
+ break;
94
+ case "z-icon":
95
+ if (!customElements.get(tagName)) {
96
+ defineCustomElement$2();
97
+ }
98
+ break;
99
+ } });
100
+ }
101
+
102
+ const ZResultCard = ZResultCard$1;
103
+ const defineCustomElement = defineCustomElement$1;
104
+
105
+ export { ZResultCard, defineCustomElement };
106
+
107
+ //# sourceMappingURL=z-result-card.js.map
@@ -0,0 +1 @@
1
+ {"file":"z-result-card.js","mappings":";;;AAAA,MAAMA,WAAS,GAAG,25EAA25E,CAAC;AAC96E,0BAAeA,WAAS;;ACDxB,MAAM,SAAS,GAAG,06BAA06B,CAAC;AAC77B,0BAAe,SAAS;;MCMXC,aAAW;;;;;QAmFd,kBAAa,GAAG;YACtB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACtC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACpC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SACxC,CAAC;QAUM,oBAAe,GAAG;YACxB,QACE,EAAC,IAAI,IAAC,QAAQ,EAAE,CAAC,IACf,WAAK,KAAK,EAAE,qBAAqB,IAAI,CAAC,iBAAiB,GAAG,cAAc,GAAG,EAAE,EAAE,IAC7E,WAAK,KAAK,EAAC,eAAe,IACvB,IAAI,CAAC,iBAAiB,KACrB,eACE,WAAK,KAAK,EAAC,2BAA2B,GAAG,EACzC,WAAK,KAAK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;QACd,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;KACvD;IAED,oBAAoB;QAClB,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;KAC1D;IAsFD,MAAM;QACJ,OAAO,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;KACzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["stylesCss","ZResultCard"],"sources":["src/components/result-card/z-result-card/styles.css?tag=z-result-card&encapsulation=shadow","src/components/css-components/z-cover/styles.css?tag=z-result-card&encapsulation=shadow","src/components/result-card/z-result-card/index.tsx"],"sourcesContent":[":host {\n display: flex;\n overflow: hidden;\n min-width: 0;\n height: calc(174px - var(--space-unit) * 2);\n max-height: calc(174px - var(--space-unit) * 2);\n padding: var(--space-unit);\n border: var(--border-size-medium) solid var(--color-surface02);\n border-radius: var(--border-size-large);\n cursor: pointer;\n font-family: var(--font-family-sans);\n}\n\n:host(:focus:focus-visible) {\n z-index: 1;\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\n:host(.info-card:focus:focus-visible) {\n z-index: 1;\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\n.info-container {\n display: flex;\n overflow: hidden;\n min-width: 0;\n flex: 1;\n flex-direction: column;\n padding-left: calc(var(--space-unit) * 2);\n}\n\n.authors-label {\n overflow: hidden;\n color: var(--color-default-text);\n font-size: var(--font-size-2);\n font-weight: var(--font-rg);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.card-title {\n display: -webkit-box;\n overflow: hidden;\n -webkit-box-orient: vertical;\n font-size: var(--font-size-3);\n font-weight: var(--font-bd);\n -webkit-line-clamp: 2;\n line-clamp: 2;\n line-height: 1.5;\n word-break: break-word;\n}\n\n.card-subtitle {\n overflow: hidden;\n color: var(--color-default-text);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.card-subtitle.info-subtitle {\n display: -webkit-box;\n overflow: hidden;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n line-clamp: 2;\n line-height: 1.2;\n white-space: normal;\n word-break: break-word;\n}\n\n.tags-container {\n display: flex;\n max-width: 100%;\n flex-wrap: wrap;\n margin-top: calc(var(--space-unit) * 2);\n gap: var(--space-unit);\n}\n\n.volumes-label {\n display: flex;\n height: auto;\n flex-direction: column;\n margin-top: auto;\n color: var(--color-default-text);\n font-size: var(--font-size-1);\n}\n\n:host(.info-card) {\n display: flex;\n height: calc(76px - var(--space-unit) * 2);\n max-height: calc(76px - var(--space-unit) * 2);\n}\n\n.info-icon-column {\n display: flex;\n width: 50px;\n height: 100%;\n align-items: center;\n justify-content: center;\n}\n\n.info-icon-container {\n display: flex;\n width: 34px;\n height: 34px;\n align-items: center;\n justify-content: center;\n margin-bottom: calc(var(--space-unit) * 3);\n background-color: var(--gray50);\n border-radius: var(--border-size-large);\n}\n\n.card-title.info-title {\n display: -webkit-box;\n overflow: hidden;\n min-width: 0;\n max-width: 100%;\n max-height: 2.4em;\n margin-top: 0;\n margin-bottom: 4px;\n -webkit-box-orient: vertical;\n font-size: var(--font-size-3);\n font-weight: var(--font-bd);\n -webkit-line-clamp: 1;\n line-clamp: 1;\n line-height: 1.2;\n word-break: break-word;\n}\n\n.info-icon {\n width: 18px;\n height: 18px;\n color: var(--color-default-text);\n}\n\n@media (max-width: 768px) {\n .card-title {\n display: block;\n overflow: hidden;\n line-height: normal;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n",".z-cover-container {\n position: relative;\n display: flex;\n width: 119px;\n height: 158px;\n align-items: center;\n justify-items: center;\n}\n\n.z-cover-stack {\n width: 100%;\n height: 100%;\n}\n\n/* Base sizes for single cover */\n.z-cover-shadow,\n.z-cover-img {\n width: 117px;\n min-width: 117px;\n max-width: 117px;\n height: 156px;\n min-height: 156px;\n max-height: 156px;\n}\n\n/* Scaled sizes for multiple covers */\n.z-cover-container.has-multiple .z-cover-shadow,\n.z-cover-container.has-multiple .z-cover-img {\n width: 105px;\n min-width: 105px;\n max-width: 105px;\n height: 140px;\n min-height: 140px;\n max-height: 140px;\n}\n\n.z-cover-shadow {\n position: absolute;\n z-index: 1;\n background-color: var(--color-white);\n}\n\n.z-shadow-1 {\n z-index: 1;\n top: var(--space-unit);\n right: 6px;\n border: var(--border-size-small) solid black;\n}\n\n.z-shadow-2 {\n z-index: 0;\n top: calc(var(--space-unit) * 2);\n right: 12px;\n border: var(--border-size-small) solid black;\n}\n\n.z-cover-img {\n position: absolute;\n z-index: 2;\n top: 0;\n right: 0;\n border: var(--border-size-small) solid black;\n object-fit: cover;\n object-position: left;\n}\n\n.z-cover-container.has-multiple .z-cover-img {\n left: 12px;\n}\n","import {Component, Element, Host, Prop, h} from \"@stencil/core\";\n\n@Component({\n tag: \"z-result-card\",\n styleUrls: [\"styles.css\", \"../../css-components/z-cover/styles.css\"],\n shadow: true,\n})\nexport class ZResultCard {\n @Element() hostElement: HTMLZResultCardElement;\n\n /**\n * The title of the card.\n */\n @Prop()\n cardTitle: string;\n\n /**\n * The subtitle of the card.\n */\n @Prop()\n cardSubtitle: string;\n\n /**\n * The authors of the opera.\n */\n @Prop()\n authors?: string;\n\n /**\n * The URL of the cover image.\n * This is used to display the cover image of the opera.\n */\n @Prop()\n cover?: string;\n\n /**\n * Indicates whether the card has multiple covers.\n * This is used to apply specific styles when there are multiple covers.\n */\n @Prop()\n hasMultipleCovers = false;\n\n /**\n * Indicates whether the card is an info page.\n * This can be used to apply specific styles or behaviors for info pages.\n */\n @Prop()\n isInfoCard = false;\n\n private authorsRef: HTMLElement;\n\n private titleRef: HTMLElement;\n\n private subtitleRef: HTMLElement;\n\n private setTooltipTitle(el: HTMLElement): void {\n if (!el) {\n return;\n }\n\n // Check if element uses line-clamp\n const style = window.getComputedStyle(el);\n const hasLineClamp = style.getPropertyValue(\"-webkit-line-clamp\") !== \"none\";\n\n let isTruncated;\n if (hasLineClamp) {\n // For elements with line-clamp, check if content height exceeds line-clamp height\n const lineHeight = parseInt(style.lineHeight);\n const maxLines = parseInt(style.getPropertyValue(\"-webkit-line-clamp\"));\n const maxHeight = lineHeight * maxLines;\n\n isTruncated = el.scrollHeight > maxHeight;\n } else {\n // Original check for elements without line-clamp\n isTruncated = el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight;\n }\n\n if (isTruncated) {\n el.setAttribute(\"title\", el.textContent.trim());\n } else {\n el.removeAttribute(\"title\");\n }\n }\n\n componentDidRender(): void {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n }\n\n private resizeHandler = (): void => {\n this.setTooltipTitle(this.authorsRef);\n this.setTooltipTitle(this.titleRef);\n this.setTooltipTitle(this.subtitleRef);\n };\n\n componentDidLoad(): void {\n window.addEventListener(\"resize\", this.resizeHandler);\n }\n\n disconnectedCallback(): void {\n window.removeEventListener(\"resize\", this.resizeHandler);\n }\n\n private renderOperaCard = (): HTMLZResultCardElement => {\n return (\n <Host tabIndex={0}>\n <div class={`z-cover-container ${this.hasMultipleCovers ? \"has-multiple\" : \"\"}`}>\n <div class=\"z-cover-stack\">\n {this.hasMultipleCovers && (\n <div>\n <div class=\"z-cover-shadow z-shadow-2\" />\n <div class=\"z-cover-shadow z-shadow-1\" />\n </div>\n )}\n <img\n src={this.cover}\n alt=\"Book Cover\"\n class=\"z-cover-img\"\n />\n </div>\n </div>\n <div class=\"info-container\">\n {this.authors && (\n <span\n class=\"authors-label\"\n ref={(el) => (this.authorsRef = el as HTMLElement)}\n >\n {this.authors}\n </span>\n )}\n <span\n class=\"card-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n >\n {this.cardTitle}\n </span>\n <span\n class=\"card-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\n <div class=\"tags-container\">\n <slot name=\"tags\"></slot>\n </div>\n <div class=\"volumes-label\">\n <slot name=\"volumes\"></slot>\n </div>\n </div>\n </Host>\n );\n };\n\n private renderInfoCard = (): HTMLZResultCardElement => {\n return (\n <Host\n tabIndex={0}\n class=\"info-card\"\n >\n <div class=\"info-icon-column\">\n <div class=\"info-icon-container\">\n <z-icon\n class=\"info-icon\"\n name=\"link\"\n width={18}\n height={18}\n />\n </div>\n </div>\n <div class=\"info-container\">\n <span\n class=\"card-title info-title\"\n ref={(el) => (this.titleRef = el as HTMLElement)}\n >\n {this.cardTitle}\n </span>\n <span\n class=\"card-subtitle info-subtitle\"\n ref={(el) => (this.subtitleRef = el as HTMLElement)}\n >\n {this.cardSubtitle}\n </span>\n </div>\n </Host>\n );\n };\n\n render(): HTMLZResultCardElement {\n return this.isInfoCard ? this.renderInfoCard() : this.renderOperaCard();\n }\n}\n"],"version":3}
@@ -204,6 +204,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
204
204
  return import(
205
205
  /* webpackMode: "lazy" */
206
206
  './z-range-picker.entry.js').then(processMod, consoleError);
207
+ case 'z-result-card':
208
+ return import(
209
+ /* webpackMode: "lazy" */
210
+ './z-result-card.entry.js').then(processMod, consoleError);
207
211
  case 'z-section-title':
208
212
  return import(
209
213
  /* webpackMode: "lazy" */