@youversion/design-system-components 0.0.2 → 0.0.5

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 (71) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/Box/Box.d.ts +44 -0
  3. package/dist/Box/Box.d.ts.map +1 -0
  4. package/dist/Box/index.d.ts +2 -0
  5. package/dist/Box/index.d.ts.map +1 -0
  6. package/dist/Button/Button.d.ts +78 -0
  7. package/dist/Button/Button.d.ts.map +1 -0
  8. package/dist/Button/index.d.ts +2 -0
  9. package/dist/Button/index.d.ts.map +1 -0
  10. package/dist/IconButton/IconButton.d.ts +27 -0
  11. package/dist/IconButton/IconButton.d.ts.map +1 -0
  12. package/dist/IconButton/index.d.ts +2 -0
  13. package/dist/IconButton/index.d.ts.map +1 -0
  14. package/dist/IconLinkButton/IconLinkButton.d.ts +34 -0
  15. package/dist/IconLinkButton/IconLinkButton.d.ts.map +1 -0
  16. package/dist/IconLinkButton/index.d.ts +2 -0
  17. package/dist/IconLinkButton/index.d.ts.map +1 -0
  18. package/dist/Input/Input.d.ts +47 -0
  19. package/dist/Input/Input.d.ts.map +1 -0
  20. package/dist/Input/index.d.ts +2 -0
  21. package/dist/Input/index.d.ts.map +1 -0
  22. package/dist/LinkButton/LinkButton.d.ts +42 -0
  23. package/dist/LinkButton/LinkButton.d.ts.map +1 -0
  24. package/dist/LinkButton/index.d.ts +2 -0
  25. package/dist/LinkButton/index.d.ts.map +1 -0
  26. package/dist/List/List.d.ts +32 -0
  27. package/dist/List/List.d.ts.map +1 -0
  28. package/dist/List/index.d.ts +2 -0
  29. package/dist/List/index.d.ts.map +1 -0
  30. package/dist/ListItem/ListItem.d.ts +58 -0
  31. package/dist/ListItem/ListItem.d.ts.map +1 -0
  32. package/dist/ListItem/index.d.ts +2 -0
  33. package/dist/ListItem/index.d.ts.map +1 -0
  34. package/dist/ListItemText/ListItemText.d.ts +34 -0
  35. package/dist/ListItemText/ListItemText.d.ts.map +1 -0
  36. package/dist/ListItemText/index.d.ts +2 -0
  37. package/dist/ListItemText/index.d.ts.map +1 -0
  38. package/dist/Tooltip/Tooltip.d.ts +34 -0
  39. package/dist/Tooltip/Tooltip.d.ts.map +1 -0
  40. package/dist/Tooltip/Tooltip.module.css.d.ts +6 -0
  41. package/dist/Tooltip/index.d.ts +2 -0
  42. package/dist/Tooltip/index.d.ts.map +1 -0
  43. package/dist/Typography/Heading/Heading.d.ts +30 -0
  44. package/dist/Typography/Heading/Heading.d.ts.map +1 -0
  45. package/dist/Typography/Heading/index.d.ts +2 -0
  46. package/dist/Typography/Heading/index.d.ts.map +1 -0
  47. package/dist/Typography/Text/Text.d.ts +19 -0
  48. package/dist/Typography/Text/Text.d.ts.map +1 -0
  49. package/dist/Typography/Text/index.d.ts +2 -0
  50. package/dist/Typography/Text/index.d.ts.map +1 -0
  51. package/dist/Typography/Typography.d.ts +44 -0
  52. package/dist/Typography/Typography.d.ts.map +1 -0
  53. package/dist/Typography/Variants.d.ts +5 -0
  54. package/dist/Typography/Variants.d.ts.map +1 -0
  55. package/dist/Typography/index.d.ts +3 -0
  56. package/dist/Typography/index.d.ts.map +1 -0
  57. package/dist/hooks/index.d.ts +2 -0
  58. package/dist/hooks/index.d.ts.map +1 -0
  59. package/dist/hooks/useCombinedRefs.d.ts +33 -0
  60. package/dist/hooks/useCombinedRefs.d.ts.map +1 -0
  61. package/dist/index.d.ts +11 -0
  62. package/dist/index.d.ts.map +1 -0
  63. package/dist/index.es.js +596 -478
  64. package/dist/index.umd.js +10 -10
  65. package/dist/utils/get-resolved-dark-mode-value.d.ts +25 -0
  66. package/dist/utils/get-resolved-dark-mode-value.d.ts.map +1 -0
  67. package/dist/utils/get-resolved-logical-property.d.ts +25 -0
  68. package/dist/utils/get-resolved-logical-property.d.ts.map +1 -0
  69. package/dist/utils/tailwind-types.d.ts +29 -0
  70. package/dist/utils/tailwind-types.d.ts.map +1 -0
  71. package/package.json +6 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # @youversion/design-system-components
