@lmvz-ds/components 0.18.2 → 0.20.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 (141) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +45 -100
  3. package/assets/icons/checkmark.svg +4 -0
  4. package/cjs/{aria-loader-CfFuAbJn.js → aria-loader-Cec1zR2g.js} +1 -1
  5. package/cjs/ds.constants-DSnxZ3ia.js +16 -0
  6. package/cjs/icons-BQASWgk-.js +80 -0
  7. package/cjs/{index--7IqZZqn.js → index-3g9Z9sfF.js} +765 -2854
  8. package/cjs/index.cjs.js +12 -12
  9. package/cjs/lmvz-button.cjs.entry.js +4 -4
  10. package/cjs/lmvz-card.cjs.entry.js +1 -1
  11. package/cjs/lmvz-checkbox.cjs.entry.js +113 -0
  12. package/cjs/lmvz-chip.cjs.entry.js +68 -4
  13. package/cjs/lmvz-components.cjs.js +1 -1
  14. package/cjs/lmvz-header_2.cjs.entry.js +3 -3
  15. package/cjs/lmvz-icon.cjs.entry.js +10 -8
  16. package/cjs/lmvz-input.cjs.entry.js +4 -4
  17. package/cjs/lmvz-menuitem.cjs.entry.js +4 -4
  18. package/cjs/lmvz-select.cjs.entry.js +3 -3
  19. package/cjs/loader.cjs.js +1 -1
  20. package/cjs/{logger-Bn2yoZGP.js → logger-DsM6xg6V.js} +3063 -833
  21. package/cjs/{reactive-controller-host-CtaVAiYJ.js → reactive-controller-host-BA4ZhjKA.js} +10 -10
  22. package/cjs/svg-BMBduILB.js +125 -0
  23. package/collection/api/ds.constants.js +2 -0
  24. package/collection/assets/icons/checkmark.svg +4 -0
  25. package/collection/collection-manifest.json +1 -0
  26. package/collection/components/lmvz-button/lmvz-button.css +1 -2
  27. package/collection/components/lmvz-button/lmvz-button.js +6 -3
  28. package/collection/components/lmvz-card/lmvz-card.css +1 -2
  29. package/collection/components/lmvz-checkbox/lmvz-checkbox.css +207 -0
  30. package/collection/components/lmvz-checkbox/lmvz-checkbox.js +424 -0
  31. package/collection/components/lmvz-chip/lmvz-chip.css +84 -1
  32. package/collection/components/lmvz-chip/lmvz-chip.js +110 -13
  33. package/collection/components/lmvz-header/lmvz-header.js +2 -2
  34. package/collection/components/lmvz-icon/lmvz-icon.css +11 -10
  35. package/collection/components/lmvz-icon/lmvz-icon.js +8 -7
  36. package/collection/components/lmvz-input/lmvz-input.js +4 -4
  37. package/collection/components/lmvz-menuitem/lmvz-menuitem.css +1 -1
  38. package/collection/components/lmvz-menuitem/lmvz-menuitem.js +11 -5
  39. package/collection/components/lmvz-select/lmvz-select.js +1 -1
  40. package/collection/index.js +1 -1
  41. package/collection/integration/header-integration/header-integration.js +1 -1
  42. package/collection/utils/aria/aria-validation-controller.js +1 -0
  43. package/collection/utils/icons/icons.js +2 -13
  44. package/collection/utils/icons/icons.unit.js +3 -15
  45. package/collection/utils/reactive-controller-host.js +9 -9
  46. package/components/index.d.ts +2 -0
  47. package/components/index.d.ts.bak +2 -0
  48. package/components/index.js +1 -1
  49. package/components/lmvz-button.js +1 -1
  50. package/components/lmvz-card.js +1 -1
  51. package/components/lmvz-checkbox.d.ts +11 -0
  52. package/components/lmvz-checkbox.d.ts.bak +11 -0
  53. package/components/lmvz-checkbox.js +1 -0
  54. package/components/lmvz-chip.js +1 -1
  55. package/components/lmvz-header.js +1 -1
  56. package/components/lmvz-icon.js +1 -1
  57. package/components/lmvz-input.js +1 -1
  58. package/components/lmvz-menuitem.js +1 -1
  59. package/components/lmvz-select.js +1 -1
  60. package/components/p-0s99QfRy.js +12 -0
  61. package/components/{p-CBLAeife.js → p-BuFx0tTm.js} +1 -1
  62. package/components/p-CGmJG63p.js +1 -0
  63. package/components/p-CcxjkCOx.js +1 -0
  64. package/components/{p-DQEkWkMh.js → p-DIrAQ4IB.js} +1 -1
  65. package/esm/{aria-loader-BF_AYtbb.js → aria-loader-BVolm0lC.js} +1 -1
  66. package/esm/ds.constants-Bmi89ll1.js +9 -0
  67. package/esm/icons-CmuFKDRz.js +75 -0
  68. package/esm/{index-7Ru1khgk.js → index-Dh_9sN0q.js} +389 -2478
  69. package/esm/index.js +5 -11
  70. package/esm/lmvz-button.entry.js +4 -4
  71. package/esm/lmvz-card.entry.js +1 -1
  72. package/esm/lmvz-checkbox.entry.js +111 -0
  73. package/esm/lmvz-chip.entry.js +69 -5
  74. package/esm/lmvz-components.js +1 -1
  75. package/esm/lmvz-header_2.entry.js +3 -3
  76. package/esm/lmvz-icon.entry.js +10 -8
  77. package/esm/lmvz-input.entry.js +4 -4
  78. package/esm/lmvz-menuitem.entry.js +4 -4
  79. package/esm/lmvz-select.entry.js +3 -3
  80. package/esm/loader.js +1 -1
  81. package/esm/{logger-fiRXhuXK.js → logger-CGmJG63p.js} +2870 -765
  82. package/esm/{reactive-controller-host-sR2jJxNG.js → reactive-controller-host-DHcPpJW7.js} +10 -10
  83. package/esm/svg-B2YoIRuh.js +121 -0
  84. package/hydrate/index.js +2383 -42
  85. package/hydrate/index.mjs +2383 -42
  86. package/lmvz-components/index.esm.js +1 -1
  87. package/lmvz-components/lmvz-components.esm.js +1 -1
  88. package/lmvz-components/{p-5aa17cd2.entry.js → p-0f7a4236.entry.js} +1 -1
  89. package/lmvz-components/p-0s99QfRy.js +12 -0
  90. package/lmvz-components/{p-30b99f11.entry.js → p-2f83d7a2.entry.js} +1 -1
  91. package/lmvz-components/{p-6dbb3f13.entry.js → p-32171f4f.entry.js} +1 -1
  92. package/lmvz-components/{p-59383f3a.entry.js → p-400b2318.entry.js} +1 -1
  93. package/lmvz-components/p-851969bd.entry.js +1 -0
  94. package/lmvz-components/p-9f9d845d.entry.js +1 -0
  95. package/lmvz-components/p-Bmi89ll1.js +1 -0
  96. package/lmvz-components/p-CFsC37ww.js +1 -0
  97. package/lmvz-components/p-CGmJG63p.js +1 -0
  98. package/lmvz-components/p-CcxjkCOx.js +1 -0
  99. package/lmvz-components/{p-Bkfdgg0T.js → p-GdMr6Qlp.js} +1 -1
  100. package/lmvz-components/p-a12f95da.entry.js +1 -0
  101. package/lmvz-components/{p-84267405.entry.js → p-ab4437dc.entry.js} +1 -1
  102. package/lmvz-components/{p-7a6bec13.entry.js → p-d0a0e206.entry.js} +1 -1
  103. package/lmvz-components/{p-B3dnXEPG.js → p-dhVSUYqd.js} +1 -1
  104. package/manifest.json +544 -28
  105. package/package.json +5 -1
  106. package/types/api/ds.constants.d.ts +6 -1
  107. package/types/components/lmvz-action/lmvz-action.d.ts +0 -1
  108. package/types/components/lmvz-button/lmvz-button.d.ts +0 -1
  109. package/types/components/lmvz-card/lmvz-card.d.ts +0 -1
  110. package/types/components/lmvz-checkbox/lmvz-checkbox.d.ts +39 -0
  111. package/types/components/lmvz-chip/lmvz-chip.d.ts +18 -3
  112. package/types/components/lmvz-header/lmvz-header.d.ts +0 -1
  113. package/types/components/lmvz-icon/lmvz-icon.d.ts +0 -1
  114. package/types/components/lmvz-input/lmvz-input.d.ts +0 -1
  115. package/types/components/lmvz-menuitem/lmvz-menuitem.d.ts +0 -1
  116. package/types/components/lmvz-select/lmvz-select.d.ts +0 -1
  117. package/types/components.d.ts +221 -12
  118. package/types/index.d.ts +1 -2
  119. package/types/utils/aria/aria-validation-controller.d.ts +1 -2
  120. package/types/utils/aria/element-activation-controller.d.ts +0 -1
  121. package/types/utils/aria/list-keyboard-controller.d.ts +0 -1
  122. package/types/utils/assets.d.ts +0 -1
  123. package/types/utils/component.d.ts +0 -1
  124. package/types/utils/environment.d.ts +0 -1
  125. package/types/utils/http.d.ts +0 -1
  126. package/types/utils/http.unit.d.ts +0 -1
  127. package/types/utils/icons/icons-registry.d.ts +0 -1
  128. package/types/utils/icons/icons.d.ts +0 -2
  129. package/types/utils/icons/icons.unit.d.ts +0 -1
  130. package/types/utils/icons/public.d.ts +0 -1
  131. package/types/utils/public.d.ts +0 -1
  132. package/types/utils/reactive-controller-host.d.ts +0 -1
  133. package/cjs/icons-swqMn6s2.js +0 -163
  134. package/components/p-DXOTa5VF.js +0 -12
  135. package/components/p-fiRXhuXK.js +0 -1
  136. package/esm/icons-Ca8oMiRa.js +0 -157
  137. package/lmvz-components/p-0a41cc24.entry.js +0 -1
  138. package/lmvz-components/p-5f150890.entry.js +0 -1
  139. package/lmvz-components/p-Bh2Epkwf.js +0 -1
  140. package/lmvz-components/p-DXOTa5VF.js +0 -12
  141. package/lmvz-components/p-fiRXhuXK.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @lmvz-ds/components
