@youversion/design-system-components 0.0.2 → 0.0.4

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 (67) hide show
  1. package/CHANGELOG.md +19 -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 +62 -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/List/List.d.ts +32 -0
  23. package/dist/List/List.d.ts.map +1 -0
  24. package/dist/List/index.d.ts +2 -0
  25. package/dist/List/index.d.ts.map +1 -0
  26. package/dist/ListItem/ListItem.d.ts +35 -0
  27. package/dist/ListItem/ListItem.d.ts.map +1 -0
  28. package/dist/ListItem/index.d.ts +2 -0
  29. package/dist/ListItem/index.d.ts.map +1 -0
  30. package/dist/ListItemText/ListItemText.d.ts +34 -0
  31. package/dist/ListItemText/ListItemText.d.ts.map +1 -0
  32. package/dist/ListItemText/index.d.ts +2 -0
  33. package/dist/ListItemText/index.d.ts.map +1 -0
  34. package/dist/Tooltip/Tooltip.d.ts +34 -0
  35. package/dist/Tooltip/Tooltip.d.ts.map +1 -0
  36. package/dist/Tooltip/Tooltip.module.css.d.ts +6 -0
  37. package/dist/Tooltip/index.d.ts +2 -0
  38. package/dist/Tooltip/index.d.ts.map +1 -0
  39. package/dist/Typography/Heading/Heading.d.ts +30 -0
  40. package/dist/Typography/Heading/Heading.d.ts.map +1 -0
  41. package/dist/Typography/Heading/index.d.ts +2 -0
  42. package/dist/Typography/Heading/index.d.ts.map +1 -0
  43. package/dist/Typography/Text/Text.d.ts +19 -0
  44. package/dist/Typography/Text/Text.d.ts.map +1 -0
  45. package/dist/Typography/Text/index.d.ts +2 -0
  46. package/dist/Typography/Text/index.d.ts.map +1 -0
  47. package/dist/Typography/Typography.d.ts +44 -0
  48. package/dist/Typography/Typography.d.ts.map +1 -0
  49. package/dist/Typography/Variants.d.ts +5 -0
  50. package/dist/Typography/Variants.d.ts.map +1 -0
  51. package/dist/Typography/index.d.ts +3 -0
  52. package/dist/Typography/index.d.ts.map +1 -0
  53. package/dist/hooks/index.d.ts +2 -0
  54. package/dist/hooks/index.d.ts.map +1 -0
  55. package/dist/hooks/useCombinedRefs.d.ts +33 -0
  56. package/dist/hooks/useCombinedRefs.d.ts.map +1 -0
  57. package/dist/index.d.ts +10 -0
  58. package/dist/index.d.ts.map +1 -0
  59. package/dist/index.es.js +448 -403
  60. package/dist/index.umd.js +10 -10
  61. package/dist/utils/get-resolved-dark-mode-value.d.ts +25 -0
  62. package/dist/utils/get-resolved-dark-mode-value.d.ts.map +1 -0
  63. package/dist/utils/get-resolved-logical-property.d.ts +25 -0
  64. package/dist/utils/get-resolved-logical-property.d.ts.map +1 -0
  65. package/dist/utils/tailwind-types.d.ts +29 -0
  66. package/dist/utils/tailwind-types.d.ts.map +1 -0
  67. package/package.json +5 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @youversion/design-system-components
2
2
 
3
+ ## 0.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 1883446: Update `Button` component.
8
+
9
+ - Exported the component to the main index export.
10
+ - Set default values for variant and theme.
11
+ - Used new storybook helpers for `Button` stories.
12
+ - Added displayName for `Button`.
13
+ - Inferred variant and theme for `Button` stories.
14
+
15
+ ## 0.0.3
16
+
17
+ ### Patch Changes
18
+
19
+ - d1c7fb7: update typescript exports and expose global & reset css files
20
+ - fdb7b2b: Added `Button` Component
21
+
3
22
  ## 0.0.2
4
23
 
5
24
  ### 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,62 @@
