@m3e/react 2.0.1 → 2.0.3

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 (202) hide show
  1. package/README.md +4 -0
  2. package/dist/all.js +13 -45
  3. package/dist/all.js.map +1 -1
  4. package/dist/all.min.js +2 -2
  5. package/dist/all.min.js.map +1 -1
  6. package/dist/app-bar.js +2 -34
  7. package/dist/app-bar.js.map +1 -1
  8. package/dist/app-bar.min.js +2 -2
  9. package/dist/app-bar.min.js.map +1 -1
  10. package/dist/autocomplete.js +2 -34
  11. package/dist/autocomplete.js.map +1 -1
  12. package/dist/autocomplete.min.js +2 -2
  13. package/dist/autocomplete.min.js.map +1 -1
  14. package/dist/avatar.js +2 -34
  15. package/dist/avatar.js.map +1 -1
  16. package/dist/avatar.min.js +2 -2
  17. package/dist/avatar.min.js.map +1 -1
  18. package/dist/badge.js +2 -34
  19. package/dist/badge.js.map +1 -1
  20. package/dist/badge.min.js +2 -2
  21. package/dist/badge.min.js.map +1 -1
  22. package/dist/bottom-sheet.js +1 -33
  23. package/dist/bottom-sheet.js.map +1 -1
  24. package/dist/bottom-sheet.min.js +2 -2
  25. package/dist/bottom-sheet.min.js.map +1 -1
  26. package/dist/button-group.js +2 -34
  27. package/dist/button-group.js.map +1 -1
  28. package/dist/button-group.min.js +2 -2
  29. package/dist/button-group.min.js.map +1 -1
  30. package/dist/button.js +2 -34
  31. package/dist/button.js.map +1 -1
  32. package/dist/button.min.js +2 -2
  33. package/dist/button.min.js.map +1 -1
  34. package/dist/card.js +2 -34
  35. package/dist/card.js.map +1 -1
  36. package/dist/card.min.js +2 -2
  37. package/dist/card.min.js.map +1 -1
  38. package/dist/checkbox.js +2 -34
  39. package/dist/checkbox.js.map +1 -1
  40. package/dist/checkbox.min.js +2 -2
  41. package/dist/checkbox.min.js.map +1 -1
  42. package/dist/chips.js +1 -33
  43. package/dist/chips.js.map +1 -1
  44. package/dist/chips.min.js +2 -2
  45. package/dist/chips.min.js.map +1 -1
  46. package/dist/core.js +1 -33
  47. package/dist/core.js.map +1 -1
  48. package/dist/core.min.js +2 -2
  49. package/dist/core.min.js.map +1 -1
  50. package/dist/dialog.js +2 -34
  51. package/dist/dialog.js.map +1 -1
  52. package/dist/dialog.min.js +2 -2
  53. package/dist/dialog.min.js.map +1 -1
  54. package/dist/divider.js +2 -34
  55. package/dist/divider.js.map +1 -1
  56. package/dist/divider.min.js +2 -2
  57. package/dist/divider.min.js.map +1 -1
  58. package/dist/drawer-container.js +2 -34
  59. package/dist/drawer-container.js.map +1 -1
  60. package/dist/drawer-container.min.js +2 -2
  61. package/dist/drawer-container.min.js.map +1 -1
  62. package/dist/expansion-panel.js +1 -33
  63. package/dist/expansion-panel.js.map +1 -1
  64. package/dist/expansion-panel.min.js +2 -2
  65. package/dist/expansion-panel.min.js.map +1 -1
  66. package/dist/fab-menu.js +1 -33
  67. package/dist/fab-menu.js.map +1 -1
  68. package/dist/fab-menu.min.js +2 -2
  69. package/dist/fab-menu.min.js.map +1 -1
  70. package/dist/fab.js +1 -33
  71. package/dist/fab.js.map +1 -1
  72. package/dist/fab.min.js +2 -2
  73. package/dist/fab.min.js.map +1 -1
  74. package/dist/form-field.js +1 -33
  75. package/dist/form-field.js.map +1 -1
  76. package/dist/form-field.min.js +2 -2
  77. package/dist/form-field.min.js.map +1 -1
  78. package/dist/heading.js +1 -33
  79. package/dist/heading.js.map +1 -1
  80. package/dist/heading.min.js +2 -2
  81. package/dist/heading.min.js.map +1 -1
  82. package/dist/icon-button.js +1 -33
  83. package/dist/icon-button.js.map +1 -1
  84. package/dist/icon-button.min.js +2 -2
  85. package/dist/icon-button.min.js.map +1 -1
  86. package/dist/icon.js +1 -33
  87. package/dist/icon.js.map +1 -1
  88. package/dist/icon.min.js +2 -2
  89. package/dist/icon.min.js.map +1 -1
  90. package/dist/index.js +0 -1
  91. package/dist/index.js.map +1 -1
  92. package/dist/list.js +1 -33
  93. package/dist/list.js.map +1 -1
  94. package/dist/list.min.js +2 -2
  95. package/dist/list.min.js.map +1 -1
  96. package/dist/loading-indicator.js +1 -33
  97. package/dist/loading-indicator.js.map +1 -1
  98. package/dist/loading-indicator.min.js +2 -2
  99. package/dist/loading-indicator.min.js.map +1 -1
  100. package/dist/menu.js +1 -33
  101. package/dist/menu.js.map +1 -1
  102. package/dist/menu.min.js +2 -2
  103. package/dist/menu.min.js.map +1 -1
  104. package/dist/nav-bar.js +1 -33
  105. package/dist/nav-bar.js.map +1 -1
  106. package/dist/nav-bar.min.js +2 -2
  107. package/dist/nav-bar.min.js.map +1 -1
  108. package/dist/nav-menu.js +1 -33
  109. package/dist/nav-menu.js.map +1 -1
  110. package/dist/nav-menu.min.js +2 -2
  111. package/dist/nav-menu.min.js.map +1 -1
  112. package/dist/nav-rail.js +1 -33
  113. package/dist/nav-rail.js.map +1 -1
  114. package/dist/nav-rail.min.js +2 -2
  115. package/dist/nav-rail.min.js.map +1 -1
  116. package/dist/option.js +1 -33
  117. package/dist/option.js.map +1 -1
  118. package/dist/option.min.js +2 -2
  119. package/dist/option.min.js.map +1 -1
  120. package/dist/paginator.js +0 -1
  121. package/dist/paginator.js.map +1 -1
  122. package/dist/paginator.min.js +2 -2
  123. package/dist/paginator.min.js.map +1 -1
  124. package/dist/progress-indicator.js +1 -33
  125. package/dist/progress-indicator.js.map +1 -1
  126. package/dist/progress-indicator.min.js +2 -2
  127. package/dist/progress-indicator.min.js.map +1 -1
  128. package/dist/radio-group.js +1 -33
  129. package/dist/radio-group.js.map +1 -1
  130. package/dist/radio-group.min.js +2 -2
  131. package/dist/radio-group.min.js.map +1 -1
  132. package/dist/segmented-button.js +1 -33
  133. package/dist/segmented-button.js.map +1 -1
  134. package/dist/segmented-button.min.js +2 -2
  135. package/dist/segmented-button.min.js.map +1 -1
  136. package/dist/select.js +1 -33
  137. package/dist/select.js.map +1 -1
  138. package/dist/select.min.js +2 -2
  139. package/dist/select.min.js.map +1 -1
  140. package/dist/shape.js +1 -33
  141. package/dist/shape.js.map +1 -1
  142. package/dist/shape.min.js +2 -2
  143. package/dist/shape.min.js.map +1 -1
  144. package/dist/slide-group.js +1 -33
  145. package/dist/slide-group.js.map +1 -1
  146. package/dist/slide-group.min.js +2 -2
  147. package/dist/slide-group.min.js.map +1 -1
  148. package/dist/slider.js +1 -33
  149. package/dist/slider.js.map +1 -1
  150. package/dist/slider.min.js +2 -2
  151. package/dist/slider.min.js.map +1 -1
  152. package/dist/snackbar.js +0 -1
  153. package/dist/snackbar.js.map +1 -1
  154. package/dist/snackbar.min.js +2 -2
  155. package/dist/split-button.js +1 -33
  156. package/dist/split-button.js.map +1 -1
  157. package/dist/split-button.min.js +2 -2
  158. package/dist/split-button.min.js.map +1 -1
  159. package/dist/src/app-bar/AppBar.d.ts +1 -1
  160. package/dist/src/autocomplete/Autocomplete.d.ts +1 -1
  161. package/dist/src/avatar/Avatar.d.ts +1 -1
  162. package/dist/src/badge/Badge.d.ts +1 -1
  163. package/dist/src/button/Button.d.ts +1 -1
  164. package/dist/src/button-group/ButtonGroup.d.ts +1 -1
  165. package/dist/src/card/Card.d.ts +1 -1
  166. package/dist/src/checkbox/Checkbox.d.ts +1 -1
  167. package/dist/src/dialog/Dialog.d.ts +1 -1
  168. package/dist/src/divider/Divider.d.ts +1 -1
  169. package/dist/src/drawer-container/DrawerContainer.d.ts +1 -1
  170. package/dist/stepper.js +1 -33
  171. package/dist/stepper.js.map +1 -1
  172. package/dist/stepper.min.js +2 -2
  173. package/dist/stepper.min.js.map +1 -1
  174. package/dist/switch.js +1 -33
  175. package/dist/switch.js.map +1 -1
  176. package/dist/switch.min.js +2 -2
  177. package/dist/switch.min.js.map +1 -1
  178. package/dist/tabs.js +1 -33
  179. package/dist/tabs.js.map +1 -1
  180. package/dist/tabs.min.js +2 -2
  181. package/dist/tabs.min.js.map +1 -1
  182. package/dist/textarea-autosize.js +1 -33
  183. package/dist/textarea-autosize.js.map +1 -1
  184. package/dist/textarea-autosize.min.js +2 -2
  185. package/dist/textarea-autosize.min.js.map +1 -1
  186. package/dist/theme.js +1 -33
  187. package/dist/theme.js.map +1 -1
  188. package/dist/theme.min.js +2 -2
  189. package/dist/theme.min.js.map +1 -1
  190. package/dist/toc.js +1 -33
  191. package/dist/toc.js.map +1 -1
  192. package/dist/toc.min.js +2 -2
  193. package/dist/toc.min.js.map +1 -1
  194. package/dist/toolbar.js +1 -33
  195. package/dist/toolbar.js.map +1 -1
  196. package/dist/toolbar.min.js +2 -2
  197. package/dist/toolbar.min.js.map +1 -1
  198. package/dist/tooltip.js +1 -33
  199. package/dist/tooltip.js.map +1 -1
  200. package/dist/tooltip.min.js +2 -2
  201. package/dist/tooltip.min.js.map +1 -1
  202. package/package.json +2 -2
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["throw new Error(\"This package has no default export. Use subpath imports like '@m3e/react/button'.\");\r\n"],"names":[],"mappings":";;;;;;;AAAA,MAAM,IAAI,KAAK,CAAC,mFAAmF,CAAC"}
1
+ {"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["throw new Error(\"This package has no default export. Use subpath imports like '@m3e/react/button'.\");\r\n"],"names":[],"mappings":";;;;;;AAAA,MAAM,IAAI,KAAK,CAAC,mFAAmF,CAAC"}
package/dist/list.js CHANGED
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  /**
3
2
  * @license MIT
4
3
  * Copyright (c) 2025 matraic
@@ -6,40 +5,9 @@
6
5
  */
7
6
 
8
7
  import React from 'react';
9
- import { createComponent as createComponent$1 } from '@lit/react';
8
+ import { createComponent } from '@lit/react';
10
9
  import { M3eActionListElement, M3eExpandableListItemElement, M3eListElement, M3eListActionElement, M3eListItemElement, M3eListOptionElement, M3eSelectionListElement } from '@m3e/web/list';
11
10
 
