@seamly/web-ui 22.3.0-beta.1 → 22.3.0-beta.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/build/dist/lib/components.js +180 -153
- package/build/dist/lib/components.js.map +1 -1
- package/build/dist/lib/components.min.js +1 -1
- package/build/dist/lib/components.min.js.map +1 -1
- package/build/dist/lib/hooks.js +150 -136
- package/build/dist/lib/hooks.js.map +1 -1
- package/build/dist/lib/hooks.min.js +1 -1
- package/build/dist/lib/hooks.min.js.map +1 -1
- package/build/dist/lib/index.debug.js +35 -35
- package/build/dist/lib/index.debug.min.js +1 -1
- package/build/dist/lib/index.debug.min.js.LICENSE.txt +4 -4
- package/build/dist/lib/index.debug.min.js.map +1 -1
- package/build/dist/lib/index.js +86 -61
- package/build/dist/lib/index.js.map +1 -1
- package/build/dist/lib/index.min.js +1 -1
- package/build/dist/lib/index.min.js.map +1 -1
- package/build/dist/lib/standalone.js +86 -62
- package/build/dist/lib/standalone.js.map +1 -1
- package/build/dist/lib/standalone.min.js +1 -1
- package/build/dist/lib/standalone.min.js.map +1 -1
- package/build/dist/lib/style-guide.js +92 -61
- package/build/dist/lib/style-guide.js.map +1 -1
- package/build/dist/lib/style-guide.min.js +1 -1
- package/build/dist/lib/style-guide.min.js.map +1 -1
- package/build/dist/lib/styles.css +1 -1
- package/build/dist/lib/utils.js +180 -154
- package/build/dist/lib/utils.js.map +1 -1
- package/build/dist/lib/utils.min.js +1 -1
- package/build/dist/lib/utils.min.js.map +1 -1
- package/package.json +1 -1
- package/src/javascripts/domains/translations/components/options-dialog/translation-option.tsx +1 -1
- package/src/javascripts/style-guide/states.js +8 -0
- package/src/javascripts/ui/components/chat-status/chat-status-action.tsx +2 -2
- package/src/javascripts/ui/components/conversation/event/carousel-component/components/controls.js +2 -2
- package/src/javascripts/ui/components/conversation/event/choice-prompt.js +1 -1
- package/src/javascripts/ui/components/conversation/event/image-lightbox.js +1 -1
- package/src/javascripts/ui/components/conversation/event-divider.js +6 -1
- package/src/javascripts/ui/components/form-controls/error.js +1 -1
- package/src/javascripts/ui/components/form-controls/file-input.js +1 -1
- package/src/javascripts/ui/components/layout/agent-info.js +1 -1
- package/src/javascripts/ui/components/layout/{icon.js → icon.tsx} +74 -37
- package/src/javascripts/ui/components/options/options-button.js +1 -1
- package/src/javascripts/ui/components/suggestions/suggestions-item.js +1 -1
- package/src/javascripts/ui/components/view/window-view/window-open-button.js +1 -1
- package/src/javascripts/ui/components/widgets/lightbox.js +1 -1
- package/src/stylesheets/5-components/_message-card.scss +4 -3
package/package.json
CHANGED
|
@@ -1280,6 +1280,7 @@ const standardState = {
|
|
|
1280
1280
|
cardAskText.payload.body,
|
|
1281
1281
|
cardNavigate.payload.body,
|
|
1282
1282
|
cardTopic.payload.body,
|
|
1283
|
+
cardNoImage.payload.body,
|
|
1283
1284
|
],
|
|
1284
1285
|
},
|
|
1285
1286
|
},
|
|
@@ -1612,6 +1613,13 @@ const standardState = {
|
|
|
1612
1613
|
sendTranscript: { enabled: true },
|
|
1613
1614
|
},
|
|
1614
1615
|
},
|
|
1616
|
+
config: {
|
|
1617
|
+
...baseState.config,
|
|
1618
|
+
context: {
|
|
1619
|
+
...baseState.context,
|
|
1620
|
+
locale: 'nl',
|
|
1621
|
+
},
|
|
1622
|
+
},
|
|
1615
1623
|
translations: {
|
|
1616
1624
|
...translationsSlice,
|
|
1617
1625
|
isAvailable: true,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import Icon from 'ui/components/layout/icon'
|
|
1
|
+
import Icon, { IconProps } from 'ui/components/layout/icon'
|
|
2
2
|
import { className } from 'lib/css'
|
|
3
3
|
|
|
4
4
|
type ChatStatusActionProps = {
|
|
5
5
|
handleClick: () => void
|
|
6
|
-
icon:
|
|
6
|
+
icon: IconProps['name']
|
|
7
7
|
title: string
|
|
8
8
|
srButtonText?: string
|
|
9
9
|
}
|
package/src/javascripts/ui/components/conversation/event/carousel-component/components/controls.js
CHANGED
|
@@ -24,7 +24,7 @@ export default function CarouselControls({
|
|
|
24
24
|
aria-label={t('carousel.controls.previous')}
|
|
25
25
|
onClick={handlePrevious}
|
|
26
26
|
>
|
|
27
|
-
<Icon name="arrowLeft" size="16" />
|
|
27
|
+
<Icon name="arrowLeft" size="16" alt="" />
|
|
28
28
|
</button>
|
|
29
29
|
{children}
|
|
30
30
|
<button
|
|
@@ -32,7 +32,7 @@ export default function CarouselControls({
|
|
|
32
32
|
aria-label={t('carousel.controls.next')}
|
|
33
33
|
onClick={handleNext}
|
|
34
34
|
>
|
|
35
|
-
<Icon name="arrowRight" size="16" />
|
|
35
|
+
<Icon name="arrowRight" size="16" alt="" />
|
|
36
36
|
</button>
|
|
37
37
|
</div>
|
|
38
38
|
)
|
|
@@ -119,7 +119,7 @@ const ChoicePrompt = ({ event, children, ...props }) => {
|
|
|
119
119
|
{showOptions
|
|
120
120
|
? t('message.choicePrompts.cancelChooseAgain')
|
|
121
121
|
: t('message.choicePrompts.chooseAgain')}
|
|
122
|
-
<Icon name="chevronDown" size="8" />
|
|
122
|
+
<Icon name="chevronDown" size="8" alt="" />
|
|
123
123
|
</button>
|
|
124
124
|
)}
|
|
125
125
|
{showOptions && (
|
|
@@ -24,7 +24,7 @@ const ImageLightbox = ({ description, url }) => {
|
|
|
24
24
|
onClick={onOpenLightboxHandler}
|
|
25
25
|
>
|
|
26
26
|
{t('message.image.srTextEnlargeButtonLabel', { description })}
|
|
27
|
-
<Icon name="enlarge" size="32" />
|
|
27
|
+
<Icon name="enlarge" size="32" alt="" />
|
|
28
28
|
</button>
|
|
29
29
|
{showLightBox && (
|
|
30
30
|
<Lightbox
|
|
@@ -31,7 +31,12 @@ export default function EventDivider({
|
|
|
31
31
|
{hasGraphic && (
|
|
32
32
|
<span className={className('divider__graphic')}>
|
|
33
33
|
{iconName ? (
|
|
34
|
-
<Icon
|
|
34
|
+
<Icon
|
|
35
|
+
name={iconName}
|
|
36
|
+
size={iconSize}
|
|
37
|
+
className={iconClassName}
|
|
38
|
+
alt=""
|
|
39
|
+
/>
|
|
35
40
|
) : (
|
|
36
41
|
<img
|
|
37
42
|
src={graphicSrc}
|
|
@@ -66,7 +66,7 @@ export default function FileInput({
|
|
|
66
66
|
])}
|
|
67
67
|
>
|
|
68
68
|
<label htmlFor={id} className={className('upload__label')}>
|
|
69
|
-
<Icon name="upload" size="32" />
|
|
69
|
+
<Icon name="upload" size="32" alt="" />
|
|
70
70
|
<div>
|
|
71
71
|
<span className={className(['upload__label--text'])}>
|
|
72
72
|
{labelText}
|
|
@@ -27,44 +27,81 @@ import { className as classNameFn } from 'lib/css'
|
|
|
27
27
|
|
|
28
28
|
/* eslint-enable import/no-webpack-loader-syntax */
|
|
29
29
|
|
|
30
|
-
const ICONS = {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
30
|
+
export const ICONS = {
|
|
31
|
+
send: {
|
|
32
|
+
32: iconSend32,
|
|
33
|
+
},
|
|
34
|
+
balloon: {
|
|
35
|
+
32: iconBalloon32,
|
|
36
|
+
},
|
|
37
|
+
newTopic: {
|
|
38
|
+
32: iconNewTopic32,
|
|
39
|
+
},
|
|
40
|
+
newTranslation: {
|
|
41
|
+
16: iconNewTranslation16,
|
|
42
|
+
32: iconNewTranslation32,
|
|
43
|
+
},
|
|
44
|
+
avatar: {
|
|
45
|
+
32: iconAvatar32,
|
|
46
|
+
},
|
|
47
|
+
chevronDown: {
|
|
48
|
+
8: iconChevronDown8,
|
|
49
|
+
32: iconChevronDown32,
|
|
50
|
+
},
|
|
51
|
+
chevronRight: {
|
|
52
|
+
8: iconChevronRight8,
|
|
53
|
+
16: iconChevronRight16,
|
|
54
|
+
},
|
|
55
|
+
close: {
|
|
56
|
+
8: iconClose8,
|
|
57
|
+
16: iconClose16,
|
|
58
|
+
},
|
|
59
|
+
enlarge: {
|
|
60
|
+
32: iconEnlarge32,
|
|
61
|
+
},
|
|
62
|
+
options: {
|
|
63
|
+
32: iconOptions32,
|
|
64
|
+
},
|
|
65
|
+
file: {
|
|
66
|
+
32: iconFile32,
|
|
67
|
+
},
|
|
68
|
+
upload: {
|
|
69
|
+
32: iconUpload32,
|
|
70
|
+
},
|
|
71
|
+
download: {
|
|
72
|
+
16: iconDownload16,
|
|
73
|
+
},
|
|
74
|
+
error: {
|
|
75
|
+
16: iconError16,
|
|
76
|
+
},
|
|
77
|
+
arrowLeft: {
|
|
78
|
+
16: iconArrowLeft16,
|
|
79
|
+
},
|
|
80
|
+
arrowRight: {
|
|
81
|
+
16: iconArrowRight16,
|
|
82
|
+
},
|
|
83
|
+
check: {
|
|
84
|
+
16: iconCheck16,
|
|
85
|
+
32: iconCheck32,
|
|
86
|
+
},
|
|
87
|
+
} as const
|
|
57
88
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
dangerouslySetInnerHTML={{ __html: ICONS[iconName] }}
|
|
64
|
-
/>
|
|
65
|
-
{alt && <span className={classNameFn('visually-hidden')}>{alt}</span>}
|
|
66
|
-
</>
|
|
67
|
-
)
|
|
89
|
+
export type IconProps = {
|
|
90
|
+
name: keyof typeof ICONS
|
|
91
|
+
size?: '8' | '16' | '32'
|
|
92
|
+
className?: string
|
|
93
|
+
alt: string
|
|
68
94
|
}
|
|
69
95
|
|
|
96
|
+
const Icon = ({ name, size = '32', className, alt }: IconProps) => (
|
|
97
|
+
<>
|
|
98
|
+
<div
|
|
99
|
+
aria-hidden="true"
|
|
100
|
+
className={className || classNameFn('icon')}
|
|
101
|
+
dangerouslySetInnerHTML={{ __html: ICONS[name][size] }}
|
|
102
|
+
/>
|
|
103
|
+
{alt && <span className={classNameFn('visually-hidden')}>{alt}</span>}
|
|
104
|
+
</>
|
|
105
|
+
)
|
|
106
|
+
|
|
70
107
|
export default Icon
|
|
@@ -236,7 +236,7 @@ const OptionsButton = () => {
|
|
|
236
236
|
aria-expanded={multiMenu ? menuIsOpen.toString() : null}
|
|
237
237
|
aria-disabled={!multiMenu && !firstOption.available ? 'true' : null}
|
|
238
238
|
>
|
|
239
|
-
{multiMenu && <Icon name="options" size="32" />}
|
|
239
|
+
{multiMenu && <Icon name="options" size="32" alt="" />}
|
|
240
240
|
<span className={className('button__text')}>
|
|
241
241
|
{multiMenu
|
|
242
242
|
? t('options.openButtonText')
|
|
@@ -30,7 +30,7 @@ const SuggestionsItem = ({
|
|
|
30
30
|
onClick={handleClick}
|
|
31
31
|
className={className('button', 'button--primary')}
|
|
32
32
|
>
|
|
33
|
-
{hasIcon && <Icon name="chevronRight" size="8" />}
|
|
33
|
+
{hasIcon && <Icon name="chevronRight" size="8" alt="" />}
|
|
34
34
|
{question}
|
|
35
35
|
</button>
|
|
36
36
|
</li>
|
|
@@ -66,7 +66,7 @@ const Lightbox = ({ url, description, onClose: onCloseHandler }) => {
|
|
|
66
66
|
className={className('modal__close')}
|
|
67
67
|
onClick={onClose}
|
|
68
68
|
>
|
|
69
|
-
<Icon name="close" size="16" />
|
|
69
|
+
<Icon name="close" size="16" alt="" />
|
|
70
70
|
{t('lightbox.closeLabel')}
|
|
71
71
|
</button>
|
|
72
72
|
</div>
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
.#{$n}-card__content {
|
|
19
19
|
display: flex;
|
|
20
20
|
flex: 1 1 auto;
|
|
21
|
-
flex-
|
|
21
|
+
flex-direction: column;
|
|
22
22
|
gap: $spacer * 0.5;
|
|
23
23
|
padding: $spacer * 0.5 $spacer * 0.75 $spacer * 0.75;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.#{$n}-card__title {
|
|
27
27
|
display: block;
|
|
28
|
-
flex: 0 0 100%;
|
|
29
28
|
width: 100%;
|
|
29
|
+
height: fit-content;
|
|
30
30
|
margin: 0;
|
|
31
31
|
padding: 0;
|
|
32
32
|
font-size: $fontsize-default;
|
|
@@ -36,12 +36,13 @@
|
|
|
36
36
|
.#{$n}-card__description {
|
|
37
37
|
display: block;
|
|
38
38
|
width: 100%;
|
|
39
|
+
height: fit-content;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
.#{$n}-card__content .#{$n}-button {
|
|
42
43
|
display: block;
|
|
43
|
-
align-self: flex-end;
|
|
44
44
|
width: 100%;
|
|
45
|
+
margin-top: auto;
|
|
45
46
|
font-weight: $fontweight-bold;
|
|
46
47
|
text-decoration: none;
|
|
47
48
|
}
|