@youversion/design-system-components 0.0.11 → 0.0.13

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,25 @@
1
1
  # @youversion/design-system-components
2
2
 
3
+ ## 0.0.13
4
+
5
+ ### Patch Changes
6
+
7
+ - 3314d88: Added a RadioSet and RadioSetItem Components.
8
+ - 740c6b5: - Added **Option** and **Select** components.
9
+ - Moved className prop to top component inside **Input** and **ListItemText**
10
+ - Updated dependencies [740c6b5]
11
+ - Updated dependencies [740c6b5]
12
+ - @youversion/design-system-core@0.0.3
13
+ - @youversion/design-system-icons@0.0.5
14
+
15
+ ## 0.0.12
16
+
17
+ ### Patch Changes
18
+
19
+ - 34e4700: Changed the build directory for the icons package from `dist` to `lib` and updated all instances.
20
+ - Updated dependencies [34e4700]
21
+ - @youversion/design-system-icons@0.0.4
22
+
3
23
  ## 0.0.11
4
24
 
5
25
  ### Patch Changes
@@ -61,7 +61,7 @@ export type ButtonProps = BaseVariants | AllCapsVariant;
61
61
  * @example
62
62
  * ```tsx
63
63
  * import { Button } from '@youversion/design-system-components';
64
- * import { TriangleDownStroked } from '@youversion/design-system-icons/index';
64
+ * import { TriangleDownStroked } from '@youversion/design-system-icons/lib/index';
65
65
  *
66
66
  * function MyComponent() {
67
67
  * return (
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The **Divider** component generates an html <hr> element.
3
+ *
4
+ * @returns A stylized hr element.
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * import { Divider } from '@youversion/design-system-components
9
+ *
10
+ * function MyComponent() {
11
+ * return (
12
+ * <p>This is an example paragraph </p>
13
+ * <Divider/>
14
+ * <p>This is another example paragraph </p>
15
+ * )
16
+ * }
17
+ * ```
18
+ */
19
+ export declare const Divider: () => JSX.Element;
20
+ //# sourceMappingURL=Divider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../src/Divider/Divider.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAEH,eAAO,MAAM,OAAO,mBAEnB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Divider';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Divider/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -11,7 +11,7 @@ export interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>
11
11
  * @example
12
12
  * ```tsx
13
13
  * import { IconButton } from '@youversion/design-system-components';
14
- * import AaStroked from '@youversion/design-system-icons/AaStroked';
14
+ * import AaStroked from '@youversion/design-system-icons/lib/AaStroked';
15
15
  *
16
16
  * function MyComponent() {
17
17
  * return (
@@ -18,7 +18,7 @@ export type IconLinkButtonsProps = IconLinkButtonWithComponentProps | IconLinkBu
18
18
  * @example
19
19
  * ```tsx
20
20
  * import { IconLinkButton } from '@youversion/design-system-components';
21
- * import AaStroked from '@youversion/design-system-icons/AaStroked';
21
+ * import AaStroked from '@youversion/design-system-icons/lib/AaStroked';
22
22
  *
