@ably/ui 11.7.1-dev.d65c98c → 12.0.0-dev.77b7db9

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 (51) hide show
  1. package/README.md +0 -1
  2. package/core/ContactFooter.jsx +8 -8
  3. package/core/DropdownMenu.jsx +1 -1
  4. package/core/FeaturedLink/component.css +0 -6
  5. package/core/FeaturedLink/component.js +1 -1
  6. package/core/FeaturedLink.jsx +8 -4
  7. package/core/Flash/component.css +0 -4
  8. package/core/Flash.jsx +1 -1
  9. package/core/Footer.jsx +2 -2
  10. package/core/Meganav/component.css +1 -1
  11. package/core/Meganav.jsx +12 -8
  12. package/core/MeganavBlogPostsList.jsx +8 -4
  13. package/core/MeganavContentCompany.jsx +8 -4
  14. package/core/MeganavContentProducts.jsx +9 -5
  15. package/core/MeganavItemsMobile.jsx +8 -4
  16. package/core/MeganavItemsSignedIn.jsx +8 -4
  17. package/core/MeganavSearch.jsx +8 -4
  18. package/core/MeganavSearchPanel.jsx +8 -4
  19. package/core/MeganavSearchSuggestions.jsx +8 -4
  20. package/core/Notice/component.js +1 -1
  21. package/core/Notice.jsx +3 -3
  22. package/core/Showcase/component.js +1 -1
  23. package/core/Uptime/component.css +2 -3
  24. package/core/Uptime.jsx +9 -5
  25. package/core/styles.css +26 -38
  26. package/package.json +2 -3
  27. package/src/core/ContactFooter/component.html.erb +8 -8
  28. package/src/core/ContactFooter/component.jsx +8 -8
  29. package/src/core/DropdownMenu/component.jsx +1 -1
  30. package/src/core/FeatureFooter/component.html.erb +6 -6
  31. package/src/core/FeaturedLink/component.html.erb +3 -3
  32. package/src/core/FeaturedLink/component.js +0 -1
  33. package/src/core/FeaturedLink/component.jsx +27 -10
  34. package/src/core/Flash/component.css +0 -4
  35. package/src/core/Flash/component.jsx +1 -1
  36. package/src/core/Footer/component.html.erb +2 -2
  37. package/src/core/Footer/component.jsx +2 -2
  38. package/src/core/Meganav/component.css +1 -1
  39. package/src/core/MeganavContentProducts/component.html.erb +1 -1
  40. package/src/core/MeganavContentProducts/component.jsx +1 -1
  41. package/src/core/Notice/component.html.erb +2 -2
  42. package/src/core/Notice/component.jsx +2 -2
  43. package/src/core/Showcase/component.html.erb +9 -9
  44. package/src/core/Showcase/component.js +1 -1
  45. package/src/core/Uptime/component.css +2 -3
  46. package/src/core/Uptime/component.jsx +1 -4
  47. package/src/core/styles/text.css +25 -37
  48. package/src/core/styles.components.css +1 -1
  49. package/tailwind.config.js +11 -19
  50. package/tailwind.extend.js +1 -4
  51. package/src/core/FeaturedLink/component.css +0 -6
@@ -13,7 +13,7 @@
13
13
  type: 'button',
14
14
  data: { id: 'showcase-control' },
15
15
  aria: { controls: @random_id } do %>
16
- <%= image_tag company[:logo], alt: "#{company[:name]} logo", class: ['ui-showcase-logo-img', index === 0 ? 'filter-none' : 'filter-grayscale', 'hover:filter-none'], srcset: [["#{company[:logo2x]}", "2x"]] %>
16
+ <%= image_tag company[:logo], alt: "#{company[:name]} logo", class: ['ui-showcase-logo-img', index === 0 ? 'grayscale-0' : 'grayscale', 'hover:grayscale-0'], srcset: [["#{company[:logo2x]}", "2x"]] %>
17
17
  <% end %>
18
18
  </li>
19
19
  <% end %>
@@ -36,15 +36,15 @@
36
36
  <% if company[:layout] == "quotes" %>
37
37
  <%= render(AblyUi::Core::Icon.new(name: "quote", size: "1.25rem", color: "text-cool-black")) %>
38
38
 
