@youversion/design-system-components 0.3.0 → 0.4.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.
- package/CHANGELOG.md +22 -0
- package/dist/AutocompleteSelect/AutocompleteSelect.d.ts +9 -4
- package/dist/AutocompleteSelect/AutocompleteSelect.d.ts.map +1 -1
- package/dist/Breadcrumb/Breadcrumb.d.ts +0 -1
- package/dist/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/Breadcrumb/Breadcrumbs.d.ts +1 -2
- package/dist/Breadcrumb/Breadcrumbs.d.ts.map +1 -1
- package/dist/Button/Button.d.ts +1 -1
- package/dist/Checkbox/Checkbox.d.ts +1 -2
- package/dist/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/Input/Input.d.ts +2 -3
- package/dist/Input/Input.d.ts.map +1 -1
- package/dist/LinkButton/LinkButton.d.ts +1 -1
- package/dist/PopoverTrigger/PopoverTrigger.d.ts +0 -1
- package/dist/PopoverTrigger/PopoverTrigger.d.ts.map +1 -1
- package/dist/RadioSet/RadioSet.d.ts +1 -2
- package/dist/RadioSet/RadioSet.d.ts.map +1 -1
- package/dist/Select/Option.d.ts +3 -3
- package/dist/Select/Select.d.ts +3 -3
- package/dist/index.es.js +971 -2328
- package/dist/index.umd.js +1 -27
- package/package.json +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @youversion/design-system-components
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 225c389: Refactor React imports for better code splitting
|
|
8
|
+
|
|
9
|
+
- Remove all default imports of React
|
|
10
|
+
- Type imports removed since `React` is a global namespace
|
|
11
|
+
- .test.tsx files use `import * as React` to appease VSCode typechecking
|
|
12
|
+
- All other files use `import { thing } from 'react'`
|
|
13
|
+
|
|
14
|
+
- 839f2ad: Remove react development runtime from bundle
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 95fc7d6: Alphabetize props
|
|
19
|
+
- fbc30f5: Upgrade to tailwind 3.3.2
|
|
20
|
+
- Updated dependencies [95fc7d6]
|
|
21
|
+
- Updated dependencies [fbc30f5]
|
|
22
|
+
- @youversion/design-system-tokens@0.0.6
|
|
23
|
+
- @youversion/design-system-core@0.0.6
|
|
24
|
+
|
|
3
25
|
## 0.3.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
export interface SelectOption {
|
|
3
2
|
label: string;
|
|
4
3
|
value: string | number | undefined;
|
|
@@ -16,7 +15,7 @@ export interface AutocompleteSelectProps extends Omit<React.InputHTMLAttributes<
|
|
|
16
15
|
name?: string;
|
|
17
16
|
/** Text that will appear when no options are available. */
|
|
18
17
|
noOptionsText: string;
|
|
19
|
-
/** Executes when input changes. */
|
|
18
|
+
/** Executes when input changes. Must be memoized. */
|
|
20
19
|
onChange: (newValue: string) => void;
|
|
21
20
|
/** Executes when an item is selected. */
|
|
22
21
|
onSelect: (selection: SelectOption) => void;
|
|
@@ -39,11 +38,17 @@ export interface AutocompleteSelectProps extends Omit<React.InputHTMLAttributes<
|
|
|
39
38
|
* function MyComponent() {
|
|
40
39
|
* return (
|
|
41
40
|
* <>
|
|
42
|
-
* <AutocompleteSelect
|
|
41
|
+
* <AutocompleteSelect
|
|
42
|
+
* label='Troopers'
|
|
43
|
+
* onChange={newValue => setState(newValue)}
|
|
44
|
+
* onSelect={(selection: SelectOption) => console.log(`Selection: ${selection.label}`)}
|
|
45
|
+
* options={options}
|
|
46
|
+
* value={state}
|
|
47
|
+
* />
|
|
43
48
|
* </>
|
|
44
49
|
* )
|
|
45
50
|
* }
|
|
46
51
|
* ```
|
|
47
52
|
*/
|
|
48
|
-
export declare const AutocompleteSelect:
|
|
53
|
+
export declare const AutocompleteSelect: import("react").ForwardRefExoticComponent<AutocompleteSelectProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
49
54
|
//# sourceMappingURL=AutocompleteSelect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteSelect.d.ts","sourceRoot":"","sources":["../../../src/AutocompleteSelect/AutocompleteSelect.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AutocompleteSelect.d.ts","sourceRoot":"","sources":["../../../src/AutocompleteSelect/AutocompleteSelect.tsx"],"names":[],"mappings":"AAQA,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,MAAM,WAAW,uBACf,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,YAAY,KAAK,IAAI,CAAC;IAC5C,6CAA6C;IAC7C,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAC7B,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf;AAsGD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,kBAAkB,sHAA0C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/Breadcrumb/Breadcrumb.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/Breadcrumb/Breadcrumb.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,KAAK,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;AAEpE,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACxD,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,UAAU;oEAOpB,eAAe,GAAG,eAAe;;CAgBnC,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
interface BreadcrumbsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
2
|
children: React.ReactNode | Array<React.ReactNode>;
|
|
4
3
|
className?: string;
|
|
5
4
|
}
|
|
6
|
-
export declare const Breadcrumbs:
|
|
5
|
+
export declare const Breadcrumbs: import("react").ForwardRefExoticComponent<BreadcrumbsProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
6
|
export {};
|
|
8
7
|
//# sourceMappingURL=Breadcrumbs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/Breadcrumb/Breadcrumbs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/Breadcrumb/Breadcrumbs.tsx"],"names":[],"mappings":"AAIA,UAAU,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACrE,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA2CD,eAAO,MAAM,WAAW,6GAAmC,CAAC"}
|
package/dist/Button/Button.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ export type ButtonProps = BaseVariants | AllCapsVariant;
|
|
|
64
64
|
* @example
|
|
65
65
|
* ```tsx
|
|
66
66
|
* import { Button } from '@youversion/design-system-components';
|
|
67
|
-
* import
|
|
67
|
+
* import TriangleDownStroked from '@youversion/design-system-icons/lib/TriangleDownStroked';
|
|
68
68
|
*
|
|
69
69
|
* function MyComponent() {
|
|
70
70
|
* return (
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
type NativeInputProps = React.AllHTMLAttributes<HTMLInputElement>;
|
|
3
2
|
export interface CheckboxProps extends Omit<NativeInputProps, 'width' | 'height' | 'className' | 'label'> {
|
|
4
3
|
/** Additional class to pass to the Checkbox. */
|
|
@@ -27,6 +26,6 @@ export interface CheckboxProps extends Omit<NativeInputProps, 'width' | 'height'
|
|
|
27
26
|
* ```
|
|
28
27
|
*
|
|
29
28
|
*/
|
|
30
|
-
export declare const Checkbox:
|
|
29
|
+
export declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
31
30
|
export {};
|
|
32
31
|
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/Checkbox/Checkbox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAGA,KAAK,gBAAgB,GAAG,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;AAClE,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;IACvG,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;IACpC,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;CACd;AAqCD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,QAAQ,4GAAgC,CAAC"}
|
package/dist/Input/Input.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
1
|
+
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
3
2
|
/** A class that can be passed in to the Input. */
|
|
4
3
|
className?: string;
|
|
5
4
|
/** Disables the Input, also applies disabled styling. */
|
|
@@ -41,5 +40,5 @@ export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
41
40
|
* }
|
|
42
41
|
* ```
|
|
43
42
|
*/
|
|
44
|
-
export declare const Input:
|
|
43
|
+
export declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
45
44
|
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/Input/Input.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/Input/Input.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;IAC7E,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,CAAC,EAAE,MAAM,CAAC;IACf,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;CAC7B;AAwGD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,KAAK,yGAA6B,CAAC"}
|
|
@@ -26,7 +26,7 @@ export declare const LinkButtonComponent: ({ className, children, component, ico
|
|
|
26
26
|
* @example
|
|
27
27
|
* ```tsx
|
|
28
28
|
* import { LinkButton } from '@youversion/design-system-components';
|
|
29
|
-
* import
|
|
29
|
+
* import TriangleDownStroked from '@youversion/design-system-icons/lib/TriangleDownStroked';
|
|
30
30
|
*
|
|
31
31
|
* function MyComponent() {
|
|
32
32
|
* return (
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoverTrigger.d.ts","sourceRoot":"","sources":["../../../src/PopoverTrigger/PopoverTrigger.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PopoverTrigger.d.ts","sourceRoot":"","sources":["../../../src/PopoverTrigger/PopoverTrigger.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,cAAc,gDAAiD,mBAAmB,gBAe9F,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
export interface RadioSetProps extends React.AllHTMLAttributes<HTMLInputElement> {
|
|
3
2
|
error?: string;
|
|
4
3
|
hint?: string;
|
|
5
4
|
label: string;
|
|
6
5
|
value: string;
|
|
7
6
|
}
|
|
8
|
-
export declare const RadioSet:
|
|
7
|
+
export declare const RadioSet: import("react").ForwardRefExoticComponent<RadioSetProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
9
8
|
//# sourceMappingURL=RadioSet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioSet.d.ts","sourceRoot":"","sources":["../../../src/RadioSet/RadioSet.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RadioSet.d.ts","sourceRoot":"","sources":["../../../src/RadioSet/RadioSet.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAoCD,eAAO,MAAM,QAAQ,4GAAgC,CAAC"}
|
package/dist/Select/Option.d.ts
CHANGED
|
@@ -9,11 +9,11 @@ export interface OptionProps extends OptionHTMLAttributes<HTMLOptionElement> {
|
|
|
9
9
|
* @returns Renders an **option** element.
|
|
10
10
|
* @example
|
|
11
11
|
* ```tsx
|
|
12
|
-
* import React from 'react';
|
|
13
12
|
* import { Option, OptionProps, Select } from '@youversion/design-system-components';
|
|
13
|
+
* import { useState } from 'React';
|
|
14
14
|
*
|
|
15
15
|
* function MyComponent() {
|
|
16
|
-
* const [state, setState] =
|
|
16
|
+
* const [state, setState] = useState('');
|
|
17
17
|
* const options: Array<OptionProps> = [
|
|
18
18
|
* { label: 'Placeholder Text', value: '' },
|
|
19
19
|
* { label: 'Option 1', value: '1' },
|
|
@@ -24,7 +24,7 @@ export interface OptionProps extends OptionHTMLAttributes<HTMLOptionElement> {
|
|
|
24
24
|
* <>
|
|
25
25
|
* <Select
|
|
26
26
|
* name="select"
|
|
27
|
-
* onChange={
|
|
27
|
+
* onChange={event => setState(event.target.value)}
|
|
28
28
|
* value={state}
|
|
29
29
|
* >
|
|
30
30
|
* {options.map(option => (
|
package/dist/Select/Select.d.ts
CHANGED
|
@@ -22,11 +22,11 @@ export interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement
|
|
|
22
22
|
* @returns Renders a **select** element, **option** elements as children.
|
|
23
23
|
* @example
|
|
24
24
|
* ```tsx
|
|
25
|
-
* import React from 'react';
|
|
26
25
|
* import { Option, OptionProps, Select } from '@youversion/design-system-components';
|
|
26
|
+
* import { useState } from 'react';
|
|
27
27
|
*
|
|
28
28
|
* function MyComponent() {
|
|
29
|
-
* const [state, setState] =
|
|
29
|
+
* const [state, setState] = useState('');
|
|
30
30
|
* const options: Array<OptionProps> = [
|
|
31
31
|
* { label: 'Placeholder Text', value: '' },
|
|
32
32
|
* { label: 'Option 1', value: '1' },
|
|
@@ -37,7 +37,7 @@ export interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement
|
|
|
37
37
|
* <>
|
|
38
38
|
* <Select
|
|
39
39
|
* name="Select"
|
|
40
|
-
* onChange={
|
|
40
|
+
* onChange={event => setState(event.target.value)}
|
|
41
41
|
* value={state}
|
|
42
42
|
* >
|
|
43
43
|
* {options.map(option => (
|