ably-ui 5.0.1.dev.d1188a1.0 → 5.1.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e9c533573005996fb9128e6582b9a19db4770fe7efb240c65943e6ad5d2ed06
4
- data.tar.gz: 96564505a6fcff82b63fe6e7fde8e83fdab0ae49606a8645d7800ef3c1053601
3
+ metadata.gz: 579f5c9d394ac5842b13f6dbde0cf905ea747d119ea68bbf08d8dba2c78abd05
4
+ data.tar.gz: caa43133fd55866e09554ef054728f7e0635ce28ca622a56a973106fc5626994
5
5
  SHA512:
6
- metadata.gz: 3c7590aa9ad92a0ca739caa45e62d7e0db649ef5d52645cb555714911eec7f3476e16f3ee5ce7e2259476aee7a7c7fcb77cac019caaeb348f62c4e57d74d1bef
7
- data.tar.gz: e264ea24f37f4c823aa96739bf09be7d45c9a7f1e008f309c03e47f6d4c32f5661e1ade7dfbe43b7529b4d9eccf84da335f795d9d81c2e154386c49266de7f48
6
+ metadata.gz: ef917599c44a7d170e1691b62f1efa9d2421e1a2f53a75e370a520d59aad30fd5bb31f454a9b2fd1432b2ee5608c55f17f62f35e04385ed01d4a266e501bae0e
7
+ data.tar.gz: f79c82e5f6bb250e43b7689c38fee87ccf5fdecc0785b97b6f40b9ff6400402f36e281f05837359ee8b8d5c2c2ee51278f54a64c49bf2e6701a1ad2a025b2563
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ably-ui (5.0.0)
4
+ ably-ui (5.0.0.dev.9478e8a)
5
5
  view_component (~> 2.33.0)
6
6
 
