@youversion/design-system-components 0.26.0 → 0.28.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 (86) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/index.es.js +2552 -2406
  3. package/dist/index.umd.js +3 -3
  4. package/dist/src/Button/Button.d.ts +4 -2
  5. package/dist/src/Button/Button.d.ts.map +1 -1
  6. package/dist/src/Button/Button.stories.d.ts +3 -0
  7. package/dist/src/Button/Button.stories.d.ts.map +1 -1
  8. package/dist/src/ColorSelect/ColorSelect.d.ts +28 -0
  9. package/dist/src/ColorSelect/ColorSelect.d.ts.map +1 -0
  10. package/dist/src/ColorSelect/ColorSelect.stories.d.ts +7 -0
  11. package/dist/src/ColorSelect/ColorSelect.stories.d.ts.map +1 -0
  12. package/dist/src/ColorSelect/index.d.ts +2 -0
  13. package/dist/src/ColorSelect/index.d.ts.map +1 -0
  14. package/dist/src/EditableWell/EditableWell.d.ts +55 -0
  15. package/dist/src/EditableWell/EditableWell.d.ts.map +1 -0
  16. package/dist/src/EditableWell/EditableWell.stories.d.ts +5 -0
  17. package/dist/src/EditableWell/EditableWell.stories.d.ts.map +1 -0
  18. package/dist/src/EditableWell/index.d.ts +2 -0
  19. package/dist/src/EditableWell/index.d.ts.map +1 -0
  20. package/dist/src/FauxPhone/FauxPhone.d.ts +25 -0
  21. package/dist/src/FauxPhone/FauxPhone.d.ts.map +1 -0
  22. package/dist/src/FauxPhone/FauxPhone.stories.d.ts +8 -0
  23. package/dist/src/FauxPhone/FauxPhone.stories.d.ts.map +1 -0
  24. package/dist/src/FauxPhone/index.d.ts +2 -0
  25. package/dist/src/FauxPhone/index.d.ts.map +1 -0
  26. package/dist/src/FeatureWell/FeatureWell.d.ts +29 -0
  27. package/dist/src/FeatureWell/FeatureWell.d.ts.map +1 -0
  28. package/dist/src/FeatureWell/FeatureWell.stories.d.ts +8 -0
  29. package/dist/src/FeatureWell/FeatureWell.stories.d.ts.map +1 -0
  30. package/dist/src/FeatureWell/FeatureWellButton.d.ts +31 -0
  31. package/dist/src/FeatureWell/FeatureWellButton.d.ts.map +1 -0
  32. package/dist/src/FeatureWell/FeatureWellColumn.d.ts +30 -0
  33. package/dist/src/FeatureWell/FeatureWellColumn.d.ts.map +1 -0
  34. package/dist/src/FeatureWell/FeatureWellImage.d.ts +28 -0
  35. package/dist/src/FeatureWell/FeatureWellImage.d.ts.map +1 -0
  36. package/dist/src/FeatureWell/FeatureWellText.d.ts +31 -0
  37. package/dist/src/FeatureWell/FeatureWellText.d.ts.map +1 -0
  38. package/dist/src/FeatureWell/index.d.ts +6 -0
  39. package/dist/src/FeatureWell/index.d.ts.map +1 -0
  40. package/dist/src/Grid/Column.d.ts +17 -0
  41. package/dist/src/Grid/Column.d.ts.map +1 -0
  42. package/dist/src/Grid/Grid.d.ts +38 -0
  43. package/dist/src/Grid/Grid.d.ts.map +1 -0
  44. package/dist/src/Grid/Grid.stories.d.ts +4 -0
  45. package/dist/src/Grid/Grid.stories.d.ts.map +1 -0
  46. package/dist/src/Grid/Row.d.ts +12 -0
  47. package/dist/src/Grid/Row.d.ts.map +1 -0
  48. package/dist/src/Grid/index.d.ts +4 -0
  49. package/dist/src/Grid/index.d.ts.map +1 -0
  50. package/dist/src/IconButton/IconButton.d.ts +2 -0
  51. package/dist/src/IconButton/IconButton.d.ts.map +1 -1
  52. package/dist/src/IconButton/IconButton.stories.d.ts +3 -0
  53. package/dist/src/IconButton/IconButton.stories.d.ts.map +1 -1
  54. package/dist/src/PopoverBody/PopoverBody.d.ts +1 -1
  55. package/dist/src/PopoverBody/PopoverBody.d.ts.map +1 -1
  56. package/dist/src/SearchableSelect/SearchableSelect.d.ts +33 -0
  57. package/dist/src/SearchableSelect/SearchableSelect.d.ts.map +1 -0
  58. package/dist/src/SearchableSelect/SearchableSelect.stories.d.ts +6 -0
  59. package/dist/src/SearchableSelect/SearchableSelect.stories.d.ts.map +1 -0
  60. package/dist/src/SearchableSelect/index.d.ts +2 -0
  61. package/dist/src/SearchableSelect/index.d.ts.map +1 -0
  62. package/dist/src/TextArea/TextArea.d.ts +43 -0
  63. package/dist/src/TextArea/TextArea.d.ts.map +1 -0
  64. package/dist/src/TextArea/TextArea.stories.d.ts +12 -0
  65. package/dist/src/TextArea/TextArea.stories.d.ts.map +1 -0
  66. package/dist/src/TextArea/index.d.ts +2 -0
  67. package/dist/src/TextArea/index.d.ts.map +1 -0
  68. package/dist/src/Toast/Toast.d.ts +20 -0
  69. package/dist/src/Toast/Toast.d.ts.map +1 -0
  70. package/dist/src/Toast/Toast.stories.d.ts +14 -0
  71. package/dist/src/Toast/Toast.stories.d.ts.map +1 -0
  72. package/dist/src/Toast/index.d.ts +2 -0
  73. package/dist/src/Toast/index.d.ts.map +1 -0
  74. package/dist/src/context/Toast/Toast.d.ts +7 -0
  75. package/dist/src/context/Toast/Toast.d.ts.map +1 -0
  76. package/dist/src/context/Toast/Toast.stories.d.ts +8 -0
  77. package/dist/src/context/Toast/Toast.stories.d.ts.map +1 -0
  78. package/dist/src/context/Toast/Toast.types.d.ts +57 -0
  79. package/dist/src/context/Toast/Toast.types.d.ts.map +1 -0
  80. package/dist/src/hooks/index.d.ts +1 -0
  81. package/dist/src/hooks/index.d.ts.map +1 -1
  82. package/dist/src/hooks/useOnClickOutside.d.ts +32 -0
  83. package/dist/src/hooks/useOnClickOutside.d.ts.map +1 -0
  84. package/dist/src/index.d.ts +7 -0
  85. package/dist/src/index.d.ts.map +1 -1
  86. package/package.json +2 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchableSelect.d.ts","sourceRoot":"","sources":["../../../src/SearchableSelect/SearchableSelect.tsx"],"names":[],"mappings":";AASA,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,MAAM,WAAW,qBACf,SAAQ,IAAI,CACV,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,OAAO,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAC/E;IACD,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,aAAa,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,yCAAyC;IACzC,QAAQ,EAAE,CAAC,SAAS,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACtD,6CAA6C;IAC7C,OAAO,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACvC,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC,gBAAgB,CAAC,GAAG;IAC5D,iCAAiC;IACjC,cAAc,EAAE,YAAY,CAAC;CAC9B,CAAC;AAoHF,eAAO,MAAM,gBAAgB,uHAAwC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { StoryFn } from '@storybook/react';
