@oxy.so/bloom 2.0.0 → 2.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.
Files changed (45) hide show
  1. package/docs/auth-card.mdx +1 -1
  2. package/docs/migrating-to-2.0.mdx +21 -3
  3. package/docs/social-button.mdx +20 -3
  4. package/lib/commonjs/social-button/OxyMark.js +61 -0
  5. package/lib/commonjs/social-button/OxyMark.js.map +1 -0
  6. package/lib/commonjs/social-button/SocialButton.js +26 -2
  7. package/lib/commonjs/social-button/SocialButton.js.map +1 -1
  8. package/lib/commonjs/social-button/index.js +6 -0
  9. package/lib/commonjs/social-button/index.js.map +1 -1
  10. package/lib/commonjs/social-button/providers.js +11 -0
  11. package/lib/commonjs/social-button/providers.js.map +1 -1
  12. package/lib/module/social-button/OxyMark.js +55 -0
  13. package/lib/module/social-button/OxyMark.js.map +1 -0
  14. package/lib/module/social-button/SocialButton.js +25 -2
  15. package/lib/module/social-button/SocialButton.js.map +1 -1
  16. package/lib/module/social-button/index.js +1 -0
  17. package/lib/module/social-button/index.js.map +1 -1
  18. package/lib/module/social-button/providers.js +12 -0
  19. package/lib/module/social-button/providers.js.map +1 -1
  20. package/lib/typescript/commonjs/social-button/OxyMark.d.ts +17 -0
  21. package/lib/typescript/commonjs/social-button/OxyMark.d.ts.map +1 -0
  22. package/lib/typescript/commonjs/social-button/SocialButton.d.ts +3 -1
  23. package/lib/typescript/commonjs/social-button/SocialButton.d.ts.map +1 -1
  24. package/lib/typescript/commonjs/social-button/index.d.ts +2 -1
  25. package/lib/typescript/commonjs/social-button/index.d.ts.map +1 -1
  26. package/lib/typescript/commonjs/social-button/providers.d.ts +10 -0
  27. package/lib/typescript/commonjs/social-button/providers.d.ts.map +1 -1
  28. package/lib/typescript/commonjs/social-button/types.d.ts +10 -3
  29. package/lib/typescript/commonjs/social-button/types.d.ts.map +1 -1
  30. package/lib/typescript/module/social-button/OxyMark.d.ts +17 -0
  31. package/lib/typescript/module/social-button/OxyMark.d.ts.map +1 -0
  32. package/lib/typescript/module/social-button/SocialButton.d.ts +3 -1
  33. package/lib/typescript/module/social-button/SocialButton.d.ts.map +1 -1
  34. package/lib/typescript/module/social-button/index.d.ts +2 -1
  35. package/lib/typescript/module/social-button/index.d.ts.map +1 -1
  36. package/lib/typescript/module/social-button/providers.d.ts +10 -0
  37. package/lib/typescript/module/social-button/providers.d.ts.map +1 -1
  38. package/lib/typescript/module/social-button/types.d.ts +10 -3
  39. package/lib/typescript/module/social-button/types.d.ts.map +1 -1
  40. package/package.json +1 -1
  41. package/src/social-button/OxyMark.tsx +47 -0
  42. package/src/social-button/SocialButton.tsx +35 -3
  43. package/src/social-button/index.ts +2 -0
  44. package/src/social-button/providers.ts +12 -0
  45. package/src/social-button/types.ts +11 -3
@@ -1,8 +1,10 @@
1
1
  export { SocialButton } from './SocialButton';
2
2
  export { SOCIAL_PROVIDERS } from './providers';
3
+ export { socialButtonLabel } from './SocialButton';
3
4
  export type { SocialProvider } from './providers';
4
5
  export type {
5
6
  SocialBrand,
7
+ SocialButtonAction,
6
8
  SocialBrandConfig,
7
9
  SocialButtonAppearance,
8
10
  SocialButtonProps,
@@ -15,11 +15,17 @@
15
15
  * #4285F4, since the two side by side read as a mistake. The multi-colour G
16
16
  * of `appearance="white"` stays Google's own.
17
17
  *
18
+ * `oxy` is Oxy's own mark (the drawing the Oxy SDK ships), not an upstream
19
+ * glyph. Like Google it paints `colorful` with the theme accent, and the
20
+ * button draws it two-tone (`OxyMark.tsx`); `path` is its outer silhouette.
21
+ *
18
22
  * The logos are trademarks of their owners. Several providers (Google and Apple
19
23
  * in particular) publish sign-in button guidelines covering colour, clear space
20
24
  * and wording; check them before shipping a production login.
21
25
  */
22
26
 
27
+ import { OXY_MARK_OUTER_PATH, OXY_MARK_VIEW_BOX } from './OxyMark';
28
+
23
29
  export interface SocialProviderMeta {
24
30
  label: string;
25
31
  /** Fill for `colorful`; `null` = the theme accent (the primary button). */
@@ -52,6 +58,12 @@ export interface SocialColorLogo {
52
58
  }
53
59
 
54
60
  export const SOCIAL_PROVIDERS = {
61
+ "oxy": {
62
+ label: "Oxy",
63
+ brand: null,
64
+ viewBox: OXY_MARK_VIEW_BOX,
65
+ path: OXY_MARK_OUTER_PATH,
66
+ },
55
67
  "google": {
56
68
  label: "Google",
57
69
  brand: null,
@@ -17,6 +17,12 @@ export type SocialButtonSize = 'medium' | 'small';
17
17
  */
18
18
  export type SocialButtonAppearance = 'colorful' | 'black' | 'white';
19
19
 
20
+ /**
21
+ * The verb of the default label: `continue` — "Continue with Google" (the
22
+ * default), `signIn` — "Sign in with Google", `signUp` — "Sign up with Google".
23
+ */
24
+ export type SocialButtonAction = 'continue' | 'signIn' | 'signUp';
25
+
20
26
  /** Everything a brand needs, for providers that are not built in. */
21
27
  export interface SocialBrandConfig {
22
28
  /** The logo, rendered inside the glyph box (18 / 16). */
@@ -43,7 +49,9 @@ export interface SocialButtonProps {
43
49
  iconOnly?: boolean;
44
50
  /** Drop the fixed width and fill the container instead. */
45
51
  fullWidth?: boolean;
46
- /** The label. Defaults to `"Continue with <Brand>"`. */
52
+ /** The verb of the default label and accessible name. Defaults to `'continue'`. */
53
+ action?: SocialButtonAction;
54
+ /** The label. Defaults to the `action` phrase, e.g. `"Continue with <Brand>"`. */
47
55
  children?: ReactNode;
48
56
  onPress?: () => void;
49
57
  /**
@@ -59,8 +67,8 @@ export interface SocialButtonProps {
59
67
  textStyle?: StyleProp<TextStyle>;
60
68
  className?: string;
61
69
  /**
62
- * Overrides the accessible name. Defaults to the visible label, or to
63
- * `"Continue with <Brand>"` when `iconOnly`.
70
+ * Overrides the accessible name. Defaults to the visible label, or to the
71
+ * `action` phrase (`"Continue with <Brand>"`) when `iconOnly`.
64
72
  */
65
73
  accessibilityLabel?: string;
66
74
  accessibilityHint?: string;