ably-ui 10.1.0 → 10.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 76e1ede030779be9ed41f3cc25b96745a4e67b26f5af3f9d0bf17a4db88e720c
4
- data.tar.gz: 96593c32ab781fcd795378afbebc4e59d42e899268ce511704f015a68fd901b5
3
+ metadata.gz: af8d206f722feea7746ca06e1d8803d395ee933d38942cd465c4dd27f9436fd4
4
+ data.tar.gz: 4339b6fb51c26f9e346bb771d630e6b110a91126e504d1bae8230da518c0f888
5
5
  SHA512:
6
- metadata.gz: e35aa95fe45ff1f0856a6ab7afe5f0a520d54f70ce0e8f67eb9c8352164cd63aec048b39745505e29e5cac0a88841660ae29b0c7b4f307dbe6930523bdf004e5
7
- data.tar.gz: d7d3dea33c9813a03c0a57aaaf4cd6e67cb981cf2f6044109eda42273e8a1abc8fa9647ba2fe568a3202d1504c7d9d57815e127608ef2b7819c25e2efa67e670
6
+ metadata.gz: 254f4bc0edd9d589266dc494c86aa0017072d5cd3d9fc49267380b7c512bdad08f6f1db9b88a08665f3a04720f591a8a6ab68588219140f03f62b55c0686ee31
7
+ data.tar.gz: '029f9dc91933b35f02687abb66c9b5c7c2383c3c14e009cbcfd60f3396bd805586ef61ca55419fa26f16511809cee55bbdf8d2aed4d91a16e4fbe9b7999a89a4'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ably-ui (8.7.0.dev.fa55b85)
4
+ ably-ui (8.7.0.dev.80c4fae)
5
5
  view_component (>= 2.33, < 2.50)
6
6
 
7
7
  GEM
@@ -30,6 +30,10 @@ module AblyUi
30
30
  end
31
31
 
32
32
  module SharedAssets
33
+ def ably_logo
34
+ asset_path 'ably_ui/core/images/ably-logo.png'
35
+ end
36
+
33
37
  def ably_stack_path
34
38
  asset_path 'ably_ui/core/images/ably-stack.svg'
35
39
  end
@@ -1,28 +1,3 @@
1
- <%= link_to logo_href, class: 'h-32' do %>
2
- <%= tag.svg class: ["transition-colors", "text-cool-black"], data: { id: data_id }, width: "108", height: "32", viewBox: "0 0 108 32", xmlns: "http://www.w3.org/2000/svg" do %>
3
- <path
4
- d="M62.922 24.9786V4.08813H66.6933V11.6512C67.9709 10.435 69.6164 9.76044 71.3538 9.76044C75.4318 9.76044 79.0498 12.8674 79.0498 17.5484C79.0498 22.2293 75.4318 25.3465 71.3538 25.3465C69.5244 25.3465 67.7971 24.6209 66.5094 23.3024V24.9786H62.922ZM75.2785 17.5484C75.2785 14.932 73.4183 13.1025 70.9859 13.1025C68.6148 13.1025 66.7853 14.84 66.6933 17.3644V17.5484C66.6933 20.1648 68.5534 21.9942 70.9859 21.9942C73.4183 21.9942 75.2785 20.1648 75.2785 17.5484ZM80.7975 24.9786V4.08813H84.5688V24.9786H80.7975ZM89.8425 30.3954L92.0399 25.1523L86.0712 10.1284H90.1491L93.9511 20.6247L97.8144 10.1284H101.954L93.8591 30.4056H89.8425V30.3954ZM56.9329 10.1284V12.0191C55.6247 10.5883 53.7952 9.77066 51.9147 9.77066C47.8367 9.77066 44.2187 12.8777 44.2187 17.5586C44.2187 22.2497 47.8367 25.3465 51.9147 25.3465C53.8668 25.3465 55.7166 24.4982 57.0555 22.9754V24.9888H60.3465V10.1284H56.9329ZM56.5649 17.5484C56.5649 20.1341 54.7048 21.9942 52.2724 21.9942C49.8399 21.9942 47.9798 20.1341 47.9798 17.5484C47.9798 14.9626 49.8399 13.1025 52.2724 13.1025C54.6435 13.1025 56.473 14.8706 56.5649 17.3644V17.5484Z"
5
- fill="currentColor"
6
- />
7
- <path d="M19.2858 0L3.14788 29.5369L0 27.3293L14.932 0H19.2858ZM19.5107 0L35.6487 29.5369L38.7965 27.3293L23.8646 0H19.5107Z" fill="url(#<%= gradient_id_0 %>)" />
8
- <path d="M35.4238 29.7107L19.3983 17.16L3.37271 29.7107L6.64323 32L19.3983 22.0147L32.1533 32L35.4238 29.7107Z" fill="url(#<%= gradient_id_1 %>)" />
9
- <defs>
10
- <linearGradient id="<%= gradient_id_0 %>" x1="5.47361" y1="37.4219" x2="32.4603" y2="7.45023" gradientUnits="userSpaceOnUse">
11
- <stop stop-color="#FF5416" />
12
- <stop offset="0.2535" stop-color="#FF5115" />
13
- <stop offset="0.461" stop-color="#FF4712" />
14
- <stop offset="0.6523" stop-color="#FF350E" />
15
- <stop offset="0.8327" stop-color="#FF1E08" />
16
- <stop offset="1" stop-color="#FF0000" />
17
- </linearGradient>
18
- <linearGradient id="<%= gradient_id_1 %>" x1="10.7084" y1="39.3593" x2="26.6583" y2="21.6452" gradientUnits="userSpaceOnUse">
19
- <stop stop-color="#FF5416" />
20
- <stop offset="0.2535" stop-color="#FF5115" />
21
- <stop offset="0.461" stop-color="#FF4712" />
22
- <stop offset="0.6523" stop-color="#FF350E" />
23
- <stop offset="0.8327" stop-color="#FF1E08" />
24
- <stop offset="1" stop-color="#FF0000" />
25
- </linearGradient>
26
- </defs>
27
- <% end %>
1
+ <%= link_to logo_href, class: 'block', style: "height: 2.125rem", data: { id: data_id }, **additional_link_attrs do %>
2
+ <%= tag.img src: logo_url, width: "108px", alt: "Ably logo", **additional_img_attrs %>
28
3
  <% end %>
