@pushwoosh/dumb-components 1.1.131 → 1.1.133
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/Select/styles.js +2 -2
- package/Toast/ai-documentation.md +3 -3
- package/Toast/types.d.ts +2 -2
- package/package.json +1 -1
package/Select/styles.js
CHANGED
|
@@ -4,7 +4,7 @@ import ReactSelectCreatable from 'react-select/creatable';
|
|
|
4
4
|
import styled, { css } from 'styled-components';
|
|
5
5
|
import { Color, FontSize, LineHeight, UnitSize } from '@pushwoosh/kit-constants';
|
|
6
6
|
import { CLASS_NAME_PREFIX } from './constants';
|
|
7
|
-
const selectStyles = css([".", "__control{width:", ";min-width:", ";height:auto;min-height:", ";font-size:", ";line-height:", ";color:", ";background-color:", ";border:", ";box-sizing:border-box;}.", "__indicator{display:flex;align-items:center;justify-content:center;padding:6px 8px;}.", "__menu{width:", ";min-width:", ";font-size:", ";line-height:", ";}.", "__indicator-separator{display:none;}.", "__control--is-focused{border:1px solid ", ";box-shadow:none;}.", "__control--is-disabled{background-color:", ";}.", "__control:hover{border:", ";}.", "__control--is-focused:hover{border:1px solid ", ";box-shadow:none;}.", "__placeholder{display:flex;width:100%;color:", ";white-space:nowrap;text-overflow:clip;}.", "__multi-value{background:", ";}.", "__multi-value__label{color:", ";}.", "__multi-value__remove{color:", ";}.", "__multi-value__remove:hover{color:", ";background:", ";}"], CLASS_NAME_PREFIX, ({
|
|
7
|
+
const selectStyles = css([".", "__control{width:", ";min-width:", ";height:auto;min-height:", ";font-size:", ";line-height:", ";color:", ";background-color:", ";border:", ";box-sizing:border-box;}.", "__indicator{display:flex;align-items:center;justify-content:center;padding:6px 8px;}.", "__menu{width:", ";min-width:", ";font-size:", ";line-height:", ";}.", "__option{overflow-wrap:anywhere;}.", "__indicator-separator{display:none;}.", "__control--is-focused{border:1px solid ", ";box-shadow:none;}.", "__control--is-disabled{background-color:", ";}.", "__control:hover{border:", ";}.", "__control--is-focused:hover{border:1px solid ", ";box-shadow:none;}.", "__placeholder{display:flex;width:100%;color:", ";white-space:nowrap;text-overflow:clip;}.", "__multi-value{background:", ";}.", "__multi-value__label{color:", ";}.", "__multi-value__remove{color:", ";}.", "__multi-value__remove:hover{color:", ";background:", ";}"], CLASS_NAME_PREFIX, ({
|
|
8
8
|
width
|
|
9
9
|
}) => width || '100%', ({
|
|
10
10
|
width
|
|
@@ -14,7 +14,7 @@ const selectStyles = css([".", "__control{width:", ";min-width:", ";height:auto;
|
|
|
14
14
|
width
|
|
15
15
|
}) => width || '100%', ({
|
|
16
16
|
width
|
|
17
|
-
}) => width || '150px', FontSize.REGULAR, LineHeight.REGULAR, CLASS_NAME_PREFIX, CLASS_NAME_PREFIX, Color.BRIGHT, CLASS_NAME_PREFIX, Color.FROZEN, CLASS_NAME_PREFIX, ({
|
|
17
|
+
}) => width || '150px', FontSize.REGULAR, LineHeight.REGULAR, CLASS_NAME_PREFIX, CLASS_NAME_PREFIX, CLASS_NAME_PREFIX, Color.BRIGHT, CLASS_NAME_PREFIX, Color.FROZEN, CLASS_NAME_PREFIX, ({
|
|
18
18
|
$isErrored
|
|
19
19
|
}) => $isErrored ? `1px solid ${Color.DANGER}` : `1px solid ${Color.FORM}`, CLASS_NAME_PREFIX, Color.BRIGHT, CLASS_NAME_PREFIX, Color.PHANTOM, CLASS_NAME_PREFIX, Color.BRIGHT_LIGHT, CLASS_NAME_PREFIX, Color.PRIMARY, CLASS_NAME_PREFIX, Color.PRIMARY, CLASS_NAME_PREFIX, Color.PRIMARY, Color.BRIGHT_LIGHT);
|
|
20
20
|
export const SelectStyled = styled(ReactSelect).withConfig({
|
|
@@ -20,14 +20,14 @@ export type ToastType = 'info' | 'success' | 'warning' | 'error';
|
|
|
20
20
|
|
|
21
21
|
export type ToastParams = {
|
|
22
22
|
title: string;
|
|
23
|
-
description?:
|
|
23
|
+
description?: ReactNode;
|
|
24
24
|
duration: number | false;
|
|
25
25
|
type: ToastType;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
export type OpenToastParams = {
|
|
29
29
|
title: string;
|
|
30
|
-
description?:
|
|
30
|
+
description?: ReactNode;
|
|
31
31
|
duration?: number;
|
|
32
32
|
type?: ToastType;
|
|
33
33
|
};
|
|
@@ -140,7 +140,7 @@ function ComponentWithCustomToast() {
|
|
|
140
140
|
| Prop | Type | Required | Default | Description |
|
|
141
141
|
|------|------|----------|---------|-------------|
|
|
142
142
|
| title | string | Yes | - | Main toast title |
|
|
143
|
-
| description |
|
|
143
|
+
| description | ReactNode | No | - | Optional description content |
|
|
144
144
|
| duration | number | No | 3000 | Toast display duration in milliseconds |
|
|
145
145
|
| type | ToastType | No | 'info' | Toast type affecting icon and color |
|
|
146
146
|
|
package/Toast/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
export type ToastType = 'info' | 'success' | 'warning' | 'error';
|
|
3
3
|
export type ToastParams = {
|
|
4
4
|
title: string;
|
|
5
|
-
description?:
|
|
5
|
+
description?: ReactNode;
|
|
6
6
|
duration: number | false;
|
|
7
7
|
type: ToastType;
|
|
8
8
|
buttonText?: string;
|
|
@@ -10,7 +10,7 @@ export type ToastParams = {
|
|
|
10
10
|
};
|
|
11
11
|
export type OpenToastParams = {
|
|
12
12
|
title: string;
|
|
13
|
-
description?:
|
|
13
|
+
description?: ReactNode;
|
|
14
14
|
duration?: number | false;
|
|
15
15
|
type?: ToastType;
|
|
16
16
|
buttonText?: string;
|