@talixo-ds/options-input 0.0.21 → 0.0.23

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.
Files changed (42) hide show
  1. package/dist/__snapshots__/options-input.spec.tsx.snap +251 -0
  2. package/dist/components/min-max-value-label.d.ts +6 -0
  3. package/dist/components/min-max-value-label.js +4 -0
  4. package/dist/components/min-max-value-label.js.map +1 -0
  5. package/dist/components/options-input-content-item.d.ts +8 -0
  6. package/dist/components/options-input-content-item.js +14 -0
  7. package/dist/components/options-input-content-item.js.map +1 -0
  8. package/dist/components/options-input-dropdown-item.d.ts +10 -0
  9. package/dist/components/options-input-dropdown-item.js +60 -0
  10. package/dist/components/options-input-dropdown-item.js.map +1 -0
  11. package/dist/components/tests/__snapshots__/min-max-value-label.spec.tsx.snap +17 -0
  12. package/dist/components/tests/__snapshots__/options-input-content-item.spec.tsx.snap +138 -0
  13. package/dist/components/tests/__snapshots__/options-input-dropdown-item.spec.tsx.snap +134 -0
  14. package/dist/components/tests/min-max-value-label.spec.d.ts +1 -0
  15. package/dist/components/tests/min-max-value-label.spec.js +21 -0
  16. package/dist/components/tests/min-max-value-label.spec.js.map +1 -0
  17. package/dist/components/tests/options-input-content-item.spec.d.ts +1 -0
  18. package/dist/components/tests/options-input-content-item.spec.js +43 -0
  19. package/dist/components/tests/options-input-content-item.spec.js.map +1 -0
  20. package/dist/components/tests/options-input-dropdown-item.spec.d.ts +1 -0
  21. package/dist/components/tests/options-input-dropdown-item.spec.js +61 -0
  22. package/dist/components/tests/options-input-dropdown-item.spec.js.map +1 -0
  23. package/dist/index.d.ts +2 -0
  24. package/dist/index.js +2 -0
  25. package/dist/index.js.map +1 -0
  26. package/dist/options-input.composition.d.ts +4 -0
  27. package/dist/options-input.composition.js +42 -0
  28. package/dist/options-input.composition.js.map +1 -0
  29. package/dist/options-input.d.ts +36 -0
  30. package/dist/options-input.docs.mdx +157 -0
  31. package/dist/options-input.js +130 -0
  32. package/dist/options-input.js.map +1 -0
  33. package/dist/options-input.spec.d.ts +1 -0
  34. package/dist/options-input.spec.js +162 -0
  35. package/dist/options-input.spec.js.map +1 -0
  36. package/dist/preview-1718288241661.js +7 -0
  37. package/dist/styles.scss +54 -0
  38. package/dist/tsconfig.json +40 -0
  39. package/dist/types.d.ts +13 -0
  40. package/dist/types.js +2 -0
  41. package/dist/types.js.map +1 -0
  42. package/package.json +2 -2
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import ShallowRenderer from 'react-test-renderer/shallow';
3
+ import '@testing-library/jest-dom';
4
+ import { MinMaxValueLabel } from '../min-max-value-label';
5
+ const props = {
6
+ min: 0,
7
+ max: 100,
8
+ color: 'black',
9
+ };
10
+ describe('MinMaxValueLabel', () => {
11
+ let component;
12
+ const renderer = ShallowRenderer.createRenderer();
13
+ beforeEach(() => {
14
+ renderer.render(_jsx(MinMaxValueLabel, { ...props }));
15
+ component = renderer.getRenderOutput();
16
+ });
17
+ it('should match snapshot', () => {
18
+ expect(component).toMatchSnapshot();
19
+ });
20
+ });
21
+ //# sourceMappingURL=min-max-value-label.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"min-max-value-label.spec.js","sourceRoot":"","sources":["../../../components/tests/min-max-value-label.spec.tsx"],"names":[],"mappings":";AACA,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAC1D,OAAO,2BAA2B,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,KAAK,GAAG;IACZ,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,GAAG;IACR,KAAK,EAAE,OAAO;CACf,CAAC;AAEF,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,IAAI,SAAsB,CAAC;IAC3B,MAAM,QAAQ,GAAG,eAAe,CAAC,cAAc,EAAE,CAAC;IAElD,UAAU,CAAC,GAAG,EAAE;QACd,QAAQ,CAAC,MAAM,CAAC,KAAC,gBAAgB,OAAK,KAAK,GAAI,CAAC,CAAC;QACjD,SAAS,GAAG,QAAQ,CAAC,eAAe,EAAE,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;QAC/B,MAAM,CAAC,SAAS,CAAC,CAAC,eAAe,EAAE,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import ShallowRenderer from 'react-test-renderer/shallow';
3
+ import '@testing-library/jest-dom';
4
+ import OptionsInputContentItem from '../options-input-content-item';
5
+ jest.mock('@mui/icons-material', () => ({
6
+ luggage: 'div',
7
+ }));
8
+ jest.mock('@talixo-ds/component.icons', () => ({
9
+ football: 'div',
10
+ }));
11
+ const props = {
12
+ item: {
13
+ id: 'luggage',
14
+ icon: 'luggage',
15
+ label: 'luggage',
16
+ details: 'This is your luggage',
17
+ min: -10,
18
+ max: 10,
19
+ quantity: 0,
20
+ inputQuantity: 0,
21
+ },
22
+ displayMinMax: true,
23
+ };
24
+ describe('OptionsInputDropdownItem', () => {
25
+ let component;
26
+ const renderer = ShallowRenderer.createRenderer();
27
+ it('should match snapshot', () => {
28
+ renderer.render(_jsx(OptionsInputContentItem, { ...props }));
29
+ component = renderer.getRenderOutput();
30
+ expect(component).toMatchSnapshot();
31
+ });
32
+ it('should render proper alternative styling', () => {
33
+ renderer.render(_jsx(OptionsInputContentItem, { item: { ...props.item, quantity: 1 } }));
34
+ component = renderer.getRenderOutput();
35
+ expect(component).toMatchSnapshot();
36
+ });
37
+ it('should not render tooltip when there is no label', () => {
38
+ renderer.render(_jsx(OptionsInputContentItem, { item: { ...props.item, label: undefined } }));
39
+ component = renderer.getRenderOutput();
40
+ expect(component).toMatchSnapshot();
41
+ });
42
+ });
43
+ //# sourceMappingURL=options-input-content-item.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options-input-content-item.spec.js","sourceRoot":"","sources":["../../../components/tests/options-input-content-item.spec.tsx"],"names":[],"mappings":";AACA,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAC1D,OAAO,2BAA2B,CAAC;AACnC,OAAO,uBAAuB,MAAM,+BAA+B,CAAC;AAEpE,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,GAAG,EAAE,CAAC,CAAC;IACtC,OAAO,EAAE,KAAK;CACf,CAAC,CAAC,CAAC;AAEJ,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAE,GAAG,EAAE,CAAC,CAAC;IAC7C,QAAQ,EAAE,KAAK;CAChB,CAAC,CAAC,CAAC;AAEJ,MAAM,KAAK,GAAG;IACZ,IAAI,EAAE;QACJ,EAAE,EAAE,SAAS;QACb,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,sBAAsB;QAC/B,GAAG,EAAE,CAAC,EAAE;QACR,GAAG,EAAE,EAAE;QACP,QAAQ,EAAE,CAAC;QACX,aAAa,EAAE,CAAC;KACjB;IACD,aAAa,EAAE,IAAI;CACpB,CAAC;AAEF,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,IAAI,SAAsB,CAAC;IAC3B,MAAM,QAAQ,GAAG,eAAe,CAAC,cAAc,EAAE,CAAC;IAElD,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;QAC/B,QAAQ,CAAC,MAAM,CAAC,KAAC,uBAAuB,OAAK,KAAK,GAAI,CAAC,CAAC;QAExD,SAAS,GAAG,QAAQ,CAAC,eAAe,EAAE,CAAC;QACvC,MAAM,CAAC,SAAS,CAAC,CAAC,eAAe,EAAE,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;QAClD,QAAQ,CAAC,MAAM,CACb,KAAC,uBAAuB,IAAC,IAAI,EAAE,EAAE,GAAG,KAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAI,CAClE,CAAC;QAEF,SAAS,GAAG,QAAQ,CAAC,eAAe,EAAE,CAAC;QACvC,MAAM,CAAC,SAAS,CAAC,CAAC,eAAe,EAAE,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kDAAkD,EAAE,GAAG,EAAE;QAC1D,QAAQ,CAAC,MAAM,CACb,KAAC,uBAAuB,IAAC,IAAI,EAAE,EAAE,GAAG,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,GAAI,CACvE,CAAC;QAEF,SAAS,GAAG,QAAQ,CAAC,eAAe,EAAE,CAAC;QACvC,MAAM,CAAC,SAAS,CAAC,CAAC,eAAe,EAAE,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,61 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import ShallowRenderer from 'react-test-renderer/shallow';
3
+ import { render, screen, fireEvent } from '@testing-library/react';
4
+ import '@testing-library/jest-dom';
5
+ import OptionsInputDropdownItem from '../options-input-dropdown-item';
6
+ jest.mock('@mui/icons-material', () => ({
7
+ luggage: 'div',
8
+ }));
9
+ jest.mock('@talixo-ds/component.icons', () => ({
10
+ football: 'div',
11
+ }));
12
+ const onChangeMock = jest.fn();
13
+ const onBlurMock = jest.fn();
14
+ const props = {
15
+ item: {
16
+ id: 'luggage-id',
17
+ icon: 'luggage',
18
+ details: 'This is your luggage. Please, keep your attention not to lose it.',
19
+ min: -10,
20
+ max: 10,
21
+ quantity: 0,
22
+ inputQuantity: 0,
23
+ },
24
+ onBlur: onBlurMock,
25
+ onChange: onChangeMock,
26
+ index: 1,
27
+ };
28
+ describe('OptionsInputDropdownItem', () => {
29
+ let component;
30
+ const renderer = ShallowRenderer.createRenderer();
31
+ it('should match snapshot', () => {
32
+ renderer.render(_jsx(OptionsInputDropdownItem, { ...props }));
33
+ component = renderer.getRenderOutput();
34
+ expect(component).toMatchSnapshot();
35
+ });
36
+ describe('events', () => {
37
+ beforeEach(() => render(_jsx(OptionsInputDropdownItem, { ...props })));
38
+ it('should call onChange on text field edit', async () => {
39
+ const input = screen.getByTestId('dropdown-item-input');
40
+ await fireEvent.change(input, { target: { value: '10' } });
41
+ expect(onChangeMock).toHaveBeenCalledWith('luggage-id', '10');
42
+ });
43
+ it('should call onChange on increment button click', () => {
44
+ const buttons = screen.getAllByRole('button');
45
+ fireEvent.click(buttons[0]);
46
+ expect(onChangeMock).toHaveBeenCalledWith('luggage-id', 1);
47
+ });
48
+ it('should call onChange on decrement button click', () => {
49
+ const buttons = screen.getAllByRole('button');
50
+ fireEvent.click(buttons[1]);
51
+ expect(onChangeMock).toHaveBeenCalledWith('luggage-id', -1);
52
+ });
53
+ it('should expand details content', () => {
54
+ expect(screen.getByTestId('option-details')).toHaveTextContent(props.item.details.slice(0, 15));
55
+ const optionDetailsContainer = screen.getByTestId('option-details-container');
56
+ fireEvent.mouseEnter(optionDetailsContainer);
57
+ expect(screen.getByTestId('option-details')).toHaveTextContent(props.item.details);
58
+ });
59
+ });
60
+ });
61
+ //# sourceMappingURL=options-input-dropdown-item.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options-input-dropdown-item.spec.js","sourceRoot":"","sources":["../../../components/tests/options-input-dropdown-item.spec.tsx"],"names":[],"mappings":";AACA,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,2BAA2B,CAAC;AACnC,OAAO,wBAAwB,MAAM,gCAAgC,CAAC;AAEtE,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,GAAG,EAAE,CAAC,CAAC;IACtC,OAAO,EAAE,KAAK;CACf,CAAC,CAAC,CAAC;AAEJ,IAAI,CAAC,IAAI,CAAC,4BAA4B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CAAC"}
@@ -0,0 +1,2 @@
1
+ export { OptionsInput } from './options-input';
2
+ export type { OptionsInputProps } from './options-input';
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { OptionsInput } from './options-input';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const BasicOptionsInput: () => import("react/jsx-runtime").JSX.Element;
2
+ export declare const OptionsInputWithDefaultValues: () => import("react/jsx-runtime").JSX.Element;
3
+ export declare const OptionsInputWithPersistentOptions: () => import("react/jsx-runtime").JSX.Element;
4
+ export declare const OptionsInputDisabled: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ThemeProvider } from '@mui/material/styles';
3
+ import { NextBookingTheme } from "@talixo-ds/component.next-booking-theme";
4
+ import { NextDashboardTheme } from "@talixo-ds/component.next-dashboard-theme";
5
+ import { OptionsInput } from './options-input';
6
+ const options = [
7
+ {
8
+ id: 'abc',
9
+ icon: 'Abc',
10
+ label: 'ABC',
11
+ details: 'This label is longer so it should be hidden.',
12
+ min: 3,
13
+ max: 100
14
+ },
15
+ {
16
+ id: 'add',
17
+ icon: 'This icon does not exist',
18
+ label: 'Add',
19
+ details: 'Add new products',
20
+ max: 10
21
+ },
22
+ {
23
+ id: 'golf',
24
+ icon: 'GolfSticks',
25
+ label: 'Golf'
26
+ },
27
+ {
28
+ id: 'pets',
29
+ icon: 'Pets',
30
+ details: 'Long pet details to display.'
31
+ }
32
+ ];
33
+ const defaultValue = {
34
+ abc: 2,
35
+ adb: 1
36
+ };
37
+ const persistentOptions = ['add'];
38
+ export const BasicOptionsInput = () => _jsx(OptionsInput, { options: options });
39
+ export const OptionsInputWithDefaultValues = () => (_jsx(ThemeProvider, { theme: NextDashboardTheme, children: _jsx(OptionsInput, { options: options, defaultValue: defaultValue }) }));
40
+ export const OptionsInputWithPersistentOptions = () => (_jsx(ThemeProvider, { theme: NextBookingTheme, children: _jsx(OptionsInput, { options: options, persistentOptions: persistentOptions, itemsGap: 5 }) }));
41
+ export const OptionsInputDisabled = () => (_jsx(ThemeProvider, { theme: NextBookingTheme, children: _jsx(OptionsInput, { options: options, defaultValue: defaultValue, disabled: true }) }));
42
+ //# sourceMappingURL=options-input.composition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options-input.composition.js","sourceRoot":"","sources":["../options-input.composition.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,OAAO,GAAG;IACZ;QACE,EAAE,EAAE,KAAK;QACT,IAAI,EAAE,KAAK;QACX,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,8CAA8C;QACvD,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,GAAG;KACT;IACH;QACE,EAAE,EAAE,KAAK;QACT,IAAI,EAAE,0BAA0B;QAChC,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,kBAAkB;QAC3B,GAAG,EAAE,EAAE;KACR;IACD;QACE,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,MAAM;KACd;IACD;QACE,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,8BAA8B;KACxC;CACF,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,CAAC;CACP,CAAA;AAED,MAAM,iBAAiB,GAAG,CAAC,KAAK,CAAC,CAAA;AAEjC,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC,KAAC,YAAY,IAAC,OAAO,EAAE,OAAO,GAAI,CAAC;AAE1E,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,EAAE,CAAC,CAC/C,KAAC,aAAa,IAAC,KAAK,EAAE,kBAAkB,YAC1C,KAAC,YAAY,IAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,GAAI,GAC5C,CACnB,CAAA;AAED,MAAM,CAAC,MAAM,iCAAiC,GAAG,GAAG,EAAE,CAAC,CACrD,KAAC,aAAa,IAAC,KAAK,EAAE,gBAAgB,YACpC,KAAC,YAAY,IAAC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,CAAC,GAAI,GACvE,CACjB,CAAA;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAAC,CACtC,KAAC,aAAa,IAAC,KAAK,EAAE,gBAAgB,YACpC,KAAC,YAAY,IAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,SAAG,GACzD,CACnB,CAAA"}
@@ -0,0 +1,36 @@
1
+ import type { SxProps } from '@mui/material';
2
+ import { OptionsInputOption, OptionsInputValue } from './types';
3
+ import './styles.scss';
4
+ import '@emotion/react';
5
+ import '@emotion/styled';
6
+ export type OptionsInputProps = {
7
+ /** Array of objects representing options available to choose from */
8
+ options: OptionsInputOption[];
9
+ /** Object with default values of some options */
10
+ defaultValue?: OptionsInputValue;
11
+ /** Array with ids of options which should remain displayed even if value is 0 */
12
+ persistentOptions?: string[];
13
+ /** Boolean to determine if input is disabled */
14
+ disabled?: boolean;
15
+ /** Boolean to determine if input is readOnly */
16
+ readOnly?: boolean;
17
+ /** Boolean to determine if min and max input values should be displayed */
18
+ displayMinMax?: boolean;
19
+ /** Function which handles options input value change */
20
+ onChange?: (OptionsInputValue: any) => void;
21
+ /** Function which handles options input focus event */
22
+ onFocus?: (OptionsInputValue: any) => void;
23
+ /** Function which handles options input blur event */
24
+ onBlur?: (OptionsInputValue: any) => void;
25
+ /** className attached to an input container */
26
+ className?: string;
27
+ /** id attached to an input container */
28
+ id?: string;
29
+ /** data test id attached to an input container */
30
+ 'data-testid'?: string;
31
+ /** Gap between input items */
32
+ itemsGap?: string | number;
33
+ /** Custom styles for container */
34
+ containerSx?: SxProps;
35
+ };
36
+ export declare const OptionsInput: ({ options, onChange, onFocus, onBlur, persistentOptions, defaultValue, displayMinMax, disabled, readOnly, id, className, itemsGap, containerSx, ...rest }: OptionsInputProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,157 @@
1
+ ---
2
+ description: OptionsInput component.
3
+ ---
4
+
5
+ ## Props examples
6
+
7
+ #### options (required)
8
+ Props options is an array of objects defining which options should be available in the input.
9
+
10
+ ```js
11
+
12
+ const options = [
13
+ {
14
+ id: 'android', // required
15
+ icon: 'android', // required
16
+ label: 'Android', //required
17
+ details: 'This is android option', // optional
18
+ min: 0, // optional
19
+ max: 15, // optional
20
+ },
21
+ {
22
+ id: 'luggage',
23
+ icon: 'bag',
24
+ label: 'Luggage',
25
+ details: 'Luggage for the client',
26
+ min: 0,
27
+ max: 5,
28
+ }
29
+ ];
30
+
31
+ ```
32
+
33
+ #### defaultValue (optional)
34
+ Props defaultValue is an object with keys representing options ids and value representing input value for them.
35
+
36
+ ```js
37
+
38
+ const defaultValue = { android: 1, luggage: 4 };
39
+
40
+ ```
41
+
42
+ #### persistentOptions (optional)
43
+ Props persistentOptions is an array of ids of options which should be displayed in input even if their value is 0.
44
+
45
+ ```js
46
+
47
+ const persistentOptions = ['luggage', 'android'];
48
+
49
+ ```
50
+
51
+ #### disabled (optional)
52
+ Props disabled is a boolean which determines if input is disabled.
53
+
54
+ ```js
55
+
56
+ const disabled = false;
57
+
58
+ ```
59
+
60
+ #### readOnly (optional)
61
+ Props readOnly is a boolean which determines if input is readOnly.
62
+
63
+ ```js
64
+
65
+ const readOnly = false;
66
+
67
+ ```
68
+
69
+ #### displayMinMax (optional)
70
+ Props displayMinMax is a boolean which determines if min and max value for option is displayed in tooltip and dropdown.
71
+
72
+ ```js
73
+
74
+ const displayMinMax = true;
75
+
76
+ ```
77
+
78
+ #### id (optional)
79
+ Props id allows to attach custom id to input container.
80
+
81
+ ```js
82
+
83
+ const id = 'input-id';
84
+
85
+ ```
86
+
87
+ #### className (optional)
88
+ Props className allows to attach custom class to input container.
89
+
90
+ ```js
91
+
92
+ const className = 'input-class';
93
+
94
+ ```
95
+
96
+ #### data-testid (optional)
97
+ Props data-testid allows to attach custom data-testid to input container for testing purposes.
98
+
99
+ ```js
100
+
101
+ const dataTestId = 'input-data-testid';
102
+
103
+ ```
104
+
105
+ #### onChange (optional)
106
+ Props onChange is a function which allows to add a custom handling of input option value change. It takes object with option ids as keys and their respective quantities as values as an argument.
107
+
108
+ ```js
109
+
110
+ const onChange = (inputValues) => {
111
+ // ...handler body
112
+ }
113
+
114
+ ```
115
+
116
+ #### onBlur (optional)
117
+ Props onBlur is a function which allows to add a custom handling for input container blur event. It takes the same object as onChange handler as an argument.
118
+
119
+ ```js
120
+
121
+ const onBlur = (inputValues) => {
122
+ // ...handler body
123
+ }
124
+
125
+ ```
126
+
127
+ #### onFocus (optional)
128
+ Props onFocus is a function which allows to add a custom handling for input container blur event. It takes the same object as onChange handler as an argument.
129
+
130
+ ```js
131
+
132
+ const onFocus = (inputValues) => {
133
+ // ...handler body
134
+ }
135
+
136
+ ```
137
+
138
+ #### itemsGap (optional)
139
+ Props itemsGap is a number or string which allows user to customize gap between items in the input.
140
+
141
+ ```js
142
+
143
+ const itemsGap = '2px'
144
+
145
+ ```
146
+
147
+ ## Example component usage
148
+
149
+ ```js
150
+ import { OptionsInput } from '@talixo-ds/component.options-input';
151
+
152
+ // ...
153
+
154
+ export const OptionsInputExample = () => (
155
+ <OptionsInput options={options} persistentOptions={persistentOptions} />
156
+ );
157
+ ```
@@ -0,0 +1,130 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useState, useEffect } from 'react';
3
+ import classNames from 'classnames';
4
+ import Box from '@mui/material/Box';
5
+ import List from '@mui/material/List';
6
+ import Popper from '@mui/material/Popper';
7
+ import ClickAwayListener from '@mui/material/ClickAwayListener';
8
+ import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
9
+ import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
10
+ import * as MuiIcons from '@mui/icons-material';
11
+ import * as DesignSystemIcons from '@talixo-ds/icons';
12
+ import OptionsInputContentItem from './components/options-input-content-item';
13
+ import OptionsInputDropdownItem from './components/options-input-dropdown-item';
14
+ import './styles.scss';
15
+ import '@emotion/react';
16
+ import '@emotion/styled';
17
+ export const OptionsInput = ({ options, onChange, onFocus, onBlur, persistentOptions = [], defaultValue, displayMinMax = false, disabled = false, readOnly = false, id, className, itemsGap = 1, containerSx = [], ...rest }) => {
18
+ const [currentOptions, setCurrentOptions] = useState([]);
19
+ const [anchorEl, setAnchorEl] = useState();
20
+ const open = !!anchorEl;
21
+ useEffect(() => setCurrentOptions(options.map((option) => {
22
+ const defaultQuantity = defaultValue?.[option.id] ?? 0;
23
+ const minQuantity = defaultQuantity < option?.min ? option?.min : defaultQuantity;
24
+ const quantity = minQuantity > option?.max ? option?.max : minQuantity;
25
+ return {
26
+ ...option,
27
+ quantity,
28
+ inputQuantity: quantity,
29
+ };
30
+ })), [options, defaultValue]);
31
+ const toggleInput = (event) => {
32
+ const { currentTarget } = event;
33
+ if (!disabled && !readOnly) {
34
+ setTimeout(() => {
35
+ setAnchorEl(anchorEl ? undefined : currentTarget);
36
+ }, 0);
37
+ }
38
+ };
39
+ const onInputFocus = () => {
40
+ if (onFocus) {
41
+ onFocus(currentOptions.reduce((currentValues, currentOption) => ({
42
+ ...currentValues,
43
+ [currentOption.id]: currentOption.quantity,
44
+ }), {}));
45
+ }
46
+ };
47
+ const onInputBlur = () => {
48
+ if (onBlur) {
49
+ onBlur(currentOptions.reduce((currentValues, currentOption) => ({
50
+ ...currentValues,
51
+ [currentOption.id]: currentOption.quantity,
52
+ }), {}));
53
+ }
54
+ };
55
+ const onValueChange = (optionId, newValue) => {
56
+ const newQuantity = Number.isNaN(Number(newValue)) ? 0 : Number(newValue);
57
+ const newCurrentOptions = currentOptions.map((option) => {
58
+ const maxQuantity = newQuantity > (option.max || Infinity) ? option.max : newQuantity;
59
+ return {
60
+ ...option,
61
+ ...(optionId === option.id && {
62
+ quantity: newQuantity < (option.min || -Infinity) ? option.min : maxQuantity,
63
+ inputQuantity: newValue,
64
+ }),
65
+ };
66
+ });
67
+ if (onChange) {
68
+ onChange(newCurrentOptions.reduce((currentValues, currentOption) => ({
69
+ ...currentValues,
70
+ [currentOption.id]: currentOption.quantity,
71
+ }), {}));
72
+ }
73
+ setCurrentOptions(newCurrentOptions);
74
+ };
75
+ const onDropdownItemBlur = (optionId) => () => setCurrentOptions(currentOptions.map((option) => {
76
+ if (optionId !== option.id)
77
+ return option;
78
+ const finalQuantity = Number.isNaN(Number(option.inputQuantity))
79
+ ? 0
80
+ : Number(option.inputQuantity);
81
+ const maxQuantity = finalQuantity > (option.max || Infinity) ? option.max : finalQuantity;
82
+ return {
83
+ ...option,
84
+ inputQuantity: finalQuantity < (option.min || -Infinity)
85
+ ? option.min
86
+ : maxQuantity,
87
+ };
88
+ }));
89
+ return (_jsxs(_Fragment, {
90
+ children: [_jsxs(Box, {
91
+ id: id, onClick: toggleInput, onBlur: onInputBlur, onFocus: onInputFocus, className: classNames('options-input__container', {
92
+ 'options-input__container--open': open,
93
+ 'options-input__container--disabled': disabled,
94
+ 'options-input__container--read-only': readOnly,
95
+ [className]: !!className,
96
+ }), sx: [
97
+ { '&:hover': { borderColor: '#d3d3d3' } },
98
+ ...(Array.isArray(containerSx) ? containerSx : [containerSx]),
99
+ open && {
100
+ borderColor: (theme) => theme.palette.primary.main,
101
+ '&:hover': { borderColor: (theme) => theme.palette.primary.main },
102
+ },
103
+ ], "data-testid": rest['data-testid'] || 'options-input-container', tabIndex: 0, children: [_jsx(Box, {
104
+ display: "flex", gap: itemsGap, children: currentOptions
105
+ .filter(({ quantity, id: optionId, icon }) => !!(MuiIcons?.[icon] || DesignSystemIcons?.[icon]) &&
106
+ (quantity !== 0 || persistentOptions.includes(optionId)))
107
+ .map((option) => (_jsx(OptionsInputContentItem, { item: option, disabled: disabled, displayMinMax: displayMinMax }, option.id)))
108
+ }), !readOnly &&
109
+ (open ? (_jsx(KeyboardArrowUpIcon, { color: "primary" })) : (_jsx(KeyboardArrowDownIcon, {
110
+ sx: {
111
+ color: (theme) => disabled
112
+ ? theme.palette.grey[400]
113
+ : theme.palette.action.focus,
114
+ }
115
+ })))]
116
+ }), _jsx(ClickAwayListener, {
117
+ onClickAway: () => open && setAnchorEl(undefined), children: _jsx(Popper, {
118
+ open: open, placement: "bottom-start", anchorEl: anchorEl, sx: (theme) => ({ zIndex: theme.zIndex.modal }), children: _jsx(List, {
119
+ disablePadding: true, "data-testid": "options-dropdown-list", className: "options-input__dropdown-items-list", sx: {
120
+ bgcolor: 'Background',
121
+ border: (theme) => `thin solid ${theme.palette.primary.main}`,
122
+ }, children: currentOptions
123
+ .filter(({ icon }) => !!(MuiIcons?.[icon] || DesignSystemIcons?.[icon]))
124
+ .map((option, index) => (_jsx(OptionsInputDropdownItem, { item: option, onBlur: onDropdownItemBlur(option.id), onChange: onValueChange, index: index, displayMinMax: displayMinMax }, option.id)))
125
+ })
126
+ })
127
+ })]
128
+ }));
129
+ };
130
+ //# sourceMappingURL=options-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options-input.js","sourceRoot":"","sources":["../options-input.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,GAAG,MAAM,mBAAmB,CAAC;AACpC,OAAO,IAAI,MAAM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