@expo/styleguide 8.0.0-alpha.1 → 8.0.0-alpha.2

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/dist/index.js CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  var React = require('react');
4
4
  var tailwindMerge = require('tailwind-merge');
5
- var styleguideIcons = require('@expo/styleguide-icons');
6
5
  var Link$1 = require('next/link');
7
6
  var styleguideBase = require('@expo/styleguide-base');
8
7
 
@@ -274,19 +273,19 @@ function getThemeClasses(theme, disabled) {
274
273
  if (disabled === void 0) { disabled = false; }
275
274
  switch (theme) {
276
275
  case 'primary':
277
- return tailwindMerge.twMerge('border-button-primary bg-button-primary text-button-primary shadow-xs', !disabled && 'hocus:bg-button-primary-hover', disabled && 'bg-button-primary-disabled border-button-primary-disabled text-button-primary-disabled');
276
+ return tailwindMerge.twMerge('border-button-primary bg-button-primary text-button-primary shadow-xs', !disabled && 'hocus:bg-button-primary-hover active:scale-98', disabled && 'bg-button-primary-disabled border-button-primary-disabled text-button-primary-disabled');
278
277
  case 'primary-destructive':
279
- return tailwindMerge.twMerge('border-button-primary-destructive bg-button-primary-destructive text-button-primary-destructive shadow-xs', !disabled && 'hocus:bg-button-primary-destructive-hover', disabled &&
278
+ return tailwindMerge.twMerge('border-button-primary-destructive bg-button-primary-destructive text-button-primary-destructive shadow-xs', !disabled && 'hocus:bg-button-primary-destructive-hover active:scale-98', disabled &&
280
279
  'bg-button-primary-destructive-disabled border-button-primary-destructive-disabled text-button-primary-destructive-disabled');
281
280
  case 'secondary':
282
- return tailwindMerge.twMerge('border-button-secondary bg-button-secondary text-button-secondary shadow-xs', !disabled && 'hocus:bg-button-secondary-hover', disabled && 'bg-button-secondary-disabled border-button-secondary-disabled text-button-secondary-disabled');
281
+ return tailwindMerge.twMerge('border-button-secondary bg-button-secondary text-button-secondary shadow-xs', !disabled && 'hocus:bg-button-secondary-hover active:scale-98', disabled && 'bg-button-secondary-disabled border-button-secondary-disabled text-button-secondary-disabled');
283
282
  case 'secondary-destructive':
284
- return tailwindMerge.twMerge('border-button-secondary-destructive bg-button-secondary-destructive text-button-secondary-destructive shadow-xs', !disabled && 'hocus:bg-button-secondary-destructive-hover', disabled &&
283
+ return tailwindMerge.twMerge('border-button-secondary-destructive bg-button-secondary-destructive text-button-secondary-destructive shadow-xs', !disabled && 'hocus:bg-button-secondary-destructive-hover active:scale-98', disabled &&
285
284
  'bg-button-secondary-destructive-disabled border-button-secondary-destructive-disabled text-button-secondary-destructive-disabled');
286
285
  case 'tertiary':
287
- return tailwindMerge.twMerge('border-button-tertiary bg-button-tertiary text-button-tertiary shadow-none', !disabled && 'hocus:bg-button-tertiary-hover', disabled && 'bg-button-tertiary-disabled border-button-tertiary-disabled text-button-tertiary-disabled');
286
+ return tailwindMerge.twMerge('border-button-tertiary bg-button-tertiary text-button-tertiary shadow-none', !disabled && 'hocus:bg-button-tertiary-hover active:scale-98', disabled && 'bg-button-tertiary-disabled border-button-tertiary-disabled text-button-tertiary-disabled');
288
287
  case 'quaternary':
289
- return tailwindMerge.twMerge('border-button-quaternary bg-button-quaternary text-button-quaternary shadow-none', !disabled && 'hocus:bg-button-quaternary-hover', disabled && 'bg-button-quaternary-disabled border-button-quaternary-disabled text-button-quaternary-disabled');
288
+ return tailwindMerge.twMerge('border-button-quaternary bg-button-quaternary text-button-quaternary shadow-none', !disabled && 'hocus:bg-button-quaternary-hover active:scale-98', disabled && 'bg-button-quaternary-disabled border-button-quaternary-disabled text-button-quaternary-disabled');
290
289
  }
291
290
  }
292
291
  function getIconSizeClasses(size) {
@@ -342,8 +341,7 @@ var Button = function (props) {
342
341
  return (React.createElement(Element, __assign({ href: href, className: tailwindMerge.twMerge("inline-flex border rounded-md font-medium gap-2 items-center whitespace-nowrap transition", getSizeClasses(size), getThemeClasses(theme, disabled), disabled && 'cursor-default opacity-80 pointer-event-none', className), disabled: disabled }, (href ? { openInNewTab: openInNewTab } : {}), rest),
343
342
  isLeftSlotIcon ? React.cloneElement(leftSlot, getIconProps(leftSlot, iconClasses)) : leftSlot,
344
343
  children && (React.createElement("span", { className: tailwindMerge.twMerge('flex self-center text-inherit leading-none', href && 'select-none') }, typeof children === 'string' ? titleCase(children) : children)),
345
- isRightSlotIcon ? React.cloneElement(rightSlot, getIconProps(rightSlot, iconClasses)) : rightSlot,
346
- !leftSlot && !rightSlot && href && openInNewTab && (React.createElement(styleguideIcons.ArrowUpRightIcon, { className: tailwindMerge.twMerge(getIconSizeClasses(size), 'text-icon-secondary') }))));
344
+ isRightSlotIcon ? React.cloneElement(rightSlot, getIconProps(rightSlot, iconClasses)) : rightSlot));
347
345
  };
348
346
 
349
347
  function DocsLogo(props) {
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { LinkBaseProps } from './LinkBase';
2
3
  export declare function Link({ className, disabled, ...rest }: LinkBaseProps): JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare function isLocalStorageAvailable(): boolean;
2
3
  export declare function getInitialColorMode(): string | null;
3
4
  export declare function BlockingSetInitialColorMode(): JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { IconProps } from '../types';
2
3
  export declare function DocsLogo(props: IconProps): JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { IconProps } from '../types';
2
3
  export declare function ExpoGoLogo(props: IconProps): JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { IconProps } from '../types';
2
3
  export declare function Logo(props: IconProps): JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { IconProps } from '../types';
2
3
  export declare function SnackLogo(props: IconProps): JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { IconProps } from '../types';
2
3
  export declare function WordMarkLogo(props: IconProps): JSX.Element;
package/dist/tailwind.js CHANGED
@@ -342,7 +342,7 @@ const expoTailwindConfig = {
342
342
  inherit: 'inherit',
343
343
  },
344
344
  scale: {
345
- 97.5: '.975',
345
+ 98: '.98',
346
346
  },
347
347
  },
348
348
  },
