@loadsmart/miranda-react 3.0.0-beta.45 → 3.0.0-beta.47
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.
|
@@ -32,7 +32,7 @@ type SingleStrictProps<OptionValue extends string, TValue = OptionValue> = {
|
|
|
32
32
|
type MultipleProps<OptionValue extends string, TValue = Array<OptionValue> | ReadonlyArray<OptionValue> | null> = {
|
|
33
33
|
type?: 'multiple';
|
|
34
34
|
value?: TValue;
|
|
35
|
-
onChange?: OnChangeEvent<TValue
|
|
35
|
+
onChange?: OnChangeEvent<Extract<TValue, ReadonlyArray<OptionValue>>>;
|
|
36
36
|
};
|
|
37
37
|
export type OnChangeEvent<T> = (event: MirandaChangeEvent<Omit<WCToggleGroup, 'value'> & {
|
|
38
38
|
value: T;
|
package/dist/index.js
CHANGED
|
@@ -834,10 +834,10 @@ const WiredSelectOption = createComponent({
|
|
|
834
834
|
elementClass: SelectOption$1,
|
|
835
835
|
displayName: 'SelectOption',
|
|
836
836
|
});
|
|
837
|
-
const SLOTTED_STYLE$
|
|
837
|
+
const SLOTTED_STYLE$3 = { display: 'contents' };
|
|
838
838
|
const SelectOption = forwardRef((props, ref) => {
|
|
839
839
|
const { leading, trailing, children, ...rest } = props;
|
|
840
|
-
return (jsxs(WiredSelectOption, { ...rest, ref: ref, children: [leading != null && (jsx("span", { style: SLOTTED_STYLE$
|
|
840
|
+
return (jsxs(WiredSelectOption, { ...rest, ref: ref, children: [leading != null && (jsx("span", { style: SLOTTED_STYLE$3, slot: "leading", children: leading })), children, trailing != null && (jsx("span", { style: SLOTTED_STYLE$3, slot: "trailing", children: trailing }))] }));
|
|
841
841
|
});
|
|
842
842
|
SelectOption.displayName = 'SelectOption';
|
|
843
843
|
|
|
@@ -851,13 +851,13 @@ const WiredSelect = createComponent({
|
|
|
851
851
|
},
|
|
852
852
|
displayName: 'Select',
|
|
853
853
|
});
|
|
854
|
-
const SLOTTED_STYLE$
|
|
854
|
+
const SLOTTED_STYLE$2 = { display: 'contents' };
|
|
855
855
|
function Select(props) {
|
|
856
856
|
const { options, children, ...rest } = props;
|
|
857
857
|
return (jsx(WiredSelect, { ...rest, children: children ||
|
|
858
858
|
(options || []).map(function renderOption(option) {
|
|
859
859
|
const { label, leading, trailing, value: optionValue, ...others } = option;
|
|
860
|
-
return (jsxs(SelectOption, { ...others, value: optionValue, children: [leading != null && (jsx("span", { style: SLOTTED_STYLE$
|
|
860
|
+
return (jsxs(SelectOption, { ...others, value: optionValue, children: [leading != null && (jsx("span", { style: SLOTTED_STYLE$2, slot: "leading", children: leading })), label, trailing != null && (jsx("span", { style: SLOTTED_STYLE$2, slot: "trailing", children: trailing }))] }, optionValue));
|
|
861
861
|
}) }));
|
|
862
862
|
}
|
|
863
863
|
Select.Option = SelectOption;
|
|
@@ -1069,9 +1069,10 @@ const WiredTag = createComponent({
|
|
|
1069
1069
|
elementClass: Tag$1,
|
|
1070
1070
|
displayName: 'Tag',
|
|
1071
1071
|
});
|
|
1072
|
+
const SLOTTED_STYLE$1 = { display: 'contents' };
|
|
1072
1073
|
const Tag = forwardRef((props, ref) => {
|
|
1073
1074
|
const { leading, children, ...rest } = props;
|
|
1074
|
-
return (jsxs(WiredTag, { ...rest, ref: ref, children: [leading != null && jsx("span", { slot: "leading", children: leading }), children] }));
|
|
1075
|
+
return (jsxs(WiredTag, { ...rest, ref: ref, children: [leading != null && (jsx("span", { style: SLOTTED_STYLE$1, slot: "leading", children: leading })), children] }));
|
|
1075
1076
|
});
|
|
1076
1077
|
|
|
1077
1078
|
const WiredActionableTag = createComponent({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loadsmart/miranda-react",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.47",
|
|
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.
|
|
45
|
-
"@loadsmart/miranda-wc": "3.0.0-beta.
|
|
44
|
+
"@loadsmart/miranda-tokens": "4.0.0-beta.47",
|
|
45
|
+
"@loadsmart/miranda-wc": "3.0.0-beta.47",
|
|
46
46
|
"@lit/react": "^1.0.5",
|
|
47
47
|
"react-is": "^18.3.1"
|
|
48
48
|
},
|