39
- <p class="text-quote font-light mb-24"><%= company[:quote] %></p>
39
+ <p class="ui-text-quote mb-24"><%= company[:quote] %></p>
40
40
 
41
41
  <div class="flex items-center">
42
42
  <div class="flex-shrink-0 flex-grow-0 mr-16 overflow-hidden rounded-full flex align-center justify-center w-48 h-48">
43
- <%= image_tag company[:author][:thumbnail], alt: "Picture of #{company[:author][:name]}, #{company[:author][:title]}", class: "w-48 h-48 filter-grayscale" %>
43
+ <%= image_tag company[:author][:thumbnail], alt: "Picture of #{company[:author][:name]}, #{company[:author][:title]}", class: "w-48 h-48 grayscale" %>
44
44
  </div>
45
45
  <div>
46
- <p class="text-p2 font-medium"><%= company[:author][:name] %></p>
47
- <p class="text-p3 font-light"><%= company[:author][:title] %></p>
46
+ <p class="ui-text-p2"><%= company[:author][:name] %></p>
47
+ <p class="ui-text-p3"><%= company[:author][:title] %></p>
48
48
  </div>
49
49
  </div>
50
50
  <% end %>
@@ -54,16 +54,16 @@
54
54
  <% company[:columns].each_with_index do |col, n| %>
55
55
  <% if company[:columns].last == col %>
56
56
  <div class="flex-1 mt-40 sm:mt-0 <%= col[:classname] %>" data-id="casestudy-column">
57
- <p class="text-h4 pb-24"><%= col[:heading] %></p>
58
- <p class="text-p1 font-light"><%= col[:text] %></p>
57
+ <p class="ui-text-h4 pb-24"><%= col[:heading] %></p>
58
+ <p class="ui-text-p1"><%= col[:text] %></p>
59
59
  <%- if col[:button] %>
60
60
  <a class="ui-btn self-start p-btn mt-24" href="<%= col[:button][:href] %>"><%= col[:button][:label] %></a>
61
61
  <% end %>
62
62
  </div>
63
63
  <% else %>
64
64
  <div class="flex-1 mt-40 sm:mt-0 mr-24 sm:mr-32 xl:mr-64 <%= col[:classname] %>" data-id="casestudy-column">
65
- <p class="text-title-xl font-extra-large"><%= col[:heading] %></p>
66
- <p class="text-p1 font-light mb-0 sm:mb-32"><%= col[:text] %></p>
65
+ <p class="ui-text-title-xl"><%= col[:heading] %></p>
66
+ <p class="ui-text-p1 mb-0 sm:mb-32"><%= col[:text] %></p>
67
67
  </div>
68
68
  <% end %>
69
69
  <% end %>
@@ -6,7 +6,7 @@ import "./component.css";
6
6
  const SLIDE_SHOW_INTERVAL = 5000;
7
7
 
