@mrshmllw/smores-react 2.10.0 → 2.12.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.
Files changed (70) hide show
  1. package/dist/Accordion/Accordion.d.ts +1 -1
  2. package/dist/ActionDropdown/ActionDropdown.d.ts +1 -1
  3. package/dist/ActionDropdown/List.d.ts +2 -2
  4. package/dist/Box/Box.d.ts +1 -1
  5. package/dist/Button/Button.d.ts +2 -2
  6. package/dist/Button/LegacyButton.d.ts +1 -1
  7. package/dist/Card/Card.d.ts +1 -1
  8. package/dist/CheckBox/CheckBox.d.ts +3 -3
  9. package/dist/CheckBox/CheckBox.js +4 -4
  10. package/dist/CheckBox/CheckBox.js.map +1 -1
  11. package/dist/CheckBox/CheckBox.stories.d.ts +1 -1
  12. package/dist/CheckBoxGroup/CheckBoxGroup.d.ts +2 -2
  13. package/dist/Chip/Chip.d.ts +2 -2
  14. package/dist/ConfirmationRadioButtons/Confirmation.d.ts +1 -1
  15. package/dist/ConfirmationRadioButtons/RadioButtonStyled.d.ts +1 -1
  16. package/dist/Datepicker/Datepicker.d.ts +1 -1
  17. package/dist/Datepicker/DatesList.d.ts +1 -1
  18. package/dist/Divider/Divider.d.ts +1 -1
  19. package/dist/Dropdown/Dropdown.d.ts +3 -3
  20. package/dist/Emoji/Emoji.d.ts +1 -1
  21. package/dist/Field/Field.d.ts +1 -2
  22. package/dist/Field/Field.js +20 -8
  23. package/dist/Field/Field.js.map +1 -1
  24. package/dist/Field/types/commonFieldTypes.d.ts +0 -1
  25. package/dist/Fieldset/Fieldset.js +7 -2
  26. package/dist/Fieldset/Fieldset.js.map +1 -1
  27. package/dist/Icon/Container.js +9 -0
  28. package/dist/Icon/Container.js.map +1 -1
  29. package/dist/Icon/Icon.d.ts +1 -1
  30. package/dist/Icon/Icon.js +10 -0
  31. package/dist/Icon/Icon.js.map +1 -1
  32. package/dist/IconWrapper/IconWrapper.d.ts +1 -1
  33. package/dist/LabelledText/LabelledText.d.ts +1 -1
  34. package/dist/Link/Link.d.ts +2 -2
  35. package/dist/Loader/Loader.d.ts +1 -1
  36. package/dist/Message/Message.d.ts +2 -2
  37. package/dist/Modal/Modal.d.ts +1 -1
  38. package/dist/NumberInput/NumberInput.d.ts +2 -2
  39. package/dist/Pagination/Pagination.d.ts +1 -1
  40. package/dist/RadioButton/RadioButton.d.ts +1 -1
  41. package/dist/RadioGroup/RadioElement.d.ts +5 -7
  42. package/dist/RadioGroup/RadioElement.js +3 -3
  43. package/dist/RadioGroup/RadioElement.js.map +1 -1
  44. package/dist/RadioGroup/RadioGroup.d.ts +12 -3
  45. package/dist/RadioGroup/RadioGroup.js +3 -2
  46. package/dist/RadioGroup/RadioGroup.js.map +1 -1
  47. package/dist/RadioGroup/RadioGroup.stories.d.ts +11 -3
  48. package/dist/RadioGroup/RadioItem.d.ts +5 -5
  49. package/dist/RadioGroup/RadioItem.js +4 -4
  50. package/dist/RadioGroup/RadioItem.js.map +1 -1
  51. package/dist/RadioGroup/types.d.ts +2 -2
  52. package/dist/Row/Row.d.ts +1 -1
  53. package/dist/SearchInput/SearchInput.d.ts +3 -3
  54. package/dist/SearchInput/SearchInput.js +4 -4
  55. package/dist/SearchInput/SearchInput.js.map +1 -1
  56. package/dist/SearchInput/SearchInput.stories.d.ts +1 -1
  57. package/dist/SearchInput/SearchOptions.d.ts +2 -2
  58. package/dist/SupportMessage/SupportMessage.d.ts +2 -2
  59. package/dist/Tag/Tag.d.ts +3 -3
  60. package/dist/Text/Text.d.ts +4 -4
  61. package/dist/TextInput/TextInput.d.ts +2 -2
  62. package/dist/Textarea/Textarea.d.ts +3 -3
  63. package/dist/Toggle/Toggle.d.ts +1 -1
  64. package/dist/fields/Fieldset/Fieldset.d.ts +1 -1
  65. package/dist/theme.d.ts +1 -1
  66. package/dist/utils/deprecated.d.ts +1 -1
  67. package/dist/utils/flex.d.ts +1 -1
  68. package/dist/utils/measure.d.ts +1 -1
  69. package/dist/utils/space.d.ts +2 -2
  70. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { Color } from '../theme';