12
- /**
13
- * Creates an SSR-safe React component for a custom element. Properties are distinguished
14
- * from attributes automatically, and events can be configured so they are added
15
- * to the custom element as event listeners.
16
- *
17
- * @param options An options bag containing the parameters needed to generate a
18
- * wrapped web component.
19
- *
20
- * @param options.react The React module, typically imported from the `react`
21
- * npm package.
22
- * @param options.tagName The custom element tag name registered via
23
- * `customElements.define`.
24
- * @param options.elementClass The custom element class registered via
25
- * `customElements.define`.
26
- * @param options.events An object listing events to which the component can
27
- * listen. The object keys are the event property names passed in via React
28
- * props and the object values are the names of the corresponding events
29
- * generated by the custom element. For example, given `{onactivate:
30
- * 'activate'}` an event function may be passed via the component's `onactivate`
31
- * prop and will be called when the custom element fires its `activate` event.
32
- * @param options.displayName A React component display name, used in debugging
33
- * messages. Default value is inferred from the name of custom element class
34
- * registered via `customElements.define`.
35
- */
36
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
37
- function createComponent({ react, tagName, elementClass, events, displayName, }) {
38
- return typeof window !== "undefined"
39
- ? createComponent$1({ react, tagName, elementClass, events, displayName })
40
- : null;
41
- }
42
-
43
11
  /**
44
12
  * React binding for the `m3e-action-list` Web Component from `@m3e/web/list`.
45
13
  *
package/dist/list.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","sources":["../../src/utils/createComponent.ts","../../src/list/ActionList.ts","../../src/list/ExpandableListItem.ts","../../src/list/List.ts","../../src/list/ListAction.ts","../../src/list/ListItem.ts","../../src/list/ListOption.ts","../../src/list/SelectionList.ts"],"sourcesContent":["import { createComponent as createReactComponent, EventName, Options, ReactWebComponent } from \"@lit/react\";\r\n\r\ntype EventNames = Record<string, EventName | string>;\r\n\r\n/**\r\n * Creates an SSR-safe React component for a custom element. Properties are distinguished\r\n * from attributes automatically, and events can be configured so they are added\r\n * to the custom element as event listeners.\r\n *\r\n * @param options An options bag containing the parameters needed to generate a\r\n * wrapped web component.\r\n *\r\n * @param options.react The React module, typically imported from the `react`\r\n * npm package.\r\n * @param options.tagName The custom element tag name registered via\r\n * `customElements.define`.\r\n * @param options.elementClass The custom element class registered via\r\n * `customElements.define`.\r\n * @param options.events An object listing events to which the component can\r\n * listen. The object keys are the event property names passed in via React\r\n * props and the object values are the names of the corresponding events\r\n * generated by the custom element. For example, given `{onactivate:\r\n * 'activate'}` an event function may be passed via the component's `onactivate`\r\n * prop and will be called when the custom element fires its `activate` event.\r\n * @param options.displayName A React component display name, used in debugging\r\n * messages. Default value is inferred from the name of custom element class\r\n * registered via `customElements.define`.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\r\nexport function createComponent<I extends HTMLElement, E extends EventNames = {}>({\r\n react,\r\n tagName,\r\n elementClass,\r\n events,\r\n displayName,\r\n}: Options<I, E>): ReactWebComponent<I, E> {\r\n return typeof window !== \"undefined\"\r\n ? createReactComponent<I, E>({ react, tagName, elementClass, events, displayName })\r\n : <ReactWebComponent<I, E>>(<unknown>null);\r\n}\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eActionListElement } from \"@m3e/web/list\";\r\nexport type { M3eActionListElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-action-list` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-action-list>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-action-list>` instance for imperative access.\r\n *\r\n * See the `m3e-action-list` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eActionList = createComponent({\r\n tagName: \"m3e-action-list\",\r\n elementClass: M3eActionListElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eExpandableListItemElement } from \"@m3e/web/list\";\r\nexport type { M3eExpandableListItemElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-expandable-list-item` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-expandable-list-item>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-expandable-list-item>` instance for imperative access.\r\n *\r\n * See the `m3e-expandable-list-item` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eExpandableListItem = createComponent({\r\n tagName: \"m3e-expandable-list-item\",\r\n elementClass: M3eExpandableListItemElement,\r\n react: React,\r\n events: {\r\n onOpening: \"opening\",\r\n onOpened: \"opened\",\r\n onClosing: \"closing\",\r\n onClosed: \"closed\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eListElement } from \"@m3e/web/list\";\r\nexport type { ListVariant, M3eListElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-list` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-list>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-list>` instance for imperative access.\r\n *\r\n * See the `m3e-list` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eList = createComponent({\r\n tagName: \"m3e-list\",\r\n elementClass: M3eListElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eListActionElement } from \"@m3e/web/list\";\r\nexport type { M3eListActionElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-list-action` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-list-action>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-list-action>` instance for imperative access.\r\n *\r\n * See the `m3e-list-action` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eListAction = createComponent({\r\n tagName: \"m3e-list-action\",\r\n elementClass: M3eListActionElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eListItemElement } from \"@m3e/web/list\";\r\nexport type { M3eListItemElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-list-item` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-list-item>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-list-item>` instance for imperative access.\r\n *\r\n * See the `m3e-list-item` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eListItem = createComponent({\r\n tagName: \"m3e-list-item\",\r\n elementClass: M3eListItemElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eListOptionElement } from \"@m3e/web/list\";\r\nexport type { M3eListOptionElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-list-option` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-list-option>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-list-option>` instance for imperative access.\r\n *\r\n * See the `m3e-list-option` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eListOption = createComponent({\r\n tagName: \"m3e-list-option\",\r\n elementClass: M3eListOptionElement,\r\n react: React,\r\n events: {\r\n onInput: \"input\",\r\n onChange: \"change\",\r\n onClick: \"click\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eSelectionListElement } from \"@m3e/web/list\";\r\nexport type { M3eSelectionListElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-selection-list` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-selection-list>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-selection-list>` instance for imperative access.\r\n *\r\n * See the `m3e-selection-list` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eSelectionList = createComponent({\r\n tagName: \"m3e-selection-list\",\r\n elementClass: M3eSelectionListElement,\r\n react: React,\r\n events: {\r\n onInput: \"input\",\r\n onChange: \"change\",\r\n },\r\n});\r\n"],"names":["createReactComponent"],"mappings":";;;;;;;;;;;AAIA;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AACH;AACM,SAAU,eAAe,CAAmD,EAChF,KAAK,EACL,OAAO,EACP,YAAY,EACZ,MAAM,EACN,WAAW,GACG,EAAA;IACd,OAAO,OAAO,MAAM,KAAK;AACvB,UAAEA,iBAAoB,CAAO,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE;UAC7C,IAAK;AAC9C;;ACjCA;;;;;;;;;;;;AAYG;AACI,MAAM,aAAa,GAAG,eAAe,CAAC;AAC3C,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,YAAY,EAAE,oBAAoB;AAClC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA;;ACjBD;;;;;;;;;;;;AAYG;AACI,MAAM,qBAAqB,GAAG,eAAe,CAAC;AACnD,IAAA,OAAO,EAAE,0BAA0B;AACnC,IAAA,YAAY,EAAE,4BAA4B;AAC1C,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,SAAS,EAAE,SAAS;AACpB,QAAA,QAAQ,EAAE,QAAQ;AAClB,QAAA,SAAS,EAAE,SAAS;AACpB,QAAA,QAAQ,EAAE,QAAQ;AACnB,KAAA;AACF,CAAA;;ACvBD;;;;;;;;;;;;AAYG;AACI,MAAM,OAAO,GAAG,eAAe,CAAC;AACrC,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,YAAY,EAAE,cAAc;AAC5B,IAAA,KAAK,EAAE,KAAK;AACb,CAAA;;ACjBD;;;;;;;;;;;;AAYG;AACI,MAAM,aAAa,GAAG,eAAe,CAAC;AAC3C,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,YAAY,EAAE,oBAAoB;AAClC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,OAAO;AACjB,KAAA;AACF,CAAA;;ACpBD;;;;;;;;;;;;AAYG;AACI,MAAM,WAAW,GAAG,eAAe,CAAC;AACzC,IAAA,OAAO,EAAE,eAAe;AACxB,IAAA,YAAY,EAAE,kBAAkB;AAChC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA;;ACjBD;;;;;;;;;;;;AAYG;AACI,MAAM,aAAa,GAAG,eAAe,CAAC;AAC3C,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,YAAY,EAAE,oBAAoB;AAClC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,OAAO;AAChB,QAAA,QAAQ,EAAE,QAAQ;AAClB,QAAA,OAAO,EAAE,OAAO;AACjB,KAAA;AACF,CAAA;;ACtBD;;;;;;;;;;;;AAYG;AACI,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAC9C,IAAA,OAAO,EAAE,oBAAoB;AAC7B,IAAA,YAAY,EAAE,uBAAuB;AACrC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,OAAO;AAChB,QAAA,QAAQ,EAAE,QAAQ;AACnB,KAAA;AACF,CAAA;;;;"}
1
+ {"version":3,"file":"list.js","sources":["../../src/list/ActionList.ts","../../src/list/ExpandableListItem.ts","../../src/list/List.ts","../../src/list/ListAction.ts","../../src/list/ListItem.ts","../../src/list/ListOption.ts","../../src/list/SelectionList.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eActionListElement } from \"@m3e/web/list\";\r\nexport type { M3eActionListElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-action-list` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-action-list>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-action-list>` instance for imperative access.\r\n *\r\n * See the `m3e-action-list` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eActionList = createComponent({\r\n tagName: \"m3e-action-list\",\r\n elementClass: M3eActionListElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eExpandableListItemElement } from \"@m3e/web/list\";\r\nexport type { M3eExpandableListItemElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-expandable-list-item` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-expandable-list-item>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-expandable-list-item>` instance for imperative access.\r\n *\r\n * See the `m3e-expandable-list-item` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eExpandableListItem = createComponent({\r\n tagName: \"m3e-expandable-list-item\",\r\n elementClass: M3eExpandableListItemElement,\r\n react: React,\r\n events: {\r\n onOpening: \"opening\",\r\n onOpened: \"opened\",\r\n onClosing: \"closing\",\r\n onClosed: \"closed\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eListElement } from \"@m3e/web/list\";\r\nexport type { ListVariant, M3eListElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-list` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-list>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-list>` instance for imperative access.\r\n *\r\n * See the `m3e-list` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eList = createComponent({\r\n tagName: \"m3e-list\",\r\n elementClass: M3eListElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eListActionElement } from \"@m3e/web/list\";\r\nexport type { M3eListActionElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-list-action` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-list-action>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-list-action>` instance for imperative access.\r\n *\r\n * See the `m3e-list-action` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eListAction = createComponent({\r\n tagName: \"m3e-list-action\",\r\n elementClass: M3eListActionElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eListItemElement } from \"@m3e/web/list\";\r\nexport type { M3eListItemElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-list-item` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-list-item>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-list-item>` instance for imperative access.\r\n *\r\n * See the `m3e-list-item` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eListItem = createComponent({\r\n tagName: \"m3e-list-item\",\r\n elementClass: M3eListItemElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eListOptionElement } from \"@m3e/web/list\";\r\nexport type { M3eListOptionElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-list-option` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-list-option>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-list-option>` instance for imperative access.\r\n *\r\n * See the `m3e-list-option` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eListOption = createComponent({\r\n tagName: \"m3e-list-option\",\r\n elementClass: M3eListOptionElement,\r\n react: React,\r\n events: {\r\n onInput: \"input\",\r\n onChange: \"change\",\r\n onClick: \"click\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eSelectionListElement } from \"@m3e/web/list\";\r\nexport type { M3eSelectionListElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-selection-list` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-selection-list>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-selection-list>` instance for imperative access.\r\n *\r\n * See the `m3e-selection-list` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eSelectionList = createComponent({\r\n tagName: \"m3e-selection-list\",\r\n elementClass: M3eSelectionListElement,\r\n react: React,\r\n events: {\r\n onInput: \"input\",\r\n onChange: \"change\",\r\n },\r\n});\r\n"],"names":[],"mappings":";;;;;;;;;;AAMA;;;;;;;;;;;;AAYG;AACI,MAAM,aAAa,GAAG,eAAe,CAAC;AAC3C,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,YAAY,EAAE,oBAAoB;AAClC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA;;ACjBD;;;;;;;;;;;;AAYG;AACI,MAAM,qBAAqB,GAAG,eAAe,CAAC;AACnD,IAAA,OAAO,EAAE,0BAA0B;AACnC,IAAA,YAAY,EAAE,4BAA4B;AAC1C,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,SAAS,EAAE,SAAS;AACpB,QAAA,QAAQ,EAAE,QAAQ;AAClB,QAAA,SAAS,EAAE,SAAS;AACpB,QAAA,QAAQ,EAAE,QAAQ;AACnB,KAAA;AACF,CAAA;;ACvBD;;;;;;;;;;;;AAYG;AACI,MAAM,OAAO,GAAG,eAAe,CAAC;AACrC,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,YAAY,EAAE,cAAc;AAC5B,IAAA,KAAK,EAAE,KAAK;AACb,CAAA;;ACjBD;;;;;;;;;;;;AAYG;AACI,MAAM,aAAa,GAAG,eAAe,CAAC;AAC3C,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,YAAY,EAAE,oBAAoB;AAClC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,OAAO;AACjB,KAAA;AACF,CAAA;;ACpBD;;;;;;;;;;;;AAYG;AACI,MAAM,WAAW,GAAG,eAAe,CAAC;AACzC,IAAA,OAAO,EAAE,eAAe;AACxB,IAAA,YAAY,EAAE,kBAAkB;AAChC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA;;ACjBD;;;;;;;;;;;;AAYG;AACI,MAAM,aAAa,GAAG,eAAe,CAAC;AAC3C,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,YAAY,EAAE,oBAAoB;AAClC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,OAAO;AAChB,QAAA,QAAQ,EAAE,QAAQ;AAClB,QAAA,OAAO,EAAE,OAAO;AACjB,KAAA;AACF,CAAA;;ACtBD;;;;;;;;;;;;AAYG;AACI,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAC9C,IAAA,OAAO,EAAE,oBAAoB;AAC7B,IAAA,YAAY,EAAE,uBAAuB;AACrC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,OAAO;AAChB,QAAA,QAAQ,EAAE,QAAQ;AACnB,KAAA;AACF,CAAA;;;;"}
package/dist/list.min.js CHANGED
@@ -1,7 +1,7 @@
1
- "use client";
2
1
  /**
3
2
  * @license MIT
4
3
  * Copyright (c) 2025 matraic
5
4
  * See LICENSE file in the project root for full license text.
6
- */import e from"react";import{createComponent as t}from"@lit/react";import{M3eActionListElement as n,M3eExpandableListItemElement as a,M3eListElement as l,M3eListActionElement as s,M3eListItemElement as m,M3eListOptionElement as i,M3eSelectionListElement as o}from"@m3e/web/list";function c({react:e,tagName:n,elementClass:a,events:l,displayName:s}){return"undefined"!=typeof window?t({react:e,tagName:n,elementClass:a,events:l,displayName:s}):null}const r=c({tagName:"m3e-action-list",elementClass:n,react:e}),p=c({tagName:"m3e-expandable-list-item",elementClass:a,react:e,events:{onOpening:"opening",onOpened:"opened",onClosing:"closing",onClosed:"closed"}}),g=c({tagName:"m3e-list",elementClass:l,react:e}),C=c({tagName:"m3e-list-action",elementClass:s,react:e,events:{onClick:"click"}}),N=c({tagName:"m3e-list-item",elementClass:m,react:e}),d=c({tagName:"m3e-list-option",elementClass:i,react:e,events:{onInput:"input",onChange:"change",onClick:"click"}}),u=c({tagName:"m3e-selection-list",elementClass:o,react:e,events:{onInput:"input",onChange:"change"}});export{r as M3eActionList,p as M3eExpandableListItem,g as M3eList,C as M3eListAction,N as M3eListItem,d as M3eListOption,u as M3eSelectionList};
5
+ */
6
+ import e from"react";import{createComponent as t}from"@lit/react";import{M3eActionListElement as n,M3eExpandableListItemElement as a,M3eListElement as l,M3eListActionElement as s,M3eListItemElement as m,M3eListOptionElement as o,M3eSelectionListElement as i}from"@m3e/web/list";const c=t({tagName:"m3e-action-list",elementClass:n,react:e}),r=t({tagName:"m3e-expandable-list-item",elementClass:a,react:e,events:{onOpening:"opening",onOpened:"opened",onClosing:"closing",onClosed:"closed"}}),g=t({tagName:"m3e-list",elementClass:l,react:e}),p=t({tagName:"m3e-list-action",elementClass:s,react:e,events:{onClick:"click"}}),C=t({tagName:"m3e-list-item",elementClass:m,react:e}),N=t({tagName:"m3e-list-option",elementClass:o,react:e,events:{onInput:"input",onChange:"change",onClick:"click"}}),d=t({tagName:"m3e-selection-list",elementClass:i,react:e,events:{onInput:"input",onChange:"change"}});export{c as M3eActionList,r as M3eExpandableListItem,g as M3eList,p as M3eListAction,C as M3eListItem,N as M3eListOption,d as M3eSelectionList};
7
7
  //# sourceMappingURL=list.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.min.js","sources":["../../src/utils/createComponent.ts","../../src/list/ActionList.ts","../../src/list/ExpandableListItem.ts","../../src/list/List.ts","../../src/list/ListAction.ts","../../src/list/ListItem.ts","../../src/list/ListOption.ts","../../src/list/SelectionList.ts"],"sourcesContent":["import { createComponent as createReactComponent, EventName, Options, ReactWebComponent } from \"@lit/react\";\r\n\r\ntype EventNames = Record<string, EventName | string>;\r\n\r\n/**\r\n * Creates an SSR-safe React component for a custom element. Properties are distinguished\r\n * from attributes automatically, and events can be configured so they are added\r\n * to the custom element as event listeners.\r\n *\r\n * @param options An options bag containing the parameters needed to generate a\r\n * wrapped web component.\r\n *\r\n * @param options.react The React module, typically imported from the `react`\r\n * npm package.\r\n * @param options.tagName The custom element tag name registered via\r\n * `customElements.define`.\r\n * @param options.elementClass The custom element class registered via\r\n * `customElements.define`.\r\n * @param options.events An object listing events to which the component can\r\n * listen. The object keys are the event property names passed in via React\r\n * props and the object values are the names of the corresponding events\r\n * generated by the custom element. For example, given `{onactivate:\r\n * 'activate'}` an event function may be passed via the component's `onactivate`\r\n * prop and will be called when the custom element fires its `activate` event.\r\n * @param options.displayName A React component display name, used in debugging\r\n * messages. Default value is inferred from the name of custom element class\r\n * registered via `customElements.define`.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\r\nexport function createComponent<I extends HTMLElement, E extends EventNames = {}>({\r\n react,\r\n tagName,\r\n elementClass,\r\n events,\r\n displayName,\r\n}: Options<I, E>): ReactWebComponent<I, E> {\r\n return typeof window !== \"undefined\"\r\n ? createReactComponent<I, E>({ react, tagName, elementClass, events, displayName })\r\n : <ReactWebComponent<I, E>>(<unknown>null);\r\n}\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eActionListElement } from \"@m3e/web/list\";\r\nexport type { M3eActionListElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-action-list` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-action-list>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-action-list>` instance for imperative access.\r\n *\r\n * See the `m3e-action-list` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eActionList = createComponent({\r\n tagName: \"m3e-action-list\",\r\n elementClass: M3eActionListElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eExpandableListItemElement } from \"@m3e/web/list\";\r\nexport type { M3eExpandableListItemElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-expandable-list-item` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-expandable-list-item>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-expandable-list-item>` instance for imperative access.\r\n *\r\n * See the `m3e-expandable-list-item` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eExpandableListItem = createComponent({\r\n tagName: \"m3e-expandable-list-item\",\r\n elementClass: M3eExpandableListItemElement,\r\n react: React,\r\n events: {\r\n onOpening: \"opening\",\r\n onOpened: \"opened\",\r\n onClosing: \"closing\",\r\n onClosed: \"closed\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eListElement } from \"@m3e/web/list\";\r\nexport type { ListVariant, M3eListElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-list` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-list>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-list>` instance for imperative access.\r\n *\r\n * See the `m3e-list` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eList = createComponent({\r\n tagName: \"m3e-list\",\r\n elementClass: M3eListElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eListActionElement } from \"@m3e/web/list\";\r\nexport type { M3eListActionElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-list-action` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-list-action>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-list-action>` instance for imperative access.\r\n *\r\n * See the `m3e-list-action` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eListAction = createComponent({\r\n tagName: \"m3e-list-action\",\r\n elementClass: M3eListActionElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eListItemElement } from \"@m3e/web/list\";\r\nexport type { M3eListItemElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-list-item` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-list-item>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-list-item>` instance for imperative access.\r\n *\r\n * See the `m3e-list-item` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eListItem = createComponent({\r\n tagName: \"m3e-list-item\",\r\n elementClass: M3eListItemElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eListOptionElement } from \"@m3e/web/list\";\r\nexport type { M3eListOptionElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-list-option` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-list-option>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-list-option>` instance for imperative access.\r\n *\r\n * See the `m3e-list-option` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eListOption = createComponent({\r\n tagName: \"m3e-list-option\",\r\n elementClass: M3eListOptionElement,\r\n react: React,\r\n events: {\r\n onInput: \"input\",\r\n onChange: \"change\",\r\n onClick: \"click\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eSelectionListElement } from \"@m3e/web/list\";\r\nexport type { M3eSelectionListElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-selection-list` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-selection-list>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-selection-list>` instance for imperative access.\r\n *\r\n * See the `m3e-selection-list` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eSelectionList = createComponent({\r\n tagName: \"m3e-selection-list\",\r\n elementClass: M3eSelectionListElement,\r\n react: React,\r\n events: {\r\n onInput: \"input\",\r\n onChange: \"change\",\r\n },\r\n});\r\n"],"names":["createComponent","react","tagName","elementClass","events","displayName","window","createReactComponent","M3eActionList","M3eActionListElement","React","M3eExpandableListItem","M3eExpandableListItemElement","onOpening","onOpened","onClosing","onClosed","M3eList","M3eListElement","M3eListAction","M3eListActionElement","onClick","M3eListItem","M3eListItemElement","M3eListOption","M3eListOptionElement","onInput","onChange","M3eSelectionList","M3eSelectionListElement"],"mappings":";;;;;yRA6BM,SAAUA,GAAkEC,MAChFA,EAAKC,QACLA,EAAOC,aACPA,EAAYC,OACZA,EAAMC,YACNA,IAEA,MAAyB,oBAAXC,OACVC,EAA2B,CAAEN,QAAOC,UAASC,eAAcC,SAAQC,gBAChC,IACzC,CCpBO,MAAMG,EAAgBR,EAAgB,CAC3CE,QAAS,kBACTC,aAAcM,EACdR,MAAOS,ICHIC,EAAwBX,EAAgB,CACnDE,QAAS,2BACTC,aAAcS,EACdX,MAAOS,EACPN,OAAQ,CACNS,UAAW,UACXC,SAAU,SACVC,UAAW,UACXC,SAAU,YCRDC,EAAUjB,EAAgB,CACrCE,QAAS,WACTC,aAAce,EACdjB,MAAOS,ICHIS,EAAgBnB,EAAgB,CAC3CE,QAAS,kBACTC,aAAciB,EACdnB,MAAOS,EACPN,OAAQ,CACNiB,QAAS,WCLAC,EAActB,EAAgB,CACzCE,QAAS,gBACTC,aAAcoB,EACdtB,MAAOS,ICHIc,EAAgBxB,EAAgB,CAC3CE,QAAS,kBACTC,aAAcsB,EACdxB,MAAOS,EACPN,OAAQ,CACNsB,QAAS,QACTC,SAAU,SACVN,QAAS,WCPAO,EAAmB5B,EAAgB,CAC9CE,QAAS,qBACTC,aAAc0B,EACd5B,MAAOS,EACPN,OAAQ,CACNsB,QAAS,QACTC,SAAU"}
