@lmvz-ds/components 0.18.2 → 0.19.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.
Files changed (104) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +45 -100
  3. package/cjs/ds.constants-DSnxZ3ia.js +16 -0
  4. package/cjs/{icons-swqMn6s2.js → icons-Tg7ySOh-.js} +54 -38
  5. package/cjs/index.cjs.js +9 -10
  6. package/cjs/lmvz-button.cjs.entry.js +2 -2
  7. package/cjs/lmvz-chip.cjs.entry.js +68 -4
  8. package/cjs/lmvz-components.cjs.js +1 -1
  9. package/cjs/lmvz-header_2.cjs.entry.js +2 -2
  10. package/cjs/lmvz-icon.cjs.entry.js +6 -6
  11. package/cjs/lmvz-input.cjs.entry.js +3 -3
  12. package/cjs/lmvz-menuitem.cjs.entry.js +2 -2
  13. package/cjs/lmvz-select.cjs.entry.js +2 -2
  14. package/cjs/loader.cjs.js +1 -1
  15. package/cjs/{reactive-controller-host-CtaVAiYJ.js → reactive-controller-host-Bi9eu2bV.js} +9 -9
  16. package/collection/api/ds.constants.js +2 -0
  17. package/collection/components/lmvz-button/lmvz-button.js +6 -3
  18. package/collection/components/lmvz-chip/lmvz-chip.css +84 -1
  19. package/collection/components/lmvz-chip/lmvz-chip.js +110 -13
  20. package/collection/components/lmvz-header/lmvz-header.js +2 -2
  21. package/collection/components/lmvz-icon/lmvz-icon.css +11 -10
  22. package/collection/components/lmvz-icon/lmvz-icon.js +7 -6
  23. package/collection/components/lmvz-input/lmvz-input.js +4 -4
  24. package/collection/components/lmvz-menuitem/lmvz-menuitem.js +11 -5
  25. package/collection/components/lmvz-select/lmvz-select.js +1 -1
  26. package/collection/index.js +1 -1
  27. package/collection/integration/header-integration/header-integration.js +1 -1
  28. package/collection/utils/aria/aria-validation-controller.js +1 -0
  29. package/collection/utils/reactive-controller-host.js +9 -9
  30. package/components/index.js +1 -1
  31. package/components/lmvz-button.js +1 -1
  32. package/components/lmvz-chip.js +1 -1
  33. package/components/lmvz-header.js +1 -1
  34. package/components/lmvz-icon.js +1 -1
  35. package/components/lmvz-input.js +1 -1
  36. package/components/lmvz-menuitem.js +1 -1
  37. package/components/lmvz-select.js +1 -1
  38. package/components/{p-DQEkWkMh.js → p-DIrAQ4IB.js} +1 -1
  39. package/esm/{aria-loader-BF_AYtbb.js → aria-loader-CES8Ae1e.js} +1 -1
  40. package/esm/ds.constants-Bmi89ll1.js +9 -0
  41. package/esm/{icons-Ca8oMiRa.js → icons-Bj4dF1-I.js} +55 -40
  42. package/esm/{index-7Ru1khgk.js → index-BvxaUA12.js} +1 -1
  43. package/esm/index.js +4 -11
  44. package/esm/lmvz-button.entry.js +3 -3
  45. package/esm/lmvz-chip.entry.js +69 -5
  46. package/esm/lmvz-components.js +1 -1
  47. package/esm/lmvz-header_2.entry.js +3 -3
  48. package/esm/lmvz-icon.entry.js +7 -7
  49. package/esm/lmvz-input.entry.js +4 -4
  50. package/esm/lmvz-menuitem.entry.js +3 -3
  51. package/esm/lmvz-select.entry.js +3 -3
  52. package/esm/loader.js +1 -1
  53. package/esm/{logger-fiRXhuXK.js → logger-0bL3pydp.js} +1 -1
  54. package/esm/{reactive-controller-host-sR2jJxNG.js → reactive-controller-host-J2thAxVH.js} +10 -10
  55. package/hydrate/index.js +92 -27
  56. package/hydrate/index.mjs +92 -27
  57. package/lmvz-components/index.esm.js +1 -1
  58. package/lmvz-components/lmvz-components.esm.js +1 -1
  59. package/lmvz-components/{p-fiRXhuXK.js → p-0bL3pydp.js} +1 -1
  60. package/lmvz-components/p-40569208.entry.js +1 -0
  61. package/lmvz-components/p-49ab22bd.entry.js +1 -0
  62. package/lmvz-components/{p-6dbb3f13.entry.js → p-6e8acbd9.entry.js} +1 -1
  63. package/lmvz-components/{p-59383f3a.entry.js → p-9212bd23.entry.js} +1 -1
  64. package/lmvz-components/p-9626e951.entry.js +1 -0
  65. package/lmvz-components/p-Bmi89ll1.js +1 -0
  66. package/lmvz-components/p-Bu4Z_PMf.js +1 -0
  67. package/lmvz-components/{p-Bkfdgg0T.js → p-BxHnZA0M.js} +1 -1
  68. package/lmvz-components/{p-DXOTa5VF.js → p-DHZwxmLb.js} +1 -1
  69. package/lmvz-components/{p-B3dnXEPG.js → p-DYaffOLo.js} +1 -1
  70. package/lmvz-components/{p-84267405.entry.js → p-e1b847d2.entry.js} +1 -1
  71. package/lmvz-components/{p-5aa17cd2.entry.js → p-ec96c6b6.entry.js} +1 -1
  72. package/manifest.json +139 -32
  73. package/package.json +1 -1
  74. package/types/api/ds.constants.d.ts +6 -1
  75. package/types/components/lmvz-action/lmvz-action.d.ts +0 -1
  76. package/types/components/lmvz-button/lmvz-button.d.ts +0 -1
  77. package/types/components/lmvz-card/lmvz-card.d.ts +0 -1
  78. package/types/components/lmvz-chip/lmvz-chip.d.ts +18 -3
  79. package/types/components/lmvz-header/lmvz-header.d.ts +0 -1
  80. package/types/components/lmvz-icon/lmvz-icon.d.ts +0 -1
  81. package/types/components/lmvz-input/lmvz-input.d.ts +0 -1
  82. package/types/components/lmvz-menuitem/lmvz-menuitem.d.ts +0 -1
  83. package/types/components/lmvz-select/lmvz-select.d.ts +0 -1
  84. package/types/components.d.ts +70 -12
  85. package/types/index.d.ts +1 -2
  86. package/types/utils/aria/aria-validation-controller.d.ts +1 -2
  87. package/types/utils/aria/element-activation-controller.d.ts +0 -1
  88. package/types/utils/aria/list-keyboard-controller.d.ts +0 -1
  89. package/types/utils/assets.d.ts +0 -1
  90. package/types/utils/component.d.ts +0 -1
  91. package/types/utils/environment.d.ts +0 -1
  92. package/types/utils/http.d.ts +0 -1
  93. package/types/utils/http.unit.d.ts +0 -1
  94. package/types/utils/icons/icons-registry.d.ts +0 -1
  95. package/types/utils/icons/icons.d.ts +0 -1
  96. package/types/utils/icons/icons.unit.d.ts +0 -1
  97. package/types/utils/icons/public.d.ts +0 -1
  98. package/types/utils/public.d.ts +0 -1
  99. package/types/utils/reactive-controller-host.d.ts +0 -1
  100. package/lmvz-components/p-0a41cc24.entry.js +0 -1
  101. package/lmvz-components/p-30b99f11.entry.js +0 -1
  102. package/lmvz-components/p-5f150890.entry.js +0 -1
  103. package/lmvz-components/p-Bh2Epkwf.js +0 -1
  104. /package/components/{p-CBLAeife.js → p-DbeHBSOe.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lmvz-ds/components
2
2
 
3
+ ## 0.19.0
4
+
5
+ ### Minor Changes
6
+
7
+ - a71b037: Chip Komponente hinzugefügt
8
+
3
9
  ## 0.18.2
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -1,43 +1,60 @@
1
- [![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D&colorA=16161d&style=flat-square)](https://stenciljs.com)
2
-
3
- Stencil is a compiler for building web apps using Web Components.
4
-
5
1
  # LMVZ Component Library
6
2
 
7
- This is the component library of the LMVZ Design System
8
-
9
- ## About
3
+ [![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRkY7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMzczLjljMCwzNy42LTU1LjEsNjguNi05Mi43LDY4LjZIMTgwLjRjLTM3LjksMC05Mi43LTMwLjctOTIuNy02OC42di0zLjZoMzM2LjlWMzczLjl6Ii8+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywyOTIuMUgxODAuNGMtMzcuNiwwLTkyLjctMzEtOTIuNy02OC42di0zLjZIMzMyYzM3LjYsMCw5Mi43LDMxLDkyLjcsNjguNlYyOTIuMXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDE0MS43SDg3Ljd2LTMuNmMwLTM3LjYsNTQuOC02OC42LDkyLjctNjguNkgzMzJjMzcuOSwwLDkyLjcsMzAuNyw5Mi43LDY4LjZWMTQxLjd6Ii8+Cjwvc3ZnPgo%3D&colorA=16161d&style=flat-square)](https://stenciljs.com)
10
4
 
11
- This package uses **Stencil** to create web components—for browser-native usage—and framework-specific wrapper utils for angular and react (which are wrapped using their dedicated sibling packages).
12
- It also uses **Effect** (aka. effect-ts) for improved type-safety error handling
5
+ Web components for the LMVZ Design System.
13
6
 
14
- ## General Guidelines for Consuming This Package (in your project)
7
+ ## About
15
8
 
16
- Always consider the Integration chapter in the Design Guide. In the context of a UI framework, consider using the specific wrapper packages: `@lmvz-ds/angular`, `@lmvz-ds/react`, `@lmvz-ds/vue`.
9
+ This package uses **Stencil** to create web components for browser-native usage and to generate integration artifacts consumed by sibling framework packages.
17
10
 
18
- ## NPM Integration
11
+ Please also read the Integration chapter of the Design Guide.
19
12
 
20
- ### Installation
13
+ ## Installation
21
14
 
22
15
  ```bash
23
16
  npm i @lmvz-ds/components
24
17
  ```
25
18
 
19
+ > [!TIP]
20
+ > If you are building an Angular application, prefer the `@lmvz-ds/angular` wrapper package.
21
+
26
22
  > [!TIP]
27
23
  > Our @lmvz-ds/aria-validation sibling is only used for YOUR development mode, and thus, optional.
28
24
 
29
25
  ## Usage
30
26
 
31
- In a web app, import components directly (`import LmvzCard from '.../components/lmvz-card.js'`) or the loader (e.g., `import { defineCustomElements } from '.../loader';`) and call `defineCustomElements(window)` to register all components globally.
32
- Use the CDN version (cdn.js) for direct browser inclusion via <script> tags.
33
- The loader is essential when integrating Stencil components into non-Stencil projects (React, Angular, plain HTML) to ensure custom elements are defined and polyfills loaded.
27
+ Import individual components when you only need a subset:
28
+
29
+ ```ts
30
+ import '@lmvz-ds/components/lmvz-button';
31
+ import '@lmvz-ds/components/lmvz-icon';
32
+ ```
33
+
34
+ Register all components globally via the loader when that is a better fit for your app shell:
35
+
36
+ ```ts
37
+ import { defineCustomElements } from '@lmvz-ds/components/loader';
38
+
39
+ defineCustomElements(window);
40
+ ```
41
+
42
+ If your app has no own build/bundling process, directly import from the CDN (unpkg.com) using `<script type="module" href="[cdnurl]">`.
43
+
44
+ The package also exposes a /hydrate entry for server-side rendering workflows.
45
+
46
+ ### Icons
47
+
48
+ The `<lmvz-icon>` component requires an icon provider to be registered before use. See [@lmvz-ds/icons](https://www.npmjs.com/package/@lmvz-ds/icons) for setup instructions and available provider modes.
34
49
 
35
50
  ### Runtime ARIA Validation (Opt-in)
36
51
 
37
- ARIA validation is disabled by default and can be enabled on demand with a separate runtime import:
52
+ ARIA validation is disabled by default and can be enabled on demand for development-time accessibility checks:
38
53
 
39
54
  ```ts
40
- import '@lmvz-ds/components/ariaValidation';
55
+ import { enableAriaValidation } from '@lmvz-ds/components';
56
+
57
+ enableAriaValidation();
41
58
  ```
42
59
 
43
60
  This import enables validation globally for all LMVZ components, independent of integration mode.
@@ -45,25 +62,25 @@ This import enables validation globally for all LMVZ components, independent of
45
62
  To disable it again at runtime:
46
63
 
47
64
  ```ts
48
- import { disableAriaValidation } from '@lmvz-ds/components/ariaValidation';
65
+ import { disableAriaValidation } from '@lmvz-ds/components';
49
66
 
50
67
  disableAriaValidation();
51
68
  ```
52
69
 
53
- ### Components
54
-
55
- Components are built in standalone mode, using [`dist-custom-elements`](https://stenciljs.com/docs/custom-elements). This way, you can import the components individually, wherever they are needed.
70
+ ### Example
56
71
 
57
- For example, given you'd like to use `<my-component />` as part of your application, you can import the component directly via:
72
+ Import and register the component module before using its custom element:
58
73
 
59
74
  ```tsx
60
- import '@lmvz-ds/components/my-component';
75
+ import { defineCustomElement as defineButtonElement } '@lmvz-ds/components/lmvz-button';
76
+
77
+ defineButtonElement();
61
78
 
62
79
  function App() {
63
80
  return (
64
81
  <>
65
82
  <div>
66
- <my-component first="Stencil" middle="'Don't call me a framework'" last="JS"></my-component>
83
+ <lmvz-button variant="primary"></lmvz-button>
67
84
  </div>
68
85
  </>
69
86
  );
@@ -72,81 +89,9 @@ function App() {
72
89
  export default App;
73
90
  ```
74
91
 
75
- ⚠️ The components' bundled styles will not affect native HTML elements, so you still need to import style packages you want to use globally.
76
-
77
- ## Making changes to this package
78
-
79
- ### Getting Started
80
-
81
- ```bash
82
- npm install
83
- ```
84
-
85
- ### Workflow
86
-
87
- See the parent project's readme for the overarching process' description.
88
-
89
- ### Guidelines
90
-
91
- - Components must each be provided as stand-alone bundles.
92
- - Components must bring their own, ds-aligned, default styles. This increases flexibility (as components are usable stand-alone) and is achieved by build-time injection of defaults (based on base- and light-theme-variables). There is no need for importing any variables definitions. Instead, add base variables to the plugin config's list (`stencil.base.config.ts`).
93
- - Font file contents are exempt from bundling, to allow for browser-caching!
94
- - To prevent styles from leaking out of your Components (into the global scope), wrap your own styles and `@import`s in `:host`.
95
- - Components depending on Fragments must import them into their :host selector, for proper encapsulation.
96
- - This use of CSS' @import syntax is invalid, but properly handled by postcss.
97
- - Consider using custom-property abstractions instead of importing whole fragments!
98
-
99
-
100
- ### Configuration
101
-
102
- Different Stencil configs are necessary, since we need the following constellations (which are not possible with a single config):
103
-
104
- - local Stencil dev-server: classic dev build
105
- - Storybook integration: prod build + source maps (dev build does not generate source files in dist/)
106
- - release build: prod build without source maps
107
-
108
- package.json exports should be generated along with the Stencil build (for new components).
109
-
110
- ### Development
111
-
112
- Use the `pnpm run start:dev` script to start Stencil's dev server.
113
- (`start` will be called from the Storybook sibling package and will only run a (watching) production build).
114
-
115
- ### Building
116
-
117
- To build the components (and styles) for production, run the build script. This will also sync changes to the wrapper projects.
118
-
119
- ```bash
120
- pnpm run build
121
- ```
122
-
123
- ### Creating New Components
124
-
125
- Always use the `lmvz-` prefix when creating new components!
126
-
127
- ```bash
128
- pnpm run @stencil/core generate lmvz-[component name]
129
- ```
130
-
131
- ### Testing
132
-
133
- To run the unit tests for the components, run:
134
-
135
- ```bash
136
- npm test
137
- ```
138
-
139
- #### Integration Testing
140
-
141
- Since components can be integrated in various ways, always test integrations:
142
-
143
- - Stencil dev mode and preview (see package scripts).
144
- - With the Storybook package.
145
- - Angular, React, ... wrappers
92
+ LMVZ component styles do not style native HTML elements outside the components. Import a theme, and any additional global style bundles you need, from `@lmvz-ds/styles` separately.
146
93
 
147
- #### E2E
148
94
 
149
- TODOs
95
+ ## Contributing
150
96
 
151
- - Current Playwright integration is broken or will break Jest integration.
152
- - Vitest-Browser + Stencil is bleeding edge and needs eval.
97
+ Contributor onboarding for local development, builds, testing, and authoring guidelines is in `DEVELOPMENT.md`.
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ const sizes = ['xs', 'sm', 'md', 'lg'];
4
+ const textSizes = [...sizes, 'xl'];
5
+ const inputTypes = ['text', 'email', 'password', 'tel', 'url', 'search', 'number'];
6
+ const iconSizes = [...sizes, 'inherit'];
7
+ const iconWeights = ['thin', 'medium', 'bold', 'filled'];
8
+ const chipTypes = ['active', 'warning', 'success', 'error', 'neutral'];
9
+ const chipSizes = ['default', 'small'];
10
+
11
+ exports.chipSizes = chipSizes;
12
+ exports.chipTypes = chipTypes;
13
+ exports.iconSizes = iconSizes;
14
+ exports.iconWeights = iconWeights;
15
+ exports.inputTypes = inputTypes;
16
+ exports.textSizes = textSizes;
@@ -2,6 +2,41 @@
2
2
 
3
3
  var logger = require('./logger-Bn2yoZGP.js');
4
4
 
5
+ const IconProviderRegistryKey = Symbol.for('LMVZ__iconProviderRegistry');
6
+ const inMemoryRegistry = {};
7
+ function getRegistry() {
8
+ if (typeof window === 'undefined') {
9
+ return inMemoryRegistry;
10
+ }
11
+ return window[IconProviderRegistryKey] ?? (window[IconProviderRegistryKey] = {});
12
+ }
13
+ function registerIconProvider(id, provider) {
14
+ const registry = getRegistry();
15
+ const providerName = id;
16
+ if (Object.prototype.hasOwnProperty.call(registry, providerName)) {
17
+ console.warn(`Icon provider with name "${providerName}" is already registered. Overwriting existing provider.`);
18
+ }
19
+ registry[providerName] = provider;
20
+ }
21
+ function getRegisteredIconProvider(id) {
22
+ const registry = getRegistry();
23
+ if (id) {
24
+ return registry[id];
25
+ }
26
+ const providerNames = Object.keys(registry);
27
+ if (providerNames.length === 0) {
28
+ return undefined;
29
+ }
30
+ if (providerNames.length > 1) {
31
+ console.warn(`Multiple icon providers registered (${providerNames.join(', ')}). Using the first one: "${providerNames[0]}".`);
32
+ }
33
+ const firstProviderName = providerNames[0];
34
+ if (!firstProviderName) {
35
+ return undefined;
36
+ }
37
+ return registry[firstProviderName];
38
+ }
39
+
5
40
  /**
6
41
  * This module provides types and utility functions to create and work with branded types,
7
42
  * which are TypeScript types with an added type tag to prevent accidental usage of a value in the wrong context.
@@ -56,57 +91,37 @@ class BrandValidationError extends logger.TaggedError('BrandValidationError') {
56
91
  super(new Error(`Brand validation failed for type ${type}.`, { cause: error }));
57
92
  }
58
93
  }
94
+ /**
95
+ * Validates an SVG string against the branded `SVGString` type and returns the result effect.
96
+ *
97
+ * @param svg Raw SVG markup to validate.
98
+ */
59
99
  const createValidSVGString = (svg) => logger.try_({
60
- try: () => SVGString(svg),
100
+ try: () => SVGString(sanitizeSvg(svg)),
61
101
  catch: (error) => new BrandValidationError(error, 'SVGString'),
62
102
  });
103
+ /**
104
+ * Checks whether a string can be parsed into an SVG document.
105
+ *
106
+ * @param svg Raw SVG markup to validate.
107
+ */
63
108
  function isValidSVG(svg) {
64
- if (typeof svg !== 'string') {
109
+ if (typeof svg !== 'string')
65
110
  return false;
66
- }
111
+ const sanitizedSvg = sanitizeSvg(svg);
67
112
  try {
68
113
  const parser = new DOMParser();
69
- const doc = parser.parseFromString(svg, 'image/svg+xml');
114
+ const doc = parser.parseFromString(sanitizedSvg, 'image/svg+xml');
70
115
  return doc.documentElement.nodeName === 'svg';
71
116
  }
72
117
  catch {
73
118
  return false;
74
119
  }
75
120
  }
76
-
77
- const IconProviderRegistryKey = Symbol.for('LMVZ__iconProviderRegistry');
78
- const inMemoryRegistry = {};
79
- function getRegistry() {
80
- if (typeof window === 'undefined') {
81
- return inMemoryRegistry;
82
- }
83
- return window[IconProviderRegistryKey] ?? (window[IconProviderRegistryKey] = {});
84
- }
85
- function registerIconProvider(id, provider) {
86
- const registry = getRegistry();
87
- const providerName = id;
88
- if (Object.prototype.hasOwnProperty.call(registry, providerName)) {
89
- console.warn(`Icon provider with name "${providerName}" is already registered. Overwriting existing provider.`);
90
- }
91
- registry[providerName] = provider;
92
- }
93
- function getRegisteredIconProvider(id) {
94
- const registry = getRegistry();
95
- if (id) {
96
- return registry[id];
97
- }
98
- const providerNames = Object.keys(registry);
99
- if (providerNames.length === 0) {
100
- return undefined;
101
- }
102
- if (providerNames.length > 1) {
103
- console.warn(`Multiple icon providers registered (${providerNames.join(', ')}). Using the first one: "${providerNames[0]}".`);
104
- }
105
- const firstProviderName = providerNames[0];
106
- if (!firstProviderName) {
107
- return undefined;
108
- }
109
- return registry[firstProviderName];
121
+ function sanitizeSvg(svg) {
122
+ const dataUriPrefix = 'data:image/svg+xml,';
123
+ const base = svg.trim();
124
+ return !base.startsWith(dataUriPrefix) ? base : decodeURIComponent(base.slice(dataUriPrefix.length));
110
125
  }
111
126
 
112
127
  const emptyDefaultSvg = () => SVGString(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"></svg>`);
@@ -156,6 +171,7 @@ function typedIconFromSet(iconset, icon) {
156
171
  };
157
172
  }
158
173
 
174
+ exports.createValidSVGString = createValidSVGString;
159
175
  exports.getRegisteredIconProvider = getRegisteredIconProvider;
160
176
  exports.isValidSVG = isValidSVG;
161
177
  exports.registerIconProvider = registerIconProvider;
package/cjs/index.cjs.js CHANGED
@@ -1,14 +1,11 @@
1
1
  'use strict';
2
2
 
3
3
  var ariaLoader = require('./aria-loader-CfFuAbJn.js');
4
- var icons = require('./icons-swqMn6s2.js');
4
+ var ds_constants = require('./ds.constants-DSnxZ3ia.js');
5
+ var icons = require('./icons-Tg7ySOh-.js');
5
6
  require('./logger-Bn2yoZGP.js');
6
7
 
7
- const sizes = ['xs', 'sm', 'md', 'lg'];
8
- const textSizes = [...sizes, 'xl'];
9
- const inputTypes = ['text', 'email', 'password', 'tel', 'url', 'search', 'number'];
10
- const iconSizes = [...sizes, 'inherit'];
11
- const iconWeights = ['thin', 'medium', 'bold', 'filled'];
8
+
12
9
 
13
10
  exports.ARIA_VALIDATION_RUNTIME_CHANGED_EVENT = ariaLoader.ARIA_VALIDATION_RUNTIME_CHANGED_EVENT;
14
11
  exports.disableAriaValidation = ariaLoader.disableAriaValidation;
@@ -16,10 +13,12 @@ exports.enableAriaValidation = ariaLoader.enableAriaValidation;
16
13
  exports.isAriaValidationEnabled = ariaLoader.isAriaValidationEnabled;
17
14
  exports.queueValidation = ariaLoader.queueValidation;
18
15
  exports.useVerboseLogging = ariaLoader.useVerboseLogging;
16
+ exports.chipSizes = ds_constants.chipSizes;
17
+ exports.chipTypes = ds_constants.chipTypes;
18
+ exports.iconSizes = ds_constants.iconSizes;
19
+ exports.iconWeights = ds_constants.iconWeights;
20
+ exports.inputTypes = ds_constants.inputTypes;
21
+ exports.textSizes = ds_constants.textSizes;
19
22
  exports.getRegisteredIconProvider = icons.getRegisteredIconProvider;
20
23
  exports.registerIconProvider = icons.registerIconProvider;
21
24
  exports.typedIconFromSet = icons.typedIconFromSet;
22
- exports.iconSizes = iconSizes;
23
- exports.iconWeights = iconWeights;
24
- exports.inputTypes = inputTypes;
25
- exports.textSizes = textSizes;
@@ -2,7 +2,7 @@
2
2
 
3
3
  var index = require('./index-C2yDXRqP.js');
4
4
  var index$1 = require('./index-Bp6Dd2i1.js');
5
- var reactiveControllerHost = require('./reactive-controller-host-CtaVAiYJ.js');
5
+ var reactiveControllerHost = require('./reactive-controller-host-Bi9eu2bV.js');
6
6
  var elementActivationController = require('./element-activation-controller-DC_6T0Rt.js');
7
7
  var component = require('./component-Csg9MtNK.js');
8
8
  require('./aria-loader-CfFuAbJn.js');
@@ -64,7 +64,7 @@ const LmvzButton = class extends reactiveControllerHost.ReactiveControllerHost {
64
64
  };
65
65
  render() {
66
66
  this.renderHiddenButton();
67
- return (index.h(index.Host, { key: '2897a943aca62561b0e78b5b3f2b7b85d76f4e78', "aria-disabled": this.disabled ? 'true' : null }, index.h("button", { key: '92555224e33b00fb2602fdb2d19075145c0d9097', ref: (e) => (this.validationEl = e), disabled: this.disabled, class: index$1.classNames(this.variant, { [this.scale ?? '']: !!this.scale, disabled: this.disabled }), ...this.inheritedAttributes }, index.h("slot", { key: '637a03a73db84a63bf1e3165d57c474151f87783' }))));
67
+ return (index.h(index.Host, { key: 'ce82e749ffb9172a9421d303e0d7cc02de58dff9', "aria-disabled": this.disabled ? 'true' : null }, index.h("button", { key: 'acd0773f72e76139ec5495eb15fc3a5949029e40', ref: (e) => (this.validationEl = e), disabled: this.disabled, class: index$1.classNames(this.variant, { [this.scale ?? '']: !!this.scale, disabled: this.disabled }), ...this.inheritedAttributes }, index.h("slot", { key: 'f519e0f82e68811a8831214e83e609bd9501fed0' }))));
68
68
  }
69
69
  static get delegatesFocus() { return true; }
70
70
  };
@@ -1,17 +1,81 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-C2yDXRqP.js');
4
+ var ds_constants = require('./ds.constants-DSnxZ3ia.js');
5
+ var reactiveControllerHost = require('./reactive-controller-host-Bi9eu2bV.js');
6
+ var ariaLoader = require('./aria-loader-CfFuAbJn.js');
4
7
 
5
- const lmvzChipCss = () => `:host{display:block}`;
8
+ function debounce(func, wait) {
9
+ let timeout;
10
+ return () => {
11
+ if (timeout !== undefined) {
12
+ window.clearTimeout(timeout);
13
+ }
14
+ timeout = window.setTimeout(() => {
15
+ func();
16
+ timeout = undefined;
17
+ }, wait);
18
+ };
19
+ }
6
20
 
7
- const LmvzChip = class {
21
+ const lmvzChipCss = () => `:host { --lmvz-chip-border-color: var(--lmvz-semantic-color-status-on-neutral-subtle, #d4d4d4); --lmvz-chip-background-color: var(--lmvz-semantic-color-status-neutral, #fcfcfc); --lmvz-chip-foreground-color: var(--lmvz-semantic-color-status-on-neutral, #545454); padding-block: var(--lmvz-dimension-4-6, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)); padding-inline: var(--lmvz-dimension-8-10, clamp(0.5rem, 0.47rem + 0.13vw, 0.63rem)); border: 1px solid var(--lmvz-chip-border-color); border-radius: var(--lmvz-semantic-border-radius-round, 999px); font: var(--lmvz-typography-body-xs-strong, 500 clamp(0.69rem, 0.67rem + 0.06vw, 0.75rem) / 1.4 Router); background-color: var(--lmvz-chip-background-color); color: var(--lmvz-chip-foreground-color); display: inline-flex; align-items: center; justify-content: center; gap: var(--lmvz-dimension-4-6, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)); box-sizing: border-box; max-width: 100%; overflow: hidden; white-space: nowrap; > .content-overflow-wrapper { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } } :host([size='small']) { padding-block: var(--lmvz-dimension-2-4, clamp(0.13rem, 0.09rem + 0.13vw, 0.25rem)); padding-inline: var(--lmvz-dimension-6-8, clamp(0.38rem, 0.34rem + 0.13vw, 0.5rem)); font: var(--lmvz-typography-body-2xs-strong, 500 clamp(0.63rem, 0.61rem + 0.06vw, 0.69rem) / 1.4 Router); gap: var(--lmvz-dimension-2-4, clamp(0.13rem, 0.09rem + 0.13vw, 0.25rem)); } ::slotted(*) { display: inline; white-space: inherit; } ::slotted(lmvz-icon) { --lmvz-component-color: var(--lmvz-chip-foreground-color); --lmvz-component-size: var(--lmvz-dimension-12-14, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); } :host([size='small']) ::slotted(lmvz-icon) { --lmvz-component-size: var(--lmvz-dimension-10-12, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); } :host([type='active']) { --lmvz-chip-border-color: var(--lmvz-semantic-color-status-on-active-subtle, #c1e6fa); --lmvz-chip-background-color: var(--lmvz-semantic-color-status-active, #f1f9fe); --lmvz-chip-foreground-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); } :host([type='warning']) { --lmvz-chip-border-color: var(--lmvz-semantic-color-status-on-warning-subtle, #ffdf75); --lmvz-chip-background-color: var(--lmvz-semantic-color-status-warning, #fffbf0); --lmvz-chip-foreground-color: var(--lmvz-semantic-color-status-on-warning, #7a5e00); } :host([type='success']) { --lmvz-chip-border-color: var(--lmvz-semantic-color-status-on-success-subtle, #a5dad3); --lmvz-chip-background-color: var(--lmvz-semantic-color-status-success, #f1f9f8); --lmvz-chip-foreground-color: var(--lmvz-semantic-color-status-on-success, #37867c); } :host([type='error']) { --lmvz-chip-border-color: var(--lmvz-semantic-color-status-on-danger-subtle, #f7bfc2); --lmvz-chip-background-color: var(--lmvz-semantic-color-status-danger, #fdf1f2); --lmvz-chip-foreground-color: var(--lmvz-semantic-color-status-on-danger, #e52a31); } :host([type='neutral']) { --lmvz-chip-border-color: var(--lmvz-semantic-color-status-on-neutral-subtle, #d4d4d4); --lmvz-chip-background-color: var(--lmvz-semantic-color-status-neutral, #fcfcfc); --lmvz-chip-foreground-color: var(--lmvz-semantic-color-status-on-neutral, #545454); } `;
22
+
23
+ const LmvzChip = class extends reactiveControllerHost.ReactiveControllerHost {
24
+ ariaValidationController = new reactiveControllerHost.AriaValidationController(this);
25
+ beforeSlot;
26
+ defaultSlot;
27
+ afterSlot;
28
+ get el() { return index.getElement(this); }
29
+ get validationEl() {
30
+ return this.el;
31
+ }
32
+ type = 'active';
33
+ size = 'default';
8
34
  constructor(hostRef) {
35
+ super();
9
36
  index.registerInstance(this, hostRef);
37
+ this.addController(this.ariaValidationController);
38
+ }
39
+ normalizeType(value) {
40
+ const normalizedType = ds_constants.chipTypes.includes(value) ? value : 'active';
41
+ if (normalizedType !== this.type) {
42
+ this.type = normalizedType;
43
+ }
44
+ }
45
+ normalizeSize(value) {
46
+ const normalizedSize = ds_constants.chipSizes.includes(value) ? value : 'default';
47
+ if (normalizedSize !== this.size) {
48
+ this.size = normalizedSize;
49
+ }
50
+ }
51
+ componentWillLoad() {
52
+ this.normalizeType(this.type);
53
+ this.normalizeSize(this.size);
54
+ super.componentWillLoad();
55
+ }
56
+ connectedCallback() {
57
+ super.connectedCallback();
58
+ this.checkContent();
10
59
  }
11
- text;
60
+ checkContent = debounce(() => {
61
+ if (!ariaLoader.isAriaValidationEnabled)
62
+ return;
63
+ const elements = [...(this.beforeSlot?.assignedElements() ?? []), ...(this.defaultSlot?.assignedElements() ?? []), ...(this.afterSlot?.assignedElements() ?? [])];
64
+ if (!elements.length) {
65
+ console.warn('LmvzChip has no assigned content. Please add content to the default slot or the before-text/after-text slots.');
66
+ }
67
+ }, 500);
12
68
  render() {
13
- return index.h(index.Host, { key: 'd128e24bb90891ebd13d13a8e27c06782363cace' }, this.text);
69
+ return (index.h(index.Host, { key: 'd34b677a3f6ac2cdb53453c774badb837a3b9e25', type: this.type, size: this.size }, index.h("slot", { key: 'c6f8beea28cd847f8d8b7c7a075c774f58e39262', name: "before-text", ref: (el) => (this.beforeSlot = el), onSlotchange: () => this.checkContent() }), index.h("span", { key: 'be784ef977bc1d0eae2fd2d9377642636bd325bc', class: "content-overflow-wrapper" }, index.h("slot", { key: '3730f2902bcae7917979dedd91264670fbff00de', ref: (el) => (this.defaultSlot = el), onSlotchange: () => this.checkContent() })), index.h("slot", { key: 'f827a03e407385c7bdfd483073453d97f6f73afb', name: "after-text", ref: (el) => (this.afterSlot = el), onSlotchange: () => this.checkContent() })));
14
70
  }
71
+ static get watchers() { return {
72
+ "type": [{
73
+ "normalizeType": 0
74
+ }],
75
+ "size": [{
76
+ "normalizeSize": 0
77
+ }]
78
+ }; }
15
79
  };
16
80
  LmvzChip.style = lmvzChipCss();
17
81
 
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["lmvz-header_2.cjs",[[769,"lmvz-header",{"role":[2561],"lmvzActiveNav":[1,"lmvz-active-nav"]},null,{"lmvzActiveNav":[{"handleActiveNavChange":0}]}],[774,"lmvz-menuitem",{"role":[2561],"ti":[2562,"tabindex"]}]]],["lmvz-action.cjs",[[257,"lmvz-action"]]],["lmvz-button.cjs",[[785,"lmvz-button",{"ti":[2562,"tabindex"],"scale":[513],"variant":[513],"disabled":[516],"type":[1],"form":[1]}]]],["lmvz-card.cjs",[[774,"lmvz-card",{"cardTitle":[1,"card-title"],"imageUrl":[1,"image-url"],"description":[1],"primaryActionLabel":[1,"primary-action-label"]}]]],["lmvz-chip.cjs",[[513,"lmvz-chip",{"text":[1]}]]],["lmvz-icon.cjs",[[514,"lmvz-icon",{"icon":[513],"weight":[513],"size":[513],"iconset":[513],"ariaLabel":[513,"aria-label"],"iconData":[32],"visible":[32]},null,{"icon":[{"loadIconPathData":0}],"iconset":[{"loadIconPathData":0}]}]]],["lmvz-input.cjs",[[838,"lmvz-input",{"value":[1025],"label":[1],"helperText":[1,"helper-text"],"placeholder":[1],"disabled":[516],"readonly":[516],"required":[516],"name":[1],"type":[1],"errorMessage":[1,"error-message"],"autocomplete":[1],"inputmode":[1],"autocorrect":[1],"autocapitalize":[1],"spellcheck":[4],"autofocus":[4],"minlength":[2],"maxlength":[2],"pattern":[1],"min":[8],"max":[8],"step":[8],"form":[1],"error":[6660],"nativeError":[32],"setValue":[64],"focusInput":[64],"blurInput":[64],"select":[64],"checkValidity":[64],"reportValidity":[64],"getInputElement":[64]},null,{"value":[{"handleValueChange":0}],"disabled":[{"handleDisabledChange":0}]}]]],["lmvz-menuitem.cjs",[[774,"lmvz-menuitem",{"role":[2561],"ti":[2562,"tabindex"]}]]],["lmvz-select.cjs",[[774,"lmvz-select",{"value":[1025],"label":[1],"helperText":[1,"helper-text"],"disabled":[516],"required":[516],"name":[1],"selectedLabel":[32]},null,{"value":[{"handleValueChange":0}]}]]]], options);
22
+ return index.bootstrapLazy([["lmvz-header_2.cjs",[[769,"lmvz-header",{"role":[2561],"lmvzActiveNav":[1,"lmvz-active-nav"]},null,{"lmvzActiveNav":[{"handleActiveNavChange":0}]}],[774,"lmvz-menuitem",{"role":[2561],"ti":[2562,"tabindex"]}]]],["lmvz-action.cjs",[[257,"lmvz-action"]]],["lmvz-button.cjs",[[785,"lmvz-button",{"ti":[2562,"tabindex"],"scale":[513],"variant":[513],"disabled":[516],"type":[1],"form":[1]}]]],["lmvz-card.cjs",[[774,"lmvz-card",{"cardTitle":[1,"card-title"],"imageUrl":[1,"image-url"],"description":[1],"primaryActionLabel":[1,"primary-action-label"]}]]],["lmvz-chip.cjs",[[769,"lmvz-chip",{"type":[1537],"size":[1537]},null,{"type":[{"normalizeType":0}],"size":[{"normalizeSize":0}]}]]],["lmvz-icon.cjs",[[514,"lmvz-icon",{"icon":[513],"weight":[513],"size":[513],"iconset":[513],"ariaLabel":[513,"aria-label"],"iconData":[32],"visible":[32]},null,{"icon":[{"loadIconPathData":0}],"iconset":[{"loadIconPathData":0}]}]]],["lmvz-input.cjs",[[838,"lmvz-input",{"value":[1025],"label":[1],"helperText":[1,"helper-text"],"placeholder":[1],"disabled":[516],"readonly":[516],"required":[516],"name":[1],"type":[1],"errorMessage":[1,"error-message"],"autocomplete":[1],"inputmode":[1],"autocorrect":[1],"autocapitalize":[1],"spellcheck":[4],"autofocus":[4],"minlength":[2],"maxlength":[2],"pattern":[1],"min":[8],"max":[8],"step":[8],"form":[1],"error":[6660],"nativeError":[32],"setValue":[64],"focusInput":[64],"blurInput":[64],"select":[64],"checkValidity":[64],"reportValidity":[64],"getInputElement":[64]},null,{"value":[{"handleValueChange":0}],"disabled":[{"handleDisabledChange":0}]}]]],["lmvz-menuitem.cjs",[[774,"lmvz-menuitem",{"role":[2561],"ti":[2562,"tabindex"]}]]],["lmvz-select.cjs",[[774,"lmvz-select",{"value":[1025],"label":[1],"helperText":[1,"helper-text"],"disabled":[516],"required":[516],"name":[1],"selectedLabel":[32]},null,{"value":[{"handleValueChange":0}]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-C2yDXRqP.js');
4
- var reactiveControllerHost = require('./reactive-controller-host-CtaVAiYJ.js');
4
+ var reactiveControllerHost = require('./reactive-controller-host-Bi9eu2bV.js');
5
5
  var component = require('./component-Csg9MtNK.js');
6
6
  var lmvzMenuitem_entry = require('./lmvz-menuitem.cjs.entry.js');
7
7
  require('./aria-loader-CfFuAbJn.js');
@@ -139,7 +139,7 @@ const LmvzHeader = class extends reactiveControllerHost.ReactiveControllerHost {
139
139
  }
140
140
  }
141
141
  render() {
142
- return (index.h(index.Host, { key: '96626b8d29cdefc8ed97a7bb68a689ff6155d2c7', onFocus: this.delegateFocus.bind(this) }, index.h("div", { key: '41ac004bdc6c2c6a1f8e3d293f6b0c3727c27aff', class: "brand" }, index.h("slot", { key: '8e33150a54c8b8070b22db51c8584e06dd06dd5c', name: "brand" }, index.h("img", { key: '889955c7335d64f2c8d0b2e032db3dd64a27cbd2', id: "fallback-logo-lmvz", src: logoSvg, alt: "Lehrmittelverlag Z\u00FCrich" }))), index.h("nav", { key: '37b6ef465d320c325e0c830bcc91ea3a575d2690', "aria-label": "Hauptnavigation" }, index.h("div", { key: '7a0ec1a78d6eee3b3e37f55f872806b0791c2156', role: "menubar", class: "primary-menubar" }, index.h("slot", { key: 'e0403633c6acd137c94b1552cc7f08e3549550d3', name: "nav-primary", ref: (el) => (this.primarySlot = el) }), index.h("div", { key: '4e377f38a0b94a766f9001174729e5763fa0a194', role: "menu", id: "nav-secondary", class: "secondary-menubar", hidden: !this.lmvzActiveNav, ref: (el) => (this.secondaryNav = el) }, index.h("slot", { key: '368e461f239498c706a3c9bb27a7b05de2b79cac', name: this.secondarySlotName, ref: (el) => (this.secondarySlot = el) })))), index.h("div", { key: '8ffaf8d6f1254644b48dc0a40b9f552339ecc690', class: "actions" }, index.h("slot", { key: '5b679885e4fa111d66e993458ab7f5092d8179d4', name: "actions" }))));
142
+ return (index.h(index.Host, { key: '74061d97a6d4cdec1f445a91b9e819bb12565681', onFocus: this.delegateFocus.bind(this) }, index.h("div", { key: 'af7f08ff48a20b7d36df5ee233da7027cd30a047', class: "brand" }, index.h("slot", { key: '46be4fcf2798ac374ac967bc2742260c4d7e082b', name: "brand" }, index.h("img", { key: '3ee79f9732758a6ca5dd6e8264c67707917b358b', id: "fallback-logo-lmvz", src: logoSvg, alt: "Lehrmittelverlag Z\u00FCrich" }))), index.h("nav", { key: '8f37883454544a384bb35a151c4e24bb12c35f40', "aria-label": "Hauptnavigation" }, index.h("div", { key: 'a3166ad7e924dd72148d05c01160c889c8f07529', role: "menubar", class: "primary-menubar" }, index.h("slot", { key: 'aa600791e4d8f3463fefbc3b366831e3b3a3eaac', name: "nav-primary", ref: (el) => (this.primarySlot = el) }), index.h("div", { key: '6471256967f4d14c454205a330b2a97ecfcad7a8', role: "menu", id: "nav-secondary", class: "secondary-menubar", hidden: !this.lmvzActiveNav, ref: (el) => (this.secondaryNav = el) }, index.h("slot", { key: '1b9b461b958e76184938a1c65d032b296894e2dd', name: this.secondarySlotName, ref: (el) => (this.secondarySlot = el) })))), index.h("div", { key: '019d87472272df09ce99eeed405771229f326f1a', class: "actions" }, index.h("slot", { key: '18035fb0a51a26c96dc687547d17d57118a88e87', name: "actions" }))));
143
143
  }
144
144
  static get watchers() { return {
145
145
  "lmvzActiveNav": [{
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-C2yDXRqP.js');
4
- var icons = require('./icons-swqMn6s2.js');
5
- var reactiveControllerHost = require('./reactive-controller-host-CtaVAiYJ.js');
6
- require('./logger-Bn2yoZGP.js');
4
+ var icons = require('./icons-Tg7ySOh-.js');
5
+ var logger = require('./logger-Bn2yoZGP.js');
6
+ var reactiveControllerHost = require('./reactive-controller-host-Bi9eu2bV.js');
7
7
  require('./aria-loader-CfFuAbJn.js');
8
8
 
9
- 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.72rem + 0.13vw, 0.88rem));height:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))}}[size='sm'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.84rem + 0.13vw, 1rem));height:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))}}[size='md'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem));height:var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))}}[size='lg'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.44rem + 0.26vw, 1.75rem));height:var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.44rem + 0.26vw, 1.75rem))}}[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
+ const lmvzIconCss = () => `.sc-lmvz-icon-h{--lmvz-icon-color:var(--lmvz-component-color, var(--lmvz-semantic-color-on-surface-input-primary, #000000));--lmvz-icon-size:var(--lmvz-component-size, var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)));display:inline-block;line-height:0;svg{display:block;height:var(--lmvz-icon-size);width:auto}svg path{stroke:var(--lmvz-icon-color);fill:none}}[size='xs'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))}}[size='sm'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))}}[size='md'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))}}[size='lg'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.44rem + 0.26vw, 1.75rem))}}[size='inherit'].sc-lmvz-icon-h{svg{height:var(--lmvz-component-size, 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)}}`;
10
10
 
11
11
  const LmvzIcon = class extends reactiveControllerHost.ReactiveControllerHost {
12
12
  intersectionObserver;
@@ -48,7 +48,7 @@ const LmvzIcon = class extends reactiveControllerHost.ReactiveControllerHost {
48
48
  return;
49
49
  }
50
50
  if (icons.isValidSVG(icon)) {
51
- this.iconData = icon;
51
+ this.iconData = await logger.runPromise(icons.createValidSVGString(icon));
52
52
  return;
53
53
  }
54
54
  this.iconData = await icons.resolveIconSvg({
@@ -62,7 +62,7 @@ const LmvzIcon = class extends reactiveControllerHost.ReactiveControllerHost {
62
62
  super.componentDidRender();
63
63
  }
64
64
  render() {
65
- return index.h(index.Host, { key: '6022ed0e30bcdd13455ccaae65784ac70abcb349', role: "img", "aria-hidden": `${this.ariaHidden}`, innerHTML: this.iconData });
65
+ return index.h(index.Host, { key: 'c1e952e00df287c66c49eb043408514c07c3dc39', role: "img", "aria-hidden": `${this.ariaHidden}`, innerHTML: this.iconData });
66
66
  }
67
67
  waitUntilVisible(callback, rootMargin = 50) {
68
68
  if (typeof window === 'undefined' || !window.IntersectionObserver) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  var index = require('./index-C2yDXRqP.js');
4
4
  var index$1 = require('./index-Bp6Dd2i1.js');
5
- var reactiveControllerHost = require('./reactive-controller-host-CtaVAiYJ.js');
5
+ var reactiveControllerHost = require('./reactive-controller-host-Bi9eu2bV.js');
6
6
  var component = require('./component-Csg9MtNK.js');
7
7
  require('./aria-loader-CfFuAbJn.js');
8
8
 
@@ -164,9 +164,9 @@ const LmvzInput = class extends reactiveControllerHost.ReactiveControllerHost {
164
164
  render() {
165
165
  const hasValue = Boolean(this.value);
166
166
  const shouldFloatLabel = hasValue || Boolean(this.placeholder);
167
- return (index.h("div", { key: '3f14adbe321717cdfe305dc623940acb8be194f8', class: index$1.classNames('input-container', {
167
+ return (index.h("div", { key: '22be29e5fcd4976fc6c4d125781be00acef0b359', class: index$1.classNames('input-container', {
168
168
  'interaction-filled': hasValue,
169
- }) }, index.h("div", { key: '2cc559cc0ff4da1f8418c510188bcbb93b42da02', class: "input-wrapper" }, index.h("slot", { key: 'b41a5179b6d8651a9b60777718f92b32f80fda89', name: "before-input" }), index.h("div", { key: '4ac81c8d277d6592e1d84f4b3abfffef03843a9c', class: "label-input-group" }, index.h("label", { key: '80b272c3b069a246dcbf26812d2281e436c6cdfa', htmlFor: this.inputId, class: index$1.classNames({ floating: shouldFloatLabel }) }, this.label, this.required && (index.h("span", { key: 'eb00d3be1a3eddd0661df74cfb2d4b95c75f5eea', class: "required-indicator", "aria-hidden": "true" }, ' ', "*"))), index.h("input", { key: '6192c875976e7d21003de29badabd5a910ed0c17', id: this.inputId, ref: (el) => (this.nativeInputElement = el), type: this.type, min: this.min, max: this.max, step: this.step, value: this.value, name: this.name, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, required: this.required, form: this.form, autocomplete: this.autocomplete, inputmode: this.inputmode, autocorrect: this.autocorrect, autocapitalize: this.autocapitalize, spellcheck: this.spellcheck, autofocus: this.autofocus, minlength: this.minlength, maxlength: this.maxlength, pattern: this.pattern, "aria-invalid": this.error ? 'true' : 'false', "aria-required": this.required ? 'true' : 'false', "aria-describedby": this.describedBy, "aria-errormessage": this.errorId, onInput: this.handleInput, onChange: this.handleChange, onFocus: this.handleFocus, onBlur: this.handleBlur })), index.h("slot", { key: '9a908984ecebead7f08bbd88ed57fa8f30a69b67', name: "after-input" })), index.h("div", { key: 'abe658929d955042358ff24ea2267ae5b7b3484d', id: this.helperId, role: "status" }, this.helperText || null), index.h("div", { key: '61c689c7d8ab3bbb7c62dc7a227c35441b4bbbd8', id: this.errorId, role: "alert" }, (this.showErrorMessage && this.errorMessage) || null)));
169
+ }) }, index.h("div", { key: 'ffeb620419316976e800b16b4a9fd9538f1efd26', class: "input-wrapper" }, index.h("slot", { key: '2a1a67f7fde0232b2bb5ce3cc228b869e5ac3516', name: "before-input" }), index.h("div", { key: '3bbe623cae67d376c60a28306164293a712b1bb5', class: "label-input-group" }, index.h("label", { key: 'c260b3eb249d5c785fe3b6e223c7428a8c147f50', htmlFor: this.inputId, class: index$1.classNames({ floating: shouldFloatLabel }) }, this.label, this.required && (index.h("span", { key: 'f43dd77efe7e319428dd72ec8933b7587635e767', class: "required-indicator", "aria-hidden": "true" }, ' ', "*"))), index.h("input", { key: 'eeb821a74a5ac7aab3fab65a48a37d21a22744e6', id: this.inputId, ref: (el) => (this.nativeInputElement = el), type: this.type, min: this.min, max: this.max, step: this.step, value: this.value, name: this.name, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, required: this.required, form: this.form, autocomplete: this.autocomplete, inputmode: this.inputmode, autocorrect: this.autocorrect, autocapitalize: this.autocapitalize, spellcheck: this.spellcheck, autofocus: this.autofocus, minlength: this.minlength, maxlength: this.maxlength, pattern: this.pattern, "aria-invalid": this.error ? 'true' : 'false', "aria-required": this.required ? 'true' : 'false', "aria-describedby": this.describedBy, "aria-errormessage": this.errorId, onInput: this.handleInput, onChange: this.handleChange, onFocus: this.handleFocus, onBlur: this.handleBlur })), index.h("slot", { key: 'dd36a212c05c43ab2a8249750c14a7475b6d65d3', name: "after-input" })), index.h("div", { key: 'c2aedd67036faf4d3dc459c3c1fab8d07ee5a991', id: this.helperId, role: "status" }, this.helperText || null), index.h("div", { key: '01d2a6d6df9b3804a595711c7b57b6177d311c39', id: this.errorId, role: "alert" }, (this.showErrorMessage && this.errorMessage) || null)));
170
170
  }
171
171
  static get formAssociated() { return true; }
172
172
  static get watchers() { return {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-C2yDXRqP.js');
4
- var reactiveControllerHost = require('./reactive-controller-host-CtaVAiYJ.js');
4
+ var reactiveControllerHost = require('./reactive-controller-host-Bi9eu2bV.js');
5
5
  var elementActivationController = require('./element-activation-controller-DC_6T0Rt.js');
6
6
  require('./aria-loader-CfFuAbJn.js');
7
7
 
@@ -28,7 +28,7 @@ const LmvzMenuItem = class extends reactiveControllerHost.ReactiveControllerHost
28
28
  this.addController(new elementActivationController.ElementActivationController(this));
29
29
  }
30
30
  render() {
31
- return (index.h(index.Host, { key: '1a37d2873a29c713cf95c60070c8dcf045c9f8fc' }, index.h("slot", { key: 'c6578bcfdb9f0cebad095d80f0ed63cf663bf91e', ref: (e) => (this.validationSlot = e) })));
31
+ return (index.h(index.Host, { key: '0878343aec1c98c16c073c6cdd3382ee5c980799' }, index.h("slot", { key: 'f7a87d4c9d786bb4686d406d4313e9b5d79701d6', ref: (e) => (this.validationSlot = e) })));
32
32
  }
33
33
  };
34
34
  LmvzMenuItem.style = lmvzMenuitemCss();