2
+ import { SearchableSelect } from './SearchableSelect';
3
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./SearchableSelect").SearchableSelectProps & import("react").RefAttributes<import("./SearchableSelect").SearchableSelectRef>>;
4
+ export default _default;
5
+ export declare const Story: StoryFn<typeof SearchableSelect>;
6
+ //# sourceMappingURL=SearchableSelect.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchableSelect.stories.d.ts","sourceRoot":"","sources":["../../../src/SearchableSelect/SearchableSelect.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EAAE,gBAAgB,EAA0B,MAAM,oBAAoB,CAAC;;AAE9E,wBAGmC;AAUnC,eAAO,MAAM,KAAK,EAAE,OAAO,CAAC,OAAO,gBAAgB,CAclD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './SearchableSelect';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/SearchableSelect/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,43 @@
1
+ /// <reference types="react" />
2
+ export interface TextAreaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
3
+ /** A class that can be passed in to the TextArea. */
4
+ className?: string;
5
+ /** Prevent the user from resizing the TextArea. */
6
+ disableResize?: boolean;
7
+ /** Disables the TextArea, also applies disabled styling. */
8
+ disabled?: boolean;
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 TextArea. */
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<HTMLTextAreaElement>;
19
+ /** Placeholder to display. */
20
+ placeholder?: string;
21
+ }
22
+ /**
23
+ * The **TextArea** component is used to allow the user to enter multiline text into a form.
24
+ *
25
+ * Accepts {@link TextAreaProps}.
26
+ *
27
+ * @returns Renders the TextArea field to be used in a form.
28
+ *
29
+ * @example
30
+ * ```tsx
31
+ * import { TextArea } from '@youversion/design-system-components';
32
+ *
33
+ * function MyComponent() {
34
+ * return (
35
+ * <>
36
+ * <TextArea name='firstName' label='First Name' />
37
+ * </>
38
+ * )
39
+ * }
40
+ * ```
41
+ */
42
+ export declare const TextArea: import("react").ForwardRefExoticComponent<TextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
43
+ //# sourceMappingURL=TextArea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../src/TextArea/TextArea.tsx"],"names":[],"mappings":";AAMA,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC;IACtF,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IACzD,8BAA8B;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AA8FD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,QAAQ,+GAAgC,CAAC"}
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./TextArea").TextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
3
+ export default _default;
4
+ export declare const Uncontrolled: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./TextArea").TextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
5
+ export declare const UncontrolledPlaceholder: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./TextArea").TextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
6
+ export declare const Controlled: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./TextArea").TextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
7
+ export declare const ControlledPlaceholder: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./TextArea").TextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
8
+ export declare const Disabled: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./TextArea").TextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
9
+ export declare const WithHint: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./TextArea").TextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
10
+ export declare const WithError: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./TextArea").TextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
11
+ export declare const WithErrorAndHint: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./TextArea").TextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
12
+ //# sourceMappingURL=TextArea.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextArea.stories.d.ts","sourceRoot":"","sources":["../../../src/TextArea/TextArea.stories.tsx"],"names":[],"mappings":";;AAKA,wBAgB2B;AAuB3B,eAAO,MAAM,YAAY,wLAAoB,CAAC;AAG9C,eAAO,MAAM,uBAAuB,wLAAoB,CAAC;AAGzD,eAAO,MAAM,UAAU,wLAAoB,CAAC;AAG5C,eAAO,MAAM,qBAAqB,wLAAoB,CAAC;AAOvD,eAAO,MAAM,QAAQ,wLAAoB,CAAC;AAG1C,eAAO,MAAM,QAAQ,wLAAoB,CAAC;AAG1C,eAAO,MAAM,SAAS,wLAAoB,CAAC;AAG3C,eAAO,MAAM,gBAAgB,wLAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './TextArea';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/TextArea/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { AllHTMLAttributes, FC, PropsWithChildren } from 'react';
2
+ type ToastPosition = 'inlineEnd' | 'inlineStart';
3
+ type ToastVariant = 'success' | 'error' | 'info' | 'caution' | 'default';
4
+ export interface ToastProps extends Omit<AllHTMLAttributes<HTMLDivElement>, 'width' | 'height' | 'className'> {
5
+ /** May add styles around the wrapper div of this component */
6
+ className?: string;
7
+ /** Callback that is is loaded when the noitfication timesout of the dismiss button is clicked. */
8
+ dismiss?: () => void;
9
+ /** If set, the toast will timeout automatically in milliseconds */
10
+ duration?: number;
11
+ /** If this prop is added as `true` this will hide the dismiss button, so a user will be unable to dismiss the toast. */
12
+ hideDismissButton?: boolean;
13
+ /** Sets the direction the toast animates in from `inlineEnd` or `inlineStart`. Defaults to inlineEnd. */
14
+ position?: ToastPosition;
15
+ /** Sets the toast color. `error`, `success`, `info`, amd `default`. */
16
+ variant?: ToastVariant;
17
+ }
18
+ export declare const Toast: FC<PropsWithChildren<ToastProps>>;
19
+ export {};
20
+ //# sourceMappingURL=Toast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/Toast/Toast.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,EAAE,EAAE,iBAAiB,EAAwC,MAAM,OAAO,CAAC;AAIvG,KAAK,aAAa,GAAG,WAAW,GAAG,aAAa,CAAC;AAEjD,KAAK,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;AAiBzE,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,WAAW,CAAC;IAC3G,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kGAAkG;IAClG,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wHAAwH;IACxH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,yGAAyG;IACzG,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,uEAAuE;IACvE,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC,UAAU,CAAC,CA+EnD,CAAC"}
@@ -0,0 +1,14 @@
1
+ declare const _default: {
2
+ component: import("react").FC<import("react").PropsWithChildren<import("./Toast").ToastProps>>;
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const StandardToast: () => JSX.Element;
7
+ export declare const ErrorLeftToast: () => JSX.Element;
8
+ export declare const SuccessRightToast: () => JSX.Element;
9
+ export declare const InfoRightToast: () => JSX.Element;
10
+ export declare const CautionRightToast: () => JSX.Element;
11
+ export declare const TimeoutLongToast: () => JSX.Element;
12
+ export declare const NoDismissToast: () => JSX.Element;
13
+ export declare const MultipleToasts: () => JSX.Element;
14
+ //# sourceMappingURL=Toast.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast.stories.d.ts","sourceRoot":"","sources":["../../../src/Toast/Toast.stories.tsx"],"names":[],"mappings":";;;;AAEA,wBAGE;AAEF,eAAO,MAAM,aAAa,mBAEzB,CAAC;AAEF,eAAO,MAAM,cAAc,mBAM1B,CAAC;AAEF,eAAO,MAAM,iBAAiB,mBAM7B,CAAC;AAEF,eAAO,MAAM,cAAc,mBAM1B,CAAC;AAEF,eAAO,MAAM,iBAAiB,mBAM7B,CAAC;AAEF,eAAO,MAAM,gBAAgB,mBAW5B,CAAC;AAEF,eAAO,MAAM,cAAc,mBAM1B,CAAC;AAEF,eAAO,MAAM,cAAc,mBAU1B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Toast } from './Toast';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { ToastContextType, ToastProviderType } from './Toast.types';
3
+ declare const ToastContext: import("react").Context<ToastContextType>;
4
+ declare const ToastProvider: FC<PropsWithChildren<ToastProviderType>>;
5
+ declare function useToast(): ToastContextType;
6
+ export { ToastContext, ToastProvider, useToast };
7
+ //# sourceMappingURL=Toast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../src/context/Toast/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,EAAE,EACF,iBAAiB,EAOlB,MAAM,OAAO,CAAC;AAGf,OAAO,EAKL,gBAAgB,EAChB,iBAAiB,EAElB,MAAM,eAAe,CAAC;AAIvB,QAAA,MAAM,YAAY,2CAKhB,CAAC;AAmEH,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAqD3D,CAAC;AAEF,iBAAS,QAAQ,qBAEhB;AAED,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const ToastProviderStandard: () => JSX.Element;
6
+ export declare const ToastProviderblockEndInlineStartMax5: () => JSX.Element;
7
+ export declare const ProgrammaticDismissals: () => JSX.Element;
8
+ //# sourceMappingURL=Toast.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast.stories.d.ts","sourceRoot":"","sources":["../../../../src/context/Toast/Toast.stories.tsx"],"names":[],"mappings":";;;AAKA,wBAEE;AAkBF,eAAO,MAAM,qBAAqB,mBAMjC,CAAC;AAcF,eAAO,MAAM,oCAAoC,mBAMhD,CAAC;AA6BF,eAAO,MAAM,sBAAsB,mBAMlC,CAAC"}
@@ -0,0 +1,57 @@
1
+ import { ReactElement } from 'react';
2
+ export declare const CommunicationDispatch: {
3
+ readonly ADD: "add";
4
+ readonly DISMISS: "dismiss";
5
+ readonly DISMISS_ALL: "dismiss_all";
6
+ readonly DISMISS_BY_META: "dismiss_by_meta";
7
+ };
8
+ type ToastVariant = 'success' | 'error' | 'info' | 'default';
9
+ type ToastPosition = 'blockStartInlineEnd' | 'blockStartInlineStart' | 'blockEndInlineEnd' | 'blockEndInlineStart';
10
+ export type ToastType = {
11
+ [metaKey: string]: unknown;
12
+ content: string | ReactElement;
13
+ duration?: number;
14
+ hideDismissButton?: boolean;
15
+ id: string;
16
+ variant?: ToastVariant;
17
+ };
18
+ export interface ConfigType {
19
+ /** May add any meta name/value combo to each toast message connected to the provider. */
20
+ [metaKey: string]: unknown;
21
+ /** Sets default duration for each toast message. May be overwritten with the `toast` hook. */
22
+ duration?: number;
23
+ /** Sets max number of toasts visible at once. */
24
+ max?: number;
25
+ /** Sets the position the toast animate out from. Options are `blockStartInlineEnd`, `blockStartInlineStart`, `blockEndInlineEnd`, `blockEndInlineStart`. */
26
+ position: ToastPosition;
27
+ /** Sets the default toast background color. Options are `success`, `error`, `default`, and `info`. May be overwritten with the `toast` hook. */
28
+ variant?: ToastVariant;
29
+ }
30
+ export type CommunicationDispatchType = {
31
+ toast: ToastType;
32
+ type: typeof CommunicationDispatch.ADD;
33
+ } | {
34
+ id: string;
35
+ type: typeof CommunicationDispatch.DISMISS;
36
+ } | {
37
+ metaName: string;
38
+ metaValue: string;
39
+ type: typeof CommunicationDispatch.DISMISS_BY_META;
40
+ } | {
41
+ type: typeof CommunicationDispatch.DISMISS_ALL;
42
+ };
43
+ export interface ToastProviderType {
44
+ config: ConfigType;
45
+ }
46
+ export type MetaType = {
47
+ metaName: string;
48
+ metaValue: string;
49
+ };
50
+ export interface ToastContextType {
51
+ dismiss: (id: string) => void;
52
+ dismissAll: () => void;
53
+ dismissByMeta: (meta: MetaType) => void;
54
+ toast: (content: string | ReactElement, options?: Partial<ToastType>) => string;
55
+ }
56
+ export {};
57
+ //# sourceMappingURL=Toast.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast.types.d.ts","sourceRoot":"","sources":["../../../../src/context/Toast/Toast.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC,eAAO,MAAM,qBAAqB;;;;;CAKxB,CAAC;AAEX,KAAK,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAC7D,KAAK,aAAa,GAAG,qBAAqB,GAAG,uBAAuB,GAAG,mBAAmB,GAAG,qBAAqB,CAAC;AAEnH,MAAM,MAAM,SAAS,GAAG;IACtB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,YAAY,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC;AAEF,MAAM,WAAW,UAAU;IACzB,yFAAyF;IACzF,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4JAA4J;IAC5J,QAAQ,EAAE,aAAa,CAAC;IACxB,gJAAgJ;IAChJ,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,MAAM,MAAM,yBAAyB,GACjC;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,OAAO,qBAAqB,CAAC,GAAG,CAAA;CAAE,GAC5D;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,qBAAqB,CAAC,OAAO,CAAA;CAAE,GAC1D;IACE,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,qBAAqB,CAAC,eAAe,CAAC;CACpD,GACD;IAAE,IAAI,EAAE,OAAO,qBAAqB,CAAC,WAAW,CAAA;CAAE,CAAC;AAEvD,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,aAAa,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACxC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,KAAK,MAAM,CAAC;CACjF"}
@@ -1,3 +1,4 @@
1
1
  export * from './useCombinedRefs';
2
2
  export * from './useLockBodyScroll';
3
+ export * from './useOnClickOutside';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.tsx"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.tsx"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { RefObject } from 'react';
2
+ type Handler = (event: MouseEvent) => void;
3
+ export interface UseOnClickOutsideProps<T> {
4
+ /** Callback that is invoked when the user clicks outside the element referenced by `ref`. */
5
+ handler: Handler;
6
+ /** Reference to the element. */
7
+ ref: RefObject<T>;
8
+ }
9
+ /**
10
+ * Invokes `handler` when the user clicks outside the element referenced by `ref`.
11
+ *
12
+ * Accepts {@link UseOnClickOutsideProps}.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * import { useOnClickOutside } from '@youversion/design-system-components';
17
+ *
18
+ * function MyComponent() {
19
+ * const ref = useRef<HTMLDivElement>(null);
20
+ * useOnClickOutside({ handler: (event) => console.log("Clicked Outside!"), ref });
21
+ *
22
+ * return (
23
+ * <div ref={ref}>
24
+ * ...
25
+ * </div>
26
+ * );
27
+ * }
28
+ * ```
29
+ */
30
+ export declare function useOnClickOutside<T extends HTMLElement = HTMLElement>({ handler, ref, }: UseOnClickOutsideProps<T>): void;
31
+ export {};
32
+ //# sourceMappingURL=useOnClickOutside.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOnClickOutside.d.ts","sourceRoot":"","sources":["../../../src/hooks/useOnClickOutside.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAE7C,KAAK,OAAO,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;AAE3C,MAAM,WAAW,sBAAsB,CAAC,CAAC;IACvC,6FAA6F;IAC7F,OAAO,EAAE,OAAO,CAAC;IACjB,gCAAgC;IAChC,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAAE,EACrE,OAAO,EACP,GAAG,GACJ,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,IAAI,CAgBlC"}
@@ -4,9 +4,13 @@ export * from './Box';
4
4
  export * from './Breadcrumb';
5
5
  export * from './Button';
6
6
  export * from './Checkbox';
7
+ export * from './ColorSelect';
7
8
  export * from './Dialog';
8
9
  export * from './Divider';
10
+ export * from './EditableWell';
11
+ export * from './FauxPhone';
9
12
  export * from './FocusTrap';
13
+ export * from './Grid';
10
14
  export * from './hooks';
11
15
  export * from './HorizontalLoader';
12
16
  export * from './IconButton';
@@ -26,6 +30,7 @@ export * from './PopoverBody';
26
30
  export * from './PopoverTrigger';
27
31
  export * from './RadioSet';
28
32
  export * from './Search';
33
+ export * from './SearchableSelect';
29
34
  export * from './SegmentedControl';
30
35
  export * from './Select';
31
36
  export * from './Switch';
@@ -33,7 +38,9 @@ export * from './Tab';
33
38
  export * from './TabBar';
34
39
  export * from './Table';
35
40
  export * from './Tag';
41
+ export * from './TextArea';
36
42
  export * from './TimePicker';
43
+ export * from './Toast';
37
44
  export * from './Tooltip';
38
45
  export * from './Typography';
39
46
  export * from './UserProfileButton';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@youversion/design-system-components",
3
- "version": "0.26.0",
3
+ "version": "0.28.0",
4
4
  "main": "./dist/index.umd.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "types": "./dist/index.d.ts",
@@ -21,8 +21,7 @@
21
21
  "validate": "yarn lint && yarn typecheck && yarn test"
22
22
  },
23
23
  "dependencies": {
24
- "@react-aria/overlays": "3.14.0",
25
- "@youversion/design-system-core": "0.3.1",
24
+ "@youversion/design-system-core": "0.3.2",
26
25
  "@youversion/design-system-icons": "0.14.1",
27
26
  "@youversion/design-system-tokens": "1.1.1",
28
27
  "clsx": "1.2.1",