@ably/ui 8.7.0-dev.73348b7 → 8.7.0-dev.734c219

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 (169) hide show
  1. package/README.md +16 -5
  2. package/core/.DS_Store +0 -0
  3. package/core/Code/component.css +5 -3
  4. package/core/Code/component.js +1 -1
  5. package/core/Code.jsx +373 -7273
  6. package/core/CompanyAutocomplete/component.js +1 -1
  7. package/core/ConnectStateWrapper/component.js +1 -1
  8. package/core/ConnectStateWrapper.jsx +16 -7
  9. package/core/ContactFooter/component.js +1 -1
  10. package/core/ContactFooter.jsx +20 -126
  11. package/core/CookieMessage/component.js +1 -1
  12. package/core/CookieMessage.jsx +24 -296
  13. package/core/CustomerLogos/component.js +1 -1
  14. package/core/CustomerLogos.jsx +18 -120
  15. package/core/DropdownMenu/component.js +1 -0
  16. package/core/DropdownMenu.jsx +313 -0
  17. package/core/FeatureFooter/component.js +1 -1
  18. package/core/FeaturedLink/component.css +1 -1
  19. package/core/FeaturedLink/component.js +1 -1
  20. package/core/FeaturedLink.jsx +15 -121
  21. package/core/Flash/component.js +1 -1
  22. package/core/Flash.jsx +151 -1533
  23. package/core/Footer/component.css +23 -3
  24. package/core/Footer/component.js +1 -1
  25. package/core/Footer.jsx +166 -181
  26. package/core/Icon/component.js +1 -1
  27. package/core/Icon.jsx +12 -117
  28. package/core/Loader/component.js +1 -1
  29. package/core/Loader.jsx +12 -117
  30. package/core/Logo/component.js +1 -1
  31. package/core/Logo.jsx +38 -228
  32. package/core/Meganav/component.css +8 -10
  33. package/core/Meganav/component.js +1 -2
  34. package/core/Meganav/component.json +1 -1
  35. package/core/Meganav.jsx +2237 -9548
  36. package/core/MeganavBlogPostsList/component.js +1 -1
  37. package/core/MeganavBlogPostsList.jsx +18 -125
  38. package/core/MeganavContentCompany/component.js +1 -1
  39. package/core/MeganavContentCompany.jsx +60 -141
  40. package/core/MeganavContentDevelopers/component.js +1 -1
  41. package/core/MeganavContentDevelopers.jsx +53 -134
  42. package/core/MeganavContentPlatform/component.js +1 -1
  43. package/core/MeganavContentPlatform.jsx +28 -135
  44. package/core/MeganavContentUseCases/component.js +1 -1
  45. package/core/MeganavContentUseCases.jsx +68 -166
  46. package/core/MeganavContentWhyAbly/component.js +1 -6
  47. package/core/MeganavContentWhyAbly.jsx +1468 -3
  48. package/core/MeganavControl/component.js +1 -1
  49. package/core/MeganavControl.jsx +15 -121
  50. package/core/MeganavControlMobileDropdown/component.js +1 -1
  51. package/core/MeganavControlMobileDropdown.jsx +16 -122
  52. package/core/MeganavControlMobilePanelClose/component.js +1 -1
  53. package/core/MeganavControlMobilePanelClose.jsx +15 -121
  54. package/core/MeganavControlMobilePanelOpen/component.js +1 -1
  55. package/core/MeganavControlMobilePanelOpen.jsx +15 -121
  56. package/core/MeganavItemsDesktop/component.js +1 -1
  57. package/core/MeganavItemsDesktop.jsx +21 -129
  58. package/core/MeganavItemsMobile/component.js +1 -1
  59. package/core/MeganavItemsMobile.jsx +44 -158
  60. package/core/MeganavItemsSignedIn/component.js +1 -1
  61. package/core/MeganavItemsSignedIn.jsx +38 -151
  62. package/core/MeganavSearch/component.js +1 -1
  63. package/core/MeganavSearch.jsx +28 -138
  64. package/core/MeganavSearchAutocomplete/component.js +1 -2
  65. package/core/MeganavSearchAutocomplete.jsx +4 -4
  66. package/core/MeganavSearchPanel/component.js +1 -1
  67. package/core/MeganavSearchPanel.jsx +24 -133
  68. package/core/MeganavSearchSuggestions/component.js +1 -1
  69. package/core/MeganavSearchSuggestions.jsx +18 -125
  70. package/core/Notice/component.css +1 -1
  71. package/core/Notice/component.js +1 -2
  72. package/core/Notice.jsx +189 -2191
  73. package/core/Showcase/component.js +1 -1
  74. package/core/Showcase.jsx +1 -1
  75. package/core/SignOutLink/component.js +1 -1
  76. package/core/SignOutLink.jsx +12 -117
  77. package/core/Slider/component.js +1 -1
  78. package/core/Slider.jsx +31 -588
  79. package/core/Uptime/component.js +1 -1
  80. package/core/Uptime.jsx +24 -127
  81. package/core/fonts/jetBrains-mono.css +3 -0
  82. package/core/fonts/manrope.css +3 -0
  83. package/core/images/ably-logo.png +0 -0
  84. package/core/images/high-performer-2022.png +0 -0
  85. package/core/images/highest-user-adoption-2022.png +0 -0
  86. package/core/images/users-love-us-2022.png +0 -0
  87. package/core/scripts.js +1 -1
  88. package/core/sprites.svg +106 -1
  89. package/core/styles.css +224 -101
  90. package/package.json +4 -4
  91. package/reset/scripts.js +1 -1
  92. package/reset/styles.css +1 -11
  93. package/src/.DS_Store +0 -0
  94. package/src/core/Code/component.css +1 -67
  95. package/src/core/Code/component.js +11 -46
  96. package/src/core/Code/component.jsx +7 -3
  97. package/src/core/CustomerLogos/component.html.erb +2 -2
  98. package/src/core/CustomerLogos/component.jsx +3 -2
  99. package/src/core/CustomerLogos/component.rb +2 -1
  100. package/src/core/DropdownMenu/component.jsx +112 -0
  101. package/src/core/FeatureFooter/component.html.erb +1 -1
  102. package/src/core/FeaturedLink/component.css +1 -1
  103. package/src/core/Flash/component.jsx +40 -14
  104. package/src/core/Footer/component.css +23 -3
  105. package/src/core/Footer/component.html.erb +120 -58
  106. package/src/core/Footer/component.jsx +127 -52
  107. package/src/core/Logo/component.html.erb +2 -27
  108. package/src/core/Logo/component.jsx +7 -40
  109. package/src/core/Logo/component.rb +15 -6
  110. package/src/core/Meganav/component.css +8 -8
  111. package/src/core/Meganav/component.html.erb +1 -1
  112. package/src/core/Meganav/component.json +1 -1
  113. package/src/core/Meganav/component.jsx +1 -1
  114. package/src/core/Meganav/component.rb +3 -2
  115. package/src/core/MeganavContentCompany/component.html.erb +9 -0
  116. package/src/core/MeganavContentCompany/component.jsx +9 -0
  117. package/src/core/MeganavContentDevelopers/component.html.erb +26 -10
  118. package/src/core/MeganavContentDevelopers/component.jsx +28 -9
  119. package/src/core/MeganavContentPlatform/component.html.erb +7 -7
  120. package/src/core/MeganavContentPlatform/component.jsx +7 -7
  121. package/src/core/MeganavContentUseCases/component.html.erb +43 -39
  122. package/src/core/MeganavContentUseCases/component.jsx +42 -39
  123. package/src/core/MeganavSearchSuggestions/component.html.erb +1 -1
  124. package/src/core/Notice/component.css +1 -1
  125. package/src/core/Notice/component.html.erb +2 -2
  126. package/src/core/Notice/component.jsx +2 -2
  127. package/src/core/core.rb +12 -4
  128. package/src/core/fonts/jetBrains-mono.css +3 -0
  129. package/src/core/fonts/manrope.css +3 -0
  130. package/src/core/icons/github.svg +1 -1
  131. package/src/core/icons/google.svg +3 -0
  132. package/src/core/icons/icon-display-chat-col.svg +4 -0
  133. package/src/core/icons/icon-display-data-broadcast-col.svg +26 -0
  134. package/src/core/icons/icon-display-data-synchronization-col.svg +14 -0
  135. package/src/core/icons/icon-display-events-col.svg +13 -0
  136. package/src/core/icons/icon-display-integrations-col.svg +8 -0
  137. package/src/core/icons/icon-display-kafka-at-the-edge-col.svg +8 -0
  138. package/src/core/icons/icon-display-push-notifications-col.svg +6 -0
  139. package/src/core/icons/icon-gui-check-circled-fill-black.svg +4 -0
  140. package/src/core/icons/icon-gui-filter-flow-step-1.svg +5 -0
  141. package/src/core/icons/icon-gui-filter-flow-step-2.svg +5 -0
  142. package/src/core/icons/icon-gui-filter-flow-step-3.svg +5 -0
  143. package/src/core/icons/icon-gui-resources.svg +3 -0
  144. package/src/core/icons/icon-tech-apachekafka.svg +3 -0
  145. package/src/core/icons/stackoverflow.svg +3 -0
  146. package/src/core/icons/youtube.svg +11 -0
  147. package/src/core/images/ably-logo.png +0 -0
  148. package/src/core/images/high-performer-2022.png +0 -0
  149. package/src/core/images/highest-user-adoption-2022.png +0 -0
  150. package/src/core/images/users-love-us-2022.png +0 -0
  151. package/src/core/styles/buttons.css +5 -5
  152. package/src/core/styles/forms.css +5 -5
  153. package/src/core/styles/properties.css +155 -45
  154. package/src/core/styles/text.css +59 -40
  155. package/src/core/utils/syntax-highlighter-registry.js +63 -0
  156. package/src/core/utils/syntax-highlighter.css +71 -0
  157. package/src/core/utils/syntax-highlighter.js +103 -0
  158. package/tailwind.config.js +142 -47
  159. package/core/Meganav/component.js.LICENSE.txt +0 -7
  160. package/core/MeganavSearchAutocomplete/component.js.LICENSE.txt +0 -7
  161. package/core/fonts/.DS_Store +0 -0
  162. package/core/images/.DS_Store +0 -0
  163. package/preview/vendor/bundle/ruby/3.0.0/bundler/gems/ably-ui-abffd210ec0f/preview/tmp/.keep +0 -0
  164. package/preview/vendor/bundle/ruby/3.0.0/bundler/gems/ably-ui-abffd210ec0f/preview/tmp/pids/.keep +0 -0
  165. package/src/core/.DS_Store +0 -0
  166. package/src/core/fonts/.DS_Store +0 -0
  167. package/src/core/images/.DS_Store +0 -0
  168. package/src/reset/.DS_Store +0 -0
  169. /package/{preview/vendor/bundle/ruby/3.0.0/bundler/gems/ably-ui-abffd210ec0f/preview/log/.keep → src/core/DropdownMenu/component.js} +0 -0
