@onereach/styles 2.33.0-beta.1987.0 → 2.33.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.
package/font.css CHANGED
@@ -1,2 +1,5 @@
1
+ /* Typography */
1
2
  @import "https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap";
3
+
4
+ /* Iconography */
2
5
  @import "https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24..48,400..700,0..1,0";
package/main.css CHANGED
@@ -2,7 +2,7 @@
2
2
  @import "tailwindcss/components.css";
3
3
  @import "tailwindcss/utilities.css";
4
4
 
5
- @import "./font.css";
6
- @import "./scrollbar.css";
5
+ @import "font.css";
6
+ @import "scrollbar.css";
7
7
 
8
- @import "./dist/index.css";
8
+ @import "dist/index.css";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/styles",
3
- "version": "2.33.0-beta.1987.0",
3
+ "version": "2.33.0",
4
4
  "description": "Styles for or-ui-next",
5
5
  "license": "UNLICENSED",
6
6
  "main": "./main.css",
@@ -53,5 +53,6 @@
53
53
  },
54
54
  "publishConfig": {
55
55
  "access": "public"
56
- }
56
+ },
57
+ "gitHead": "299060820141c34359b8a439b36a4a737b2f6f51"
57
58
  }
package/scrollbar.css CHANGED
@@ -1,17 +1,9 @@
1
- * {
2
- scrollbar-color: theme('textColor.on-disabled') theme('backgroundColor.surface-variant');
3
-
4
- /* @media (prefers-color-scheme: dark) {
5
- scrollbar-color: theme('textColor.on-disabled-dark') theme('backgroundColor.surface-variant-dark');
6
- } */
7
-
8
- scrollbar-width: thin;
9
- }
10
-
1
+ /* Webkit */
11
2
  ::-webkit-scrollbar {
12
3
  width: theme('width.xs');
13
4
  }
14
5
 
6
+ /* Webkit (light) */
15
7
  ::-webkit-scrollbar-track {
16
8
  background-color: theme('backgroundColor.surface-variant');
17
9
 
@@ -32,14 +24,27 @@
32
24
  border-radius: theme('borderRadius.sm');
33
25
  }
34
26
 
35
-
36
- :is(.dark, [data-theme="dark"]) * {
37
- scrollbar-color: theme('textColor.on-disabled-dark') theme('backgroundColor.surface-variant-dark');
38
- }
39
-
27
+ /* Webkit (dark) */
40
28
  :is(.dark, [data-theme="dark"]) ::-webkit-scrollbar-track {
41
29
  background-color: theme('backgroundColor.surface-variant-dark');
42
30
  }
31
+
43
32
  :is(.dark, [data-theme="dark"]) ::-webkit-scrollbar-thumb {
44
33
  background-color: theme('textColor.on-disabled-dark');
45
34
  }
35
+
36
+ /* Gecko (light) */
37
+ * {
38
+ scrollbar-color: theme('textColor.on-disabled') theme('backgroundColor.surface-variant');
39
+
40
+ /* @media (prefers-color-scheme: dark) {
41
+ scrollbar-color: theme('textColor.on-disabled-dark') theme('backgroundColor.surface-variant-dark');
42
+ } */
43
+
44
+ scrollbar-width: thin;
45
+ }
46
+
47
+ /* Gecko (dark) */
48
+ :is(.dark, [data-theme="dark"]) * {
49
+ scrollbar-color: theme('textColor.on-disabled-dark') theme('backgroundColor.surface-variant-dark');
50
+ }
package/tailwind-utils.js CHANGED
@@ -4,6 +4,7 @@ module.exports = {
4
4
  .reduce((preset, { name, value }) => ({
5
5
  ...preset,
6
6
  [name]: value,
7
+ ...name !== 'none' && { [`${name}*`]: `${Number(value.match(/^(\d+)px$/)[1]) - 1}px` },
7
8
  }), {});
8
9
  },
9
10
 
@@ -1,9 +1,13 @@
1
1
  module.exports = {
2
+ // this file used as default config file and can be overridden on app side by creating tailwind.config.js file in
3
+ // the app root, this file is a problem as we need to modify in to allow tailwind usage in ui libraries
4
+ // TODO: Refactor this to allow to add new libs without modifying and performance loose
2
5
  content: [
3
6
  './src/**/*.{vue,js,ts,jsx,tsx}',
7
+ './node_modules/@onereach/service-navigation/dist/auto/**/*.{vue,js,ts,jsx,tsx}',
8
+ './node_modules/@onereach/auth-ui-module/dist/auto/**/*.{vue,js,ts,jsx,tsx}',
4
9
  './node_modules/@onereach/ui-components/dist/auto/**/*.{vue,js,ts,jsx,tsx}',
5
10
  ],
6
-
7
11
  presets: [
8
12
  require('@onereach/styles/tailwind.config.preset.js'),
9
13
  ],
@@ -161,6 +161,11 @@ module.exports = {
161
161
  'inherit': 'inherit',
162
162
  },
163
163
 
164
+ outlineWidth: {
165
+ '0': '0px',
166
+ ...parseBorderWidthTokens(borderWidthTokens),
167
+ },
168
+
164
169
  transitionDuration: {
165
170
  'short': '100ms',
166
171
  'medium': '250ms',
@@ -227,6 +232,29 @@ module.exports = {
227
232
  });
228
233
  }),
