@majoo-ui/react 1.57.5 → 1.57.6
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/components/tagList/TagList.d.ts +9 -5
- package/index.esm.js +8 -5
- package/index.umd.js +8 -5
- package/package.json +1 -1
|
@@ -4,14 +4,18 @@ export interface SelectedItem {
|
|
|
4
4
|
name: string;
|
|
5
5
|
}
|
|
6
6
|
interface TagListProps {
|
|
7
|
+
/**
|
|
8
|
+
* List of selected item.
|
|
9
|
+
*/
|
|
7
10
|
selectedItems: SelectedItem[];
|
|
11
|
+
/**
|
|
12
|
+
* onRemoveItem event handler.
|
|
13
|
+
*/
|
|
8
14
|
onRemoveItem?: (SelectedItem: any) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Custom counter label.
|
|
17
|
+
*/
|
|
9
18
|
counterLabel?: string;
|
|
10
19
|
}
|
|
11
20
|
declare function TagList({ selectedItems, onRemoveItem, counterLabel }: TagListProps): JSX.Element;
|
|
12
|
-
declare namespace TagList {
|
|
13
|
-
var defaultProps: {
|
|
14
|
-
counterLabel: string;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
21
|
export default TagList;
|
package/index.esm.js
CHANGED
|
@@ -20720,6 +20720,8 @@ const PageDialog = props => {
|
|
|
20720
20720
|
}, void 0)
|
|
20721
20721
|
}), void 0);
|
|
20722
20722
|
return jsxs(Dialog, Object.assign({}, rest, {
|
|
20723
|
+
modal: false
|
|
20724
|
+
}, {
|
|
20723
20725
|
children: [pageDialogTrigger && jsx(DialogTrigger, Object.assign({}, pageDialogTrigger.props), void 0), jsx(ConditionalWrapper, Object.assign({
|
|
20724
20726
|
condition: withPortal,
|
|
20725
20727
|
wrapper: _child => jsx(DialogPortal, {
|
|
@@ -50178,6 +50180,9 @@ function TagList({
|
|
|
50178
50180
|
onRemoveItem,
|
|
50179
50181
|
counterLabel
|
|
50180
50182
|
}) {
|
|
50183
|
+
const {
|
|
50184
|
+
t
|
|
50185
|
+
} = useTranslation(['MajooUI/inputSelectCheck', 'translation']);
|
|
50181
50186
|
const [showAllTags, setShowAllTags] = useState(false);
|
|
50182
50187
|
return jsxs(React__default.Fragment, {
|
|
50183
50188
|
children: [jsx(TagWrapper, {
|
|
@@ -50226,7 +50231,7 @@ function TagList({
|
|
|
50226
50231
|
},
|
|
50227
50232
|
color: "secondary"
|
|
50228
50233
|
}, {
|
|
50229
|
-
children: showAllTags ? 'Tampilkan Sebagian' : 'Tampilkan Semua'
|
|
50234
|
+
children: showAllTags ? t('showSomeText', 'Tampilkan Sebagian') : t('showAllText', 'Tampilkan Semua')
|
|
50230
50235
|
}), void 0)]
|
|
50231
50236
|
}), void 0), jsx(Separator$2, {}, void 0)]
|
|
50232
50237
|
}), void 0), jsxs(Text$1, Object.assign({
|
|
@@ -50236,13 +50241,10 @@ function TagList({
|
|
|
50236
50241
|
marginTop: '$spacing-03 !important'
|
|
50237
50242
|
}
|
|
50238
50243
|
}, {
|
|
50239
|
-
children: [selectedItems.length, " ", counterLabel]
|
|
50244
|
+
children: [selectedItems.length, " ", counterLabel || t('labelCounterText', 'Item terpilih')]
|
|
50240
50245
|
}), void 0)]
|
|
50241
50246
|
}, void 0);
|
|
50242
50247
|
}
|
|
50243
|
-
TagList.defaultProps = {
|
|
50244
|
-
counterLabel: 'produk dipilih'
|
|
50245
|
-
};
|
|
50246
50248
|
|
|
50247
50249
|
const {
|
|
50248
50250
|
colors: colors$1
|
|
@@ -50691,6 +50693,7 @@ const PieChartComponent = ({
|
|
|
50691
50693
|
setActiveIndex(formattedData.findIndex(y => y.name === x.name));
|
|
50692
50694
|
activeRef.current = true;
|
|
50693
50695
|
},
|
|
50696
|
+
onMouseLeave: () => activeRef.current = false,
|
|
50694
50697
|
blendStroke: true
|
|
50695
50698
|
}, (label === null || label === void 0 ? void 0 : label.show) && (label === null || label === void 0 ? void 0 : label.render) && {
|
|
50696
50699
|
label: e => {
|
package/index.umd.js
CHANGED
|
@@ -21095,6 +21095,8 @@
|
|
|
21095
21095
|
}), void 0);
|
|
21096
21096
|
};
|
|
21097
21097
|
return jsxRuntime.jsxs(Dialog, __assign({}, rest, {
|
|
21098
|
+
modal: false
|
|
21099
|
+
}, {
|
|
21098
21100
|
children: [pageDialogTrigger && jsxRuntime.jsx(DialogTrigger, __assign({}, pageDialogTrigger.props), void 0), jsxRuntime.jsx(ConditionalWrapper, __assign({
|
|
21099
21101
|
condition: withPortal,
|
|
21100
21102
|
wrapper: function (_child) {
|
|
@@ -50691,6 +50693,7 @@
|
|
|
50691
50693
|
var selectedItems = _a.selectedItems,
|
|
50692
50694
|
onRemoveItem = _a.onRemoveItem,
|
|
50693
50695
|
counterLabel = _a.counterLabel;
|
|
50696
|
+
var t = reactI18next.useTranslation(['MajooUI/inputSelectCheck', 'translation']).t;
|
|
50694
50697
|
var _b = React.useState(false),
|
|
50695
50698
|
showAllTags = _b[0],
|
|
50696
50699
|
setShowAllTags = _b[1];
|
|
@@ -50749,7 +50752,7 @@
|
|
|
50749
50752
|
},
|
|
50750
50753
|
color: "secondary"
|
|
50751
50754
|
}, {
|
|
50752
|
-
children: showAllTags ? 'Tampilkan Sebagian' : 'Tampilkan Semua'
|
|
50755
|
+
children: showAllTags ? t('showSomeText', 'Tampilkan Sebagian') : t('showAllText', 'Tampilkan Semua')
|
|
50753
50756
|
}), void 0)]
|
|
50754
50757
|
}), void 0), jsxRuntime.jsx(Separator$2, {}, void 0)]
|
|
50755
50758
|
}), void 0), jsxRuntime.jsxs(Text$1, __assign({
|
|
@@ -50759,13 +50762,10 @@
|
|
|
50759
50762
|
marginTop: '$spacing-03 !important'
|
|
50760
50763
|
}
|
|
50761
50764
|
}, {
|
|
50762
|
-
children: [selectedItems.length, " ", counterLabel]
|
|
50765
|
+
children: [selectedItems.length, " ", counterLabel || t('labelCounterText', 'Item terpilih')]
|
|
50763
50766
|
}), void 0)]
|
|
50764
50767
|
}, void 0);
|
|
50765
50768
|
}
|
|
50766
|
-
TagList.defaultProps = {
|
|
50767
|
-
counterLabel: 'produk dipilih'
|
|
50768
|
-
};
|
|
50769
50769
|
|
|
50770
50770
|
var colors$1 = core.foundations.colors;
|
|
50771
50771
|
var renderLegend$1 = function renderLegend(formattedData, legend, subtitle, tickFormatter) {
|
|
@@ -51220,6 +51220,9 @@
|
|
|
51220
51220
|
}));
|
|
51221
51221
|
activeRef.current = true;
|
|
51222
51222
|
},
|
|
51223
|
+
onMouseLeave: function () {
|
|
51224
|
+
return activeRef.current = false;
|
|
51225
|
+
},
|
|
51223
51226
|
blendStroke: true
|
|
51224
51227
|
}, (label === null || label === void 0 ? void 0 : label.show) && (label === null || label === void 0 ? void 0 : label.render) && {
|
|
51225
51228
|
label: function (e) {
|