@m3e/react 2.0.0 → 2.0.2
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 +1 -7
- package/dist/all.js +338 -91
- package/dist/all.js.map +1 -1
- package/dist/all.min.js +1 -1
- package/dist/all.min.js.map +1 -1
- package/dist/app-bar.js +33 -2
- package/dist/app-bar.js.map +1 -1
- package/dist/app-bar.min.js +1 -1
- package/dist/app-bar.min.js.map +1 -1
- package/dist/autocomplete.js +33 -2
- package/dist/autocomplete.js.map +1 -1
- package/dist/autocomplete.min.js +1 -1
- package/dist/autocomplete.min.js.map +1 -1
- package/dist/avatar.js +33 -2
- package/dist/avatar.js.map +1 -1
- package/dist/avatar.min.js +1 -1
- package/dist/avatar.min.js.map +1 -1
- package/dist/badge.js +33 -2
- package/dist/badge.js.map +1 -1
- package/dist/badge.min.js +1 -1
- package/dist/badge.min.js.map +1 -1
- package/dist/bottom-sheet.js +35 -4
- package/dist/bottom-sheet.js.map +1 -1
- package/dist/bottom-sheet.min.js +1 -1
- package/dist/bottom-sheet.min.js.map +1 -1
- package/dist/button-group.js +33 -2
- package/dist/button-group.js.map +1 -1
- package/dist/button-group.min.js +1 -1
- package/dist/button-group.min.js.map +1 -1
- package/dist/button.js +33 -2
- package/dist/button.js.map +1 -1
- package/dist/button.min.js +1 -1
- package/dist/button.min.js.map +1 -1
- package/dist/card.js +33 -2
- package/dist/card.js.map +1 -1
- package/dist/card.min.js +1 -1
- package/dist/card.min.js.map +1 -1
- package/dist/checkbox.js +33 -2
- package/dist/checkbox.js.map +1 -1
- package/dist/checkbox.min.js +1 -1
- package/dist/checkbox.min.js.map +1 -1
- package/dist/chips.js +40 -9
- package/dist/chips.js.map +1 -1
- package/dist/chips.min.js +1 -1
- package/dist/chips.min.js.map +1 -1
- package/dist/core.js +259 -0
- package/dist/core.js.map +1 -0
- package/dist/core.min.js +7 -0
- package/dist/core.min.js.map +1 -0
- package/dist/dialog.js +35 -4
- package/dist/dialog.js.map +1 -1
- package/dist/dialog.min.js +1 -1
- package/dist/dialog.min.js.map +1 -1
- package/dist/divider.js +33 -2
- package/dist/divider.js.map +1 -1
- package/dist/divider.min.js +1 -1
- package/dist/divider.min.js.map +1 -1
- package/dist/drawer-container.js +34 -3
- package/dist/drawer-container.js.map +1 -1
- package/dist/drawer-container.min.js +1 -1
- package/dist/drawer-container.min.js.map +1 -1
- package/dist/expansion-panel.js +34 -3
- package/dist/expansion-panel.js.map +1 -1
- package/dist/expansion-panel.min.js +1 -1
- package/dist/expansion-panel.min.js.map +1 -1
- package/dist/fab-menu.js +35 -4
- package/dist/fab-menu.js.map +1 -1
- package/dist/fab-menu.min.js +1 -1
- package/dist/fab-menu.min.js.map +1 -1
- package/dist/fab.js +33 -2
- package/dist/fab.js.map +1 -1
- package/dist/fab.min.js +1 -1
- package/dist/fab.min.js.map +1 -1
- package/dist/form-field.js +33 -2
- package/dist/form-field.js.map +1 -1
- package/dist/form-field.min.js +1 -1
- package/dist/form-field.min.js.map +1 -1
- package/dist/heading.js +33 -2
- package/dist/heading.js.map +1 -1
- package/dist/heading.min.js +1 -1
- package/dist/heading.min.js.map +1 -1
- package/dist/icon-button.js +33 -2
- package/dist/icon-button.js.map +1 -1
- package/dist/icon-button.min.js +1 -1
- package/dist/icon-button.min.js.map +1 -1
- package/dist/icon.js +33 -2
- package/dist/icon.js.map +1 -1
- package/dist/icon.min.js +1 -1
- package/dist/icon.min.js.map +1 -1
- package/dist/list.js +39 -8
- package/dist/list.js.map +1 -1
- package/dist/list.min.js +1 -1
- package/dist/list.min.js.map +1 -1
- package/dist/loading-indicator.js +33 -2
- package/dist/loading-indicator.js.map +1 -1
- package/dist/loading-indicator.min.js +1 -1
- package/dist/loading-indicator.min.js.map +1 -1
- package/dist/menu.js +38 -7
- package/dist/menu.js.map +1 -1
- package/dist/menu.min.js +1 -1
- package/dist/menu.min.js.map +1 -1
- package/dist/nav-bar.js +34 -3
- package/dist/nav-bar.js.map +1 -1
- package/dist/nav-bar.min.js +1 -1
- package/dist/nav-bar.min.js.map +1 -1
- package/dist/nav-menu.js +35 -4
- package/dist/nav-menu.js.map +1 -1
- package/dist/nav-menu.min.js +1 -1
- package/dist/nav-menu.min.js.map +1 -1
- package/dist/nav-rail.js +34 -3
- package/dist/nav-rail.js.map +1 -1
- package/dist/nav-rail.min.js +1 -1
- package/dist/nav-rail.min.js.map +1 -1
- package/dist/option.js +34 -3
- package/dist/option.js.map +1 -1
- package/dist/option.min.js +1 -1
- package/dist/option.min.js.map +1 -1
- package/dist/paginator.js +1 -1
- package/dist/paginator.js.map +1 -1
- package/dist/paginator.min.js.map +1 -1
- package/dist/progress-indicator.js +34 -3
- package/dist/progress-indicator.js.map +1 -1
- package/dist/progress-indicator.min.js +1 -1
- package/dist/progress-indicator.min.js.map +1 -1
- package/dist/radio-group.js +34 -3
- package/dist/radio-group.js.map +1 -1
- package/dist/radio-group.min.js +1 -1
- package/dist/radio-group.min.js.map +1 -1
- package/dist/segmented-button.js +34 -3
- package/dist/segmented-button.js.map +1 -1
- package/dist/segmented-button.min.js +1 -1
- package/dist/segmented-button.min.js.map +1 -1
- package/dist/select.js +33 -2
- package/dist/select.js.map +1 -1
- package/dist/select.min.js +1 -1
- package/dist/select.min.js.map +1 -1
- package/dist/shape.js +33 -2
- package/dist/shape.js.map +1 -1
- package/dist/shape.min.js +1 -1
- package/dist/shape.min.js.map +1 -1
- package/dist/slide-group.js +33 -2
- package/dist/slide-group.js.map +1 -1
- package/dist/slide-group.min.js +1 -1
- package/dist/slide-group.min.js.map +1 -1
- package/dist/slider.js +34 -3
- package/dist/slider.js.map +1 -1
- package/dist/slider.min.js +1 -1
- package/dist/slider.min.js.map +1 -1
- package/dist/split-button.js +33 -2
- package/dist/split-button.js.map +1 -1
- package/dist/split-button.min.js +1 -1
- package/dist/split-button.min.js.map +1 -1
- package/dist/src/all.d.ts +1 -0
- package/dist/src/all.d.ts.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/bottom-sheet/BottomSheet.d.ts +1 -1
- package/dist/src/bottom-sheet/BottomSheetAction.d.ts +1 -1
- package/dist/src/bottom-sheet/BottomSheetTrigger.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/chips/AssistChip.d.ts +1 -1
- package/dist/src/chips/Chip.d.ts +1 -1
- package/dist/src/chips/ChipSet.d.ts +1 -1
- package/dist/src/chips/FilterChip.d.ts +1 -1
- package/dist/src/chips/FilterChipSet.d.ts +1 -1
- package/dist/src/chips/InputChip.d.ts +1 -1
- package/dist/src/chips/InputChipSet.d.ts +1 -1
- package/dist/src/chips/SuggestionChip.d.ts +1 -1
- package/dist/src/core/Collapsible.d.ts +22 -0
- package/dist/src/core/Collapsible.d.ts.map +1 -0
- package/dist/src/core/Elevation.d.ts +17 -0
- package/dist/src/core/Elevation.d.ts.map +1 -0
- package/dist/src/core/FocusRing.d.ts +17 -0
- package/dist/src/core/FocusRing.d.ts.map +1 -0
- package/dist/src/core/PseudoCheckbox.d.ts +17 -0
- package/dist/src/core/PseudoCheckbox.d.ts.map +1 -0
- package/dist/src/core/PseudoRadio.d.ts +17 -0
- package/dist/src/core/PseudoRadio.d.ts.map +1 -0
- package/dist/src/core/Ripple.d.ts +17 -0
- package/dist/src/core/Ripple.d.ts.map +1 -0
- package/dist/src/core/ScrollContainer.d.ts +17 -0
- package/dist/src/core/ScrollContainer.d.ts.map +1 -0
- package/dist/src/core/Slide.d.ts +17 -0
- package/dist/src/core/Slide.d.ts.map +1 -0
- package/dist/src/core/StateLayer.d.ts +17 -0
- package/dist/src/core/StateLayer.d.ts.map +1 -0
- package/dist/src/core/TextHighlight.d.ts +17 -0
- package/dist/src/core/TextHighlight.d.ts.map +1 -0
- package/dist/src/core/TextOverflow.d.ts +17 -0
- package/dist/src/core/TextOverflow.d.ts.map +1 -0
- package/dist/src/core/index.d.ts +12 -0
- package/dist/src/core/index.d.ts.map +1 -0
- package/dist/src/dialog/Dialog.d.ts +1 -1
- package/dist/src/dialog/DialogAction.d.ts +1 -1
- package/dist/src/dialog/DialogTrigger.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/src/drawer-container/DrawerToggle.d.ts +1 -1
- package/dist/src/expansion-panel/Accordion.d.ts +1 -1
- package/dist/src/expansion-panel/ExpansionPanel.d.ts +1 -1
- package/dist/src/fab/Fab.d.ts +1 -1
- package/dist/src/fab-menu/FabMenu.d.ts +1 -1
- package/dist/src/fab-menu/FabMenuItem.d.ts +1 -1
- package/dist/src/fab-menu/FabMenuTrigger.d.ts +1 -1
- package/dist/src/form-field/FormField.d.ts +1 -1
- package/dist/src/heading/Heading.d.ts +1 -1
- package/dist/src/icon/Icon.d.ts +1 -1
- package/dist/src/icon-button/IconButton.d.ts +1 -1
- package/dist/src/list/ActionList.d.ts +1 -1
- package/dist/src/list/ExpandableListItem.d.ts +1 -1
- package/dist/src/list/List.d.ts +1 -1
- package/dist/src/list/ListAction.d.ts +1 -1
- package/dist/src/list/ListItem.d.ts +1 -1
- package/dist/src/list/ListOption.d.ts +1 -1
- package/dist/src/list/SelectionList.d.ts +1 -1
- package/dist/src/loading-indicator/LoadingIndicator.d.ts +1 -1
- package/dist/src/menu/Menu.d.ts +1 -1
- package/dist/src/menu/MenuItem.d.ts +1 -1
- package/dist/src/menu/MenuItemCheckbox.d.ts +1 -1
- package/dist/src/menu/MenuItemGroup.d.ts +1 -1
- package/dist/src/menu/MenuItemRadio.d.ts +1 -1
- package/dist/src/menu/MenuTrigger.d.ts +1 -1
- package/dist/src/nav-bar/NavBar.d.ts +1 -1
- package/dist/src/nav-bar/NavItem.d.ts +1 -1
- package/dist/src/nav-menu/NavMenu.d.ts +1 -1
- package/dist/src/nav-menu/NavMenuItem.d.ts +1 -1
- package/dist/src/nav-menu/NavMenuItemGroup.d.ts +1 -1
- package/dist/src/nav-rail/NavRail.d.ts +1 -1
- package/dist/src/nav-rail/NavRailToggle.d.ts +1 -1
- package/dist/src/option/OptGroup.d.ts +1 -1
- package/dist/src/option/Option.d.ts +1 -1
- package/dist/src/paginator/Paginator.d.ts +1 -1
- package/dist/src/progress-indicator/CircularProgressIndicator.d.ts +1 -1
- package/dist/src/progress-indicator/LinearProgressIndicator.d.ts +1 -1
- package/dist/src/radio-group/Radio.d.ts +1 -1
- package/dist/src/radio-group/RadioGroup.d.ts +1 -1
- package/dist/src/segmented-button/ButtonSegment.d.ts +1 -1
- package/dist/src/segmented-button/SegmentedButton.d.ts +1 -1
- package/dist/src/select/Select.d.ts +1 -1
- package/dist/src/shape/Shape.d.ts +1 -1
- package/dist/src/slide-group/SlideGroup.d.ts +1 -1
- package/dist/src/slider/Slider.d.ts +1 -1
- package/dist/src/slider/SliderThumb.d.ts +1 -1
- package/dist/src/split-button/SplitButton.d.ts +1 -1
- package/dist/src/stepper/Step.d.ts +1 -1
- package/dist/src/stepper/StepPanel.d.ts +1 -1
- package/dist/src/stepper/Stepper.d.ts +1 -1
- package/dist/src/stepper/StepperNext.d.ts +1 -1
- package/dist/src/stepper/StepperPrevious.d.ts +1 -1
- package/dist/src/stepper/StepperReset.d.ts +1 -1
- package/dist/src/switch/Switch.d.ts +1 -1
- package/dist/src/tabs/Tab.d.ts +1 -1
- package/dist/src/tabs/TabPanel.d.ts +1 -1
- package/dist/src/tabs/Tabs.d.ts +1 -1
- package/dist/src/textarea-autosize/TextareaAutosize.d.ts +1 -1
- package/dist/src/theme/Theme.d.ts +1 -1
- package/dist/src/toc/Toc.d.ts +1 -1
- package/dist/src/toolbar/Toolbar.d.ts +1 -1
- package/dist/src/tooltip/RichTooltip.d.ts +1 -1
- package/dist/src/tooltip/RichTooltipAction.d.ts +1 -1
- package/dist/src/tooltip/Tooltip.d.ts +1 -1
- package/dist/src/utils/createComponent.d.ts +29 -0
- package/dist/src/utils/createComponent.d.ts.map +1 -0
- package/dist/src/utils/index.d.ts +2 -0
- package/dist/src/utils/index.d.ts.map +1 -0
- package/dist/stepper.js +38 -7
- package/dist/stepper.js.map +1 -1
- package/dist/stepper.min.js +1 -1
- package/dist/stepper.min.js.map +1 -1
- package/dist/switch.js +33 -2
- package/dist/switch.js.map +1 -1
- package/dist/switch.min.js +1 -1
- package/dist/switch.min.js.map +1 -1
- package/dist/tabs.js +35 -4
- package/dist/tabs.js.map +1 -1
- package/dist/tabs.min.js +1 -1
- package/dist/tabs.min.js.map +1 -1
- package/dist/textarea-autosize.js +33 -2
- package/dist/textarea-autosize.js.map +1 -1
- package/dist/textarea-autosize.min.js +1 -1
- package/dist/textarea-autosize.min.js.map +1 -1
- package/dist/theme.js +33 -2
- package/dist/theme.js.map +1 -1
- package/dist/theme.min.js +1 -1
- package/dist/theme.min.js.map +1 -1
- package/dist/toc.js +33 -2
- package/dist/toc.js.map +1 -1
- package/dist/toc.min.js +1 -1
- package/dist/toc.min.js.map +1 -1
- package/dist/toolbar.js +33 -2
- package/dist/toolbar.js.map +1 -1
- package/dist/toolbar.min.js +1 -1
- package/dist/toolbar.min.js.map +1 -1
- package/dist/tooltip.js +35 -4
- package/dist/tooltip.js.map +1 -1
- package/dist/tooltip.min.js +1 -1
- package/dist/tooltip.min.js.map +1 -1
- package/package.json +6 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M3eSliderThumbElement } from "@m3e/web/slider";
|
|
2
2
|
export type { M3eSliderThumbElement } from "@m3e/web/slider";
|
|
3
3
|
/**
|
|
4
|
-
* React binding for the `m3e-slider-thumb` Web Component from `@m3e/slider`.
|
|
4
|
+
* React binding for the `m3e-slider-thumb` Web Component from `@m3e/web/slider`.
|
|
5
5
|
*
|
|
6
6
|
* This component renders the underlying `<m3e-slider-thumb>` element and exposes its
|
|
7
7
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M3eSplitButtonElement } from "@m3e/web/split-button";
|
|
2
2
|
export type { M3eSplitButtonElement, SplitButtonVariant } from "@m3e/web/split-button";
|
|
3
3
|
/**
|
|
4
|
-
* React binding for the `m3e-split-button` Web Component from `@m3e/split-button`.
|
|
4
|
+
* React binding for the `m3e-split-button` Web Component from `@m3e/web/split-button`.
|
|
5
5
|
*
|
|
6
6
|
* This component renders the underlying `<m3e-split-button>` element and exposes its
|
|
7
7
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M3eStepElement } from "@m3e/web/stepper";
|
|
2
2
|
export type { M3eStepElement } from "@m3e/web/stepper";
|
|
3
3
|
/**
|
|
4
|
-
* React binding for the `m3e-step` Web Component from `@m3e/stepper`.
|
|
4
|
+
* React binding for the `m3e-step` Web Component from `@m3e/web/stepper`.
|
|
5
5
|
*
|
|
6
6
|
* This component renders the underlying `<m3e-step>` element and exposes its
|
|
7
7
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M3eStepPanelElement } from "@m3e/web/stepper";
|
|
2
2
|
export type { M3eStepPanelElement } from "@m3e/web/stepper";
|
|
3
3
|
/**
|
|
4
|
-
* React binding for the `m3e-step-panel` Web Component from `@m3e/stepper`.
|
|
4
|
+
* React binding for the `m3e-step-panel` Web Component from `@m3e/web/stepper`.
|
|
5
5
|
*
|
|
6
6
|
* This component renders the underlying `<m3e-step-panel>` element and exposes its
|
|
7
7
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M3eStepperElement } from "@m3e/web/stepper";
|
|
2
2
|
export type { M3eStepperElement, StepperOrientation, StepLabelPosition, StepHeaderPosition } from "@m3e/web/stepper";
|
|
3
3
|
/**
|
|
4
|
-
* React binding for the `m3e-stepper` Web Component from `@m3e/stepper`.
|
|
4
|
+
* React binding for the `m3e-stepper` Web Component from `@m3e/web/stepper`.
|
|
5
5
|
*
|
|
6
6
|
* This component renders the underlying `<m3e-stepper>` element and exposes its
|
|
7
7
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M3eStepperNextElement } from "@m3e/web/stepper";
|
|
2
2
|
export type { M3eStepperNextElement } from "@m3e/web/stepper";
|
|
3
3
|
/**
|
|
4
|
-
* React binding for the `m3e-stepper-next` Web Component from `@m3e/stepper`.
|
|
4
|
+
* React binding for the `m3e-stepper-next` Web Component from `@m3e/web/stepper`.
|
|
5
5
|
*
|
|
6
6
|
* This component renders the underlying `<m3e-stepper-next>` element and exposes its
|
|
7
7
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M3eStepperPreviousElement } from "@m3e/web/stepper";
|
|
2
2
|
export type { M3eStepperPreviousElement } from "@m3e/web/stepper";
|
|
3
3
|
/**
|
|
4
|
-
* React binding for the `m3e-stepper-previous` Web Component from `@m3e/stepper`.
|
|
4
|
+
* React binding for the `m3e-stepper-previous` Web Component from `@m3e/web/stepper`.
|
|
5
5
|
*
|
|
6
6
|
* This component renders the underlying `<m3e-stepper-previous>` element and exposes its
|
|
7
7
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M3eStepperResetElement } from "@m3e/web/stepper";
|
|
2
2
|
export type { M3eStepperResetElement } from "@m3e/web/stepper";
|
|
3
3
|
/**
|
|
4
|
-
* React binding for the `m3e-stepper-reset` Web Component from `@m3e/stepper`.
|
|
4
|
+
* React binding for the `m3e-stepper-reset` Web Component from `@m3e/web/stepper`.
|
|
5
5
|
*
|
|
6
6
|
* This component renders the underlying `<m3e-stepper-reset>` element and exposes its
|
|
7
7
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M3eSwitchElement } from "@m3e/web/switch";
|
|
2
2
|
export type { M3eSwitchElement, SwitchIcons } from "@m3e/web/switch";
|
|
3
3
|
/**
|
|
4
|
-
* React binding for the `m3e-switch` Web Component from `@m3e/switch`.
|
|
4
|
+
* React binding for the `m3e-switch` Web Component from `@m3e/web/switch`.
|
|
5
5
|
*
|
|
6
6
|
* This component renders the underlying `<m3e-switch>` element and exposes its
|
|
7
7
|
* properties, attributes, and events through an idiomatic React interface.
|
package/dist/src/tabs/Tab.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M3eTabElement } from "@m3e/web/tabs";
|
|
2
2
|
export type { M3eTabElement } from "@m3e/web/tabs";
|
|
3
3
|
/**
|
|
4
|
-
* React binding for the `m3e-tab` Web Component from `@m3e/tabs`.
|
|
4
|
+
* React binding for the `m3e-tab` Web Component from `@m3e/web/tabs`.
|
|
5
5
|
*
|
|
6
6
|
* This component renders the underlying `<m3e-tab>` element and exposes its
|
|
7
7
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M3eTabPanelElement } from "@m3e/web/tabs";
|
|
2
2
|
export type { M3eTabPanelElement } from "@m3e/web/tabs";
|
|
3
3
|
/**
|
|
4
|
-
* React binding for the `m3e-tab-panel` Web Component from `@m3e/tabs`.
|
|
4
|
+
* React binding for the `m3e-tab-panel` Web Component from `@m3e/web/tabs`.
|
|
5
5
|
*
|
|
6
6
|
* This component renders the underlying `<m3e-tab-panel>` element and exposes its
|
|
7
7
|
* properties, attributes, and events through an idiomatic React interface.
|
package/dist/src/tabs/Tabs.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M3eTabsElement } from "@m3e/web/tabs";
|
|
2
2
|
export type { M3eTabsElement, TabVariant, TabHeaderPosition } from "@m3e/web/tabs";
|
|
3
3
|
/**
|
|
4
|
-
* React binding for the `m3e-tabs` Web Component from `@m3e/tabs`.
|
|
4
|
+
* React binding for the `m3e-tabs` Web Component from `@m3e/web/tabs`.
|
|
5
5
|
*
|
|
6
6
|
* This component renders the underlying `<m3e-tabs>` element and exposes its
|
|
7
7
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M3eTextareaAutosizeElement } from "@m3e/web/textarea-autosize";
|
|
2
2
|
export type { M3eTextareaAutosizeElement } from "@m3e/web/textarea-autosize";
|
|
3
3
|
/**
|
|
4
|
-
* React binding for the `m3e-textarea-autosize` Web Component from `@m3e/textarea-autosize`.
|
|
4
|
+
* React binding for the `m3e-textarea-autosize` Web Component from `@m3e/web/textarea-autosize`.
|
|
5
5
|
*
|
|
6
6
|
* This component renders the underlying `<m3e-textarea-autosize>` element and exposes its
|
|
7
7
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M3eThemeElement } from "@m3e/web/theme";
|
|
2
2
|
export type { ColorScheme, ContrastLevel, MotionScheme, M3eThemeElement } from "@m3e/web/theme";
|
|
3
3
|
/**
|
|
4
|
-
* React binding for the `m3e-theme` Web Component from `@m3e/theme`.
|
|
4
|
+
* React binding for the `m3e-theme` Web Component from `@m3e/web/theme`.
|
|
5
5
|
*
|
|
6
6
|
* This component renders the underlying `<m3e-theme>` element and exposes its
|
|
7
7
|
* properties, attributes, and events through an idiomatic React interface.
|
package/dist/src/toc/Toc.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M3eTocElement } from "@m3e/web/toc";
|
|
2
2
|
export type { M3eTocElement } from "@m3e/web/toc";
|
|
3
3
|
/**
|
|
4
|
-
* React binding for the `m3e-toc` Web Component from `@m3e/toc`.
|
|
4
|
+
* React binding for the `m3e-toc` Web Component from `@m3e/web/toc`.
|
|
5
5
|
*
|
|
6
6
|
* This component renders the underlying `<m3e-toc>` element and exposes its
|
|
7
7
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M3eToolbarElement } from "@m3e/web/toolbar";
|
|
2
2
|
export type { M3eToolbarElement, ToolbarVariant, ToolbarShape } from "@m3e/web/toolbar";
|
|
3
3
|
/**
|
|
4
|
-
* React binding for the `m3e-toolbar` Web Component from `@m3e/toolbar`.
|
|
4
|
+
* React binding for the `m3e-toolbar` Web Component from `@m3e/web/toolbar`.
|
|
5
5
|
*
|
|
6
6
|
* This component renders the underlying `<m3e-toolbar>` element and exposes its
|
|
7
7
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M3eRichTooltipElement } from "@m3e/web/tooltip";
|
|
2
2
|
export type { M3eRichTooltipElement, RichTooltipPosition } from "@m3e/web/tooltip";
|
|
3
3
|
/**
|
|
4
|
-
* React binding for the `m3e-rich-tooltip` Web Component from `@m3e/tooltip`.
|
|
4
|
+
* React binding for the `m3e-rich-tooltip` Web Component from `@m3e/web/tooltip`.
|
|
5
5
|
*
|
|
6
6
|
* This component renders the underlying `<m3e-rich-tooltip>` element and exposes its
|
|
7
7
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M3eRichTooltipActionElement } from "@m3e/web/tooltip";
|
|
2
2
|
export type { M3eRichTooltipActionElement } from "@m3e/web/tooltip";
|
|
3
3
|
/**
|
|
4
|
-
* React binding for the `m3e-rich-tooltip-action` Web Component from `@m3e/tooltip`.
|
|
4
|
+
* React binding for the `m3e-rich-tooltip-action` Web Component from `@m3e/web/tooltip`.
|
|
5
5
|
*
|
|
6
6
|
* This component renders the underlying `<m3e-rich-tooltip-action>` element and exposes its
|
|
7
7
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M3eTooltipElement } from "@m3e/web/tooltip";
|
|
2
2
|
export type { M3eTooltipElement, TooltipPosition, TooltipTouchGestures } from "@m3e/web/tooltip";
|
|
3
3
|
/**
|
|
4
|
-
* React binding for the `m3e-tooltip` Web Component from `@m3e/tooltip`.
|
|
4
|
+
* React binding for the `m3e-tooltip` Web Component from `@m3e/web/tooltip`.
|
|
5
5
|
*
|
|
6
6
|
* This component renders the underlying `<m3e-tooltip>` element and exposes its
|
|
7
7
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EventName, Options, ReactWebComponent } from "@lit/react";
|
|
2
|
+
type EventNames = Record<string, EventName | string>;
|
|
3
|
+
/**
|
|
4
|
+
* Creates an SSR-safe React component for a custom element. Properties are distinguished
|
|
5
|
+
* from attributes automatically, and events can be configured so they are added
|
|
6
|
+
* to the custom element as event listeners.
|
|
7
|
+
*
|
|
8
|
+
* @param options An options bag containing the parameters needed to generate a
|
|
9
|
+
* wrapped web component.
|
|
10
|
+
*
|
|
11
|
+
* @param options.react The React module, typically imported from the `react`
|
|
12
|
+
* npm package.
|
|
13
|
+
* @param options.tagName The custom element tag name registered via
|
|
14
|
+
* `customElements.define`.
|
|
15
|
+
* @param options.elementClass The custom element class registered via
|
|
16
|
+
* `customElements.define`.
|
|
17
|
+
* @param options.events An object listing events to which the component can
|
|
18
|
+
* listen. The object keys are the event property names passed in via React
|
|
19
|
+
* props and the object values are the names of the corresponding events
|
|
20
|
+
* generated by the custom element. For example, given `{onactivate:
|
|
21
|
+
* 'activate'}` an event function may be passed via the component's `onactivate`
|
|
22
|
+
* prop and will be called when the custom element fires its `activate` event.
|
|
23
|
+
* @param options.displayName A React component display name, used in debugging
|
|
24
|
+
* messages. Default value is inferred from the name of custom element class
|
|
25
|
+
* registered via `customElements.define`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function createComponent<I extends HTMLElement, E extends EventNames = {}>({ react, tagName, elementClass, events, displayName, }: Options<I, E>): ReactWebComponent<I, E>;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=createComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../../../src/utils/createComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,SAAS,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE5G,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,wBAAgB,eAAe,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,UAAU,GAAG,EAAE,EAAE,EAChF,KAAK,EACL,OAAO,EACP,YAAY,EACZ,MAAM,EACN,WAAW,GACZ,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAIzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
package/dist/stepper.js
CHANGED
|
@@ -6,11 +6,42 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import { createComponent } from '@lit/react';
|
|
9
|
+
import { createComponent as createComponent$1 } from '@lit/react';
|
|
10
10
|
import { M3eStepElement, M3eStepPanelElement, M3eStepperElement, M3eStepperNextElement, M3eStepperPreviousElement, M3eStepperResetElement } from '@m3e/web/stepper';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* React
|
|
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
|
+
/**
|
|
44
|
+
* React binding for the `m3e-step` Web Component from `@m3e/web/stepper`.
|
|
14
45
|
*
|
|
15
46
|
* This component renders the underlying `<m3e-step>` element and exposes its
|
|
16
47
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -34,7 +65,7 @@ const M3eStep = createComponent({
|
|
|
34
65
|
});
|
|
35
66
|
|
|
36
67
|
/**
|
|
37
|
-
* React binding for the `m3e-step-panel` Web Component from `@m3e/stepper`.
|
|
68
|
+
* React binding for the `m3e-step-panel` Web Component from `@m3e/web/stepper`.
|
|
38
69
|
*
|
|
39
70
|
* This component renders the underlying `<m3e-step-panel>` element and exposes its
|
|
40
71
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -53,7 +84,7 @@ const M3eStepPanel = createComponent({
|
|
|
53
84
|
});
|
|
54
85
|
|
|
55
86
|
/**
|
|
56
|
-
* React binding for the `m3e-stepper` Web Component from `@m3e/stepper`.
|
|
87
|
+
* React binding for the `m3e-stepper` Web Component from `@m3e/web/stepper`.
|
|
57
88
|
*
|
|
58
89
|
* This component renders the underlying `<m3e-stepper>` element and exposes its
|
|
59
90
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -75,7 +106,7 @@ const M3eStepper = createComponent({
|
|
|
75
106
|
});
|
|
76
107
|
|
|
77
108
|
/**
|
|
78
|
-
* React binding for the `m3e-stepper-next` Web Component from `@m3e/stepper`.
|
|
109
|
+
* React binding for the `m3e-stepper-next` Web Component from `@m3e/web/stepper`.
|
|
79
110
|
*
|
|
80
111
|
* This component renders the underlying `<m3e-stepper-next>` element and exposes its
|
|
81
112
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -94,7 +125,7 @@ const M3eStepperNext = createComponent({
|
|
|
94
125
|
});
|
|
95
126
|
|
|
96
127
|
/**
|
|
97
|
-
* React binding for the `m3e-stepper-previous` Web Component from `@m3e/stepper`.
|
|
128
|
+
* React binding for the `m3e-stepper-previous` Web Component from `@m3e/web/stepper`.
|
|
98
129
|
*
|
|
99
130
|
* This component renders the underlying `<m3e-stepper-previous>` element and exposes its
|
|
100
131
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -113,7 +144,7 @@ const M3eStepperPrevious = createComponent({
|
|
|
113
144
|
});
|
|
114
145
|
|
|
115
146
|
/**
|
|
116
|
-
* React binding for the `m3e-stepper-reset` Web Component from `@m3e/stepper`.
|
|
147
|
+
* React binding for the `m3e-stepper-reset` Web Component from `@m3e/web/stepper`.
|
|
117
148
|
*
|
|
118
149
|
* This component renders the underlying `<m3e-stepper-reset>` element and exposes its
|
|
119
150
|
* properties, attributes, and events through an idiomatic React interface.
|
package/dist/stepper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stepper.js","sources":["../../src/stepper/Step.ts","../../src/stepper/StepPanel.ts","../../src/stepper/Stepper.ts","../../src/stepper/StepperNext.ts","../../src/stepper/StepperPrevious.ts","../../src/stepper/StepperReset.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"
|
|
1
|
+
{"version":3,"file":"stepper.js","sources":["../../src/utils/createComponent.ts","../../src/stepper/Step.ts","../../src/stepper/StepPanel.ts","../../src/stepper/Stepper.ts","../../src/stepper/StepperNext.ts","../../src/stepper/StepperPrevious.ts","../../src/stepper/StepperReset.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 { M3eStepElement } from \"@m3e/web/stepper\";\r\nexport type { M3eStepElement } from \"@m3e/web/stepper\";\r\n\r\n/**\r\n * React binding for the `m3e-step` Web Component from `@m3e/web/stepper`.\r\n *\r\n * This component renders the underlying `<m3e-step>` 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-step>` instance for imperative access.\r\n *\r\n * See the `m3e-step` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eStep = createComponent({\r\n tagName: \"m3e-step\",\r\n elementClass: M3eStepElement,\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 { M3eStepPanelElement } from \"@m3e/web/stepper\";\r\nexport type { M3eStepPanelElement } from \"@m3e/web/stepper\";\r\n\r\n/**\r\n * React binding for the `m3e-step-panel` Web Component from `@m3e/web/stepper`.\r\n *\r\n * This component renders the underlying `<m3e-step-panel>` 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-step-panel>` instance for imperative access.\r\n *\r\n * See the `m3e-step-panel` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eStepPanel = createComponent({\r\n tagName: \"m3e-step-panel\",\r\n elementClass: M3eStepPanelElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eStepperElement } from \"@m3e/web/stepper\";\r\nexport type { M3eStepperElement, StepperOrientation, StepLabelPosition, StepHeaderPosition } from \"@m3e/web/stepper\";\r\n\r\n/**\r\n * React binding for the `m3e-stepper` Web Component from `@m3e/web/stepper`.\r\n *\r\n * This component renders the underlying `<m3e-stepper>` 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-stepper>` instance for imperative access.\r\n *\r\n * See the `m3e-stepper` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eStepper = createComponent({\r\n tagName: \"m3e-stepper\",\r\n elementClass: M3eStepperElement,\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 { M3eStepperNextElement } from \"@m3e/web/stepper\";\r\nexport type { M3eStepperNextElement } from \"@m3e/web/stepper\";\r\n\r\n/**\r\n * React binding for the `m3e-stepper-next` Web Component from `@m3e/web/stepper`.\r\n *\r\n * This component renders the underlying `<m3e-stepper-next>` 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-stepper-next>` instance for imperative access.\r\n *\r\n * See the `m3e-stepper-next` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eStepperNext = createComponent({\r\n tagName: \"m3e-stepper-next\",\r\n elementClass: M3eStepperNextElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eStepperPreviousElement } from \"@m3e/web/stepper\";\r\nexport type { M3eStepperPreviousElement } from \"@m3e/web/stepper\";\r\n\r\n/**\r\n * React binding for the `m3e-stepper-previous` Web Component from `@m3e/web/stepper`.\r\n *\r\n * This component renders the underlying `<m3e-stepper-previous>` 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-stepper-previous>` instance for imperative access.\r\n *\r\n * See the `m3e-stepper-previous` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eStepperPrevious = createComponent({\r\n tagName: \"m3e-stepper-previous\",\r\n elementClass: M3eStepperPreviousElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eStepperResetElement } from \"@m3e/web/stepper\";\r\nexport type { M3eStepperResetElement } from \"@m3e/web/stepper\";\r\n\r\n/**\r\n * React binding for the `m3e-stepper-reset` Web Component from `@m3e/web/stepper`.\r\n *\r\n * This component renders the underlying `<m3e-stepper-reset>` 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-stepper-reset>` instance for imperative access.\r\n *\r\n * See the `m3e-stepper-reset` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eStepperReset = createComponent({\r\n tagName: \"m3e-stepper-reset\",\r\n elementClass: M3eStepperResetElement,\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,OAAO,EAAE,OAAO;AAChB,QAAA,QAAQ,EAAE,QAAQ;AAClB,QAAA,OAAO,EAAE,OAAO;AACjB,KAAA;AACF,CAAA;;ACtBD;;;;;;;;;;;;AAYG;AACI,MAAM,YAAY,GAAG,eAAe,CAAC;AAC1C,IAAA,OAAO,EAAE,gBAAgB;AACzB,IAAA,YAAY,EAAE,mBAAmB;AACjC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA;;ACjBD;;;;;;;;;;;;AAYG;AACI,MAAM,UAAU,GAAG,eAAe,CAAC;AACxC,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,YAAY,EAAE,iBAAiB;AAC/B,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,QAAQ;AACnB,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;;ACjBD;;;;;;;;;;;;AAYG;AACI,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAChD,IAAA,OAAO,EAAE,sBAAsB;AAC/B,IAAA,YAAY,EAAE,yBAAyB;AACvC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA;;ACjBD;;;;;;;;;;;;AAYG;AACI,MAAM,eAAe,GAAG,eAAe,CAAC;AAC7C,IAAA,OAAO,EAAE,mBAAmB;AAC5B,IAAA,YAAY,EAAE,sBAAsB;AACpC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA;;;;"}
|
package/dist/stepper.min.js
CHANGED
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* @license MIT
|
|
4
4
|
* Copyright (c) 2025 matraic
|
|
5
5
|
* See LICENSE file in the project root for full license text.
|
|
6
|
-
*/import e from"react";import{createComponent as t}from"@lit/react";import{M3eStepElement as a,M3eStepPanelElement as
|
|
6
|
+
*/import e from"react";import{createComponent as t}from"@lit/react";import{M3eStepElement as a,M3eStepPanelElement as n,M3eStepperElement as s,M3eStepperNextElement as m,M3eStepperPreviousElement as r,M3eStepperResetElement as l}from"@m3e/web/stepper";function p({react:e,tagName:a,elementClass:n,events:s,displayName:m}){return"undefined"!=typeof window?t({react:e,tagName:a,elementClass:n,events:s,displayName:m}):null}const c=p({tagName:"m3e-step",elementClass:a,react:e,events:{onInput:"input",onChange:"change",onClick:"click"}}),o=p({tagName:"m3e-step-panel",elementClass:n,react:e}),i=p({tagName:"m3e-stepper",elementClass:s,react:e,events:{onChange:"change"}}),g=p({tagName:"m3e-stepper-next",elementClass:m,react:e}),C=p({tagName:"m3e-stepper-previous",elementClass:r,react:e}),N=p({tagName:"m3e-stepper-reset",elementClass:l,react:e});export{c as M3eStep,o as M3eStepPanel,i as M3eStepper,g as M3eStepperNext,C as M3eStepperPrevious,N as M3eStepperReset};
|
|
7
7
|
//# sourceMappingURL=stepper.min.js.map
|
package/dist/stepper.min.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stepper.min.js","sources":["../../src/stepper/Step.ts","../../src/stepper/StepPanel.ts","../../src/stepper/Stepper.ts","../../src/stepper/StepperNext.ts","../../src/stepper/StepperPrevious.ts","../../src/stepper/StepperReset.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"
|
|
1
|
+
{"version":3,"file":"stepper.min.js","sources":["../../src/utils/createComponent.ts","../../src/stepper/Step.ts","../../src/stepper/StepPanel.ts","../../src/stepper/Stepper.ts","../../src/stepper/StepperNext.ts","../../src/stepper/StepperPrevious.ts","../../src/stepper/StepperReset.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 { M3eStepElement } from \"@m3e/web/stepper\";\r\nexport type { M3eStepElement } from \"@m3e/web/stepper\";\r\n\r\n/**\r\n * React binding for the `m3e-step` Web Component from `@m3e/web/stepper`.\r\n *\r\n * This component renders the underlying `<m3e-step>` 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-step>` instance for imperative access.\r\n *\r\n * See the `m3e-step` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eStep = createComponent({\r\n tagName: \"m3e-step\",\r\n elementClass: M3eStepElement,\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 { M3eStepPanelElement } from \"@m3e/web/stepper\";\r\nexport type { M3eStepPanelElement } from \"@m3e/web/stepper\";\r\n\r\n/**\r\n * React binding for the `m3e-step-panel` Web Component from `@m3e/web/stepper`.\r\n *\r\n * This component renders the underlying `<m3e-step-panel>` 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-step-panel>` instance for imperative access.\r\n *\r\n * See the `m3e-step-panel` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eStepPanel = createComponent({\r\n tagName: \"m3e-step-panel\",\r\n elementClass: M3eStepPanelElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eStepperElement } from \"@m3e/web/stepper\";\r\nexport type { M3eStepperElement, StepperOrientation, StepLabelPosition, StepHeaderPosition } from \"@m3e/web/stepper\";\r\n\r\n/**\r\n * React binding for the `m3e-stepper` Web Component from `@m3e/web/stepper`.\r\n *\r\n * This component renders the underlying `<m3e-stepper>` 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-stepper>` instance for imperative access.\r\n *\r\n * See the `m3e-stepper` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eStepper = createComponent({\r\n tagName: \"m3e-stepper\",\r\n elementClass: M3eStepperElement,\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 { M3eStepperNextElement } from \"@m3e/web/stepper\";\r\nexport type { M3eStepperNextElement } from \"@m3e/web/stepper\";\r\n\r\n/**\r\n * React binding for the `m3e-stepper-next` Web Component from `@m3e/web/stepper`.\r\n *\r\n * This component renders the underlying `<m3e-stepper-next>` 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-stepper-next>` instance for imperative access.\r\n *\r\n * See the `m3e-stepper-next` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eStepperNext = createComponent({\r\n tagName: \"m3e-stepper-next\",\r\n elementClass: M3eStepperNextElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eStepperPreviousElement } from \"@m3e/web/stepper\";\r\nexport type { M3eStepperPreviousElement } from \"@m3e/web/stepper\";\r\n\r\n/**\r\n * React binding for the `m3e-stepper-previous` Web Component from `@m3e/web/stepper`.\r\n *\r\n * This component renders the underlying `<m3e-stepper-previous>` 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-stepper-previous>` instance for imperative access.\r\n *\r\n * See the `m3e-stepper-previous` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eStepperPrevious = createComponent({\r\n tagName: \"m3e-stepper-previous\",\r\n elementClass: M3eStepperPreviousElement,\r\n react: React,\r\n});\r\n","import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eStepperResetElement } from \"@m3e/web/stepper\";\r\nexport type { M3eStepperResetElement } from \"@m3e/web/stepper\";\r\n\r\n/**\r\n * React binding for the `m3e-stepper-reset` Web Component from `@m3e/web/stepper`.\r\n *\r\n * This component renders the underlying `<m3e-stepper-reset>` 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-stepper-reset>` instance for imperative access.\r\n *\r\n * See the `m3e-stepper-reset` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eStepperReset = createComponent({\r\n tagName: \"m3e-stepper-reset\",\r\n elementClass: M3eStepperResetElement,\r\n react: React,\r\n});\r\n"],"names":["createComponent","react","tagName","elementClass","events","displayName","window","createReactComponent","M3eStep","M3eStepElement","React","onInput","onChange","onClick","M3eStepPanel","M3eStepPanelElement","M3eStepper","M3eStepperElement","M3eStepperNext","M3eStepperNextElement","M3eStepperPrevious","M3eStepperPreviousElement","M3eStepperReset","M3eStepperResetElement"],"mappings":";;;;;6PA6BM,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,QAAS,QACTC,SAAU,SACVC,QAAS,WCPAC,EAAed,EAAgB,CAC1CE,QAAS,iBACTC,aAAcY,EACdd,MAAOS,ICHIM,EAAahB,EAAgB,CACxCE,QAAS,cACTC,aAAcc,EACdhB,MAAOS,EACPN,OAAQ,CACNQ,SAAU,YCLDM,EAAiBlB,EAAgB,CAC5CE,QAAS,mBACTC,aAAcgB,EACdlB,MAAOS,ICHIU,EAAqBpB,EAAgB,CAChDE,QAAS,uBACTC,aAAckB,EACdpB,MAAOS,ICHIY,EAAkBtB,EAAgB,CAC7CE,QAAS,oBACTC,aAAcoB,EACdtB,MAAOS"}
|
package/dist/switch.js
CHANGED
|
@@ -6,11 +6,42 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import { createComponent } from '@lit/react';
|
|
9
|
+
import { createComponent as createComponent$1 } from '@lit/react';
|
|
10
10
|
import { M3eSwitchElement } from '@m3e/web/switch';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* React
|
|
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
|
+
/**
|
|
44
|
+
* React binding for the `m3e-switch` Web Component from `@m3e/web/switch`.
|
|
14
45
|
*
|
|
15
46
|
* This component renders the underlying `<m3e-switch>` element and exposes its
|
|
16
47
|
* properties, attributes, and events through an idiomatic React interface.
|
package/dist/switch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.js","sources":["../../src/switch/Switch.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"
|
|
1
|
+
{"version":3,"file":"switch.js","sources":["../../src/utils/createComponent.ts","../../src/switch/Switch.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 { M3eSwitchElement } from \"@m3e/web/switch\";\r\nexport type { M3eSwitchElement, SwitchIcons } from \"@m3e/web/switch\";\r\n\r\n/**\r\n * React binding for the `m3e-switch` Web Component from `@m3e/web/switch`.\r\n *\r\n * This component renders the underlying `<m3e-switch>` 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-switch>` instance for imperative access.\r\n *\r\n * See the `m3e-switch` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eSwitch = createComponent({\r\n tagName: \"m3e-switch\",\r\n elementClass: M3eSwitchElement,\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,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/switch.min.js
CHANGED
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* @license MIT
|
|
4
4
|
* Copyright (c) 2025 matraic
|
|
5
5
|
* See LICENSE file in the project root for full license text.
|
|
6
|
-
*/import e from"react";import{createComponent as t}from"@lit/react";import{M3eSwitchElement as
|
|
6
|
+
*/import e from"react";import{createComponent as t}from"@lit/react";import{M3eSwitchElement as n}from"@m3e/web/switch";const a=function({react:e,tagName:n,elementClass:a,events:m,displayName:o}){return"undefined"!=typeof window?t({react:e,tagName:n,elementClass:a,events:m,displayName:o}):null}({tagName:"m3e-switch",elementClass:n,react:e,events:{onInput:"input",onChange:"change",onClick:"click"}});export{a as M3eSwitch};
|
|
7
7
|
//# sourceMappingURL=switch.min.js.map
|
package/dist/switch.min.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.min.js","sources":["../../src/switch/Switch.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"
|
|
1
|
+
{"version":3,"file":"switch.min.js","sources":["../../src/switch/Switch.ts","../../src/utils/createComponent.ts"],"sourcesContent":["import React from \"react\";\r\nimport { createComponent } from \"../utils\";\r\n\r\nimport { M3eSwitchElement } from \"@m3e/web/switch\";\r\nexport type { M3eSwitchElement, SwitchIcons } from \"@m3e/web/switch\";\r\n\r\n/**\r\n * React binding for the `m3e-switch` Web Component from `@m3e/web/switch`.\r\n *\r\n * This component renders the underlying `<m3e-switch>` 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-switch>` instance for imperative access.\r\n *\r\n * See the `m3e-switch` documentation for full details on behavior, styling,\r\n * accessibility, and supported events.\r\n */\r\nexport const M3eSwitch = createComponent({\r\n tagName: \"m3e-switch\",\r\n elementClass: M3eSwitchElement,\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 { 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":["M3eSwitch","react","tagName","elementClass","events","displayName","window","createReactComponent","createComponent","M3eSwitchElement","React","onInput","onChange","onClick"],"mappings":";;;;;wHAmBO,MAAMA,ECUP,UAA4EC,MAChFA,EAAKC,QACLA,EAAOC,aACPA,EAAYC,OACZA,EAAMC,YACNA,IAEA,MAAyB,oBAAXC,OACVC,EAA2B,CAAEN,QAAOC,UAASC,eAAcC,SAAQC,gBAChC,IACzC,CDpByBG,CAAgB,CACvCN,QAAS,aACTC,aAAcM,EACdR,MAAOS,EACPN,OAAQ,CACNO,QAAS,QACTC,SAAU,SACVC,QAAS"}
|
package/dist/tabs.js
CHANGED
|
@@ -6,11 +6,42 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import { createComponent } from '@lit/react';
|
|
9
|
+
import { createComponent as createComponent$1 } from '@lit/react';
|
|
10
10
|
import { M3eTabElement, M3eTabPanelElement, M3eTabsElement } from '@m3e/web/tabs';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* React
|
|
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
|
+
/**
|
|
44
|
+
* React binding for the `m3e-tab` Web Component from `@m3e/web/tabs`.
|
|
14
45
|
*
|
|
15
46
|
* This component renders the underlying `<m3e-tab>` element and exposes its
|
|
16
47
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -34,7 +65,7 @@ const M3eTab = createComponent({
|
|
|
34
65
|
});
|
|
35
66
|
|
|
36
67
|
/**
|
|
37
|
-
* React binding for the `m3e-tab-panel` Web Component from `@m3e/tabs`.
|
|
68
|
+
* React binding for the `m3e-tab-panel` Web Component from `@m3e/web/tabs`.
|
|
38
69
|
*
|
|
39
70
|
* This component renders the underlying `<m3e-tab-panel>` element and exposes its
|
|
40
71
|
* properties, attributes, and events through an idiomatic React interface.
|
|
@@ -53,7 +84,7 @@ const M3eTabPanel = createComponent({
|
|
|
53
84
|
});
|
|
54
85
|
|
|
55
86
|
/**
|
|
56
|
-
* React binding for the `m3e-tabs` Web Component from `@m3e/tabs`.
|
|
87
|
+
* React binding for the `m3e-tabs` Web Component from `@m3e/web/tabs`.
|
|
57
88
|
*
|
|
58
89
|
* This component renders the underlying `<m3e-tabs>` element and exposes its
|
|
59
90
|
* properties, attributes, and events through an idiomatic React interface.
|