@florid-kit/components 3.2.26 → 3.3.0

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.
@@ -1,10 +1,10 @@
1
- import { i as p, m as h, a as v, E as m, x as c, t as u } from "../performance-mixin-D7YmSeqN.mjs";
2
- import { n as f } from "../property-S_Y9cb04.mjs";
3
- import { f as y, s as d } from "../css-C8WrrxT-.mjs";
4
- var b = Object.defineProperty, g = Object.getOwnPropertyDescriptor, n = (r, o, s, i) => {
5
- for (var e = i > 1 ? void 0 : i ? g(o, s) : o, a = r.length - 1, l; a >= 0; a--)
6
- (l = r[a]) && (e = (i ? l(o, s, e) : l(e)) || e);
7
- return i && e && b(o, s, e), e;
1
+ import { i as f, m as h, a as v, E as m, x as c, t as u } from "../performance-mixin-D7YmSeqN.mjs";
2
+ import { n as p } from "../property-S_Y9cb04.mjs";
3
+ import { f as d, s as y } from "../css-C8WrrxT-.mjs";
4
+ var b = Object.defineProperty, g = Object.getOwnPropertyDescriptor, o = (r, i, n, s) => {
5
+ for (var e = s > 1 ? void 0 : s ? g(i, n) : i, a = r.length - 1, l; a >= 0; a--)
6
+ (l = r[a]) && (e = (s ? l(i, n, e) : l(e)) || e);
7
+ return s && e && b(i, n, e), e;
8
8
  };
9
9
  let t = class extends h(v) {
10
10
  constructor() {
@@ -29,13 +29,13 @@ let t = class extends h(v) {
29
29
  >
30
30
  <slot></slot>
31
31
  </a>
32
+ <span class="sep" aria-hidden="true">/</span>
32
33
  </li>
33
34
  `;
34
35
  }
35
36
  };
36
- t.styles = p`
37
- :host(:not([active]))::after {
38
- content: "/";
37
+ t.styles = f`
38
+ .sep {
39
39
  margin: 0 0.5rem;
40
40
  color: var(--color-content-description);
41
41
  }
@@ -68,7 +68,7 @@ t.styles = p`
68
68
  }
69
69
 
70
70
  a:focus-visible {
71
- ${y};
71
+ ${d};
72
72
  }
73
73
 
74
74
  :host(.a--tabfocus) {
@@ -76,19 +76,19 @@ t.styles = p`
76
76
  }
77
77
 
78
78
  .sr-only {
79
- ${d}
79
+ ${y}
80
80
  }
81
81
  `;
82
- n([
83
- f({ type: String })
82
+ o([
83
+ p({ type: String })
84
84
  ], t.prototype, "href", 2);
85
- n([
86
- f({ type: Boolean, reflect: !0 })
85
+ o([
86
+ p({ type: Boolean, reflect: !0 })
87
87
  ], t.prototype, "active", 2);
88
- n([
89
- f({ type: String })
88
+ o([
89
+ p({ type: String })
90
90
  ], t.prototype, "srlabel", 2);
91
- t = n([
91
+ t = o([
92
92
  u("o-breadcrumb")
93
93
  ], t);
94
94
  export {
@@ -0,0 +1,21 @@
1
+ import { LitElement } from 'lit';
2
+
3
+ declare const OccitaneContentPush_base: import('../behaviors/mixin.js').MixinReturn<typeof LitElement>;
4
+ export declare class OccitaneContentPush extends OccitaneContentPush_base {
5
+ heading: string;
6
+ headingLevel: number;
7
+ description: string;
8
+ label: string;
9
+ href: string;
10
+ target: "_blank" | "_parent" | "_self" | "_top" | "";
11
+ static shadowRootOptions: ShadowRootInit;
12
+ static styles: import('lit').CSSResult;
13
+ get headingTag(): import('lit/static-html.js').StaticValue;
14
+ render(): import('lit').TemplateResult;
15
+ }
16
+ declare global {
17
+ interface HTMLElementTagNameMap {
18
+ "o-content-push": OccitaneContentPush;
19
+ }
20
+ }
21
+ export {};
@@ -0,0 +1,173 @@
1
+ import { x as $, a as b, i as x, m as w, t as S } from "../performance-mixin-D7YmSeqN.mjs";
2
+ import { n as c } from "../property-S_Y9cb04.mjs";
3
+ import { o as m } from "../if-defined-j0wE2gL4.mjs";
4
+ import "./link.mjs";
5
+ /**
6
+ * @license
7
+ * Copyright 2020 Google LLC
8
+ * SPDX-License-Identifier: BSD-3-Clause
9
+ */
10
+ const y = Symbol.for(""), _ = (t) => {
11
+ if ((t == null ? void 0 : t.r) === y) return t == null ? void 0 : t._$litStatic$;
12
+ }, O = (t) => ({ _$litStatic$: t, r: y }), u = /* @__PURE__ */ new Map(), z = (t) => (e, ...r) => {
13
+ const i = r.length;
14
+ let a, l;
15
+ const n = [], g = [];
16
+ let p, s = 0, f = !1;
17
+ for (; s < i; ) {
18
+ for (p = e[s]; s < i && (l = r[s], (a = _(l)) !== void 0); ) p += a + e[++s], f = !0;
19
+ s !== i && g.push(l), n.push(p), s++;
20
+ }
21
+ if (s === i && n.push(e[i]), f) {
22
+ const v = n.join("$$lit$$");
23
+ (e = u.get(v)) === void 0 && (n.raw = n, u.set(v, e = n)), r = g;
24
+ }
25
+ return t(e, ...r);
26
+ }, d = z($);
27
+ var P = Object.defineProperty, k = Object.getOwnPropertyDescriptor, h = (t, e, r, i) => {
28
+ for (var a = i > 1 ? void 0 : i ? k(e, r) : e, l = t.length - 1, n; l >= 0; l--)
29
+ (n = t[l]) && (a = (i ? n(e, r, a) : n(a)) || a);
30
+ return i && a && P(e, r, a), a;
31
+ };
32
+ let o = class extends w(b) {
33
+ constructor() {
34
+ super(...arguments), this.heading = "", this.headingLevel = 3, this.description = "", this.label = "", this.href = "", this.target = "";
35
+ }
36
+ // h1 belongs to the page, so the push heading is h2..h6.
37
+ get headingTag() {
38
+ const t = Math.min(Math.max(Math.round(this.headingLevel) || 3, 2), 6);
39
+ return O(`h${t}`);
40
+ }
41
+ render() {
42
+ const t = this.headingTag;
43
+ return d`
44
+ <slot name="media"></slot>
45
+ <div class="content">
46
+ ${this.heading ? d`<${t} id="heading" class="heading" part="heading">${this.heading}</${t}>` : ""}
47
+ ${this.description ? d`<p class="description" part="description">${this.description}</p>` : ""}
48
+ ${this.href && this.label ? d`<a
49
+ class="cta"
50
+ href="${this.href}"
51
+ target="${m(this.target || void 0)}"
52
+ aria-describedby="${m(this.heading ? "heading" : void 0)}"
53
+ >
54
+ <o-link inverse endIcon>${this.label}</o-link>
55
+ </a>` : ""}
56
+ </div>
57
+ `;
58
+ }
59
+ };
60
+ o.shadowRootOptions = {
61
+ ...b.shadowRootOptions,
62
+ delegatesFocus: !0
63
+ };
64
+ o.styles = x`
65
+ :host {
66
+ position: relative;
67
+ display: grid;
68
+ grid-template: minmax(0, 1fr) / minmax(0, 1fr);
69
+ aspect-ratio: 9 / 16;
70
+ overflow: hidden;
71
+ isolation: isolate;
72
+ outline: none !important;
73
+ }
74
+
75
+ /* Media and text share the same grid cell: the text sits over the image. */
76
+ ::slotted([slot="media"]),
77
+ .content {
78
+ grid-area: 1 / 1;
79
+ }
80
+
81
+ ::slotted([slot="media"]) {
82
+ display: block;
83
+ width: 100%;
84
+ height: 100%;
85
+ object-fit: cover;
86
+ }
87
+
88
+ .content {
89
+ z-index: 1;
90
+ align-self: end;
91
+ display: flex;
92
+ flex-direction: column;
93
+ align-items: flex-start;
94
+ gap: var(--spacing-l);
95
+ padding: var(--spacing-6-xl) var(--spacing-xl) var(--spacing-3-xl);
96
+ background: linear-gradient(
97
+ to bottom,
98
+ rgba(52, 41, 44, 0) 0%,
99
+ rgba(52, 41, 44, 0.65) 17.975%
100
+ );
101
+ color: var(--color-content-body-inverse);
102
+ word-break: break-word;
103
+ }
104
+
105
+ .heading {
106
+ margin: 0;
107
+ font: var(--font-weight-500) var(--font-size-450) / var(--line-height-320)
108
+ var(--font-family-loccitane-serif-condensed);
109
+ letter-spacing: var(--letter-spacing-absolute);
110
+ text-transform: uppercase;
111
+ }
112
+
113
+ .description {
114
+ margin: 0;
115
+ font: var(--font-weight-400) var(--font-size-250) / var(--line-height-240)
116
+ var(--font-family-loccitane-serif);
117
+ letter-spacing: var(--letter-spacing-000);
118
+ }
119
+
120
+ @media (min-width: 1025px) {
121
+ .description {
122
+ font-size: var(--font-size-300);
123
+ line-height: var(--line-height-280);
124
+ }
125
+ }
126
+
127
+ .cta {
128
+ color: inherit;
129
+ text-decoration: none;
130
+ }
131
+
132
+ /* Stretched link: the whole push is clickable, the CTA stays the only tab stop. */
133
+ .cta::after {
134
+ content: "";
135
+ position: absolute;
136
+ inset: 0;
137
+ }
138
+
139
+ .cta o-link {
140
+ position: relative;
141
+ z-index: 1;
142
+ }
143
+
144
+ /* Light ring (text color): the CTA always sits on the dark gradient. */
145
+ .cta:focus-visible {
146
+ outline: 1px dashed currentColor;
147
+ outline-offset: 2px;
148
+ }
149
+ `;
150
+ h([
151
+ c({ type: String })
152
+ ], o.prototype, "heading", 2);
153
+ h([
154
+ c({ type: Number })
155
+ ], o.prototype, "headingLevel", 2);
156
+ h([
157
+ c({ type: String })
158
+ ], o.prototype, "description", 2);
159
+ h([
160
+ c({ type: String })
161
+ ], o.prototype, "label", 2);
162
+ h([
163
+ c({ type: String })
164
+ ], o.prototype, "href", 2);
165
+ h([
166
+ c({ type: String })
167
+ ], o.prototype, "target", 2);
168
+ o = h([
169
+ S("o-content-push")
170
+ ], o);
171
+ export {
172
+ o as OccitaneContentPush
173
+ };
package/index.mjs CHANGED
@@ -38,4 +38,5 @@ import "./components/search-input.mjs";
38
38
  import "./components/search-input-dropdown.mjs";
39
39
  import "./components/option-tile.mjs";
40
40
  import "./components/option-tile-group.mjs";
41
- globalThis.__FLORID_KIT__ = "3.2.26";
41
+ import "./components/content-push.mjs";
42
+ globalThis.__FLORID_KIT__ = "3.3.0";
package/loader.mjs CHANGED
@@ -4,13 +4,14 @@ import "./components/link.mjs";
4
4
  import "./components/header-simplify.mjs";
5
5
  import "./components/breadcrumb.mjs";
6
6
  import "./components/breadcrumbs.mjs";
7
- globalThis.__FLORID_KIT__ = "3.2.26";
7
+ globalThis.__FLORID_KIT__ = "3.3.0";
8
8
  const i = {
9
9
  "o-accordion": () => import("./components/accordion.mjs"),
10
10
  "o-accordion-group": () => import("./components/accordion-group.mjs"),
11
11
  "o-checkbox": () => import("./components/checkbox.mjs"),
12
12
  "o-chip": () => import("./components/chip.mjs"),
13
13
  "o-chipset": () => import("./components/chipset.mjs"),
14
+ "o-content-push": () => import("./components/content-push.mjs"),
14
15
  "o-dots": () => import("./components/dots.mjs"),
15
16
  "o-dropdown": () => import("./components/dropdown.mjs"),
16
17
  "o-dropdown-variant": () => import("./components/dropdown-variant.mjs"),
@@ -44,22 +45,22 @@ const i = {
44
45
  }, a = document.createElement("style");
45
46
  a.textContent = `${Object.keys(i).join(":not(:defined),")}:not(:defined){opacity:0;max-height:0;overflow:hidden}`;
46
47
  document.head.appendChild(a);
47
- const m = /* @__PURE__ */ new Set();
48
- function p(e = document) {
48
+ const p = /* @__PURE__ */ new Set();
49
+ function m(e = document) {
49
50
  const o = /* @__PURE__ */ new Set();
50
51
  e.querySelectorAll("*").forEach((r) => {
51
52
  const n = r.tagName.toLowerCase();
52
- i[n] && !m.has(n) && o.add(n);
53
+ i[n] && !p.has(n) && o.add(n);
53
54
  });
54
55
  const t = [];
55
56
  for (const r of o)
56
- m.add(r), t.push(i[r]());
57
+ p.add(r), t.push(i[r]());
57
58
  return Promise.allSettled(t);
58
59
  }
59
- document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", () => p()) : p();
60
+ document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", () => m()) : m();
60
61
  function d(e) {
61
62
  const o = e.tagName.toLowerCase();
62
- if (i[o] && !m.has(o)) return !0;
63
+ if (i[o] && !p.has(o)) return !0;
63
64
  for (const t of Array.from(e.children))
64
65
  if (d(t)) return !0;
65
66
  return !1;
@@ -68,7 +69,7 @@ const s = new MutationObserver((e) => {
68
69
  for (const o of e)
69
70
  for (const t of Array.from(o.addedNodes))
70
71
  if (t instanceof Element && d(t)) {
71
- p();
72
+ m();
72
73
  return;
73
74
  }
74
75
  });
@@ -77,5 +78,5 @@ s.observe(document.documentElement, {
77
78
  subtree: !0
78
79
  });
79
80
  export {
80
- p as loadComponents
81
+ m as loadComponents
81
82
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@florid-kit/components",
3
- "version": "3.2.26",
3
+ "version": "3.3.0",
4
4
  "main": "index.js",
5
5
  "module": "index.mjs",
6
6
  "typings": "index.d.ts",