1
+ {"version":3,"file":"list.min.js","sources":["../../src/list/ActionList.ts","../../src/list/ExpandableListItem.ts","../../src/list/List.ts","../../src/list/ListAction.ts","../../src/list/ListItem.ts","../../src/list/ListOption.ts","../../src/list/SelectionList.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eActionListElement } from \"@m3e/web/list\";\r\nexport type { M3eActionListElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-action-list` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-action-list>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-action-list>` instance for imperative access.\r\n *\r\n * See the `m3e-action-list` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eActionList = createComponent({\r\n tagName: \"m3e-action-list\",\r\n elementClass: M3eActionListElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eExpandableListItemElement } from \"@m3e/web/list\";\r\nexport type { M3eExpandableListItemElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-expandable-list-item` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-expandable-list-item>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-expandable-list-item>` instance for imperative access.\r\n *\r\n * See the `m3e-expandable-list-item` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eExpandableListItem = createComponent({\r\n tagName: \"m3e-expandable-list-item\",\r\n elementClass: M3eExpandableListItemElement,\r\n react: React,\r\n events: {\r\n onOpening: \"opening\",\r\n onOpened: \"opened\",\r\n onClosing: \"closing\",\r\n onClosed: \"closed\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eListElement } from \"@m3e/web/list\";\r\nexport type { ListVariant, M3eListElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-list` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-list>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-list>` instance for imperative access.\r\n *\r\n * See the `m3e-list` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eList = createComponent({\r\n tagName: \"m3e-list\",\r\n elementClass: M3eListElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eListActionElement } from \"@m3e/web/list\";\r\nexport type { M3eListActionElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-list-action` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-list-action>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-list-action>` instance for imperative access.\r\n *\r\n * See the `m3e-list-action` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eListAction = createComponent({\r\n tagName: \"m3e-list-action\",\r\n elementClass: M3eListActionElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eListItemElement } from \"@m3e/web/list\";\r\nexport type { M3eListItemElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-list-item` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-list-item>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-list-item>` instance for imperative access.\r\n *\r\n * See the `m3e-list-item` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eListItem = createComponent({\r\n tagName: \"m3e-list-item\",\r\n elementClass: M3eListItemElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eListOptionElement } from \"@m3e/web/list\";\r\nexport type { M3eListOptionElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-list-option` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-list-option>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-list-option>` instance for imperative access.\r\n *\r\n * See the `m3e-list-option` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eListOption = createComponent({\r\n tagName: \"m3e-list-option\",\r\n elementClass: M3eListOptionElement,\r\n react: React,\r\n events: {\r\n onInput: \"input\",\r\n onChange: \"change\",\r\n onClick: \"click\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eSelectionListElement } from \"@m3e/web/list\";\r\nexport type { M3eSelectionListElement } from \"@m3e/web/list\";\r\n\r\n/**\r\n * React binding for the `m3e-selection-list` Web Component from `@m3e/web/list`.\r\n *\r\n * This component renders the underlying `<m3e-selection-list>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-selection-list>` instance for imperative access.\r\n *\r\n * See the `m3e-selection-list` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eSelectionList = createComponent({\r\n tagName: \"m3e-selection-list\",\r\n elementClass: M3eSelectionListElement,\r\n react: React,\r\n events: {\r\n onInput: \"input\",\r\n onChange: \"change\",\r\n },\r\n});\r\n"],"names":["M3eActionList","createComponent","tagName","elementClass","M3eActionListElement","react","React","M3eExpandableListItem","M3eExpandableListItemElement","events","onOpening","onOpened","onClosing","onClosed","M3eList","M3eListElement","M3eListAction","M3eListActionElement","onClick","M3eListItem","M3eListItemElement","M3eListOption","M3eListOptionElement","onInput","onChange","M3eSelectionList","M3eSelectionListElement"],"mappings":";;;;;sRAmBO,MAAMA,EAAgBC,EAAgB,CAC3CC,QAAS,kBACTC,aAAcC,EACdC,MAAOC,ICHIC,EAAwBN,EAAgB,CACnDC,QAAS,2BACTC,aAAcK,EACdH,MAAOC,EACPG,OAAQ,CACNC,UAAW,UACXC,SAAU,SACVC,UAAW,UACXC,SAAU,YCRDC,EAAUb,EAAgB,CACrCC,QAAS,WACTC,aAAcY,EACdV,MAAOC,ICHIU,EAAgBf,EAAgB,CAC3CC,QAAS,kBACTC,aAAcc,EACdZ,MAAOC,EACPG,OAAQ,CACNS,QAAS,WCLAC,EAAclB,EAAgB,CACzCC,QAAS,gBACTC,aAAciB,EACdf,MAAOC,ICHIe,EAAgBpB,EAAgB,CAC3CC,QAAS,kBACTC,aAAcmB,EACdjB,MAAOC,EACPG,OAAQ,CACNc,QAAS,QACTC,SAAU,SACVN,QAAS,WCPAO,EAAmBxB,EAAgB,CAC9CC,QAAS,qBACTC,aAAcuB,EACdrB,MAAOC,EACPG,OAAQ,CACNc,QAAS,QACTC,SAAU"}
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  /**
3
2
  * @license MIT
4
3
  * Copyright (c) 2025 matraic
@@ -6,40 +5,9 @@
6
5
  */