1
+ import { ElementType } from 'react';
2
+ import { AllHTMLAttributes, ForwardedRef } from 'react';
3
+ export declare const variantClasses: {
4
+ lg: string;
5
+ md: string;
6
+ sm: string;
7
+ xl: string;
8
+ xs: string;
9
+ };
10
+ export declare const themeClasses: {
11
+ all_caps: string;
12
+ borderless: string;
13
+ brand: string;
14
+ primary: string;
15
+ risk: string;
16
+ secondary: string;
17
+ stroked: string;
18
+ };
19
+ export interface BaseButtonProps extends Omit<AllHTMLAttributes<HTMLButtonElement>, 'size'> {
20
+ children: React.ReactNode;
21
+ icon?: ElementType;
22
+ iconPosition?: 'start' | 'end';
23
+ type?: 'button' | 'submit' | 'reset';
24
+ }
25
+ export interface BaseVariants extends BaseButtonProps {
26
+ theme: 'secondary' | 'primary' | 'stroked' | 'borderless' | 'risk' | 'brand';
27
+ variant: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
28
+ }
29
+ export interface AllCapsVariant extends BaseButtonProps {
30
+ theme: 'all_caps';
31
+ variant: 'xs' | 'sm' | 'md';
32
+ }
33
+ export type ButtonProps = BaseVariants | AllCapsVariant;
34
+ /**
35
+ * The **Button** component is used to generate a button.
36
+ *
37
+ * @param children - Content of the Button.
38
+ * @param icon - An Icon Element.
39
+ * @param iconPosition - If and Where the Icon will be placed.
40
+ * @param theme - The look of the button.
41
+ * @param variant - The size of the button.
42
+ *
43
+ * @returns A Button with content and styling.
44
+ *
45
+ * @example
46
+ * ```tsx
47
+ * import { Button } from '@youversion/design-system-components';
48
+ * import { TriangleDownStroked } from '@youversion/design-system-icons/index';
49
+ *
50
+ * function MyComponent() {
51
+ * return (
52
+ * <>
53
+ * <Button variant='sm' theme='primary' >Press Me!</Button>
54
+ * <Button icon={TriangleDownStroked} iconPosition='start' size='md' variant='secondary' >Press Me Too!</Button>
55
+ * </>
56
+ * )
57
+ * }
58
+ * ```
59
+ */
60
+ export declare const ButtonComponent: ({ className, children, disabled, icon, iconPosition, variant, theme, ...rest }: ButtonProps, ref: ForwardedRef<HTMLButtonElement>) => JSX.Element;
61
+ export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
62
+ //# 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,eAAO,MAAM,cAAc;;;;;;CAM1B,CAAC;AAUF,eAAO,MAAM,YAAY;;;;;;;;CAexB,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,OAAO,GAAG,KAAK,CAAC;IAC/B,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;CACtC;AAED,MAAM,WAAW,YAAa,SAAQ,eAAe;IACnD,KAAK,EAAE,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;IAC7E,OAAO,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3C;AAED,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,cAAc,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,eAAO,MAAM,eAAe,mFACyE,WAAW,OACzG,aAAa,iBAAiB,CAAC,gBA+BrC,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,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,35 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ export interface ListItemProps extends HTMLAttributes<HTMLLIElement> {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ divider?: boolean;
6
+ endIcon?: React.ReactNode;
7
+ startIcon?: React.ReactNode;
8
+ }
9
+ /**
10
+ * The **ListItem** component is to be used inside of the **List** component. This will be each item inside the list.
11
+ *
12
+ * Accepts {@link ListItemProps}.
13
+ *
14
+ * @returns Renders a ListItem.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * import { List, ListItem, ListItemText } from '@youversion/design-system-components';
19
+ *
20
+ * function MyComponent() {
21
+ * return (
22
+ * <List>
23
+ * <ListItem>
24
+ * <ListItemText>Item One</ListItemText>
25
+ * </ListItem>
26
+ * <ListItem>
27
+ * <ListItemText>Item Two</ListItemText>
28
+ * </ListItem>
29
+ * </List>
30
+ * )
31
+ * }
32
+ * ```
33
+ */
34
+ export declare const ListItem: React.ForwardRefExoticComponent<ListItemProps & React.RefAttributes<HTMLLIElement>>;
35
+ //# 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;AAExE,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,aAAa,CAAC;IAClE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AA2BD;;;;;;;;;;;;;;;;;;;;;;;;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":"AAGA,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"}
@@ -0,0 +1,19 @@
1
+ import { TypographyProps } from '../Typography';
2
+ /**
3
+ * Text is the used to render text and paragraphs within an interface. Text component renders as a **paragraph** tag by default. Other elements can be passed in through the **component** prop.
4
+ *
5
+ * @param variant - Predefined variants that are used throughout YV applications.
6
+ * @param size - Each `variant` has predefined sizes.
7
+ * @returns Renders a `paragraph` element.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * import { Text } from '@youversion/design-system-components';
12
+ *
13
+ * function MyComponent() {
14
+ * return <Text component='span' size='xs' variant='headline' />;
15
+ * }
16
+ * ```
17
+ */
18
+ export declare const Text: import("react").ForwardRefExoticComponent<TypographyProps & import("react").RefAttributes<HTMLElement>>;
19
+ //# sourceMappingURL=Text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../src/Typography/Text/Text.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAyBhD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,IAAI,yGAA4B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Text';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Typography/Text/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { BoxProps } from '../index';
2
+ export type FontOptions = 'primary' | 'secondary';
3
+ interface BaseTextProps extends Omit<BoxProps, 'size'> {
4
+ font?: FontOptions;
5
+ }
6
+ export interface NoneVariant extends BaseTextProps {
7
+ size?: never;
8
+ variant?: never;
9
+ }
10
+ export interface HeadlineVariant extends BaseTextProps {
11
+ size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
12
+ variant: 'headline';
13
+ }
14
+ export interface LabelVariant extends BaseTextProps {
15
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
16
+ variant: 'label';
17
+ }
18
+ export interface ParagraphVariant extends BaseTextProps {
19
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
20
+ variant: 'paragraph';
21
+ }
22
+ export interface EyebrowVariant extends BaseTextProps {
23
+ size: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
24
+ variant: 'eyebrow';
25
+ }
26
+ export interface CaptionVariant extends BaseTextProps {
27
+ size: 'sm' | 'md' | 'lg';
28
+ variant: 'caption';
29
+ }
30
+ export interface ButtonLabelVariant extends BaseTextProps {
31
+ size: 'xs' | 'sm' | 'md' | 'lg';
32
+ variant: 'buttonLabel';
33
+ }
34
+ export interface FieldLabelVariant extends BaseTextProps {
35
+ size: 'sm' | 'md' | 'lg';
36
+ variant: 'fieldLabel';
37
+ }
38
+ export interface FieldTextInputVariant extends BaseTextProps {
39
+ size: 'md' | 'lg';
40
+ variant: 'fieldTextInput';
41
+ }
42
+ export type TypographyProps = HeadlineVariant | EyebrowVariant | CaptionVariant | ButtonLabelVariant | FieldLabelVariant | FieldTextInputVariant | NoneVariant | LabelVariant | ParagraphVariant;
43
+ export {};
44
+ //# sourceMappingURL=Typography.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../../src/Typography/Typography.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,WAAW,CAAC;AAElD,UAAU,aAAc,SAAQ,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC;IACpD,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAED,MAAM,WAAW,WAAY,SAAQ,aAAa;IAChD,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB;AAED,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IAC/C,OAAO,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,WAAW,YAAa,SAAQ,aAAa;IACjD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACxC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACxC,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,cAAe,SAAQ,aAAa;IACnD,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACvC,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,WAAW,cAAe,SAAQ,aAAa;IACnD,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,WAAW,kBAAmB,SAAQ,aAAa;IACvD,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAChC,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,WAAW,qBAAsB,SAAQ,aAAa;IAC1D,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,MAAM,eAAe,GACvB,eAAe,GACf,cAAc,GACd,cAAc,GACd,kBAAkB,GAClB,iBAAiB,GACjB,qBAAqB,GACrB,WAAW,GACX,YAAY,GACZ,gBAAgB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { ClassValue } from 'clsx';
2
+ import { FontOptions, TypographyProps } from './Typography';
3
+ export declare const getFontVariantStyles: ({ size, variant }: TypographyProps) => string | undefined;
4
+ export declare const fontOptionStyles: Record<FontOptions, ClassValue>;
5
+ //# sourceMappingURL=Variants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Variants.d.ts","sourceRoot":"","sources":["../../../src/Typography/Variants.ts"],"names":[],"mappings":"AAEA,OAAa,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAExC,OAAO,EAML,WAAW,EAIX,eAAe,EAChB,MAAM,cAAc,CAAC;AAuEtB,eAAO,MAAM,oBAAoB,sBAAuB,eAAe,uBAqBtE,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,WAAW,EAAE,UAAU,CAG5D,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './Heading';
2
+ export * from './Text';
3
+ //# sourceMappingURL=index.d.ts.map