7
7
  GEM
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AblyUi=e():(t.AblyUi=t.AblyUi||{},t.AblyUi.Core=t.AblyUi.Core||{},t.AblyUi.Core.Slider=e())}(this,(function(){return(()=>{var t={3096:(t,e,n)=>{var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,a=parseInt,f="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,s=f||l||Function("return this")(),d=Object.prototype.toString,v=Math.max,p=Math.min,y=function(){return s.Date.now()};function b(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function h(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==d.call(t)}(t))return NaN;if(b(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(i,"");var n=u.test(t);return n||c.test(t)?a(t.slice(2),n?2:8):o.test(t)?NaN:+t}t.exports=function(t,e,n){var i=!0,o=!0;if("function"!=typeof t)throw new TypeError(r);return b(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),function(t,e,n){var i,o,u,c,a,f,l=0,s=!1,d=!1,g=!0;if("function"!=typeof t)throw new TypeError(r);function m(e){var n=i,r=o;return i=o=void 0,l=e,c=t.apply(r,n)}function x(t){return l=t,a=setTimeout(j,e),s?m(t):c}function w(t){var n=t-f;return void 0===f||n>=e||n<0||d&&t-l>=u}function j(){var t=y();if(w(t))return T(t);a=setTimeout(j,function(t){var n=e-(t-f);return d?p(n,u-(t-l)):n}(t))}function T(t){return a=void 0,g&&i?m(t):(i=o=void 0,c)}function E(){var t=y(),n=w(t);if(i=arguments,o=this,f=t,n){if(void 0===a)return x(f);if(d)return a=setTimeout(j,e),m(f)}return void 0===a&&(a=setTimeout(j,e)),c}return e=h(e)||0,b(n)&&(s=!!n.leading,u=(d="maxWait"in n)?v(h(n.maxWait)||0,e):u,g="trailing"in n?!!n.trailing:g),E.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=f=o=a=void 0},E.flush=function(){return void 0===a?c:T(y())},E}(t,e,{leading:i,maxWait:e,trailing:o})}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r={};return(()=>{"use strict";n.d(r,{default:()=>c});var t=n(3096),e=n.n(t),i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelector("[data-id=".concat(t,"]"))},o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelectorAll("[data-id=".concat(t,"]"))},u=function(t){var e=i("slider-strip",t),n=Array.from(o("slider-slide",t)),r=i("slider-previous",t),u=i("slider-next",t),c=Array.from(o("slider-marker",t)),a=i("slider-controls",t);a.classList.replace("hidden","flex");var f=n.length,l=t.getBoundingClientRect().width,s=n[0].getBoundingClientRect(),d=s.width,v=s.left,p=n[1].getBoundingClientRect().left-v-d,y=(l-d)/2,b=0,h=0,g=function(t){return e.style.transform="translateX(".concat(function(t){return t*-d+y+t*-p}(t),"px)")},m=function(t){c.forEach((function(t){return t.classList.remove("text-active-orange")})),c[t].classList.remove("text-cool-black"),c[t].classList.add("text-active-orange")},x=function(){g(b=b-1<=0?0:b-1),m(b)},w=function(){g(b=b+1>=f?b:b+1),m(b)};return g(0),m(0),r.addEventListener("click",x),e.addEventListener("touchstart",(function(t){var e;h=null===(e=t.touches[0])||void 0===e?void 0:e.clientX})),e.addEventListener("touchend",(function(t){var e,n=(null===(e=t.changedTouches[0])||void 0===e?void 0:e.clientX)-h;Math.abs(n)<20||(n>0?x:w)()})),u.addEventListener("click",w),function(){e.style.transform=null,a.classList("flex","hidden")}};const c=function(t){var n=t.container,r=t.mqEnableThreshold;if(n){var i=r||function(){return!window.matchMedia("(min-width: 600px)").matches},o=function(){};i()&&(o=u(n)),window.addEventListener("resize",e()((function(){i()?o=u(n):o()}),100))}}})(),r.default})()}));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AblyUi=e():(t.AblyUi=t.AblyUi||{},t.AblyUi.Core=t.AblyUi.Core||{},t.AblyUi.Core.Slider=e())}(this,(function(){return(()=>{var t={3096:(t,e,n)=>{var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,u=/^0o[0-7]+$/i,a=parseInt,f="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,s=f||l||Function("return this")(),d=Object.prototype.toString,v=Math.max,p=Math.min,y=function(){return s.Date.now()};function b(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function h(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==d.call(t)}(t))return NaN;if(b(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(i,"");var n=c.test(t);return n||u.test(t)?a(t.slice(2),n?2:8):o.test(t)?NaN:+t}t.exports=function(t,e,n){var i=!0,o=!0;if("function"!=typeof t)throw new TypeError(r);return b(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),function(t,e,n){var i,o,c,u,a,f,l=0,s=!1,d=!1,g=!0;if("function"!=typeof t)throw new TypeError(r);function m(e){var n=i,r=o;return i=o=void 0,l=e,u=t.apply(r,n)}function x(t){return l=t,a=setTimeout(j,e),s?m(t):u}function w(t){var n=t-f;return void 0===f||n>=e||n<0||d&&t-l>=c}function j(){var t=y();if(w(t))return T(t);a=setTimeout(j,function(t){var n=e-(t-f);return d?p(n,c-(t-l)):n}(t))}function T(t){return a=void 0,g&&i?m(t):(i=o=void 0,u)}function E(){var t=y(),n=w(t);if(i=arguments,o=this,f=t,n){if(void 0===a)return x(f);if(d)return a=setTimeout(j,e),m(f)}return void 0===a&&(a=setTimeout(j,e)),u}return e=h(e)||0,b(n)&&(s=!!n.leading,c=(d="maxWait"in n)?v(h(n.maxWait)||0,e):c,g="trailing"in n?!!n.trailing:g),E.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=f=o=a=void 0},E.flush=function(){return void 0===a?u:T(y())},E}(t,e,{leading:i,maxWait:e,trailing:o})}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r={};return(()=>{"use strict";n.d(r,{default:()=>u});var t=n(3096),e=n.n(t),i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelector("[data-id=".concat(t,"]"))},o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelectorAll("[data-id=".concat(t,"]"))},c=function(t){var e=i("slider-strip",t),n=Array.from(o("slider-slide",t)),r=i("slider-previous",t),c=i("slider-next",t),u=Array.from(o("slider-marker",t)),a=i("slider-controls",t);a.classList.replace("hidden","flex");var f=n.length,l=t.getBoundingClientRect().width,s=n[0].getBoundingClientRect(),d=s.width,v=s.left,p=n[1].getBoundingClientRect().left-v-d,y=(l-d)/2,b=0,h=0,g=function(t){return e.style.transform="translateX(".concat(function(t){return t*-d+y+t*-p}(t),"px)")},m=function(t){u.forEach((function(t){return t.classList.remove("text-active-orange")})),u[t].classList.remove("text-cool-black"),u[t].classList.add("text-active-orange")},x=function(){g(b=b-1<=0?0:b-1),m(b)},w=function(){g(b=b+1>=f?b:b+1),m(b)};return g(0),m(0),r.addEventListener("click",x),e.addEventListener("touchstart",(function(t){var e;h=null===(e=t.touches[0])||void 0===e?void 0:e.clientX})),e.addEventListener("touchend",(function(t){var e,n=(null===(e=t.changedTouches[0])||void 0===e?void 0:e.clientX)-h;Math.abs(n)<20||(n>0?x:w)()})),c.addEventListener("click",w),function(){e.style.transform=null,a.classList.replace("flex","hidden")}};const u=function(t){var n=t.container,r=t.mqEnableThreshold;if(n){var i=r||function(){return!window.matchMedia("(min-width: 48rem)").matches},o=function(){};i()&&(o=c(n)),window.addEventListener("resize",e()((function(){i()?o=c(n):o()}),100))}}})(),r.default})()}));
@@ -6,7 +6,7 @@
6
6
  <% end %>