229
234
 
235
+ // Layout
236
+ plugin(({ matchUtilities }) => {
237
+ matchUtilities({
238
+ 'layout': (value) => {
239
+ const { prefix = '', direction } = /^(?:(?<prefix>inline-)\.\.)?(?<direction>.+)$/.exec(value).groups;
240
+
241
+ return {
242
+ display: prefix + 'flex',
243
+ flexDirection: direction,
244
+ alignItems: direction === 'row' ? 'center' : 'normal',
245
+ };
246
+ },
247
+ }, {
248
+ values: {
249
+ 'row': 'row',
250
+ 'column': 'column',
251
+
252
+ 'inline-row': 'inline-..row',
253
+ 'inline-column': 'inline-..column',
254
+ },
255
+ });
256
+ }),
257
+
230
258
  // Interactivity
231
259
  plugin(({ addUtilities }) => {
232
260
  addUtilities({
@@ -354,7 +382,7 @@ module.exports = {
354
382
  },
355
383
  },
356
384
 
357
- transitionProperty: 'color, background-color',
385
+ transitionProperty: 'color, background-color, border-color, outline-color',
358
386
  transitionDuration: theme('transitionDuration.short'),
359
387
  transitionTimingFunction: theme('transitionTimingFunction.standard'),
360
388
  };
@@ -385,7 +413,7 @@ module.exports = {
385
413
  },
386
414
  },
387
415
 
388
- transitionProperty: 'color, background-color',
416
+ transitionProperty: 'color, background-color, border-color, outline-color',
389
417
  transitionDuration: theme('transitionDuration.short'),
390
418
  transitionTimingFunction: theme('transitionTimingFunction.standard'),
391
419
  };
@@ -416,7 +444,7 @@ module.exports = {
416
444
  },
417
445
  },
418
446
 
419
- transitionProperty: 'color, background-color',
447
+ transitionProperty: 'color, background-color, border-color, outline-color',
420
448
  transitionDuration: theme('transitionDuration.short'),
421
449
  transitionTimingFunction: theme('transitionTimingFunction.standard'),
422
450
  };
@@ -447,7 +475,7 @@ module.exports = {
447
475
  },
448
476
  },
449
477
 
450
- transitionProperty: 'color, background-color',
478
+ transitionProperty: 'color, background-color, border-color, outline-color',
451
479
  transitionDuration: theme('transitionDuration.short'),
452
480
  transitionTimingFunction: theme('transitionTimingFunction.standard'),
453
481
  };
@@ -732,9 +760,9 @@ module.exports = {
732
760
  const [token, suffix = ''] = value.split('..');
733
761
 
734
762
  return {
735
- borderColor: theme(`borderColor.${token}` + suffix, token),
763
+ borderWidth: theme('borderWidth.1'),
736
764
  borderStyle: 'solid',
737
- borderWidth: 1,
765
+ borderColor: theme(`borderColor.${token}` + suffix, token),
738
766
 
739
767
  '&[disabled]': {
740
768
  borderColor: `${theme('borderColor.disabled' + suffix)} !important`,
@@ -777,9 +805,9 @@ module.exports = {
777
805
  const [token, suffix = ''] = value.split('..');
778
806
 
779
807
  return {
780
- borderColor: theme(`borderColor.${token}` + suffix, token),
808
+ borderWidth: theme('borderWidth.2'),
781
809
  borderStyle: 'solid',
782
- borderWidth: 2,
810
+ borderColor: theme(`borderColor.${token}` + suffix, token),
783
811
 
784
812
  '&[disabled]': {
785
813
  borderColor: `${theme('borderColor.disabled' + suffix)} !important`,
@@ -830,10 +858,14 @@ module.exports = {
830
858
  const [token, suffix = ''] = value.split('..');
831
859
 
832
860
  return {
833
- outlineColor: theme(`outlineColor.${token}-opacity-0-16` + suffix, token),
834
- outlineStyle: 'solid',
835
- outlineWidth: 2,
836
- outlineOffset: 0,
861
+ // In Safari outline doesn't follow current border-radius
862
+ // It seems like this is already fixed in Safari Technology Preview (Release 157)
863
+ // Stay tuned for Safari updates
864
+ boxShadow: `0 0 0 2px ${theme(`outlineColor.${token}-opacity-0-16` + suffix, token)}`,
865
+ // outlineOffset: '0',
866
+ // outlineWidth: theme('outlineWidth.2'),
867
+ // outlineStyle: 'solid',
868
+ // outlineColor: theme(`outlineColor.${token}-opacity-0-16` + suffix, token),
837
869
  };
838
870
  },
839
871
  }, {