@loadsmart/miranda-react 3.0.0-beta.21 → 3.0.0-beta.23

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.
@@ -9,7 +9,7 @@ declare global {
9
9
  }
10
10
  }
11
11
  export declare const Banner: import("@lit/react").ReactWebComponent<WCBanner, {
12
- onDismiss: EventName<CustomEvent<any>>;
12
+ onDismiss: EventName<CustomEvent>;
13
13
  }> & {
14
14
  ActionPrimary: import("react").ForwardRefExoticComponent<Omit<import("./BannerActionPrimary").BannerActionPrimaryProps, "ref"> & import("react").RefAttributes<import("@loadsmart/miranda-wc").BannerActionPrimary>>;
15
15
  Actions: import("@lit/react").ReactWebComponent<import("@loadsmart/miranda-wc").BannerActions, {}>;
@@ -9,11 +9,11 @@ declare global {
9
9
  }
10
10
  }
11
11
  export declare const Dialog: import("@lit/react").ReactWebComponent<WCDialog, {
12
- onClose: EventName<CustomEvent<any>>;
13
- onOpening: EventName<CustomEvent<any>>;
14
- onOpened: EventName<CustomEvent<any>>;
15
- onClosing: EventName<CustomEvent<any>>;
16
- onClosed: EventName<CustomEvent<any>>;
12
+ onClose: EventName<CustomEvent>;
13
+ onOpening: EventName<CustomEvent>;
14
+ onOpened: EventName<CustomEvent>;
15
+ onClosing: EventName<CustomEvent>;
16
+ onClosed: EventName<CustomEvent>;
17
17
  }> & {
18
18
  ActionPrimary: import("react").ForwardRefExoticComponent<Omit<import("./DialogActionPrimary").DialogActionPrimaryProps, "ref"> & import("react").RefAttributes<import("@loadsmart/miranda-wc").DialogActionPrimary>>;
19
19
  ActionSecondary: import("react").ForwardRefExoticComponent<Omit<import("./DialogActionSecondary").DialogActionSecondaryProps, "ref"> & import("react").RefAttributes<import("@loadsmart/miranda-wc").DialogActionSecondary>>;
@@ -21,7 +21,7 @@ export declare const Dialog: import("@lit/react").ReactWebComponent<WCDialog, {
21
21
  Actions: import("@lit/react").ReactWebComponent<import("@loadsmart/miranda-wc").DialogActions, {}>;
22
22
  Body: import("@lit/react").ReactWebComponent<import("@loadsmart/miranda-wc").DialogBody, {}>;
23
23
  Close: import("@lit/react").ReactWebComponent<import("@loadsmart/miranda-wc").DialogClose, {
24
- onClose: EventName<CustomEvent<any>>;
24
+ onClose: EventName<CustomEvent>;
25
25
  }>;
26
26
  Footer: import("@lit/react").ReactWebComponent<import("@loadsmart/miranda-wc").DialogFooter, {}>;
27
27
  Header: import("@lit/react").ReactWebComponent<import("@loadsmart/miranda-wc").DialogHeader, {}>;
@@ -9,6 +9,6 @@ declare global {
9
9
  }
10
10
  }
11
11
  export declare const DialogClose: import("@lit/react").ReactWebComponent<WCDialogClose, {
12
- onClose: EventName<CustomEvent<any>>;
12
+ onClose: EventName<CustomEvent>;
13
13
  }>;
14
14
  export type DialogCloseProps = ComponentProps<typeof DialogClose>;
@@ -12,11 +12,11 @@ declare global {
12
12
  }
13
13
  }
14
14
  export declare const Drawer: import("@lit/react").ReactWebComponent<WCDrawer, {
15
- onClose: EventName<CustomEvent<any>>;
16
- onOpening: EventName<CustomEvent<any>>;
17
- onOpened: EventName<CustomEvent<any>>;
18
- onClosing: EventName<CustomEvent<any>>;
19
- onClosed: EventName<CustomEvent<any>>;
15
+ onClose: EventName<CustomEvent>;
16
+ onOpening: EventName<CustomEvent>;
17
+ onOpened: EventName<CustomEvent>;
18
+ onClosing: EventName<CustomEvent>;
19
+ onClosed: EventName<CustomEvent>;
20
20
  }> & {
21
21
  ActionPrimary: typeof DrawerActionPrimary;
22
22
  ActionSecondary: typeof DrawerActionSecondary;
@@ -24,7 +24,7 @@ export declare const Drawer: import("@lit/react").ReactWebComponent<WCDrawer, {
24
24
  Actions: import("@lit/react").ReactWebComponent<import("@loadsmart/miranda-wc").DrawerActions, {}>;
25
25
  Body: import("@lit/react").ReactWebComponent<import("@loadsmart/miranda-wc").DrawerBody, {}>;
26
26
  Close: import("@lit/react").ReactWebComponent<import("@loadsmart/miranda-wc").DrawerClose, {
27
- onClose: EventName<CustomEvent<any>>;
27
+ onClose: EventName<CustomEvent>;
28
28
  }>;
29
29
  Header: import("@lit/react").ReactWebComponent<import("@loadsmart/miranda-wc").DrawerHeader, {}>;
30
30
  };
@@ -9,6 +9,6 @@ declare global {
9
9
  }
10
10
  }