7
7
 
8
8
  <div class="hidden justify-center items-center my-24" data-id="slider-controls">
9
- <button type="button" class="p-0 group w-24 h-24 flex items-center focus:outline-gui-focus" data-id="slider-previous">
9
+ <button type="button" class="p-0 w-24 h-24 flex items-center focus:outline-gui-focus" data-id="slider-previous">
10
10
  <%= render(AblyUi::Core::Icon.new(name: "icon-gui-disclosure-arrow", size: "1.5rem", color: "text-cool-black", additional_css: "transform rotate-180")) %>
11
11
  </button>
12
12
 
@@ -21,7 +21,7 @@
21
21
  <% end %>
22
22
  </ul>
23
23
 
24
- <button type="button" class="p-0 group w-24 h-24 flex items-center focus:outline-gui-focus" data-id="slider-next">
24
+ <button type="button" class="p-0 w-24 h-24 flex items-center focus:outline-gui-focus" data-id="slider-next">
25
25
  <%= render(AblyUi::Core::Icon.new(name: "icon-gui-disclosure-arrow", size: "1.5rem", color: "text-cool-black")) %>
26
26
  </button>
27
27
  </div>
@@ -1,3 +1,3 @@
1
1
  module AblyUi
2
- VERSION = '5.0.1.dev.d1188a1.0'
2
+ VERSION = '5.1.0'
3
3
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ably-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.1.dev.d1188a1.0
4
+ version: 5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Piatek
8
8
  - Arti Mathanda
9
9
  - Bruce Thomas
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-11-01 00:00:00.000000000 Z
13
+ date: 2021-11-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: view_component
@@ -26,7 +26,7 @@ dependencies:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
28
  version: 2.33.0
29
- description:
29
+ description:
30
30
  email:
31
31
  - dominik.piatek@ably.com
32
32
  - arti.mathanda@ably.com
@@ -52,8 +52,6 @@ files:
52
52
  - lib/ably_ui/core/contact_footer/contact_footer.rb
53
53
  - lib/ably_ui/core/cookie_message/component.css
54
54
  - lib/ably_ui/core/cookie_message/component.js
55
- - lib/ably_ui/core/core.base.css
56
- - lib/ably_ui/core/core.components.css
57
55
  - lib/ably_ui/core/core.rb
58
56
  - lib/ably_ui/core/feature_footer/component.css
59
57
  - lib/ably_ui/core/feature_footer/component.js
@@ -86,7 +84,6 @@ files:
86
84
  - lib/ably_ui/core/footer/component.js
87
85
  - lib/ably_ui/core/footer/footer.html.erb
88
86
  - lib/ably_ui/core/footer/footer.rb
89
- - lib/ably_ui/core/icon/component.css
90
87
  - lib/ably_ui/core/icon/component.js
91
88
  - lib/ably_ui/core/icon/icon.html.erb
92
89
  - lib/ably_ui/core/icon/icon.rb
@@ -177,15 +174,11 @@ files:
177
174
  - lib/ably_ui/core/slider/slider.html.erb
178
175
  - lib/ably_ui/core/slider/slider.rb
179
176
  - lib/ably_ui/core/sprites.svg
180
- - lib/ably_ui/core/styles.base.css
181
- - lib/ably_ui/core/styles.components.css
182
177
  - lib/ably_ui/core/styles.css
183
178
  - lib/ably_ui/core/uptime/component.css
184
179
  - lib/ably_ui/core/uptime/component.js
185
180
  - lib/ably_ui/core/uptime/uptime.html.erb
186
181
  - lib/ably_ui/core/uptime/uptime.rb
187
- - lib/ably_ui/react/connect_state_wrapper/component.js
188
- - lib/ably_ui/react/scripts.js
189
182
  - lib/ably_ui/reset/scripts.js
190
183
  - lib/ably_ui/reset/styles.css
191
184
  - lib/ably_ui/version.rb
@@ -194,7 +187,7 @@ licenses:
194
187
  - Apache-2.0
195
188
  metadata:
196
189
  source_code_uri: https://github.com/ably/ably-ui
197
- post_install_message:
190
+ post_install_message:
198
191
  rdoc_options: []
199
192
  require_paths:
200
193
  - lib
@@ -205,12 +198,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
205
198
  version: '0'
206
199
  required_rubygems_version: !ruby/object:Gem::Requirement
207
200
  requirements:
208
- - - ">"
201
+ - - ">="
209
202
  - !ruby/object:Gem::Version
210
- version: 1.3.1
203
+ version: '0'
211
204
  requirements: []