2
2
 
3
+ ## 0.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 9f1fe1e: Checkbox Komponente hinzugefügt
8
+
9
+ ### Patch Changes
10
+
11
+ - 8dac215: Farbfehler in <lmvz-menuitem> korrigiert (Regression)
12
+
13
+ ## 0.19.0
14
+
15
+ ### Minor Changes
16
+
17
+ - a71b037: Chip Komponente hinzugefügt
18
+
3
19
  ## 0.18.2
4
20
 
5
21
  ### 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,4 @@
1
+ <svg width="12" height="12" viewBox="0 0 24 24" fill="none"
2
+ xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">
3
+ <path d="M3.75 12.5625L8.83079 17.625L20.4375 6.375" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
4
+ </svg>
@@ -43,7 +43,7 @@ async function fetchRuntime() {
43
43
  if (state.runtime)
44
44
  return state.runtime;
45
45
  if (!state.loadPromise) {
46
- state.loadPromise = Promise.resolve().then(function () { return require('./index--7IqZZqn.js'); }).catch(() => null);
46
+ state.loadPromise = Promise.resolve().then(function () { return require('./index-3g9Z9sfF.js'); }).catch(() => null);
47
47
  }
48
48
  const runtime = await state.loadPromise;
49
49
  if (runtime) {
@@ -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;
@@ -0,0 +1,80 @@
1
+ 'use strict';
2
+
3
+ var svg = require('./svg-BMBduILB.js');
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
+
40
+ async function resolveIconSvg(options) {
41
+ const { icon, iconset } = options;
42
+ const iconSvg = await (async () => {
43
+ const provider = getRegisteredIconProvider(iconset);
44
+ if (!provider) {
45
+ console.warn(`No icon provider registered. Unable to resolve icon "${icon}"${iconset ? ` from set "${iconset}"` : ''}. Using default icon.`);
46
+ return;
47
+ }
48
+ try {
49
+ const resolved = await Promise.resolve(provider.resolve(icon));
50
+ if (!resolved?.svg) {
51
+ console.warn(`Icon "${icon}"${iconset ? ` from set "${iconset}"` : ''} not found in provider. Using default icon.`);
52
+ return;
53
+ }
54
+ const validated = svg.toValidSvgStringWithFallback(resolved.svg);
55
+ if (validated) {
56
+ return validated;
57
+ }
58
+ }
59
+ catch (error) {
60
+ console.error(`Error resolving icon "${icon}" with provider:`, error);
61
+ return;
62
+ }
63
+ return;
64
+ })();
65
+ if (iconSvg)
66
+ return iconSvg;
67
+ console.error(`Icon "${icon}" not found${iconset ? ` in set "${iconset}"` : ''}. Using default icon.`);
68
+ return svg.emptyDefaultSvg();
69
+ }
70
+ function typedIconFromSet(iconset, icon) {
71
+ return {
72
+ iconset,
73
+ icon,
74
+ };
75
+ }
76
+
77
+ exports.getRegisteredIconProvider = getRegisteredIconProvider;
78
+ exports.registerIconProvider = registerIconProvider;
79
+ exports.resolveIconSvg = resolveIconSvg;
80
+ exports.typedIconFromSet = typedIconFromSet;