@@ -1,34 +1,132 @@
1
1
  @layer base {
2
2
  :root {
3
- --color-cool-black: #03020d;
4
- --color-active-orange: #ff5416;
5
- --color-red-orange: #e40000;
6
- --color-white: #ffffff;
7
- --color-electric-cyan: #4af7ff;
8
- --color-zingy-green: #08ff13;
9
- --color-bright-red: #ff2739;
10
- --color-jazzy-pink: #ff17d2;
11
- --color-extra-light-grey: #fafafb;
12
- --color-light-grey: #f5f5f6;
13
- --color-mid-grey: #d9d9da;
14
- --color-dark-grey: #76767c;
15
- --color-charcoal-grey: #292831;
16
- --color-gui-default: #0073e6;
17
- --color-gui-hover: #0867c4;
18
- --color-gui-focus: #0073e6;
3
+ /* Neutral colors */
4
+ --color-neutral-000: #ffffff;
5
+ --color-neutral-100: #f8fafc;
6
+ --color-neutral-200: #f4f8fb;
7
+ --color-neutral-300: #edf1f7;
8
+ --color-neutral-400: #e2e7ef;
9
+ --color-neutral-500: #c6ced9;
10
+ --color-neutral-600: #adb6c2;
11
+ --color-neutral-700: #89929f;
12
+ --color-neutral-800: #667085;
13
+ --color-neutral-900: #39414e;
14
+ --color-neutral-1000: #2b303b;
15
+ --color-neutral-1100: #202531;
16
+ --color-neutral-1200: #141924;
17
+ --color-neutral-1300: #03020d;
18
+
19
+ /* Ably orange */
20
+ --color-orange-100: #fff5f1;
21
+ --color-orange-200: #ffe3d8;
22
+ --color-orange-300: #ffc4ae;
23
+ --color-orange-400: #ff9c79;
24
+ --color-orange-500: #ff723f;
25
+ --color-orange-600: #ff5416;
26
+ --color-orange-700: #ff2739;
27
+ --color-orange-800: #e40000;
28
+ --color-orange-900: #b82202;
29
+ --color-orange-1000: #751500;
30
+ --color-orange-1100: #2a0b00;
31
+
32
+ /* Secondary colours */
33
+ --color-yellow-100: #fffbef;
34
+ --color-yellow-200: #fff0ba;
35
+ --color-yellow-300: #ffe27c;
36
+ --color-yellow-400: #ffd43d;
37
+ --color-yellow-500: #f8c100;
38
+ --color-yellow-600: #e8a700;
39
+ --color-yellow-700: #ac8600;
40
+ --color-yellow-800: #654f00;
41
+ --color-yellow-900: #291c01;
42
+ --color-green-100: #f1fff1;
43
+ --color-green-200: #b8ffbb;
44
+ --color-green-300: #80ff85;
45
+ --color-green-400: #08ff13;
46
+ --color-green-500: #00e80b;
47
+ --color-green-600: #00c008;
48
+ --color-green-700: #008e06;
49
+ --color-green-800: #005303;
50
+ --color-green-900: #002a02;
51
+ --color-blue-100: #f1fbff;
52
+ --color-blue-200: #b8eaff;
53
+ --color-blue-300: #80d9ff;
54
+ --color-blue-400: #4ad4ff;
55
+ --color-blue-500: #2cc0ff;
56
+ --color-blue-600: #00a5ec;
57
+ --color-blue-700: #0284cd;
58
+ --color-blue-800: #004b75;
59
+ --color-blue-900: #001b2a;
60
+ --color-violet-100: #f7f2fe;
61
+ --color-violet-200: #d8bcfb;
62
+ --color-violet-300: #b986f8;
63
+ --color-violet-400: #9951f5;
64
+ --color-violet-500: #7a1bf2;
65
+ --color-violet-600: #5f0bc9;
66
+ --color-violet-700: #460894;
67
+ --color-violet-800: #2d055e;
68
+ --color-violet-900: #130228;
69
+ --color-pink-100: #fff1fc;
70
+ --color-pink-200: #ffb8f1;
71
+ --color-pink-300: #ff80e6;
72
+ --color-pink-400: #ff47db;
73
+ --color-pink-500: #ff17d2;
74
+ --color-pink-600: #d400ab;
75
+ --color-pink-700: #9c007e;
76
+ --color-pink-800: #630050;
77
+ --color-pink-900: #2a0022;
78
+
79
+ /* GUI colours */
80
+ /* Note: The ‘Light and ‘Dark’ refers to the colour of the background on which the colour is used. */
81
+ --color-gui-blue-default-light: #006edc;
82
+ --color-gui-blue-hover-light: #0862b9;
83
+ --color-gui-blue-active-light: #074095;
84
+ --color-gui-blue-default-dark: #4da6ff;
85
+ --color-gui-blue-hover-dark: #2894ff;
86
+ --color-gui-blue-active-dark: #0080ff;
87
+ --color-gui-blue-focus: #80b9f2;
88
+ --color-gui-unavailable: #a8a8a8;
89
+ --color-gui-success-green: #11cb24;
90
+ --color-gui-error-red: #fb0c0c;
91
+ --color-gui-focus: #80b9f2;
19
92
  --color-gui-focus-outline: #80b9f2;
20
- --color-gui-active: #074095;
21
93
  --color-gui-visited: #4887c2;
22
- --color-gui-unavailable: #a8a8a8;
23
- --color-gui-error: #fb0c0c;
24
- --color-gui-success: #11cb24;
94
+
95
+ /* Colours replaced by neutral colours */
96
+ --color-white: var(--color-neutral-000);
97
+ --color-extra-light-grey: var(--color-neutral-100);
98
+ --color-light-grey: var(--color-neutral-200);
99
+ --color-mid-grey: var(--color-neutral-500);
100
+ --color-dark-grey: var(--color-neutral-800);
101
+ --color-charcoal-grey: var(--color-neutral-1000);
102
+ --color-cool-black: var(--color-neutral-1300);
103
+
104
+ /* Colours replaced by orange colours */
105
+ --color-active-orange: var(--color-orange-600);
106
+ --color-bright-red: var(--color-orange-700);
107
+ --color-red-orange: var(--color-orange-800);
108
+
109
+ /* Colours replaced by secondary colours */
110
+ --color-electric-cyan: var(--color-blue-400);
111
+ --color-zingy-green: var(--color-green-400);
112
+ --color-jazzy-pink: var(--color-pink-500);
113
+
114
+ /* Colours replaced by GUI colours */
115
+ --color-gui-default: var(--color-gui-blue-default-light);
116
+ --color-gui-hover: var(--color-gui-blue-hover-light);
117
+ --color-gui-active: var(--color-gui-blue-active-light);
118
+ --color-gui-error: var(--color-gui-error-red);
119
+ --color-gui-success: var(--color-gui-success-green);
120
+ --color-gui-default-dark: var(--color-gui-blue-default-dark);
121
+ --color-gui-hover-dark: var(--color-gui-blue-hover-dark);
122
+ --color-gui-active-dark: var(--color-gui-blue-active-dark);
25
123
 
26
124
  /* code syntax: theme */
27
- --syntax-black: var(--color-cool-black);
28
- --syntax-dark-grey: var(--color-dark-grey);
29
- --syntax-mid-grey: var(--color-mid-grey);
30
- --syntax-light-grey: var(--color-light-grey);
31
- --syntax-extra-light-grey: var(--color-extra-light-grey);
125
+ --syntax-black: var(--color-neutral-1300);
126
+ --syntax-dark-grey: var(--color-neutral-800);
127
+ --syntax-mid-grey: var(--color-neutral-500);
128
+ --syntax-light-grey: var(--color-neutral-200);
129
+ --syntax-extra-light-grey: var(--color-neutral-100);
32
130
  --syntax-orange: #e78c45;
33
131
  --syntax-yellow: #e7c547;
34
132
  --syntax-blue: #3490ec;
@@ -47,6 +145,8 @@
47
145
  --icon-color-glassdoor: #0baa41;
48
146
  --icon-color-github: #000000;
49
147
  --icon-color-discord: #5865f2;
148
+ --icon-color-stackoverflow: #f48024;
149
+ --icon-color-youtube: #ff0000;
50
150
 
51
151
  --gradient-active-orange: linear-gradient(
52
152
  61.2deg,
@@ -68,44 +168,51 @@
68
168
 
69
169
  --gradient-hot-pink: linear-gradient(
70
170
  80.2deg,
71
- var(--color-bright-red) 0%,
171
+ var(--color-orange-700) 0%,
72
172
  var(--color-jazzy-pink) 100%
73
173
  );
74
174
 
75
- --fs-title-xl: 4rem;
76
- --fs-title: 3.5rem;
77
- --fs-title-xs: 3rem;
78
- --fs-h1-xl: 3.5rem;
79
- --fs-h1: 3rem;
80
- --fs-h1-xs: 2.625rem;
81
- --fs-h2-xl: 2.5rem;
175
+ --fs-title-xl: 3rem;
176
+ --fs-title: 2.75rem;
177
+ --fs-title-xs: 2.5rem;
178
+ --fs-h1-xl: 2.5rem;
179
+ --fs-h1: 2.25rem;
180
+ --fs-h1-xs: 2rem;
181
+
182
+ --fs-h2-xl: 2.125rem;
82
183
  --fs-h2: 2rem;
83
- --fs-h2-xs: 1.875rem;
184
+ --fs-h2-xs: 1.75rem;
185
+
84
186
  --fs-h3: 1.5rem;
85
- --fs-h4: 1.125rem;
86
- --fs-p1: 1.125rem;
87
- --fs-p2: 1rem;
187
+ --fs-h4: 1.25rem;
188
+ --fs-h5: 1rem;
189
+
190
+ --fs-p1: 1rem;
191
+ --fs-p2: 0.938rem;
88
192
  --fs-p3: 0.875rem;
89
193
  --fs-standfirst-xl: 2.25rem;
90
194
  --fs-standfirst: 1.5rem;
91
- --fs-sub-header: 1.5rem;
92
- --fs-sub-header-xs: 1.125rem;
195
+ --fs-sub-header: 1.125rem;
196
+ --fs-sub-header-xs: 1.063rem;
93
197
  --fs-overline1: 1rem;
94
198
  --fs-overline2: 0.875rem;
95
- --fs-btn1: 1.125rem;
96
- --fs-btn2: 1rem;
199
+ --fs-btn1: 1rem;
200
+ --fs-btn2: 0.938rem;
97
201
  --fs-btn3: 0.875rem;
98
- --fs-menu1: 1.125rem;
99
- --fs-menu2: 1rem;
202
+ --fs-menu1: 1rem;
203
+ --fs-menu2: 0.938rem;
100
204
  --fs-menu3: 0.875rem;
101
- --fs-quote: 1.5rem;
102
- --fs-code: 0.875rem;
205
+ --fs-quote: 1.25rem;
206
+ --fs-code: 0.938rem;
207
+ --fs-code2: 0.813rem;
103
208
 
104
209
  --lh-dense: 1;
105
210
  --lh-tight: 1.125;
106
211
  --lh-snug: 1.15;
212
+ --lh-min-normal: 1.2;
107
213
  --lh-normal: 1.25;
108
214
  --lh-relaxed: 1.45;
215
+ --lh-extra-relaxed: 1.6;
109
216
 
110
217
  --ls-tighten-0_025: -0.025em;
111
218
  --ls-tighten-0_02: -0.02em;
@@ -113,7 +220,9 @@
113
220
  --ls-tighten-0_01: -0.01em;
114
221
  --ls-tighten-0_005: -0.005em;
115
222
  --ls-tighten-0_0025: -0.0025em;
223
+ --ls-tighten-0_0015: -0.0015em;
116
224
  --ls-widen-0_1: 0.1em;
225
+ --ls-widen-0_16: 0.16em;
117
226
  --ls-widen-0_15: 0.15em;
118
227
 
119
228
  --spacing-0: 0px;
@@ -128,6 +237,7 @@
128
237
  --spacing-20: 1.25rem;
129
238
  --spacing-24: 1.5rem;
130
239
  --spacing-32: 2rem;
240
+ --spacing-36: 2.25rem;
131
241
  --spacing-40: 2.5rem;
132
242
  --spacing-48: 3rem;
133
243
  --spacing-64: 4rem;
@@ -1,46 +1,52 @@
1
1
  @layer components {
2
2
  .ui-text-title {
3
- @apply font-sans font-medium text-cool-black;
3
+ @apply font-manrope font-extrabold text-cool-black;
4
4
  @apply text-title-xs xs:text-title xl:text-title-xl;
5
- @apply tracking-tighten-0.01 xs:tracking-tighten-0.015 xl:tracking-tighten-0.02;
5
+ @apply tracking-tighten-0.015 xs:tracking-tighten-0.02 xl:tracking-tighten-0.02;
6
6
  }
7
7
 
8
8
  .ui-text-h1 {
9
- @apply font-sans font-medium text-cool-black;
9
+ @apply font-manrope font-extrabold text-cool-black;
10
10
  @apply text-h1-xs xs:text-h1 xl:text-h1-xl;
11
- @apply tracking-tighten-0.01;
11
+ @apply tracking-tighten-0.0125 xs:tracking-tighten-0.015;
12
12
  }
13
13
 
14
14
  .ui-text-h2 {
15
- @apply font-sans font-medium text-cool-black;
15
+ @apply font-manrope font-extrabold text-cool-black;
16
16
  @apply text-h2-xs xs:text-h2 xl:text-h2-xl;
17
- @apply tracking-tighten-0.005;
17
+ @apply tracking-tighten-0.015 xs:tracking-tighten-0.01;
18
18
  }
19
19
 
20
20
  .ui-text-h3 {
21
- @apply font-sans font-medium text-cool-black;
21
+ @apply font-manrope font-extrabold text-cool-black;
22
22
  @apply text-h3;
23
- @apply tracking-tighten-0.0025;
23
+ @apply tracking-tighten-0.005;
24
24
  }
25
25
 
26
26
  .ui-text-h4 {
27
- @apply font-sans font-medium text-cool-black;
28
- @apply text-h4 uppercase;
29
- @apply tracking-widen-0.1;
27
+ @apply font-manrope font-extrabold text-cool-black;
28
+ @apply text-h4;
29
+ @apply tracking-tighten-0.0015;
30
+ }
31
+
32
+ .ui-text-h5 {
33
+ @apply font-manrope font-extrabold text-cool-black;
34
+ @apply text-h5;
35
+ @apply tracking-tighten-0.0025;
30
36
  }
31
37
 
32
38
  .ui-text-p1 {
33
- @apply font-sans font-light text-charcoal-grey;
39
+ @apply font-manrope font-medium text-charcoal-grey;
34
40
  @apply text-p1;
35
41
  }
36
42
 
37
43
  .ui-text-p2 {
38
- @apply font-sans font-light text-charcoal-grey;
44
+ @apply font-manrope font-medium text-charcoal-grey;
39
45
  @apply text-p2;
40
46
  }
41
47
 
42
48
  .ui-text-p3 {
43
- @apply font-sans font-light text-charcoal-grey;
49
+ @apply font-manrope font-medium text-charcoal-grey;
44
50
  @apply text-p3;
45
51
  }
46
52
 
@@ -51,60 +57,63 @@
51
57
  }
52
58
 
53
59
  .ui-text-quote {
54
- @apply font-sans font-light text-cool-black;
55
- @apply text-quote;
56
- @apply tracking-tighten-0.025;
60
+ @apply font-manrope font-normal text-cool-black;
61
+ @apply text-quote leading-normal;
62
+ @apply tracking-tighten-0.0015;
57
63
  }
58
64
 
59
65
  .ui-text-sub-header {
60
- @apply font-sans font-light text-dark-grey;
61
- @apply text-sub-header-xs xs:text-sub-header;
62
- @apply tracking-tighten-0.025;
66
+ @apply font-manrope font-semibold text-neutral-800;
67
+ @apply text-sub-header-xs xs:text-sub-header leading-normal;
63
68
  }
64
69
 
65
70
  .ui-text-overline1 {
66
- @apply font-sans font-medium text-dark-grey uppercase;
67
- @apply text-overline1;
68
- @apply tracking-widen-0.15;
71
+ @apply font-jetbrains_mono font-medium text-active-orange uppercase;
72
+ @apply text-overline1 leading-normal;
73
+ @apply tracking-widen-0.16;
69
74
  }
70
75
 
71
76
  .ui-text-overline2 {
72
- @apply font-sans font-medium text-dark-grey uppercase;
73
- @apply text-overline2;
74
- @apply tracking-widen-0.1;
77
+ @apply font-jetbrains_mono font-medium text-active-orange uppercase;
78
+ @apply text-overline2 leading-normal;
79
+ @apply tracking-widen-0.16;
75
80
  }
76
81
 
77
82
  .ui-text-menu1 {
78
- @apply font-sans font-light text-cool-black;
79
- @apply text-menu1;
83
+ @apply font-manrope font-medium text-cool-black;
84
+ @apply text-menu1 leading-snug;
80
85
  }
81
86
 
82
87
  .ui-text-menu2 {
83
- @apply font-sans font-light text-cool-black;
84
- @apply text-menu2;
88
+ @apply font-manrope font-medium text-cool-black;
89
+ @apply text-menu2 leading-snug;
85
90
  }
86
91
 
87
92
  .ui-text-menu3 {
88
- @apply font-sans font-light text-cool-black;
89
- @apply text-menu3;
93
+ @apply font-manrope font-medium text-cool-black;
94
+ @apply text-menu3 leading-snug;
90
95
  }
91
96
 
92
97
  .ui-text-code {
93
- @apply font-mono font-semibold text-code;
98
+ @apply font-jetbrains_mono font-medium text-code;
99
+ }
100
+
101
+ .ui-text-code2 {
102
+ @apply font-jetbrains_mono font-medium text-code2;
94
103
  }
95
104
 
96
105
  .ui-text-code-inline {
97
- @apply font-mono font-semibold text-code text-charcoal-grey bg-light-grey p-inline-code rounded-sm mx-1;
106
+ @apply font-jetbrains_mono font-medium text-code text-charcoal-grey bg-light-grey p-inline-code rounded-sm mx-1;
98
107
  }
99
108
 
100
109
  .ui-unordered-list {
101
- @apply text-p1 font-light text-cool-black;
102
- @apply list-disc ml-32 mb-24;
110
+ @apply text-p1 font-medium text-cool-black;
111
+ @apply list-disc ml-32 my-16;
103
112
  }
104
113
 
105
114
  .ui-ordered-list {
106
- @apply text-p1 font-light text-cool-black;
107
- @apply ml-32 mb-24 list-decimal;
115
+ @apply text-p1 font-medium text-charcoal-grey;
116
+ @apply ml-32 my-16 list-decimal;
108
117
  }
109
118
 
110
119
  .ui-unordered-list li > *:last-of-type:not(ul):not(ol),
@@ -121,11 +130,21 @@
121
130
  }
122
131
 
123
132
  .ui-unordered-list ul ul {
124
- @apply list-square;
133
+ @apply list-square my-8;
134
+ }
135
+
136
+ .ui-unordered-list ul ul {
137
+ @apply my-8;
138
+ }
139
+
140
+ .ui-ordered-list li,
141
+ .ui-unordered-list li {
142
+ @apply font-medium font-manrope tracking-widen-0;
143
+ line-height: var(--lh-extra-relaxed);
125
144
  }
126
145
 
127
146
  .ui-unordered-list-with-emphasis {
128
- @apply text-p1 font-light text-cool-black;
147
+ @apply text-p1 font-medium text-cool-black;
129
148
  @apply list-disc ml-32 mt-32 -mb-12;
130
149
  }
131
150
 
@@ -0,0 +1,63 @@
1
+ // This file can be used in the browser, but because of the weight of all the language
2
+ // definitions, preferably it should be used on the server.
3
+
4
+ import bash from "highlight.js/lib/languages/bash";
5
+ import cpp from "highlight.js/lib/languages/cpp";
6
+ import csharp from "highlight.js/lib/languages/csharp";
7
+ import css from "highlight.js/lib/languages/css";
8
+ import dart from "highlight.js/lib/languages/dart";
9
+ import dos from "highlight.js/lib/languages/dos";
10
+ import diff from "highlight.js/lib/languages/diff";
11
+ import erlang from "highlight.js/lib/languages/erlang";
12
+ import elixir from "highlight.js/lib/languages/elixir";
13
+ import plaintext from "highlight.js/lib/languages/plaintext";
14
+ import go from "highlight.js/lib/languages/go";
15
+ import http from "highlight.js/lib/languages/http";
16
+ import java from "highlight.js/lib/languages/java";
17
+ import javascript from "highlight.js/lib/languages/javascript";
18
+ import typescript from "highlight.js/lib/languages/typescript";
19
+ import json from "highlight.js/lib/languages/json";
20
+ import objectivec from "highlight.js/lib/languages/objectivec";
21
+ import php from "highlight.js/lib/languages/php";
22
+ import python from "highlight.js/lib/languages/python";
23
+ import ruby from "highlight.js/lib/languages/ruby";
24
+ import swift from "highlight.js/lib/languages/swift";
25
+ import kotlin from "highlight.js/lib/languages/kotlin";
26
+ import sql from "highlight.js/lib/languages/sql";
27
+ import xml from "highlight.js/lib/languages/xml";
28
+ import yaml from "highlight.js/lib/languages/yaml";
29
+ import curl from "highlightjs-curl/src/languages/curl";
30
+
31
+ const registry = [
32
+ { label: "Text", key: "text", module: plaintext },
33
+ { label: "JS", key: "javascript", module: javascript },
34
+ { label: "TS", key: "typescript", module: typescript },
35
+ { label: "Java", key: "java", module: java },
36
+ { label: "Ruby", key: "ruby", module: ruby },
37
+ { label: "Python", key: "python", module: python },
38
+ { label: "PHP", key: "php", module: php },
39
+ { label: "Shell", key: "bash", module: bash },
40
+ { label: "C#", key: "cs", module: csharp },
41
+ { label: "CSS", key: "css", module: css },
42
+ { label: "Go", key: "go", module: go },
43
+ { label: "HTML", key: "xml", module: xml },
44
+ { label: "HTTP", key: "http", module: http },
45
+ { label: "C++", key: "cpp", module: cpp },
46
+ { label: "Dart", key: "dart", module: dart },
47
+ { label: "Swift", key: "swift", module: swift },
48
+ { label: "Kotlin", key: "kotlin", module: kotlin },
49
+ { label: "Objective C", key: "objectivec", module: objectivec },
50
+ { label: "Node.js", key: "javascript", module: javascript },
51
+ { label: "JSON", key: "json", module: json },
52
+ { label: "DOS", key: "dos", module: dos },
53
+ { label: "YAML", key: "yaml", module: yaml },
54
+ { label: "Erlang", key: "erlang", module: erlang },
55
+ { label: "Elixir", key: "elixir", module: elixir },
56
+ { label: "Diff", key: "diff", module: diff },
57
+ { label: "SQL", key: "sql", module: sql },
58
+ { label: "cURL", key: "curl", module: curl },
59
+ { label: "HTML", key: "html", module: xml },
60
+ { label: "XML", key: "xml", module: xml },
61
+ ];
62
+
63
+ export default registry;
@@ -0,0 +1,71 @@
1
+ @layer base {
2
+ @import url("https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,600;0,700;1,600;1,700&display=swap");
3
+ @import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@100;200;300;400;500;600;700;800&display=swap");
4
+ @import url("https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600;700;800&display=swap");
5
+ }
6
+
7
+ @layer components {
8
+ .hljs {
9
+ background: var(--syntax-black);
10
+ color: var(--syntax-light-grey);
11
+ }
12
+
13
+ .hljs-emphasis {
14
+ @apply italic;
15
+ }
16
+
17
+ .hljs-strong {
18
+ @apply font-bold;
19
+ }
20
+
21
+ .hljs-comment,
22
+ .hljs-quote {
23
+ color: var(--syntax-dark-grey);
24
+ }
25
+
26
+ .hljs-variable,
27
+ .hljs-template-variable,
28
+ .hljs-tag,
29
+ .hljs-name,
30
+ .hljs-selector-id,
31
+ .hljs-selector-class,
32
+ .hljs-regexp,
33
+ .hljs-deletion {
34
+ color: var(--syntax-red);
35
+ }
36
+
37
+ .hljs-number,
38
+ .hljs-built_in,
39
+ .hljs-literal,
40
+ .hljs-type,
41
+ .hljs-params,
42
+ .hljs-meta,
43
+ .hljs-link {
44
+ color: var(--syntax-orange);
45
+ }
46
+
47
+ .hljs-attribute {
48
+ color: var(--syntax-yellow);
49
+ }
50
+
51
+ .hljs-string,
52
+ .hljs-symbol,
53
+ .hljs-bullet,
54
+ .hljs-addition {
55
+ color: var(--syntax-green);
56
+ }
57
+
58
+ .hljs-title,
59
+ .hljs-section {
60
+ color: var(--syntax-blue);
61
+ }
62
+
63
+ .hljs-keyword,
64
+ .hljs-selector-tag {
65
+ color: var(--syntax-lilac);
66
+ }
67
+
68
+ .hljs-subst {
69
+ color: var(--syntax-mid-grey);
70
+ }
71
+ }
@@ -0,0 +1,103 @@
1
+ import hljs from "highlight.js/lib/core";
2
+
3
+ // Map certain frameworks, protocols etc to available langauage packs
4
+ const languageToHighlightKey = (lang) => {
5
+ let id;
6
+
7
+ if (!lang) {
8
+ lang = "text";
9
+ }
10
+
11
+ switch (lang.toLowerCase()) {
12
+ case "android":
13
+ id = "java";
14
+ break;
15
+
16
+ case ".net":
17
+ case "net":
18
+ case "dotnet":
19
+ case "csharp":
20
+ case "c#":
21
+ id = "cs";
22
+ break;
23
+
24
+ case "objc":
25
+ case "objective c":
26
+ id = "objectivec";
27
+ break;
28
+
29
+ case "laravel":
30
+ id = "php";
31
+ break;
32
+
33
+ case "flutter":
34
+ id = "dart";
35
+ break;
36
+
37
+ case "node.js":
38
+ case "js":
39
+ id = "javascript";
40
+ break;
41
+
42
+ case "ts":
43
+ id = "typescript";
44
+ break;
45
+
46
+ case "kotlin":
47
+ case "kt":
48
+ id = "kotlin";
49
+ break;
50
+
51
+ case "shell":
52
+ case "fh":
53
+ case "sh":
54
+ id = "bash";
55
+ break;
56
+
57
+ case "https":
58
+ case "http":
59
+ case "txt":
60
+ case "plaintext":
61
+ id = "text";
62
+ break;
63
+
64
+ case "cmd":
65
+ case "bat":
66
+ id = "dos";
67
+ break;
68
+
69
+ case "yml":
70
+ id = "yaml";
71
+ break;
72
+
73
+ case "erl":
74
+ id = "erlang";
75
+ break;
76
+
77
+ case "patch":
78
+ id = "diff";
79
+ break;
80
+
81
+ case "svg":
82
+ id = "xml";
83
+ break;
84
+
85
+ default:
86
+ break;
87
+ }
88
+
89
+ return id || lang;
90
+ };
91
+
92
+ const registerDefaultLanguages = (register) => {
93
+ register.forEach(({ key, module }) => hljs.registerLanguage(key, module));
94
+ };
95
+
96
+ const highlightSnippet = (languageKeyword, snippet) => {
97
+ const language = languageToHighlightKey(languageKeyword);
98
+ if (typeof snippet !== "string" || !snippet || !language) return;
99
+
100
+ return hljs.highlight(snippet, { language }).value;
101
+ };
102
+
103
+ export { highlightSnippet, languageToHighlightKey, registerDefaultLanguages };