212
205
  rubygems_version: 3.2.3
213
- signing_key:
206
+ signing_key:
214
207
  specification_version: 4
215
208
  summary: Shared component library and design system for Ably Real-time Ltd (ably.com)
216
209
  test_files: []
@@ -1 +0,0 @@
1
- @import "./styles/properties.css";
@@ -1,49 +0,0 @@
1
- @import "./styles/buttons.css";
2
- @import "./styles/layout.css";
3
- @import "./styles/text.css";
4
-
5
- @layer components {
6
- .ui-input {
7
- @apply text-p2 font-light bg-light-grey rounded p-input w-full leading-none appearance-none border border-mid-grey transition-input;
8
- @apply hover:bg-white hover:shadow-input hover:border-transparent;
9
- @apply focus:bg-white focus:shadow-input focus:border-transparent focus:outline-gui-focus;
10
- @apply max-w-screen-sm;
11
- }
12
-
13
- /* Basis for icon component */
14
- .ui-icon-cool-black {
15
- stroke: var(--color-cool-black);
16
- }
17
-
18
- .ui-icon-white {
19
- stroke: var(--color-white);
20
- }
21
-
22
- .ui-icon-dark-grey {
23
- stroke: var(--color-dark-grey);
24
- }
25
-
26
- /* Extend how tailwind does group hover for icons */
27
- .group {
28
- &:hover {
29
- .group-hover\:icon-gui-hover {
30
- stroke: var(--color-gui-hover);
31
- }
32
- }
33
-
34
- &:focus {
35
- .group-focus\:icon-gui-focus {
36
- stroke: var(--color-gui-focus);
37
- }
38
- }
39
- }
40
-
41
- .ui-version-tag {
42
- @apply inline-block absolute align-top uppercase font-bold whitespace-nowrap;
43
-
44
- position: relative;
45
- vertical-align: super;
46
- margin-left: 3px;
47
- font-size: 8px;
48
- }
49
- }
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
- @import "./styles/properties.css";
@@ -1,49 +0,0 @@
1
- @import "./styles/buttons.css";
2
- @import "./styles/layout.css";
3
- @import "./styles/text.css";
4
-
5
- @layer components {
6
- .ui-input {
7
- @apply text-p2 font-light bg-light-grey rounded p-input w-full leading-none appearance-none border border-mid-grey transition-input;
8
- @apply hover:bg-white hover:shadow-input hover:border-transparent;
9
- @apply focus:bg-white focus:shadow-input focus:border-transparent focus:outline-gui-focus;
10
- @apply max-w-screen-sm;
11
- }
12
-
13
- /* Basis for icon component */
14
- .ui-icon-cool-black {
15
- stroke: var(--color-cool-black);
16
- }
17
-
18
- .ui-icon-white {
19
- stroke: var(--color-white);
20
- }
21
-
22
- .ui-icon-dark-grey {
23
- stroke: var(--color-dark-grey);
24
- }
25
-
26
- /* Extend how tailwind does group hover for icons */
27
- .group {
28
- &:hover {
29
- .group-hover\:icon-gui-hover {
30
- stroke: var(--color-gui-hover);
31
- }
32
- }
33
-
34
- &:focus {
35
- .group-focus\:icon-gui-focus {
36
- stroke: var(--color-gui-focus);
37
- }
38
- }
39
- }
40
-
41
- .ui-version-tag {
42
- @apply inline-block absolute align-top uppercase font-bold whitespace-nowrap;
43
-
44
- position: relative;
45
- vertical-align: super;
46
- margin-left: 3px;
47
- font-size: 8px;
48
- }
49
- }
@@ -1 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.React=e.AblyUi.React||{},e.AblyUi.React.ConnectStateWrapper=t())}(this,(function(){return{}.default}));
@@ -1 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define([,],t):"object"==typeof exports?exports.AblyUi=t(require("react"),require("react-dom")):(e.AblyUi=e.AblyUi||{},e.AblyUi.React=t(e[void 0],e[void 0]))}(this,(function(e,t){return(()=>{"use strict";var r={281:t=>{t.exports=e},645:e=>{e.exports=t}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,a),n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{a.r(n),a.d(n,{reactRenderer:()=>i});var e=a(281),t=a.n(e),r=a(645),o=a.n(r);function i(e){var r=document.querySelectorAll("[data-react]");Array.from(r).forEach((function(r){var a=r.getAttribute("data-react"),n=e[a];if(!n)throw new Error('Found a data-react attribute with "'.concat(a,'" but no matching component.'));var i=r.getAttribute("data-react-props"),c=i&&JSON.parse(i||{});o().render(t().createElement(n,c),r),r.removeAttribute("data-react"),r.removeAttribute("data-react-props")}))}})(),n})()}));