@youversion/design-system-components 0.13.5 → 0.14.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @youversion/design-system-components
2
2
 
3
+ ## 0.14.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 3ba6b10: Added search component
8
+
9
+ ## 0.14.0
10
+
11
+ ### Minor Changes
12
+
13
+ - e762579: Add LoadingSpinner component
14
+
3
15
  ## 0.13.5
4
16
 
5
17
  ### Patch Changes
@@ -0,0 +1,55 @@
1
+ import SpinnerIcon from '@youversion/design-system-icons/lib/Spinner';
2
+ type LoadingSpinnerProps = {
3
+ /** Accessibility label. Default `Loading…`. */
4
+ 'aria-label'?: string;
5
+ /** Optional className. Should not conflict with `width, height, color` props. */
6
+ className?: string;
7
+ /** The icon color (tailwind class). Default `text-gray-15`. */
8
+ color?: string;
9
+ /** Number of seconds for the animation to take. Default `0.9`. */
10
+ duration?: number;
11
+ /** Height of the container (tailwind classes). Default `h-full`. */
12
+ height?: string;
13
+ /** Any additionally permitted icon props. */
14
+ iconProps?: Omit<Parameters<typeof SpinnerIcon>[0], 'dur' | 'height' | 'width' | 'aria-label' | 'color'>;
15
+ /** The size of the icon. Defaults to the icon's base size. Default `40px`. */
16
+ iconSize?: string | number;
17
+ /** Width of the container (tailwind classes). Default `w-full`. */
18
+ width?: string;
19
+ };
20
+ /**
21
+ * Reusable animated version of the Loading icon.
22
+ *
23
+ * Accepts {@link LoadingSpinnerProps}.
24
+ *
25
+ * @returns Renders a spinning Loading icon in a box.
26
+ *
27
+ * @example
28
+ * Default usage.
29
+ * ```tsx
30
+ * import { LoadingSpinner } from '@youversion/design-system-components';
31
+ *
32
+ * function MyComponent() {
33
+ * return (
34
+ * <LoadingSpinner />
35
+ * );
36
+ * }
37
+ * ```
38
+ *
39
+ * Complex Tailwind width & height.
40
+ * ```tsx
41
+ * import { LoadingSpinner } from '@youversion/design-system-components';
42
+ *
43
+ * function MyComponent() {
44
+ * return (
45
+ * <LoadingSpinner
46
+ * width='w-full sm:w-8 md:w-12 md:dark:w-10'
47
+ * height='h-2 sm:h-8'
48
+ * />
49
+ * );
50
+ * }
51
+ * ```
52
+ */
53
+ export declare function LoadingSpinner({ 'aria-label': ariaLabel, duration, iconSize, className, color, height, width, iconProps, }: LoadingSpinnerProps): JSX.Element;
54
+ export {};
55
+ //# sourceMappingURL=LoadingSpinner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingSpinner.d.ts","sourceRoot":"","sources":["../../../src/LoadingSpinner/LoadingSpinner.tsx"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,6CAA6C,CAAC;AAKtE,KAAK,mBAAmB,GAAG;IACzB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,OAAO,CAAC,CAAC;IACzG,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,cAAc,CAAC,EAC7B,YAAY,EAAE,SAAsB,EACpC,QAAc,EACd,QAAiB,EACjB,SAAS,EACT,KAAsB,EACtB,MAAiB,EACjB,KAAgB,EAChB,SAAc,GACf,EAAE,mBAAmB,eAOrB"}
@@ -0,0 +1,2 @@
1
+ export * from './LoadingSpinner';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/LoadingSpinner/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,42 @@
1
+ export interface SearchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
2
+ /** A class that can be passed in to the Input. */
3
+ className?: string;
4
+ /** Disables the Input, also applies disabled styling. */
5
+ disabled?: boolean;
6
+ /** Label for dismiss button */
7
+ dismissButtonLabel?: string;
8
+ /** Message to provide to the user, also applies error styling. */
9
+ error?: string;
10
+ /** Hint to provide to the user. */
11
+ hint?: string;
12
+ /** Label for the input. */
13
+ label: string;
14
+ /** Name used inside of the form. */
15
+ name: string;
16
+ /** Function to handle the onChange event when using as a controlled input. */
17
+ onChange?: (value: string) => void;
18
+ /** Placeholder to display. */
19
+ placeholder?: string;
20
+ }
21
+ /**
22
+ * The **Search** component accepts user's search query.
23
+ *
24
+ * Accepts {@link InputProps}.
25
+ *
26
+ * @returns Renders the search field to be used in a form.
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * import { Search } from '@youversion/design-system-components';
31
+ *
32
+ * function MyComponent() {
33
+ * return (
34
+ * <>
35
+ * <Search name='search' label='Search' />
36
+ * </>
37
+ * )
38
+ * }
39
+ * ```
40
+ */
41
+ export declare const Search: import("react").ForwardRefExoticComponent<SearchProps & import("react").RefAttributes<HTMLInputElement>>;
42
+ //# sourceMappingURL=Search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Search.d.ts","sourceRoot":"","sources":["../../../src/Search/Search.tsx"],"names":[],"mappings":"AAQA,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAChG,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+BAA+B;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,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,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,8BAA8B;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAoFD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,MAAM,0GAA8B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Search';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Search/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
package/dist/index.d.ts CHANGED
@@ -18,10 +18,12 @@ export * from './ListItem';
18
18
  export * from './ListItemActions';
19
19
  export * from './ListItemContent';
20
20
  export * from './ListItemText';
21
+ export * from './LoadingSpinner';
21
22
  export * from './Popover';
22
23
  export * from './PopoverBody';
23
24
  export * from './PopoverTrigger';
24
25
  export * from './RadioSet';
26
+ export * from './Search';
25
27
  export * from './SegmentedControl';
26
28
  export * from './Select';
27
29
  export * from './Switch';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AAC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