7
6
 
8
7
  import React from 'react';
9
- import { createComponent as createComponent$1 } from '@lit/react';
8
+ import { createComponent } from '@lit/react';
10
9
  import { M3eLoadingIndicatorElement } from '@m3e/web/loading-indicator';
11
10
 
12
- /**
13
- * Creates an SSR-safe React component for a custom element. Properties are distinguished
14
- * from attributes automatically, and events can be configured so they are added
15
- * to the custom element as event listeners.
16
- *
17
- * @param options An options bag containing the parameters needed to generate a
18
- * wrapped web component.
19
- *
20
- * @param options.react The React module, typically imported from the `react`
21
- * npm package.
22
- * @param options.tagName The custom element tag name registered via
23
- * `customElements.define`.
24
- * @param options.elementClass The custom element class registered via
25
- * `customElements.define`.
26
- * @param options.events An object listing events to which the component can
27
- * listen. The object keys are the event property names passed in via React
28
- * props and the object values are the names of the corresponding events
29
- * generated by the custom element. For example, given `{onactivate:
30
- * 'activate'}` an event function may be passed via the component's `onactivate`
31
- * prop and will be called when the custom element fires its `activate` event.
32
- * @param options.displayName A React component display name, used in debugging
33
- * messages. Default value is inferred from the name of custom element class
34
- * registered via `customElements.define`.
35
- */
36
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
37
- function createComponent({ react, tagName, elementClass, events, displayName, }) {
38
- return typeof window !== "undefined"
39
- ? createComponent$1({ react, tagName, elementClass, events, displayName })
40
- : null;
41
- }
42
-
43
11
  /**
44
12
  * React binding for the `m3e-loading-indicator` Web Component from `@m3e/web/loading-indicator`.
45
13
  *
@@ -1 +1 @@
1
- {"version":3,"file":"loading-indicator.js","sources":["../../src/utils/createComponent.ts","../../src/loading-indicator/LoadingIndicator.ts"],"sourcesContent":["import { createComponent as createReactComponent, EventName, Options, ReactWebComponent } from \"@lit/react\";\r\n\r\ntype EventNames = Record<string, EventName | string>;\r\n\r\n/**\r\n * Creates an SSR-safe React component for a custom element. Properties are distinguished\r\n * from attributes automatically, and events can be configured so they are added\r\n * to the custom element as event listeners.\r\n *\r\n * @param options An options bag containing the parameters needed to generate a\r\n * wrapped web component.\r\n *\r\n * @param options.react The React module, typically imported from the `react`\r\n * npm package.\r\n * @param options.tagName The custom element tag name registered via\r\n * `customElements.define`.\r\n * @param options.elementClass The custom element class registered via\r\n * `customElements.define`.\r\n * @param options.events An object listing events to which the component can\r\n * listen. The object keys are the event property names passed in via React\r\n * props and the object values are the names of the corresponding events\r\n * generated by the custom element. For example, given `{onactivate:\r\n * 'activate'}` an event function may be passed via the component's `onactivate`\r\n * prop and will be called when the custom element fires its `activate` event.\r\n * @param options.displayName A React component display name, used in debugging\r\n * messages. Default value is inferred from the name of custom element class\r\n * registered via `customElements.define`.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\r\nexport function createComponent<I extends HTMLElement, E extends EventNames = {}>({\r\n react,\r\n tagName,\r\n elementClass,\r\n events,\r\n displayName,\r\n}: Options<I, E>): ReactWebComponent<I, E> {\r\n return typeof window !== \"undefined\"\r\n ? createReactComponent<I, E>({ react, tagName, elementClass, events, displayName })\r\n : <ReactWebComponent<I, E>>(<unknown>null);\r\n}\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eLoadingIndicatorElement } from \"@m3e/web/loading-indicator\";\r\nexport type { LoadingIndicatorVariant, M3eLoadingIndicatorElement } from \"@m3e/web/loading-indicator\";\r\n\r\n/**\r\n * React binding for the `m3e-loading-indicator` Web Component from `@m3e/web/loading-indicator`.\r\n *\r\n * This component renders the underlying `<m3e-loading-indicator>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-loading-indicator>` instance for imperative access.\r\n *\r\n * See the `m3e-loading-indicator` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eLoadingIndicator = createComponent({\r\n tagName: \"m3e-loading-indicator\",\r\n elementClass: M3eLoadingIndicatorElement,\r\n react: React,\r\n});\r\n"],"names":["createReactComponent"],"mappings":";;;;;;;;;;;AAIA;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AACH;AACM,SAAU,eAAe,CAAmD,EAChF,KAAK,EACL,OAAO,EACP,YAAY,EACZ,MAAM,EACN,WAAW,GACG,EAAA;IACd,OAAO,OAAO,MAAM,KAAK;AACvB,UAAEA,iBAAoB,CAAO,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE;UAC7C,IAAK;AAC9C;;ACjCA;;;;;;;;;;;;AAYG;AACI,MAAM,mBAAmB,GAAG,eAAe,CAAC;AACjD,IAAA,OAAO,EAAE,uBAAuB;AAChC,IAAA,YAAY,EAAE,0BAA0B;AACxC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA;;;;"}
1
+ {"version":3,"file":"loading-indicator.js","sources":["../../src/loading-indicator/LoadingIndicator.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eLoadingIndicatorElement } from \"@m3e/web/loading-indicator\";\r\nexport type { LoadingIndicatorVariant, M3eLoadingIndicatorElement } from \"@m3e/web/loading-indicator\";\r\n\r\n/**\r\n * React binding for the `m3e-loading-indicator` Web Component from `@m3e/web/loading-indicator`.\r\n *\r\n * This component renders the underlying `<m3e-loading-indicator>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-loading-indicator>` instance for imperative access.\r\n *\r\n * See the `m3e-loading-indicator` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eLoadingIndicator = createComponent({\r\n tagName: \"m3e-loading-indicator\",\r\n elementClass: M3eLoadingIndicatorElement,\r\n react: React,\r\n});\r\n"],"names":[],"mappings":";;;;;;;;;;AAMA;;;;;;;;;;;;AAYG;AACI,MAAM,mBAAmB,GAAG,eAAe,CAAC;AACjD,IAAA,OAAO,EAAE,uBAAuB;AAChC,IAAA,YAAY,EAAE,0BAA0B;AACxC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA;;;;"}
@@ -1,7 +1,7 @@
1
- "use client";
2
1
  /**
3
2
  * @license MIT
4
3
  * Copyright (c) 2025 matraic
5
4
  * See LICENSE file in the project root for full license text.
6
- */import e from"react";import{createComponent as t}from"@lit/react";import{M3eLoadingIndicatorElement as a}from"@m3e/web/loading-indicator";const n=function({react:e,tagName:a,elementClass:n,events:m,displayName:o}){return"undefined"!=typeof window?t({react:e,tagName:a,elementClass:n,events:m,displayName:o}):null}({tagName:"m3e-loading-indicator",elementClass:a,react:e});export{n as M3eLoadingIndicator};
5
+ */
6
+ import t from"react";import{createComponent as o}from"@lit/react";import{M3eLoadingIndicatorElement as r}from"@m3e/web/loading-indicator";const e=o({tagName:"m3e-loading-indicator",elementClass:r,react:t});export{e as M3eLoadingIndicator};
7
7
  //# sourceMappingURL=loading-indicator.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"loading-indicator.min.js","sources":["../../src/loading-indicator/LoadingIndicator.ts","../../src/utils/createComponent.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eLoadingIndicatorElement } from \"@m3e/web/loading-indicator\";\r\nexport type { LoadingIndicatorVariant, M3eLoadingIndicatorElement } from \"@m3e/web/loading-indicator\";\r\n\r\n/**\r\n * React binding for the `m3e-loading-indicator` Web Component from `@m3e/web/loading-indicator`.\r\n *\r\n * This component renders the underlying `<m3e-loading-indicator>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-loading-indicator>` instance for imperative access.\r\n *\r\n * See the `m3e-loading-indicator` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eLoadingIndicator = createComponent({\r\n tagName: \"m3e-loading-indicator\",\r\n elementClass: M3eLoadingIndicatorElement,\r\n react: React,\r\n});\r\n","import { createComponent as createReactComponent, EventName, Options, ReactWebComponent } from \"@lit/react\";\r\n\r\ntype EventNames = Record<string, EventName | string>;\r\n\r\n/**\r\n * Creates an SSR-safe React component for a custom element. Properties are distinguished\r\n * from attributes automatically, and events can be configured so they are added\r\n * to the custom element as event listeners.\r\n *\r\n * @param options An options bag containing the parameters needed to generate a\r\n * wrapped web component.\r\n *\r\n * @param options.react The React module, typically imported from the `react`\r\n * npm package.\r\n * @param options.tagName The custom element tag name registered via\r\n * `customElements.define`.\r\n * @param options.elementClass The custom element class registered via\r\n * `customElements.define`.\r\n * @param options.events An object listing events to which the component can\r\n * listen. The object keys are the event property names passed in via React\r\n * props and the object values are the names of the corresponding events\r\n * generated by the custom element. For example, given `{onactivate:\r\n * 'activate'}` an event function may be passed via the component's `onactivate`\r\n * prop and will be called when the custom element fires its `activate` event.\r\n * @param options.displayName A React component display name, used in debugging\r\n * messages. Default value is inferred from the name of custom element class\r\n * registered via `customElements.define`.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\r\nexport function createComponent<I extends HTMLElement, E extends EventNames = {}>({\r\n react,\r\n tagName,\r\n elementClass,\r\n events,\r\n displayName,\r\n}: Options<I, E>): ReactWebComponent<I, E> {\r\n return typeof window !== \"undefined\"\r\n ? createReactComponent<I, E>({ react, tagName, elementClass, events, displayName })\r\n : <ReactWebComponent<I, E>>(<unknown>null);\r\n}\r\n"],"names":["M3eLoadingIndicator","react","tagName","elementClass","events","displayName","window","createReactComponent","createComponent","M3eLoadingIndicatorElement","React"],"mappings":";;;;;6IAmBO,MAAMA,ECUP,UAA4EC,MAChFA,EAAKC,QACLA,EAAOC,aACPA,EAAYC,OACZA,EAAMC,YACNA,IAEA,MAAyB,oBAAXC,OACVC,EAA2B,CAAEN,QAAOC,UAASC,eAAcC,SAAQC,gBAChC,IACzC,CDpBmCG,CAAgB,CACjDN,QAAS,wBACTC,aAAcM,EACdR,MAAOS"}
