@pushwoosh/dumb-components 1.1.115 → 1.1.117
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/Chip/Chip.d.ts +1 -0
- package/Chip/Chip.js +5 -1
- package/Chip/Chip.types.d.ts +2 -0
- package/Chip/styles.d.ts +1 -0
- package/Chip/styles.js +12 -2
- package/Select/index.d.ts +4 -4
- package/Select/index.js +2 -2
- package/index.d.ts +1 -1
- package/package.json +1 -1
package/Chip/Chip.d.ts
CHANGED
package/Chip/Chip.js
CHANGED
|
@@ -6,6 +6,7 @@ export const Chip = forwardRef(({
|
|
|
6
6
|
$selected,
|
|
7
7
|
$readOnly,
|
|
8
8
|
$onClose,
|
|
9
|
+
$maxWidth,
|
|
9
10
|
children,
|
|
10
11
|
as,
|
|
11
12
|
...rest
|
|
@@ -16,9 +17,12 @@ export const Chip = forwardRef(({
|
|
|
16
17
|
"$selected": $selected,
|
|
17
18
|
"$closeable": !!$onClose,
|
|
18
19
|
"$readOnly": $readOnly,
|
|
20
|
+
"$maxWidth": $maxWidth,
|
|
19
21
|
as: as,
|
|
20
22
|
...rest
|
|
21
|
-
},
|
|
23
|
+
}, React.createElement("span", {
|
|
24
|
+
className: "chipLabel"
|
|
25
|
+
}, children), $onClose && React.createElement(CloseIcon, {
|
|
22
26
|
size: "small",
|
|
23
27
|
onClick: $onClose,
|
|
24
28
|
as: "span",
|
package/Chip/Chip.types.d.ts
CHANGED
|
@@ -5,5 +5,7 @@ export type ChipProps = PropsWithChildren<{
|
|
|
5
5
|
$selected?: boolean;
|
|
6
6
|
$onClose?: HTMLAttributes<HTMLDivElement>['onClick'];
|
|
7
7
|
$readOnly?: boolean;
|
|
8
|
+
/** CSS max-width value, e.g. "120px", "50%", "10rem". Enables label truncation with ellipsis. */
|
|
9
|
+
$maxWidth?: string;
|
|
8
10
|
as?: string;
|
|
9
11
|
}> & HTMLAttributes<HTMLDivElement>;
|
package/Chip/styles.d.ts
CHANGED
package/Chip/styles.js
CHANGED
|
@@ -4,7 +4,9 @@ import { variants } from './Chip.constants';
|
|
|
4
4
|
export const ChipStyled = styled.div.withConfig({
|
|
5
5
|
displayName: "ChipStyled",
|
|
6
6
|
componentId: "sc-e2g39l-0"
|
|
7
|
-
})(["display:inline-flex;min-height:24px;padding:0 ", " 0 8px;align-items:center;gap:4px;cursor:", ";border-radius:4px;color:", ";background:", ";font-weight:400;line-height:140%;& > .closeIcon{transition:transform 0.2s;&:hover{transform:scale(1.3);}}"], ({
|
|
7
|
+
})(["display:inline-flex;min-height:24px;", " padding:0 ", " 0 8px;align-items:center;gap:4px;cursor:", ";border-radius:4px;color:", ";background:", ";font-weight:400;line-height:140%;& > .chipLabel{", "}& > .closeIcon{transition:transform 0.2s;&:hover{transform:scale(1.3);}}"], ({
|
|
8
|
+
$maxWidth
|
|
9
|
+
}) => $maxWidth !== undefined && `max-width: ${$maxWidth};`, ({
|
|
8
10
|
$closeable
|
|
9
11
|
}) => $closeable ? '4px' : '8px', ({
|
|
10
12
|
$readOnly
|
|
@@ -26,4 +28,12 @@ export const ChipStyled = styled.div.withConfig({
|
|
|
26
28
|
return Color.SOFT_LIGHT;
|
|
27
29
|
}
|
|
28
30
|
return $selected ? Color.MAIN : variants[$variant].background;
|
|
29
|
-
}
|
|
31
|
+
}, ({
|
|
32
|
+
$maxWidth
|
|
33
|
+
}) => $maxWidth !== undefined && `
|
|
34
|
+
flex: 1 1 0;
|
|
35
|
+
min-width: 0;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
text-overflow: ellipsis;
|
|
38
|
+
white-space: nowrap;
|
|
39
|
+
`);
|
package/Select/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { Select, SelectAsync, CreatableSelect } from './Select';
|
|
2
|
-
export { CLASS_NAME_PREFIX } from './constants';
|
|
3
|
-
export type { SelectBase, MultiSelectOptions } from './types';
|
|
4
1
|
export { components as SelectComponents } from 'react-select';
|
|
5
|
-
export type { SingleValue } from 'react-select';
|
|
2
|
+
export type { SingleValue, MultiValue } from 'react-select';
|
|
3
|
+
export { CLASS_NAME_PREFIX } from './constants';
|
|
4
|
+
export { Select, SelectAsync, CreatableSelect } from './Select';
|
|
5
|
+
export type { SelectBase, SelectOption, MultiSelectOptions } from './types';
|
package/Select/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { components as SelectComponents } from 'react-select';
|
|
2
2
|
export { CLASS_NAME_PREFIX } from './constants';
|
|
3
|
-
export {
|
|
3
|
+
export { Select, SelectAsync, CreatableSelect } from './Select';
|
package/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export { RadioCard } from './RadioCard';
|
|
|
20
20
|
export { ReCaptcha, useRecaptcha, asyncScriptLoad } from './ReCaptcha';
|
|
21
21
|
export { Spinner } from './Spinner';
|
|
22
22
|
export { SortButton, type SortButtonParams } from './SortButton';
|
|
23
|
-
export { Select, SelectAsync, CreatableSelect, SelectComponents, CLASS_NAME_PREFIX, type SelectBase, type MultiSelectOptions, type SingleValue, } from './Select';
|
|
23
|
+
export { Select, SelectAsync, CreatableSelect, SelectComponents, CLASS_NAME_PREFIX, type SelectBase, type SelectOption, type MultiSelectOptions, type SingleValue, type MultiValue, } from './Select';
|
|
24
24
|
export { Switch } from './Switch';
|
|
25
25
|
export { TextSkeleton, RectangularSkeleton, CircularSkeleton } from './Skeleton';
|
|
26
26
|
export { Tooltip, type TooltipPosition, TooltipTrigger } from './Tooltip';
|