@proximus/lavender-section 2.0.0-alpha.202 → 2.0.0-alpha.204

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/Section.d.ts CHANGED
@@ -3,7 +3,7 @@ import type { Container } from '@proximus/lavender-container';
3
3
  import '@proximus/lavender-container';
4
4
  import '@proximus/lavender-layout';
5
5
  export declare class Section extends WithExtraAttributes {
6
- private template;
6
+ protected static readonly template: HTMLTemplateElement;
7
7
  constructor();
8
8
  connectedCallback(): void;
9
9
  static get observedAttributes(): string[];
package/dist/index.es.js CHANGED
@@ -1,15 +1,18 @@
1
- import { WithExtraAttributes as e, backgroundColorValues as t, propertyToAttributeSetter as n } from "@proximus/lavender-common";
1
+ import { WithExtraAttributes as e, backgroundColorValues as t, createTemplate as n, propertyToAttributeSetter as r, renderTemplate as i } from "@proximus/lavender-common";
2
2
  import "@proximus/lavender-container";
3
3
  import "@proximus/lavender-layout";
4
4
  //#region src/section.css?inline
5
- var r = ":host{display:block}:host,:host *{box-sizing:border-box}.content-wrapper{margin-inline:var(--px-padding-s-mobile);max-width:var(--px-content-wrapper-max-width-desktop)}@media screen and (width>=77rem){.content-wrapper{margin-inline:auto}}.overlapped{margin-bottom:calc(var(--px-overlapped-mobile) * -1)}::slotted([slot=overlap]){margin-top:var(--px-overlapped-mobile)}@media screen and (width>=48rem){.overlapped{margin-bottom:calc(var(--px-overlapped-desktop) * -1)}::slotted([slot=overlap]){margin-top:var(--px-overlapped-desktop)}}@media screen and (width>=64.0625rem){.overlapped{margin-bottom:calc(var(--px-overlapped-desktop) * -1)}::slotted([slot=overlap]){margin-top:var(--px-overlapped-desktop)}}", i = new CSSStyleSheet();
6
- i.replaceSync(r);
7
- var a = class extends e {
5
+ var a = ":host{display:block}:host,:host *{box-sizing:border-box}.content-wrapper{margin-inline:var(--px-padding-s-mobile);max-width:var(--px-content-wrapper-max-width-desktop)}@media screen and (width>=77rem){.content-wrapper{margin-inline:auto}}.overlapped{margin-bottom:calc(var(--px-overlapped-mobile) * -1)}::slotted([slot=overlap]){margin-top:var(--px-overlapped-mobile)}@media screen and (width>=48rem){.overlapped{margin-bottom:calc(var(--px-overlapped-desktop) * -1)}::slotted([slot=overlap]){margin-top:var(--px-overlapped-desktop)}}@media screen and (width>=64.0625rem){.overlapped{margin-bottom:calc(var(--px-overlapped-desktop) * -1)}::slotted([slot=overlap]){margin-top:var(--px-overlapped-desktop)}}", o = new CSSStyleSheet();
6
+ o.replaceSync(a);
7
+ var s = class a extends e {
8
+ static {
9
+ this.template = n("<px-container border-radius=\"none\" padding-inline=\"none\"><div class=\"content-wrapper\"><px-vstack gap=\"heading-to-content\"><slot name=\"heading\"></slot><px-vstack gap=\"none\"><slot></slot></px-vstack></px-vstack></div></px-container><div class=\"content-wrapper\"><slot name=\"overlap\"></slot></div>");
10
+ }
8
11
  constructor() {
9
- super(i), this.template = () => "\n <px-container border-radius=\"none\" padding-inline=\"none\">\n <div class=\"content-wrapper\">\n <px-vstack gap=\"heading-to-content\">\n <slot name=\"heading\"></slot>\n <px-vstack gap=\"none\">\n <slot></slot>\n </px-vstack>\n </px-vstack>\n </div>\n </px-container>\n <div class=\"content-wrapper\">\n <slot name=\"overlap\"></slot>\n </div>\n ", this.shadowRoot.innerHTML = this.template();
12
+ super(o), i(this.shadowRoot, a.template);
10
13
  }
11
14
  connectedCallback() {
12
- n(this.$container, "background-color", this.backgroundColor), !this.paddingBlock && !this.paddingTop && !this.paddingBottom && !this.paddingBlockMobile && !this.paddingTopMobile && !this.paddingBottomMobile && !this.paddingBlockTablet && !this.paddingTopTablet && !this.paddingBottomTablet && !this.paddingBlockLaptop && !this.paddingTopLaptop && !this.paddingBottomLaptop && (this.$container.paddingBlock = "none"), this.setHeadingSpacing = this.setHeadingSpacing.bind(this), this.setHeadingSpacing(), this.$slotHeading?.addEventListener("slotchange", this.setHeadingSpacing), this.toggleOverlapSpacing = this.toggleOverlapSpacing.bind(this), this.toggleOverlapSpacing(), this.$slotOverlap?.addEventListener("slotchange", this.toggleOverlapSpacing);
15
+ r(this.$container, "background-color", this.backgroundColor), !this.paddingBlock && !this.paddingTop && !this.paddingBottom && !this.paddingBlockMobile && !this.paddingTopMobile && !this.paddingBottomMobile && !this.paddingBlockTablet && !this.paddingTopTablet && !this.paddingBottomTablet && !this.paddingBlockLaptop && !this.paddingTopLaptop && !this.paddingBottomLaptop && (this.$container.paddingBlock = "none"), this.setHeadingSpacing = this.setHeadingSpacing.bind(this), this.setHeadingSpacing(), this.$slotHeading?.addEventListener("slotchange", this.setHeadingSpacing), this.toggleOverlapSpacing = this.toggleOverlapSpacing.bind(this), this.toggleOverlapSpacing(), this.$slotOverlap?.addEventListener("slotchange", this.toggleOverlapSpacing);
13
16
  }
14
17
  static get observedAttributes() {
15
18
  return [
@@ -159,153 +162,153 @@ var a = class extends e {
159
162
  return this.getAttribute("background-color") || "none";
160
163
  }
161
164
  set backgroundColor(e) {
162
- n(this, "background-color", e);
165
+ r(this, "background-color", e);
163
166
  }
164
167
  get gradient() {
165
168
  return this.getAttribute("background-gradient");
166
169
  }
167
170
  set gradient(e) {
168
- n(this, "background-gradient", e);
171
+ r(this, "background-gradient", e);
169
172
  }
170
173
  get backgroundImage() {
171
174
  return this.getAttribute("background-image");
172
175
  }
173
176
  set backgroundImage(e) {
174
- n(this, "background-image", e);
177
+ r(this, "background-image", e);
175
178
  }
176
179
  get backgroundImageMobile() {
177
180
  return this.getAttribute("background-image--mobile");
178
181
  }
179
182
  set backgroundImageMobile(e) {
180
- n(this, "background-image--mobile", e);
183
+ r(this, "background-image--mobile", e);
181
184
  }
182
185
  get backgroundImageTablet() {
183
186
  return this.getAttribute("background-image--tablet");
184
187
  }
185
188
  set backgroundImageTablet(e) {
186
- n(this, "background-image--tablet", e);
189
+ r(this, "background-image--tablet", e);
187
190
  }
188
191
  get backgroundImageLaptop() {
189
192
  return this.getAttribute("background-image--laptop");
190
193
  }
191
194
  set backgroundImageLaptop(e) {
192
- n(this, "background-image--laptop", e);
195
+ r(this, "background-image--laptop", e);
193
196
  }
194
197
  get backgroundSize() {
195
198
  return this.getAttribute("background-size");
196
199
  }
197
200
  set backgroundSize(e) {
198
- n(this, "background-size", e);
201
+ r(this, "background-size", e);
199
202
  }
200
203
  get backgroundPosition() {
201
204
  return this.getAttribute("background-position");
202
205
  }
203
206
  set backgroundPosition(e) {
204
- n(this, "background-position", e);
207
+ r(this, "background-position", e);
205
208
  }
206
209
  get paddingBlock() {
207
210
  return this.getAttribute("padding-block");
208
211
  }
209
212
  set paddingBlock(e) {
210
- n(this, "padding-block", e);
213
+ r(this, "padding-block", e);
211
214
  }
212
215
  get paddingTop() {
213
216
  return this.getAttribute("padding-top");
214
217
  }
215
218
  set paddingTop(e) {
216
- n(this, "padding-top", e);
219
+ r(this, "padding-top", e);
217
220
  }
218
221
  get paddingBottom() {
219
222
  return this.getAttribute("padding-bottom");
220
223
  }
221
224
  set paddingBottom(e) {
222
- n(this, "padding-bottom", e);
225
+ r(this, "padding-bottom", e);
223
226
  }
224
227
  get paddingBlockMobile() {
225
228
  return this.getAttribute("padding-block--mobile");
226
229
  }
227
230
  set paddingBlockMobile(e) {
228
- n(this, "padding-block--mobile", e);
231
+ r(this, "padding-block--mobile", e);
229
232
  }
230
233
  get paddingTopMobile() {
231
234
  return this.getAttribute("padding-top--mobile");
232
235
  }
233
236
  set paddingTopMobile(e) {
234
- n(this, "padding-top--mobile", e);
237
+ r(this, "padding-top--mobile", e);
235
238
  }
236
239
  get paddingBottomMobile() {
237
240
  return this.getAttribute("padding-bottom--mobile");
238
241
  }
239
242
  set paddingBottomMobile(e) {
240
- n(this, "padding-bottom--mobile", e);
243
+ r(this, "padding-bottom--mobile", e);
241
244
  }
242
245
  get paddingBlockTablet() {
243
246
  return this.getAttribute("padding-block--tablet");
244
247
  }
245
248
  set paddingBlockTablet(e) {
246
- n(this, "padding-block--tablet", e);
249
+ r(this, "padding-block--tablet", e);
247
250
  }
248
251
  get paddingTopTablet() {
249
252
  return this.getAttribute("padding-top--tablet");
250
253
  }
251
254
  set paddingTopTablet(e) {
252
- n(this, "padding-top--tablet", e);
255
+ r(this, "padding-top--tablet", e);
253
256
  }
254
257
  get paddingBottomTablet() {
255
258
  return this.getAttribute("padding-bottom--tablet");
256
259
  }
257
260
  set paddingBottomTablet(e) {
258
- n(this, "padding-bottom--tablet", e);
261
+ r(this, "padding-bottom--tablet", e);
259
262
  }
260
263
  get paddingBlockLaptop() {
261
264
  return this.getAttribute("padding-block--laptop");
262
265
  }
263
266
  set paddingBlockLaptop(e) {
264
- n(this, "padding-block--laptop", e);
267
+ r(this, "padding-block--laptop", e);
265
268
  }
266
269
  get paddingTopLaptop() {
267
270
  return this.getAttribute("padding-top--laptop");
268
271
  }
269
272
  set paddingTopLaptop(e) {
270
- n(this, "padding-top--laptop", e);
273
+ r(this, "padding-top--laptop", e);
271
274
  }
272
275
  get paddingBottomLaptop() {
273
276
  return this.getAttribute("padding-bottom--laptop");
274
277
  }
275
278
  set paddingBottomLaptop(e) {
276
- n(this, "padding-bottom--laptop", e);
279
+ r(this, "padding-bottom--laptop", e);
277
280
  }
278
281
  get border() {
279
282
  return this.getAttribute("border");
280
283
  }
281
284
  set border(e) {
282
- n(this, "border", e);
285
+ r(this, "border", e);
283
286
  }
284
287
  get borderSide() {
285
288
  return this.getAttribute("border-side");
286
289
  }
287
290
  set borderSide(e) {
288
- n(this, "border-side", e);
291
+ r(this, "border-side", e);
289
292
  }
290
293
  get borderSideMobile() {
291
294
  return this.getAttribute("border-side--mobile");
292
295
  }
293
296
  set borderSideMobile(e) {
294
- n(this, "border-side--mobile", e);
297
+ r(this, "border-side--mobile", e);
295
298
  }
296
299
  get borderSideTablet() {
297
300
  return this.getAttribute("border-side--tablet");
298
301
  }
299
302
  set borderSideTablet(e) {
300
- n(this, "border-side--tablet", e);
303
+ r(this, "border-side--tablet", e);
301
304
  }
302
305
  get borderSideLaptop() {
303
306
  return this.getAttribute("border-side--laptop");
304
307
  }
305
308
  set borderSideLaptop(e) {
306
- n(this, "border-side--laptop", e);
309
+ r(this, "border-side--laptop", e);
307
310
  }
308
311
  };
309
- customElements.get("px-section") || customElements.define("px-section", a);
312
+ customElements.get("px-section") || customElements.define("px-section", s);
310
313
  //#endregion
311
- export { a as Section };
314
+ export { s as Section };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-section",
3
- "version": "2.0.0-alpha.202",
3
+ "version": "2.0.0-alpha.204",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",