@youversion/design-system-components 0.25.0 → 0.26.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.
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.stories.d.ts","sourceRoot":"","sources":["../../../src/Popover/Popover.stories.tsx"],"names":[],"mappings":";AAKA,wBAiC0B;AAG1B,eAAO,MAAM,KAAK,4BAkDjB,CAAC"}
1
+ {"version":3,"file":"Popover.stories.d.ts","sourceRoot":"","sources":["../../../src/Popover/Popover.stories.tsx"],"names":[],"mappings":";AAKA,wBAsC0B;AAG1B,eAAO,MAAM,KAAK,4BAmDjB,CAAC"}
@@ -8,6 +8,7 @@ export interface PopoverBodyProps extends HTMLAttributes<HTMLDivElement> {
8
8
  /** Focus on first focusable element in scope. Defaults to `true`. */
9
9
  autoFocus?: boolean;
10
10
  children: React.ReactNode;
11
+ closeOnClickInside?: boolean;
11
12
  /** Allows the Popover to be closed by clicking outside of it or pressing Esc key. Defaults to `false`. */
12
13
  isDismissible?: boolean;
13
14
  isOpen: boolean;
@@ -43,5 +44,5 @@ export interface PopoverBodyProps extends HTMLAttributes<HTMLDivElement> {
43
44
  * }
44
45
  * ```
45
46
  */
46
- export declare const PopoverBody: ({ align, autoFocus, children, className, isDismissible, isOpen, onClose, ...rest }: PopoverBodyProps) => JSX.Element;
47
+ export declare const PopoverBody: ({ align, autoFocus, children, className, closeOnClickInside, isDismissible, isOpen, onClose, ...rest }: PopoverBodyProps) => JSX.Element;
47
48
  //# sourceMappingURL=PopoverBody.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PopoverBody.d.ts","sourceRoot":"","sources":["../../../src/PopoverBody/PopoverBody.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAU,MAAM,OAAO,CAAC;AAM/C,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACvC,QAAQ,EAAE,KAAK,GAAG,QAAQ,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACtE,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,qEAAqE;IACrE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,0GAA0G;IAC1G,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,WAAW,uFASrB,gBAAgB,gBA6BlB,CAAC"}
1
+ {"version":3,"file":"PopoverBody.d.ts","sourceRoot":"","sources":["../../../src/PopoverBody/PopoverBody.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAU,MAAM,OAAO,CAAC;AAM/C,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACvC,QAAQ,EAAE,KAAK,GAAG,QAAQ,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACtE,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,qEAAqE;IACrE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,0GAA0G;IAC1G,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,WAAW,2GAUrB,gBAAgB,gBA6BlB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import * as Icons from '@youversion/design-system-icons/lib/index';
2
+ import { AllHTMLAttributes } from 'react';
3
+ import { TypographyProps } from '../Typography/Typography';
4
+ type NativeAnchorProps = AllHTMLAttributes<HTMLAnchorElement>;
5
+ export type IconNames = keyof typeof Icons;
6
+ export type Tab = {
7
+ href: string;
8
+ iconName: IconNames;
9
+ label: string;
10
+ };
11
+ interface Props extends NativeAnchorProps {
12
+ activeTab: string;
13
+ tabs: Array<Tab>;
14
+ }
15
+ export declare function TabBar({ activeTab, className, tabs, ...rest }: Props & TypographyProps): JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=TabBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../../src/TabBar/TabBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAI3D,KAAK,iBAAiB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;AAC9D,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,KAAK,CAAC;AAE3C,MAAM,MAAM,GAAG,GAAG;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,UAAU,KAAM,SAAQ,iBAAiB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;CAClB;AAED,wBAAgB,MAAM,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,GAAG,eAAe,eAUtF"}
@@ -0,0 +1,12 @@
1
+ import { AllHTMLAttributes } from 'react';
2
+ import { TypographyProps } from '../Typography/Typography';
3
+ import { IconNames } from './TabBar';
4
+ type NativeAnchorProps = AllHTMLAttributes<HTMLAnchorElement>;
5
+ interface Props extends NativeAnchorProps {
6
+ active: boolean;
7
+ href: string;
8
+ iconName: IconNames;
9
+ }
10
+ export declare function TabBarItem({ active, children, component, className, href, iconName, ...rest }: Props & TypographyProps): JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=TabBarItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TabBarItem.d.ts","sourceRoot":"","sources":["../../../src/TabBar/TabBarItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,KAAK,iBAAiB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;AAE9D,UAAU,KAAM,SAAQ,iBAAiB;IACvC,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,QAAQ,EACR,SAAe,EACf,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,KAAK,GAAG,eAAe,eAkBzB"}
@@ -0,0 +1,3 @@
1
+ export { TabBar } from './TabBar';
2
+ export { TabBarItem } from './TabBarItem';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/TabBar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,38 @@
1
+ import React, { AllHTMLAttributes } from 'react';
2
+ export type UserProfileButtonVariant = 'nav' | 'header';
3
+ export interface UserProfileButtonProps extends Omit<AllHTMLAttributes<HTMLButtonElement>, 'aria-label' | 'children' | 'type'> {
4
+ /** The aria-label for the component wrapper. */
5
+ label: string;
6
+ /** Element that is rendered as the user's avatar. */
7
+ userAvatar: React.ReactNode;
8
+ /** Name of the user that will be displayed. */
9
+ userName: string;
10
+ /** Button variant. The 'header' variant only displays **userName** on md screens or larger. */
11
+ variant?: UserProfileButtonVariant;
12
+ }
13
+ /**
14
+ * The **UserProfileButton** component displays a user's name next to a specified avatar element and a dropdown icon.
15
+ *
16
+ * Accepts {@link UserProfileButtonProps}.
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * import { UserProfileButton } from '@youversion/design-system-components';
21
+ *
22
+ * function MyComponent() {
23
+ * return (
24
+ * <>
25
+ * <UserProfileButton
26
+ * label='My Profile'
27
+ * userAvatar={
28
+ * <img alt='Profile Picture' className='object-cover rounded-full' src='https://picsum.photos/100/100' />
29
+ * }
30
+ * userName='Devon'
31
+ * />
32
+ * </>
33
+ * )
34
+ * }
35
+ * ```
36
+ */
37
+ export declare const UserProfileButton: React.ForwardRefExoticComponent<UserProfileButtonProps & React.RefAttributes<HTMLButtonElement>>;
38
+ //# sourceMappingURL=UserProfileButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserProfileButton.d.ts","sourceRoot":"","sources":["../../../src/UserProfileButton/UserProfileButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAA4B,MAAM,OAAO,CAAC;AAK3E,MAAM,MAAM,wBAAwB,GAAG,KAAK,GAAG,QAAQ,CAAC;AAExD,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,MAAM,CAAC;IACtF,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,+FAA+F;IAC/F,OAAO,CAAC,EAAE,wBAAwB,CAAC;CACpC;AAuBD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,iBAAiB,kGAAyC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { UserProfileButtonProps } from './UserProfileButton';
2
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, UserProfileButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
3
+ export default _default;
4
+ type TemplateProps = Omit<UserProfileButtonProps, 'label' | 'userName' | 'userAvatar'> & {
5
+ avatarSrc?: string | null;
6
+ };
7
+ export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, TemplateProps>;
8
+ export declare const WithoutImage: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, TemplateProps>;
9
+ export declare const WithPopover: () => JSX.Element;
10
+ //# sourceMappingURL=UserProfileButton.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserProfileButton.stories.d.ts","sourceRoot":"","sources":["../../../src/UserProfileButton/UserProfileButton.stories.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAqB,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;;AAEhF,wBAIoC;AAEpC,KAAK,aAAa,GAAG,IAAI,CAAC,sBAAsB,EAAE,OAAO,GAAG,UAAU,GAAG,YAAY,CAAC,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAyBvH,eAAO,MAAM,OAAO,8GAAoB,CAAC;AAEzC,eAAO,MAAM,YAAY,8GAAoB,CAAC;AAI9C,eAAO,MAAM,WAAW,mBAwBvB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './UserProfileButton';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/UserProfileButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -30,10 +30,12 @@ export * from './SegmentedControl';
30
30
  export * from './Select';
31
31
  export * from './Switch';
32
32
  export * from './Tab';
33
+ export * from './TabBar';
33
34
  export * from './Table';
34
35
  export * from './Tag';
35
36
  export * from './TimePicker';
36
37
  export * from './Tooltip';
37
38
  export * from './Typography';
39
+ export * from './UserProfileButton';
38
40
  export { cn } from './utils/cn';
39
41
  //# sourceMappingURL=index.d.ts.map
@@ -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,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc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
2
  "name": "@youversion/design-system-components",
3
- "version": "0.25.0",
3
+ "version": "0.26.0",
4
4
  "main": "./dist/index.umd.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "types": "./dist/index.d.ts",