1
+ {"version":3,"file":"loading-indicator.min.js","sources":["../../src/loading-indicator/LoadingIndicator.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eLoadingIndicatorElement } from \"@m3e/web/loading-indicator\";\r\nexport type { LoadingIndicatorVariant, M3eLoadingIndicatorElement } from \"@m3e/web/loading-indicator\";\r\n\r\n/**\r\n * React binding for the `m3e-loading-indicator` Web Component from `@m3e/web/loading-indicator`.\r\n *\r\n * This component renders the underlying `<m3e-loading-indicator>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-loading-indicator>` instance for imperative access.\r\n *\r\n * See the `m3e-loading-indicator` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eLoadingIndicator = createComponent({\r\n tagName: \"m3e-loading-indicator\",\r\n elementClass: M3eLoadingIndicatorElement,\r\n react: React,\r\n});\r\n"],"names":["M3eLoadingIndicator","createComponent","tagName","elementClass","M3eLoadingIndicatorElement","react","React"],"mappings":";;;;;0IAmBO,MAAMA,EAAsBC,EAAgB,CACjDC,QAAS,wBACTC,aAAcC,EACdC,MAAOC"}
package/dist/menu.js CHANGED
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  /**
3
2
  * @license MIT
4
3
  * Copyright (c) 2025 matraic
@@ -6,40 +5,9 @@
6
5
  */
7
6
 
8
7
  import React from 'react';
9
- import { createComponent as createComponent$1 } from '@lit/react';
8
+ import { createComponent } from '@lit/react';
10
9
  import { M3eMenuElement, M3eMenuItemElement, M3eMenuItemCheckboxElement, M3eMenuItemGroupElement, M3eMenuItemRadioElement, M3eMenuTriggerElement } from '@m3e/web/menu';
11
10
 
