@m3e/react 2.0.2 → 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.
- package/README.md +4 -0
- package/dist/all.js +13 -45
- package/dist/all.js.map +1 -1
- package/dist/all.min.js +2 -2
- package/dist/all.min.js.map +1 -1
- package/dist/app-bar.js +2 -34
- package/dist/app-bar.js.map +1 -1
- package/dist/app-bar.min.js +2 -2
- package/dist/app-bar.min.js.map +1 -1
- package/dist/autocomplete.js +2 -34
- package/dist/autocomplete.js.map +1 -1
- package/dist/autocomplete.min.js +2 -2
- package/dist/autocomplete.min.js.map +1 -1
- package/dist/avatar.js +2 -34
- package/dist/avatar.js.map +1 -1
- package/dist/avatar.min.js +2 -2
- package/dist/avatar.min.js.map +1 -1
- package/dist/badge.js +2 -34
- package/dist/badge.js.map +1 -1
- package/dist/badge.min.js +2 -2
- package/dist/badge.min.js.map +1 -1
- package/dist/bottom-sheet.js +1 -33
- package/dist/bottom-sheet.js.map +1 -1
- package/dist/bottom-sheet.min.js +2 -2
- package/dist/bottom-sheet.min.js.map +1 -1
- package/dist/button-group.js +2 -34
- package/dist/button-group.js.map +1 -1
- package/dist/button-group.min.js +2 -2
- package/dist/button-group.min.js.map +1 -1
- package/dist/button.js +2 -34
- package/dist/button.js.map +1 -1
- package/dist/button.min.js +2 -2
- package/dist/button.min.js.map +1 -1
- package/dist/card.js +2 -34
- package/dist/card.js.map +1 -1
- package/dist/card.min.js +2 -2
- package/dist/card.min.js.map +1 -1
- package/dist/checkbox.js +2 -34
- package/dist/checkbox.js.map +1 -1
- package/dist/checkbox.min.js +2 -2
- package/dist/checkbox.min.js.map +1 -1
- package/dist/chips.js +1 -33
- package/dist/chips.js.map +1 -1
- package/dist/chips.min.js +2 -2
- package/dist/chips.min.js.map +1 -1
- package/dist/core.js +1 -33
- package/dist/core.js.map +1 -1
- package/dist/core.min.js +2 -2
- package/dist/core.min.js.map +1 -1
- package/dist/dialog.js +2 -34
- package/dist/dialog.js.map +1 -1
- package/dist/dialog.min.js +2 -2
- package/dist/dialog.min.js.map +1 -1
- package/dist/divider.js +2 -34
- package/dist/divider.js.map +1 -1
- package/dist/divider.min.js +2 -2
- package/dist/divider.min.js.map +1 -1
- package/dist/drawer-container.js +2 -34
- package/dist/drawer-container.js.map +1 -1
- package/dist/drawer-container.min.js +2 -2
- package/dist/drawer-container.min.js.map +1 -1
- package/dist/expansion-panel.js +1 -33
- package/dist/expansion-panel.js.map +1 -1
- package/dist/expansion-panel.min.js +2 -2
- package/dist/expansion-panel.min.js.map +1 -1
- package/dist/fab-menu.js +1 -33
- package/dist/fab-menu.js.map +1 -1
- package/dist/fab-menu.min.js +2 -2
- package/dist/fab-menu.min.js.map +1 -1
- package/dist/fab.js +1 -33
- package/dist/fab.js.map +1 -1
- package/dist/fab.min.js +2 -2
- package/dist/fab.min.js.map +1 -1
- package/dist/form-field.js +1 -33
- package/dist/form-field.js.map +1 -1
- package/dist/form-field.min.js +2 -2
- package/dist/form-field.min.js.map +1 -1
- package/dist/heading.js +1 -33
- package/dist/heading.js.map +1 -1
- package/dist/heading.min.js +2 -2
- package/dist/heading.min.js.map +1 -1
- package/dist/icon-button.js +1 -33
- package/dist/icon-button.js.map +1 -1
- package/dist/icon-button.min.js +2 -2
- package/dist/icon-button.min.js.map +1 -1
- package/dist/icon.js +1 -33
- package/dist/icon.js.map +1 -1
- package/dist/icon.min.js +2 -2
- package/dist/icon.min.js.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/list.js +1 -33
- package/dist/list.js.map +1 -1
- package/dist/list.min.js +2 -2
- package/dist/list.min.js.map +1 -1
- package/dist/loading-indicator.js +1 -33
- package/dist/loading-indicator.js.map +1 -1
- package/dist/loading-indicator.min.js +2 -2
- package/dist/loading-indicator.min.js.map +1 -1
- package/dist/menu.js +1 -33
- package/dist/menu.js.map +1 -1
- package/dist/menu.min.js +2 -2
- package/dist/menu.min.js.map +1 -1
- package/dist/nav-bar.js +1 -33
- package/dist/nav-bar.js.map +1 -1
- package/dist/nav-bar.min.js +2 -2
- package/dist/nav-bar.min.js.map +1 -1
- package/dist/nav-menu.js +1 -33
- package/dist/nav-menu.js.map +1 -1
- package/dist/nav-menu.min.js +2 -2
- package/dist/nav-menu.min.js.map +1 -1
- package/dist/nav-rail.js +1 -33
- package/dist/nav-rail.js.map +1 -1
- package/dist/nav-rail.min.js +2 -2
- package/dist/nav-rail.min.js.map +1 -1
- package/dist/option.js +1 -33
- package/dist/option.js.map +1 -1
- package/dist/option.min.js +2 -2
- package/dist/option.min.js.map +1 -1
- package/dist/paginator.js +0 -1
- package/dist/paginator.js.map +1 -1
- package/dist/paginator.min.js +2 -2
- package/dist/paginator.min.js.map +1 -1
- package/dist/progress-indicator.js +1 -33
- package/dist/progress-indicator.js.map +1 -1
- package/dist/progress-indicator.min.js +2 -2
- package/dist/progress-indicator.min.js.map +1 -1
- package/dist/radio-group.js +1 -33
- package/dist/radio-group.js.map +1 -1
- package/dist/radio-group.min.js +2 -2
- package/dist/radio-group.min.js.map +1 -1
- package/dist/segmented-button.js +1 -33
- package/dist/segmented-button.js.map +1 -1
- package/dist/segmented-button.min.js +2 -2
- package/dist/segmented-button.min.js.map +1 -1
- package/dist/select.js +1 -33
- package/dist/select.js.map +1 -1
- package/dist/select.min.js +2 -2
- package/dist/select.min.js.map +1 -1
- package/dist/shape.js +1 -33
- package/dist/shape.js.map +1 -1
- package/dist/shape.min.js +2 -2
- package/dist/shape.min.js.map +1 -1
- package/dist/slide-group.js +1 -33
- package/dist/slide-group.js.map +1 -1
- package/dist/slide-group.min.js +2 -2
- package/dist/slide-group.min.js.map +1 -1
- package/dist/slider.js +1 -33
- package/dist/slider.js.map +1 -1
- package/dist/slider.min.js +2 -2
- package/dist/slider.min.js.map +1 -1
- package/dist/snackbar.js +0 -1
- package/dist/snackbar.js.map +1 -1
- package/dist/snackbar.min.js +2 -2
- package/dist/split-button.js +1 -33
- package/dist/split-button.js.map +1 -1
- package/dist/split-button.min.js +2 -2
- package/dist/split-button.min.js.map +1 -1
- package/dist/src/app-bar/AppBar.d.ts +1 -1
- package/dist/src/autocomplete/Autocomplete.d.ts +1 -1
- package/dist/src/avatar/Avatar.d.ts +1 -1
- package/dist/src/badge/Badge.d.ts +1 -1
- package/dist/src/button/Button.d.ts +1 -1
- package/dist/src/button-group/ButtonGroup.d.ts +1 -1
- package/dist/src/card/Card.d.ts +1 -1
- package/dist/src/checkbox/Checkbox.d.ts +1 -1
- package/dist/src/dialog/Dialog.d.ts +1 -1
- package/dist/src/divider/Divider.d.ts +1 -1
- package/dist/src/drawer-container/DrawerContainer.d.ts +1 -1
- package/dist/stepper.js +1 -33
- package/dist/stepper.js.map +1 -1
- package/dist/stepper.min.js +2 -2
- package/dist/stepper.min.js.map +1 -1
- package/dist/switch.js +1 -33
- package/dist/switch.js.map +1 -1
- package/dist/switch.min.js +2 -2
- package/dist/switch.min.js.map +1 -1
- package/dist/tabs.js +1 -33
- package/dist/tabs.js.map +1 -1
- package/dist/tabs.min.js +2 -2
- package/dist/tabs.min.js.map +1 -1
- package/dist/textarea-autosize.js +1 -33
- package/dist/textarea-autosize.js.map +1 -1
- package/dist/textarea-autosize.min.js +2 -2
- package/dist/textarea-autosize.min.js.map +1 -1
- package/dist/theme.js +1 -33
- package/dist/theme.js.map +1 -1
- package/dist/theme.min.js +2 -2
- package/dist/theme.min.js.map +1 -1
- package/dist/toc.js +1 -33
- package/dist/toc.js.map +1 -1
- package/dist/toc.min.js +2 -2
- package/dist/toc.min.js.map +1 -1
- package/dist/toolbar.js +1 -33
- package/dist/toolbar.js.map +1 -1
- package/dist/toolbar.min.js +2 -2
- package/dist/toolbar.min.js.map +1 -1
- package/dist/tooltip.js +1 -33
- package/dist/tooltip.js.map +1 -1
- package/dist/tooltip.min.js +2 -2
- package/dist/tooltip.min.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-group.min.js","sources":["../../src/button-group/ButtonGroup.ts"
|
|
1
|
+
{"version":3,"file":"button-group.min.js","sources":["../../src/button-group/ButtonGroup.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eButtonGroupElement } from \"@m3e/web/button-group\";\r\nexport type { ButtonGroupSize, ButtonGroupVariant, M3eButtonGroupElement } from \"@m3e/web/button-group\";\r\n\r\n/**\r\n * React binding for the `m3e-button-group` Web Component from `@m3e/web/button-group`.\r\n *\r\n * This component renders the underlying `<m3e-button-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-button-group>` instance for imperative access.\r\n *\r\n * See the `m3e-button-group` documentation for full details on behavior,\r\n * styling, accessibility, and supported events.\r\n */\r\nexport const M3eButtonGroup = createComponent({\r\n tagName: \"m3e-button-group\",\r\n elementClass: M3eButtonGroupElement,\r\n react: React,\r\n});\r\n"],"names":["M3eButtonGroup","createComponent","tagName","elementClass","M3eButtonGroupElement","react","React"],"mappings":";;;;;gIAmBO,MAAMA,EAAiBC,EAAgB,CAC5CC,QAAS,mBACTC,aAAcC,EACdC,MAAOC"}
|
package/dist/button.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
|
|
8
|
+
import { createComponent } from '@lit/react';
|
|
10
9
|
import { M3eButtonElement } from '@m3e/web/button';
|
|
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-button` Web Component from `@m3e/web/button`.
|
|
45
13
|
*
|
|
@@ -50,7 +18,7 @@ function createComponent({ react, tagName, elementClass, events, displayName, })
|
|
|
50
18
|
* native DOM events dispatched by the component. Refs are forwarded to the
|
|
51
19
|
* underlying `<m3e-button>` instance for imperative access.
|
|
52
20
|
*
|
|
53
|
-
* See the `m3e-button` documentation
|
|
21
|
+
* See the `m3e-button` documentation for full details on behavior,
|
|
54
22
|
* styling, accessibility, and supported events.
|
|
55
23
|
*/
|
|
56
24
|
const M3eButton = createComponent({
|
package/dist/button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sources":["../../src/
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../../src/button/Button.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eButtonElement } from \"@m3e/web/button\";\r\nexport type { ButtonShape, ButtonSize, ButtonVariant, M3eButtonElement } from \"@m3e/web/button\";\r\n\r\n/**\r\n * React binding for the `m3e-button` Web Component from `@m3e/web/button`.\r\n *\r\n * This component renders the underlying `<m3e-button>` 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-button>` instance for imperative access.\r\n *\r\n * See the `m3e-button` documentation for full details on behavior,\r\n * styling, accessibility, and supported events.\r\n */\r\nexport const M3eButton = createComponent({\r\n tagName: \"m3e-button\",\r\n elementClass: M3eButtonElement,\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,YAAY;AACrB,IAAA,YAAY,EAAE,gBAAgB;AAC9B,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;;;;"}
|
package/dist/button.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
|
-
*/
|
|
5
|
+
*/
|
|
6
|
+
import t from"react";import{createComponent as e}from"@lit/react";import{M3eButtonElement as o}from"@m3e/web/button";const n=e({tagName:"m3e-button",elementClass:o,react:t,events:{onInput:"input",onChange:"change",onClick:"click"}});export{n as M3eButton};
|
|
7
7
|
//# sourceMappingURL=button.min.js.map
|
package/dist/button.min.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.min.js","sources":["../../src/button/Button.ts"
|
|
1
|
+
{"version":3,"file":"button.min.js","sources":["../../src/button/Button.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eButtonElement } from \"@m3e/web/button\";\r\nexport type { ButtonShape, ButtonSize, ButtonVariant, M3eButtonElement } from \"@m3e/web/button\";\r\n\r\n/**\r\n * React binding for the `m3e-button` Web Component from `@m3e/web/button`.\r\n *\r\n * This component renders the underlying `<m3e-button>` 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-button>` instance for imperative access.\r\n *\r\n * See the `m3e-button` documentation for full details on behavior,\r\n * styling, accessibility, and supported events.\r\n */\r\nexport const M3eButton = createComponent({\r\n tagName: \"m3e-button\",\r\n elementClass: M3eButtonElement,\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":["M3eButton","createComponent","tagName","elementClass","M3eButtonElement","react","React","events","onInput","onChange","onClick"],"mappings":";;;;;qHAmBO,MAAMA,EAAYC,EAAgB,CACvCC,QAAS,aACTC,aAAcC,EACdC,MAAOC,EACPC,OAAQ,CACNC,QAAS,QACTC,SAAU,SACVC,QAAS"}
|
package/dist/card.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
|
|
8
|
+
import { createComponent } from '@lit/react';
|
|
10
9
|
import { M3eCardElement } from '@m3e/web/card';
|
|
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-card` Web Component from `@m3e/web/card`.
|
|
45
13
|
*
|
|
@@ -50,7 +18,7 @@ function createComponent({ react, tagName, elementClass, events, displayName, })
|
|
|
50
18
|
* native DOM events dispatched by the component. Refs are forwarded to the
|
|
51
19
|
* underlying `<m3e-card>` instance for imperative access.
|
|
52
20
|
*
|
|
53
|
-
* See the `m3e-card` documentation
|
|
21
|
+
* See the `m3e-card` documentation for full details on behavior,
|
|
54
22
|
* styling, accessibility, and supported events.
|
|
55
23
|
*/
|
|
56
24
|
const M3eCard = createComponent({
|
package/dist/card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sources":["../../src/
|
|
1
|
+
{"version":3,"file":"card.js","sources":["../../src/card/Card.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eCardElement } from \"@m3e/web/card\";\r\nexport type { CardOrientation, CardVariant, M3eCardElement } from \"@m3e/web/card\";\r\n\r\n/**\r\n * React binding for the `m3e-card` Web Component from `@m3e/web/card`.\r\n *\r\n * This component renders the underlying `<m3e-card>` 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-card>` instance for imperative access.\r\n *\r\n * See the `m3e-card` documentation for full details on behavior,\r\n * styling, accessibility, and supported events.\r\n */\r\nexport const M3eCard = createComponent({\r\n tagName: \"m3e-card\",\r\n elementClass: M3eCardElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n },\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,OAAO,EAAE,OAAO;AACjB,KAAA;AACF,CAAA;;;;"}
|
package/dist/card.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
|
-
*/
|
|
5
|
+
*/
|
|
6
|
+
import e from"react";import{createComponent as r}from"@lit/react";import{M3eCardElement as t}from"@m3e/web/card";const m=r({tagName:"m3e-card",elementClass:t,react:e,events:{onClick:"click"}});export{m as M3eCard};
|
|
7
7
|
//# sourceMappingURL=card.min.js.map
|
package/dist/card.min.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.min.js","sources":["../../src/card/Card.ts"
|
|
1
|
+
{"version":3,"file":"card.min.js","sources":["../../src/card/Card.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eCardElement } from \"@m3e/web/card\";\r\nexport type { CardOrientation, CardVariant, M3eCardElement } from \"@m3e/web/card\";\r\n\r\n/**\r\n * React binding for the `m3e-card` Web Component from `@m3e/web/card`.\r\n *\r\n * This component renders the underlying `<m3e-card>` 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-card>` instance for imperative access.\r\n *\r\n * See the `m3e-card` documentation for full details on behavior,\r\n * styling, accessibility, and supported events.\r\n */\r\nexport const M3eCard = createComponent({\r\n tagName: \"m3e-card\",\r\n elementClass: M3eCardElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n },\r\n});\r\n"],"names":["M3eCard","createComponent","tagName","elementClass","M3eCardElement","react","React","events","onClick"],"mappings":";;;;;iHAmBO,MAAMA,EAAUC,EAAgB,CACrCC,QAAS,WACTC,aAAcC,EACdC,MAAOC,EACPC,OAAQ,CACNC,QAAS"}
|
package/dist/checkbox.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
|
|
8
|
+
import { createComponent } from '@lit/react';
|
|
10
9
|
import { M3eCheckboxElement } from '@m3e/web/checkbox';
|
|
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-checkbox` Web Component from `@m3e/web/checkbox`.
|
|
45
13
|
*
|
|
@@ -50,7 +18,7 @@ function createComponent({ react, tagName, elementClass, events, displayName, })
|
|
|
50
18
|
* native DOM events dispatched by the component. Refs are forwarded to the
|
|
51
19
|
* underlying `<m3e-checkbox>` instance for imperative access.
|
|
52
20
|
*
|
|
53
|
-
* See the `m3e-checkbox` documentation
|
|
21
|
+
* See the `m3e-checkbox` documentation for full details on behavior,
|
|
54
22
|
* styling, accessibility, and supported events.
|
|
55
23
|
*/
|
|
56
24
|
const M3eCheckbox = createComponent({
|
package/dist/checkbox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","sources":["../../src/
|
|
1
|
+
{"version":3,"file":"checkbox.js","sources":["../../src/checkbox/Checkbox.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eCheckboxElement } from \"@m3e/web/checkbox\";\r\nexport type { M3eCheckboxElement } from \"@m3e/web/checkbox\";\r\n\r\n/**\r\n * React binding for the `m3e-checkbox` Web Component from `@m3e/web/checkbox`.\r\n *\r\n * This component renders the underlying `<m3e-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-checkbox>` instance for imperative access.\r\n *\r\n * See the `m3e-checkbox` documentation for full details on behavior,\r\n * styling, accessibility, and supported events.\r\n */\r\nexport const M3eCheckbox = createComponent({\r\n tagName: \"m3e-checkbox\",\r\n elementClass: M3eCheckboxElement,\r\n react: React,\r\n events: {\r\n onInput: \"input\",\r\n onInvalid: \"invalid\",\r\n onChange: \"change\",\r\n onClick: \"click\",\r\n },\r\n});\r\n"],"names":[],"mappings":";;;;;;;;;;AAMA;;;;;;;;;;;;AAYG;AACI,MAAM,WAAW,GAAG,eAAe,CAAC;AACzC,IAAA,OAAO,EAAE,cAAc;AACvB,IAAA,YAAY,EAAE,kBAAkB;AAChC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,OAAO;AAChB,QAAA,SAAS,EAAE,SAAS;AACpB,QAAA,QAAQ,EAAE,QAAQ;AAClB,QAAA,OAAO,EAAE,OAAO;AACjB,KAAA;AACF,CAAA;;;;"}
|
package/dist/checkbox.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
|
-
*/
|
|
5
|
+
*/
|
|
6
|
+
import e from"react";import{createComponent as o}from"@lit/react";import{M3eCheckboxElement as t}from"@m3e/web/checkbox";const n=o({tagName:"m3e-checkbox",elementClass:t,react:e,events:{onInput:"input",onInvalid:"invalid",onChange:"change",onClick:"click"}});export{n as M3eCheckbox};
|
|
7
7
|
//# sourceMappingURL=checkbox.min.js.map
|
package/dist/checkbox.min.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.min.js","sources":["../../src/checkbox/Checkbox.ts"
|
|
1
|
+
{"version":3,"file":"checkbox.min.js","sources":["../../src/checkbox/Checkbox.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eCheckboxElement } from \"@m3e/web/checkbox\";\r\nexport type { M3eCheckboxElement } from \"@m3e/web/checkbox\";\r\n\r\n/**\r\n * React binding for the `m3e-checkbox` Web Component from `@m3e/web/checkbox`.\r\n *\r\n * This component renders the underlying `<m3e-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-checkbox>` instance for imperative access.\r\n *\r\n * See the `m3e-checkbox` documentation for full details on behavior,\r\n * styling, accessibility, and supported events.\r\n */\r\nexport const M3eCheckbox = createComponent({\r\n tagName: \"m3e-checkbox\",\r\n elementClass: M3eCheckboxElement,\r\n react: React,\r\n events: {\r\n onInput: \"input\",\r\n onInvalid: \"invalid\",\r\n onChange: \"change\",\r\n onClick: \"click\",\r\n },\r\n});\r\n"],"names":["M3eCheckbox","createComponent","tagName","elementClass","M3eCheckboxElement","react","React","events","onInput","onInvalid","onChange","onClick"],"mappings":";;;;;yHAmBO,MAAMA,EAAcC,EAAgB,CACzCC,QAAS,eACTC,aAAcC,EACdC,MAAOC,EACPC,OAAQ,CACNC,QAAS,QACTC,UAAW,UACXC,SAAU,SACVC,QAAS"}
|
package/dist/chips.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
|
|
8
|
+
import { createComponent } from '@lit/react';
|
|
10
9
|
import { M3eAssistChipElement, M3eChipElement, M3eChipSetElement, M3eFilterChipElement, M3eFilterChipSetElement, M3eInputChipElement, M3eInputChipSetElement, M3eSuggestionChipElement } from '@m3e/web/chips';
|
|
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-assist-chip` Web Component from `@m3e/web/chips`.
|
|
45
13
|
*
|
package/dist/chips.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chips.js","sources":["../../src/utils/createComponent.ts","../../src/chips/AssistChip.ts","../../src/chips/Chip.ts","../../src/chips/ChipSet.ts","../../src/chips/FilterChip.ts","../../src/chips/FilterChipSet.ts","../../src/chips/InputChip.ts","../../src/chips/InputChipSet.ts","../../src/chips/SuggestionChip.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 { M3eAssistChipElement } from \"@m3e/web/chips\";\r\nexport type { M3eAssistChipElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-assist-chip` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-assist-chip>` 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-assist-chip>` instance for imperative access.\r\n *\r\n * See the `m3e-assist-chip` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eAssistChip = createComponent({\r\n tagName: \"m3e-assist-chip\",\r\n elementClass: M3eAssistChipElement,\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 { M3eChipElement } from \"@m3e/web/chips\";\r\nexport type { ChipVariant, M3eChipElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-chip` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-chip>` 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-chip>` instance for imperative access.\r\n *\r\n * See the `m3e-chip` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eChip = createComponent({\r\n tagName: \"m3e-chip\",\r\n elementClass: M3eChipElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eChipSetElement } from \"@m3e/web/chips\";\r\nexport type { M3eChipSetElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-chip-set` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-chip-set>` 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-chip-set>` instance for imperative access.\r\n *\r\n * See the `m3e-chip-set` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eChipSet = createComponent({\r\n tagName: \"m3e-chip-set\",\r\n elementClass: M3eChipSetElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eFilterChipElement } from \"@m3e/web/chips\";\r\nexport type { M3eFilterChipElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-filter-chip` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-filter-chip>` 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-filter-chip>` instance for imperative access.\r\n *\r\n * See the `m3e-filter-chip` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eFilterChip = createComponent({\r\n tagName: \"m3e-filter-chip\",\r\n elementClass: M3eFilterChipElement,\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 { M3eFilterChipSetElement } from \"@m3e/web/chips\";\r\nexport type { M3eFilterChipSetElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-filter-chip-set` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-filter-chip-set>` 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-filter-chip-set>` instance for imperative access.\r\n *\r\n * See the `m3e-filter-chip-set` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eFilterChipSet = createComponent({\r\n tagName: \"m3e-filter-chip-set\",\r\n elementClass: M3eFilterChipSetElement,\r\n react: React,\r\n events: {\r\n onInput: \"input\",\r\n onChange: \"change\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eInputChipElement } from \"@m3e/web/chips\";\r\nexport type { M3eInputChipElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-input-chip` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-input-chip>` 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-input-chip>` instance for imperative access.\r\n *\r\n * See the `m3e-input-chip` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eInputChip = createComponent({\r\n tagName: \"m3e-input-chip\",\r\n elementClass: M3eInputChipElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n onRemove: \"remove\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eInputChipSetElement } from \"@m3e/web/chips\";\r\nexport type { M3eInputChipSetElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-input-chip-set` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-input-chip-set>` 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-input-chip-set>` instance for imperative access.\r\n *\r\n * See the `m3e-input-chip-set` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eInputChipSet = createComponent({\r\n tagName: \"m3e-input-chip-set\",\r\n elementClass: M3eInputChipSetElement,\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 { M3eSuggestionChipElement } from \"@m3e/web/chips\";\r\nexport type { M3eSuggestionChipElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-suggestion-chip` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-suggestion-chip>` 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-suggestion-chip>` instance for imperative access.\r\n *\r\n * See the `m3e-suggestion-chip` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eSuggestionChip = createComponent({\r\n tagName: \"m3e-suggestion-chip\",\r\n elementClass: M3eSuggestionChipElement,\r\n react: React,\r\n events: {\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,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,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,UAAU,GAAG,eAAe,CAAC;AACxC,IAAA,OAAO,EAAE,cAAc;AACvB,IAAA,YAAY,EAAE,iBAAiB;AAC/B,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,qBAAqB;AAC9B,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;;ACrBD;;;;;;;;;;;;AAYG;AACI,MAAM,YAAY,GAAG,eAAe,CAAC;AAC1C,IAAA,OAAO,EAAE,gBAAgB;AACzB,IAAA,YAAY,EAAE,mBAAmB;AACjC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,OAAO;AAChB,QAAA,QAAQ,EAAE,QAAQ;AACnB,KAAA;AACF,CAAA;;ACrBD;;;;;;;;;;;;AAYG;AACI,MAAM,eAAe,GAAG,eAAe,CAAC;AAC7C,IAAA,OAAO,EAAE,oBAAoB;AAC7B,IAAA,YAAY,EAAE,sBAAsB;AACpC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,QAAQ;AACnB,KAAA;AACF,CAAA;;ACpBD;;;;;;;;;;;;AAYG;AACI,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAC/C,IAAA,OAAO,EAAE,qBAAqB;AAC9B,IAAA,YAAY,EAAE,wBAAwB;AACtC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,OAAO;AACjB,KAAA;AACF,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"chips.js","sources":["../../src/chips/AssistChip.ts","../../src/chips/Chip.ts","../../src/chips/ChipSet.ts","../../src/chips/FilterChip.ts","../../src/chips/FilterChipSet.ts","../../src/chips/InputChip.ts","../../src/chips/InputChipSet.ts","../../src/chips/SuggestionChip.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eAssistChipElement } from \"@m3e/web/chips\";\r\nexport type { M3eAssistChipElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-assist-chip` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-assist-chip>` 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-assist-chip>` instance for imperative access.\r\n *\r\n * See the `m3e-assist-chip` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eAssistChip = createComponent({\r\n tagName: \"m3e-assist-chip\",\r\n elementClass: M3eAssistChipElement,\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 { M3eChipElement } from \"@m3e/web/chips\";\r\nexport type { ChipVariant, M3eChipElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-chip` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-chip>` 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-chip>` instance for imperative access.\r\n *\r\n * See the `m3e-chip` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eChip = createComponent({\r\n tagName: \"m3e-chip\",\r\n elementClass: M3eChipElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eChipSetElement } from \"@m3e/web/chips\";\r\nexport type { M3eChipSetElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-chip-set` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-chip-set>` 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-chip-set>` instance for imperative access.\r\n *\r\n * See the `m3e-chip-set` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eChipSet = createComponent({\r\n tagName: \"m3e-chip-set\",\r\n elementClass: M3eChipSetElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eFilterChipElement } from \"@m3e/web/chips\";\r\nexport type { M3eFilterChipElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-filter-chip` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-filter-chip>` 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-filter-chip>` instance for imperative access.\r\n *\r\n * See the `m3e-filter-chip` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eFilterChip = createComponent({\r\n tagName: \"m3e-filter-chip\",\r\n elementClass: M3eFilterChipElement,\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 { M3eFilterChipSetElement } from \"@m3e/web/chips\";\r\nexport type { M3eFilterChipSetElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-filter-chip-set` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-filter-chip-set>` 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-filter-chip-set>` instance for imperative access.\r\n *\r\n * See the `m3e-filter-chip-set` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eFilterChipSet = createComponent({\r\n tagName: \"m3e-filter-chip-set\",\r\n elementClass: M3eFilterChipSetElement,\r\n react: React,\r\n events: {\r\n onInput: \"input\",\r\n onChange: \"change\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eInputChipElement } from \"@m3e/web/chips\";\r\nexport type { M3eInputChipElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-input-chip` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-input-chip>` 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-input-chip>` instance for imperative access.\r\n *\r\n * See the `m3e-input-chip` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eInputChip = createComponent({\r\n tagName: \"m3e-input-chip\",\r\n elementClass: M3eInputChipElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n onRemove: \"remove\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eInputChipSetElement } from \"@m3e/web/chips\";\r\nexport type { M3eInputChipSetElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-input-chip-set` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-input-chip-set>` 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-input-chip-set>` instance for imperative access.\r\n *\r\n * See the `m3e-input-chip-set` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eInputChipSet = createComponent({\r\n tagName: \"m3e-input-chip-set\",\r\n elementClass: M3eInputChipSetElement,\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 { M3eSuggestionChipElement } from \"@m3e/web/chips\";\r\nexport type { M3eSuggestionChipElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-suggestion-chip` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-suggestion-chip>` 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-suggestion-chip>` instance for imperative access.\r\n *\r\n * See the `m3e-suggestion-chip` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eSuggestionChip = createComponent({\r\n tagName: \"m3e-suggestion-chip\",\r\n elementClass: M3eSuggestionChipElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\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;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,OAAO;AACjB,KAAA;AACF,CAAA;;ACpBD;;;;;;;;;;;;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,UAAU,GAAG,eAAe,CAAC;AACxC,IAAA,OAAO,EAAE,cAAc;AACvB,IAAA,YAAY,EAAE,iBAAiB;AAC/B,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,qBAAqB;AAC9B,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;;ACrBD;;;;;;;;;;;;AAYG;AACI,MAAM,YAAY,GAAG,eAAe,CAAC;AAC1C,IAAA,OAAO,EAAE,gBAAgB;AACzB,IAAA,YAAY,EAAE,mBAAmB;AACjC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,OAAO;AAChB,QAAA,QAAQ,EAAE,QAAQ;AACnB,KAAA;AACF,CAAA;;ACrBD;;;;;;;;;;;;AAYG;AACI,MAAM,eAAe,GAAG,eAAe,CAAC;AAC7C,IAAA,OAAO,EAAE,oBAAoB;AAC7B,IAAA,YAAY,EAAE,sBAAsB;AACpC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,QAAQ;AACnB,KAAA;AACF,CAAA;;ACpBD;;;;;;;;;;;;AAYG;AACI,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAC/C,IAAA,OAAO,EAAE,qBAAqB;AAC9B,IAAA,YAAY,EAAE,wBAAwB;AACtC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,OAAO;AACjB,KAAA;AACF,CAAA;;;;"}
|
package/dist/chips.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
|
-
*/
|
|
5
|
+
*/
|
|
6
|
+
import e from"react";import{createComponent as t}from"@lit/react";import{M3eAssistChipElement as a,M3eChipElement as n,M3eChipSetElement as c,M3eFilterChipElement as m,M3eFilterChipSetElement as s,M3eInputChipElement as i,M3eInputChipSetElement as l,M3eSuggestionChipElement as o}from"@m3e/web/chips";const r=t({tagName:"m3e-assist-chip",elementClass:a,react:e,events:{onClick:"click"}}),p=t({tagName:"m3e-chip",elementClass:n,react:e}),g=t({tagName:"m3e-chip-set",elementClass:c,react:e}),h=t({tagName:"m3e-filter-chip",elementClass:m,react:e,events:{onInput:"input",onChange:"change",onClick:"click"}}),C=t({tagName:"m3e-filter-chip-set",elementClass:s,react:e,events:{onInput:"input",onChange:"change"}}),k=t({tagName:"m3e-input-chip",elementClass:i,react:e,events:{onClick:"click",onRemove:"remove"}}),v=t({tagName:"m3e-input-chip-set",elementClass:l,react:e,events:{onChange:"change"}}),N=t({tagName:"m3e-suggestion-chip",elementClass:o,react:e,events:{onClick:"click"}});export{r as M3eAssistChip,p as M3eChip,g as M3eChipSet,h as M3eFilterChip,C as M3eFilterChipSet,k as M3eInputChip,v as M3eInputChipSet,N as M3eSuggestionChip};
|
|
7
7
|
//# sourceMappingURL=chips.min.js.map
|
package/dist/chips.min.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chips.min.js","sources":["../../src/utils/createComponent.ts","../../src/chips/AssistChip.ts","../../src/chips/Chip.ts","../../src/chips/ChipSet.ts","../../src/chips/FilterChip.ts","../../src/chips/FilterChipSet.ts","../../src/chips/InputChip.ts","../../src/chips/InputChipSet.ts","../../src/chips/SuggestionChip.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 { M3eAssistChipElement } from \"@m3e/web/chips\";\r\nexport type { M3eAssistChipElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-assist-chip` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-assist-chip>` 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-assist-chip>` instance for imperative access.\r\n *\r\n * See the `m3e-assist-chip` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eAssistChip = createComponent({\r\n tagName: \"m3e-assist-chip\",\r\n elementClass: M3eAssistChipElement,\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 { M3eChipElement } from \"@m3e/web/chips\";\r\nexport type { ChipVariant, M3eChipElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-chip` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-chip>` 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-chip>` instance for imperative access.\r\n *\r\n * See the `m3e-chip` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eChip = createComponent({\r\n tagName: \"m3e-chip\",\r\n elementClass: M3eChipElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eChipSetElement } from \"@m3e/web/chips\";\r\nexport type { M3eChipSetElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-chip-set` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-chip-set>` 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-chip-set>` instance for imperative access.\r\n *\r\n * See the `m3e-chip-set` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eChipSet = createComponent({\r\n tagName: \"m3e-chip-set\",\r\n elementClass: M3eChipSetElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eFilterChipElement } from \"@m3e/web/chips\";\r\nexport type { M3eFilterChipElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-filter-chip` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-filter-chip>` 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-filter-chip>` instance for imperative access.\r\n *\r\n * See the `m3e-filter-chip` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eFilterChip = createComponent({\r\n tagName: \"m3e-filter-chip\",\r\n elementClass: M3eFilterChipElement,\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 { M3eFilterChipSetElement } from \"@m3e/web/chips\";\r\nexport type { M3eFilterChipSetElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-filter-chip-set` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-filter-chip-set>` 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-filter-chip-set>` instance for imperative access.\r\n *\r\n * See the `m3e-filter-chip-set` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eFilterChipSet = createComponent({\r\n tagName: \"m3e-filter-chip-set\",\r\n elementClass: M3eFilterChipSetElement,\r\n react: React,\r\n events: {\r\n onInput: \"input\",\r\n onChange: \"change\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eInputChipElement } from \"@m3e/web/chips\";\r\nexport type { M3eInputChipElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-input-chip` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-input-chip>` 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-input-chip>` instance for imperative access.\r\n *\r\n * See the `m3e-input-chip` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eInputChip = createComponent({\r\n tagName: \"m3e-input-chip\",\r\n elementClass: M3eInputChipElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n onRemove: \"remove\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eInputChipSetElement } from \"@m3e/web/chips\";\r\nexport type { M3eInputChipSetElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-input-chip-set` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-input-chip-set>` 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-input-chip-set>` instance for imperative access.\r\n *\r\n * See the `m3e-input-chip-set` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eInputChipSet = createComponent({\r\n tagName: \"m3e-input-chip-set\",\r\n elementClass: M3eInputChipSetElement,\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 { M3eSuggestionChipElement } from \"@m3e/web/chips\";\r\nexport type { M3eSuggestionChipElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-suggestion-chip` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-suggestion-chip>` 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-suggestion-chip>` instance for imperative access.\r\n *\r\n * See the `m3e-suggestion-chip` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eSuggestionChip = createComponent({\r\n tagName: \"m3e-suggestion-chip\",\r\n elementClass: M3eSuggestionChipElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n },\r\n});\r\n"],"names":["createComponent","react","tagName","elementClass","events","displayName","window","createReactComponent","M3eAssistChip","M3eAssistChipElement","React","onClick","M3eChip","M3eChipElement","M3eChipSet","M3eChipSetElement","M3eFilterChip","M3eFilterChipElement","onInput","onChange","M3eFilterChipSet","M3eFilterChipSetElement","M3eInputChip","M3eInputChipElement","onRemove","M3eInputChipSet","M3eInputChipSetElement","M3eSuggestionChip","M3eSuggestionChipElement"],"mappings":";;;;;gTA6BM,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,EACPN,OAAQ,CACNO,QAAS,WCLAC,EAAUZ,EAAgB,CACrCE,QAAS,WACTC,aAAcU,EACdZ,MAAOS,ICHII,EAAad,EAAgB,CACxCE,QAAS,eACTC,aAAcY,EACdd,MAAOS,ICHIM,EAAgBhB,EAAgB,CAC3CE,QAAS,kBACTC,aAAcc,EACdhB,MAAOS,EACPN,OAAQ,CACNc,QAAS,QACTC,SAAU,SACVR,QAAS,WCPAS,EAAmBpB,EAAgB,CAC9CE,QAAS,sBACTC,aAAckB,EACdpB,MAAOS,EACPN,OAAQ,CACNc,QAAS,QACTC,SAAU,YCNDG,EAAetB,EAAgB,CAC1CE,QAAS,iBACTC,aAAcoB,EACdtB,MAAOS,EACPN,OAAQ,CACNO,QAAS,QACTa,SAAU,YCNDC,EAAkBzB,EAAgB,CAC7CE,QAAS,qBACTC,aAAcuB,EACdzB,MAAOS,EACPN,OAAQ,CACNe,SAAU,YCLDQ,EAAoB3B,EAAgB,CAC/CE,QAAS,sBACTC,aAAcyB,EACd3B,MAAOS,EACPN,OAAQ,CACNO,QAAS"}
|
|
1
|
+
{"version":3,"file":"chips.min.js","sources":["../../src/chips/AssistChip.ts","../../src/chips/Chip.ts","../../src/chips/ChipSet.ts","../../src/chips/FilterChip.ts","../../src/chips/FilterChipSet.ts","../../src/chips/InputChip.ts","../../src/chips/InputChipSet.ts","../../src/chips/SuggestionChip.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eAssistChipElement } from \"@m3e/web/chips\";\r\nexport type { M3eAssistChipElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-assist-chip` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-assist-chip>` 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-assist-chip>` instance for imperative access.\r\n *\r\n * See the `m3e-assist-chip` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eAssistChip = createComponent({\r\n tagName: \"m3e-assist-chip\",\r\n elementClass: M3eAssistChipElement,\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 { M3eChipElement } from \"@m3e/web/chips\";\r\nexport type { ChipVariant, M3eChipElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-chip` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-chip>` 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-chip>` instance for imperative access.\r\n *\r\n * See the `m3e-chip` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eChip = createComponent({\r\n tagName: \"m3e-chip\",\r\n elementClass: M3eChipElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eChipSetElement } from \"@m3e/web/chips\";\r\nexport type { M3eChipSetElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-chip-set` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-chip-set>` 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-chip-set>` instance for imperative access.\r\n *\r\n * See the `m3e-chip-set` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eChipSet = createComponent({\r\n tagName: \"m3e-chip-set\",\r\n elementClass: M3eChipSetElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eFilterChipElement } from \"@m3e/web/chips\";\r\nexport type { M3eFilterChipElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-filter-chip` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-filter-chip>` 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-filter-chip>` instance for imperative access.\r\n *\r\n * See the `m3e-filter-chip` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eFilterChip = createComponent({\r\n tagName: \"m3e-filter-chip\",\r\n elementClass: M3eFilterChipElement,\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 { M3eFilterChipSetElement } from \"@m3e/web/chips\";\r\nexport type { M3eFilterChipSetElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-filter-chip-set` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-filter-chip-set>` 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-filter-chip-set>` instance for imperative access.\r\n *\r\n * See the `m3e-filter-chip-set` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eFilterChipSet = createComponent({\r\n tagName: \"m3e-filter-chip-set\",\r\n elementClass: M3eFilterChipSetElement,\r\n react: React,\r\n events: {\r\n onInput: \"input\",\r\n onChange: \"change\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eInputChipElement } from \"@m3e/web/chips\";\r\nexport type { M3eInputChipElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-input-chip` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-input-chip>` 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-input-chip>` instance for imperative access.\r\n *\r\n * See the `m3e-input-chip` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eInputChip = createComponent({\r\n tagName: \"m3e-input-chip\",\r\n elementClass: M3eInputChipElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n onRemove: \"remove\",\r\n },\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"@lit/react\";\r\n\r\nimport { M3eInputChipSetElement } from \"@m3e/web/chips\";\r\nexport type { M3eInputChipSetElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-input-chip-set` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-input-chip-set>` 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-input-chip-set>` instance for imperative access.\r\n *\r\n * See the `m3e-input-chip-set` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eInputChipSet = createComponent({\r\n tagName: \"m3e-input-chip-set\",\r\n elementClass: M3eInputChipSetElement,\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 { M3eSuggestionChipElement } from \"@m3e/web/chips\";\r\nexport type { M3eSuggestionChipElement } from \"@m3e/web/chips\";\r\n\r\n/**\r\n * React binding for the `m3e-suggestion-chip` Web Component from `@m3e/web/chips`.\r\n *\r\n * This component renders the underlying `<m3e-suggestion-chip>` 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-suggestion-chip>` instance for imperative access.\r\n *\r\n * See the `m3e-suggestion-chip` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eSuggestionChip = createComponent({\r\n tagName: \"m3e-suggestion-chip\",\r\n elementClass: M3eSuggestionChipElement,\r\n react: React,\r\n events: {\r\n onClick: \"click\",\r\n },\r\n});\r\n"],"names":["M3eAssistChip","createComponent","tagName","elementClass","M3eAssistChipElement","react","React","events","onClick","M3eChip","M3eChipElement","M3eChipSet","M3eChipSetElement","M3eFilterChip","M3eFilterChipElement","onInput","onChange","M3eFilterChipSet","M3eFilterChipSetElement","M3eInputChip","M3eInputChipElement","onRemove","M3eInputChipSet","M3eInputChipSetElement","M3eSuggestionChip","M3eSuggestionChipElement"],"mappings":";;;;;6SAmBO,MAAMA,EAAgBC,EAAgB,CAC3CC,QAAS,kBACTC,aAAcC,EACdC,MAAOC,EACPC,OAAQ,CACNC,QAAS,WCLAC,EAAUR,EAAgB,CACrCC,QAAS,WACTC,aAAcO,EACdL,MAAOC,ICHIK,EAAaV,EAAgB,CACxCC,QAAS,eACTC,aAAcS,EACdP,MAAOC,ICHIO,EAAgBZ,EAAgB,CAC3CC,QAAS,kBACTC,aAAcW,EACdT,MAAOC,EACPC,OAAQ,CACNQ,QAAS,QACTC,SAAU,SACVR,QAAS,WCPAS,EAAmBhB,EAAgB,CAC9CC,QAAS,sBACTC,aAAce,EACdb,MAAOC,EACPC,OAAQ,CACNQ,QAAS,QACTC,SAAU,YCNDG,EAAelB,EAAgB,CAC1CC,QAAS,iBACTC,aAAciB,EACdf,MAAOC,EACPC,OAAQ,CACNC,QAAS,QACTa,SAAU,YCNDC,EAAkBrB,EAAgB,CAC7CC,QAAS,qBACTC,aAAcoB,EACdlB,MAAOC,EACPC,OAAQ,CACNS,SAAU,YCLDQ,EAAoBvB,EAAgB,CAC/CC,QAAS,sBACTC,aAAcsB,EACdpB,MAAOC,EACPC,OAAQ,CACNC,QAAS"}
|
package/dist/core.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
|
|
8
|
+
import { createComponent } from '@lit/react';
|
|
10
9
|
import { M3eCollapsibleElement, M3eElevationElement, M3eFocusRingElement, M3ePseudoCheckboxElement, M3ePseudoRadioElement, M3eRippleElement, M3eScrollContainerElement, M3eSlideElement, M3eStateLayerElement, M3eTextHighlightElement, M3eTextOverflowElement } from '@m3e/web/core';
|
|
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-collapsible` Web Component from `@m3e/web/web/core`.
|
|
45
13
|
*
|