@youversion/design-system-components 0.0.23 → 0.0.26

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,27 @@
1
1
  # @youversion/design-system-components
2
2
 
3
+ ## 0.0.26
4
+
5
+ ### Patch Changes
6
+
7
+ - 40a15d6: Updatet style for AutocompleteSelect Component
8
+
9
+ ## 0.0.25
10
+
11
+ ### Patch Changes
12
+
13
+ - cc8f4ad: Added `ImageUpload` component, new spacing class to support 160px, and `Dismiss` icon.
14
+ - Updated dependencies [cc8f4ad]
15
+ - @youversion/design-system-tokens@0.0.3
16
+ - @youversion/design-system-icons@0.0.9
17
+ - @youversion/design-system-core@0.0.4
18
+
19
+ ## 0.0.24
20
+
21
+ ### Patch Changes
22
+
23
+ - 975419f: Added Autocomplete Select Component
24
+
3
25
  ## 0.0.23
4
26
 
5
27
  ### Patch Changes
@@ -0,0 +1,49 @@
1
+ import React from 'react';
2
+ export interface SelectOption {
3
+ label: string;
4
+ value: string | number | undefined;
5
+ }
6
+ export interface AutocompleteSelectProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'width' | 'height' | 'className' | 'type' | 'onChange' | 'onSelect' | 'onBlur'> {
7
+ /** If true, the select will be disabled. */
8
+ disabled?: boolean;
9
+ /** The error message to display. Also turns the border of the select red. */
10
+ error?: string;
11
+ /** A hint to provide to the user. */
12
+ hint?: string;
13
+ /** Label for the input. */
14
+ label: string;
15
+ /** Name used inside of the form. */
16
+ name?: string;
17
+ /** Text that will appear when no options are available. */
18
+ noOptionsText: string;
19
+ /** Executes when input changes. */
20
+ onChange: (newValue: string) => void;
21
+ /** Executes when an item is selected. */
22
+ onSelect: (selection: SelectOption) => void;
23
+ /** The options to filter and select from. */
24
+ options: Array<SelectOption>;
25
+ /** The value of the component. */
26
+ value: string;
27
+ }
28
+ /**
29
+ * The **AutocompleteSelect** component is used to allow the user to search and select into a form.
30
+ *
31
+ * Accepts {@link AutocompleteSelectProps}.
32
+ *
33
+ * @returns Renders the select input field to be used in a form.
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * import { AutocompleteSelect } from '@youversion/design-system-components';
38
+ *
39
+ * function MyComponent() {
40
+ * return (
41
+ * <>
42
+ * <AutocompleteSelect label='Troopers' onChange={e => setState(e)} onSelect={(selection: SelectOption) => console.log(`Selection: ${selection.label}`)} options={options} value={state} />
43
+ * </>
44
+ * )
45
+ * }
46
+ * ```
47
+ */
48
+ export declare const AutocompleteSelect: React.ForwardRefExoticComponent<AutocompleteSelectProps & React.RefAttributes<HTMLInputElement>>;
49
+ //# sourceMappingURL=AutocompleteSelect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutocompleteSelect.d.ts","sourceRoot":"","sources":["../../../src/AutocompleteSelect/AutocompleteSelect.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,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,mCAAmC;IACnC,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;AAoGD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,kBAAkB,kGAAgD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './AutocompleteSelect';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/AutocompleteSelect/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './AutocompleteSelect';
1
2
  export * from './Box';
2
3
  export * from './Breadcrumb';
3
4
  export * from './Button';
@@ -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,cAAc,CAAC;AAC7B,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,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,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