12
- /**
13
- * Creates an SSR-safe React component for a custom element. Properties are distinguished
14
- * from attributes automatically, and events can be configured so they are added
15
- * to the custom element as event listeners.
16
- *
17
- * @param options An options bag containing the parameters needed to generate a
18
- * wrapped web component.
19
- *
20
- * @param options.react The React module, typically imported from the `react`
21
- * npm package.
22
- * @param options.tagName The custom element tag name registered via
23
- * `customElements.define`.
24
- * @param options.elementClass The custom element class registered via
25
- * `customElements.define`.
26
- * @param options.events An object listing events to which the component can
27
- * listen. The object keys are the event property names passed in via React
28
- * props and the object values are the names of the corresponding events
29
- * generated by the custom element. For example, given `{onactivate:
30
- * 'activate'}` an event function may be passed via the component's `onactivate`
31
- * prop and will be called when the custom element fires its `activate` event.
32
- * @param options.displayName A React component display name, used in debugging
33
- * messages. Default value is inferred from the name of custom element class
34
- * registered via `customElements.define`.
35
- */
36
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
37
- function createComponent({ react, tagName, elementClass, events, displayName, }) {
38
- return typeof window !== "undefined"
39
- ? createComponent$1({ react, tagName, elementClass, events, displayName })
40
- : null;
41
- }
42
-
43
11
  /**
44
12
  * React binding for the `m3e-menu` Web Component from `@m3e/web/menu`.
45
13
  *
package/dist/menu.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"menu.js","sources":["../../src/utils/createComponent.ts","../../src/menu/Menu.ts","../../src/menu/MenuItem.ts","../../src/menu/MenuItemCheckbox.ts","../../src/menu/MenuItemGroup.ts","../../src/menu/MenuItemRadio.ts","../../src/menu/MenuTrigger.ts"],"sourcesContent":["import { createComponent as createReactComponent, EventName, Options, ReactWebComponent } from \"@lit/react\";\r\n\r\ntype EventNames = Record<string, EventName | string>;\r\n\r\n/**\r\n * Creates an SSR-safe React component for a custom element. Properties are distinguished\r\n * from attributes automatically, and events can be configured so they are added\r\n * to the custom element as event listeners.\r\n *\r\n * @param options An options bag containing the parameters needed to generate a\r\n * wrapped web component.\r\n *\r\n * @param options.react The React module, typically imported from the `react`\r\n * npm package.\r\n * @param options.tagName The custom element tag name registered via\r\n * `customElements.define`.\r\n * @param options.elementClass The custom element class registered via\r\n * `customElements.define`.\r\n * @param options.events An object listing events to which the component can\r\n * listen. The object keys are the event property names passed in via React\r\n * props and the object values are the names of the corresponding events\r\n * generated by the custom element. For example, given `{onactivate:\r\n * 'activate'}` an event function may be passed via the component's `onactivate`\r\n * prop and will be called when the custom element fires its `activate` event.\r\n * @param options.displayName A React component display name, used in debugging\r\n * messages. Default value is inferred from the name of custom element class\r\n * registered via `customElements.define`.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\r\nexport function createComponent<I extends HTMLElement, E extends EventNames = {}>({\r\n react,\r\n tagName,\r\n elementClass,\r\n events,\r\n displayName,\r\n}: Options<I, E>): ReactWebComponent<I, E> {\r\n return typeof window !== \"undefined\"\r\n ? createReactComponent<I, E>({ react, tagName, elementClass, events, displayName })\r\n : <ReactWebComponent<I, E>>(<unknown>null);\r\n}\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eMenuElement } from \"@m3e/web/menu\";\r\nexport type { MenuPositionX, MenuPositionY, MenuVariant, M3eMenuElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu>` instance for imperative access.\r\n *\r\n * See the `m3e-menu` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenu = createComponent({\r\n tagName: \"m3e-menu\",\r\n elementClass: M3eMenuElement,\r\n react: React,\r\n events: {\r\n onBeforeToggle: \"beforetoggle\",\r\n onToggle: \"toggle\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eMenuItemElement } from \"@m3e/web/menu\";\r\nexport type { M3eMenuItemElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu-item` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu-item>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu-item>` instance for imperative access.\r\n *\r\n * See the `m3e-menu-item` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenuItem = createComponent({\r\n tagName: \"m3e-menu-item\",\r\n elementClass: M3eMenuItemElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eMenuItemCheckboxElement } from \"@m3e/web/menu\";\r\nexport type { M3eMenuItemCheckboxElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu-item-checkbox` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu-item-checkbox>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu-item-checkbox>` instance for imperative access.\r\n *\r\n * See the `m3e-menu-item-checkbox` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenuItemCheckbox = createComponent({\r\n tagName: \"m3e-menu-item-checkbox\",\r\n elementClass: M3eMenuItemCheckboxElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eMenuItemGroupElement } from \"@m3e/web/menu\";\r\nexport type { M3eMenuItemGroupElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu-item-group` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu-item-group>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu-item-group>` instance for imperative access.\r\n *\r\n * See the `m3e-menu-item-group` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenuItemGroup = createComponent({\r\n tagName: \"m3e-menu-item-group\",\r\n elementClass: M3eMenuItemGroupElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eMenuItemRadioElement } from \"@m3e/web/menu\";\r\nexport type { M3eMenuItemRadioElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu-item-radio` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu-item-radio>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu-item-radio>` instance for imperative access.\r\n *\r\n * See the `m3e-menu-item-radio` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenuItemRadio = createComponent({\r\n tagName: \"m3e-menu-item-radio\",\r\n elementClass: M3eMenuItemRadioElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eMenuTriggerElement } from \"@m3e/web/menu\";\r\nexport type { M3eMenuTriggerElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu-trigger` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu-trigger>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu-trigger>` instance for imperative access.\r\n *\r\n * See the `m3e-menu-trigger` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenuTrigger = createComponent({\r\n tagName: \"m3e-menu-trigger\",\r\n elementClass: M3eMenuTriggerElement,\r\n react: React,\r\n});\r\n"],"names":["createReactComponent"],"mappings":";;;;;;;;;;;AAIA;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AACH;AACM,SAAU,eAAe,CAAmD,EAChF,KAAK,EACL,OAAO,EACP,YAAY,EACZ,MAAM,EACN,WAAW,GACG,EAAA;IACd,OAAO,OAAO,MAAM,KAAK;AACvB,UAAEA,iBAAoB,CAAO,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE;UAC7C,IAAK;AAC9C;;ACjCA;;;;;;;;;;;;AAYG;AACI,MAAM,OAAO,GAAG,eAAe,CAAC;AACrC,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,YAAY,EAAE,cAAc;AAC5B,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,cAAc,EAAE,cAAc;AAC9B,QAAA,QAAQ,EAAE,QAAQ;AACnB,KAAA;AACF,CAAA;;ACrBD;;;;;;;;;;;;AAYG;AACI,MAAM,WAAW,GAAG,eAAe,CAAC;AACzC,IAAA,OAAO,EAAE,eAAe;AACxB,IAAA,YAAY,EAAE,kBAAkB;AAChC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,OAAO;AACjB,KAAA;AACF,CAAA;;ACpBD;;;;;;;;;;;;AAYG;AACI,MAAM,mBAAmB,GAAG,eAAe,CAAC;AACjD,IAAA,OAAO,EAAE,wBAAwB;AACjC,IAAA,YAAY,EAAE,0BAA0B;AACxC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,OAAO;AACjB,KAAA;AACF,CAAA;;ACpBD;;;;;;;;;;;;AAYG;AACI,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAC9C,IAAA,OAAO,EAAE,qBAAqB;AAC9B,IAAA,YAAY,EAAE,uBAAuB;AACrC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA;;ACjBD;;;;;;;;;;;;AAYG;AACI,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAC9C,IAAA,OAAO,EAAE,qBAAqB;AAC9B,IAAA,YAAY,EAAE,uBAAuB;AACrC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,OAAO;AACjB,KAAA;AACF,CAAA;;ACpBD;;;;;;;;;;;;AAYG;AACI,MAAM,cAAc,GAAG,eAAe,CAAC;AAC5C,IAAA,OAAO,EAAE,kBAAkB;AAC3B,IAAA,YAAY,EAAE,qBAAqB;AACnC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA;;;;"}
1
+ {"version":3,"file":"menu.js","sources":["../../src/menu/Menu.ts","../../src/menu/MenuItem.ts","../../src/menu/MenuItemCheckbox.ts","../../src/menu/MenuItemGroup.ts","../../src/menu/MenuItemRadio.ts","../../src/menu/MenuTrigger.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eMenuElement } from \"@m3e/web/menu\";\r\nexport type { MenuPositionX, MenuPositionY, MenuVariant, M3eMenuElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu>` instance for imperative access.\r\n *\r\n * See the `m3e-menu` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenu = createComponent({\r\n tagName: \"m3e-menu\",\r\n elementClass: M3eMenuElement,\r\n react: React,\r\n events: {\r\n onBeforeToggle: \"beforetoggle\",\r\n onToggle: \"toggle\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eMenuItemElement } from \"@m3e/web/menu\";\r\nexport type { M3eMenuItemElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu-item` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu-item>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu-item>` instance for imperative access.\r\n *\r\n * See the `m3e-menu-item` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenuItem = createComponent({\r\n tagName: \"m3e-menu-item\",\r\n elementClass: M3eMenuItemElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eMenuItemCheckboxElement } from \"@m3e/web/menu\";\r\nexport type { M3eMenuItemCheckboxElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu-item-checkbox` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu-item-checkbox>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu-item-checkbox>` instance for imperative access.\r\n *\r\n * See the `m3e-menu-item-checkbox` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenuItemCheckbox = createComponent({\r\n tagName: \"m3e-menu-item-checkbox\",\r\n elementClass: M3eMenuItemCheckboxElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eMenuItemGroupElement } from \"@m3e/web/menu\";\r\nexport type { M3eMenuItemGroupElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu-item-group` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu-item-group>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu-item-group>` instance for imperative access.\r\n *\r\n * See the `m3e-menu-item-group` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenuItemGroup = createComponent({\r\n tagName: \"m3e-menu-item-group\",\r\n elementClass: M3eMenuItemGroupElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eMenuItemRadioElement } from \"@m3e/web/menu\";\r\nexport type { M3eMenuItemRadioElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu-item-radio` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu-item-radio>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu-item-radio>` instance for imperative access.\r\n *\r\n * See the `m3e-menu-item-radio` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenuItemRadio = createComponent({\r\n tagName: \"m3e-menu-item-radio\",\r\n elementClass: M3eMenuItemRadioElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eMenuTriggerElement } from \"@m3e/web/menu\";\r\nexport type { M3eMenuTriggerElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu-trigger` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu-trigger>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu-trigger>` instance for imperative access.\r\n *\r\n * See the `m3e-menu-trigger` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenuTrigger = createComponent({\r\n tagName: \"m3e-menu-trigger\",\r\n elementClass: M3eMenuTriggerElement,\r\n react: React,\r\n});\r\n"],"names":[],"mappings":";;;;;;;;;;AAMA;;;;;;;;;;;;AAYG;AACI,MAAM,OAAO,GAAG,eAAe,CAAC;AACrC,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,YAAY,EAAE,cAAc;AAC5B,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,cAAc,EAAE,cAAc;AAC9B,QAAA,QAAQ,EAAE,QAAQ;AACnB,KAAA;AACF,CAAA;;ACrBD;;;;;;;;;;;;AAYG;AACI,MAAM,WAAW,GAAG,eAAe,CAAC;AACzC,IAAA,OAAO,EAAE,eAAe;AACxB,IAAA,YAAY,EAAE,kBAAkB;AAChC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,OAAO;AACjB,KAAA;AACF,CAAA;;ACpBD;;;;;;;;;;;;AAYG;AACI,MAAM,mBAAmB,GAAG,eAAe,CAAC;AACjD,IAAA,OAAO,EAAE,wBAAwB;AACjC,IAAA,YAAY,EAAE,0BAA0B;AACxC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,OAAO;AACjB,KAAA;AACF,CAAA;;ACpBD;;;;;;;;;;;;AAYG;AACI,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAC9C,IAAA,OAAO,EAAE,qBAAqB;AAC9B,IAAA,YAAY,EAAE,uBAAuB;AACrC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA;;ACjBD;;;;;;;;;;;;AAYG;AACI,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAC9C,IAAA,OAAO,EAAE,qBAAqB;AAC9B,IAAA,YAAY,EAAE,uBAAuB;AACrC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,OAAO;AACjB,KAAA;AACF,CAAA;;ACpBD;;;;;;;;;;;;AAYG;AACI,MAAM,cAAc,GAAG,eAAe,CAAC;AAC5C,IAAA,OAAO,EAAE,kBAAkB;AAC3B,IAAA,YAAY,EAAE,qBAAqB;AACnC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA;;;;"}
package/dist/menu.min.js CHANGED
@@ -1,7 +1,7 @@
1
- "use client";
2
1
  /**
3
2
  * @license MIT
4
3
  * Copyright (c) 2025 matraic
5
4
  * See LICENSE file in the project root for full license text.
6
- */import e from"react";import{createComponent as t}from"@lit/react";import{M3eMenuElement as m,M3eMenuItemElement as a,M3eMenuItemCheckboxElement as n,M3eMenuItemGroupElement as l,M3eMenuItemRadioElement as o,M3eMenuTriggerElement as s}from"@m3e/web/menu";function r({react:e,tagName:m,elementClass:a,events:n,displayName:l}){return"undefined"!=typeof window?t({react:e,tagName:m,elementClass:a,events:n,displayName:l}):null}const c=r({tagName:"m3e-menu",elementClass:m,react:e,events:{onBeforeToggle:"beforetoggle",onToggle:"toggle"}}),i=r({tagName:"m3e-menu-item",elementClass:a,react:e,events:{onClick:"click"}}),g=r({tagName:"m3e-menu-item-checkbox",elementClass:n,react:e,events:{onClick:"click"}}),u=r({tagName:"m3e-menu-item-group",elementClass:l,react:e}),C=r({tagName:"m3e-menu-item-radio",elementClass:o,react:e,events:{onClick:"click"}}),N=r({tagName:"m3e-menu-trigger",elementClass:s,react:e});export{c as M3eMenu,i as M3eMenuItem,g as M3eMenuItemCheckbox,u as M3eMenuItemGroup,C as M3eMenuItemRadio,N as M3eMenuTrigger};
5
+ */
6
+ import e from"react";import{createComponent as t}from"@lit/react";import{M3eMenuElement as m,M3eMenuItemElement as a,M3eMenuItemCheckboxElement as l,M3eMenuItemGroupElement as n,M3eMenuItemRadioElement as o,M3eMenuTriggerElement as r}from"@m3e/web/menu";const c=t({tagName:"m3e-menu",elementClass:m,react:e,events:{onBeforeToggle:"beforetoggle",onToggle:"toggle"}}),g=t({tagName:"m3e-menu-item",elementClass:a,react:e,events:{onClick:"click"}}),s=t({tagName:"m3e-menu-item-checkbox",elementClass:l,react:e,events:{onClick:"click"}}),i=t({tagName:"m3e-menu-item-group",elementClass:n,react:e}),C=t({tagName:"m3e-menu-item-radio",elementClass:o,react:e,events:{onClick:"click"}}),u=t({tagName:"m3e-menu-trigger",elementClass:r,react:e});export{c as M3eMenu,g as M3eMenuItem,s as M3eMenuItemCheckbox,i as M3eMenuItemGroup,C as M3eMenuItemRadio,u as M3eMenuTrigger};
7
7
  //# sourceMappingURL=menu.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu.min.js","sources":["../../src/utils/createComponent.ts","../../src/menu/Menu.ts","../../src/menu/MenuItem.ts","../../src/menu/MenuItemCheckbox.ts","../../src/menu/MenuItemGroup.ts","../../src/menu/MenuItemRadio.ts","../../src/menu/MenuTrigger.ts"],"sourcesContent":["import { createComponent as createReactComponent, EventName, Options, ReactWebComponent } from \"@lit/react\";\r\n\r\ntype EventNames = Record<string, EventName | string>;\r\n\r\n/**\r\n * Creates an SSR-safe React component for a custom element. Properties are distinguished\r\n * from attributes automatically, and events can be configured so they are added\r\n * to the custom element as event listeners.\r\n *\r\n * @param options An options bag containing the parameters needed to generate a\r\n * wrapped web component.\r\n *\r\n * @param options.react The React module, typically imported from the `react`\r\n * npm package.\r\n * @param options.tagName The custom element tag name registered via\r\n * `customElements.define`.\r\n * @param options.elementClass The custom element class registered via\r\n * `customElements.define`.\r\n * @param options.events An object listing events to which the component can\r\n * listen. The object keys are the event property names passed in via React\r\n * props and the object values are the names of the corresponding events\r\n * generated by the custom element. For example, given `{onactivate:\r\n * 'activate'}` an event function may be passed via the component's `onactivate`\r\n * prop and will be called when the custom element fires its `activate` event.\r\n * @param options.displayName A React component display name, used in debugging\r\n * messages. Default value is inferred from the name of custom element class\r\n * registered via `customElements.define`.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\r\nexport function createComponent<I extends HTMLElement, E extends EventNames = {}>({\r\n react,\r\n tagName,\r\n elementClass,\r\n events,\r\n displayName,\r\n}: Options<I, E>): ReactWebComponent<I, E> {\r\n return typeof window !== \"undefined\"\r\n ? createReactComponent<I, E>({ react, tagName, elementClass, events, displayName })\r\n : <ReactWebComponent<I, E>>(<unknown>null);\r\n}\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eMenuElement } from \"@m3e/web/menu\";\r\nexport type { MenuPositionX, MenuPositionY, MenuVariant, M3eMenuElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu>` instance for imperative access.\r\n *\r\n * See the `m3e-menu` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenu = createComponent({\r\n tagName: \"m3e-menu\",\r\n elementClass: M3eMenuElement,\r\n react: React,\r\n events: {\r\n onBeforeToggle: \"beforetoggle\",\r\n onToggle: \"toggle\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eMenuItemElement } from \"@m3e/web/menu\";\r\nexport type { M3eMenuItemElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu-item` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu-item>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu-item>` instance for imperative access.\r\n *\r\n * See the `m3e-menu-item` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenuItem = createComponent({\r\n tagName: \"m3e-menu-item\",\r\n elementClass: M3eMenuItemElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eMenuItemCheckboxElement } from \"@m3e/web/menu\";\r\nexport type { M3eMenuItemCheckboxElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu-item-checkbox` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu-item-checkbox>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu-item-checkbox>` instance for imperative access.\r\n *\r\n * See the `m3e-menu-item-checkbox` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenuItemCheckbox = createComponent({\r\n tagName: \"m3e-menu-item-checkbox\",\r\n elementClass: M3eMenuItemCheckboxElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eMenuItemGroupElement } from \"@m3e/web/menu\";\r\nexport type { M3eMenuItemGroupElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu-item-group` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu-item-group>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu-item-group>` instance for imperative access.\r\n *\r\n * See the `m3e-menu-item-group` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenuItemGroup = createComponent({\r\n tagName: \"m3e-menu-item-group\",\r\n elementClass: M3eMenuItemGroupElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eMenuItemRadioElement } from \"@m3e/web/menu\";\r\nexport type { M3eMenuItemRadioElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu-item-radio` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu-item-radio>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu-item-radio>` instance for imperative access.\r\n *\r\n * See the `m3e-menu-item-radio` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenuItemRadio = createComponent({\r\n tagName: \"m3e-menu-item-radio\",\r\n elementClass: M3eMenuItemRadioElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eMenuTriggerElement } from \"@m3e/web/menu\";\r\nexport type { M3eMenuTriggerElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu-trigger` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu-trigger>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu-trigger>` instance for imperative access.\r\n *\r\n * See the `m3e-menu-trigger` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenuTrigger = createComponent({\r\n tagName: \"m3e-menu-trigger\",\r\n elementClass: M3eMenuTriggerElement,\r\n react: React,\r\n});\r\n"],"names":["createComponent","react","tagName","elementClass","events","displayName","window","createReactComponent","M3eMenu","M3eMenuElement","React","onBeforeToggle","onToggle","M3eMenuItem","M3eMenuItemElement","onClick","M3eMenuItemCheckbox","M3eMenuItemCheckboxElement","M3eMenuItemGroup","M3eMenuItemGroupElement","M3eMenuItemRadio","M3eMenuItemRadioElement","M3eMenuTrigger","M3eMenuTriggerElement"],"mappings":";;;;;iQA6BM,SAAUA,GAAkEC,MAChFA,EAAKC,QACLA,EAAOC,aACPA,EAAYC,OACZA,EAAMC,YACNA,IAEA,MAAyB,oBAAXC,OACVC,EAA2B,CAAEN,QAAOC,UAASC,eAAcC,SAAQC,gBAChC,IACzC,CCpBO,MAAMG,EAAUR,EAAgB,CACrCE,QAAS,WACTC,aAAcM,EACdR,MAAOS,EACPN,OAAQ,CACNO,eAAgB,eAChBC,SAAU,YCNDC,EAAcb,EAAgB,CACzCE,QAAS,gBACTC,aAAcW,EACdb,MAAOS,EACPN,OAAQ,CACNW,QAAS,WCLAC,EAAsBhB,EAAgB,CACjDE,QAAS,yBACTC,aAAcc,EACdhB,MAAOS,EACPN,OAAQ,CACNW,QAAS,WCLAG,EAAmBlB,EAAgB,CAC9CE,QAAS,sBACTC,aAAcgB,EACdlB,MAAOS,ICHIU,EAAmBpB,EAAgB,CAC9CE,QAAS,sBACTC,aAAckB,EACdpB,MAAOS,EACPN,OAAQ,CACNW,QAAS,WCLAO,EAAiBtB,EAAgB,CAC5CE,QAAS,mBACTC,aAAcoB,EACdtB,MAAOS"}