@@ -1,17 +1,26 @@
1
- require 'securerandom'
2
-
3
1
  module AblyUi
4
2
  module Core
5
3
  class Logo < ViewComponent::Base
6
4
  include AblyUi::Core::MeganavConfig
7
5
 
8
- attr_reader :href, :data_id, :gradient_id_0, :gradient_id_1
6
+ attr_reader :href,
7
+ :logo_url,
8
+ :data_id,
9
+ :additional_img_attrs,
10
+ :additional_link_attrs
9
11
 
10
- def initialize(data_id: '', href:)
12
+ def initialize(
13
+ href:,
14
+ logo_url:,
15
+ data_id: '',
16
+ additional_img_attrs: {},
17
+ additional_link_attrs: {}
18
+ )
11
19
  @data_id = data_id
12
20
  @href = href
13
- @gradient_id_0 = "paint_linear_#{SecureRandom.uuid}"
14
- @gradient_id_1 = "paint_linear_#{SecureRandom.uuid}"
21
+ @logo_url = logo_url
22
+ @additional_img_attrs = additional_img_attrs
23
+ @additional_link_attrs = additional_link_attrs
15
24
  end
16
25
 
17
26
  def logo_href
@@ -3,7 +3,7 @@
3
3
 
4
4
  <div class="ui-meganav ui-grid-px">
5
5
  <div className="mr-24">
6
- <%= render(AblyUi::Core::Logo.new(data_id: "meganav-logo", href: logo_link)) %>
6
+ <%= render(AblyUi::Core::Logo.new(data_id: "meganav-logo", href: logo_link, logo_url: ably_logo)) %>
7
7
  </div>
8
8
  <%= render(AblyUi::Core::MeganavItemsDesktop.new(theme_name: @theme_name, url_base: url_base)) %>
9
9
 
@@ -6,6 +6,7 @@ module AblyUi
6
6
  class Meganav < ViewComponent::Base
7
7
  include MeganavConfig
8
8
  include Util
9
+ include SharedAssets
9
10
  attr_reader :options, :login_link, :logo_link, :url_base
10
11
 