23
23
  * function MyComponent() {
24
24
  * return (
@@ -1 +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,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,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 { TriangleDownStroked } from '@youversion/design-system-icons/index';
29
+ * import { TriangleDownStroked } from '@youversion/design-system-icons/lib/index';
30
30
  *
31
31
  * function MyComponent() {
32
32
  * return (
@@ -1 +1 @@
1
- {"version":3,"file":"ListItemText.d.ts","sourceRoot":"","sources":["../../../src/ListItemText/ListItemText.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEzE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,IAAI,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,eAAe,CAAC;CACpC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,YAAY,yFAQtB,iBAAiB,gBAgBnB,CAAC"}
1
+ {"version":3,"file":"ListItemText.d.ts","sourceRoot":"","sources":["../../../src/ListItemText/ListItemText.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEzE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,IAAI,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,eAAe,CAAC;CACpC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,YAAY,yFAQtB,iBAAiB,gBAgBnB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ export interface RadioSetProps extends React.AllHTMLAttributes<HTMLInputElement> {
3
+ error?: string;
4
+ hint?: string;
5
+ label: string;
6
+ value: string;
7
+ }
8
+ export declare const RadioSet: React.ForwardRefExoticComponent<RadioSetProps & React.RefAttributes<HTMLInputElement>>;
9
+ //# sourceMappingURL=RadioSet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioSet.d.ts","sourceRoot":"","sources":["../../../src/RadioSet/RadioSet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,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,wFAAsC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React, { AllHTMLAttributes } from 'react';
2
+ export interface RadioItemProps extends AllHTMLAttributes<HTMLInputElement> {
3
+ name: string;
4
+ value: string;
5
+ }
6
+ export declare const RadioSetItem: React.ForwardRefExoticComponent<RadioItemProps & React.RefAttributes<HTMLInputElement>>;
7
+ //# sourceMappingURL=RadioSetItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioSetItem.d.ts","sourceRoot":"","sources":["../../../src/RadioSet/RadioSetItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAA4B,MAAM,OAAO,CAAC;AAE3E,MAAM,WAAW,cAAe,SAAQ,iBAAiB,CAAC,gBAAgB,CAAC;IACzE,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAkDD,eAAO,MAAM,YAAY,yFAAoC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './RadioSet';
2
+ export * from './RadioSetItem';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/RadioSet/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { OptionHTMLAttributes } from 'react';
2
+ export interface OptionProps extends OptionHTMLAttributes<HTMLOptionElement> {
3
+ }
4
+ /**
5
+ * The **Option** component is used as a children inside of the **Select** component.
6
+ *
7
+ * Accepts {@link OptionProps}.
8
+ *
9
+ * @returns Renders an **option** element.
10
+ * @example
11
+ * ```tsx
12
+ * import React from 'react';
13
+ * import { Option, OptionProps, Select } from '@youversion/design-system-components';
14
+ *
15
+ * function MyComponent() {
16
+ * const [state, setState] = React.useState('');
17
+ * const options: Array<OptionProps> = [
18
+ * { label: 'Placeholder Text', value: '' },
19
+ * { label: 'Option 1', value: '1' },
20
+ * { label: 'Option 2', value: '2' },
21
+ * ];
22
+ *
23
+ * return (
24
+ * <>
25
+ * <Select
26
+ * name="select"
27
+ * onChange={e => setState(e.target.value)}
28
+ * value={state}
29
+ * >
30
+ * {options.map(option => (
31
+ * <Option key={option.label} {...option} />
32
+ * ))}
33
+ * </Select>
34
+ * </>
35
+ * )
36
+ * }
37
+ * ```
38
+ */
39
+ export declare const Option: ({ ...rest }: OptionProps) => JSX.Element;
40
+ //# sourceMappingURL=Option.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Option.d.ts","sourceRoot":"","sources":["../../../src/Select/Option.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAE7C,MAAM,WAAW,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;CAAG;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,MAAM,gBAAiB,WAAW,gBAE9C,CAAC"}
@@ -0,0 +1,53 @@
1
+ import { ClassValue } from 'clsx';
2
+ import { SelectHTMLAttributes } from 'react';
3
+ export interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'className' | 'height' | 'options' | 'type' | 'width'> {
4
+ /** A class that can be passed in to the select. */
5
+ className?: ClassValue;
6
+ /** If true, the select will be disabled. */
7
+ disabled?: boolean;
8
+ /** The error message to display. Also turns the border of the select red. */
9
+ error?: string;
10
+ /** A hint to provide to the user. */
11
+ hint?: string;
12
+ /** This shows up above the selected options when an item is selected. */
13
+ label?: string;
14
+ /** The name of the select. */
15
+ name: string;
16
+ }
17
+ /**
18
+ * The **Select** component is a component that allows users pick a value from predefined options.
19
+ *
20
+ * Accepts {@link SelectProps}.
21
+ *
22
+ * @returns Renders a **select** element, **option** elements as children.
23
+ * @example
24
+ * ```tsx
25
+ * import React from 'react';
26
+ * import { Option, OptionProps, Select } from '@youversion/design-system-components';
27
+ *
28
+ * function MyComponent() {
29
+ * const [state, setState] = React.useState('');
30
+ * const options: Array<OptionProps> = [
31
+ * { label: 'Placeholder Text', value: '' },
32
+ * { label: 'Option 1', value: '1' },
33
+ * { label: 'Option 2', value: '2' },
34
+ * ];
35
+ *
36
+ * return (
37
+ * <>
38
+ * <Select
39
+ * name="Select"
40
+ * onChange={e => setState(e.target.value)}
41
+ * value={state}
42
+ * >
43
+ * {options.map(option => (
44
+ * <Option key={option.label} {...option} />
45
+ * ))}
46
+ * </Select>
47
+ * </>
48
+ * )
49
+ * }
50
+ * ```
51
+ */
52
+ export declare const Select: import("react").ForwardRefExoticComponent<SelectProps & import("react").RefAttributes<HTMLSelectElement>>;
53
+ //# sourceMappingURL=Select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/Select/Select.tsx"],"names":[],"mappings":"AACA,OAAa,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAyC,oBAAoB,EAAuB,MAAM,OAAO,CAAC;AAezG,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IAC5G,mDAAmD;IACnD,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;CACd;AA8DD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,MAAM,2GAA8B,CAAC"}
@@ -0,0 +1,5 @@
1
+ declare const styles: {
2
+ readonly "select": string;
3
+ };
4
+ export = styles;
5
+
@@ -0,0 +1,11 @@
1
+ export declare const optionStyles = "text-black bg-canvas-light dark:text-white dark:bg-overlay-body-dark";
2
+ export declare const selectStyles = "appearance-none outline-none bg-transparent disabled:bg-gray-10 dark:disabled:bg-gray-40 rounded-1 border-solid border-small font-aktiv-grotesk text-16 leading-loose p-2 w-full mlb-0";
3
+ export declare const selectStylesErrorBorderStyles = "border-alert-light dark:border-alert-dark";
4
+ export declare const selectStylesBaseBorderStyles = "border-tertiary-light dark:border-tertiary-dark";
5
+ export declare const labelTextStyle = "text-text-muted-light dark:text-text-muted-dark";
6
+ export declare const labelStyle: string;
7
+ export declare const labelVisualStyle = "-translate-y-1 opacity-100";
8
+ export declare const selectTextStyle = "text-overlay-text dark:text-text-dark";
9
+ export declare const selectSelectedStyle = "!pbs-3 pbe-1";
10
+ export declare const downIconWrapper = "absolute block-end-2 inline-end-1.5 leading-0 pointer-events-none text-text-muted-light dark:text-text-muted-dark";
11
+ //# sourceMappingURL=SelectStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectStyles.d.ts","sourceRoot":"","sources":["../../../src/Select/SelectStyles.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,yEAAyE,CAAC;AACnG,eAAO,MAAM,YAAY,2LACiK,CAAC;AAC3L,eAAO,MAAM,6BAA6B,8CAA8C,CAAC;AACzF,eAAO,MAAM,4BAA4B,oDAAoD,CAAC;AAE9F,eAAO,MAAM,cAAc,oDAAoD,CAAC;AAChF,eAAO,MAAM,UAAU,QAGtB,CAAC;AACF,eAAO,MAAM,gBAAgB,+BAA+B,CAAC;AAE7D,eAAO,MAAM,eAAe,0CAA0C,CAAC;AACvE,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAElD,eAAO,MAAM,eAAe,sHACyF,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './Option';
2
+ export * from './Select';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Select/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from './Box';
2
2
  export * from './Breadcrumb';
3
3
  export * from './Button';
4
4
  export * from './Checkbox';
5
+ export * from './Divider';
5
6
  export * from './FocusTrap';
6
7
  export * from './IconButton';
7
8
  export * from './IconLinkButton';
@@ -13,6 +14,9 @@ export * from './ListItemText';
13
14
  export * from './Popover';
14
15
  export * from './PopoverBody';
15
16
  export * from './PopoverTrigger';
17
+ export * from './RadioSet';
18
+ export * from './Select';
16
19
  export * from './TimePicker';
17
20
  export * from './Tooltip';
21
+ export * from './Typography';
18
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC"}