1
+ {"version":3,"file":"menu.min.js","sources":["../../src/menu/Menu.ts","../../src/menu/MenuItem.ts","../../src/menu/MenuItemCheckbox.ts","../../src/menu/MenuItemGroup.ts","../../src/menu/MenuItemRadio.ts","../../src/menu/MenuTrigger.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eMenuElement } from \"@m3e/web/menu\";\r\nexport type { MenuPositionX, MenuPositionY, MenuVariant, M3eMenuElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu>` instance for imperative access.\r\n *\r\n * See the `m3e-menu` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenu = createComponent({\r\n tagName: \"m3e-menu\",\r\n elementClass: M3eMenuElement,\r\n react: React,\r\n events: {\r\n onBeforeToggle: \"beforetoggle\",\r\n onToggle: \"toggle\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eMenuItemElement } from \"@m3e/web/menu\";\r\nexport type { M3eMenuItemElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu-item` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu-item>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu-item>` instance for imperative access.\r\n *\r\n * See the `m3e-menu-item` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenuItem = createComponent({\r\n tagName: \"m3e-menu-item\",\r\n elementClass: M3eMenuItemElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eMenuItemCheckboxElement } from \"@m3e/web/menu\";\r\nexport type { M3eMenuItemCheckboxElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu-item-checkbox` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu-item-checkbox>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu-item-checkbox>` instance for imperative access.\r\n *\r\n * See the `m3e-menu-item-checkbox` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenuItemCheckbox = createComponent({\r\n tagName: \"m3e-menu-item-checkbox\",\r\n elementClass: M3eMenuItemCheckboxElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eMenuItemGroupElement } from \"@m3e/web/menu\";\r\nexport type { M3eMenuItemGroupElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu-item-group` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu-item-group>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu-item-group>` instance for imperative access.\r\n *\r\n * See the `m3e-menu-item-group` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenuItemGroup = createComponent({\r\n tagName: \"m3e-menu-item-group\",\r\n elementClass: M3eMenuItemGroupElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eMenuItemRadioElement } from \"@m3e/web/menu\";\r\nexport type { M3eMenuItemRadioElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu-item-radio` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu-item-radio>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu-item-radio>` instance for imperative access.\r\n *\r\n * See the `m3e-menu-item-radio` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenuItemRadio = createComponent({\r\n tagName: \"m3e-menu-item-radio\",\r\n elementClass: M3eMenuItemRadioElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eMenuTriggerElement } from \"@m3e/web/menu\";\r\nexport type { M3eMenuTriggerElement } from \"@m3e/web/menu\";\r\n\r\n/**\r\n * React binding for the `m3e-menu-trigger` Web Component from `@m3e/web/menu`.\r\n *\r\n * This component renders the underlying `<m3e-menu-trigger>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-menu-trigger>` instance for imperative access.\r\n *\r\n * See the `m3e-menu-trigger` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eMenuTrigger = createComponent({\r\n tagName: \"m3e-menu-trigger\",\r\n elementClass: M3eMenuTriggerElement,\r\n react: React,\r\n});\r\n"],"names":["M3eMenu","createComponent","tagName","elementClass","M3eMenuElement","react","React","events","onBeforeToggle","onToggle","M3eMenuItem","M3eMenuItemElement","onClick","M3eMenuItemCheckbox","M3eMenuItemCheckboxElement","M3eMenuItemGroup","M3eMenuItemGroupElement","M3eMenuItemRadio","M3eMenuItemRadioElement","M3eMenuTrigger","M3eMenuTriggerElement"],"mappings":";;;;;8PAmBO,MAAMA,EAAUC,EAAgB,CACrCC,QAAS,WACTC,aAAcC,EACdC,MAAOC,EACPC,OAAQ,CACNC,eAAgB,eAChBC,SAAU,YCNDC,EAAcT,EAAgB,CACzCC,QAAS,gBACTC,aAAcQ,EACdN,MAAOC,EACPC,OAAQ,CACNK,QAAS,WCLAC,EAAsBZ,EAAgB,CACjDC,QAAS,yBACTC,aAAcW,EACdT,MAAOC,EACPC,OAAQ,CACNK,QAAS,WCLAG,EAAmBd,EAAgB,CAC9CC,QAAS,sBACTC,aAAca,EACdX,MAAOC,ICHIW,EAAmBhB,EAAgB,CAC9CC,QAAS,sBACTC,aAAce,EACdb,MAAOC,EACPC,OAAQ,CACNK,QAAS,WCLAO,EAAiBlB,EAAgB,CAC5CC,QAAS,mBACTC,aAAciB,EACdf,MAAOC"}
package/dist/nav-bar.js CHANGED
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  /**
3
2
  * @license MIT
4
3
  * Copyright (c) 2025 matraic
@@ -6,40 +5,9 @@
6
5
  */
7
6
 
8
7
  import React from 'react';
9
- import { createComponent as createComponent$1 } from '@lit/react';
8
+ import { createComponent } from '@lit/react';
10
9
  import { M3eNavBarElement, M3eNavItemElement } from '@m3e/web/nav-bar';
11
10
 