11
12
  renders_one :notice, AblyUi::Core::Notice
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("dompurify"),require("js-cookie"),require("lodash.throttle"),require("prop-types"),require("react"),require("redux")):"function"==typeof define&&define.amd?define([,,,,,],t):"object"==typeof exports?exports.AblyUi=t(require("dompurify"),require("js-cookie"),require("lodash.throttle"),require("prop-types"),require("react"),require("redux")):(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.Notice=t(e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0]))}(this,(function(e,t,r,n,o,i){return(()=>{"use strict";var c={6357:t=>{t.exports=e},9349:e=>{e.exports=t},2040:e=>{e.exports=r},3474:e=>{e.exports=n},9281:e=>{e.exports=o},5044:e=>{e.exports=i}},a={};function u(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return c[e](r,r.exports,u),r.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var l={};return(()=>{u.d(l,{default:()=>U});var e=u(9349),t=u.n(e),r=u(2040),n=u.n(r),o=u(9281),i=u.n(o),c=u(6357),a=u.n(c),s=u(3474),f=u.n(s);u(5044);var p=["name","size","color","additionalCSS"];function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d.apply(this,arguments)}var y=function(e){var t=e.name,r=e.size,n=void 0===r?"0.75rem":r,o=e.color,c=void 0===o?"":o,a=e.additionalCSS,u=void 0===a?"":a,l=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,p);return i().createElement("svg",d({className:"".concat(c," ").concat(u),style:{width:n,height:n}},l),i().createElement("use",{xlinkHref:"#sprite-".concat(t)}))};y.propTypes={name:f().string.isRequired,size:f().string,color:f().string,additionalCSS:f().string};const b=y;function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=r){var n,o,i=[],c=!0,a=!1;try{for(r=r.call(e);!(c=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==r.return||r.return()}finally{if(a)throw o}}return i}}(e,t)||w(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O(e){return function(e){if(Array.isArray(e))return j(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||w(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){if(e){if("string"==typeof e)return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j(e,t):void 0}}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var x="ui-flashes",S={items:[]},E=(h({},"flashes",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,t=arguments.length>1?arguments[1]:void 0;if("flash/push"===t.type){var r=Array.isArray(t.payload)?t.payload:[t.payload];return{items:[].concat(O(e.items),O(r))}}return e})),{type:f().oneOf(["error","success","notice","info","alert"]),content:f().string}),P={error:"bg-gui-error",success:"bg-zingy-green",notice:"bg-electric-cyan",info:"bg-electric-cyan",alert:"bg-active-orange"},A={error:"text-white",success:"text-cool-black",notice:"text-cool-black",info:"text-cool-black",alert:"text-white"},k=["success","info","notice"],q=function(e){var t=e.type,r=e.content,n=(0,o.useRef)(null),c=g((0,o.useState)(!1),2),u=c[0],l=c[1],s=g((0,o.useState)(0),2),f=s[0],p=s[1],d=g((0,o.useState)(!1),2),y=d[0],m=d[1];(0,o.useEffect)((function(){return m(!0)}),[]),(0,o.useEffect)((function(){k.includes(t)&&setTimeout((function(){h()}),8e3)}),[u]);var v,h=function(){n.current&&p(n.current.getBoundingClientRect().height),setTimeout((function(){return l(!0)}),0)},O=y&&!u;v=f&&!u?{height:"".concat(f,"px")}:u?{height:0,marginTop:0,zIndex:-1}:{};var w=a().sanitize(r,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","data-method","rel"]}),j={notice:"icon-gui-ably-badge",success:"icon-gui-tick",error:"icon-gui-warning",alert:"icon-gui-warning"},x={notice:"text-cool-black",success:"text-cool-black",error:"text-white",alert:"text-white"};return i().createElement("div",{className:"ui-flash-message ui-grid-px ".concat(O?"ui-flash-message-enter":""),style:v,ref:n,"data-id":"ui-flash"},i().createElement("div",{className:"".concat(P[t]," p-32 flex align-center rounded shadow-container-subtle")},j[t]&&i().createElement(b,{name:j[t],color:x[t],size:"1.5rem",additionalCSS:"mr-16 self-baseline"}),i().createElement("p",{className:"ui-flash-text ".concat(A[t]),dangerouslySetInnerHTML:{__html:w}}),i().createElement("button",{type:"button",className:"p-0 ml-auto self-start focus:outline-none",onClick:h},i().createElement(b,{name:"icon-gui-close",color:x[t],size:"1.5rem",additionalCSS:"transition-colors"}))))};q.propTypes=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){h(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},E);var T=function(e){var t=e.flashes,r=(null==t?void 0:t.items)||[];return i().createElement("div",{className:"ui-flash","data-id":x},r.map((function(e){return i().createElement(q,m({key:e.type},e))})))};T.propTypes={flashes:f().shape({items:f().arrayOf(f().shape(E))})};function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function L(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}f().arrayOf(f().arrayOf(f().string));var z=function(e){var t=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector("[data-id=".concat(e,"]"))}(x);t&&(t.style.marginTop=e?"4rem":null)},D=function(e){window.matchMedia("(min-width: 65rem)").matches?e.style.display=null:e.style.display="none"},I=function(e){e.style.maxHeight=0,e.style.overflow="hidden",z(!1)},N=function(e){e.style.maxHeight=null,e.style.overflow=null,z(!0)};const U=function(e){var r=e.bannerContainer,o=e.cookieId,i=e.noticeId,c=e.options;if("undefined"==typeof window)return function(){};if(!r)return console.warn("A Notice component was initited but no notice container was found."),function(){};if(function(e,r){return(t().get(e)||"").includes(r)}(o,i))return function(){};D(r),N(r);var a=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){L(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({collapse:!0},c),u=a.collapse?function(e){window.scrollY>5&&I(e);var t=n()((function(){window.scrollY>5?I(e):e.style.overflow&&N(e)}),100);return document.addEventListener("scroll",t),function(){return document.removeEventListener("scroll",t)}}(r):function(){},l=function(e,r,n,o){var i=e.querySelector("button");if(!i)return function(){};var c=function(){r&&n&&function(e,r){var n=t().get(e)||"";t().set(e,"".concat(n.replace("".concat(r,","),"")+r,","),{expires:90})}(r,n),I(e),o()};return i.addEventListener("click",c),function(){return document.removeEventListener("click",c)}}(r,o,i,u),s=function(e){var t=n()((function(){D(e)}),100);return window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}(r);return function(){[l,u,s].forEach((function(e){return e()}))}}})(),l.default})()}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("dompurify"),require("js-cookie"),require("lodash.throttle"),require("prop-types"),require("react"),require("redux")):"function"==typeof define&&define.amd?define([,,,,,],t):"object"==typeof exports?exports.AblyUi=t(require("dompurify"),require("js-cookie"),require("lodash.throttle"),require("prop-types"),require("react"),require("redux")):(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.Notice=t(e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0]))}(this,(function(e,t,r,n,o,i){return(()=>{"use strict";var c={6357:t=>{t.exports=e},9349:e=>{e.exports=t},2040:e=>{e.exports=r},3474:e=>{e.exports=n},9281:e=>{e.exports=o},5044:e=>{e.exports=i}},a={};function u(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return c[e](r,r.exports,u),r.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var l={};return(()=>{u.d(l,{default:()=>M});var e=u(9349),t=u.n(e),r=u(2040),n=u.n(r),o=u(9281),i=u.n(o),c=u(6357),a=u.n(c),s=u(3474),f=u.n(s);let d=(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t};u(5044);var p=["name","size","color","additionalCSS"];function y(){return y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y.apply(this,arguments)}var m=function(e){var t=e.name,r=e.size,n=void 0===r?"0.75rem":r,o=e.color,c=void 0===o?"":o,a=e.additionalCSS,u=void 0===a?"":a,l=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,p);return i().createElement("svg",y({className:"".concat(c," ").concat(u),style:{width:n,height:n}},l),i().createElement("use",{xlinkHref:"#sprite-".concat(t)}))};m.propTypes={name:f().string.isRequired,size:f().string,color:f().string,additionalCSS:f().string};const b=m;function v(){return v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},v.apply(this,arguments)}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){w(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=r){var n,o,i=[],c=!0,a=!1;try{for(r=r.call(e);!(c=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);c=!0);}catch(e){a=!0,o=e}finally{try{c||null==r.return||r.return()}finally{if(a)throw o}}return i}}(e,t)||x(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||x(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){if(e){if("string"==typeof e)return S(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?S(e,t):void 0}}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var E="ui-flashes",P={items:[]},A=(w({},"flashes",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P,t=arguments.length>1?arguments[1]:void 0;if("flash/push"===t.type){var r=Array.isArray(t.payload)?t.payload:[t.payload];return{items:[].concat(j(e.items),j(r))}}return e})),{type:f().oneOf(["error","success","notice","info","alert"]),content:f().string}),k={error:"bg-gui-error",success:"bg-zingy-green",notice:"bg-electric-cyan",info:"bg-electric-cyan",alert:"bg-active-orange"},q={error:"text-white",success:"text-cool-black",notice:"text-cool-black",info:"text-cool-black",alert:"text-white"},T=["success","info","notice"],C=function(e){var t=e.id,r=e.type,n=e.content,c=e.removeFlash,u=(0,o.useRef)(null),l=O((0,o.useState)(!1),2),s=l[0],f=l[1],d=O((0,o.useState)(0),2),p=d[0],y=d[1],m=O((0,o.useState)(!1),2),v=m[0],h=m[1],g=function(){u.current&&y(u.current.getBoundingClientRect().height),f(!0),setTimeout((function(){c(t)}),100)};(0,o.useEffect)((function(){return h(!0)}),[]),function(e,t){var r=(0,o.useRef)(null);(0,o.useEffect)((function(){return T.includes(e)&&(r.current=setTimeout((function(){t()}),8e3)),function(){r.current&&clearTimeout(r.current)}}),[])}(r,g);var w,j=v&&!s;w=p&&!s?{height:"".concat(p,"px")}:s?{height:0,marginTop:0,zIndex:-1}:{};var x=a().sanitize(n,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","data-method","rel"]}),S={notice:"icon-gui-ably-badge",success:"icon-gui-tick",error:"icon-gui-warning",alert:"icon-gui-warning"},E={notice:"text-cool-black",success:"text-cool-black",error:"text-white",alert:"text-white"};return i().createElement("div",{className:"ui-flash-message ui-grid-px ".concat(j?"ui-flash-message-enter":""),style:w,ref:u,"data-id":"ui-flash"},i().createElement("div",{className:"".concat(k[r]," p-32 flex align-center rounded shadow-container-subtle")},S[r]&&i().createElement(b,{name:S[r],color:E[r],size:"1.5rem",additionalCSS:"mr-16 self-baseline"}),i().createElement("p",{className:"ui-flash-text ".concat(q[r]),dangerouslySetInnerHTML:{__html:x}}),i().createElement("button",{type:"button",className:"p-0 ml-auto self-start focus:outline-none",onClick:g},i().createElement(b,{name:"icon-gui-close",color:E[r],size:"1.5rem",additionalCSS:"transition-colors"}))))};C.propTypes=g({},A);var I=function(e){var t=e.flashes,r=O((0,o.useState)([]),2),n=r[0],c=r[1],a=function(e){return c((function(t){return t.filter((function(t){return t.id!==e}))}))};return(0,o.useEffect)((function(){c((function(e){return[].concat(j(e),j(((null==t?void 0:t.items)||[]).map((function(e){return g(g({},e),{},{id:d(),removed:!1})}))))}))}),[t]),console.log({flashesWithIds:n}),i().createElement("div",{className:"ui-flash","data-id":E},n.filter((function(e){return!e.removed})).map((function(e){return i().createElement(C,v({removeFlash:a,key:e.id},e))})))};I.propTypes={flashes:f().shape({items:f().arrayOf(f().shape(A))})};function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function z(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}f().arrayOf(f().arrayOf(f().string));var D=function(e){var t=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector("[data-id=".concat(e,"]"))}(E);t&&(t.style.marginTop=e?"4rem":null)},N=function(e){window.matchMedia("(min-width: 65rem)").matches?e.style.display=null:e.style.display="none"},U=function(e){e.style.maxHeight=0,e.style.overflow="hidden",D(!1)},_=function(e){e.style.maxHeight=null,e.style.overflow=null,D(!0)};const M=function(e){var r=e.bannerContainer,o=e.cookieId,i=e.noticeId,c=e.options;if("undefined"==typeof window)return function(){};if(!r)return console.warn("A Notice component was initited but no notice container was found."),function(){};if(function(e,r){return(t().get(e)||"").includes(r)}(o,i))return function(){};N(r),_(r);var a=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach((function(t){z(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({collapse:!0},c),u=a.collapse?function(e){window.scrollY>5&&U(e);var t=n()((function(){window.scrollY>5?U(e):e.style.overflow&&_(e)}),100);return document.addEventListener("scroll",t),function(){return document.removeEventListener("scroll",t)}}(r):function(){},l=function(e,r,n,o){var i=e.querySelector("button");if(!i)return function(){};var c=function(){r&&n&&function(e,r){var n=t().get(e)||"";t().set(e,"".concat(n.replace("".concat(r,","),"")+r,","),{expires:90})}(r,n),U(e),o()};return i.addEventListener("click",c),function(){return document.removeEventListener("click",c)}}(r,o,i,u),s=function(e){var t=n()((function(){N(e)}),100);return window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}(r);return function(){[l,u,s].forEach((function(e){return e()}))}}})(),l.default})()}));
@@ -11,7 +11,7 @@
11
11
  <path d="M24 13C24 6.37258 18.6274 1 12 1C5.37258 1 0 6.37258 0 13C0 18.9895 4.3882 23.954 10.125 24.8542V16.4688H7.07812V13H10.125V10.3563C10.125 7.34875 11.9166 5.6875 14.6576 5.6875C15.9701 5.6875 17.3438 5.92188 17.3438 5.92188V8.875H15.8306C14.34 8.875 13.875 9.80008 13.875 10.75V13H17.2031L16.6711 16.4688H13.875V24.8542C19.6118 23.954 24 18.9895 24 13Z" fill="currentColor"/>
12
12
  <path d="M16.6711 16.4688L17.2031 13H13.875V10.75C13.875 9.80102 14.34 8.875 15.8306 8.875H17.3438V5.92188C17.3438 5.92188 15.9705 5.6875 14.6576 5.6875C11.9166 5.6875 10.125 7.34875 10.125 10.3563V13H7.07812V16.4688H10.125V24.8542C11.3674 25.0486 12.6326 25.0486 13.875 24.8542V16.4688H16.6711Z" fill="none"/>
13
13
  </symbol><symbol id="sprite-github" viewBox="0 0 24 24"><title>sprite-github</title>
14
- <path fill-rule="evenodd" clip-rule="evenodd" d="M12 0C5.4 0 0 5.41945 0 12.0432C0 17.3623 3.4 21.8785 8.2 23.4843C8.8 23.5846 9 23.1832 9 22.8821C9 22.581 9 21.8785 9 20.8749C5.7 21.5774 5 19.2692 5 19.2692C4.5 17.8641 3.7 17.4627 3.7 17.4627C2.6 16.7601 3.8 16.7602 3.8 16.7602C5 16.8605 5.6 17.9645 5.6 17.9645C6.7 19.771 8.4 19.2692 9.1 18.9681C9.2 18.1652 9.5 17.6634 9.9 17.3623C7.1 17.0612 4.3 16.0576 4.3 11.4411C4.3 10.1364 4.8 9.03242 5.5 8.22953C5.5 7.82809 5 6.62377 5.7 5.01801C5.7 5.01801 6.7 4.71693 9 6.22233C10 5.92125 11 5.82089 12 5.82089C13 5.82089 14 5.92125 15 6.22233C17.3 4.71693 18.3 5.01801 18.3 5.01801C19 6.72413 18.5 7.92845 18.4 8.22953C19.2 9.03242 19.6 10.1364 19.6 11.4411C19.6 16.0576 16.8 17.0612 14.1 17.3623C14.5 17.7638 14.9 18.4663 14.9 19.5702C14.9 21.176 14.9 22.4807 14.9 22.8821C14.9 23.1832 15.1 23.5846 15.7 23.4843C20.6 21.8785 24 17.3623 24 12.0432C24 5.41945 18.6 0 12 0Z"/>
14
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M12 0C5.4 0 0 5.41945 0 12.0432C0 17.3623 3.4 21.8785 8.2 23.4843C8.8 23.5846 9 23.1832 9 22.8821C9 22.581 9 21.8785 9 20.8749C5.7 21.5774 5 19.2692 5 19.2692C4.5 17.8641 3.7 17.4627 3.7 17.4627C2.6 16.7601 3.8 16.7602 3.8 16.7602C5 16.8605 5.6 17.9645 5.6 17.9645C6.7 19.771 8.4 19.2692 9.1 18.9681C9.2 18.1652 9.5 17.6634 9.9 17.3623C7.1 17.0612 4.3 16.0576 4.3 11.4411C4.3 10.1364 4.8 9.03242 5.5 8.22953C5.5 7.82809 5 6.62377 5.7 5.01801C5.7 5.01801 6.7 4.71693 9 6.22233C10 5.92125 11 5.82089 12 5.82089C13 5.82089 14 5.92125 15 6.22233C17.3 4.71693 18.3 5.01801 18.3 5.01801C19 6.72413 18.5 7.92845 18.4 8.22953C19.2 9.03242 19.6 10.1364 19.6 11.4411C19.6 16.0576 16.8 17.0612 14.1 17.3623C14.5 17.7638 14.9 18.4663 14.9 19.5702C14.9 21.176 14.9 22.4807 14.9 22.8821C14.9 23.1832 15.1 23.5846 15.7 23.4843C20.6 21.8785 24 17.3623 24 12.0432C24 5.41945 18.6 0 12 0Z" fill="currentColor"/>
15
15
  </symbol><symbol id="sprite-glassdoor" viewBox="0 0 18 24"><title>sprite-glassdoor</title>
16
16
  <path d="M14.122 20.5734H0.5C0.5 22.4677 2.0222 24 3.90634 24H14.122C16.0027 24 17.5249 22.4643 17.5249 20.5734V6.49471C17.5249 6.42706 17.4708 6.36617 17.4032 6.36617H14.2438C14.1761 6.36617 14.122 6.42368 14.122 6.49133V20.57V20.5734ZM14.122 0C16.0027 0 17.5249 1.53573 17.5249 3.43002H3.90634V17.5087C3.90634 17.5763 3.84884 17.6338 3.78118 17.6338H0.625159C0.557505 17.6338 0.5 17.5763 0.5 17.5087V3.43002C0.5 1.53573 2.0222 0 3.90634 0H14.122Z"/>
17
17
  </symbol><symbol fill="none" id="sprite-google" viewBox="0 0 18 18"><title>sprite-google</title>
@@ -396,12 +396,12 @@
396
396
  </symbol><symbol id="sprite-quote" viewBox="0 0 25 19"><title>sprite-quote</title>
397
397
  <path d="M8.78125 19H0V12.7188C0 10.1771 0.21875 8.17708 0.65625 6.71875C1.11458 5.23958 1.94792 3.91667 3.15625 2.75C4.36458 1.58333 5.90625 0.666667 7.78125 0L9.5 3.625C7.75 4.20833 6.48958 5.02083 5.71875 6.0625C4.96875 7.10417 4.57292 8.48958 4.53125 10.2188H8.78125V19ZM23.4375 19H14.6562V12.7188C14.6562 10.1562 14.875 8.14583 15.3125 6.6875C15.7708 5.22917 16.6042 3.91667 17.8125 2.75C19.0417 1.58333 20.5833 0.666667 22.4375 0L24.1562 3.625C22.4062 4.20833 21.1458 5.02083 20.375 6.0625C19.625 7.10417 19.2292 8.48958 19.1875 10.2188H23.4375V19Z"/>
398
398
  </symbol><symbol fill="none" id="sprite-stackoverflow" viewBox="0 0 24 24"><title>sprite-stackoverflow</title>
399
- <path fill-rule="evenodd" clip-rule="evenodd" d="M16.8833 17.0404L6.44573 14.8304L6.89029 12.7367L17.3279 14.9467L16.8833 17.0404ZM17.4825 14.3457L7.81808 9.82876L8.72653 7.89014L18.391 12.4071L17.4825 14.3457ZM18.7002 11.9031L10.5048 5.05977L11.8771 3.41195L20.0726 10.2552L18.7002 11.9031ZM14.0806 1.27948L15.8009 0L22.1601 8.58804L20.4398 9.86753L14.0806 1.27948ZM16.8833 19.7351H6.25244V17.6026H16.8833V19.7351ZM21.1356 15.4701H19.0094V21.8675H4.12617V15.4701H2V24H21.1356V15.4701Z" fill="#03020D"/>
399
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M16.8833 17.0404L6.44573 14.8304L6.89029 12.7367L17.3279 14.9467L16.8833 17.0404ZM17.4825 14.3457L7.81808 9.82876L8.72653 7.89014L18.391 12.4071L17.4825 14.3457ZM18.7002 11.9031L10.5048 5.05977L11.8771 3.41195L20.0726 10.2552L18.7002 11.9031ZM14.0806 1.27948L15.8009 0L22.1601 8.58804L20.4398 9.86753L14.0806 1.27948ZM16.8833 19.7351H6.25244V17.6026H16.8833V19.7351ZM21.1356 15.4701H19.0094V21.8675H4.12617V15.4701H2V24H21.1356V15.4701Z" fill="currentColor"/>
400
400
  </symbol><symbol id="sprite-twitter" viewBox="0 0 24 20"><title>sprite-twitter</title>
401
401
  <path d="M24 2.304C23.1129 2.7 22.1658 2.964 21.1708 3.084C22.1898 2.472 22.969 1.512 23.3287 0.36C22.3816 0.924 21.3267 1.332 20.1998 1.56C19.3007 0.6 18.03 0 16.6034 0C13.8821 0 11.6883 2.208 11.6883 4.92C11.6883 5.304 11.7363 5.676 11.8202 6.048C7.73227 5.844 4.11189 3.888 1.67832 0.9C1.25874 1.632 1.00699 2.472 1.00699 3.372C1.00699 5.076 1.87013 6.588 3.2008 7.476C2.3976 7.452 1.63037 7.224 0.971029 6.864C0.971029 6.888 0.971029 6.9 0.971029 6.924C0.971029 9.312 2.66134 11.304 4.91509 11.748C4.50749 11.856 4.06394 11.916 3.62038 11.916C3.30869 11.916 2.997 11.88 2.6973 11.832C3.32068 13.788 5.14286 15.216 7.28871 15.252C5.61039 16.572 3.48851 17.364 1.17483 17.364C0.779221 17.364 0.383616 17.34 0 17.292C2.18182 18.684 4.75924 19.5 7.54046 19.5C16.5914 19.5 21.5305 12 21.5305 5.496C21.5305 5.28 21.5305 5.076 21.5185 4.86C22.5015 4.164 23.3407 3.3 24 2.304Z"/>
402
402
  </symbol><symbol fill="none" id="sprite-youtube" viewBox="0 0 32 22"><title>sprite-youtube</title>
403
403
  <g clip-path="url(#clip0_1509_18255)">
404
- <path d="M30.525 3.44433C30.1655 2.09844 29.113 1.03726 27.778 0.6749C25.3391 0.00195312 15.5834 0.00195312 15.5834 0.00195312C15.5834 0.00195312 5.82773 0.00195312 3.38881 0.649017C2.0795 1.01137 1.00124 2.09844 0.64182 3.44433C0 5.90318 0 11.002 0 11.002C0 11.002 0 16.1268 0.64182 18.5597C1.00124 19.9056 2.05382 20.9668 3.38881 21.3292C5.8534 22.0021 15.5834 22.0021 15.5834 22.0021C15.5834 22.0021 25.3391 22.0021 27.778 21.3551C29.113 20.9927 30.1655 19.9315 30.525 18.5856C31.1668 16.1268 31.1668 11.0279 31.1668 11.0279C31.1668 11.0279 31.1925 5.90318 30.525 3.44433Z" fill="#282828"/>
404
+ <path d="M30.525 3.44433C30.1655 2.09844 29.113 1.03726 27.778 0.6749C25.3391 0.00195312 15.5834 0.00195312 15.5834 0.00195312C15.5834 0.00195312 5.82773 0.00195312 3.38881 0.649017C2.0795 1.01137 1.00124 2.09844 0.64182 3.44433C0 5.90318 0 11.002 0 11.002C0 11.002 0 16.1268 0.64182 18.5597C1.00124 19.9056 2.05382 20.9668 3.38881 21.3292C5.8534 22.0021 15.5834 22.0021 15.5834 22.0021C15.5834 22.0021 25.3391 22.0021 27.778 21.3551C29.113 20.9927 30.1655 19.9315 30.525 18.5856C31.1668 16.1268 31.1668 11.0279 31.1668 11.0279C31.1668 11.0279 31.1925 5.90318 30.525 3.44433Z" fill="currentColor"/>
405
405
  <path d="M20.5892 11.0021L12.4766 6.2915V15.7128L20.5892 11.0021Z" fill="white"/>
406
406
  </g>
407
407
  <defs>
@@ -1,3 +1,3 @@
1
1
  module AblyUi
2
- VERSION = '10.1.0'
2
+ VERSION = '10.2.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ably-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.1.0
4
+ version: 10.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Piatek
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-11-01 00:00:00.000000000 Z
13
+ date: 2022-11-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: view_component
@@ -100,6 +100,7 @@ files:
100
100
  - lib/ably_ui/core/icon/component.js
101
101
  - lib/ably_ui/core/icon/icon.html.erb
102
102
  - lib/ably_ui/core/icon/icon.rb
103
+ - lib/ably_ui/core/images/ably-logo.png
103
104
  - lib/ably_ui/core/images/ably-logo.svg
104
105
  - lib/ably_ui/core/images/ably-stack.svg
105
106
  - lib/ably_ui/core/images/cust-logo-ao-col-pos.png