2
2
 
3
+ ## 0.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 6134287: - Updated **ListItem** to support _startAction_ and _endAction_
8
+ - Added RTL support to storybook
9
+ - Updated RTL styling in **Input**
10
+ - 5031ce0: Added `LinkButton` component.
11
+ Updated `Button` component's variable naming and logic.
12
+
13
+ ## 0.0.4
14
+
15
+ ### Patch Changes
16
+
17
+ - 1883446: Update `Button` component.
18
+
19
+ - Exported the component to the main index export.
20
+ - Set default values for variant and theme.
21
+ - Used new storybook helpers for `Button` stories.
22
+ - Added displayName for `Button`.
23
+ - Inferred variant and theme for `Button` stories.
24
+
25
+ ## 0.0.3
26
+
27
+ ### Patch Changes
28
+
29
+ - d1c7fb7: update typescript exports and expose global & reset css files
30
+ - fdb7b2b: Added `Button` Component
31
+
3
32
  ## 0.0.2
4
33
 
5
34
  ### Patch Changes
@@ -0,0 +1,44 @@
1
+ import { AllHTMLAttributes, ElementType } from 'react';
2
+ import { BGColorOptions, BorderColorOptions, BorderRadiusOptions, BorderWidthOptions, ColorOptions, HeightOptions, MarginOptions, PaddingOptions, WidthOptions } from '../utils/tailwind-types';
3
+ export interface BoxProps extends Omit<AllHTMLAttributes<HTMLElement>, 'height' | 'width' | 'color'> {
4
+ background?: BGColorOptions;
5
+ borderColor?: BorderColorOptions;
6
+ borderRadius?: BorderRadiusOptions;
7
+ borderWidth?: BorderWidthOptions;
8
+ color?: ColorOptions;
9
+ /** The HTML Element type that the Box should render as. */
10
+ component?: ElementType;
11
+ elevation?: 0 | 1 | 2 | 4 | 8 | 12;
12
+ height?: HeightOptions;
13
+ margin?: MarginOptions;
14
+ padding?: PaddingOptions;
15
+ width?: WidthOptions;
16
+ }
17
+ /**
18
+ * The **Box** component is the lowest level layout component. Many of the components in the design system are
19
+ * built from this component.
20
+ *
21
+ * Accepts {@link BoxProps}.
22
+ *
23
+ * @returns Renders a div component, with the ability to pass YV tailwind tokens as props.
24
+ * @example
25
+ * ```tsx
26
+ * import { Box } from '@youversion/design-system-components';
27
+ *
28
+ * function MyComponent() {
29
+ * return (
30
+ * <>
31
+ * <Box
32
+ * background={{
33
+ * lightMode: 'bg-gray-20',
34
+ * darkMode: 'dark:bg-alert-light'
35
+ * }}
36
+ * elevation={1}
37
+ * />
38
+ * </>
39
+ * )
40
+ * }
41
+ * ```
42
+ */
43
+ export declare const Box: import("react").ForwardRefExoticComponent<BoxProps & import("react").RefAttributes<HTMLElement>>;
44
+ //# sourceMappingURL=Box.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../src/Box/Box.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAiB,WAAW,EAA4B,MAAM,OAAO,CAAC;AAIhG,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,YAAY,EACb,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,QAAS,SAAQ,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;IAClG,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;IACnC,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,KAAK,CAAC,EAAE,YAAY,CAAC;CACtB;AAyDD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,GAAG,kGAA2B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Box';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Box/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC"}
@@ -0,0 +1,78 @@
1
+ import { ElementType } from 'react';
2
+ import { AllHTMLAttributes, ForwardedRef } from 'react';
3
+ export type IconPosition = 'start' | 'end' | undefined;
4
+ export declare const buttonSizeOptions: {
5
+ lg: string;
6
+ md: string;
7
+ sm: string;
8
+ xl: string;
9
+ xs: string;
10
+ };
11
+ export declare const determineSizeClasses: (iconPosition: IconPosition) => {
12
+ lg: string;
13
+ md: string;
14
+ sm: string;
15
+ xl: string;
16
+ xs: string;
17
+ };
18
+ export declare const iconSizes: {
19
+ lg: number;
20
+ md: number;
21
+ sm: number;
22
+ xl: number;
23
+ xs: number;
24
+ };
25
+ export declare const defaultButtonClasses = "items-center leading-default font-bold ease-in-out duration-100 focus:outline-2 focus:outline-info-light dark:focus:outline-info-dark flex w-full max-w-fit";
26
+ export declare const variantClasses: {
27
+ all_caps: string;
28
+ borderless: string;
29
+ brand: string;
30
+ primary: string;
31
+ risk: string;
32
+ secondary: string;
33
+ stroked: string;
34
+ };
35
+ export interface BaseButtonProps extends Omit<AllHTMLAttributes<HTMLButtonElement>, 'size'> {
36
+ children: React.ReactNode;
37
+ icon?: ElementType;
38
+ iconPosition?: IconPosition;
39
+ type?: 'button' | 'submit' | 'reset';
40
+ }
41
+ export interface BaseVariants extends BaseButtonProps {
42
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
43
+ variant?: 'secondary' | 'primary' | 'stroked' | 'borderless' | 'risk' | 'brand';
44
+ }
45
+ export interface AllCapsVariant extends BaseButtonProps {
46
+ size?: 'xs' | 'sm' | 'md';
47
+ variant?: 'all_caps';
48
+ }
49
+ export type ButtonProps = BaseVariants | AllCapsVariant;
50
+ /**
51
+ * The **Button** component is used to generate a button.
52
+ *
53
+ * @param children - Content of the Button.
54
+ * @param icon - An Icon Element.
55
+ * @param iconPosition - If and Where the Icon will be placed.
56
+ * @param variant - The look of the button.
57
+ * @param size - The size of the button.
58
+ *
59
+ * @returns A Button with content and styling.
60
+ *
61
+ * @example
62
+ * ```tsx
63
+ * import { Button } from '@youversion/design-system-components';
64
+ * import { TriangleDownStroked } from '@youversion/design-system-icons/index';
65
+ *
66
+ * function MyComponent() {
67
+ * return (
68
+ * <>
69
+ * <Button>Press Me!</Button>
70
+ * <Button icon={TriangleDownStroked} iconPosition='start' size='md' variant='secondary' >Press Me Too!</Button>
71
+ * </>
72
+ * )
73
+ * }
74
+ * ```
75
+ */
76
+ export declare const ButtonComponent: ({ className, children, disabled, icon, iconPosition, size, variant, ...rest }: ButtonProps, ref: ForwardedRef<HTMLButtonElement>) => JSX.Element;
77
+ export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
78
+ //# sourceMappingURL=Button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/Button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,WAAW,EAAc,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAExD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;AAEvD,eAAO,MAAM,iBAAiB;;;;;;CAM7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,iBAAkB,YAAY;;;;;;CA2B9D,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;CAMrB,CAAC;AAEF,eAAO,MAAM,oBAAoB,gKAC8H,CAAC;AAEhK,eAAO,MAAM,cAAc;;;;;;;;CAe1B,CAAC;AAEF,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACzF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;CACtC;AAED,MAAM,WAAW,YAAa,SAAQ,eAAe;IACnD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACxC,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;CACjF;AAED,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB;AAED,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,cAAc,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,eAAO,MAAM,eAAe,kFACwE,WAAW,OACxG,aAAa,iBAAiB,CAAC,gBAsBrC,CAAC;AAEF,eAAO,MAAM,MAAM,2GAA8B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Button';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Button/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export interface IconButtonProps extends HTMLAttributes<HTMLButtonElement> {
3
+ children: React.ReactNode;
4
+ disabled?: boolean;
5
+ }
6
+ /**
7
+ * The **IconButton** is use to to display an Icon as a button.
8
+ *
9
+ * Accepts {@link IconButtonProps}.
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * import { IconButton } from '@youversion/design-system-components';
14
+ * import AaStroked from '@youversion/design-system-icons/AaStroked';
15
+ *
16
+ * function MyComponent() {
17
+ * return (
18
+ * <IconButton onClick={() => console.log('clicked')}>
19
+ * <AaStroked />
20
+ * </IconButton>
21
+ * )
22
+ * }
23
+ * ```
24
+ *
25
+ */
26
+ export declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
27
+ //# sourceMappingURL=IconButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/IconButton/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAA4B,cAAc,EAAE,MAAM,OAAO,CAAC;AAEjE,MAAM,WAAW,eAAgB,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IACxE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAqBD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,UAAU,+GAAkC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './IconButton';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/IconButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { ElementType, HTMLAttributes } from 'react';
2
+ export interface IconLinkButtonWithComponentProps extends HTMLAttributes<HTMLAnchorElement> {
3
+ children: React.ReactNode;
4
+ component: ElementType;
5
+ href?: string;
6
+ }
7
+ export interface IconLinkButtonWithoutComponentProps extends HTMLAttributes<HTMLAnchorElement> {
8
+ children: React.ReactNode;
9
+ component?: never;
10
+ href: string;
11
+ }
12
+ export type IconLinkButtonsProps = IconLinkButtonWithComponentProps | IconLinkButtonWithoutComponentProps;
13
+ /**
14
+ * The **IconLinkButton** is use to to display an Icon as a link.
15
+ *
16
+ * Accepts {@link IconLinkButtonsProps}.
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * import { IconLinkButton } from '@youversion/design-system-components';
21
+ * import AaStroked from '@youversion/design-system-icons/AaStroked';
22
+ *
23
+ * function MyComponent() {
24
+ * return (
25
+ * <IconLinkButton href='https://www.bible.com'>
26
+ * <AaStroked />
27
+ * </IconLinkButton>
28
+ * )
29
+ * }
30
+ * ```
31
+ *
32
+ */
33
+ export declare const IconLinkButton: import("react").ForwardRefExoticComponent<IconLinkButtonsProps & import("react").RefAttributes<HTMLAnchorElement>>;
34
+ //# sourceMappingURL=IconLinkButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconLinkButton.d.ts","sourceRoot":"","sources":["../../../src/IconLinkButton/IconLinkButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,WAAW,EAA4B,cAAc,EAAE,MAAM,OAAO,CAAC;AAE7F,MAAM,WAAW,gCAAiC,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IACzF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,EAAE,WAAW,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mCAAoC,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IAC5F,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,oBAAoB,GAAG,gCAAgC,GAAG,mCAAmC,CAAC;AAoB1G;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,cAAc,oHAAsC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './IconLinkButton';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/IconLinkButton/index.tsx"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,47 @@
1
+ import React, { InputHTMLAttributes } from 'react';
2
+ export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
3
+ /** A class that can be passed in to the Input. */
4
+ className?: string;
5
+ /** Disables the Input, also applies disabled styling. */
6
+ disabled?: boolean;
7
+ /** Icon to render at the end of the Input. */
8
+ endIcon?: React.ReactNode;
9
+ /** Message to provide to the user, also applies error styling. */
10
+ error?: string;
11
+ /** Hint to provide to the user. */
12
+ hint?: string;
13
+ /** Label for the input. */
14
+ label: string;
15
+ /** Name used inside of the form. */
16
+ name: string;
17
+ /** Function to handle the onChange event when using as a controlled input. */
18
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
19
+ /** Placeholder to display. */
20
+ placeholder?: string;
21
+ /** Icon to render at the start of the Input. */
22
+ startIcon?: React.ReactNode;
23
+ /** Value for the input when using as a controlled input. */
24
+ value?: string;
25
+ }
26
+ /**
27
+ * The **Input** component is used to allow the user to enter text into a form.
28
+ *
29
+ * Accepts {@link InputProps}.
30
+ *
31
+ * @returns Renders the text input field to be used in a form.
32
+ *
33
+ * @example
34
+ * ```tsx
35
+ * import { Input } from '@youversion/design-system-components';
36
+ *
37
+ * function MyComponent() {
38
+ * return (
39
+ * <>
40
+ * <Input name='firstName' label='First Name' />
41
+ * </>
42
+ * )
43
+ * }
44
+ * ```
45
+ */
46
+ export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
47
+ //# sourceMappingURL=Input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/Input/Input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAA6B,mBAAmB,EAAU,MAAM,OAAO,CAAC;AAItF,MAAM,WAAW,UAAW,SAAQ,mBAAmB,CAAC,gBAAgB,CAAC;IACvE,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IACtD,8BAA8B;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAsGD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,KAAK,qFAAmC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Input';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Input/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { ElementType, ForwardedRef } from 'react';
2
+ import { AllCapsVariant, BaseVariants } from '../Button';
3
+ export interface LinkButtonAllCapsWithComponentProps extends AllCapsVariant {
4
+ component: ElementType;
5
+ href?: string;
6
+ }
7
+ export interface LinkButtonWithComponentProps extends BaseVariants {
8
+ component: ElementType;
9
+ href?: string;
10
+ }
11
+ export interface LinkButtonAllCapsWithoutComponentProps extends AllCapsVariant {
12
+ component?: never;
13
+ href: string;
14
+ }
15
+ export interface LinkButtonWithoutComponentProps extends BaseVariants {
16
+ component?: never;
17
+ href: string;
18
+ }
19
+ export type LinkButtonProps = LinkButtonAllCapsWithComponentProps | LinkButtonWithComponentProps | LinkButtonAllCapsWithoutComponentProps | LinkButtonWithoutComponentProps;
20
+ export declare const LinkButtonComponent: ({ className, children, component, icon, iconPosition, variant, size, ...rest }: LinkButtonProps, ref: ForwardedRef<HTMLAnchorElement>) => JSX.Element;
21
+ /**
22
+ * The **LinkButton** is used to display a Button as a Link.
23
+ *
24
+ * Accepts {@link LinkButtonProps}.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * import { LinkButton } from '@youversion/design-system-components';
29
+ * import { TriangleDownStroked } from '@youversion/design-system-icons/index';
30
+ *
31
+ * function MyComponent() {
32
+ * return (
33
+ * <>
34
+ * <LinkButton href="https://www.bible.com" >Press Me!</LinkButton>
35
+ * <LinkButton href="https://www.bible.com" icon={TriangleDownStroked} iconPosition='start' size='md' variant='secondary' >Press Me Too!</LinkButton>
36
+ * </>
37
+ * )
38
+ * }
39
+ * ```
40
+ */
41
+ export declare const LinkButton: import("react").ForwardRefExoticComponent<LinkButtonProps & import("react").RefAttributes<HTMLAnchorElement>>;
42
+ //# sourceMappingURL=LinkButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkButton.d.ts","sourceRoot":"","sources":["../../../src/LinkButton/LinkButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,WAAW,EAAE,YAAY,EAAc,MAAM,OAAO,CAAC;AAE7E,OAAO,EACL,cAAc,EACd,YAAY,EAKb,MAAM,WAAW,CAAC;AAMnB,MAAM,WAAW,mCAAoC,SAAQ,cAAc;IACzE,SAAS,EAAE,WAAW,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,4BAA6B,SAAQ,YAAY;IAChE,SAAS,EAAE,WAAW,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,sCAAuC,SAAQ,cAAc;IAC5E,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,+BAAgC,SAAQ,YAAY;IACnE,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,eAAe,GACvB,mCAAmC,GACnC,4BAA4B,GAC5B,sCAAsC,GACtC,+BAA+B,CAAC;AAEpC,eAAO,MAAM,mBAAmB,mFAU3B,eAAe,OACb,aAAa,iBAAiB,CAAC,gBAiCrC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,UAAU,+GAAkC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './LinkButton';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/LinkButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export interface ListProps extends HTMLAttributes<HTMLUListElement> {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ }
6
+ /**
7
+ * The **List** component is the wrapper for the **ListItem** components.
8
+ *
9
+ * Accepts {@link ListProps}.
10
+ *
11
+ * @returns Renders a List.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * import { List, ListItem, ListItemText } from '@youversion/design-system-components';
16
+ *
17
+ * function MyComponent() {
18
+ * return (
19
+ * <List>
20
+ * <ListItem>
21
+ * <ListItemText>Item One</ListItemText>
22
+ * </ListItem>
23
+ * <ListItem>
24
+ * <ListItemText>Item Two</ListItemText>
25
+ * </ListItem>
26
+ * </List>
27
+ * )
28
+ * }
29
+ * ```
30
+ */
31
+ export declare const List: import("react").ForwardRefExoticComponent<ListProps & import("react").RefAttributes<HTMLUListElement>>;
32
+ //# sourceMappingURL=List.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/List/List.tsx"],"names":[],"mappings":"AACA,OAAO,EAA4B,cAAc,EAAE,MAAM,OAAO,CAAC;AAEjE,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,gBAAgB,CAAC;IACjE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAiBD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,IAAI,wGAA4B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './List';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/List/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,58 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ interface StartIconWithActionProps {
3
+ /** Action to take when clicking the startIcon. */
4
+ startAction: () => void;
5
+ startIcon: React.ReactNode;
6
+ }
7
+ interface StartIconWithOutActionProps {
8
+ startAction?: never;
9
+ startIcon?: React.ReactNode;
10
+ }
11
+ interface EndIconWithActionProps {
12
+ /** Action to take when clicking the endIcon. */
13
+ endAction: () => void;
14
+ endIcon: React.ReactNode;
15
+ }
16
+ interface EndIconWithoutActionProps {
17
+ endAction?: never;
18
+ endIcon?: React.ReactNode;
19
+ }
20
+ type StartIconAndActionProps = StartIconWithActionProps | StartIconWithOutActionProps;
21
+ type EndIconAndActionProps = EndIconWithActionProps | EndIconWithoutActionProps;
22
+ type AllIconAndActionProps = StartIconAndActionProps & EndIconAndActionProps;
23
+ interface ListItemPropsBase extends HTMLAttributes<HTMLLIElement> {
24
+ children: React.ReactNode;
25
+ className?: string;
26
+ /** Display a divider between ListItems. */
27
+ divider?: boolean;
28
+ onClick?: () => void;
29
+ }
30
+ export type ListItemProps = ListItemPropsBase & AllIconAndActionProps;
31
+ /**
32
+ * The **ListItem** component is to be used inside of the **List** component. This will be each item inside the list.
33
+ *
34
+ * Accepts {@link ListItemProps}.
35
+ *
36
+ * @returns Renders a ListItem.
37
+ *
38
+ * @example
39
+ * ```tsx
40
+ * import { List, ListItem, ListItemText } from '@youversion/design-system-components';
41
+ *
42
+ * function MyComponent() {
43
+ * return (
44
+ * <List>
45
+ * <ListItem>
46
+ * <ListItemText>Item One</ListItemText>
47
+ * </ListItem>
48
+ * <ListItem>
49
+ * <ListItemText>Item Two</ListItemText>
50
+ * </ListItem>
51
+ * </List>
52
+ * )
53
+ * }
54
+ * ```
55
+ */
56
+ export declare const ListItem: React.ForwardRefExoticComponent<ListItemProps & React.RefAttributes<HTMLLIElement>>;
57
+ export {};
58
+ //# sourceMappingURL=ListItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../src/ListItem/ListItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAA4B,cAAc,EAAE,MAAM,OAAO,CAAC;AAIxE,UAAU,wBAAwB;IAChC,kDAAkD;IAClD,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,UAAU,2BAA2B;IACnC,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,UAAU,sBAAsB;IAC9B,gDAAgD;IAChD,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED,UAAU,yBAAyB;IACjC,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,KAAK,uBAAuB,GAAG,wBAAwB,GAAG,2BAA2B,CAAC;AACtF,KAAK,qBAAqB,GAAG,sBAAsB,GAAG,yBAAyB,CAAC;AAChF,KAAK,qBAAqB,GAAG,uBAAuB,GAAG,qBAAqB,CAAC;AAE7E,UAAU,iBAAkB,SAAQ,cAAc,CAAC,aAAa,CAAC;IAC/D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,qBAAqB,CAAC;AA6CtE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,QAAQ,qFAAgC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './ListItem';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ListItem/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { LabelVariant } from '../Typography/Typography';
2
+ export interface ListItemContentProps {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ size?: LabelVariant['size'];
6
+ }
7
+ /**
8
+ * The **ListItemText** component is to be used inside of the **ListItem** component. This is the text rendered for
9
+ * each list item.
10
+ *
11
+ * Accepts {@link ListItemContentProps}.
12
+ *
13
+ * @returns Renders the text for a ListItem.
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * import { List, ListItem, ListItemText } from '@youversion/design-system-components';
18
+ *
19
+ * function MyComponent() {
20
+ * return (
21
+ * <List>
22
+ * <ListItem>
23
+ * <ListItemText>Item One</ListItemText>
24
+ * </ListItem>
25
+ * <ListItem>
26
+ * <ListItemText>Item Two</ListItemText>
27
+ * </ListItem>
28
+ * </List>
29
+ * )
30
+ * }
31
+ * ```
32
+ */
33
+ export declare const ListItemText: ({ children, className, size }: ListItemContentProps) => JSX.Element;
34
+ //# sourceMappingURL=ListItemText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListItemText.d.ts","sourceRoot":"","sources":["../../../src/ListItemText/ListItemText.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,YAAY,kCAA0C,oBAAoB,gBAMtF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './ListItemText';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ListItemText/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { ClassValue } from 'clsx';
2
+ import { AllHTMLAttributes } from 'react';
3
+ export interface TooltipProps extends Omit<AllHTMLAttributes<HTMLDivElement>, 'className'> {
4
+ /** Adds additional className styles to tooltip wrapper. */
5
+ className?: ClassValue;
6
+ /** Text content to display within the tooltip. */
7
+ content: string;
8
+ }
9
+ /**
10
+ * The **Tooltip** component is used to tell the user some imformation.
11
+ *
12
+ * @param content - The information to render to the user.
13
+ * @returns Renders the text that is passed in to the `content` prop.
14
+ * @example
15
+ * ```typescriptreact
16
+ * import { Tooltip } from '@youversion/design-system-components';
17
+ *
18
+ * function MyComponent() {
19
+ * return (
20
+ * <>
21
+ * <Tooltip content='This is some information you should know' />
22
+ * <Tooltip
23
+ * content='Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.
24
+ * Comm sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean
25
+ * lacinia bibendum nulla sed consectetur. Integer posuere erat a ante venenatis dapibus posuere
26
+ * velit aliquet'
27
+ * />
28
+ * </>
29
+ * )
30
+ * }
31
+ * ```
32
+ */
33
+ export declare const Tooltip: ({ content, className, ...rest }: TooltipProps) => JSX.Element;
34
+ //# sourceMappingURL=Tooltip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAa,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI1C,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE,WAAW,CAAC;IACxF,2DAA2D;IAC3D,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;CACjB;AACD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,OAAO,oCAAqC,YAAY,gBAMpE,CAAC"}
@@ -0,0 +1,6 @@
1
+ declare const styles: {
2
+ readonly "tooltipWrapper": string;
3
+ readonly "tooltipContent": string;
4
+ };
5
+ export = styles;
6
+
@@ -0,0 +1,2 @@
1
+ export * from './Tooltip';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Tooltip/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { TypographyProps } from '../Typography';
2
+ declare const resolveHeadingLevel: {
3
+ readonly 1: "h1";
4
+ readonly 2: "h2";
5
+ readonly 3: "h3";
6
+ readonly 4: "h4";
7
+ };
8
+ export interface HeadingProps extends Omit<TypographyProps, 'component'> {
9
+ level?: keyof typeof resolveHeadingLevel;
10
+ }
11
+ /**
12
+ * Heading is the used to render headings within an interface. The Heading component renders as a **h1** tag by default. Other heading levels can be passed through the **level** prop.
13
+ *
14
+ * @param level - The heading tag to render to the interface. (e.g. `level={2}` renders an `h2`).
15
+ * @param variant - Predefined variants that are used throughout YV applications.
16
+ * @param size - Each `variant` has predefined sizes.
17
+ * @returns Renders a `heading` element.
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * import { Heading } from '@youversion/design-system-components';
22
+ *
23
+ * function MyComponent() {
24
+ * return <Heading level={1} size='xs' variant='headline' />;
25
+ * }
26
+ * ```
27
+ */
28
+ export declare const Heading: import("react").ForwardRefExoticComponent<HeadingProps & import("react").RefAttributes<HTMLElement>>;
29
+ export {};
30
+ //# sourceMappingURL=Heading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../../src/Typography/Heading/Heading.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGhD,QAAA,MAAM,mBAAmB;;;;;CAKf,CAAC;AAEX,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,eAAe,EAAE,WAAW,CAAC;IACtE,KAAK,CAAC,EAAE,MAAM,OAAO,mBAAmB,CAAC;CAC1C;AAwBD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,OAAO,sGAA+B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Heading';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Typography/Heading/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}