@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.
Files changed (46) hide show
  1. package/build/dist/lib/components.js +180 -153
  2. package/build/dist/lib/components.js.map +1 -1
  3. package/build/dist/lib/components.min.js +1 -1
  4. package/build/dist/lib/components.min.js.map +1 -1
  5. package/build/dist/lib/hooks.js +150 -136
  6. package/build/dist/lib/hooks.js.map +1 -1
  7. package/build/dist/lib/hooks.min.js +1 -1
  8. package/build/dist/lib/hooks.min.js.map +1 -1
  9. package/build/dist/lib/index.debug.js +35 -35
  10. package/build/dist/lib/index.debug.min.js +1 -1
  11. package/build/dist/lib/index.debug.min.js.LICENSE.txt +4 -4
  12. package/build/dist/lib/index.debug.min.js.map +1 -1
  13. package/build/dist/lib/index.js +86 -61
  14. package/build/dist/lib/index.js.map +1 -1
  15. package/build/dist/lib/index.min.js +1 -1
  16. package/build/dist/lib/index.min.js.map +1 -1
  17. package/build/dist/lib/standalone.js +86 -62
  18. package/build/dist/lib/standalone.js.map +1 -1
  19. package/build/dist/lib/standalone.min.js +1 -1
  20. package/build/dist/lib/standalone.min.js.map +1 -1
  21. package/build/dist/lib/style-guide.js +92 -61
  22. package/build/dist/lib/style-guide.js.map +1 -1
  23. package/build/dist/lib/style-guide.min.js +1 -1
  24. package/build/dist/lib/style-guide.min.js.map +1 -1
  25. package/build/dist/lib/styles.css +1 -1
  26. package/build/dist/lib/utils.js +180 -154
  27. package/build/dist/lib/utils.js.map +1 -1
  28. package/build/dist/lib/utils.min.js +1 -1
  29. package/build/dist/lib/utils.min.js.map +1 -1
  30. package/package.json +1 -1
  31. package/src/javascripts/domains/translations/components/options-dialog/translation-option.tsx +1 -1
  32. package/src/javascripts/style-guide/states.js +8 -0
  33. package/src/javascripts/ui/components/chat-status/chat-status-action.tsx +2 -2
  34. package/src/javascripts/ui/components/conversation/event/carousel-component/components/controls.js +2 -2
  35. package/src/javascripts/ui/components/conversation/event/choice-prompt.js +1 -1
  36. package/src/javascripts/ui/components/conversation/event/image-lightbox.js +1 -1
  37. package/src/javascripts/ui/components/conversation/event-divider.js +6 -1
  38. package/src/javascripts/ui/components/form-controls/error.js +1 -1
  39. package/src/javascripts/ui/components/form-controls/file-input.js +1 -1
  40. package/src/javascripts/ui/components/layout/agent-info.js +1 -1
  41. package/src/javascripts/ui/components/layout/{icon.js → icon.tsx} +74 -37
  42. package/src/javascripts/ui/components/options/options-button.js +1 -1
  43. package/src/javascripts/ui/components/suggestions/suggestions-item.js +1 -1
  44. package/src/javascripts/ui/components/view/window-view/window-open-button.js +1 -1
  45. package/src/javascripts/ui/components/widgets/lightbox.js +1 -1
  46. package/src/stylesheets/5-components/_message-card.scss +4 -3