@@ -351,7 +351,7 @@ const expoTailwindConfig = {
351
351
  },
352
352
  plugins: [
353
353
  plugin(({ addVariant, matchUtilities, theme }) => {
354
- addVariant('hocus', ['&:hover', '&:focus']);
354
+ addVariant('hocus', ['&:hover', '&:focus-visible']);
355
355
  matchUtilities({ heading: (value) => value }, { values: theme('heading') });
356
356
  }),
357
357
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/styleguide",
3
- "version": "8.0.0-alpha.1",
3
+ "version": "8.0.0-alpha.2",
4
4
  "description": "Expo's styleguide components for use on the web.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -39,16 +39,15 @@
39
39
  "typescript": "^4.9.5"
40
40
  },
41
41
  "peerDependencies": {
42
- "@expo/styleguide-icons": "*",
43
42
  "next": ">= 13",
44
43
  "react": ">= 16"
45
44
  },
46
45
  "dependencies": {
47
- "@expo/styleguide-base": "^1.0.0-alpha.1",
46
+ "@expo/styleguide-base": "^1.0.0-alpha.2",
48
47
  "tailwind-merge": "^1.10.0"
49
48
  },
50
49
  "eslintConfig": {
51
50
  "extends": "universe/web"
52
51
  },
53
- "gitHead": "d58f386be7e415766a6eb967646211710e8978ab"
52
+ "gitHead": "189e87d2507a9bb47c36acd8f0f878b9f63f9d22"
54
53
  }
package/tailwind.js CHANGED
@@ -342,7 +342,7 @@ const expoTailwindConfig = {
342
342
  inherit: 'inherit',
343
343
  },
344
344
  scale: {
345
- 97.5: '.975',
345
+ 98: '.98',
346
346
  },
347
347
  },
348
348
  },
@@ -351,7 +351,7 @@ const expoTailwindConfig = {
351
351
  },
352
352
  plugins: [
353
353
  plugin(({ addVariant, matchUtilities, theme }) => {
354
- addVariant('hocus', ['&:hover', '&:focus']);
354
+ addVariant('hocus', ['&:hover', '&:focus-visible']);
355
355
  matchUtilities({ heading: (value) => value }, { values: theme('heading') });
356
356
  }),
357
357
  ],