@lmvz-ds/components 0.13.0 → 0.13.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 (43) hide show
  1. package/dist/cjs/assets-CJzJZPzV.js +26 -0
  2. package/dist/cjs/{assets-CB5ikzmP.js → icons-FIfJEo6G.js} +1251 -773
  3. package/dist/cjs/index.cjs.js +3 -3
  4. package/dist/cjs/lmvz-card.cjs.entry.js +3 -3
  5. package/dist/cjs/lmvz-icon.cjs.entry.js +3 -3
  6. package/dist/collection/components/lmvz-card/lmvz-card.js +3 -4
  7. package/dist/collection/components/lmvz-icon/icons.js +2 -2
  8. package/dist/collection/utils/assets.js +9 -6
  9. package/dist/collection/utils/http.js +2 -2
  10. package/dist/collection/utils/http.unit.js +1 -1
  11. package/dist/collection/utils/validation/svg.js +1 -1
  12. package/dist/components/index.js +1 -1
  13. package/dist/components/lmvz-card.js +1 -1
  14. package/dist/components/lmvz-header.js +1 -1
  15. package/dist/components/lmvz-icon.js +1 -1
  16. package/dist/components/p-BsS3QvWn.js +1 -0
  17. package/dist/components/p-CdYWDK7m.js +1 -0
  18. package/dist/esm/assets-BelZNJ1W.js +23 -0
  19. package/dist/esm/{assets-ozES4zSA.js → icons-CM7lsnuO.js} +1249 -708
  20. package/dist/esm/index.js +3 -2
  21. package/dist/esm/lmvz-card.entry.js +3 -3
  22. package/dist/esm/lmvz-icon.entry.js +2 -2
  23. package/dist/lmvz-components/index.esm.js +1 -1
  24. package/dist/lmvz-components/lmvz-components.esm.js +1 -1
  25. package/dist/lmvz-components/p-6e3314ab.entry.js +1 -0
  26. package/dist/lmvz-components/p-BoR31cjC.js +1 -0
  27. package/dist/lmvz-components/p-CVf2C8dL.js +1 -0
  28. package/dist/lmvz-components/p-d9dc29a1.entry.js +1 -0
  29. package/dist/manifest.json +1 -1
  30. package/dist/types/utils/assets.d.ts +1 -8
  31. package/dist/types/utils/http.d.ts +3 -3
  32. package/dist/types/utils/validation/svg.d.ts +2 -2
  33. package/hydrate/index.js +2131 -12411
  34. package/hydrate/index.mjs +2131 -12411
  35. package/package.json +4 -4
  36. package/dist/cjs/icons-DM_TTn48.js +0 -857
  37. package/dist/components/p-BBDH9X49.js +0 -1
  38. package/dist/components/p-Bs6_m7Uw.js +0 -1
  39. package/dist/esm/icons-kpJZ1u9g.js +0 -853
  40. package/dist/lmvz-components/p-4ad8c332.entry.js +0 -1
  41. package/dist/lmvz-components/p-5eee0752.entry.js +0 -1
  42. package/dist/lmvz-components/p-D9lc4ayG.js +0 -1
  43. package/dist/lmvz-components/p-iviTjlUy.js +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var icons = require('./icons-DM_TTn48.js');
4
- var assets = require('./assets-CB5ikzmP.js');
3
+ var icons = require('./icons-FIfJEo6G.js');
4
+ require('./assets-CJzJZPzV.js');
5
5
  require('./index-D3BMpL5w.js');
6
6
 
7
7
  const variants = ['primary', 'secondary', 'tertiary'];
@@ -79,7 +79,7 @@ const iconNames = [
79
79
  ];
80
80
 