3
- export declare type LoaderProps = {
3
+ export type LoaderProps = {
4
4
  height: string;
5
5
  color?: Color;
6
6
  };
@@ -1,12 +1,12 @@
1
1
  import { FC, ReactNode } from 'react';
2
- declare type BorderProps = {
2
+ type BorderProps = {
3
3
  hasBorder?: false;
4
4
  borderColor?: never;
5
5
  } | {
6
6
  hasBorder: true;
7
7
  borderColor: string;
8
8
  };
9
- export declare type MessageProps = {
9
+ export type MessageProps = {
10
10
  className?: string;
11
11
  children: ReactNode;
12
12
  type?: 'info' | 'warning' | 'warning-bubble' | string;
@@ -1,5 +1,5 @@
1
1
  import { FC, ReactNode } from 'react';
2
- export declare type ModalProps = {
2
+ export type ModalProps = {
3
3
  title?: string;
4
4
  icon?: string;
5
5
  children?: ReactNode;
@@ -18,7 +18,7 @@ export interface Props extends CommonFieldProps {
18
18
  outlined?: boolean;
19
19
  }
20
20
  /** on change or on input required */
21
- declare type InputProps = {
21
+ type InputProps = {
22
22
  /** on change is required and on input optional */
23
23
  onChange: (e: string | number) => void;
24
24
  onInputChange?: (e: FormEvent<HTMLInputElement>) => void;
@@ -27,6 +27,6 @@ declare type InputProps = {
27
27
  onChange?: (e: string | number) => void;
28
28
  onInputChange: (e: FormEvent<HTMLInputElement>) => void;
29
29
  };
30
- export declare type NumberInputProps = Props & InputProps;
30
+ export type NumberInputProps = Props & InputProps;
31
31
  export declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLInputElement>>;
32
32
  export {};
@@ -1,6 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { MarginProps } from '../utils/space';
3
- export declare type PaginationProps = {
3
+ export type PaginationProps = {
4
4
  /** Total number of records */
5
5
  total: number;
6
6
  /** Number of records per page */
@@ -1,6 +1,6 @@
1
1
  import { FC, ChangeEvent } from 'react';
2
2
  import { MarginProps } from '../utils/space';
3
- export declare type RadioButtonProps = {
3
+ export type RadioButtonProps = {
4
4
  id?: string;
5
5
  label: string;
6
6
  checked?: boolean;
@@ -1,13 +1,11 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { MarginProps } from '../utils/space';
3
3
  import { BaseValueType } from './types';
4
- declare type RadioElementProps<Value extends BaseValueType> = {
4
+ export declare const RadioElement: React.ForwardRefExoticComponent<{
5
5
  name: string;
6
6
  id: string;
7
- value: Value;
7
+ value: BaseValueType;
8
8
  checked: boolean;
9
- onChange: (value: Value) => void;
9
+ onChange: (value: BaseValueType) => void;
10
10
  isError: boolean;
11
- } & MarginProps;
12
- export declare const RadioElement: <Value extends BaseValueType>({ name, id, value, checked, onChange, isError, ...marginProps }: RadioElementProps<Value>) => JSX.Element;
13
- export {};
11
+ } & MarginProps & React.RefAttributes<HTMLInputElement>>;
@@ -9,18 +9,18 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- import React from 'react';
12
+ import React, { forwardRef } from 'react';
13
13
  import styled from 'styled-components';
14
14
  import { theme } from '../theme';
15
15
  import { visuallyHidden } from '../utils/visuallyHidden';
16
16
  import { focusOutline } from '../utils/focusOutline';
17
17
  import { Box } from '../Box';
18
- export const RadioElement = (_a) => {
18
+ export const RadioElement = forwardRef(function RadioElement(_a) {
19
19
  var { name, id, value, checked, onChange, isError } = _a, marginProps = __rest(_a, ["name", "id", "value", "checked", "onChange", "isError"]);
20
20
  return (React.createElement(React.Fragment, null,
21
21
  React.createElement(StyledInput, { type: "radio", name: name, id: id, value: `${value}`, checked: checked, onChange: () => onChange(value) }),
22
22
  React.createElement(RadioCircle, Object.assign({ isError: isError, checked: checked }, marginProps))));
23
- };
23
+ });
24
24
  const StyledInput = styled.input `
25
25
  ${visuallyHidden}
26
26
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"RadioElement.js","sourceRoot":"","sources":["../../src/RadioGroup/RadioElement.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,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OAAO,EAAE,OAAO,EAAE,OAAO,IAAM,WAAW,EAAI,CACnE,CACJ,CAAA;AACH,CAAC,CACF,CAAA;AAED,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAA;IAC5B,cAAc;CACjB,CAAA;AAED,MAAM,UAAU,GAAG,EAAE,CAAA;AAErB,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,CAAwC;;WAE5D,UAAU;YACT,UAAU;mBACH,UAAU;sBACP,KAAK,CAAC,MAAM,CAAC,KAAK;;MAElC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;;IAExE,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CACzB,CAAC,OAAO;IACR,CAAC,OAAO;IACR;;0BAEsB,KAAK,CAAC,MAAM,CAAC,SAAS;;GAE7C;;IAEC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CACzB,OAAO;IACP,qBACE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,SAC9C,GAAG;;IAEH,YAAY,CAAC,EAAE,QAAQ,EAAE,GAAG,WAAW,oBAAoB,EAAE,CAAC;CACjE,CAAA"}
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import React, { ReactElement } from 'react';
2
2
  import { CommonFieldProps } from '../fields/commonFieldTypes';
3
3
  import { BaseValueType, DisplayType } from './types';
4
- export declare type RadioGroupProps<Value extends BaseValueType = BaseValueType> = {
4
+ export type RadioGroupProps<Value extends BaseValueType = BaseValueType> = {
5
5
  options: Array<{
6
6
  visual?: string;
7
7
  label: string;
@@ -11,4 +11,13 @@ export declare type RadioGroupProps<Value extends BaseValueType = BaseValueType>
11
11
  value: Value;
12
12
  displayType?: DisplayType;
13
13
  } & CommonFieldProps;
14
- export declare const RadioGroup: <Value extends BaseValueType>({ options, onChange, value, displayType, renderAsTitle, error, ...fieldProps }: RadioGroupProps<Value>) => JSX.Element;
14
+ export declare const RadioGroup: <Value extends BaseValueType = BaseValueType>(p: {
15
+ options: {
16
+ visual?: string | undefined;
17
+ label: string;
18
+ value: Value;
19
+ }[];
20
+ onChange: (value: Value) => void;
21
+ value: Value;
22
+ displayType?: DisplayType | undefined;
23
+ } & CommonFieldProps & React.RefAttributes<HTMLInputElement>) => ReactElement | null;
@@ -9,18 +9,19 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- import React from 'react';
12
+ import React, { forwardRef } from 'react';
13
13
  import styled from 'styled-components';
14
14
  import { useUniqueId } from '../utils/id';
15
15
  import { Fieldset } from '../fields/Fieldset';
16
16
  import { RadioItem } from './RadioItem';
17
17
  import { ITEM_GAP } from './constants';
18
- export const RadioGroup = (_a) => {
18
+ const RadioGroupComponent = (_a) => {
19
19
  var { options, onChange, value, displayType = 'normal', renderAsTitle = false, error = false } = _a, fieldProps = __rest(_a, ["options", "onChange", "value", "displayType", "renderAsTitle", "error"]);
20
20
  const name = useUniqueId();
21
21
  return (React.createElement(Fieldset, Object.assign({ renderAsTitle: renderAsTitle, error: error }, fieldProps),
22
22
  React.createElement(RadioItemList, { displayType: displayType }, options.map((option) => (React.createElement(RadioItem, { key: `${option.value}`, name: name, visual: option.visual, label: option.label, value: option.value, checked: option.value === value, onChange: onChange, displayType: displayType, isError: error }))))));
23
23
  };
24
+ export const RadioGroup = forwardRef(RadioGroupComponent);
24
25
  const RadioItemList = styled.div `
25
26
  display: flex;
26
27
  gap: ${ITEM_GAP}px;
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../src/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;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GACd,CACH,CAAC,CACY,CACP,CACZ,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC,mBAAmB,CAIhC,CAAA;AAExB,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAsC;;SAE7D,QAAQ;;IAEb,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE;IACpB,IAAI,WAAW,KAAK,iBAAiB,EAAE;QACrC,OAAO;;;OAGN,CAAA;KACF;IAED,OAAO,yBAAyB,CAAA;AAClC,CAAC;CACF,CAAA"}
@@ -1,8 +1,16 @@
1
- /// <reference types="react" />
2
- import { RadioGroupProps } from './RadioGroup';
1
+ import React from 'react';
3
2
  declare const _default: {
4
3
  title: string;
5
- component: <Value extends import("./types").BaseValueType>({ options, onChange, value, displayType, renderAsTitle, error, ...fieldProps }: RadioGroupProps<Value>) => JSX.Element;
4
+ component: <Value extends import("./types").BaseValueType = import("./types").BaseValueType>(p: {
5
+ options: {
6
+ visual?: string | undefined;
7
+ label: string;
8
+ value: Value;
9
+ }[];
10
+ onChange: (value: Value) => void;
11
+ value: Value;
12
+ displayType?: import("./types").DisplayType | undefined;
13
+ } & import("../fields/commonFieldTypes").CommonFieldProps & React.RefAttributes<HTMLInputElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
6
14
  argTypes: {
7
15
  onChange: {
8
16
  action: string;
@@ -1,14 +1,14 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { BaseValueType, DisplayType } from './types';
3
- declare type RadioItemProps<Value extends BaseValueType = BaseValueType> = {
3
+ type RadioItemProps = {
4
4
  name: string;
5
5
  visual?: string;
6
- value: Value;
6
+ value: BaseValueType;
7
7
  label: string;
8
8
  checked: boolean;
9
- onChange: (value: Value) => void;
9
+ onChange: (value: BaseValueType) => void;
10
10
  displayType: DisplayType;
11
11
  isError: boolean;
12
12
  };
13
- export declare const RadioItem: <Value extends BaseValueType>({ name, visual, label, value, checked, onChange, displayType, isError, }: RadioItemProps<Value>) => JSX.Element;
13
+ export declare const RadioItem: React.ForwardRefExoticComponent<RadioItemProps & React.RefAttributes<HTMLInputElement>>;
14
14
  export {};
@@ -1,19 +1,19 @@
1
- import React from 'react';
1
+ import React, { forwardRef } from 'react';
2
2
  import styled, { css } from 'styled-components';
3
3
  import { useUniqueId } from '../utils/id';
4
4
  import { theme } from '../theme';
5
5
  import { RadioElement } from './RadioElement';
6
6
  import { ITEM_GAP } from './constants';
7
7
  import { Box } from '../Box';
8
- export const RadioItem = ({ name, visual, label, value, checked, onChange, displayType, isError, }) => {
8
+ export const RadioItem = forwardRef(function RadioItem({ name, visual, label, value, checked, onChange, displayType, isError }, ref) {
9
9
  const id = useUniqueId();
10
10
  return (React.createElement(Wrapper, { htmlFor: id, checked: checked, displayType: displayType, "data-testid": value },
11
11
  visual && (React.createElement(VisualWrapper, null,
12
12
  React.createElement(Visual, { visualUrl: visual }))),
13
13
  React.createElement(Box, { flex: true, direction: "row", alignItems: "flex-start" },
14
- React.createElement(RadioElement, { name: name, id: id, value: value, checked: checked, onChange: onChange, isError: isError, mr: "8px" }),
14
+ React.createElement(RadioElement, { ref: ref, name: name, id: id, value: value, checked: checked, onChange: onChange, isError: isError, mr: "8px" }),
15
15
  React.createElement(RadioText, { isError: isError }, label))));
16
- };
16
+ });
17
17
  const VisualWrapper = styled.div `
18
18
  width: 100%;
19
19
  max-width: 120px;
@@ -1 +1 @@
1
- {"version":3,"file":"RadioItem.js","sourceRoot":"","sources":["../../src/RadioGroup/RadioItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,EAA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O,IAAI,qBAAqB,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG;OAC5D;QACC,WAAW,KAAK,iBAAiB;IACnC,GAAG,CAAA;;;;8BAIqB,QAAQ,GAAG,CAAC;;;;;;OAMnC;KACF;CACJ,CAAA;AAED,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAsB;;;iBAGlC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM;WAC9B,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CACvB,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS;;CAExD,CAAA"}
@@ -1,2 +1,2 @@
1
- export declare type DisplayType = 'normal' | 'vertical-card' | 'horizontal-card';
2
- export declare type BaseValueType = string | boolean | null;
1
+ export type DisplayType = 'normal' | 'vertical-card' | 'horizontal-card';
2
+ export type BaseValueType = string | boolean | null;
package/dist/Row/Row.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { FC } from 'react';
2
2
  import { Color } from '../theme';
3
3
  import { MarginProps } from '../utils/space';
4
- export declare type RowProps = {
4
+ export type RowProps = {
5
5
  iconLeft?: string;
6
6
  iconLeftColor?: Color;
7
7
  iconRight?: string;
@@ -1,6 +1,6 @@
1
- import { FC, FocusEvent } from 'react';
1
+ import React, { FocusEvent } from 'react';
2
2
  import { CommonFieldProps } from '../fields/commonFieldTypes';
3
- export declare type SearchInputItem = {
3
+ export type SearchInputItem = {
4
4
  label: string;
5
5
  value: string;
6
6
  };
@@ -15,4 +15,4 @@ export interface SearchInputProps extends CommonFieldProps {
15
15
  outlined?: boolean;
16
16
  value?: string;
17
17
  }
18
- export declare const SearchInput: FC<SearchInputProps>;
18
+ export declare const SearchInput: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- import React, { useMemo, useState } from 'react';
12
+ import React, { forwardRef, useMemo, useState, } from 'react';
13
13
  import styled from 'styled-components';
14
14
  import { darken } from 'polished';
15
15
  import { theme } from '../theme';
@@ -18,7 +18,7 @@ import { Field } from '../fields/Field';
18
18
  import { useUniqueId } from '../utils/id';
19
19
  import { useControllableState } from '../utils/useControlledState';
20
20
  import { SearchOptions } from './SearchOptions';
21
- export const SearchInput = (_a) => {
21
+ export const SearchInput = forwardRef(function SearchInput(_a, ref) {
22
22
  var { id: idProp, name = 'search_input', className = '', placeholder, searchList, onFound, resultsRelativePosition = false, outlined = false, showIcon = false, renderAsTitle = false, onBlur, value } = _a, otherProps = __rest(_a, ["id", "name", "className", "placeholder", "searchList", "onFound", "resultsRelativePosition", "outlined", "showIcon", "renderAsTitle", "onBlur", "value"]);
23
23
  const id = useUniqueId(idProp);
24
24
  const [showOptions, setShowOptions] = useState(false);
@@ -66,9 +66,9 @@ export const SearchInput = (_a) => {
66
66
  return (React.createElement(Field, Object.assign({ className: className, renderAsTitle: renderAsTitle, htmlFor: id, outlined: outlined }, otherProps),
67
67
  React.createElement(StyledInputBox, { outlined: outlined, selected: isSelected },
68
68
  showIcon && React.createElement(SearchIcon, { size: 24, render: "search", color: "subtext" }),
69
- React.createElement(StyledInput, { id: id, type: "text", name: name, placeholder: placeholder, autoComplete: "off", value: displayedInputText, onChange: handleInputChange, outlined: outlined, selected: isSelected, onBlur: onBlur })),
69
+ React.createElement(StyledInput, { ref: ref, id: id, type: "text", name: name, placeholder: placeholder, autoComplete: "off", value: displayedInputText, onChange: handleInputChange, outlined: outlined, selected: isSelected, onBlur: onBlur })),
70
70
  showOptions && (React.createElement(SearchOptions, { displayedList: filteredList, onSelect: handleSelect, outlined: outlined, positionRelative: resultsRelativePosition }))));
71
- };
71
+ });
72
72
  const StyledInputBox = styled.div `
73
73
  display: flex;
74
74
  align-items: center;
@@ -1 +1 @@
1
- {"version":3,"file":"SearchInput.js","sourceRoot":"","sources":["../../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ACR;oBACgB,KAAK,CAAC,MAAM,CAAC,OAAO;GACrC;WACQ,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CACxB,QAAQ,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE;CACrE,CAAA;AASD,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAO;;;;;;;;;aAS1B,KAAK,CAAC,MAAM,CAAC,OAAO;;;IAG7B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CACjB,QAAQ;IACR;;GAED;CACF,CAAA;AAED,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;;CAE9B,CAAA"}
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { SearchInputProps } from './SearchInput';
3
3
  declare const _default: {
4
4
  title: string;
5
- component: React.FC<SearchInputProps>;
5
+ component: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLInputElement>>;
6
6
  };
7
7
  export default _default;
8
8
  export declare const Default: any;
@@ -1,9 +1,9 @@
1
1
  import { FC } from 'react';
2
- declare type Option = {
2
+ type Option = {
3
3
  label: string;
4
4
  value: string;
5
5
  };
6
- declare type SearchOptionsProps = {
6
+ type SearchOptionsProps = {
7
7
  displayedList: Array<Option>;
8
8
  onSelect: (option: Option) => void;
9
9
  positionRelative: boolean;
@@ -1,7 +1,7 @@
1
1
  import { FC, MouseEventHandler, ReactElement } from 'react';
2
2
  import { MarginProps } from '../utils/space';
3
- declare type SupportMessageType = 'info' | 'info-outline' | 'alert' | 'warning';
4
- export declare type SupportMessageProps = {
3
+ type SupportMessageType = 'info' | 'info-outline' | 'alert' | 'warning';
4
+ export type SupportMessageProps = {
5
5
  className?: string;
6
6
  description: string | ReactElement;
7
7
  onClick?: MouseEventHandler;
package/dist/Tag/Tag.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import { FC } from 'react';
2
2
  import { MarginProps } from '../utils/space';
3
3
  import { Color } from '../theme';
4
- export declare type DefaultProps = {
4
+ export type DefaultProps = {
5
5
  label: string;
6
6
  className?: string;
7
7
  color: Color;
8
8
  typo?: string;
9
9
  } & MarginProps;
10
- declare type GradientProps = {
10
+ type GradientProps = {
11
11
  bgColor: Color;
12
12
  borderColor: Color;
13
13
  bgGradient?: boolean;
@@ -16,6 +16,6 @@ declare type GradientProps = {
16
16
  borderColor?: Color;
17
17
  bgGradient: boolean;
18
18
  };
19
- export declare type TagProps = DefaultProps & GradientProps;
19
+ export type TagProps = DefaultProps & GradientProps;
20
20
  export declare const Tag: FC<TagProps>;
21
21
  export {};
@@ -4,9 +4,9 @@ import { MarginProps } from '../utils/space';
4
4
  /**
5
5
  * @deprecated Use only new Typo
6
6
  */
7
- export declare type DeprecatedTypo = 'header-large' | 'header-medium' | 'header-small' | 'desc-heavy' | 'desc-medium' | 'desc-light' | 'desc-small' | 'base' | 'base-small' | 'base-xsmall' | 'label-large';
8
- export declare type Typo = 'hero-alternate' | 'hero' | 'heading-large' | 'heading-medium' | 'heading-small' | 'headline-regular' | 'headline-small' | 'body-standfirst' | 'body-regular' | 'body-small' | 'caption' | 'label';
9
- declare type Props = {
7
+ export type DeprecatedTypo = 'header-large' | 'header-medium' | 'header-small' | 'desc-heavy' | 'desc-medium' | 'desc-light' | 'desc-small' | 'base' | 'base-small' | 'base-xsmall' | 'label-large';
8
+ export type Typo = 'hero-alternate' | 'hero' | 'heading-large' | 'heading-medium' | 'heading-small' | 'headline-regular' | 'headline-small' | 'body-standfirst' | 'body-regular' | 'body-small' | 'caption' | 'label';
9
+ type Props = {
10
10
  children: ReactNode;
11
11
  tag?: any;
12
12
  className?: string;
@@ -16,6 +16,6 @@ declare type Props = {
16
16
  cursor?: string;
17
17
  title?: string;
18
18
  } & MarginProps;
19
- export declare type TextProps = Props & Omit<LabelHTMLAttributes<HTMLElement>, 'color'>;
19
+ export type TextProps = Props & Omit<LabelHTMLAttributes<HTMLElement>, 'color'>;
20
20
  export declare const Text: FC<TextProps>;
21
21
  export {};
@@ -11,7 +11,7 @@ interface Props extends CommonFieldProps {
11
11
  outlined?: boolean;
12
12
  }
13
13
  /** on change or on input required */
14
- declare type InputProps = {
14
+ type InputProps = {
15
15
  /** on change is required and on input optional */
16
16
  onChange: (e: string) => void;
17
17
  onInputChange?: (e: FormEvent<HTMLInputElement>) => void;
@@ -20,6 +20,6 @@ declare type InputProps = {
20
20
  onChange?: (e: string) => void;
21
21
  onInputChange: (e: FormEvent<HTMLInputElement>) => void;
22
22
  };
23
- export declare type TextInputProps = Props & InputProps;
23
+ export type TextInputProps = Props & InputProps;
24
24
  export declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;
25
25
  export {};
@@ -1,7 +1,7 @@
1
1
  import React, { FocusEvent, FormEvent } from 'react';
2
2
  import { CommonFieldProps } from '../fields/commonFieldTypes';
3
3
  import { MarginProps } from '../utils/space';
4
- declare type BaseProps = {
4
+ type BaseProps = {
5
5
  id?: string;
6
6
  placeholder?: string;
7
7
  name?: string;
@@ -14,13 +14,13 @@ declare type BaseProps = {
14
14
  onBlur?: (e: FocusEvent<HTMLTextAreaElement>) => void;
15
15
  rows?: number;
16
16
  } & CommonFieldProps & MarginProps;
17
- declare type TruncateProps = {
17
+ type TruncateProps = {
18
18
  onChange: (e: string) => void;
19
19
  onInputChange?: (e: FormEvent<HTMLTextAreaElement>) => void;
20
20
  } | {
21
21
  onChange?: (e: string) => void;
22
22
  onInputChange: (e: FormEvent<HTMLTextAreaElement>) => void;
23
23
  };
24
- export declare type TextareaProps = BaseProps & TruncateProps;
24
+ export type TextareaProps = BaseProps & TruncateProps;
25
25
  export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
26
26
  export {};
@@ -1,6 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { MarginProps } from '../utils/space';
3
- declare type Props = {
3
+ type Props = {
4
4
  /** unique ID */
5
5
  id?: string;
6
6
  /** checked flag */
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { MarginProps } from '../../utils/space';
3
3
  import { CommonFieldProps } from '../commonFieldTypes';
4
- export declare type FieldsetProps = CommonFieldProps & MarginProps;
4
+ export type FieldsetProps = CommonFieldProps & MarginProps;
5
5
  export declare const Fieldset: ({ children, renderAsTitle, id, ...fieldProps }: FieldsetProps) => JSX.Element;
package/dist/theme.d.ts CHANGED
@@ -26,7 +26,7 @@ declare const colors: {
26
26
  rac: string;
27
27
  hometree: string;
28
28
  };
29
- export declare type Color = keyof typeof colors;
29
+ export type Color = keyof typeof colors;
30
30
  export declare const theme: {
31
31
  colors: {
32
32
  primary: string;
@@ -1,5 +1,5 @@
1
1
  export declare const isLocal: boolean;
2
- declare type UseDeprecatedWarningParams = {
2
+ type UseDeprecatedWarningParams = {
3
3
  enabled?: boolean;
4
4
  title: string;
5
5
  message: string;
@@ -1,4 +1,4 @@
1
- declare type FlexFN = (arg: FlexProps) => string;
1
+ type FlexFN = (arg: FlexProps) => string;
2
2
  export interface FlexProps {
3
3
  direction?: 'column' | 'column-reverse' | 'row' | 'row-reverse';
4
4
  wrap?: 'nowrap' | 'wrap' | 'wrap-reverse';
@@ -1,4 +1,4 @@
1
- declare type MeasureFN = (arg: MeasureProps) => string;
1
+ type MeasureFN = (arg: MeasureProps) => string;
2
2
  export interface MeasureProps {
3
3
  width?: string;
4
4
  maxWidth?: string;
@@ -1,5 +1,5 @@
1
- declare type Spacing = '8px' | '12px' | '16px' | '24px' | '32px' | '48px' | '64px';
2
- declare type SpacingProp = '0' | Spacing | {
1
+ type Spacing = '8px' | '12px' | '16px' | '24px' | '32px' | '48px' | '64px';
2
+ type SpacingProp = '0' | Spacing | {
3
3
  custom: number | string;
4
4
  };
5
5
  export interface MarginProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrshmllw/smores-react",
3
- "version": "2.10.0",
3
+ "version": "2.12.0",
4
4
  "main": "./dist/index.js",
5
5
  "description": "Collection of React components used by Marshmallow Technology",
6
6
  "keywords": [