11
11
  export declare const DrawerClose: import("@lit/react").ReactWebComponent<WCDrawerClose, {
12
- onClose: EventName<CustomEvent<any>>;
12
+ onClose: EventName<CustomEvent>;
13
13
  }>;
14
14
  export type DrawerCloseProps = ComponentProps<typeof DrawerClose>;
@@ -9,8 +9,8 @@ declare global {
9
9
  }
10
10
  }
11
11
  export declare const Dropdown: import("@lit/react").ReactWebComponent<WCDropdown, {
12
- onExpand: EventName<CustomEvent<any>>;
13
- onCollapse: EventName<CustomEvent<any>>;
12
+ onExpand: EventName<CustomEvent>;
13
+ onCollapse: EventName<CustomEvent>;
14
14
  }> & {
15
15
  Item: import("react").ForwardRefExoticComponent<Omit<import("./DropdownItem").DropdownItemProps, "ref"> & import("react").RefAttributes<import("@loadsmart/miranda-wc").DropdownItem>>;
16
16
  Menu: import("@lit/react").ReactWebComponent<import("@loadsmart/miranda-wc").DropdownMenu, {}>;
@@ -9,7 +9,7 @@ declare global {
9
9
  }
10
10
  }
11
11
  export declare const EmptyState: import("@lit/react").ReactWebComponent<WCEmptyState, {
12
- onAction: EventName<CustomEvent<any>>;
12
+ onAction: EventName<CustomEvent>;
13
13
  }> & {
14
14
  Illustration: import("@lit/react").ReactWebComponent<import("@loadsmart/miranda-wc").EmptyStateIllustration, {}>;
15
15
  Header: import("@lit/react").ReactWebComponent<import("@loadsmart/miranda-wc").EmptyStateHeader, {}>;
@@ -10,8 +10,8 @@ declare global {
10
10
  }
11
11
  }
12
12
  declare const WiredSelect: import("@lit/react").ReactWebComponent<WCSelect, {
13
- onExpand: EventName<CustomEvent<any>>;
14
- onCollapse: EventName<CustomEvent<any>>;
13
+ onExpand: EventName<CustomEvent>;
14
+ onCollapse: EventName<CustomEvent>;
15
15
  onChange: EventName<MirandaChangeEvent<WCSelect>>;
16
16
  }>;
17
17
  export type SelectOption = {
@@ -9,7 +9,7 @@ declare global {
9
9
  }
10
10
  }
11
11
  export declare const WiredSelectOption: import("@lit/react").ReactWebComponent<WCSelectOption, {}>;