81
81
  function run(effect) {
82
- return assets.runPromise(effect).catch(error => {
82
+ return icons.runPromise(effect).catch(error => {
83
83
  console.error('Unhandled error in Effect:', error);
84
84
  });
85
85
  }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-D3BMpL5w.js');
4
- var assets = require('./assets-CB5ikzmP.js');
4
+ var assets = require('./assets-CJzJZPzV.js');
5
5
 
6
6
  const lmvzCardCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } @layer lmvz-ds.reset { h1, h2, h3, h4, h5, h6 { margin: 0; } } .sc-lmvz-card-h { button { --lmvz-button-color: var(--lmvz-component-color, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-padding-inline: var(--lmvz-button-padding, var(--lmvz-component-input-md-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-padding-block: var(--lmvz-button-padding, var(--lmvz-component-input-md-padding-y, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-lg, 400 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.4 Router); --lmvz-button-radius: var(--lmvz-component-input-radius-default, 999px); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; --lmvz-button-background: var(--lmvz-semantic-color-int-primary, #000000); display: inline-flex; align-items: center; justify-content: center; gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-align: center; text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-status-selected, #f1f9fe); outline-offset: var(--lmvz-component-input-sm-padding-x, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-hover, #2e2e2e); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-active, #545454); } button.secondary { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-button-border-width: var(--lmvz-semantic-border-width-default, 1px); --lmvz-button-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); } button.secondary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --lmvz-button-border-color: var(--lmvz-semantic-color-border-hover, #c7c7c7); } button.secondary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); --lmvz-button-border-color: var(--lmvz-semantic-color-border-active, #d4d4d4); } button.tertiary { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary, #545454); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); } button.small { --lmvz-button-padding-inline: var(--lmvz-component-input-sm-padding-x, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-padding-block: var(--lmvz-component-input-sm-padding-y, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-gap: var(--lmvz-component-input-sm-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } button.large { --lmvz-button-padding-inline: var(--lmvz-component-input-lg-padding-x, clamp(0.88rem, 0.78rem + 0.39vw, 1.25rem)); --lmvz-button-padding-block: var(--lmvz-component-input-lg-padding-y, clamp(0.88rem, 0.78rem + 0.39vw, 1.25rem)); --lmvz-button-gap: var(--lmvz-component-input-lg-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-lg, 400 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.4 Router); } display: flex; min-width: var(--lmvz-other-component-card-minwidth, 20.4375rem); max-width: var(--lmvz-other-component-card-maxwidth, 21.6875rem); flex-direction: column; align-items: flex-start; border-radius: var(--lmvz-semantic-border-radius-lg, 14px); border: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-default, #e0e0e0); background: var(--lmvz-semantic-color-surface-primary, #ffffff); } *.sc-lmvz-card { color: var(--lmvz-semantic-color-on-surface-primary, #000000); font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } .top.sc-lmvz-card { display: flex; padding: var(--lmvz-dimension-8-12, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); flex-direction: column; justify-content: center; align-items: center; align-self: stretch; } .bottom.sc-lmvz-card { display: flex; min-width: 150px; padding: var(--lmvz-dimension-4-6, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)); flex-direction: column; align-items: flex-start; align-self: stretch; } .title.sc-lmvz-card { margin: 0; display: flex; justify-content: center; align-items: center; align-self: stretch; padding-bottom: var(--lmvz-global-s4, 4px); overflow-wrap: break-word; font: var(--lmvz-typography-heading-2xl, 500 clamp(2rem, 1.94rem + 0.26vw, 2.25rem) / 1.2 Router); } .description.sc-lmvz-card { display: flex; margin: 0; padding-bottom: var(--lmvz-component-body-sm-padding-bottom, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-items: flex-start; align-self: stretch; white-space: pre-line; font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } .image-wrapper.sc-lmvz-card { aspect-ratio: 4 / 3; width: 100%; background-size: cover; background-position: center; flex: 1 0 0; align-self: stretch; border-radius: var(--lmvz-semantic-border-radius-md, 6px); } .actions.sc-lmvz-card { margin-top: var(--lmvz-component-form-wrapper-gap-y, clamp(1.13rem, 0.97rem + 0.65vw, 1.75rem)); display: flex; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-self: stretch; } button.primary.sc-lmvz-card, lmvz-button.primary.sc-lmvz-card { display: flex; justify-content: center; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); flex: 1 0 0; }`;
7
7
 
@@ -16,7 +16,7 @@ const LmvzCard = class {
16
16
  primaryActionLabel = '';
17
17
  primaryAction;
18
18
  get fallbackImage() {
19
- return assets.runSync(assets.syncCreateAssetUrlSafely('card-placeholder.svg'));
19
+ return assets.createAssetUrlSafely('card-placeholder.svg');
20
20
  }
21
21
  _onPrimaryClick() {
22
22
  this.primaryAction.emit();
@@ -28,7 +28,7 @@ const LmvzCard = class {
28
28
  const imgStyle = {
29
29
  backgroundImage: `url(${this.imageUrl ?? this.fallbackImage})`,
30
30
  };
31
- return (index.h(index.Host, { key: '1438354a53604954320d01652aa1d84f8712e875', role: "article" }, index.h("div", { key: 'dcffae2c48ebf8f8769cf07c2e78806f12df6888', class: "top" }, index.h("div", { key: 'e41e1d0aafbfc5879b86022e91958ef3373b48b2', class: "image-wrapper", style: imgStyle }, index.h("div", { key: 'f6a1fc9706012f39aca9dd0b995290e6042e3407', class: "chip-slot" }, index.h("slot", { key: '4e014519c147705cc30b3268d652ea6c76c749ec', name: "chip" })))), index.h("div", { key: 'e7baf78b660e9a97edd0b6a0aa1bdb1afa593fed', class: "bottom" }, index.h("header", { key: 'a8dad9f91df60f535725328a4901833d47652678' }, index.h("h2", { key: '1cdbca46469750187856a46fa155128f1f8a677f', class: "title" }, this.cardTitle)), index.h("p", { key: 'f33c2c0af86d7be31fcbd676833b27c7d06e2dd9', class: "description" }, this.description), index.h("div", { key: 'a12595d514167fb957aac71fe3d144810b442f9d', class: "actions" }, index.h("button", { key: '9730cedbf83599c09eedaaae43331147691486d6', class: "primary", onClick: this._onPrimaryClick.bind(this), "data-testid": "primary" }, this.primaryActionLabel), index.h("button", { key: '48e9c511c406beb75334452769beade3dec9a3f5', class: "tertiary", "aria-label": "More actions", onClick: this._onOverflowClick }, index.h("span", { key: '81cc1af42a15dddb9dbd4f373a6a047c2e2cd563', class: "icon-placeholder" }, "..."))))));
31
+ return (index.h(index.Host, { key: 'ba2e8d9e25428c744da2470cbd677306c56b09ae', role: "article" }, index.h("div", { key: '54ff7545559a4b6fb00c94909717234f4dfedd7c', class: "top" }, index.h("div", { key: '7bff35f247b6e8aca9b6346103139daa65ca16a3', class: "image-wrapper", style: imgStyle }, index.h("div", { key: 'c2c3d21227175b9dc0a55c75294f6c21bc713a26', class: "chip-slot" }, index.h("slot", { key: '1a7002aab5fc3f9f698c3d1678f8819ea36f91d3', name: "chip" })))), index.h("div", { key: 'a313321abe4da83db4b2ba64fdefa28edde93d41', class: "bottom" }, index.h("header", { key: 'f5ba333fcaa59d5b4f61dee94aba4628f49db9d7' }, index.h("h2", { key: 'b7d9ad6944b136476703cde89f885b189583eef1', class: "title" }, this.cardTitle)), index.h("p", { key: '6594626904a4f9fbc53d5956b71bbdefe00add8c', class: "description" }, this.description), index.h("div", { key: 'd8bbfebeb572fcf6990160a0dba7c5ae8a5a7fc7', class: "actions" }, index.h("button", { key: '6311a97a18412f8fbf8eb33e8a0f7a17700e71c6', class: "primary", onClick: this._onPrimaryClick.bind(this), "data-testid": "primary" }, this.primaryActionLabel), index.h("button", { key: '12033ad5018d100f84f0149d83dc965d8e5b2c66', class: "tertiary", "aria-label": "More actions", onClick: this._onOverflowClick }, index.h("span", { key: 'e11f8008542b4f7f70d1273bb31200c50d02aabb', class: "icon-placeholder" }, "..."))))));
32
32
  }
33
33
  static get assetsDirs() { return ["../../assets"]; }
34
34
  };
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-D3BMpL5w.js');
4
- var assets = require('./assets-CB5ikzmP.js');
4
+ var icons = require('./icons-FIfJEo6G.js');
5
5
  var reactiveControllerHost = require('./reactive-controller-host-BMDEj1kX.js');
6
- var icons = require('./icons-DM_TTn48.js');
6
+ require('./assets-CJzJZPzV.js');
7
7
 
8
8
  const lmvzIconCss = () => `.sc-lmvz-icon-h{--lmvz-icon-color:var(--lmvz-component-color, var(--lmvz-semantic-color-on-surface-input-primary, #000000));display:inline-block;line-height:0;svg{display:block}svg>path{stroke:var(--lmvz-icon-color);fill:none}}[size='xs'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.69rem + 0.26vw, 1rem));height:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))}}[size='sm'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.81rem + 0.26vw, 1.13rem));height:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.81rem + 0.26vw, 1.13rem))}}[size='md'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-md, clamp(1rem, 0.88rem + 0.52vw, 1.5rem));height:var(--lmvz-component-icon-size-md, clamp(1rem, 0.88rem + 0.52vw, 1.5rem))}}[size='lg'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.38rem + 0.52vw, 2rem));height:var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.38rem + 0.52vw, 2rem))}}[size='inherit'].sc-lmvz-icon-h{svg{width:inherit;height:inherit}}[weight='light'].sc-lmvz-icon-h{svg>path{stroke-width:1}}[weight='medium'].sc-lmvz-icon-h{svg>path{stroke-width:1.5}}[weight='bold'].sc-lmvz-icon-h{svg>path{stroke-width:2}}[weight='filled'].sc-lmvz-icon-h{svg>path{stroke-width:2;fill:var(--lmvz-icon-color)}}`;
9
9
 
@@ -41,7 +41,7 @@ const LmvzIcon = class extends reactiveControllerHost.ReactiveControllerHost {
41
41
  if (!icon || !visible) {
42
42
  return;
43
43
  }
44
- this.iconData = await assets.runPromise(icons.fetchIconSvg(this.icon).pipe(assets.tapError(error => assets.logError(`Error loading icon "${icon}":`, error.message, error.cause, error.stack)), assets.catchAll(() => assets.succeed(icons.emptyDefaultSvg()))));
44
+ this.iconData = await icons.runPromise(icons.fetchIconSvg(this.icon).pipe(icons.tapError(error => icons.logError(`Error loading icon "${icon}":`, error.message, error.cause, error.stack)), icons.catchAll(() => icons.succeed(icons.emptyDefaultSvg()))));
45
45
  }
46
46
  render() {
47
47
  return index.h(index.Host, { key: 'd4c1cbfbaf39ebf6aa26415d46100763b9f89b5b', role: "img", "aria-hidden": `${this.ariaHidden}`, innerHTML: this.iconData });
@@ -1,6 +1,5 @@
1
1
  import { h, Host } from "@stencil/core";
2
- import { runSync } from "effect/Effect";
3
- import { syncCreateAssetUrlSafely } from "../../utils/assets";
2
+ import { createAssetUrlSafely } from "../../utils/assets";
4
3
  export class LmvzCard {
5
4
  cardTitle;
6
5
  imageUrl;
@@ -8,7 +7,7 @@ export class LmvzCard {
8
7
  primaryActionLabel = '';
9
8
  primaryAction;
10
9
  get fallbackImage() {
11
- return runSync(syncCreateAssetUrlSafely('card-placeholder.svg'));
10
+ return createAssetUrlSafely('card-placeholder.svg');
12
11
  }
13
12
  _onPrimaryClick() {
14
13
  this.primaryAction.emit();
@@ -20,7 +19,7 @@ export class LmvzCard {
20
19
  const imgStyle = {
21
20
  backgroundImage: `url(${this.imageUrl ?? this.fallbackImage})`,
22
21
  };
23
- return (h(Host, { key: '1438354a53604954320d01652aa1d84f8712e875', role: "article" }, h("div", { key: 'dcffae2c48ebf8f8769cf07c2e78806f12df6888', class: "top" }, h("div", { key: 'e41e1d0aafbfc5879b86022e91958ef3373b48b2', class: "image-wrapper", style: imgStyle }, h("div", { key: 'f6a1fc9706012f39aca9dd0b995290e6042e3407', class: "chip-slot" }, h("slot", { key: '4e014519c147705cc30b3268d652ea6c76c749ec', name: "chip" })))), h("div", { key: 'e7baf78b660e9a97edd0b6a0aa1bdb1afa593fed', class: "bottom" }, h("header", { key: 'a8dad9f91df60f535725328a4901833d47652678' }, h("h2", { key: '1cdbca46469750187856a46fa155128f1f8a677f', class: "title" }, this.cardTitle)), h("p", { key: 'f33c2c0af86d7be31fcbd676833b27c7d06e2dd9', class: "description" }, this.description), h("div", { key: 'a12595d514167fb957aac71fe3d144810b442f9d', class: "actions" }, h("button", { key: '9730cedbf83599c09eedaaae43331147691486d6', class: "primary", onClick: this._onPrimaryClick.bind(this), "data-testid": "primary" }, this.primaryActionLabel), h("button", { key: '48e9c511c406beb75334452769beade3dec9a3f5', class: "tertiary", "aria-label": "More actions", onClick: this._onOverflowClick }, h("span", { key: '81cc1af42a15dddb9dbd4f373a6a047c2e2cd563', class: "icon-placeholder" }, "..."))))));
22
+ return (h(Host, { key: 'ba2e8d9e25428c744da2470cbd677306c56b09ae', role: "article" }, h("div", { key: '54ff7545559a4b6fb00c94909717234f4dfedd7c', class: "top" }, h("div", { key: '7bff35f247b6e8aca9b6346103139daa65ca16a3', class: "image-wrapper", style: imgStyle }, h("div", { key: 'c2c3d21227175b9dc0a55c75294f6c21bc713a26', class: "chip-slot" }, h("slot", { key: '1a7002aab5fc3f9f698c3d1678f8819ea36f91d3', name: "chip" })))), h("div", { key: 'a313321abe4da83db4b2ba64fdefa28edde93d41', class: "bottom" }, h("header", { key: 'f5ba333fcaa59d5b4f61dee94aba4628f49db9d7' }, h("h2", { key: 'b7d9ad6944b136476703cde89f885b189583eef1', class: "title" }, this.cardTitle)), h("p", { key: '6594626904a4f9fbc53d5956b71bbdefe00add8c', class: "description" }, this.description), h("div", { key: 'd8bbfebeb572fcf6990160a0dba7c5ae8a5a7fc7', class: "actions" }, h("button", { key: '6311a97a18412f8fbf8eb33e8a0f7a17700e71c6', class: "primary", onClick: this._onPrimaryClick.bind(this), "data-testid": "primary" }, this.primaryActionLabel), h("button", { key: '12033ad5018d100f84f0149d83dc965d8e5b2c66', class: "tertiary", "aria-label": "More actions", onClick: this._onOverflowClick }, h("span", { key: 'e11f8008542b4f7f70d1273bb31200c50d02aabb', class: "icon-placeholder" }, "..."))))));
24
23
  }
25
24
  static get is() { return "lmvz-card"; }
26
25
  static get encapsulation() { return "scoped"; }
@@ -1,5 +1,5 @@
1
1
  import { Cache, Duration, Effect } from "effect";
2
- import { syncCreateAssetUrlSafely } from "../../utils/assets";
2
+ import { createAssetUrlSafely } from "../../utils/assets";
3
3
  import { httpClient, responseAsText } from "../../utils/http";
4
4
  import { createValidSVGString, SVGString } from "../../utils/validation/svg";
5
5
  export const emptyDefaultSvg = () => SVGString(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"></svg>`);
@@ -8,7 +8,7 @@ const createIconCache = () => Cache.make({
8
8
  timeToLive: Duration.infinity,
9
9
  lookup: (key) => Effect.gen(function* () {
10
10
  const name = key;
11
- const assetPath = yield* syncCreateAssetUrlSafely(`${name}.svg`, 'icons');
11
+ const assetPath = createAssetUrlSafely(`${name}.svg`, 'icons');
12
12
  const res = yield* httpClient(assetPath);
13
13
  const responseString = yield* responseAsText(res);
14
14
  return yield* createValidSVGString(responseString);
@@ -1,13 +1,16 @@
1
1
  import { getAssetPath } from "@stencil/core";
2
- import { Data, Effect } from "effect";
3
2
  import { getLocationBase } from "./environment";
4
- export class URLCreationError extends Data.TaggedError('URLCreationError') {
5
- }
6
3
  const relativeAssetsPath = '../../assets';
7
- export const syncCreateAssetUrlSafely = (file, pathFromAssetRoot) => {
4
+ export const createAssetUrlSafely = (file, pathFromAssetRoot) => {
8
5
  const relativeAssetPath = joinPath(relativeAssetsPath, pathFromAssetRoot, file);
9
- return Effect.try(() => getAssetPath(relativeAssetPath)).pipe(Effect.tapError(() => Effect.logWarning(`Failed to create URL for asset "${file}" in path "${pathFromAssetRoot}".
10
- Please provide an absolute URL in your app's 'setAssetPath(...)' configuration! Falling back to a relative URL, which may work in some environments but is not guaranteed to be correct.`)), Effect.orElseSucceed(() => new URL(relativeAssetPath, getLocationBase())));
6
+ try {
7
+ return getAssetPath(relativeAssetPath);
8
+ }
9
+ catch {
10
+ console.warn(`Failed to create URL for asset "${file}" in path "${pathFromAssetRoot}".
11
+ Please provide an absolute URL in your app's 'setAssetPath(...)' configuration! Falling back to a relative URL, which may work in some environments but is not guaranteed to be correct.`);
12
+ return new URL(relativeAssetPath, getLocationBase());
13
+ }
11
14
  };
12
15
  function joinPath(...parts) {
13
16
  return parts.filter(Boolean).join('/').replace('//', '/').replace('/./', '/');
@@ -1,4 +1,4 @@
1
- import { Data, Effect } from "effect";
1
+ import { Data, Micro as Effect } from "effect";
2
2
  export class FetchError extends Data.TaggedError('FetchError') {
3
3
  }
4
4
  export class NotFoundError extends Data.TaggedError('NotFoundError') {
@@ -9,7 +9,7 @@ export const httpClient = (input, init) => Effect.gen(function* () {
9
9
  catch: error => new FetchError({ cause: error }),
10
10
  });
11
11
  if (response.status === 404) {
12
- return yield* new NotFoundError({ url: response.url });
12
+ return yield* Effect.fail(new NotFoundError({ url: response.url }));
13
13
  }
14
14
  return response;
15
15
  });
@@ -1,5 +1,5 @@
1
1
  import { describe, expect, it, vi } from "@stencil/vitest";
2
- import { Effect } from "effect";
2
+ import { Micro as Effect } from "effect";
3
3
  import { FetchError, NotFoundError, ResponseTextError, httpClient, responseAsText } from "./http";
4
4
  describe('Http Utils', () => {
5
5
  describe('httpClient', () => {
@@ -1,4 +1,4 @@
1
- import { Brand, Data, Effect } from "effect";
1
+ import { Brand, Data, Micro as Effect } from "effect";
2
2
  export const SVGString = Brand.refined(isValidSVG, () => Brand.error('SVG data is malformed'));
3
3
  export class BrandValidationError extends Data.TaggedError('BrandValidationError') {
4
4
  constructor(error, type) {
@@ -1 +1 @@
1
- export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-vi4YzJmv.js";export{c as clearIconCache}from"./p-BBDH9X49.js";import{r as e}from"./p-Bs6_m7Uw.js";export{LmvzAction,defineCustomElement as defineCustomElementLmvzAction}from"./lmvz-action.js";export{LmvzButton,defineCustomElement as defineCustomElementLmvzButton}from"./lmvz-button.js";export{LmvzCard,defineCustomElement as defineCustomElementLmvzCard}from"./lmvz-card.js";export{LmvzChip,defineCustomElement as defineCustomElementLmvzChip}from"./lmvz-chip.js";export{LmvzHeader,defineCustomElement as defineCustomElementLmvzHeader}from"./lmvz-header.js";export{LmvzIcon,defineCustomElement as defineCustomElementLmvzIcon}from"./lmvz-icon.js";export{LmvzInput,defineCustomElement as defineCustomElementLmvzInput}from"./lmvz-input.js";export{LmvzMenuitem,defineCustomElement as defineCustomElementLmvzMenuitem}from"./lmvz-menuitem.js";const t=["primary","secondary","tertiary"],o=["small","default","large"],m=["xs","sm","md","lg"],n=[...m,"xl"],l=["text","email","password","tel","url","search","number"],i=[...m,"inherit"],d=["thin","medium","bold","filled"],u=["Logo","actions","adduser","alert","apple","arrow-down","arrow-left","arrow-right","arrow-up","book","bookmark","checkmark","chevron-down","chevron-left","chevron-right","chevron-up","close-l","close-sm","cog","computer","dashboard","delete","download","edit","external","facebook","favorite","filter","group","hide","home","info","instagram","letter","linkedin","logout","map","minus","navigation","plus","qr-scan","question","reader","reset","school","search","send","settings","share","shopping-cart","show","snapchat","sort","speech-bubble","star","student","upload","user","warn-circle","warn-triangle","whatsapp","world","x","youtube"];function f(t){return e(t).catch((e=>{console.error("Unhandled error in Effect:",e)}))}export{u as iconNames,i as iconSizes,d as iconWeights,l as inputTypes,f as run,o as scaleValues,m as sizes,n as textSizes,t as variants}
1
+ export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-vi4YzJmv.js";import{r as e}from"./p-BsS3QvWn.js";export{c as clearIconCache}from"./p-BsS3QvWn.js";export{LmvzAction,defineCustomElement as defineCustomElementLmvzAction}from"./lmvz-action.js";export{LmvzButton,defineCustomElement as defineCustomElementLmvzButton}from"./lmvz-button.js";export{LmvzCard,defineCustomElement as defineCustomElementLmvzCard}from"./lmvz-card.js";export{LmvzChip,defineCustomElement as defineCustomElementLmvzChip}from"./lmvz-chip.js";export{LmvzHeader,defineCustomElement as defineCustomElementLmvzHeader}from"./lmvz-header.js";export{LmvzIcon,defineCustomElement as defineCustomElementLmvzIcon}from"./lmvz-icon.js";export{LmvzInput,defineCustomElement as defineCustomElementLmvzInput}from"./lmvz-input.js";export{LmvzMenuitem,defineCustomElement as defineCustomElementLmvzMenuitem}from"./lmvz-menuitem.js";const t=["primary","secondary","tertiary"],o=["small","default","large"],n=["xs","sm","md","lg"],m=[...n,"xl"],l=["text","email","password","tel","url","search","number"],i=[...n,"inherit"],d=["thin","medium","bold","filled"],u=["Logo","actions","adduser","alert","apple","arrow-down","arrow-left","arrow-right","arrow-up","book","bookmark","checkmark","chevron-down","chevron-left","chevron-right","chevron-up","close-l","close-sm","cog","computer","dashboard","delete","download","edit","external","facebook","favorite","filter","group","hide","home","info","instagram","letter","linkedin","logout","map","minus","navigation","plus","qr-scan","question","reader","reset","school","search","send","settings","share","shopping-cart","show","snapchat","sort","speech-bubble","star","student","upload","user","warn-circle","warn-triangle","whatsapp","world","x","youtube"];function f(t){return e(t).catch((e=>{console.error("Unhandled error in Effect:",e)}))}export{u as iconNames,i as iconSizes,d as iconWeights,l as inputTypes,f as run,o as scaleValues,n as sizes,m as textSizes,t as variants}
@@ -1 +1 @@
1
- import{p as e,H as r,c as t,h as a,d as o,t as m}from"./p-vi4YzJmv.js";import{a as n,s as l}from"./p-Bs6_m7Uw.js";const i=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.primaryAction=t(this,"primaryAction")}cardTitle;imageUrl;description;primaryActionLabel="";primaryAction;get fallbackImage(){return n(l("card-placeholder.svg"))}_onPrimaryClick(){this.primaryAction.emit()}_onOverflowClick(e){console.log(e)}render(){return a(o,{key:"1438354a53604954320d01652aa1d84f8712e875",role:"article"},a("div",{key:"dcffae2c48ebf8f8769cf07c2e78806f12df6888",class:"top"},a("div",{key:"e41e1d0aafbfc5879b86022e91958ef3373b48b2",class:"image-wrapper",style:{backgroundImage:`url(${this.imageUrl??this.fallbackImage})`}},a("div",{key:"f6a1fc9706012f39aca9dd0b995290e6042e3407",class:"chip-slot"},a("slot",{key:"4e014519c147705cc30b3268d652ea6c76c749ec",name:"chip"})))),a("div",{key:"e7baf78b660e9a97edd0b6a0aa1bdb1afa593fed",class:"bottom"},a("header",{key:"a8dad9f91df60f535725328a4901833d47652678"},a("h2",{key:"1cdbca46469750187856a46fa155128f1f8a677f",class:"title"},this.cardTitle)),a("p",{key:"f33c2c0af86d7be31fcbd676833b27c7d06e2dd9",class:"description"},this.description),a("div",{key:"a12595d514167fb957aac71fe3d144810b442f9d",class:"actions"},a("button",{key:"9730cedbf83599c09eedaaae43331147691486d6",class:"primary",onClick:this._onPrimaryClick.bind(this),"data-testid":"primary"},this.primaryActionLabel),a("button",{key:"48e9c511c406beb75334452769beade3dec9a3f5",class:"tertiary","aria-label":"More actions",onClick:this._onOverflowClick},a("span",{key:"81cc1af42a15dddb9dbd4f373a6a047c2e2cd563",class:"icon-placeholder"},"...")))))}static get assetsDirs(){return["../../assets"]}static get style(){return"@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } @layer lmvz-ds.reset { h1, h2, h3, h4, h5, h6 { margin: 0; } } .sc-lmvz-card-h { button { --lmvz-button-color: var(--lmvz-component-color, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-padding-inline: var(--lmvz-button-padding, var(--lmvz-component-input-md-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-padding-block: var(--lmvz-button-padding, var(--lmvz-component-input-md-padding-y, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-lg, 400 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.4 Router); --lmvz-button-radius: var(--lmvz-component-input-radius-default, 999px); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; --lmvz-button-background: var(--lmvz-semantic-color-int-primary, #000000); display: inline-flex; align-items: center; justify-content: center; gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-align: center; text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-status-selected, #f1f9fe); outline-offset: var(--lmvz-component-input-sm-padding-x, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-hover, #2e2e2e); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-active, #545454); } button.secondary { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-button-border-width: var(--lmvz-semantic-border-width-default, 1px); --lmvz-button-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); } button.secondary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --lmvz-button-border-color: var(--lmvz-semantic-color-border-hover, #c7c7c7); } button.secondary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); --lmvz-button-border-color: var(--lmvz-semantic-color-border-active, #d4d4d4); } button.tertiary { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary, #545454); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); } button.small { --lmvz-button-padding-inline: var(--lmvz-component-input-sm-padding-x, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-padding-block: var(--lmvz-component-input-sm-padding-y, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-gap: var(--lmvz-component-input-sm-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } button.large { --lmvz-button-padding-inline: var(--lmvz-component-input-lg-padding-x, clamp(0.88rem, 0.78rem + 0.39vw, 1.25rem)); --lmvz-button-padding-block: var(--lmvz-component-input-lg-padding-y, clamp(0.88rem, 0.78rem + 0.39vw, 1.25rem)); --lmvz-button-gap: var(--lmvz-component-input-lg-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-lg, 400 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.4 Router); } display: flex; min-width: var(--lmvz-other-component-card-minwidth, 20.4375rem); max-width: var(--lmvz-other-component-card-maxwidth, 21.6875rem); flex-direction: column; align-items: flex-start; border-radius: var(--lmvz-semantic-border-radius-lg, 14px); border: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-default, #e0e0e0); background: var(--lmvz-semantic-color-surface-primary, #ffffff); } *.sc-lmvz-card { color: var(--lmvz-semantic-color-on-surface-primary, #000000); font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } .top.sc-lmvz-card { display: flex; padding: var(--lmvz-dimension-8-12, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); flex-direction: column; justify-content: center; align-items: center; align-self: stretch; } .bottom.sc-lmvz-card { display: flex; min-width: 150px; padding: var(--lmvz-dimension-4-6, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)); flex-direction: column; align-items: flex-start; align-self: stretch; } .title.sc-lmvz-card { margin: 0; display: flex; justify-content: center; align-items: center; align-self: stretch; padding-bottom: var(--lmvz-global-s4, 4px); overflow-wrap: break-word; font: var(--lmvz-typography-heading-2xl, 500 clamp(2rem, 1.94rem + 0.26vw, 2.25rem) / 1.2 Router); } .description.sc-lmvz-card { display: flex; margin: 0; padding-bottom: var(--lmvz-component-body-sm-padding-bottom, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-items: flex-start; align-self: stretch; white-space: pre-line; font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } .image-wrapper.sc-lmvz-card { aspect-ratio: 4 / 3; width: 100%; background-size: cover; background-position: center; flex: 1 0 0; align-self: stretch; border-radius: var(--lmvz-semantic-border-radius-md, 6px); } .actions.sc-lmvz-card { margin-top: var(--lmvz-component-form-wrapper-gap-y, clamp(1.13rem, 0.97rem + 0.65vw, 1.75rem)); display: flex; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-self: stretch; } button.primary.sc-lmvz-card, lmvz-button.primary.sc-lmvz-card { display: flex; justify-content: center; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); flex: 1 0 0; }"}},[774,"lmvz-card",{cardTitle:[1,"card-title"],imageUrl:[1,"image-url"],description:[1],primaryActionLabel:[1,"primary-action-label"]}]),c=i,d=function(){"undefined"!=typeof customElements&&["lmvz-card"].forEach((e=>{"lmvz-card"===e&&(customElements.get(m(e))||customElements.define(m(e),i))}))};export{c as LmvzCard,d as defineCustomElement}
1
+ import{p as e,H as r,c as t,h as a,d as o,t as m}from"./p-vi4YzJmv.js";import{c as n}from"./p-CdYWDK7m.js";const l=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.primaryAction=t(this,"primaryAction")}cardTitle;imageUrl;description;primaryActionLabel="";primaryAction;get fallbackImage(){return n("card-placeholder.svg")}_onPrimaryClick(){this.primaryAction.emit()}_onOverflowClick(e){console.log(e)}render(){return a(o,{key:"ba2e8d9e25428c744da2470cbd677306c56b09ae",role:"article"},a("div",{key:"54ff7545559a4b6fb00c94909717234f4dfedd7c",class:"top"},a("div",{key:"7bff35f247b6e8aca9b6346103139daa65ca16a3",class:"image-wrapper",style:{backgroundImage:`url(${this.imageUrl??this.fallbackImage})`}},a("div",{key:"c2c3d21227175b9dc0a55c75294f6c21bc713a26",class:"chip-slot"},a("slot",{key:"1a7002aab5fc3f9f698c3d1678f8819ea36f91d3",name:"chip"})))),a("div",{key:"a313321abe4da83db4b2ba64fdefa28edde93d41",class:"bottom"},a("header",{key:"f5ba333fcaa59d5b4f61dee94aba4628f49db9d7"},a("h2",{key:"b7d9ad6944b136476703cde89f885b189583eef1",class:"title"},this.cardTitle)),a("p",{key:"6594626904a4f9fbc53d5956b71bbdefe00add8c",class:"description"},this.description),a("div",{key:"d8bbfebeb572fcf6990160a0dba7c5ae8a5a7fc7",class:"actions"},a("button",{key:"6311a97a18412f8fbf8eb33e8a0f7a17700e71c6",class:"primary",onClick:this._onPrimaryClick.bind(this),"data-testid":"primary"},this.primaryActionLabel),a("button",{key:"12033ad5018d100f84f0149d83dc965d8e5b2c66",class:"tertiary","aria-label":"More actions",onClick:this._onOverflowClick},a("span",{key:"e11f8008542b4f7f70d1273bb31200c50d02aabb",class:"icon-placeholder"},"...")))))}static get assetsDirs(){return["../../assets"]}static get style(){return"@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } @layer lmvz-ds.reset { h1, h2, h3, h4, h5, h6 { margin: 0; } } .sc-lmvz-card-h { button { --lmvz-button-color: var(--lmvz-component-color, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-padding-inline: var(--lmvz-button-padding, var(--lmvz-component-input-md-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-padding-block: var(--lmvz-button-padding, var(--lmvz-component-input-md-padding-y, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-lg, 400 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.4 Router); --lmvz-button-radius: var(--lmvz-component-input-radius-default, 999px); --lmvz-button-border-width: 0; --lmvz-button-border-color: transparent; --lmvz-button-background: var(--lmvz-semantic-color-int-primary, #000000); display: inline-flex; align-items: center; justify-content: center; gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-align: center; text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-status-selected, #f1f9fe); outline-offset: var(--lmvz-component-input-sm-padding-x, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-hover, #2e2e2e); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-semantic-color-int-primary-active, #545454); } button.secondary { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); --lmvz-button-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-button-border-width: var(--lmvz-semantic-border-width-default, 1px); --lmvz-button-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); } button.secondary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --lmvz-button-border-color: var(--lmvz-semantic-color-border-hover, #c7c7c7); } button.secondary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-secondary-active, #d4d4d4); --lmvz-button-border-color: var(--lmvz-semantic-color-border-active, #d4d4d4); } button.tertiary { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); --lmvz-button-color: var(--lmvz-semantic-color-int-on-tertiary, #545454); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); } button.small { --lmvz-button-padding-inline: var(--lmvz-component-input-sm-padding-x, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-padding-block: var(--lmvz-component-input-sm-padding-y, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-button-gap: var(--lmvz-component-input-sm-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } button.large { --lmvz-button-padding-inline: var(--lmvz-component-input-lg-padding-x, clamp(0.88rem, 0.78rem + 0.39vw, 1.25rem)); --lmvz-button-padding-block: var(--lmvz-component-input-lg-padding-y, clamp(0.88rem, 0.78rem + 0.39vw, 1.25rem)); --lmvz-button-gap: var(--lmvz-component-input-lg-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-button-font: var(--lmvz-typography-body-lg, 400 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.4 Router); } display: flex; min-width: var(--lmvz-other-component-card-minwidth, 20.4375rem); max-width: var(--lmvz-other-component-card-maxwidth, 21.6875rem); flex-direction: column; align-items: flex-start; border-radius: var(--lmvz-semantic-border-radius-lg, 14px); border: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-default, #e0e0e0); background: var(--lmvz-semantic-color-surface-primary, #ffffff); } *.sc-lmvz-card { color: var(--lmvz-semantic-color-on-surface-primary, #000000); font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } .top.sc-lmvz-card { display: flex; padding: var(--lmvz-dimension-8-12, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); flex-direction: column; justify-content: center; align-items: center; align-self: stretch; } .bottom.sc-lmvz-card { display: flex; min-width: 150px; padding: var(--lmvz-dimension-4-6, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-10-14, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)); flex-direction: column; align-items: flex-start; align-self: stretch; } .title.sc-lmvz-card { margin: 0; display: flex; justify-content: center; align-items: center; align-self: stretch; padding-bottom: var(--lmvz-global-s4, 4px); overflow-wrap: break-word; font: var(--lmvz-typography-heading-2xl, 500 clamp(2rem, 1.94rem + 0.26vw, 2.25rem) / 1.2 Router); } .description.sc-lmvz-card { display: flex; margin: 0; padding-bottom: var(--lmvz-component-body-sm-padding-bottom, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-items: flex-start; align-self: stretch; white-space: pre-line; font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); } .image-wrapper.sc-lmvz-card { aspect-ratio: 4 / 3; width: 100%; background-size: cover; background-position: center; flex: 1 0 0; align-self: stretch; border-radius: var(--lmvz-semantic-border-radius-md, 6px); } .actions.sc-lmvz-card { margin-top: var(--lmvz-component-form-wrapper-gap-y, clamp(1.13rem, 0.97rem + 0.65vw, 1.75rem)); display: flex; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-self: stretch; } button.primary.sc-lmvz-card, lmvz-button.primary.sc-lmvz-card { display: flex; justify-content: center; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); flex: 1 0 0; }"}},[774,"lmvz-card",{cardTitle:[1,"card-title"],imageUrl:[1,"image-url"],description:[1],primaryActionLabel:[1,"primary-action-label"]}]),i=l,c=function(){"undefined"!=typeof customElements&&["lmvz-card"].forEach((e=>{"lmvz-card"===e&&(customElements.get(m(e))||customElements.define(m(e),l))}))};export{i as LmvzCard,c as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,h as a,d as t,t as r}from"./p-vi4YzJmv.js";import{R as n,A as s}from"./p-CMteT-Yo.js";import{g as i,c as l}from"./p-B3JVFwO1.js";import{d as o}from"./p-BBDH9X49.js";class c{host;elements=[];constructor(e){this.host=e}hostDidRender(){this.host.el.addEventListener("keydown",this.handleKeydown)}updateElements(e){this.elements=e}handleKeydown=e=>{const{key:a}=e;if(!["ArrowDown","ArrowRight","ArrowUp","ArrowLeft"].includes(a))return;const t=i(document),r=this.getNextFocusableElement(t,["ArrowDown","ArrowRight"].includes(a)?"down":"up");r&&(e.preventDefault(),r.focus?.())};getNextFocusableElement(e,a){const{elements:t}=this,r=t.indexOf(e);if(-1===r)return null;let n=null;if("down"===a?n=(r+1)%t.length:"up"===a&&(n=(r-1+t.length)%t.length),null==n)return null;const s=t[n];return l(s)?s:this.getNextFocusableElement(s,a)}}const d=e(class extends n{get el(){return this}primarySlot;secondarySlot;secondaryNav;keyboardNavigationController=new c(this);get primaryMenuitems(){return this.primarySlot.assignedElements({flatten:!1})}get secondaryMenuitems(){return this.secondarySlot.assignedElements({flatten:!0})}get role(){return"banner"}lmvzActiveNav;get secondarySlotName(){return"connect-nav-"+this.lmvzActiveNav}constructor(e){super(!1),!1!==e&&this.__registerHost(),this.__attachShadow(),this.addController(new s(this,{reValidateOnPropChanges:!0})),this.addController(this.keyboardNavigationController)}handleActiveNavChange(){this.updateElementsActive()}componentDidLoad(){this.primarySlot.addEventListener("slotchange",this.handlePrimaryNavItemsChange.bind(this)),this.handlePrimaryNavItemsChange(),this.secondarySlot.addEventListener("slotchange",this.handleSecondaryNavItemsChange.bind(this))}handlePrimaryNavItemsChange(){const e=this.primaryMenuitems;e.length?(e.forEach((e=>{e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-controls","nav-secondary")})),this.updateElementsActive()):console.warn("Primary slot has no assigned elements. Please add navigation items to the primary slot.")}handleSecondaryNavItemsChange(){this.secondaryMenuitems.length&&this.updateKeyboardNavSubjects()}updateKeyboardNavSubjects(){this.keyboardNavigationController.updateElements([...this.primaryMenuitems,...this.secondaryMenuitems])}updateElementsActive(){let e;this.primaryMenuitems.forEach((a=>{const t=a.id===this.lmvzActiveNav;t&&(e=a.textContent||a.id),a.setAttribute("aria-expanded",t?"true":"false")})),this.secondaryNav.setAttribute("aria-label","Untermenü für "+e)}delegateFocus(){const e=this.primaryMenuitems[0];e&&e.focus()}render(){return a(t,{key:"783c855e49e1a2447107d6205a1b2c50285ccfff",onFocus:this.delegateFocus.bind(this)},a("div",{key:"84a78b0ed3e170c49a711fa4091f80dbc7003b2f",class:"brand"},a("slot",{key:"76cc54f17a7bc5f825433fc56351666a93891fd2",name:"brand"},a("lmvz-icon",{key:"e196e43720cb4b4c3f79b3071d534b50480f6206",id:"fallback-logo-lmvz",icon:"Logo",size:"inherit","aria-label":"Lehrmittelverlag Zürich"}))),a("nav",{key:"d25a719752bd4085da5ad18af94afc66e9cabd5e","aria-label":"Hauptnavigation"},a("div",{key:"8a12c2c53bd061b3559ce9693780e592b3d7aa32",role:"menubar",class:"primary-menubar"},a("slot",{key:"4461632675dc657f675883e8ef618e371ace0ad7",name:"nav-primary",ref:e=>this.primarySlot=e}),a("div",{key:"c1dabc588ac376db667df32d3edbdd6dce60aaad",role:"menu",id:"nav-secondary",class:"secondary-menubar",hidden:!this.lmvzActiveNav,ref:e=>this.secondaryNav=e},a("slot",{key:"74ca44ee2f755ffe9ea3ebc19cc2b227ae22df8b",name:this.secondarySlotName,ref:e=>this.secondarySlot=e})))),a("div",{key:"a4d250a5fcd10390aed1f5369c28ddec9aa9ee8d",class:"actions"},a("slot",{key:"77a499ce12d269e79221ca971cc1b203d179f459",name:"actions"})))}static get watchers(){return{lmvzActiveNav:[{handleActiveNavChange:0}]}}static get style(){return":host{display:flex;width:100vw;flex-direction:row;align-items:center;box-sizing:border-box;background-color:var(--lmvz-semantic-color-surface-primary, #ffffff);--lmvz-header-x-spacing-level-1:var(--lmvz-dimension-8-28, clamp(0.5rem, 0.2rem + 1.29vw, 1.75rem));--lmvz-header-x-spacing-level-2:var(--lmvz-component-buttongroup-wrapper-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem));padding:var(--lmvz-dimension-8-16, clamp(0.5rem, 0.38rem + 0.52vw, 1rem)) var(--lmvz-header-x-spacing-level-1);gap:var(--lmvz-header-x-spacing-level-1);.brand{display:inline-flex;justify-content:center;align-items:center}#fallback-logo-lmvz{height:34px;width:auto}nav{flex-grow:1}.primary-menubar{display:flex;flex-direction:row;align-items:center}.secondary-menubar{display:flex;flex-direction:row;align-items:center;margin-left:var(--lmvz-header-x-spacing-level-2);padding-left:var(--lmvz-header-x-spacing-level-2);border-left:1px solid var(--lmvz-semantic-color-border-default, #e0e0e0)}}"}},[769,"lmvz-header",{role:[2561],lmvzActiveNav:[1,"lmvz-active-nav"]},void 0,{lmvzActiveNav:[{handleActiveNavChange:0}]}]),m=d,h=function(){"undefined"!=typeof customElements&&["lmvz-header","lmvz-icon"].forEach((e=>{switch(e){case"lmvz-header":customElements.get(r(e))||customElements.define(r(e),d);break;case"lmvz-icon":customElements.get(r(e))||o()}}))};export{m as LmvzHeader,h as defineCustomElement}
1
+ import{p as e,h as a,d as t,t as r}from"./p-vi4YzJmv.js";import{R as n,A as s}from"./p-CMteT-Yo.js";import{g as i,c as l}from"./p-B3JVFwO1.js";import{d as o}from"./p-BsS3QvWn.js";class c{host;elements=[];constructor(e){this.host=e}hostDidRender(){this.host.el.addEventListener("keydown",this.handleKeydown)}updateElements(e){this.elements=e}handleKeydown=e=>{const{key:a}=e;if(!["ArrowDown","ArrowRight","ArrowUp","ArrowLeft"].includes(a))return;const t=i(document),r=this.getNextFocusableElement(t,["ArrowDown","ArrowRight"].includes(a)?"down":"up");r&&(e.preventDefault(),r.focus?.())};getNextFocusableElement(e,a){const{elements:t}=this,r=t.indexOf(e);if(-1===r)return null;let n=null;if("down"===a?n=(r+1)%t.length:"up"===a&&(n=(r-1+t.length)%t.length),null==n)return null;const s=t[n];return l(s)?s:this.getNextFocusableElement(s,a)}}const d=e(class extends n{get el(){return this}primarySlot;secondarySlot;secondaryNav;keyboardNavigationController=new c(this);get primaryMenuitems(){return this.primarySlot.assignedElements({flatten:!1})}get secondaryMenuitems(){return this.secondarySlot.assignedElements({flatten:!0})}get role(){return"banner"}lmvzActiveNav;get secondarySlotName(){return"connect-nav-"+this.lmvzActiveNav}constructor(e){super(!1),!1!==e&&this.__registerHost(),this.__attachShadow(),this.addController(new s(this,{reValidateOnPropChanges:!0})),this.addController(this.keyboardNavigationController)}handleActiveNavChange(){this.updateElementsActive()}componentDidLoad(){this.primarySlot.addEventListener("slotchange",this.handlePrimaryNavItemsChange.bind(this)),this.handlePrimaryNavItemsChange(),this.secondarySlot.addEventListener("slotchange",this.handleSecondaryNavItemsChange.bind(this))}handlePrimaryNavItemsChange(){const e=this.primaryMenuitems;e.length?(e.forEach((e=>{e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-controls","nav-secondary")})),this.updateElementsActive()):console.warn("Primary slot has no assigned elements. Please add navigation items to the primary slot.")}handleSecondaryNavItemsChange(){this.secondaryMenuitems.length&&this.updateKeyboardNavSubjects()}updateKeyboardNavSubjects(){this.keyboardNavigationController.updateElements([...this.primaryMenuitems,...this.secondaryMenuitems])}updateElementsActive(){let e;this.primaryMenuitems.forEach((a=>{const t=a.id===this.lmvzActiveNav;t&&(e=a.textContent||a.id),a.setAttribute("aria-expanded",t?"true":"false")})),this.secondaryNav.setAttribute("aria-label","Untermenü für "+e)}delegateFocus(){const e=this.primaryMenuitems[0];e&&e.focus()}render(){return a(t,{key:"783c855e49e1a2447107d6205a1b2c50285ccfff",onFocus:this.delegateFocus.bind(this)},a("div",{key:"84a78b0ed3e170c49a711fa4091f80dbc7003b2f",class:"brand"},a("slot",{key:"76cc54f17a7bc5f825433fc56351666a93891fd2",name:"brand"},a("lmvz-icon",{key:"e196e43720cb4b4c3f79b3071d534b50480f6206",id:"fallback-logo-lmvz",icon:"Logo",size:"inherit","aria-label":"Lehrmittelverlag Zürich"}))),a("nav",{key:"d25a719752bd4085da5ad18af94afc66e9cabd5e","aria-label":"Hauptnavigation"},a("div",{key:"8a12c2c53bd061b3559ce9693780e592b3d7aa32",role:"menubar",class:"primary-menubar"},a("slot",{key:"4461632675dc657f675883e8ef618e371ace0ad7",name:"nav-primary",ref:e=>this.primarySlot=e}),a("div",{key:"c1dabc588ac376db667df32d3edbdd6dce60aaad",role:"menu",id:"nav-secondary",class:"secondary-menubar",hidden:!this.lmvzActiveNav,ref:e=>this.secondaryNav=e},a("slot",{key:"74ca44ee2f755ffe9ea3ebc19cc2b227ae22df8b",name:this.secondarySlotName,ref:e=>this.secondarySlot=e})))),a("div",{key:"a4d250a5fcd10390aed1f5369c28ddec9aa9ee8d",class:"actions"},a("slot",{key:"77a499ce12d269e79221ca971cc1b203d179f459",name:"actions"})))}static get watchers(){return{lmvzActiveNav:[{handleActiveNavChange:0}]}}static get style(){return":host{display:flex;width:100vw;flex-direction:row;align-items:center;box-sizing:border-box;background-color:var(--lmvz-semantic-color-surface-primary, #ffffff);--lmvz-header-x-spacing-level-1:var(--lmvz-dimension-8-28, clamp(0.5rem, 0.2rem + 1.29vw, 1.75rem));--lmvz-header-x-spacing-level-2:var(--lmvz-component-buttongroup-wrapper-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem));padding:var(--lmvz-dimension-8-16, clamp(0.5rem, 0.38rem + 0.52vw, 1rem)) var(--lmvz-header-x-spacing-level-1);gap:var(--lmvz-header-x-spacing-level-1);.brand{display:inline-flex;justify-content:center;align-items:center}#fallback-logo-lmvz{height:34px;width:auto}nav{flex-grow:1}.primary-menubar{display:flex;flex-direction:row;align-items:center}.secondary-menubar{display:flex;flex-direction:row;align-items:center;margin-left:var(--lmvz-header-x-spacing-level-2);padding-left:var(--lmvz-header-x-spacing-level-2);border-left:1px solid var(--lmvz-semantic-color-border-default, #e0e0e0)}}"}},[769,"lmvz-header",{role:[2561],lmvzActiveNav:[1,"lmvz-active-nav"]},void 0,{lmvzActiveNav:[{handleActiveNavChange:0}]}]),m=d,h=function(){"undefined"!=typeof customElements&&["lmvz-header","lmvz-icon"].forEach((e=>{switch(e){case"lmvz-header":customElements.get(r(e))||customElements.define(r(e),d);break;case"lmvz-icon":customElements.get(r(e))||o()}}))};export{m as LmvzHeader,h as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-BBDH9X49.js";const p=o,r=s;export{p as LmvzIcon,r as defineCustomElement}
1
+ import{L as s,d as o}from"./p-BsS3QvWn.js";const p=s,r=o;export{p as LmvzIcon,r as defineCustomElement}