@@ -2622,7 +2622,7 @@ _API_ready = new WeakMap(), _API_externalId = new WeakMap(), _API_conversationAu
2622
2622
  return {
2623
2623
  clientName: "@seamly/web-ui",
2624
2624
  clientVariant: api_classPrivateFieldGet(this, _API_layoutMode, "f"),
2625
- clientVersion: "22.3.0-beta.1",
2625
+ clientVersion: "22.3.0-beta.2",
2626
2626
  currentUrl: window.location.toString(),
2627
2627
  screenResolution: `${window.screen.width}x${window.screen.height}`,
2628
2628
  timezone: getTimeZone(),
@@ -10843,7 +10843,8 @@ function CarouselMessageSlide({
10843
10843
  /* harmony default export */ const icon_send_32 = ("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32px\" height=\"32px\" x=\"0px\" y=\"0px\" viewBox=\"0 0 32 32\"><defs/><path fill=\"#4A48C1\" d=\"M6.714,14.985l17.837-7.906c0.681-0.302,1.414,0.301,1.25,1.027L22.273,23.59\tc-0.13,0.566-0.751,0.865-1.275,0.613l-3.623-1.752l-2.334,2.287c-0.572,0.562-1.538,0.156-1.538-0.645V21.01\tc0-0.217,0.078-0.43,0.222-0.594l7.676-8.841l-10.414,7.472l-4.351-2.445C5.987,16.236,6.033,15.287,6.714,14.985L6.714,14.985z\"/></svg>");
10844
10844
  ;// CONCATENATED MODULE: ./node_modules/raw-loader/dist/cjs.js!./src/icons/icon_upload-32.svg
10845
10845
  /* harmony default export */ const icon_upload_32 = ("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32px\" height=\"32px\" x=\"0px\" y=\"0px\" viewBox=\"0 0 32 32\"><defs/><path fill=\"#4A48C1\" d=\"M9.488,13.481c-0.391-0.391-0.391-1.023,0-1.414l5.805-5.805c0.026-0.026,0.06-0.036,0.088-0.058\tc0.073-0.06,0.146-0.119,0.235-0.156c0.246-0.103,0.522-0.103,0.769,0c0.093,0.039,0.171,0.101,0.249,0.165\tc0.023,0.02,0.053,0.027,0.074,0.049l5.805,5.805c0.391,0.391,0.391,1.023,0,1.414c-0.195,0.195-0.451,0.293-0.707,0.293\ts-0.512-0.098-0.707-0.293L17,9.383V20.33c0,0.553-0.447,1-1,1c-0.552,0-1-0.447-1-1V9.383l-4.098,4.098\tC10.512,13.872,9.879,13.872,9.488,13.481z M22.819,24.031H9.181c-0.552,0-1,0.447-1,1s0.448,1,1,1h13.639c0.553,0,1-0.447,1-1\tS23.372,24.031,22.819,24.031z\"/></svg>");
10846
- ;// CONCATENATED MODULE: ./src/javascripts/ui/components/layout/icon.js
10846
+ ;// CONCATENATED MODULE: ./src/javascripts/ui/components/layout/icon.tsx
10847
+
10847
10848
  /* eslint-disable import/no-webpack-loader-syntax */
10848
10849
  // The eslint rules are disabled for this as otherwsise we'd need to include the loader rule in all implementations
10849
10850
  // this can again be changed when we can import pre-built packages in implementations
@@ -10868,58 +10869,70 @@ function CarouselMessageSlide({
10868
10869
 
10869
10870
 
10870
10871
 
10871
-
10872
10872
 
10873
10873
 
10874
10874
  /* eslint-enable import/no-webpack-loader-syntax */
10875
-
10876
-
10877
-
10878
10875
  const ICONS = {
10879
- send32: icon_send_32,
10880
- balloon32: icon_balloon_32,
10881
- newTopic32: icon_newtopic_32,
10882
- newTranslation16: icon_newtranslation_16,
10883
- newTranslation32: icon_newtranslation_32,
10884
- avatar32: avatar_bot_32,
10885
- chevronDown8: icon_chevron_down_8,
10886
- chevronDown32: icon_chevron_down_32,
10887
- chevronRight8: icon_chevron_right_8,
10888
- chevronRight16: icon_chevron_right_16,
10889
- close8: icon_close_8,
10890
- close16: icon_close_16,
10891
- enlarge32: icon_enlarge_32,
10892
- options32: icon_options_32,
10893
- file32: icon_file_32,
10894
- upload32: icon_upload_32,
10895
- download16: icon_download_16,
10896
- error16: icon_error_16,
10897
- arrowLeft16: icon_arrow_left_16,
10898
- arrowRight16: icon_arrow_right_16,
10899
- check32: icon_check_32,
10900
- check16: icon_check_16
10901
- };
10902
- const Icon = ({
10903
- name,
10904
- size = '32',
10905
- className = undefined,
10906
- alt
10907
- }) => {
10908
- const iconName = `${name}${size}`;
10909
- return (0,jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
10910
- children: [(0,jsx_runtime_namespaceObject.jsx)("div", {
10911
- "aria-hidden": "true",
10912
- className: className || css_className('icon'),
10913
- dangerouslySetInnerHTML: {
10914
- __html: ICONS[iconName]
10915
- }
10916
- }), alt && (0,jsx_runtime_namespaceObject.jsx)("span", {
10917
- className: css_className('visually-hidden'),
10918
- children: alt
10919
- })]
10920
- });
10876
+ send: {
10877
+ 32: icon_send_32,
10878
+ },
10879
+ balloon: {
10880
+ 32: icon_balloon_32,
10881
+ },
10882
+ newTopic: {
10883
+ 32: icon_newtopic_32,
10884
+ },
10885
+ newTranslation: {
10886
+ 16: icon_newtranslation_16,
10887
+ 32: icon_newtranslation_32,
10888
+ },
10889
+ avatar: {
10890
+ 32: avatar_bot_32,
10891
+ },
10892
+ chevronDown: {
10893
+ 8: icon_chevron_down_8,
10894
+ 32: icon_chevron_down_32,
10895
+ },
10896
+ chevronRight: {
10897
+ 8: icon_chevron_right_8,
10898
+ 16: icon_chevron_right_16,
10899
+ },
10900
+ close: {
10901
+ 8: icon_close_8,
10902
+ 16: icon_close_16,
10903
+ },
10904
+ enlarge: {
10905
+ 32: icon_enlarge_32,
10906
+ },
10907
+ options: {
10908
+ 32: icon_options_32,
10909
+ },
10910
+ file: {
10911
+ 32: icon_file_32,
10912
+ },
10913
+ upload: {
10914
+ 32: icon_upload_32,
10915
+ },
10916
+ download: {
10917
+ 16: icon_download_16,
10918
+ },
10919
+ error: {
10920
+ 16: icon_error_16,
10921
+ },
10922
+ arrowLeft: {
10923
+ 16: icon_arrow_left_16,
10924
+ },
10925
+ arrowRight: {
10926
+ 16: icon_arrow_right_16,
10927
+ },
10928
+ check: {
10929
+ 16: icon_check_16,
10930
+ 32: icon_check_32,
10931
+ },
10921
10932
  };
10933
+ const Icon = ({ name, size = '32', className, alt }) => ((0,jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, { children: [(0,jsx_runtime_namespaceObject.jsx)("div", { "aria-hidden": "true", className: className || css_className('icon'), dangerouslySetInnerHTML: { __html: ICONS[name][size] } }), alt && (0,jsx_runtime_namespaceObject.jsx)("span", { className: css_className('visually-hidden'), children: alt })] }));
10922
10934
  /* harmony default export */ const layout_icon = (Icon);
10935
+
10923
10936
  ;// CONCATENATED MODULE: ./src/javascripts/ui/components/conversation/event/carousel-component/components/controls.js
10924
10937
 
10925
10938
 
@@ -10950,7 +10963,8 @@ function CarouselControls({
10950
10963
  onClick: handlePrevious,
10951
10964
  children: (0,jsx_runtime_namespaceObject.jsx)(layout_icon, {
10952
10965
  name: "arrowLeft",
10953
- size: "16"
10966
+ size: "16",
10967
+ alt: ""
10954
10968
  })
10955
10969
  }), children, (0,jsx_runtime_namespaceObject.jsx)("button", {
10956
10970
  className: css_className('button', 'button--next'),
@@ -10958,7 +10972,8 @@ function CarouselControls({
10958
10972
  onClick: handleNext,
10959
10973
  children: (0,jsx_runtime_namespaceObject.jsx)(layout_icon, {
10960
10974
  name: "arrowRight",
10961
- size: "16"
10975
+ size: "16",
10976
+ alt: ""
10962
10977
  })
10963
10978
  })]
10964
10979
  });
@@ -11245,7 +11260,8 @@ const ChoicePrompt = ({
11245
11260
  "aria-describedby": descriptorId,
11246
11261
  children: [showOptions ? t('message.choicePrompts.cancelChooseAgain') : t('message.choicePrompts.chooseAgain'), (0,jsx_runtime_namespaceObject.jsx)(layout_icon, {
11247
11262
  name: "chevronDown",
11248
- size: "8"
11263
+ size: "8",
11264
+ alt: ""
11249
11265
  })]
11250
11266
  }), showOptions && (0,jsx_runtime_namespaceObject.jsx)(message_container, {
11251
11267
  type: "choice-prompt",
@@ -11305,7 +11321,8 @@ const SuggestionsItem = ({
11305
11321
  className: css_className('button', 'button--primary'),
11306
11322
  children: [hasIcon && (0,jsx_runtime_namespaceObject.jsx)(layout_icon, {
11307
11323
  name: "chevronRight",
11308
- size: "8"
11324
+ size: "8",
11325
+ alt: ""
11309
11326
  }), question]
11310
11327
  })
11311
11328
  });
@@ -11535,7 +11552,8 @@ function EventDivider({
11535
11552
  children: iconName ? (0,jsx_runtime_namespaceObject.jsx)(layout_icon, {
11536
11553
  name: iconName,
11537
11554
  size: iconSize,
11538
- className: iconClassName
11555
+ className: iconClassName,
11556
+ alt: ""
11539
11557
  }) : (0,jsx_runtime_namespaceObject.jsx)("img", {
11540
11558
  src: graphicSrc,
11541
11559
  className: css_className({
@@ -13423,7 +13441,8 @@ const Lightbox = ({
13423
13441
  onClick: onClose,
13424
13442
  children: [(0,jsx_runtime_namespaceObject.jsx)(layout_icon, {
13425
13443
  name: "close",
13426
- size: "16"
13444
+ size: "16",
13445
+ alt: ""
13427
13446
  }), t('lightbox.closeLabel')]
13428
13447
  })]
13429
13448
  })
@@ -13471,7 +13490,8 @@ const ImageLightbox = ({
13471
13490
  description
13472
13491
  }), (0,jsx_runtime_namespaceObject.jsx)(layout_icon, {
13473
13492
  name: "enlarge",
13474
- size: "32"
13493
+ size: "32",
13494
+ alt: ""
13475
13495
  })]
13476
13496
  }), showLightBox && (0,jsx_runtime_namespaceObject.jsx)(lightbox, {
13477
13497
  url: url,
@@ -15797,7 +15817,8 @@ function error_Error({
15797
15817
  className: css_className('error__message'),
15798
15818
  children: [(0,jsx_runtime_namespaceObject.jsx)(layout_icon, {
15799
15819
  name: "error",
15800
- size: "16"
15820
+ size: "16",
15821
+ alt: ""
15801
15822
  }), error]
15802
15823
  })
15803
15824
  });
@@ -16174,7 +16195,8 @@ const OptionsButton = () => {
16174
16195
  "aria-disabled": !multiMenu && !firstOption.available ? 'true' : null,
16175
16196
  children: [multiMenu && (0,jsx_runtime_namespaceObject.jsx)(layout_icon, {
16176
16197
  name: "options",
16177
- size: "32"
16198
+ size: "32",
16199
+ alt: ""
16178
16200
  }), (0,jsx_runtime_namespaceObject.jsx)("span", {
16179
16201
  className: css_className('button__text'),
16180
16202
  children: multiMenu ? t('options.openButtonText') : `${firstOption.title}${!firstOption.available ? ' ' : ''}`
@@ -16197,7 +16219,7 @@ const TranslationOption = ({ label, checked, description, onChange, id, itemClas
16197
16219
  onChange();
16198
16220
  }
16199
16221
  };
16200
- return ((0,jsx_runtime_namespaceObject.jsxs)("li", { className: css_className([itemClassName, 'translation-options__item']), "aria-selected": checked, role: "option", tabIndex: 0, onClick: onChange, onKeyDown: onKeyDown, id: id, children: [(0,jsx_runtime_namespaceObject.jsx)(layout_icon, { alt: "", name: "check", size: "16" }), label, " ", description && (0,jsx_runtime_namespaceObject.jsxs)("span", { children: ["(", description, ")"] })] }));
16222
+ return ((0,jsx_runtime_namespaceObject.jsxs)("li", { className: css_className([itemClassName, 'translation-options__item']), "aria-selected": checked, role: "option", tabIndex: 0, onClick: onChange, onKeyDown: onKeyDown, id: id, children: [(0,jsx_runtime_namespaceObject.jsx)(layout_icon, { name: "check", size: "16", alt: "" }), label, " ", description && (0,jsx_runtime_namespaceObject.jsxs)("span", { children: ["(", description, ")"] })] }));
16201
16223
  };
16202
16224
  /* harmony default export */ const translation_option = (TranslationOption);
16203
16225
 
@@ -17024,7 +17046,8 @@ function FileInput({
17024
17046
  className: css_className('upload__label'),
17025
17047
  children: [(0,jsx_runtime_namespaceObject.jsx)(layout_icon, {
17026
17048
  name: "upload",
17027
- size: "32"
17049
+ size: "32",
17050
+ alt: ""
17028
17051
  }), (0,jsx_runtime_namespaceObject.jsxs)("div", {
17029
17052
  children: [(0,jsx_runtime_namespaceObject.jsx)("span", {
17030
17053
  className: css_className(['upload__label--text']),
@@ -17767,7 +17790,8 @@ const ButtonIcon = () => {
17767
17790
  alt: ""
17768
17791
  }) : (0,jsx_runtime_namespaceObject.jsx)(layout_icon, {
17769
17792
  name: "avatar",
17770
- size: "32"
17793
+ size: "32",
17794
+ alt: ""
17771
17795
  });
17772
17796
  };
17773
17797
  const WindowOpenButton = ({
@@ -19763,7 +19787,7 @@ const standardState = {
19763
19787
  type: 'carousel',
19764
19788
  id: randomId(),
19765
19789
  body: {
19766
- cards: [cardAskText.payload.body, cardNavigate.payload.body, cardTopic.payload.body]
19790
+ cards: [cardAskText.payload.body, cardNavigate.payload.body, cardTopic.payload.body, cardNoImage.payload.body]
19767
19791
  }
19768
19792
  }
19769
19793
  }]
@@ -20162,6 +20186,13 @@ const standardState = {
20162
20186
  }
20163
20187
  }
20164
20188
  },
20189
+ config: {
20190
+ ...baseState.config,
20191
+ context: {
20192
+ ...baseState.context,
20193
+ locale: 'nl'
20194
+ }
20195
+ },
20165
20196
  translations: {
20166
20197
  ...translationsSlice,
20167
20198
  isAvailable: true,