12
- /**
13
- * Creates an SSR-safe React component for a custom element. Properties are distinguished
14
- * from attributes automatically, and events can be configured so they are added
15
- * to the custom element as event listeners.
16
- *
17
- * @param options An options bag containing the parameters needed to generate a
18
- * wrapped web component.
19
- *
20
- * @param options.react The React module, typically imported from the `react`
21
- * npm package.
22
- * @param options.tagName The custom element tag name registered via
23
- * `customElements.define`.
24
- * @param options.elementClass The custom element class registered via
25
- * `customElements.define`.
26
- * @param options.events An object listing events to which the component can
27
- * listen. The object keys are the event property names passed in via React
28
- * props and the object values are the names of the corresponding events
29
- * generated by the custom element. For example, given `{onactivate:
30
- * 'activate'}` an event function may be passed via the component's `onactivate`
31
- * prop and will be called when the custom element fires its `activate` event.
32
- * @param options.displayName A React component display name, used in debugging
33
- * messages. Default value is inferred from the name of custom element class
34
- * registered via `customElements.define`.
35
- */
36
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
37
- function createComponent({ react, tagName, elementClass, events, displayName, }) {
38
- return typeof window !== "undefined"
39
- ? createComponent$1({ react, tagName, elementClass, events, displayName })
40
- : null;
41
- }
42
-
43
11
  /**
44
12
  * React binding for the `m3e-nav-bar` Web Component from `@m3e/web/nav-bar`.
45
13
  *
@@ -1 +1 @@
1
- {"version":3,"file":"nav-bar.js","sources":["../../src/utils/createComponent.ts","../../src/nav-bar/NavBar.ts","../../src/nav-bar/NavItem.ts"],"sourcesContent":["import { createComponent as createReactComponent, EventName, Options, ReactWebComponent } from \"@lit/react\";\r\n\r\ntype EventNames = Record<string, EventName | string>;\r\n\r\n/**\r\n * Creates an SSR-safe React component for a custom element. Properties are distinguished\r\n * from attributes automatically, and events can be configured so they are added\r\n * to the custom element as event listeners.\r\n *\r\n * @param options An options bag containing the parameters needed to generate a\r\n * wrapped web component.\r\n *\r\n * @param options.react The React module, typically imported from the `react`\r\n * npm package.\r\n * @param options.tagName The custom element tag name registered via\r\n * `customElements.define`.\r\n * @param options.elementClass The custom element class registered via\r\n * `customElements.define`.\r\n * @param options.events An object listing events to which the component can\r\n * listen. The object keys are the event property names passed in via React\r\n * props and the object values are the names of the corresponding events\r\n * generated by the custom element. For example, given `{onactivate:\r\n * 'activate'}` an event function may be passed via the component's `onactivate`\r\n * prop and will be called when the custom element fires its `activate` event.\r\n * @param options.displayName A React component display name, used in debugging\r\n * messages. Default value is inferred from the name of custom element class\r\n * registered via `customElements.define`.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\r\nexport function createComponent<I extends HTMLElement, E extends EventNames = {}>({\r\n react,\r\n tagName,\r\n elementClass,\r\n events,\r\n displayName,\r\n}: Options<I, E>): ReactWebComponent<I, E> {\r\n return typeof window !== \"undefined\"\r\n ? createReactComponent<I, E>({ react, tagName, elementClass, events, displayName })\r\n : <ReactWebComponent<I, E>>(<unknown>null);\r\n}\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eNavBarElement } from \"@m3e/web/nav-bar\";\r\nexport type { NavBarMode, NavItemOrientation, M3eNavBarElement } from \"@m3e/web/nav-bar\";\r\n\r\n/**\r\n * React binding for the `m3e-nav-bar` Web Component from `@m3e/web/nav-bar`.\r\n *\r\n * This component renders the underlying `<m3e-nav-bar>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-nav-bar>` instance for imperative access.\r\n *\r\n * See the `m3e-nav-bar` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eNavBar = createComponent({\r\n tagName: \"m3e-nav-bar\",\r\n elementClass: M3eNavBarElement,\r\n react: React,\r\n events: {\r\n onChange: \"change\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eNavItemElement } from \"@m3e/web/nav-bar\";\r\nexport type { M3eNavItemElement } from \"@m3e/web/nav-bar\";\r\n\r\n/**\r\n * React binding for the `m3e-nav-item` Web Component from `@m3e/web/nav-bar`.\r\n *\r\n * This component renders the underlying `<m3e-nav-item>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-nav-item>` instance for imperative access.\r\n *\r\n * See the `m3e-nav-item` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eNavItem = createComponent({\r\n tagName: \"m3e-nav-item\",\r\n elementClass: M3eNavItemElement,\r\n react: React,\r\n events: {\r\n onInput: \"input\",\r\n onChange: \"change\",\r\n onClick: \"click\",\r\n },\r\n});\r\n"],"names":["createReactComponent"],"mappings":";;;;;;;;;;;AAIA;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AACH;AACM,SAAU,eAAe,CAAmD,EAChF,KAAK,EACL,OAAO,EACP,YAAY,EACZ,MAAM,EACN,WAAW,GACG,EAAA;IACd,OAAO,OAAO,MAAM,KAAK;AACvB,UAAEA,iBAAoB,CAAO,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE;UAC7C,IAAK;AAC9C;;ACjCA;;;;;;;;;;;;AAYG;AACI,MAAM,SAAS,GAAG,eAAe,CAAC;AACvC,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,YAAY,EAAE,gBAAgB;AAC9B,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,QAAQ;AACnB,KAAA;AACF,CAAA;;ACpBD;;;;;;;;;;;;AAYG;AACI,MAAM,UAAU,GAAG,eAAe,CAAC;AACxC,IAAA,OAAO,EAAE,cAAc;AACvB,IAAA,YAAY,EAAE,iBAAiB;AAC/B,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,OAAO;AAChB,QAAA,QAAQ,EAAE,QAAQ;AAClB,QAAA,OAAO,EAAE,OAAO;AACjB,KAAA;AACF,CAAA;;;;"}
1
+ {"version":3,"file":"nav-bar.js","sources":["../../src/nav-bar/NavBar.ts","../../src/nav-bar/NavItem.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eNavBarElement } from \"@m3e/web/nav-bar\";\r\nexport type { NavBarMode, NavItemOrientation, M3eNavBarElement } from \"@m3e/web/nav-bar\";\r\n\r\n/**\r\n * React binding for the `m3e-nav-bar` Web Component from `@m3e/web/nav-bar`.\r\n *\r\n * This component renders the underlying `<m3e-nav-bar>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-nav-bar>` instance for imperative access.\r\n *\r\n * See the `m3e-nav-bar` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eNavBar = createComponent({\r\n tagName: \"m3e-nav-bar\",\r\n elementClass: M3eNavBarElement,\r\n react: React,\r\n events: {\r\n onChange: \"change\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eNavItemElement } from \"@m3e/web/nav-bar\";\r\nexport type { M3eNavItemElement } from \"@m3e/web/nav-bar\";\r\n\r\n/**\r\n * React binding for the `m3e-nav-item` Web Component from `@m3e/web/nav-bar`.\r\n *\r\n * This component renders the underlying `<m3e-nav-item>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-nav-item>` instance for imperative access.\r\n *\r\n * See the `m3e-nav-item` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eNavItem = createComponent({\r\n tagName: \"m3e-nav-item\",\r\n elementClass: M3eNavItemElement,\r\n react: React,\r\n events: {\r\n onInput: \"input\",\r\n onChange: \"change\",\r\n onClick: \"click\",\r\n },\r\n});\r\n"],"names":[],"mappings":";;;;;;;;;;AAMA;;;;;;;;;;;;AAYG;AACI,MAAM,SAAS,GAAG,eAAe,CAAC;AACvC,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,YAAY,EAAE,gBAAgB;AAC9B,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,QAAQ;AACnB,KAAA;AACF,CAAA;;ACpBD;;;;;;;;;;;;AAYG;AACI,MAAM,UAAU,GAAG,eAAe,CAAC;AACxC,IAAA,OAAO,EAAE,cAAc;AACvB,IAAA,YAAY,EAAE,iBAAiB;AAC/B,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,OAAO;AAChB,QAAA,QAAQ,EAAE,QAAQ;AAClB,QAAA,OAAO,EAAE,OAAO;AACjB,KAAA;AACF,CAAA;;;;"}
@@ -1,7 +1,7 @@
1
- "use client";
2
1
  /**
3
2
  * @license MIT
4
3
  * Copyright (c) 2025 matraic
5
4
  * See LICENSE file in the project root for full license text.
6
- */import e from"react";import{createComponent as a}from"@lit/react";import{M3eNavBarElement as t,M3eNavItemElement as n}from"@m3e/web/nav-bar";function m({react:e,tagName:t,elementClass:n,events:m,displayName:r}){return"undefined"!=typeof window?a({react:e,tagName:t,elementClass:n,events:m,displayName:r}):null}const r=m({tagName:"m3e-nav-bar",elementClass:t,react:e,events:{onChange:"change"}}),o=m({tagName:"m3e-nav-item",elementClass:n,react:e,events:{onInput:"input",onChange:"change",onClick:"click"}});export{r as M3eNavBar,o as M3eNavItem};
5
+ */
6
+ import e from"react";import{createComponent as a}from"@lit/react";import{M3eNavBarElement as t,M3eNavItemElement as n}from"@m3e/web/nav-bar";const m=a({tagName:"m3e-nav-bar",elementClass:t,react:e,events:{onChange:"change"}}),r=a({tagName:"m3e-nav-item",elementClass:n,react:e,events:{onInput:"input",onChange:"change",onClick:"click"}});export{m as M3eNavBar,r as M3eNavItem};
7
7
  //# sourceMappingURL=nav-bar.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nav-bar.min.js","sources":["../../src/utils/createComponent.ts","../../src/nav-bar/NavBar.ts","../../src/nav-bar/NavItem.ts"],"sourcesContent":["import { createComponent as createReactComponent, EventName, Options, ReactWebComponent } from \"@lit/react\";\r\n\r\ntype EventNames = Record<string, EventName | string>;\r\n\r\n/**\r\n * Creates an SSR-safe React component for a custom element. Properties are distinguished\r\n * from attributes automatically, and events can be configured so they are added\r\n * to the custom element as event listeners.\r\n *\r\n * @param options An options bag containing the parameters needed to generate a\r\n * wrapped web component.\r\n *\r\n * @param options.react The React module, typically imported from the `react`\r\n * npm package.\r\n * @param options.tagName The custom element tag name registered via\r\n * `customElements.define`.\r\n * @param options.elementClass The custom element class registered via\r\n * `customElements.define`.\r\n * @param options.events An object listing events to which the component can\r\n * listen. The object keys are the event property names passed in via React\r\n * props and the object values are the names of the corresponding events\r\n * generated by the custom element. For example, given `{onactivate:\r\n * 'activate'}` an event function may be passed via the component's `onactivate`\r\n * prop and will be called when the custom element fires its `activate` event.\r\n * @param options.displayName A React component display name, used in debugging\r\n * messages. Default value is inferred from the name of custom element class\r\n * registered via `customElements.define`.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\r\nexport function createComponent<I extends HTMLElement, E extends EventNames = {}>({\r\n react,\r\n tagName,\r\n elementClass,\r\n events,\r\n displayName,\r\n}: Options<I, E>): ReactWebComponent<I, E> {\r\n return typeof window !== \"undefined\"\r\n ? createReactComponent<I, E>({ react, tagName, elementClass, events, displayName })\r\n : <ReactWebComponent<I, E>>(<unknown>null);\r\n}\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eNavBarElement } from \"@m3e/web/nav-bar\";\r\nexport type { NavBarMode, NavItemOrientation, M3eNavBarElement } from \"@m3e/web/nav-bar\";\r\n\r\n/**\r\n * React binding for the `m3e-nav-bar` Web Component from `@m3e/web/nav-bar`.\r\n *\r\n * This component renders the underlying `<m3e-nav-bar>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-nav-bar>` instance for imperative access.\r\n *\r\n * See the `m3e-nav-bar` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eNavBar = createComponent({\r\n tagName: \"m3e-nav-bar\",\r\n elementClass: M3eNavBarElement,\r\n react: React,\r\n events: {\r\n onChange: \"change\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eNavItemElement } from \"@m3e/web/nav-bar\";\r\nexport type { M3eNavItemElement } from \"@m3e/web/nav-bar\";\r\n\r\n/**\r\n * React binding for the `m3e-nav-item` Web Component from `@m3e/web/nav-bar`.\r\n *\r\n * This component renders the underlying `<m3e-nav-item>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-nav-item>` instance for imperative access.\r\n *\r\n * See the `m3e-nav-item` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eNavItem = createComponent({\r\n tagName: \"m3e-nav-item\",\r\n elementClass: M3eNavItemElement,\r\n react: React,\r\n events: {\r\n onInput: \"input\",\r\n onChange: \"change\",\r\n onClick: \"click\",\r\n },\r\n});\r\n"],"names":["createComponent","react","tagName","elementClass","events","displayName","window","createReactComponent","M3eNavBar","M3eNavBarElement","React","onChange","M3eNavItem","M3eNavItemElement","onInput","onClick"],"mappings":";;;;;gJA6BM,SAAUA,GAAkEC,MAChFA,EAAKC,QACLA,EAAOC,aACPA,EAAYC,OACZA,EAAMC,YACNA,IAEA,MAAyB,oBAAXC,OACVC,EAA2B,CAAEN,QAAOC,UAASC,eAAcC,SAAQC,gBAChC,IACzC,CCpBO,MAAMG,EAAYR,EAAgB,CACvCE,QAAS,cACTC,aAAcM,EACdR,MAAOS,EACPN,OAAQ,CACNO,SAAU,YCLDC,EAAaZ,EAAgB,CACxCE,QAAS,eACTC,aAAcU,EACdZ,MAAOS,EACPN,OAAQ,CACNU,QAAS,QACTH,SAAU,SACVI,QAAS"}
1
+ {"version":3,"file":"nav-bar.min.js","sources":["../../src/nav-bar/NavBar.ts","../../src/nav-bar/NavItem.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eNavBarElement } from \"@m3e/web/nav-bar\";\r\nexport type { NavBarMode, NavItemOrientation, M3eNavBarElement } from \"@m3e/web/nav-bar\";\r\n\r\n/**\r\n * React binding for the `m3e-nav-bar` Web Component from `@m3e/web/nav-bar`.\r\n *\r\n * This component renders the underlying `<m3e-nav-bar>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-nav-bar>` instance for imperative access.\r\n *\r\n * See the `m3e-nav-bar` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eNavBar = createComponent({\r\n tagName: \"m3e-nav-bar\",\r\n elementClass: M3eNavBarElement,\r\n react: React,\r\n events: {\r\n onChange: \"change\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eNavItemElement } from \"@m3e/web/nav-bar\";\r\nexport type { M3eNavItemElement } from \"@m3e/web/nav-bar\";\r\n\r\n/**\r\n * React binding for the `m3e-nav-item` Web Component from `@m3e/web/nav-bar`.\r\n *\r\n * This component renders the underlying `<m3e-nav-item>` element and exposes its\r\n * properties, attributes, and events through an idiomatic React interface.\r\n *\r\n * Props map directly to element properties, and event handlers receive the\r\n * native DOM events dispatched by the component. Refs are forwarded to the\r\n * underlying `<m3e-nav-item>` instance for imperative access.\r\n *\r\n * See the `m3e-nav-item` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eNavItem = createComponent({\r\n tagName: \"m3e-nav-item\",\r\n elementClass: M3eNavItemElement,\r\n react: React,\r\n events: {\r\n onInput: \"input\",\r\n onChange: \"change\",\r\n onClick: \"click\",\r\n },\r\n});\r\n"],"names":["M3eNavBar","createComponent","tagName","elementClass","M3eNavBarElement","react","React","events","onChange","M3eNavItem","M3eNavItemElement","onInput","onClick"],"mappings":";;;;;6IAmBO,MAAMA,EAAYC,EAAgB,CACvCC,QAAS,cACTC,aAAcC,EACdC,MAAOC,EACPC,OAAQ,CACNC,SAAU,YCLDC,EAAaR,EAAgB,CACxCC,QAAS,eACTC,aAAcO,EACdL,MAAOC,EACPC,OAAQ,CACNI,QAAS,QACTH,SAAU,SACVI,QAAS"}
package/dist/nav-menu.js CHANGED
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  /**
3
2
  * @license MIT
4
3
  * Copyright (c) 2025 matraic
@@ -6,40 +5,9 @@
6
5
  */
7
6
 
8
7
  import React from 'react';
9
- import { createComponent as createComponent$1 } from '@lit/react';
8
+ import { createComponent } from '@lit/react';
10
9
  import { M3eNavMenuElement, M3eNavMenuItemElement, M3eNavMenuItemGroupElement } from '@m3e/web/nav-menu';
11
10
 
12
- /**
13
- * Creates an SSR-safe React component for a custom element. Properties are distinguished
14
- * from attributes automatically, and events can be configured so they are added
15
- * to the custom element as event listeners.
16
- *
17
- * @param options An options bag containing the parameters needed to generate a
18
- * wrapped web component.
19
- *
20
- * @param options.react The React module, typically imported from the `react`
21
- * npm package.
22
- * @param options.tagName The custom element tag name registered via
23
- * `customElements.define`.
24
- * @param options.elementClass The custom element class registered via
25
- * `customElements.define`.
26
- * @param options.events An object listing events to which the component can
27
- * listen. The object keys are the event property names passed in via React
28
- * props and the object values are the names of the corresponding events
29
- * generated by the custom element. For example, given `{onactivate:
30
- * 'activate'}` an event function may be passed via the component's `onactivate`
31
- * prop and will be called when the custom element fires its `activate` event.
32
- * @param options.displayName A React component display name, used in debugging
33
- * messages. Default value is inferred from the name of custom element class
34
- * registered via `customElements.define`.
35
- */
36
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
37
- function createComponent({ react, tagName, elementClass, events, displayName, }) {
38
- return typeof window !== "undefined"
39
- ? createComponent$1({ react, tagName, elementClass, events, displayName })
40
- : null;
41
- }
42
-
43
11
  /**
44
12
  * React binding for the `m3e-nav-menu` Web Component from `@m3e/web/nav-menu`.
45
13
  *