12
- export interface SelectOptionProps extends ComponentProps<typeof WiredSelectOption> {
12
+ export interface SelectOptionProps extends Omit<ComponentProps<typeof WiredSelectOption>, 'leading' | 'trailing'> {
13
13
  leading?: ReactNode;
14
14
  trailing?: ReactNode;
15
15
  }
@@ -11,10 +11,10 @@ declare global {
11
11
  }
12
12
  export declare const Steps: import("@lit/react").ReactWebComponent<WCSteps, {
13
13
  onChange: EventName<CustomEvent<StepChangeEventDetail>>;
14
- onComplete: EventName<CustomEvent<any>>;
14
+ onComplete: EventName<CustomEvent>;
15
15
  onNavigate: EventName<CustomEvent<StepNavigateEventDetail>>;
16
- onNext: EventName<CustomEvent<any>>;
17
- onPrevious: EventName<CustomEvent<any>>;
16
+ onNext: EventName<CustomEvent>;
17
+ onPrevious: EventName<CustomEvent>;
18
18
  }> & {
19
19
  Step: import("@lit/react").ReactWebComponent<import("@loadsmart/miranda-wc").Step, {}>;
20
20
  };
@@ -5,6 +5,6 @@ export declare function useSteps(): {
5
5
  registerSteps: () => {
6
6
  ref(element: HTMLElement | null): void;
7
7
  };
8
- navigateToStep: (step: LiteralUnion<'previous' | 'next', string>) => void;
8
+ navigateToStep: (step: LiteralUnion<"previous" | "next", string>) => void;
9
9
  completeStep: () => void;
10
10
  };
@@ -11,7 +11,7 @@ declare global {
11
11
  }
12
12
  declare const WiredActionableTag: import("@lit/react").ReactWebComponent<WCActionableTag, {
13
13
  onChange: EventName<MirandaChangeEvent<WCActionableTag>>;
14
- onRemove: EventName<CustomEvent<any>>;
14
+ onRemove: EventName<CustomEvent>;
15
15
  }>;
16
16
  export type ActionableTagProps = ComponentProps<typeof WiredActionableTag> & {
17
17
  leading?: ReactNode;
@@ -12,7 +12,7 @@ declare global {
12
12
  declare const WiredTextField: import("@lit/react").ReactWebComponent<WCTextField, {
13
13
  onInput: EventName<MirandaChangeEvent<WCTextField>>;
14
14
  onChange: EventName<MirandaChangeEvent<WCTextField>>;
15
- onClear: EventName<CustomEvent<any>>;
15
+ onClear: EventName<CustomEvent>;
16
16
  }>;
17
17
  export type TextFieldProps = ComponentProps<typeof WiredTextField> & {
18
18
  leading?: ReactNode;
package/dist/index.js CHANGED
@@ -5,51 +5,44 @@ import { forwardRef, useState, useCallback, Children, isValidElement, cloneEleme
5
5
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
6
6
  import { isFragment } from 'react-is';
7
7
 
8
- function _extends() {
9
- _extends = Object.assign ? Object.assign.bind() : function (target) {
10
- for (var i = 1; i < arguments.length; i++) {
11
- var source = arguments[i];
12
- for (var key in source) {
13
- if (Object.prototype.hasOwnProperty.call(source, key)) {
14
- target[key] = source[key];
15
- }
16
- }
17
- }
18
- return target;
19
- };
20
- return _extends.apply(this, arguments);
8
+ function _arrayLikeToArray(r, a) {
9
+ (null == a || a > r.length) && (a = r.length);
10
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
11
+ return n;
21
12
  }
22
- function _unsupportedIterableToArray(o, minLen) {
23
- if (!o) return;
24
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
25
- var n = Object.prototype.toString.call(o).slice(8, -1);
26
- if (n === "Object" && o.constructor) n = o.constructor.name;
27
- if (n === "Map" || n === "Set") return Array.from(o);
28
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
29
- }
30
- function _arrayLikeToArray(arr, len) {
31
- if (len == null || len > arr.length) len = arr.length;
32
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
33
- return arr2;
34
- }
35
- function _createForOfIteratorHelperLoose(o, allowArrayLike) {
36
- var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
37
- if (it) return (it = it.call(o)).next.bind(it);
38
- if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
39
- if (it) o = it;
40
- var i = 0;
13
+ function _createForOfIteratorHelperLoose(r, e) {
14
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
15
+ if (t) return (t = t.call(r)).next.bind(t);
16
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {
17
+ t && (r = t);
18
+ var o = 0;
41
19
  return function () {
42
- if (i >= o.length) return {
43
- done: true
44
- };
45
- return {
46
- done: false,
47
- value: o[i++]
20
+ return o >= r.length ? {
21
+ done: !0
22
+ } : {
23
+ done: !1,
24
+ value: r[o++]
48
25
  };
49
26
  };
50
27
  }
51
28
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
52
29
  }
30
+ function _extends() {
31
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
32
+ for (var e = 1; e < arguments.length; e++) {
33
+ var t = arguments[e];
34
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
35
+ }
36
+ return n;
37
+ }, _extends.apply(null, arguments);
38
+ }
39
+ function _unsupportedIterableToArray(r, a) {
40
+ if (r) {
41
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
42
+ var t = {}.toString.call(r).slice(8, -1);
43
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
44
+ }
45
+ }
53
46
 
54
47
  /**
55
48
  * @license
@@ -841,10 +834,10 @@ const WiredSelectOption = createComponent({
841
834
  elementClass: SelectOption$1,
842
835
  displayName: 'SelectOption',
843
836
  });
844
- const SLOTTED_STYLE$1 = { display: 'contents' };
837
+ const SLOTTED_STYLE$2 = { display: 'contents' };
845
838
  const SelectOption = forwardRef((props, ref) => {
846
839
  const { leading, trailing, children, ...rest } = props;
847
- return (jsxs(WiredSelectOption, { ...rest, ref: ref, children: [leading != null && (jsx("span", { style: SLOTTED_STYLE$1, slot: "leading", children: leading })), children, trailing != null && (jsx("span", { style: SLOTTED_STYLE$1, slot: "trailing", children: trailing }))] }));
840
+ return (jsxs(WiredSelectOption, { ...rest, ref: ref, children: [leading != null && (jsx("span", { style: SLOTTED_STYLE$2, slot: "leading", children: leading })), children, trailing != null && (jsx("span", { style: SLOTTED_STYLE$2, slot: "trailing", children: trailing }))] }));
848
841
  });
849
842
  SelectOption.displayName = 'SelectOption';
850
843
 
@@ -858,13 +851,13 @@ const WiredSelect = createComponent({
858
851
  },
859
852
  displayName: 'Select',
860
853
  });
861
- const SLOTTED_STYLE = { display: 'contents' };
854
+ const SLOTTED_STYLE$1 = { display: 'contents' };
862
855
  function Select(props) {
863
856
  const { options, children, ...rest } = props;
864
857
  return (jsx(WiredSelect, { ...rest, children: children ||
865
858
  (options || []).map(function renderOption(option) {
866
859
  const { label, leading, trailing, value: optionValue, ...others } = option;
867
- return (jsxs(SelectOption, { ...others, value: optionValue, children: [leading != null && (jsx("span", { style: SLOTTED_STYLE, slot: "leading", children: leading })), label, trailing != null && (jsx("span", { style: SLOTTED_STYLE, slot: "trailing", children: trailing }))] }, optionValue));
860
+ return (jsxs(SelectOption, { ...others, value: optionValue, children: [leading != null && (jsx("span", { style: SLOTTED_STYLE$1, slot: "leading", children: leading })), label, trailing != null && (jsx("span", { style: SLOTTED_STYLE$1, slot: "trailing", children: trailing }))] }, optionValue));
868
861
  }) }));
869
862
  }
870
863
  Select.Option = SelectOption;
@@ -1090,9 +1083,10 @@ const WiredActionableTag = createComponent({
1090
1083
  onRemove: 'remove',
1091
1084
  },
1092
1085
  });
1086
+ const SLOTTED_STYLE = { display: 'contents' };
1093
1087
  const ActionableTag = forwardRef((props, ref) => {
1094
1088
  const { leading, children, selectable, removable, ...rest } = props;
1095
- return (jsxs(WiredActionableTag, { ...rest, selectable: selectable || Boolean(rest.onChange), removable: removable || Boolean(rest.onRemove), ref: ref, children: [leading != null && jsx("span", { slot: "leading", children: leading }), children] }));
1089
+ return (jsxs(WiredActionableTag, { ...rest, selectable: selectable || Boolean(rest.onChange), removable: removable || Boolean(rest.onRemove), ref: ref, children: [leading != null && (jsx("span", { slot: "leading", style: SLOTTED_STYLE, children: leading })), children] }));
1096
1090
  });
1097
1091
 
1098
1092
  const Text = createComponent({
@@ -1,6 +1,6 @@
1
1
  import type { EventName, Options } from '@lit/react';
2
2
  type EventNames = Record<string, EventName | string>;
3
3
  export declare const createComponent: <I extends HTMLElement, E extends EventNames = {}, SubComponents extends Record<string, unknown> = {}>({ subComponents, ...options }: Omit<Options<I, E>, "react"> & {
4
- subComponents?: SubComponents | undefined;
4
+ subComponents?: SubComponents;
5
5
  }) => import("@lit/react").ReactWebComponent<I, E> & SubComponents;
6
6
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loadsmart/miranda-react",
3
- "version": "3.0.0-beta.21",
3
+ "version": "3.0.0-beta.23",
4
4
  "description": "React component library based on Miranda Web Components",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -41,8 +41,8 @@
41
41
  "access": "public"
42
42
  },
43
43
  "dependencies": {
44
- "@loadsmart/miranda-tokens": "4.0.0-beta.21",
45
- "@loadsmart/miranda-wc": "3.0.0-beta.21",
44
+ "@loadsmart/miranda-tokens": "4.0.0-beta.23",
45
+ "@loadsmart/miranda-wc": "3.0.0-beta.23",
46
46
  "@lit/react": "^1.0.5",
47
47
  "react-is": "^18.3.1"
48
48
  },