@redvars/peacock 3.2.7 → 3.2.9
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/PeacockComponent-CxJc63xj.js +73 -0
- package/dist/PeacockComponent-CxJc63xj.js.map +1 -0
- package/dist/assets/styles.css +1 -1
- package/dist/assets/styles.css.map +1 -1
- package/dist/button-2MeDq0Yy.js +898 -0
- package/dist/button-2MeDq0Yy.js.map +1 -0
- package/dist/button-group.js +7 -5
- package/dist/button-group.js.map +1 -1
- package/dist/button.js +7 -0
- package/dist/button.js.map +1 -0
- package/dist/{class-map-BmCohX9p.js → class-map-BvQRv7eW.js} +2 -2
- package/dist/{class-map-BmCohX9p.js.map → class-map-BvQRv7eW.js.map} +1 -1
- package/dist/clock.js +26 -24
- package/dist/clock.js.map +1 -1
- package/dist/code-editor.js +43877 -0
- package/dist/code-editor.js.map +1 -0
- package/dist/code-highlighter.js +9 -7
- package/dist/code-highlighter.js.map +1 -1
- package/dist/custom-elements-jsdocs.json +561 -0
- package/dist/custom-elements.json +838 -227
- package/dist/{utils-DGMeCC48.js → dispatch-event-utils-vbdiOSeC.js} +19 -2
- package/dist/dispatch-event-utils-vbdiOSeC.js.map +1 -0
- package/dist/image-DK6VQW7N.js +7042 -0
- package/dist/image-DK6VQW7N.js.map +1 -0
- package/dist/index.js +10 -33
- package/dist/index.js.map +1 -1
- package/dist/number-counter.js +7 -5
- package/dist/number-counter.js.map +1 -1
- package/dist/observe-theme-change-NneLARW8.js +51 -0
- package/dist/observe-theme-change-NneLARW8.js.map +1 -0
- package/dist/peacock-loader.js +973 -37
- package/dist/peacock-loader.js.map +1 -1
- package/dist/src/PeacockComponent.d.ts +1 -0
- package/dist/src/code-editor/code-editor.d.ts +45 -0
- package/dist/src/code-editor/index.d.ts +2 -0
- package/dist/src/image/image.d.ts +45 -0
- package/dist/src/image/index.d.ts +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/utils/dispatch-event-utils.d.ts +72 -0
- package/dist/src/utils/observe-theme-change.d.ts +3 -0
- package/dist/src/utils.d.ts +1 -72
- package/dist/{state-CV1fRmOT.js → state-B09bP3XH.js} +2 -2
- package/dist/{state-CV1fRmOT.js.map → state-B09bP3XH.js.map} +1 -1
- package/dist/{style-map-CdmclYgz.js → style-map-B8xgVEc9.js} +2 -2
- package/dist/{style-map-CdmclYgz.js.map → style-map-B8xgVEc9.js.map} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{unsafe-html-BS8X6Gto.js → unsafe-html-B-dV3Jps.js} +2 -2
- package/dist/{unsafe-html-BS8X6Gto.js.map → unsafe-html-B-dV3Jps.js.map} +1 -1
- package/package.json +5 -3
- package/readme.md +2 -2
- package/scss/styles.scss +57 -1
- package/scss/tokens.css +1 -0
- package/src/PeacockComponent.ts +3 -0
- package/src/accordion/accordion-item/accordion-item.scss +1 -1
- package/src/button/BaseButton.ts +1 -1
- package/src/button/button/button.ts +3 -1
- package/src/button/button-group/button-group.ts +2 -0
- package/src/clock/clock.ts +4 -1
- package/src/code-editor/code-editor.scss +52 -0
- package/src/code-editor/code-editor.ts +215 -0
- package/src/code-editor/demo/index.html +37 -0
- package/src/code-editor/index.ts +3 -0
- package/src/code-highlighter/code-highlighter.ts +2 -0
- package/src/container/container.scss +1 -1
- package/src/date-picker/date-picker.ts +1 -1
- package/src/image/image.scss +49 -0
- package/src/image/image.ts +135 -0
- package/src/image/index.ts +1 -0
- package/src/index.ts +2 -0
- package/src/input/input.ts +1 -2
- package/src/menu/menu-item/menu-item.scss +5 -4
- package/src/menu/menu-list/menu-list.scss +1 -0
- package/src/number-counter/number-counter.ts +2 -0
- package/src/number-field/number-field.ts +1 -1
- package/src/peacock-loader.ts +7 -0
- package/src/textarea/textarea.ts +1 -1
- package/src/time-picker/time-picker.ts +1 -1
- package/src/utils/dispatch-event-utils.ts +131 -0
- package/src/utils/observe-theme-change.ts +30 -0
- package/src/utils.ts +5 -131
- package/dist/BaseButton.js +0 -209
- package/dist/BaseButton.js.map +0 -1
- package/dist/BaseInput.js +0 -27
- package/dist/BaseInput.js.map +0 -1
- package/dist/accordion-item.js +0 -191
- package/dist/accordion-item.js.map +0 -1
- package/dist/accordion.js +0 -142
- package/dist/accordion.js.map +0 -1
- package/dist/avatar.js +0 -106
- package/dist/avatar.js.map +0 -1
- package/dist/badge.js +0 -84
- package/dist/badge.js.map +0 -1
- package/dist/base-progress.js +0 -33
- package/dist/base-progress.js.map +0 -1
- package/dist/breadcrumb-item.js +0 -160
- package/dist/breadcrumb-item.js.map +0 -1
- package/dist/breadcrumb.js +0 -84
- package/dist/breadcrumb.js.map +0 -1
- package/dist/checkbox.js +0 -530
- package/dist/checkbox.js.map +0 -1
- package/dist/chip.js +0 -303
- package/dist/chip.js.map +0 -1
- package/dist/container.js +0 -135
- package/dist/container.js.map +0 -1
- package/dist/divider.js +0 -126
- package/dist/divider.js.map +0 -1
- package/dist/elevation.js +0 -79
- package/dist/elevation.js.map +0 -1
- package/dist/empty-state.js +0 -171
- package/dist/empty-state.js.map +0 -1
- package/dist/field.js +0 -416
- package/dist/field.js.map +0 -1
- package/dist/focus-ring.js +0 -107
- package/dist/focus-ring.js.map +0 -1
- package/dist/icon.js +0 -183
- package/dist/icon.js.map +0 -1
- package/dist/link.js +0 -91
- package/dist/link.js.map +0 -1
- package/dist/lit-element-CA46RFZ_.js +0 -28
- package/dist/lit-element-CA46RFZ_.js.map +0 -1
- package/dist/menu-item.js +0 -232
- package/dist/menu-item.js.map +0 -1
- package/dist/menu-list.js +0 -108
- package/dist/menu-list.js.map +0 -1
- package/dist/menu.js +0 -117
- package/dist/menu.js.map +0 -1
- package/dist/property-DNVWDdPC.js +0 -45
- package/dist/property-DNVWDdPC.js.map +0 -1
- package/dist/query-QBcUV-L_.js +0 -15
- package/dist/query-QBcUV-L_.js.map +0 -1
- package/dist/ripple.js +0 -128
- package/dist/ripple.js.map +0 -1
- package/dist/skeleton.js +0 -113
- package/dist/skeleton.js.map +0 -1
- package/dist/spinner.js +0 -93
- package/dist/spinner.js.map +0 -1
- package/dist/spread-axRTFMoH.js +0 -32
- package/dist/spread-axRTFMoH.js.map +0 -1
- package/dist/switch-DqxIiVsB.js +0 -2738
- package/dist/switch-DqxIiVsB.js.map +0 -1
- package/dist/tag.js +0 -323
- package/dist/tag.js.map +0 -1
- package/dist/tooltip.js +0 -1857
- package/dist/tooltip.js.map +0 -1
- package/dist/utils-DGMeCC48.js.map +0 -1
package/dist/empty-state.js
DELETED
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import { _ as __decorate, n } from './property-DNVWDdPC.js';
|
|
2
|
-
import { i, a as i$1, A, b } from './lit-element-CA46RFZ_.js';
|
|
3
|
-
import { r } from './state-CV1fRmOT.js';
|
|
4
|
-
import { e } from './class-map-BmCohX9p.js';
|
|
5
|
-
import './directive-Cuw6h7YA.js';
|
|
6
|
-
|
|
7
|
-
var css_248z = i`* {
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.screen-reader-only {
|
|
12
|
-
display: none !important;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
:host {
|
|
16
|
-
display: block;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.empty-state {
|
|
20
|
-
container: emptystate/inline-size;
|
|
21
|
-
padding: var(--spacing-100);
|
|
22
|
-
height: 100%;
|
|
23
|
-
max-width: var(--container-lg);
|
|
24
|
-
margin: auto;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.empty-state-container {
|
|
28
|
-
display: flex;
|
|
29
|
-
height: 100%;
|
|
30
|
-
justify-content: center;
|
|
31
|
-
gap: var(--spacing-500);
|
|
32
|
-
align-items: center;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.illustration {
|
|
36
|
-
height: 100%;
|
|
37
|
-
display: flex;
|
|
38
|
-
}
|
|
39
|
-
.illustration base-icon {
|
|
40
|
-
--icon-size: 100%;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.content {
|
|
44
|
-
display: flex;
|
|
45
|
-
flex-direction: column;
|
|
46
|
-
justify-content: center;
|
|
47
|
-
}
|
|
48
|
-
.content .title {
|
|
49
|
-
font-family: var(--typography-headline-medium-emphasized-font-family) !important;
|
|
50
|
-
font-size: var(--typography-headline-medium-emphasized-font-size) !important;
|
|
51
|
-
font-weight: var(--typography-headline-medium-emphasized-font-weight) !important;
|
|
52
|
-
line-height: var(--typography-headline-medium-emphasized-line-height) !important;
|
|
53
|
-
letter-spacing: var(--typography-headline-medium-emphasized-letter-spacing) !important;
|
|
54
|
-
margin-bottom: var(--spacing-200);
|
|
55
|
-
color: var(--color-on-surface);
|
|
56
|
-
}
|
|
57
|
-
.content .description {
|
|
58
|
-
font-family: var(--typography-body-medium-font-family) !important;
|
|
59
|
-
font-size: var(--typography-body-medium-font-size) !important;
|
|
60
|
-
font-weight: var(--typography-body-medium-font-weight) !important;
|
|
61
|
-
line-height: var(--typography-body-medium-line-height) !important;
|
|
62
|
-
letter-spacing: var(--typography-body-medium-letter-spacing) !important;
|
|
63
|
-
margin-bottom: var(--spacing-400);
|
|
64
|
-
color: var(--color-on-surface-variant);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
:host(.content-center) .content {
|
|
68
|
-
align-items: center;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@container emptystate (min-width: 672px) {
|
|
72
|
-
.empty-state .illustration {
|
|
73
|
-
width: 50%;
|
|
74
|
-
}
|
|
75
|
-
.empty-state .content {
|
|
76
|
-
width: 50%;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
@container emptystate (max-width: 671px) {
|
|
80
|
-
.empty-state .empty-state-container {
|
|
81
|
-
flex-direction: column;
|
|
82
|
-
gap: var(--spacing-200);
|
|
83
|
-
}
|
|
84
|
-
.empty-state .empty-state-container .illustration {
|
|
85
|
-
height: auto;
|
|
86
|
-
width: 100%;
|
|
87
|
-
justify-content: center;
|
|
88
|
-
}
|
|
89
|
-
}`;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* @label Empty State
|
|
93
|
-
* @name empty-state
|
|
94
|
-
* @description A message that displays when there is no information to display.
|
|
95
|
-
*/
|
|
96
|
-
class EmptyState extends i$1 {
|
|
97
|
-
constructor() {
|
|
98
|
-
super(...arguments);
|
|
99
|
-
this.illustration = 'no-document';
|
|
100
|
-
this.headline = '';
|
|
101
|
-
this.description = '';
|
|
102
|
-
this.vertical = false;
|
|
103
|
-
this.handleResize = () => {
|
|
104
|
-
// Logic equivalent to Stencil's clientWidth check
|
|
105
|
-
this.vertical = this.offsetWidth < 768;
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
connectedCallback() {
|
|
109
|
-
// eslint-disable-next-line wc/guard-super-call
|
|
110
|
-
super.connectedCallback();
|
|
111
|
-
window.addEventListener('resize', this.handleResize);
|
|
112
|
-
// Initial check
|
|
113
|
-
this.handleResize();
|
|
114
|
-
}
|
|
115
|
-
disconnectedCallback() {
|
|
116
|
-
window.removeEventListener('resize', this.handleResize);
|
|
117
|
-
// eslint-disable-next-line wc/guard-super-call
|
|
118
|
-
super.disconnectedCallback();
|
|
119
|
-
}
|
|
120
|
-
__renderTitle() {
|
|
121
|
-
if (!this.headline)
|
|
122
|
-
return A;
|
|
123
|
-
return b `<div class="title">${this.headline}</div>`;
|
|
124
|
-
}
|
|
125
|
-
__renderDescription() {
|
|
126
|
-
if (!this.description)
|
|
127
|
-
return A;
|
|
128
|
-
return b `<div class="description">${this.description}</div>`;
|
|
129
|
-
}
|
|
130
|
-
render() {
|
|
131
|
-
const classes = {
|
|
132
|
-
'empty-state': true,
|
|
133
|
-
vertical: this.vertical,
|
|
134
|
-
};
|
|
135
|
-
// Resolving asset paths in Lit typically uses import.meta.url or absolute paths
|
|
136
|
-
const illustrationPath = new URL(`./assets/images/empty-state/${this.illustration}.svg`, import.meta.url).href;
|
|
137
|
-
return b `
|
|
138
|
-
<div class="${e(classes)}">
|
|
139
|
-
<div class="empty-state-container">
|
|
140
|
-
<div class="illustration">
|
|
141
|
-
<base-icon src="${illustrationPath}"></base-icon>
|
|
142
|
-
</div>
|
|
143
|
-
|
|
144
|
-
<div class="content">
|
|
145
|
-
${this.__renderTitle()} ${this.__renderDescription()}
|
|
146
|
-
<div class="actions">
|
|
147
|
-
<slot name="actions"></slot>
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
</div>
|
|
151
|
-
</div>
|
|
152
|
-
`;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
// Lit handles styles in a static property for better performance
|
|
156
|
-
EmptyState.styles = [css_248z];
|
|
157
|
-
__decorate([
|
|
158
|
-
n({ type: String, reflect: true })
|
|
159
|
-
], EmptyState.prototype, "illustration", void 0);
|
|
160
|
-
__decorate([
|
|
161
|
-
n({ type: String, reflect: true })
|
|
162
|
-
], EmptyState.prototype, "headline", void 0);
|
|
163
|
-
__decorate([
|
|
164
|
-
n({ type: String, reflect: true })
|
|
165
|
-
], EmptyState.prototype, "description", void 0);
|
|
166
|
-
__decorate([
|
|
167
|
-
r()
|
|
168
|
-
], EmptyState.prototype, "vertical", void 0);
|
|
169
|
-
|
|
170
|
-
export { EmptyState };
|
|
171
|
-
//# sourceMappingURL=empty-state.js.map
|
package/dist/empty-state.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"empty-state.js","sources":["../../src/empty-state/empty-state.ts"],"sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport styles from './empty-state.scss';\n\n/**\n * @label Empty State\n * @name empty-state\n * @description A message that displays when there is no information to display.\n */\nexport class EmptyState extends LitElement {\n // Lit handles styles in a static property for better performance\n static styles = [styles];\n\n @property({ type: String, reflect: true })\n illustration: 'no-document' | 'page' | 'search' = 'no-document';\n\n @property({ type: String, reflect: true })\n headline = '';\n\n @property({ type: String, reflect: true })\n description = '';\n\n @state()\n private vertical = false;\n\n connectedCallback() {\n // eslint-disable-next-line wc/guard-super-call\n super.connectedCallback();\n window.addEventListener('resize', this.handleResize);\n // Initial check\n this.handleResize();\n }\n\n disconnectedCallback() {\n window.removeEventListener('resize', this.handleResize);\n // eslint-disable-next-line wc/guard-super-call\n super.disconnectedCallback();\n }\n\n private handleResize = () => {\n // Logic equivalent to Stencil's clientWidth check\n this.vertical = this.offsetWidth < 768;\n };\n\n __renderTitle() {\n if (!this.headline) return nothing;\n return html`<div class=\"title\">${this.headline}</div>`;\n }\n\n __renderDescription() {\n if (!this.description) return nothing;\n return html`<div class=\"description\">${this.description}</div>`;\n }\n\n protected render() {\n const classes = {\n 'empty-state': true,\n vertical: this.vertical,\n };\n\n // Resolving asset paths in Lit typically uses import.meta.url or absolute paths\n const illustrationPath = new URL(\n `./assets/images/empty-state/${this.illustration}.svg`,\n import.meta.url,\n ).href;\n\n return html`\n <div class=\"${classMap(classes)}\">\n <div class=\"empty-state-container\">\n <div class=\"illustration\">\n <base-icon src=\"${illustrationPath}\"></base-icon>\n </div>\n\n <div class=\"content\">\n ${this.__renderTitle()} ${this.__renderDescription()}\n <div class=\"actions\">\n <slot name=\"actions\"></slot>\n </div>\n </div>\n </div>\n </div>\n `;\n }\n}\n"],"names":["LitElement","nothing","html","classMap","styles","property","state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA;;;;AAIG;AACG,MAAO,UAAW,SAAQA,GAAU,CAAA;AAA1C,IAAA,WAAA,GAAA;;QAKE,IAAA,CAAA,YAAY,GAAsC,aAAa;QAG/D,IAAA,CAAA,QAAQ,GAAG,EAAE;QAGb,IAAA,CAAA,WAAW,GAAG,EAAE;QAGR,IAAA,CAAA,QAAQ,GAAG,KAAK;QAgBhB,IAAA,CAAA,YAAY,GAAG,MAAK;;YAE1B,IAAI,CAAC,QAAQ,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AAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;AACuB,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAGhE,UAAA,CAAA;IADCA,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;AAC3B,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAGd,UAAA,CAAA;IADCA,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;AACxB,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AAGT,UAAA,CAAA;AADP,IAAAC,CAAK;AACmB,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;;;;"}
|
package/dist/field.js
DELETED
|
@@ -1,416 +0,0 @@
|
|
|
1
|
-
import { _ as __decorate, n } from './property-DNVWDdPC.js';
|
|
2
|
-
import { i, a as i$1, b, A } from './lit-element-CA46RFZ_.js';
|
|
3
|
-
import { r } from './state-CV1fRmOT.js';
|
|
4
|
-
import { e } from './class-map-BmCohX9p.js';
|
|
5
|
-
import { o as observerSlotChangesWithCallback } from './utils-DGMeCC48.js';
|
|
6
|
-
import './directive-Cuw6h7YA.js';
|
|
7
|
-
|
|
8
|
-
var css_248z = i`* {
|
|
9
|
-
box-sizing: border-box;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.screen-reader-only {
|
|
13
|
-
display: none !important;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
:host {
|
|
17
|
-
--field-height: unset;
|
|
18
|
-
--field-padding-block: unset;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.field {
|
|
22
|
-
position: relative;
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
--_container-shape-start-start: var(--field-container-shape-start-start, var(--shape-corner-extra-small));
|
|
26
|
-
--_container-shape-start-end: var(--field-container-shape-start-end, var(--shape-corner-extra-small));
|
|
27
|
-
--_container-shape-end-start: var(--field-container-shape-end-start, var(--shape-corner-extra-small));
|
|
28
|
-
--_container-shape-end-end: var(--field-container-shape-end-end, var(--shape-corner-extra-small));
|
|
29
|
-
--_container-color: var(--field-container-color);
|
|
30
|
-
--_outline-width: var(--field-outline-width, 0.0675rem);
|
|
31
|
-
--_outline-color: var(--field-outline-color, var(--color-outline));
|
|
32
|
-
--_input-text-color: var(--field-label-text-color, var(--color-on-surface));
|
|
33
|
-
--_helper-text-color: var(--field-helper-text-color, var(--color-on-surface-variant));
|
|
34
|
-
--_helper-text-opacity: unset;
|
|
35
|
-
--_label-text-color: var(--field-label-text-color, var(--color-primary));
|
|
36
|
-
}
|
|
37
|
-
.field .field-header {
|
|
38
|
-
display: flex;
|
|
39
|
-
align-items: center;
|
|
40
|
-
margin-block-end: var(--spacing-100);
|
|
41
|
-
justify-content: space-between;
|
|
42
|
-
gap: var(--spacing-100);
|
|
43
|
-
}
|
|
44
|
-
.field .field-header .label {
|
|
45
|
-
position: relative;
|
|
46
|
-
font-family: var(--typography-body-small-font-family) !important;
|
|
47
|
-
font-size: var(--typography-body-small-font-size) !important;
|
|
48
|
-
font-weight: var(--typography-body-small-font-weight) !important;
|
|
49
|
-
line-height: var(--typography-body-small-line-height) !important;
|
|
50
|
-
letter-spacing: var(--typography-body-small-letter-spacing) !important;
|
|
51
|
-
color: var(--_label-text-color);
|
|
52
|
-
overflow: hidden;
|
|
53
|
-
white-space: nowrap;
|
|
54
|
-
text-overflow: ellipsis;
|
|
55
|
-
}
|
|
56
|
-
.field .field-header .label .required {
|
|
57
|
-
color: var(--color-error);
|
|
58
|
-
padding-inline-start: var(--spacing-025);
|
|
59
|
-
}
|
|
60
|
-
.field .field-body {
|
|
61
|
-
position: relative;
|
|
62
|
-
display: flex;
|
|
63
|
-
cursor: text;
|
|
64
|
-
}
|
|
65
|
-
.field .field-body .outline {
|
|
66
|
-
position: absolute;
|
|
67
|
-
z-index: 2;
|
|
68
|
-
left: 0;
|
|
69
|
-
width: 100%;
|
|
70
|
-
height: 100%;
|
|
71
|
-
pointer-events: none;
|
|
72
|
-
border: var(--_outline-width) solid var(--_outline-color);
|
|
73
|
-
opacity: var(--_outline-opacity, 1);
|
|
74
|
-
border-start-start-radius: var(--_container-shape-start-start);
|
|
75
|
-
border-start-end-radius: var(--_container-shape-start-end);
|
|
76
|
-
border-end-start-radius: var(--_container-shape-end-start);
|
|
77
|
-
border-end-end-radius: var(--_container-shape-end-end);
|
|
78
|
-
}
|
|
79
|
-
.field .field-body .background {
|
|
80
|
-
position: absolute;
|
|
81
|
-
z-index: 0;
|
|
82
|
-
left: 0;
|
|
83
|
-
width: 100%;
|
|
84
|
-
height: 100%;
|
|
85
|
-
pointer-events: none;
|
|
86
|
-
background-color: var(--_container-color);
|
|
87
|
-
opacity: var(--_container-opacity, 1);
|
|
88
|
-
border-start-start-radius: var(--_container-shape-start-start);
|
|
89
|
-
border-start-end-radius: var(--_container-shape-start-end);
|
|
90
|
-
border-end-start-radius: var(--_container-shape-end-start);
|
|
91
|
-
border-end-end-radius: var(--_container-shape-end-end);
|
|
92
|
-
}
|
|
93
|
-
.field .field-body .field-content {
|
|
94
|
-
display: flex;
|
|
95
|
-
align-items: center;
|
|
96
|
-
flex: 1;
|
|
97
|
-
height: var(--field-height, 3.5rem);
|
|
98
|
-
padding-block: var(--field-padding-block);
|
|
99
|
-
z-index: 1;
|
|
100
|
-
}
|
|
101
|
-
.field .field-body .field-content .input-wrapper {
|
|
102
|
-
flex: 1;
|
|
103
|
-
padding-inline: var(--spacing-200);
|
|
104
|
-
position: relative;
|
|
105
|
-
}
|
|
106
|
-
.field .field-body .field-content .input-wrapper .outlined-label {
|
|
107
|
-
position: absolute;
|
|
108
|
-
top: 0;
|
|
109
|
-
left: 0;
|
|
110
|
-
align-items: center;
|
|
111
|
-
height: 100%;
|
|
112
|
-
width: 100%;
|
|
113
|
-
padding-inline: var(--spacing-200);
|
|
114
|
-
font-family: var(--typography-body-large-font-family) !important;
|
|
115
|
-
font-size: var(--typography-body-large-font-size) !important;
|
|
116
|
-
font-weight: var(--typography-body-large-font-weight) !important;
|
|
117
|
-
line-height: var(--typography-body-large-line-height) !important;
|
|
118
|
-
letter-spacing: var(--typography-body-large-letter-spacing) !important;
|
|
119
|
-
color: var(--_input-text-color);
|
|
120
|
-
background-color: var(--_container-color);
|
|
121
|
-
opacity: var(--_container-opacity, 1);
|
|
122
|
-
}
|
|
123
|
-
.field .field-body .field-content .input-wrapper .outlined-slot-container {
|
|
124
|
-
opacity: 0;
|
|
125
|
-
}
|
|
126
|
-
.field .field-body .field-content slot::slotted(*) {
|
|
127
|
-
font-family: var(--typography-body-large-font-family) !important;
|
|
128
|
-
font-size: var(--typography-body-large-font-size) !important;
|
|
129
|
-
font-weight: var(--typography-body-large-font-weight) !important;
|
|
130
|
-
line-height: var(--typography-body-large-line-height) !important;
|
|
131
|
-
letter-spacing: var(--typography-body-large-letter-spacing) !important;
|
|
132
|
-
color: var(--_input-text-color);
|
|
133
|
-
--icon-size: 1.25rem;
|
|
134
|
-
--icon-color: var(--_input-text-color);
|
|
135
|
-
}
|
|
136
|
-
.field .field-body .field-content slot::slotted(input::placeholder) {
|
|
137
|
-
color: var(--color-on-surface-variant);
|
|
138
|
-
}
|
|
139
|
-
.field .field-body .field-content .slot-start-wrapper.has-content {
|
|
140
|
-
margin-inline-start: 0.75rem;
|
|
141
|
-
display: flex;
|
|
142
|
-
align-items: center;
|
|
143
|
-
gap: 0.5rem;
|
|
144
|
-
}
|
|
145
|
-
.field .field-body .field-content .slot-end-wrapper.has-content {
|
|
146
|
-
margin-inline-end: 0.75rem;
|
|
147
|
-
display: flex;
|
|
148
|
-
align-items: center;
|
|
149
|
-
gap: 0.5rem;
|
|
150
|
-
}
|
|
151
|
-
.field .field-footer {
|
|
152
|
-
display: flex;
|
|
153
|
-
align-items: center;
|
|
154
|
-
justify-content: space-between;
|
|
155
|
-
gap: var(--spacing-200);
|
|
156
|
-
margin-block-start: var(--spacing-050);
|
|
157
|
-
padding-inline: var(--spacing-200);
|
|
158
|
-
}
|
|
159
|
-
.field .field-footer .helper, .field .field-footer .text-count {
|
|
160
|
-
position: relative;
|
|
161
|
-
font-family: var(--typography-body-large-font-family) !important;
|
|
162
|
-
font-size: var(--typography-body-large-font-size) !important;
|
|
163
|
-
font-weight: var(--typography-body-large-font-weight) !important;
|
|
164
|
-
line-height: var(--typography-body-large-line-height) !important;
|
|
165
|
-
letter-spacing: var(--typography-body-large-letter-spacing) !important;
|
|
166
|
-
color: var(--_helper-text-color);
|
|
167
|
-
opacity: var(--_helper-text-opacity);
|
|
168
|
-
}
|
|
169
|
-
.field.focused {
|
|
170
|
-
--_outline-color: var(--color-primary);
|
|
171
|
-
--_outline-width: 0.125rem;
|
|
172
|
-
}
|
|
173
|
-
.field.has-error {
|
|
174
|
-
--_label-text-color: var(--color-error);
|
|
175
|
-
--_outline-color: var(--color-error);
|
|
176
|
-
--_helper-text-color: var(--color-error);
|
|
177
|
-
--_input-text-color: var(--color-error);
|
|
178
|
-
}
|
|
179
|
-
.field.has-warning {
|
|
180
|
-
--_label-text-color: var(--color-warning);
|
|
181
|
-
--_outline-color: var(--color-warning);
|
|
182
|
-
--_helper-text-color: var(--color-warning);
|
|
183
|
-
--_input-text-color: var(--color-warning);
|
|
184
|
-
}
|
|
185
|
-
.field.disabled .label {
|
|
186
|
-
opacity: 0.38;
|
|
187
|
-
}
|
|
188
|
-
.field.disabled {
|
|
189
|
-
--_input-text-color: var(--color-on-surface-variant);
|
|
190
|
-
--_outline-opacity: 0.38;
|
|
191
|
-
--_helper-text-opacity: 0.38;
|
|
192
|
-
--_container-color: var(--color-on-surface);
|
|
193
|
-
--_container-opacity: 0.1;
|
|
194
|
-
cursor: not-allowed;
|
|
195
|
-
}
|
|
196
|
-
.field.readonly {
|
|
197
|
-
cursor: initial;
|
|
198
|
-
--_input-text-color: var(--color-on-surface-variant);
|
|
199
|
-
--_outline-opacity: 0.38;
|
|
200
|
-
--_helper-text-opacity: 0.38;
|
|
201
|
-
--_container-color: var(--color-on-surface);
|
|
202
|
-
--_container-opacity: 0.38;
|
|
203
|
-
}
|
|
204
|
-
.field.show-skeleton .skeleton {
|
|
205
|
-
display: block;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.skeleton {
|
|
209
|
-
display: none;
|
|
210
|
-
width: 100%;
|
|
211
|
-
height: 100%;
|
|
212
|
-
z-index: 2;
|
|
213
|
-
position: absolute;
|
|
214
|
-
top: 0;
|
|
215
|
-
left: 0;
|
|
216
|
-
--skeleton-shape-start-start: var(--shape-corner-extra-small);
|
|
217
|
-
--skeleton-shape-start-end: var(--shape-corner-extra-small);
|
|
218
|
-
--skeleton-shape-end-start: var(--shape-corner-extra-small);
|
|
219
|
-
--skeleton-shape-end-end: var(--shape-corner-extra-small);
|
|
220
|
-
}`;
|
|
221
|
-
|
|
222
|
-
class Field extends i$1 {
|
|
223
|
-
constructor() {
|
|
224
|
-
super(...arguments);
|
|
225
|
-
this.label = '';
|
|
226
|
-
this.help = '';
|
|
227
|
-
this.required = false;
|
|
228
|
-
this.disabled = false;
|
|
229
|
-
this.readonly = false;
|
|
230
|
-
this.skeleton = false;
|
|
231
|
-
this.helperText = '';
|
|
232
|
-
this.error = false;
|
|
233
|
-
this.errorText = '';
|
|
234
|
-
this.warning = false;
|
|
235
|
-
this.warningText = '';
|
|
236
|
-
this.textCount = '';
|
|
237
|
-
this.focused = false;
|
|
238
|
-
this.populated = false;
|
|
239
|
-
this.variant = 'default';
|
|
240
|
-
this.slotStartHasContent = false;
|
|
241
|
-
this.slotEndHasContent = false;
|
|
242
|
-
}
|
|
243
|
-
firstUpdated() {
|
|
244
|
-
observerSlotChangesWithCallback(this.renderRoot.querySelector('.slot-start-wrapper slot'), hasContent => {
|
|
245
|
-
this.slotStartHasContent = hasContent;
|
|
246
|
-
this.requestUpdate();
|
|
247
|
-
});
|
|
248
|
-
observerSlotChangesWithCallback(this.renderRoot.querySelector('.slot-end-wrapper slot'), hasContent => {
|
|
249
|
-
this.slotEndHasContent = hasContent;
|
|
250
|
-
this.requestUpdate();
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
__handleClick() {
|
|
254
|
-
// @ts-ignore
|
|
255
|
-
this.host?.focus?.();
|
|
256
|
-
}
|
|
257
|
-
__renderInputSlot() {
|
|
258
|
-
if (this.variant === 'outlined') {
|
|
259
|
-
if (this.populated || this.focused)
|
|
260
|
-
return b `<slot></slot>`;
|
|
261
|
-
return b `
|
|
262
|
-
<label class="outlined-label">${this.label}</label>
|
|
263
|
-
<div class="outlined-slot-container">
|
|
264
|
-
<slot></slot>
|
|
265
|
-
</div>
|
|
266
|
-
`;
|
|
267
|
-
}
|
|
268
|
-
return b `<slot></slot>`;
|
|
269
|
-
}
|
|
270
|
-
__renderFieldHeader() {
|
|
271
|
-
if (!this.label)
|
|
272
|
-
return A;
|
|
273
|
-
if (this.variant === 'outlined' && !this.populated && !this.focused) {
|
|
274
|
-
return A;
|
|
275
|
-
}
|
|
276
|
-
return b `<div class="field-header">
|
|
277
|
-
<label class="label">
|
|
278
|
-
${this.label}${this.required
|
|
279
|
-
? b `<span class="required">*</span>`
|
|
280
|
-
: A}
|
|
281
|
-
<base-skeleton class="skeleton"></base-skeleton>
|
|
282
|
-
</label>
|
|
283
|
-
</div>`;
|
|
284
|
-
}
|
|
285
|
-
render() {
|
|
286
|
-
const classes = {
|
|
287
|
-
field: true,
|
|
288
|
-
required: this.required,
|
|
289
|
-
disabled: this.disabled,
|
|
290
|
-
'show-skeleton': this.skeleton,
|
|
291
|
-
'has-error': this.error,
|
|
292
|
-
'has-warning': this.warning,
|
|
293
|
-
focused: this.focused,
|
|
294
|
-
readonly: this.readonly,
|
|
295
|
-
[`variant-${this.variant}`]: true,
|
|
296
|
-
populated: this.populated,
|
|
297
|
-
};
|
|
298
|
-
return b `
|
|
299
|
-
<div class=${e(classes)}>
|
|
300
|
-
${this.__renderFieldHeader()}
|
|
301
|
-
|
|
302
|
-
<div class="field-body" @click=${this.__handleClick}>
|
|
303
|
-
<div class="outline"></div>
|
|
304
|
-
<div class="background"></div>
|
|
305
|
-
<base-skeleton class="skeleton"></base-skeleton>
|
|
306
|
-
|
|
307
|
-
<div class="field-content">
|
|
308
|
-
<div
|
|
309
|
-
class=${e({
|
|
310
|
-
'slot-start-wrapper': true,
|
|
311
|
-
'has-content': this.slotStartHasContent,
|
|
312
|
-
})}
|
|
313
|
-
>
|
|
314
|
-
<slot name="field-start"></slot>
|
|
315
|
-
</div>
|
|
316
|
-
|
|
317
|
-
<div class="input-wrapper">${this.__renderInputSlot()}</div>
|
|
318
|
-
|
|
319
|
-
<div
|
|
320
|
-
class=${e({
|
|
321
|
-
'slot-end-wrapper': true,
|
|
322
|
-
'has-content': this.slotEndHasContent,
|
|
323
|
-
})}
|
|
324
|
-
>
|
|
325
|
-
<slot name="field-end"></slot>
|
|
326
|
-
</div>
|
|
327
|
-
</div>
|
|
328
|
-
</div>
|
|
329
|
-
|
|
330
|
-
${this.__renderFieldFooter()}
|
|
331
|
-
</div>
|
|
332
|
-
`;
|
|
333
|
-
}
|
|
334
|
-
__renderFieldFooter() {
|
|
335
|
-
if (!this.textCount &&
|
|
336
|
-
!this.helperText &&
|
|
337
|
-
!this.errorText &&
|
|
338
|
-
!this.warningText)
|
|
339
|
-
return A;
|
|
340
|
-
return b `<div class="field-footer">
|
|
341
|
-
${this.__renderHelperText()} ${this.__renderWordCount()}
|
|
342
|
-
</div>`;
|
|
343
|
-
}
|
|
344
|
-
__renderHelperText() {
|
|
345
|
-
if (this.error)
|
|
346
|
-
return b `<div class="helper">${this.errorText}</div>`;
|
|
347
|
-
if (this.warning)
|
|
348
|
-
return b `<div class="helper">${this.warningText}</div>`;
|
|
349
|
-
if (this.helperText || this.helperText === '')
|
|
350
|
-
return b `<div class="helper">${this.helperText}</div>`;
|
|
351
|
-
return A;
|
|
352
|
-
}
|
|
353
|
-
__renderWordCount() {
|
|
354
|
-
if (!this.textCount)
|
|
355
|
-
return A;
|
|
356
|
-
return b `<div class="text-count">${this.textCount}</div>`;
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
Field.styles = [css_248z];
|
|
360
|
-
__decorate([
|
|
361
|
-
n({ type: String })
|
|
362
|
-
], Field.prototype, "label", void 0);
|
|
363
|
-
__decorate([
|
|
364
|
-
n({ type: String })
|
|
365
|
-
], Field.prototype, "help", void 0);
|
|
366
|
-
__decorate([
|
|
367
|
-
n({ type: Boolean })
|
|
368
|
-
], Field.prototype, "required", void 0);
|
|
369
|
-
__decorate([
|
|
370
|
-
n({ type: Boolean, reflect: true })
|
|
371
|
-
], Field.prototype, "disabled", void 0);
|
|
372
|
-
__decorate([
|
|
373
|
-
n({ type: Boolean, reflect: true })
|
|
374
|
-
], Field.prototype, "readonly", void 0);
|
|
375
|
-
__decorate([
|
|
376
|
-
n({ type: Boolean })
|
|
377
|
-
], Field.prototype, "skeleton", void 0);
|
|
378
|
-
__decorate([
|
|
379
|
-
n({ type: String, attribute: 'helper-text' })
|
|
380
|
-
], Field.prototype, "helperText", void 0);
|
|
381
|
-
__decorate([
|
|
382
|
-
n({ type: Boolean })
|
|
383
|
-
], Field.prototype, "error", void 0);
|
|
384
|
-
__decorate([
|
|
385
|
-
n({ type: String, attribute: 'error-text' })
|
|
386
|
-
], Field.prototype, "errorText", void 0);
|
|
387
|
-
__decorate([
|
|
388
|
-
n({ type: Boolean })
|
|
389
|
-
], Field.prototype, "warning", void 0);
|
|
390
|
-
__decorate([
|
|
391
|
-
n({ type: String, attribute: 'warning-text' })
|
|
392
|
-
], Field.prototype, "warningText", void 0);
|
|
393
|
-
__decorate([
|
|
394
|
-
n({ type: String, attribute: 'text-count' })
|
|
395
|
-
], Field.prototype, "textCount", void 0);
|
|
396
|
-
__decorate([
|
|
397
|
-
n({ type: Boolean })
|
|
398
|
-
], Field.prototype, "focused", void 0);
|
|
399
|
-
__decorate([
|
|
400
|
-
n({ type: Boolean })
|
|
401
|
-
], Field.prototype, "populated", void 0);
|
|
402
|
-
__decorate([
|
|
403
|
-
n({ type: String })
|
|
404
|
-
], Field.prototype, "variant", void 0);
|
|
405
|
-
__decorate([
|
|
406
|
-
n({ type: Object })
|
|
407
|
-
], Field.prototype, "host", void 0);
|
|
408
|
-
__decorate([
|
|
409
|
-
r()
|
|
410
|
-
], Field.prototype, "slotStartHasContent", void 0);
|
|
411
|
-
__decorate([
|
|
412
|
-
r()
|
|
413
|
-
], Field.prototype, "slotEndHasContent", void 0);
|
|
414
|
-
|
|
415
|
-
export { Field };
|
|
416
|
-
//# sourceMappingURL=field.js.map
|
package/dist/field.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"field.js","sources":["../../src/field/field.ts"],"sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport styles from './field.scss';\nimport { observerSlotChangesWithCallback } from '../utils.js';\n\nexport class Field extends LitElement {\n static styles = [styles];\n\n @property({ type: String })\n label: string = '';\n\n @property({ type: String })\n help: string = '';\n\n @property({ type: Boolean })\n required: boolean = false;\n\n @property({ type: Boolean, reflect: true })\n disabled: boolean = false;\n\n @property({ type: Boolean, reflect: true })\n readonly: boolean = false;\n\n @property({ type: Boolean })\n skeleton: boolean = false;\n\n @property({ type: String, attribute: 'helper-text' })\n helperText: string = '';\n\n @property({ type: Boolean })\n error: boolean = false;\n\n @property({ type: String, attribute: 'error-text' })\n errorText: string = '';\n\n @property({ type: Boolean })\n warning: boolean = false;\n\n @property({ type: String, attribute: 'warning-text' })\n warningText: string = '';\n\n @property({ type: String, attribute: 'text-count' })\n textCount: string = '';\n\n @property({ type: Boolean })\n focused: boolean = false;\n\n @property({ type: Boolean })\n populated: boolean = false;\n\n @property({ type: String })\n variant: 'filled' | 'outlined' | 'default' = 'default';\n\n @property({ type: Object })\n host?: HTMLElement;\n\n @state()\n slotStartHasContent: boolean = false;\n\n @state()\n slotEndHasContent: boolean = false;\n\n firstUpdated() {\n observerSlotChangesWithCallback(\n this.renderRoot.querySelector('.slot-start-wrapper slot'),\n hasContent => {\n this.slotStartHasContent = hasContent;\n this.requestUpdate();\n },\n );\n observerSlotChangesWithCallback(\n this.renderRoot.querySelector('.slot-end-wrapper slot'),\n hasContent => {\n this.slotEndHasContent = hasContent;\n this.requestUpdate();\n },\n );\n }\n\n __handleClick() {\n // @ts-ignore\n this.host?.focus?.();\n }\n\n __renderInputSlot() {\n if (this.variant === 'outlined') {\n if (this.populated || this.focused) return html`<slot></slot>`;\n return html`\n <label class=\"outlined-label\">${this.label}</label>\n <div class=\"outlined-slot-container\">\n <slot></slot>\n </div>\n `;\n }\n return html`<slot></slot>`;\n }\n\n __renderFieldHeader() {\n if (!this.label) return nothing;\n if (this.variant === 'outlined' && !this.populated && !this.focused) {\n return nothing;\n }\n return html`<div class=\"field-header\">\n <label class=\"label\">\n ${this.label}${this.required\n ? html`<span class=\"required\">*</span>`\n : nothing}\n <base-skeleton class=\"skeleton\"></base-skeleton>\n </label>\n </div>`;\n }\n\n render() {\n const classes = {\n field: true,\n required: this.required,\n disabled: this.disabled,\n 'show-skeleton': this.skeleton,\n 'has-error': this.error,\n 'has-warning': this.warning,\n focused: this.focused,\n readonly: this.readonly,\n [`variant-${this.variant}`]: true,\n populated: this.populated,\n };\n\n return html`\n <div class=${classMap(classes)}>\n ${this.__renderFieldHeader()}\n\n <div class=\"field-body\" @click=${this.__handleClick}>\n <div class=\"outline\"></div>\n <div class=\"background\"></div>\n <base-skeleton class=\"skeleton\"></base-skeleton>\n\n <div class=\"field-content\">\n <div\n class=${classMap({\n 'slot-start-wrapper': true,\n 'has-content': this.slotStartHasContent,\n })}\n >\n <slot name=\"field-start\"></slot>\n </div>\n\n <div class=\"input-wrapper\">${this.__renderInputSlot()}</div>\n\n <div\n class=${classMap({\n 'slot-end-wrapper': true,\n 'has-content': this.slotEndHasContent,\n })}\n >\n <slot name=\"field-end\"></slot>\n </div>\n </div>\n </div>\n\n ${this.__renderFieldFooter()}\n </div>\n `;\n }\n\n __renderFieldFooter() {\n if (\n !this.textCount &&\n !this.helperText &&\n !this.errorText &&\n !this.warningText\n )\n return nothing;\n return html`<div class=\"field-footer\">\n ${this.__renderHelperText()} ${this.__renderWordCount()}\n </div>`;\n }\n\n __renderHelperText() {\n if (this.error) return html`<div class=\"helper\">${this.errorText}</div>`;\n if (this.warning)\n return html`<div class=\"helper\">${this.warningText}</div>`;\n if (this.helperText || this.helperText === '')\n return html`<div class=\"helper\">${this.helperText}</div>`;\n return nothing;\n }\n\n __renderWordCount() {\n if (!this.textCount) return nothing;\n return html`<div class=\"text-count\">${this.textCount}</div>`;\n }\n}\n"],"names":["LitElement","html","nothing","classMap","styles","property","state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMM,MAAO,KAAM,SAAQA,GAAU,CAAA;AAArC,IAAA,WAAA,GAAA;;QAIE,IAAA,CAAA,KAAK,GAAW,EAAE;QAGlB,IAAA,CAAA,IAAI,GAAW,EAAE;QAGjB,IAAA,CAAA,QAAQ,GAAY,KAAK;QAGzB,IAAA,CAAA,QAAQ,GAAY,KAAK;QAGzB,IAAA,CAAA,QAAQ,GAAY,KAAK;QAGzB,IAAA,CAAA,QAAQ,GAAY,KAAK;QAGzB,IAAA,CAAA,UAAU,GAAW,EAAE;QAGvB,IAAA,CAAA,KAAK,GAAY,KAAK;QAGtB,IAAA,CAAA,SAAS,GAAW,EAAE;QAGtB,IAAA,CAAA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