@loadsmart/miranda-react 3.0.0-beta.22 → 3.0.0-beta.24
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 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
|
}
|
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$2 = { 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$2, slot: "leading", children: leading })), children, trailing != null && (jsx("span", { style: SLOTTED_STYLE$2, 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 = { display: 'contents' };
|
|
854
|
+
const SLOTTED_STYLE$1 = { 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, 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));
|
|
861
861
|
}) }));
|
|
862
862
|
}
|
|
863
863
|
Select.Option = SelectOption;
|
|
@@ -1083,9 +1083,10 @@ const WiredActionableTag = createComponent({
|
|
|
1083
1083
|
onRemove: 'remove',
|
|
1084
1084
|
},
|
|
1085
1085
|
});
|
|
1086
|
+
const SLOTTED_STYLE = { display: 'contents' };
|
|
1086
1087
|
const ActionableTag = forwardRef((props, ref) => {
|
|
1087
1088
|
const { leading, children, selectable, removable, ...rest } = props;
|
|
1088
|
-
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] }));
|
|
1089
1090
|
});
|
|
1090
1091
|
|
|
1091
1092
|
const Text = 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.24",
|
|
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.24",
|
|
45
|
+
"@loadsmart/miranda-wc": "3.0.0-beta.24",
|
|
46
46
|
"@lit/react": "^1.0.5",
|
|
47
47
|
"react-is": "^18.3.1"
|
|
48
48
|
},
|