8
8
  const updateLogoOpacity = (logos, currentIndex) => {
9
- const visible = ["filter-grayscale", "filter-none"];
9
+ const visible = ["grayscale", "grayscale-0"];
10
10
  const opaque = [...visible].reverse();
11
11
  logos.forEach((logo, i) => {
12
12
  logo.classList.replace(...(i === currentIndex ? visible : opaque));
@@ -30,8 +30,7 @@
30
30
  }
31
31
 
32
32
  .ui-uptime-day:hover {
33
- filter: brightness(1.2);
34
- @apply z-10;
33
+ @apply z-10 brightness-125;
35
34
  }
36
35
 
37
36
  .ui-uptime-day:hover span {
@@ -86,7 +85,7 @@
86
85
  .ui-uptime-key {
87
86
  @apply block mt-16 mr-20 bg-transparent;
88
87
  @apply sm:inline-block sm:mt-0;
89
- @apply font-light text-p2 text-white block sm:inline-flex items-center;
88
+ @apply font-medium text-p2 text-white block sm:inline-flex items-center;
90
89
  }
91
90
 
92
91
  .ui-uptime-key:first-child {
@@ -139,10 +139,7 @@ export default function Uptime({ serverUrl, linkTo = null, theme = "light" }) {
139
139
 
140
140
  if (data && data.error) {
141
141
  return (
142
- <div
143
- className={`flex sm:flex-row justify-center items-center p-24 border rounded font-sans font-light text-p2 ${themes[theme].text}`}
144
- data-id="uptime-error"
145
- >
142
+ <div className={`flex sm:flex-row justify-center items-center p-24 border rounded ui-text-p2 ${themes[theme].text}`} data-id="uptime-error">
146
143
  Sorry, we can’t retrieve uptime data right now.
147
144
  </div>
148
145
  );
@@ -95,25 +95,32 @@
95
95
  }
96
96
 
97
97
  .ui-text-code {
98
- @apply font-mono font-medium text-code;
98
+ @apply font-mono font-normal text-code;
99
99
  }
100
100
 
101
101
  .ui-text-code2 {
102
- @apply font-mono font-medium text-code2;
102
+ @apply font-mono font-normal text-code2;
103
103
  }
104
104
 
105
105
  .ui-text-code-inline {
106
- @apply font-mono font-medium text-code text-charcoal-grey bg-light-grey p-inline-code rounded-sm mx-1;
106
+ @apply font-mono font-normal text-code text-charcoal-grey bg-light-grey p-inline-code rounded-sm mx-1;
107
107
  }
108
108
 
109
109
  .ui-unordered-list {
110
- @apply text-p1 font-medium text-cool-black;
111
- @apply list-disc ml-32 my-16;
110
+ @apply text-p1 font-medium text-charcoal-grey;
111
+ @apply ml-32 my-16;
112
+ @apply list-disc;
112
113
  }
113
114
 
114
115
  .ui-ordered-list {
115
116
  @apply text-p1 font-medium text-charcoal-grey;
116
- @apply ml-32 my-16 list-decimal;
117
+ @apply ml-32 my-16;
118
+ @apply list-decimal;
119
+ }
120
+
121
+ .ui-ordered-list li,
122
+ .ui-unordered-list li {
123
+ @apply mb-8;
117
124
  }
118
125
 
119
126
  .ui-unordered-list li > *:last-of-type:not(ul):not(ol),
@@ -122,11 +129,11 @@
122
129
  }
123
130
 
124
131
  .ui-unordered-list ul {
125
- @apply ml-24 mt-16 list-circle;
132
+ @apply ml-24 my-8 list-circle;
126
133
  }
127
134
 
128
135
  .ui-ordered-list ol {
129
- @apply ml-24 mt-16 list-decimal;
136
+ @apply ml-24 my-16 list-decimal;
130
137
  }
131
138
 
132
139
  .ui-unordered-list ul ul {
@@ -137,34 +144,6 @@
137
144
  @apply my-8;
138
145
  }
139
146
 
140
- .ui-ordered-list li,
141
- .ui-unordered-list li {
142
- @apply font-medium font-sans tracking-widen-0;
143
- line-height: var(--lh-extra-relaxed);
144
- }
145
-
146
- .ui-unordered-list-with-emphasis {
147
- @apply text-p1 font-medium text-cool-black;
148
- @apply list-disc ml-32 mt-32 -mb-12;
149
- }
150
-
151
- .ui-unordered-list-with-emphasis li div {
152
- @apply relative -top-12;
153
- }
154
-
155
- .ui-unordered-list-with-emphasis li div > strong {
156
- @apply block;
157
- }
158
-
159
- .ui-unordered-list-with-emphasis ul {
160
- margin-top: calc(var(--spacing-16) + var(--spacing-8));
161
- @apply ml-24 list-circle;
162
- }
163
-
164
- .ui-unordered-list-with-emphasis ul ul {
165
- @apply list-square;
166
- }
167
-
168
147
  .ui-link {
169
148
  @apply text-gui-default;
170
149
  @apply hover:text-gui-hover active:text-gui-active disabled:text-gui-unavailable;
@@ -174,7 +153,16 @@
174
153
 
175
154
  .ui-link-neutral {
176
155
  @apply hover:text-dark-grey active:text-cool-black disabled:text-gui-unavailable;
177
- @apply focus:text-charcoal-grey focus:outline-gui-focus-neutral;
156
+ @apply focus:text-charcoal-grey;
178
157
  @apply underline;
179
158
  }
159
+
160
+ /* focus:outline-gui-focus-neutral does not get created under Tailwind 3.3.5, not sure why */
161
+ .ui-link-neutral:focus {
162
+ outline: 2px solid var(--color-neutral-000);
163
+ }
164
+
165
+ .ui-figcaption {
166
+ @apply font-mono text-p3 text-neutral-800;
167
+ }
180
168
  }
@@ -5,7 +5,7 @@
5
5
 
6
6
  @layer components {
7
7
  .ui-input {
8
- @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 text-p2 font-medium bg-light-grey rounded p-input w-full leading-none appearance-none border border-mid-grey transition-input;
9
9
  @apply hover:bg-white hover:shadow-input hover:border-transparent;
10
10
  @apply focus:bg-white focus:shadow-input focus:border-transparent focus:outline-gui-focus;
11
11
  @apply max-w-screen-sm;
@@ -1,19 +1,16 @@
1
1
  module.exports = {
2
- purge: {
3
- content: [
2
+ content: [
4
3
  "./src/**/*.html.erb",
5
4
  "./src/**/*.jsx",
6
5
  "./src/**/*.js",
7
6
  "./src/**/*.json",
8
- ],
9
- options: {
10
- safelist: {
11
- standard: ["w-1/2", "w-1/3", "w-1/4", "w-1/5", "w-1/6"],
12
- greedy: [/^hljs.*/, /^ui-.*/],
13
- },
14
- },
15
- },
16
- darkMode: false,
7
+ "./src/**/*.css",
8
+ ],
9
+ safelist: [
10
+ "w-1/2", "w-1/3", "w-1/4", "w-1/5", "w-1/6",
11
+ { pattern: /^hljs.*/ },
12
+ { pattern: /^ui-.*/ }
13
+ ],
17
14
  theme: {
18
15
  screens: {
19
16
  // CSS custom properties can't be used in media queries
@@ -136,6 +133,7 @@ module.exports = {
136
133
  "gui-blue-hover-dark": "var(--color-gui-blue-hover-dark)",
137
134
  "gui-blue-active-dark": "var(--color-gui-blue-active-dark)",
138
135
  "gui-blue-focus": "var(--color-gui-blue-focus)",
136
+ "gui-blue-visited": "var(--color-gui-blue-focus)",
139
137
  "gui-unavailable": "var(--color-gui-unavailable)",
140
138
  "gui-success-green": "var(--color-gui-success-green)",
141
139
  "gui-error-red": "var(--color-gui-error-red)",
@@ -298,10 +296,6 @@ module.exports = {
298
296
  full: "9999px",
299
297
  DEFAULT: "0.375rem",
300
298
  },
301
- filter: {
302
- none: "none",
303
- grayscale: "grayscale(1)",
304
- },
305
299
  extend: {
306
300
  backgroundImage: {
307
301
  "gradient-active-orange": "var(--gradient-active-orange)",
@@ -313,7 +307,6 @@ module.exports = {
313
307
  },
314
308
  outline: {
315
309
  "gui-focus": "1.5px solid var(--color-gui-focus-outline)",
316
- "gui-focus-neutral": "2px solid var(--color-neutral-000)",
317
310
  },
318
311
  width: {
319
312
  "extend-8": "calc(100% + var(--spacing-8))",
@@ -353,12 +346,11 @@ module.exports = {
353
346
  backgroundImage: ["hover", "active", "focus"],
354
347
  filter: ["hover"],
355
348
  cursor: ["disabled"],
356
- inset: ['group-hover']
357
-
349
+ inset: ["group-hover"],
358
350
  },
359
351
  },
360
352
  corePlugins: {
361
353
  preflight: false,
362
354
  },
363
- plugins: [require("tailwindcss-filters")],
355
+ plugins: [],
364
356
  };
@@ -15,10 +15,7 @@ const ablyUItailwindConfig = (extend) => {
15
15
 
16
16
  const configWithPlugin = {
17
17
  ...ablyUIConfig,
18
- purge: {
19
- content: addPurgeContentPaths(),
20
- options: ablyUIConfig.purge.options,
21
- },
18
+ content: addPurgeContentPaths(),
22
19
  };
23
20
 
24
21
  return extend(configWithPlugin);
@@ -1,6 +0,0 @@
1
- @layer components {
2
- .ui-featured-link {
3
- @apply font-sans font-bold block;
4
- @apply text-neutral-500 hover:text-gui-hover focus:text-gui-focus focus:outline-gui-focus;
5
- }
6
- }