@sprinklrjs/spaceweb 14.13.0 → 14.13.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/asyncSelect/hooks/useBaseAsyncSelect.js +2 -2
- package/date-picker/DateInput.js +59 -9
- package/esm/asyncSelect/hooks/useBaseAsyncSelect.js +2 -2
- package/esm/date-picker/DateInput.js +59 -9
- package/esm/list/list-item.d.ts +1 -1
- package/esm/list/list-item.js +11 -4
- package/esm/list/types.d.ts +2 -2
- package/esm/list/useListItemTooltip.d.ts +10 -0
- package/esm/list/useListItemTooltip.js +38 -0
- package/esm/locale/en_US.js +1 -0
- package/esm/menu/StatefulSubMenu.d.ts +1 -1
- package/esm/menu/SubMenu.d.ts +1 -1
- package/esm/menu/menu-item.d.ts +1 -1
- package/esm/select/locale.d.ts +1 -0
- package/esm/select/selectMenuAdapter/CollapsibleSelectMenu.d.ts +1 -1
- package/esm/select/selectMenuAdapter/SelectMenuItem.d.ts +1 -1
- package/esm/select/styled-component.js +16 -6
- package/list/list-item.d.ts +1 -1
- package/list/list-item.js +10 -3
- package/list/types.d.ts +2 -2
- package/list/useListItemTooltip.d.ts +10 -0
- package/list/useListItemTooltip.js +42 -0
- package/locale/en_US.js +1 -0
- package/menu/StatefulSubMenu.d.ts +1 -1
- package/menu/SubMenu.d.ts +1 -1
- package/menu/menu-item.d.ts +1 -1
- package/package.json +2 -2
- package/select/locale.d.ts +1 -0
- package/select/selectMenuAdapter/CollapsibleSelectMenu.d.ts +1 -1
- package/select/selectMenuAdapter/SelectMenuItem.d.ts +1 -1
- package/select/styled-component.js +16 -6
- package/tsconfig.build.tsbuildinfo +1 -1
package/menu/menu-item.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
|
|
|
30
30
|
} | undefined;
|
|
31
31
|
selected?: boolean | undefined;
|
|
32
32
|
startEnhancer?: import("../list/types").Enhancer<ListItemSharedProps>;
|
|
33
|
-
tooltipContent?: React.ReactNode | import("../baseui/popover").
|
|
33
|
+
tooltipContent?: React.ReactNode | import("../baseui/popover").ContentRenderProp;
|
|
34
34
|
} & Record<string, any>> | undefined;
|
|
35
35
|
Popover?: import("../overrides").Override<Omit<import("../baseui/popover").PopoverProps, "children" | "overrides" | "placement" | "triggerType"> & {
|
|
36
36
|
overrides?: ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sprinklrjs/spaceweb",
|
|
3
|
-
"version": "14.13.
|
|
3
|
+
"version": "14.13.2",
|
|
4
4
|
"description": "Components for SpaceWeb",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"ts-node": "^10.4.0"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
103
|
-
"@sprinklrjs/spaceweb-themes": "14.13.
|
|
103
|
+
"@sprinklrjs/spaceweb-themes": "14.13.2",
|
|
104
104
|
"react": ">=17.0.2 <19.0.0",
|
|
105
105
|
"react-dom": ">=17.0.2 <19.0.0"
|
|
106
106
|
}
|
package/select/locale.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ export declare const CollapsibleSelectMenu: ({ overrides, value, items: groupedI
|
|
|
67
67
|
} | undefined;
|
|
68
68
|
selected?: boolean | undefined;
|
|
69
69
|
startEnhancer?: import("../../list/types").Enhancer<import("../../list").ListItemSharedProps>;
|
|
70
|
-
tooltipContent?: ReactNode | import("../../baseui/popover").
|
|
70
|
+
tooltipContent?: ReactNode | import("../../baseui/popover").ContentRenderProp;
|
|
71
71
|
} & Record<string, any>> | undefined;
|
|
72
72
|
Popover?: import("../../overrides").Override<Omit<import("../../baseui/popover").PopoverProps, "children" | "overrides" | "placement" | "triggerType"> & {
|
|
73
73
|
overrides?: ({
|
|
@@ -38,7 +38,7 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
|
|
|
38
38
|
} | undefined;
|
|
39
39
|
selected?: boolean | undefined;
|
|
40
40
|
startEnhancer?: import("../../list/types").Enhancer<import("../../list").ListItemSharedProps>;
|
|
41
|
-
tooltipContent?: React.ReactNode | import("../../baseui/popover").
|
|
41
|
+
tooltipContent?: React.ReactNode | import("../../baseui/popover").ContentRenderProp;
|
|
42
42
|
} & Record<string, any>> | undefined;
|
|
43
43
|
Popover?: Override<Omit<import("../../baseui/popover").PopoverProps, "children" | "overrides" | "placement" | "triggerType"> & {
|
|
44
44
|
overrides?: ({
|
|
@@ -45,7 +45,7 @@ exports.StyledInput = (0, style_1.styled)('input', 'bg-transparent border-none i
|
|
|
45
45
|
});
|
|
46
46
|
var StyledOverlayContentContainer = (0, style_1.styled)('div', 'overflow-auto rounded-inherit w-[--sw-width]');
|
|
47
47
|
exports.StyledOverlayContentContainer = StyledOverlayContentContainer;
|
|
48
|
-
var getCommaSeparatedValues = function (value, limitTags, labelKey, locale) {
|
|
48
|
+
var getCommaSeparatedValues = function (value, limitTags, labelKey, locale, multi) {
|
|
49
49
|
if (limitTags === void 0) { limitTags = Number(Infinity); }
|
|
50
50
|
var _limitTags = limitTags < 0 ? Number(Infinity) : limitTags;
|
|
51
51
|
var commaSeparatedValues = value === null || value === void 0 ? void 0 : value.slice(0, _limitTags).map(function (val) { return val[labelKey]; });
|
|
@@ -54,16 +54,26 @@ var getCommaSeparatedValues = function (value, limitTags, labelKey, locale) {
|
|
|
54
54
|
commaSeparatedValues.push("".concat("+".concat(extraTagNumber, " ").concat(extraTagNumber === 1 ? locale.select.item : locale.select.items)));
|
|
55
55
|
}
|
|
56
56
|
var _commaSeparatedValues = commaSeparatedValues === null || commaSeparatedValues === void 0 ? void 0 : commaSeparatedValues.join(',');
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
58
|
+
return '';
|
|
59
|
+
}
|
|
60
|
+
if (multi) {
|
|
61
|
+
var count = value.length;
|
|
62
|
+
var countLabel = count === 1 ? locale.select.item : locale.select.items;
|
|
63
|
+
return "".concat((0, i18n_interpolation_1.default)(locale.select.selectedMultiValuesPrefix, {
|
|
64
|
+
count: String(count),
|
|
65
|
+
countLabel: countLabel,
|
|
66
|
+
values: _commaSeparatedValues,
|
|
67
|
+
}), ".");
|
|
68
|
+
}
|
|
69
|
+
return "".concat((0, i18n_interpolation_1.default)(locale.select.selectedValuesPrefix, { values: _commaSeparatedValues }), ".");
|
|
60
70
|
};
|
|
61
71
|
var InputContainer = function (_a) {
|
|
62
72
|
var _b;
|
|
63
73
|
var size = _a.size, $value = _a.$value, $labelKey = _a.$labelKey, placeholder = _a.placeholder, $limitTags = _a.$limitTags, props = tslib_1.__rest(_a, ["size", "$value", "$labelKey", "placeholder", "$limitTags"]);
|
|
64
74
|
var locale = (0, locale_1.useLocale)();
|
|
65
75
|
var listboxId = (0, SelectIdsContext_1.useSelectIds)().listboxId;
|
|
66
|
-
var commaSeparatedValues = getCommaSeparatedValues($value, $limitTags, $labelKey, locale);
|
|
76
|
+
var commaSeparatedValues = getCommaSeparatedValues($value, $limitTags, $labelKey, locale, props.$multi);
|
|
67
77
|
var baseAriaDescribedBy = (_b = props['aria-describedby']) !== null && _b !== void 0 ? _b : '';
|
|
68
78
|
var selectedValuesId = (0, useUniqueId_1.default)();
|
|
69
79
|
var ariaDescribedBy = commaSeparatedValues ? "".concat(selectedValuesId, " ").concat(baseAriaDescribedBy) : baseAriaDescribedBy;
|
|
@@ -83,7 +93,7 @@ var Input = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
83
93
|
var placeholder = _a.placeholder, $value = _a.$value, $labelKey = _a.$labelKey, _c = _a.$limitTags, $limitTags = _c === void 0 ? Number(Infinity) : _c, props = tslib_1.__rest(_a, ["placeholder", "$value", "$labelKey", "$limitTags"]);
|
|
84
94
|
var locale = (0, locale_1.useLocale)();
|
|
85
95
|
var _d = (0, SelectIdsContext_1.useSelectIds)(), listboxId = _d.listboxId, inputId = _d.inputId;
|
|
86
|
-
var commaSeparatedValues = getCommaSeparatedValues($value, $limitTags, $labelKey, locale);
|
|
96
|
+
var commaSeparatedValues = getCommaSeparatedValues($value, $limitTags, $labelKey, locale, props.$multi);
|
|
87
97
|
var baseAriaDescribedBy = (_b = props['aria-describedby']) !== null && _b !== void 0 ? _b : '';
|
|
88
98
|
var selectedValuesId = (0, useUniqueId_1.default)();
|
|
89
99
|
var ariaDescribedBy = commaSeparatedValues ? "".concat(selectedValuesId, " ").concat(baseAriaDescribedBy) : baseAriaDescribedBy;
|