@ntbjs/react-components 2.0.2-rc.6 → 2.0.2-rc.8

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.
@@ -39,9 +39,33 @@ const MultiSelect = React__default.forwardRef(function MultiSelect({
39
39
  const [selected, setSelected] = useState(selectedOptions);
40
40
  const [focused, setFocused] = useState(false);
41
41
  const [displayShowMore, setDisplayShowMore] = useState(error || warning ? false : showMore);
42
+ const [controlledMenuIsOpen, setControlledMenuIsOpen] = useState(undefined);
43
+ const [isMenuOpen, setIsMenuOpen] = useState(false);
44
+ const wrapperRef = React__default.useRef(null);
42
45
  useEffect(() => {
43
46
  setSelected(selectedOptions);
44
47
  }, [selectedOptions]);
48
+ useEffect(() => {
49
+ function handleClick(event) {
50
+ if (wrapperRef.current) {
51
+ const isClickInside = wrapperRef.current.contains(event.target);
52
+ if (!isClickInside) {
53
+ setControlledMenuIsOpen(false);
54
+ setIsMenuOpen(false);
55
+ } else {
56
+ const isRemoveButton = event.target.closest('.multi-select__multi-value__remove') || event.target.closest('[role="button"]') || event.target instanceof SVGElement || event.target.closest('svg');
57
+ if (!isRemoveButton && !readOnly && !disabled) {
58
+ setControlledMenuIsOpen(true);
59
+ setIsMenuOpen(true);
60
+ }
61
+ }
62
+ }
63
+ }
64
+ document.addEventListener('mousedown', handleClick);
65
+ return () => {
66
+ document.removeEventListener('mousedown', handleClick);
67
+ };
68
+ }, [readOnly, disabled]);
45
69
  const getNoOptionsMessage = inputValue => {
46
70
  if (typeof noOptionsMessageFunc === 'function') {
47
71
  return noOptionsMessageFunc(inputValue);
@@ -57,8 +81,8 @@ const MultiSelect = React__default.forwardRef(function MultiSelect({
57
81
  return React__default.createElement("div", {
58
82
  className: "multi-value-wrapper",
59
83
  onMouseDown: e => {
60
- e.stopPropagation();
61
84
  if (onMultiValueClick && data && !(e.target.role === 'button' || e.target instanceof SVGElement)) {
85
+ e.stopPropagation();
62
86
  onMultiValueClick(data);
63
87
  }
64
88
  }
@@ -75,7 +99,8 @@ const MultiSelect = React__default.forwardRef(function MultiSelect({
75
99
  Input: inputProps => React__default.createElement(InputWrapper, {
76
100
  $focused: focused,
77
101
  $editText: !readOnly && !disabled ? editText : '',
78
- $isDisabled: readOnly || disabled
102
+ $isDisabled: readOnly || disabled,
103
+ $isMenuOpen: isMenuOpen
79
104
  }, React__default.createElement(components.Input, inputProps)),
80
105
  Menu: menuProps => React__default.createElement(DropdownMenu, menuProps),
81
106
  Option: optProps => optProps.isSelected ? React__default.createElement(SelectedOption, optProps, React__default.createElement("span", null, optProps.label), React__default.createElement(DropdownOptionDeleteIcon, null)) : React__default.createElement(Option, optProps)
@@ -143,22 +168,41 @@ const MultiSelect = React__default.forwardRef(function MultiSelect({
143
168
  readOnly: readOnly,
144
169
  closeMenuOnSelect: false,
145
170
  hideSelectedOptions: false,
146
- openMenuOnClick: !disabled && !readOnly,
147
- openMenuOnFocus: !disabled && !readOnly,
171
+ openMenuOnClick: false,
172
+ openMenuOnFocus: false,
173
+ blurInputOnSelect: false,
174
+ menuIsOpen: controlledMenuIsOpen,
175
+ onMenuOpen: () => {
176
+ setIsMenuOpen(true);
177
+ setControlledMenuIsOpen(true);
178
+ },
179
+ onMenuClose: () => {
180
+ setIsMenuOpen(false);
181
+ setControlledMenuIsOpen(false);
182
+ },
148
183
  onFocus: () => setFocused(true),
149
184
  onBlur: () => setFocused(false),
150
185
  noOptionsMessage: ({
151
186
  inputValue
152
187
  }) => getNoOptionsMessage(inputValue),
153
- onChange: (newValue, actionMeta) => {
188
+ onChange: (selectedOptions, actionMeta) => {
189
+ if (props.onChange) {
190
+ props.onChange(selectedOptions, actionMeta);
191
+ }
154
192
  if (onUpdateCallback) {
155
- onUpdateCallback(actionMeta.action, actionMeta.option || actionMeta.removedValue);
193
+ const updatedItem = actionMeta.option || actionMeta.removedValue;
194
+ onUpdateCallback(actionMeta.action, updatedItem);
195
+ }
196
+ setSelected(selectedOptions);
197
+ if (actionMeta.action === 'create-option' && loadOptions) {
198
+ setCacheUnique(cacheUnique + 1);
156
199
  }
157
- setSelected(newValue);
158
200
  }
159
201
  };
160
202
  if (hidden) return null;
161
- return React__default.createElement(MultiSelectWrapper, null, label && React__default.createElement(Label, {
203
+ return React__default.createElement(MultiSelectWrapper, {
204
+ ref: wrapperRef
205
+ }, label && React__default.createElement(Label, {
162
206
  htmlFor: uniqueId
163
207
  }, label), React__default.createElement(InnerWrapper, {
164
208
  $error: error,
@@ -1 +1 @@
1
- {"version":3,"file":"MultiSelect.js","sources":["../../../src/components/inputs/MultiSelect/MultiSelect.js"],"sourcesContent":["import React, { useState, useMemo, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { nanoid } from 'nanoid';\nimport { components } from 'react-select';\nimport * as S from './MultiSelect.styled';\nimport { ReactComponent as CloseIcon } from '../../../icons/close.svg';\n\n/**\n * Multi-select with autocomplete and support for asynchronous fetching/filtering of\n * available options with pagination, update handling with callback,\n * and the ability for the end-user to create new options.\n *\n * The component uses [react-select](https://react-select.com/) for the main select functionality,\n * with [react-select-async-paginate](https://www.npmjs.com/package/react-select-async-paginate) for pagination.\n *\n *\n * <br />### Import\n *\n * ``` js\n * import { MultiSelect } from '@ntbjs/react-components/inputs'\n * // or\n * import MultiSelect from '@ntbjs/react-components/inputs/MultiSelect'\n * ```\n *\n * <br />## Option `object` format\n * Options are represented by an `Array` of `objects` with the following format:\n *\n * ``` js\n * {\n * value: \"Example\",\n * label: \"Example\"\n * }\n * ```\n *\n * The `label` is what will visible to the end-user. Whether `value` and `label`\n * should be different will depend on your use-case, but they are not required to.\n *\n *\n * <br />## Update handling\n * Changes from the end-user to the selected/available options can be handled with a callback function\n * passed through the `onUpdateCallback` prop, which is triggered any time the selected values change.\n *\n * The callback function will be passed two arguments:\n * * `action: string`\n * * `updatedOption: object`\n *\n * <br />#### `action`\n * A `string` indicating what kind of update was made.\n *\n * The possible values of `action` are:\n * * `create-option`: an option that didn't exist in the original list of available options were added\n * * `select-option`: an option was selected\n * * `deselect-option`: an option was de-selected by clicking the X in the dropdown menu\n * * `remove-value`: an option was de-selected by clicking the X on the option label/box\n * * `pop-value`: an option was de-selected with backspace\n * * `clear`: all options were de-selected by clicking the clear indicator (not currently in use)\n *\n * <br />#### `updatedOption`\n * Option `object`of the updated option:\n *\n * In addition to the default `value` and `label` keys, an `__isNew__` flag will be present if the option was\n * not part of the original list of available options, i.e. created by the user in the current \"session\".\n * This is the case regardless of whether the list is provided through `availableOptions` or\n * asynchronously through `loadOptions`.\n *\n *\n * <br />## Asynchronous fetching/filtering with pagination\n * The list of available options can be fetched and filtered asynchronously with a `Promise`\n * passed through the `loadOptions` prop.\n *\n * It will be passed two arguments:\n *\n * * `inputValue: string`: current input value/search\n * * `prevOptions: Array`: previously loaded options for the current search\n *\n * The function is triggered and the first page is fetched when the dropdown menu opens.\n * Whenever the user scrolls down to the bottom of the list, `loadOptions` will\n * be triggered again to fetch the next page.\n *\n * The `Promise` should return an `object` with the following keys:\n *\n * ``` js\n * {\n * options: Array,\n * hasMore: boolean\n * }\n * ```\n *\n * `options` should contain the current page of options. It will be concatenated to the previous\n * set of options automatically. The `hasMore` flag indicates whether there is another page to be fetched.\n *\n * **Example:**\n *\n * ``` js\n *\n * const availableOptions = [\n * { value: \"Example 1\", label: \"Example 1\" },\n * ...\n * { value: \"Example N\", label: \"Example N\" }\n * ];\n *\n * const filterOptions = inputValue => {\n * return availableOptions.filter(option => {\n * return option.label.toLowerCase().includes(inputValue.toLowerCase());\n * });\n * };\n *\n * const loadOptionsFunc = (inputValue, prevOptions) => {\n * const currentLength = prevOptions.length;\n * const pageLength = 10;\n *\n * let filteredOptions;\n *\n * if (inputValue) {\n * filteredOptions = filterOptions(inputValue);\n * } else {\n * filteredOptions = availableOptions;\n * }\n *\n * const hasMore = filteredOptions.length > currentLength + pageLength;\n * const slicedOptions = filteredOptions.slice(currentLength, currentLength + pageLength);\n *\n * return {\n * options: slicedOptions,\n * hasMore\n * };\n * };\n *\n * const loadOptions = (inputValue, prevOptions) => {\n * return new Promise(resolve => {\n * resolve(loadOptionsFunc(inputValue, prevOptions));\n * });\n * };\n * ```\n *\n * While waiting for the `Promise` to resolve, the component will be in a loading state.\n * The loading state is showcased in the \"Primary With Fetching Timeout\" Story.\n *\n * <br />#### Without asynchronous fetching/filtering\n * If you wish to not use asynchronous fetching/filtering, leave the `loadOptions` prop undefined\n * and pass the `Array` of all available options to the `availableOptions` prop instead.\n * The component will use the built-in filtering on `label` from `react-select`, and the options\n * will not be paginated.\n *\n *\n * <br />## \"Show more\" overlay\n * The \"Show more\" overlay must be set manually with the `showMore` prop.\n *\n * By default, the total number\n * of selected options will be displayed in parenthesis after the \"Show more\" text. This can be\n * disabled with the `displayTotalOnShowMore` prop.\n *\n * **Note:**\n * <br />The component has been given a max-width in these Stories.\n * This is because the \"Show more\" overlay does not work well visually when there are\n * fewer than three rows of selected options. The component itself does not have\n * a max-width, so keep this in mind when using it.\n *\n * <br />\n */\n\nconst reactSelectTheme = theme => ({\n ...theme,\n spacing: {\n baseUnit: 4,\n controlHeight: 38,\n menuGutter: 8\n }\n});\n\nconst MultiSelect = React.forwardRef(function MultiSelect(\n {\n label,\n selectedOptions = [],\n availableOptions,\n loadOptions,\n loadingMessageFunc,\n onUpdateCallback,\n editText,\n creatable,\n readOnly,\n hidden,\n disabled,\n error,\n warning,\n onMultiValueClick,\n showMore,\n showMoreText = 'Show more',\n displayTotalOnShowMore = true,\n noOptionsMessageFunc,\n ...props\n },\n forwardedRef\n) {\n const [uniqueId] = useState(nanoid());\n const [selected, setSelected] = useState(selectedOptions);\n const [focused, setFocused] = useState(false);\n const [displayShowMore, setDisplayShowMore] = useState(error || warning ? false : showMore);\n\n useEffect(() => {\n setSelected(selectedOptions);\n }, [selectedOptions]);\n\n const getNoOptionsMessage = inputValue => {\n if (typeof noOptionsMessageFunc === 'function') {\n return noOptionsMessageFunc(inputValue);\n }\n return inputValue ? `No matches for \"${inputValue}\"` : 'No available options';\n };\n\n const innerComponents = {\n DropdownIndicator: null,\n /* eslint-disable react/prop-types */\n MultiValue: ({ data, ...props }) => {\n return (\n <div\n className=\"multi-value-wrapper\"\n onMouseDown={e => {\n e.stopPropagation();\n\n if (\n onMultiValueClick &&\n data &&\n !(e.target.role === 'button' || e.target instanceof SVGElement)\n ) {\n onMultiValueClick(data);\n }\n }}\n >\n <S.MultiValue data={data} $isDisabled={disabled} $isReadOnly={readOnly} {...props} />\n </div>\n );\n },\n /* eslint-enable react/prop-types */\n MultiValueRemove: props => {\n if (readOnly || disabled) return null;\n return (\n <components.MultiValueRemove {...props}>\n <CloseIcon />\n </components.MultiValueRemove>\n );\n },\n Input: inputProps => (\n <S.InputWrapper\n $focused={focused}\n $editText={!readOnly && !disabled ? editText : ''}\n $isDisabled={readOnly || disabled}\n >\n <components.Input {...inputProps} />\n </S.InputWrapper>\n ),\n Menu: menuProps => <S.DropdownMenu {...menuProps} />,\n Option: optProps =>\n optProps.isSelected ? (\n <S.SelectedOption {...optProps}>\n <span>{optProps.label}</span>\n <S.DropdownOptionDeleteIcon />\n </S.SelectedOption>\n ) : (\n <S.Option {...optProps} />\n )\n };\n\n const selectStyles = useMemo(\n () => ({\n control: base => ({\n ...base,\n alignItems: 'flex-start',\n background: 'transparent',\n border: 'none',\n boxShadow: 'none',\n minHeight: 'unset'\n }),\n valueContainer: base => ({\n ...base,\n padding: 0,\n gap: '8px',\n maxHeight: displayShowMore && !(error || warning) ? '130px' : '100%'\n }),\n menu: base => ({\n ...base,\n backgroundColor: 'transparent',\n boxShadow: 'none'\n }),\n menuList: base => ({\n ...base,\n backgroundColor: 'transparent'\n }),\n option: base => ({\n ...base,\n backgroundColor: 'transparent',\n color: 'inherit'\n }),\n multiValue: base => ({ ...base, margin: 0, border: 'none', background: 'none' }),\n multiValueLabel: base => ({ ...base, padding: 0 }),\n multiValueRemove: base => ({ ...base, padding: 0, cursor: 'pointer' })\n }),\n [error, warning, displayShowMore]\n );\n\n const sharedProps = {\n ...props,\n ref: forwardedRef,\n classNamePrefix: 'multi-select',\n value: selected,\n options: loadOptions ? undefined : availableOptions,\n loadOptions,\n loadingMessage: loadingMessageFunc,\n theme: reactSelectTheme,\n styles: selectStyles,\n components: innerComponents,\n isMulti: true,\n isClearable: false,\n placeholder: null,\n isDisabled: disabled,\n readOnly: readOnly,\n closeMenuOnSelect: false,\n hideSelectedOptions: false,\n openMenuOnClick: !disabled && !readOnly,\n openMenuOnFocus: !disabled && !readOnly,\n onFocus: () => setFocused(true),\n onBlur: () => setFocused(false),\n noOptionsMessage: ({ inputValue }) => getNoOptionsMessage(inputValue),\n onChange: (newValue, actionMeta) => {\n if (onUpdateCallback) {\n onUpdateCallback(actionMeta.action, actionMeta.option || actionMeta.removedValue);\n }\n setSelected(newValue);\n }\n };\n\n if (hidden) return null;\n\n return (\n <S.MultiSelectWrapper>\n {label && <S.Label htmlFor={uniqueId}>{label}</S.Label>}\n <S.InnerWrapper $error={error} $warning={warning}>\n {loadOptions ? (\n creatable ? (\n <S.AsyncCreatableMultiSelect {...sharedProps} />\n ) : (\n <S.AsyncMultiSelect {...sharedProps} />\n )\n ) : creatable ? (\n <S.CreatableMultiSelect {...sharedProps} />\n ) : (\n <S.MultiSelect {...sharedProps} />\n )}\n </S.InnerWrapper>\n {displayShowMore && !(error || warning) && (\n <S.ShowMoreWrapper onClick={() => setDisplayShowMore(false)}>\n <S.ShowMoreOverlay />\n <S.ShowMoreText>\n {showMoreText} {displayTotalOnShowMore && `(${selected.length})`}\n </S.ShowMoreText>\n </S.ShowMoreWrapper>\n )}\n {(typeof error === 'string' || typeof warning === 'string') && (\n <S.ErrorMessage $error={error} $warning={warning}>\n {error ? error : warning}\n </S.ErrorMessage>\n )}\n </S.MultiSelectWrapper>\n );\n});\n\nMultiSelect.propTypes = {\n /**\n *\n * The label of the input field – leave `undefined` to hide the label\n */\n label: PropTypes.string,\n /**\n * `Array` of `objects` containing the default options. This is only needed\n * when asynchronous option fetching with the `loadOptions` prop is not used.\n *\n * **Note:**\n * <br />This will be overridden by the `loadOptions` prop if both props are set.\n */\n availableOptions: PropTypes.arrayOf(PropTypes.object),\n\n /**\n * `Array` of `objects` containing the selected options.\n */\n selectedOptions: PropTypes.arrayOf(PropTypes.object),\n\n /**\n * Function with a `Promise` returning filtered options.\n *\n * See [Asynchronous fetching/filtering with pagination](#asynchronous-fetchingfiltering-with-pagination)\n * for details.\n *\n * **Note:**\n * <br />This will override the `availableOptions` prop if both props are set.\n */\n loadOptions: PropTypes.func,\n\n /**\n * Function for custom \"Loading...\" message while waiting for the first page\n * from `loadOptions` to resolve. Defaults to \"Loading...\" if no function is provided.\n */\n loadingMessageFunc: PropTypes.func,\n\n /**\n * Callback function for sending updates to the backend whenever the selected values are updated.\n * See [Update handling](#update-handling) for details.\n */\n onUpdateCallback: PropTypes.func,\n\n /**\n * Text to be displayed on the input element when the component\n * is enabled and not focused – e.g. \"Add a keyword...\"\n */\n editText: PropTypes.string.isRequired,\n\n /**\n * Whether the user can create new options.\n */\n creatable: PropTypes.bool,\n\n /**\n * Callback function for formatting the message displayed in the dropdown when there\n * are no matching options, and the user has permission to create new options.\n * The callback function will be given the current input value as an argument.\n */\n createNewOptionMessageFunc: PropTypes.func,\n\n /**\n * If the list of options is empty, or if the current input value doesn't match\n * any of the available options and the user doesn't have permission to add options,\n * this function will be called and passed the current input value as an argument.\n */\n noOptionsMessageFunc: PropTypes.func,\n\n /**\n * Optional callback function to be trigger when clicking a selected option's label – e.g. opening\n * a search filtered on the given multi-value's `label`.\n *\n * The callback function will be passed the option `object` as an argument.\n */\n onMultiValueClick: PropTypes.func,\n\n /**\n * Display an overlay which the user needs to click in order to\n * show the selected options list in its entirety and edit it.\n */\n showMore: PropTypes.bool,\n\n /**\n * Text displayed on the \"Show more\" overlay.\n */\n showMoreText: PropTypes.string,\n\n /**\n * Whether to display the total number of selected options after the show more text.\n */\n displayTotalOnShowMore: PropTypes.bool,\n\n /**\n * Whether the multi-select should be displayed in read-only mode.\n * The user can still click the selected options to trigger their on-click effect.\n */\n readOnly: PropTypes.bool,\n /**\n * Whether the component is hidden or visible.\n */\n hidden: PropTypes.bool,\n\n /**\n * Whether the multi-select should be disabled.\n * The user will not be able to trigger the on-click effect of the selected options.\n */\n disabled: PropTypes.bool,\n\n /**\n * Set to `true` to display a red border indicating an error.\n * Pass in a `string` instead to also show the string underneath the input field.\n *\n * **Note:**\n * <br />This overrides the \"Show more\" overlay. Errors will be prioritized over warnings.\n */\n error: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),\n\n /**\n * Set to `true` to display an orange border.\n * Pass in a `string` instead to also show the string underneath the input field.\n *\n * **Note:**\n * <br />This overrides the \"Show more\" overlay. Errors will be prioritized over warnings.\n */\n warning: PropTypes.oneOfType([PropTypes.bool, PropTypes.string])\n};\n\nMultiSelect.defaultProps = {\n noOptionsMessageFunc: inputValue => {\n if (inputValue) {\n return `No matches for \"${inputValue}\"`;\n } else {\n return 'No available options';\n }\n },\n showMore: false,\n displayTotalOnShowMore: true,\n readOnly: false,\n disabled: false,\n creatable: false,\n error: false,\n warning: false,\n showMoreText: 'Show more',\n hidden: false\n};\n\nexport default MultiSelect;\n"],"names":["reactSelectTheme","theme","spacing","baseUnit","controlHeight","menuGutter","MultiSelect","React","forwardRef","label","selectedOptions","availableOptions","loadOptions","loadingMessageFunc","onUpdateCallback","editText","creatable","readOnly","hidden","disabled","error","warning","onMultiValueClick","showMore","showMoreText","displayTotalOnShowMore","noOptionsMessageFunc","props","forwardedRef","uniqueId","useState","nanoid","selected","setSelected","focused","setFocused","displayShowMore","setDisplayShowMore","useEffect","getNoOptionsMessage","inputValue","innerComponents","DropdownIndicator","MultiValue","data","createElement","className","onMouseDown","e","stopPropagation","target","role","SVGElement","S","_extends","$isDisabled","$isReadOnly","MultiValueRemove","components","CloseIcon","Input","inputProps","$focused","$editText","Menu","menuProps","Option","optProps","isSelected","selectStyles","useMemo","control","base","alignItems","background","border","boxShadow","minHeight","valueContainer","padding","gap","maxHeight","menu","backgroundColor","menuList","option","color","multiValue","margin","multiValueLabel","multiValueRemove","cursor","sharedProps","ref","classNamePrefix","value","options","undefined","loadingMessage","styles","isMulti","isClearable","placeholder","isDisabled","closeMenuOnSelect","hideSelectedOptions","openMenuOnClick","openMenuOnFocus","onFocus","onBlur","noOptionsMessage","onChange","newValue","actionMeta","action","removedValue","htmlFor","$error","$warning","onClick","length","propTypes","process","env","NODE_ENV","PropTypes","string","arrayOf","object","func","isRequired","bool","createNewOptionMessageFunc","oneOfType","defaultProps"],"mappings":";;;;;;;;AAkKA,MAAMA,gBAAgB,GAAGC,KAAK,KAAK;AACjC,EAAA,GAAGA,KAAK;AACRC,EAAAA,OAAO,EAAE;AACPC,IAAAA,QAAQ,EAAE,CAAC;AACXC,IAAAA,aAAa,EAAE,EAAE;AACjBC,IAAAA,UAAU,EAAE,CAAA;AACd,GAAA;AACF,CAAC,CAAC,CAAA;AAEIC,MAAAA,WAAW,GAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,WAAWA,CACvD;EACEG,KAAK;AACLC,EAAAA,eAAe,GAAG,EAAE;EACpBC,gBAAgB;EAChBC,WAAW;EACXC,kBAAkB;EAClBC,gBAAgB;EAChBC,QAAQ;EACRC,SAAS;EACTC,QAAQ;EACRC,MAAM;EACNC,QAAQ;EACRC,KAAK;EACLC,OAAO;EACPC,iBAAiB;EACjBC,QAAQ;AACRC,EAAAA,YAAY,GAAG,WAAW;AAC1BC,EAAAA,sBAAsB,GAAG,IAAI;EAC7BC,oBAAoB;EACpB,GAAGC,KAAAA;AACL,CAAC,EACDC,YAAY,EACZ;EACA,MAAM,CAACC,QAAQ,CAAC,GAAGC,QAAQ,CAACC,MAAM,EAAE,CAAC,CAAA;EACrC,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAGH,QAAQ,CAACpB,eAAe,CAAC,CAAA;EACzD,MAAM,CAACwB,OAAO,EAAEC,UAAU,CAAC,GAAGL,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC7C,EAAA,MAAM,C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AA,EAAA,CAAA;AAEDxH,WAAW,CAACgI,YAAY,GAAG;EACzB5G,oBAAoB,EAAEc,UAAU,IAAI;AAClC,IAAA,IAAIA,UAAU,EAAE;MACd,OAAO,CAAA,gBAAA,EAAmBA,UAAU,CAAG,CAAA,CAAA,CAAA;AACzC,KAAC,MAAM;AACL,MAAA,OAAO,sBAAsB,CAAA;AAC/B,KAAA;GACD;AACDjB,EAAAA,QAAQ,EAAE,KAAK;AACfE,EAAAA,sBAAsB,EAAE,IAAI;AAC5BR,EAAAA,QAAQ,EAAE,KAAK;AACfE,EAAAA,QAAQ,EAAE,KAAK;AACfH,EAAAA,SAAS,EAAE,KAAK;AAChBI,EAAAA,KAAK,EAAE,KAAK;AACZC,EAAAA,OAAO,EAAE,KAAK;AACdG,EAAAA,YAAY,EAAE,WAAW;AACzBN,EAAAA,MAAM,EAAE,KAAA;AACV,CAAC;;;;"}
1
+ {"version":3,"file":"MultiSelect.js","sources":["../../../src/components/inputs/MultiSelect/MultiSelect.js"],"sourcesContent":["import React, { useState, useMemo, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { nanoid } from 'nanoid';\nimport { components } from 'react-select';\nimport * as S from './MultiSelect.styled';\nimport { ReactComponent as CloseIcon } from '../../../icons/close.svg';\n\n/**\n * Multi-select with autocomplete and support for asynchronous fetching/filtering of\n * available options with pagination, update handling with callback,\n * and the ability for the end-user to create new options.\n *\n * The component uses [react-select](https://react-select.com/) for the main select functionality,\n * with [react-select-async-paginate](https://www.npmjs.com/package/react-select-async-paginate) for pagination.\n *\n *\n * <br />### Import\n *\n * ``` js\n * import { MultiSelect } from '@ntbjs/react-components/inputs'\n * // or\n * import MultiSelect from '@ntbjs/react-components/inputs/MultiSelect'\n * ```\n *\n * <br />## Option `object` format\n * Options are represented by an `Array` of `objects` with the following format:\n *\n * ``` js\n * {\n * value: \"Example\",\n * label: \"Example\"\n * }\n * ```\n *\n * The `label` is what will visible to the end-user. Whether `value` and `label`\n * should be different will depend on your use-case, but they are not required to.\n *\n *\n * <br />## Update handling\n * Changes from the end-user to the selected/available options can be handled with a callback function\n * passed through the `onUpdateCallback` prop, which is triggered any time the selected values change.\n *\n * The callback function will be passed two arguments:\n * * `action: string`\n * * `updatedOption: object`\n *\n * <br />#### `action`\n * A `string` indicating what kind of update was made.\n *\n * The possible values of `action` are:\n * * `create-option`: an option that didn't exist in the original list of available options were added\n * * `select-option`: an option was selected\n * * `deselect-option`: an option was de-selected by clicking the X in the dropdown menu\n * * `remove-value`: an option was de-selected by clicking the X on the option label/box\n * * `pop-value`: an option was de-selected with backspace\n * * `clear`: all options were de-selected by clicking the clear indicator (not currently in use)\n *\n * <br />#### `updatedOption`\n * Option `object`of the updated option:\n *\n * In addition to the default `value` and `label` keys, an `__isNew__` flag will be present if the option was\n * not part of the original list of available options, i.e. created by the user in the current \"session\".\n * This is the case regardless of whether the list is provided through `availableOptions` or\n * asynchronously through `loadOptions`.\n *\n *\n * <br />## Asynchronous fetching/filtering with pagination\n * The list of available options can be fetched and filtered asynchronously with a `Promise`\n * passed through the `loadOptions` prop.\n *\n * It will be passed two arguments:\n *\n * * `inputValue: string`: current input value/search\n * * `prevOptions: Array`: previously loaded options for the current search\n *\n * The function is triggered and the first page is fetched when the dropdown menu opens.\n * Whenever the user scrolls down to the bottom of the list, `loadOptions` will\n * be triggered again to fetch the next page.\n *\n * The `Promise` should return an `object` with the following keys:\n *\n * ``` js\n * {\n * options: Array,\n * hasMore: boolean\n * }\n * ```\n *\n * `options` should contain the current page of options. It will be concatenated to the previous\n * set of options automatically. The `hasMore` flag indicates whether there is another page to be fetched.\n *\n * **Example:**\n *\n * ``` js\n *\n * const availableOptions = [\n * { value: \"Example 1\", label: \"Example 1\" },\n * ...\n * { value: \"Example N\", label: \"Example N\" }\n * ];\n *\n * const filterOptions = inputValue => {\n * return availableOptions.filter(option => {\n * return option.label.toLowerCase().includes(inputValue.toLowerCase());\n * });\n * };\n *\n * const loadOptionsFunc = (inputValue, prevOptions) => {\n * const currentLength = prevOptions.length;\n * const pageLength = 10;\n *\n * let filteredOptions;\n *\n * if (inputValue) {\n * filteredOptions = filterOptions(inputValue);\n * } else {\n * filteredOptions = availableOptions;\n * }\n *\n * const hasMore = filteredOptions.length > currentLength + pageLength;\n * const slicedOptions = filteredOptions.slice(currentLength, currentLength + pageLength);\n *\n * return {\n * options: slicedOptions,\n * hasMore\n * };\n * };\n *\n * const loadOptions = (inputValue, prevOptions) => {\n * return new Promise(resolve => {\n * resolve(loadOptionsFunc(inputValue, prevOptions));\n * });\n * };\n * ```\n *\n * While waiting for the `Promise` to resolve, the component will be in a loading state.\n * The loading state is showcased in the \"Primary With Fetching Timeout\" Story.\n *\n * <br />#### Without asynchronous fetching/filtering\n * If you wish to not use asynchronous fetching/filtering, leave the `loadOptions` prop undefined\n * and pass the `Array` of all available options to the `availableOptions` prop instead.\n * The component will use the built-in filtering on `label` from `react-select`, and the options\n * will not be paginated.\n *\n *\n * <br />## \"Show more\" overlay\n * The \"Show more\" overlay must be set manually with the `showMore` prop.\n *\n * By default, the total number\n * of selected options will be displayed in parenthesis after the \"Show more\" text. This can be\n * disabled with the `displayTotalOnShowMore` prop.\n *\n * **Note:**\n * <br />The component has been given a max-width in these Stories.\n * This is because the \"Show more\" overlay does not work well visually when there are\n * fewer than three rows of selected options. The component itself does not have\n * a max-width, so keep this in mind when using it.\n *\n * <br />\n */\n\nconst reactSelectTheme = theme => ({\n ...theme,\n spacing: {\n baseUnit: 4,\n controlHeight: 38,\n menuGutter: 8\n }\n});\n\nconst MultiSelect = React.forwardRef(function MultiSelect(\n {\n label,\n selectedOptions = [],\n availableOptions,\n loadOptions,\n loadingMessageFunc,\n onUpdateCallback,\n editText,\n creatable,\n readOnly,\n hidden,\n disabled,\n error,\n warning,\n onMultiValueClick,\n showMore,\n showMoreText = 'Show more',\n displayTotalOnShowMore = true,\n noOptionsMessageFunc,\n ...props\n },\n forwardedRef\n) {\n const [uniqueId] = useState(nanoid());\n const [selected, setSelected] = useState(selectedOptions);\n const [focused, setFocused] = useState(false);\n const [displayShowMore, setDisplayShowMore] = useState(error || warning ? false : showMore);\n const [controlledMenuIsOpen, setControlledMenuIsOpen] = useState(undefined);\n const [isMenuOpen, setIsMenuOpen] = useState(false);\n const wrapperRef = React.useRef(null);\n\n useEffect(() => {\n setSelected(selectedOptions);\n }, [selectedOptions]);\n\n // Handle clicks inside and outside the component\n useEffect(() => {\n function handleClick(event) {\n if (wrapperRef.current) {\n const isClickInside = wrapperRef.current.contains(event.target);\n\n if (!isClickInside) {\n // Clicked outside - close menu by setting to false\n setControlledMenuIsOpen(false);\n setIsMenuOpen(false);\n } else {\n // Clicked inside - check if it's NOT a remove button\n const isRemoveButton =\n event.target.closest('.multi-select__multi-value__remove') ||\n event.target.closest('[role=\"button\"]') ||\n event.target instanceof SVGElement ||\n event.target.closest('svg');\n\n if (!isRemoveButton && !readOnly && !disabled) {\n // Clicked on input area or multi-value labels - open the menu immediately\n setControlledMenuIsOpen(true);\n setIsMenuOpen(true);\n }\n }\n }\n }\n\n // Use mousedown to catch events before react-select processes them\n document.addEventListener('mousedown', handleClick);\n return () => {\n document.removeEventListener('mousedown', handleClick);\n };\n }, [readOnly, disabled]);\n\n const getNoOptionsMessage = inputValue => {\n if (typeof noOptionsMessageFunc === 'function') {\n return noOptionsMessageFunc(inputValue);\n }\n return inputValue ? `No matches for \"${inputValue}\"` : 'No available options';\n };\n\n const innerComponents = {\n DropdownIndicator: null,\n /* eslint-disable react/prop-types */\n MultiValue: ({ data, ...props }) => {\n return (\n <div\n className=\"multi-value-wrapper\"\n onMouseDown={e => {\n if (\n onMultiValueClick &&\n data &&\n !(e.target.role === 'button' || e.target instanceof SVGElement)\n ) {\n e.stopPropagation();\n onMultiValueClick(data);\n }\n }}\n >\n <S.MultiValue data={data} $isDisabled={disabled} $isReadOnly={readOnly} {...props} />\n </div>\n );\n },\n /* eslint-enable react/prop-types */\n MultiValueRemove: props => {\n if (readOnly || disabled) return null;\n return (\n <components.MultiValueRemove {...props}>\n <CloseIcon />\n </components.MultiValueRemove>\n );\n },\n Input: inputProps => (\n <S.InputWrapper\n $focused={focused}\n $editText={!readOnly && !disabled ? editText : ''}\n $isDisabled={readOnly || disabled}\n $isMenuOpen={isMenuOpen}\n >\n <components.Input {...inputProps} />\n </S.InputWrapper>\n ),\n Menu: menuProps => <S.DropdownMenu {...menuProps} />,\n Option: optProps =>\n optProps.isSelected ? (\n <S.SelectedOption {...optProps}>\n <span>{optProps.label}</span>\n <S.DropdownOptionDeleteIcon />\n </S.SelectedOption>\n ) : (\n <S.Option {...optProps} />\n )\n };\n\n const selectStyles = useMemo(\n () => ({\n control: base => ({\n ...base,\n alignItems: 'flex-start',\n background: 'transparent',\n border: 'none',\n boxShadow: 'none',\n minHeight: 'unset'\n }),\n valueContainer: base => ({\n ...base,\n padding: 0,\n gap: '8px',\n maxHeight: displayShowMore && !(error || warning) ? '130px' : '100%'\n }),\n menu: base => ({\n ...base,\n backgroundColor: 'transparent',\n boxShadow: 'none'\n }),\n menuList: base => ({\n ...base,\n backgroundColor: 'transparent'\n }),\n option: base => ({\n ...base,\n backgroundColor: 'transparent',\n color: 'inherit'\n }),\n multiValue: base => ({ ...base, margin: 0, border: 'none', background: 'none' }),\n multiValueLabel: base => ({ ...base, padding: 0 }),\n multiValueRemove: base => ({ ...base, padding: 0, cursor: 'pointer' })\n }),\n [error, warning, displayShowMore]\n );\n\n const sharedProps = {\n ...props,\n ref: forwardedRef,\n classNamePrefix: 'multi-select',\n value: selected,\n options: loadOptions ? undefined : availableOptions,\n loadOptions,\n loadingMessage: loadingMessageFunc,\n theme: reactSelectTheme,\n styles: selectStyles,\n components: innerComponents,\n isMulti: true,\n isClearable: false,\n placeholder: null,\n isDisabled: disabled,\n readOnly: readOnly,\n closeMenuOnSelect: false,\n hideSelectedOptions: false,\n openMenuOnClick: false,\n openMenuOnFocus: false,\n blurInputOnSelect: false,\n menuIsOpen: controlledMenuIsOpen,\n onMenuOpen: () => {\n setIsMenuOpen(true);\n setControlledMenuIsOpen(true);\n },\n onMenuClose: () => {\n setIsMenuOpen(false);\n setControlledMenuIsOpen(false);\n },\n onFocus: () => setFocused(true),\n onBlur: () => setFocused(false),\n noOptionsMessage: ({ inputValue }) => getNoOptionsMessage(inputValue),\n onChange: (selectedOptions, actionMeta) => {\n if (props.onChange) {\n props.onChange(selectedOptions, actionMeta);\n }\n\n if (onUpdateCallback) {\n const updatedItem = actionMeta.option || actionMeta.removedValue;\n onUpdateCallback(actionMeta.action, updatedItem);\n }\n\n setSelected(selectedOptions);\n\n if (actionMeta.action === 'create-option' && loadOptions) {\n setCacheUnique(cacheUnique + 1);\n }\n }\n };\n\n if (hidden) return null;\n\n return (\n <S.MultiSelectWrapper ref={wrapperRef}>\n {label && <S.Label htmlFor={uniqueId}>{label}</S.Label>}\n <S.InnerWrapper $error={error} $warning={warning}>\n {loadOptions ? (\n creatable ? (\n <S.AsyncCreatableMultiSelect {...sharedProps} />\n ) : (\n <S.AsyncMultiSelect {...sharedProps} />\n )\n ) : creatable ? (\n <S.CreatableMultiSelect {...sharedProps} />\n ) : (\n <S.MultiSelect {...sharedProps} />\n )}\n </S.InnerWrapper>\n {displayShowMore && !(error || warning) && (\n <S.ShowMoreWrapper onClick={() => setDisplayShowMore(false)}>\n <S.ShowMoreOverlay />\n <S.ShowMoreText>\n {showMoreText} {displayTotalOnShowMore && `(${selected.length})`}\n </S.ShowMoreText>\n </S.ShowMoreWrapper>\n )}\n {(typeof error === 'string' || typeof warning === 'string') && (\n <S.ErrorMessage $error={error} $warning={warning}>\n {error ? error : warning}\n </S.ErrorMessage>\n )}\n </S.MultiSelectWrapper>\n );\n});\n\nMultiSelect.propTypes = {\n /**\n *\n * The label of the input field — leave `undefined` to hide the label\n */\n label: PropTypes.string,\n /**\n * `Array` of `objects` containing the default options. This is only needed\n * when asynchronous option fetching with the `loadOptions` prop is not used.\n *\n * **Note:**\n * <br />This will be overridden by the `loadOptions` prop if both props are set.\n */\n availableOptions: PropTypes.arrayOf(PropTypes.object),\n\n /**\n * `Array` of `objects` containing the selected options.\n */\n selectedOptions: PropTypes.arrayOf(PropTypes.object),\n\n /**\n * Function with a `Promise` returning filtered options.\n *\n * See [Asynchronous fetching/filtering with pagination](#asynchronous-fetchingfiltering-with-pagination)\n * for details.\n *\n * **Note:**\n * <br />This will override the `availableOptions` prop if both props are set.\n */\n loadOptions: PropTypes.func,\n\n /**\n * Function for custom \"Loading...\" message while waiting for the first page\n * from `loadOptions` to resolve. Defaults to \"Loading...\" if no function is provided.\n */\n loadingMessageFunc: PropTypes.func,\n\n /**\n * Callback function for sending updates to the backend whenever the selected values are updated.\n * See [Update handling](#update-handling) for details.\n */\n onUpdateCallback: PropTypes.func,\n\n /**\n * Text to be displayed on the input element when the component\n * is enabled and not focused — e.g. \"Add a keyword...\"\n */\n editText: PropTypes.string.isRequired,\n\n /**\n * Whether the user can create new options.\n */\n creatable: PropTypes.bool,\n\n /**\n * Callback function for formatting the message displayed in the dropdown when there\n * are no matching options, and the user has permission to create new options.\n * The callback function will be given the current input value as an argument.\n */\n createNewOptionMessageFunc: PropTypes.func,\n\n /**\n * If the list of options is empty, or if the current input value doesn't match\n * any of the available options and the user doesn't have permission to add options,\n * this function will be called and passed the current input value as an argument.\n */\n noOptionsMessageFunc: PropTypes.func,\n\n /**\n * Optional callback function to be trigger when clicking a selected option's label — e.g. opening\n * a search filtered on the given multi-value's `label`.\n *\n * The callback function will be passed the option `object` as an argument.\n */\n onMultiValueClick: PropTypes.func,\n\n /**\n * Display an overlay which the user needs to click in order to\n * show the selected options list in its entirety and edit it.\n */\n showMore: PropTypes.bool,\n\n /**\n * Text displayed on the \"Show more\" overlay.\n */\n showMoreText: PropTypes.string,\n\n /**\n * Whether to display the total number of selected options after the show more text.\n */\n displayTotalOnShowMore: PropTypes.bool,\n\n /**\n * Whether the multi-select should be displayed in read-only mode.\n * The user can still click the selected options to trigger their on-click effect.\n */\n readOnly: PropTypes.bool,\n /**\n * Whether the component is hidden or visible.\n */\n hidden: PropTypes.bool,\n\n /**\n * Whether the multi-select should be disabled.\n * The user will not be able to trigger the on-click effect of the selected options.\n */\n disabled: PropTypes.bool,\n\n /**\n * Set to `true` to display a red border indicating an error.\n * Pass in a `string` instead to also show the string underneath the input field.\n *\n * **Note:**\n * <br />This overrides the \"Show more\" overlay. Errors will be prioritized over warnings.\n */\n error: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),\n\n /**\n * Set to `true` to display an orange border.\n * Pass in a `string` instead to also show the string underneath the input field.\n *\n * **Note:**\n * <br />This overrides the \"Show more\" overlay. Errors will be prioritized over warnings.\n */\n warning: PropTypes.oneOfType([PropTypes.bool, PropTypes.string])\n};\n\nMultiSelect.defaultProps = {\n noOptionsMessageFunc: inputValue => {\n if (inputValue) {\n return `No matches for \"${inputValue}\"`;\n } else {\n return 'No available options';\n }\n },\n showMore: false,\n displayTotalOnShowMore: true,\n readOnly: false,\n disabled: false,\n creatable: false,\n error: false,\n warning: false,\n showMoreText: 'Show more',\n hidden: false\n};\n\nexport default MultiSelect;\n"],"names":["reactSelectTheme","theme","spacing","baseUnit","controlHeight","menuGutter","MultiSelect","React","forwardRef","label","selectedOptions","availableOptions","loadOptions","loadingMessageFunc","onUpdateCallback","editText","creatable","readOnly","hidden","disabled","error","warning","onMultiValueClick","showMore","showMoreText","displayTotalOnShowMore","noOptionsMessageFunc","props","forwardedRef","uniqueId","useState","nanoid","selected","setSelected","focused","setFocused","displayShowMore","setDisplayShowMore","controlledMenuIsOpen","setControlledMenuIsOpen","undefined","isMenuOpen","setIsMenuOpen","wrapperRef","useRef","useEffect","handleClick","event","current","isClickInside","contains","target","isRemoveButton","closest","SVGElement","document","addEventListener","removeEventListener","getNoOptionsMessage","inputValue","innerComponents","DropdownIndicator","MultiValue","data","createElement","className","onMouseDown","e","role","stopPropagation","S","_extends","$isDisabled","$isReadOnly","MultiValueRemove","components","CloseIcon","Input","inputProps","$focused","$editText","$isMenuOpen","Menu","menuProps","Option","optProps","isSelected","selectStyles","useMemo","control","base","alignItems","background","border","boxShadow","minHeight","valueContainer","padding","gap","maxHeight","menu","backgroundColor","menuList","option","color","multiValue","margin","multiValueLabel","multiValueRemove","cursor","sharedProps","ref","classNamePrefix","value","options","loadingMessage","styles","isMulti","isClearable","placeholder","isDisabled","closeMenuOnSelect","hideSelectedOptions","openMenuOnClick","openMenuOnFocus","blurInputOnSelect","menuIsOpen","onMenuOpen","onMenuClose","onFocus","onBlur","noOptionsMessage","onChange","actionMeta","updatedItem","removedValue","action","setCacheUnique","cacheUnique","htmlFor","$error","$warning","onClick","length","propTypes","process","env","NODE_ENV","PropTypes","string","arrayOf","object","func","isRequired","bool","createNewOptionMessageFunc","oneOfType","defaultProps"],"mappings":";;;;;;;;AAkKA,MAAMA,gBAAgB,GAAGC,KAAK,KAAK;AACjC,EAAA,GAAGA,KAAK;AACRC,EAAAA,OAAO,EAAE;AACPC,IAAAA,QAAQ,EAAE,CAAC;AACXC,IAAAA,aAAa,EAAE,EAAE;AACjBC,IAAAA,UAAU,EAAE,CAAA;AACd,GAAA;AACF,CAAC,CAAC,CAAA;AAEIC,MAAAA,WAAW,GAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,WAAWA,CACvD;EACEG,KAAK;AACLC,EAAAA,eAAe,GAAG,EAAE;EACpBC,gBAAgB;EAChBC,WAAW;EACXC,kBAAkB;EAClBC,gBAAgB;EAChBC,QAAQ;EACRC,SAAS;EACTC,QAAQ;EACRC,MAAM;EACNC,QAAQ;EACRC,KAAK;EACLC,OAAO;EACPC,iBAAiB;EACjBC,QAAQ;AACRC,EAAAA,YAAY,GAAG,WAAW;AAC1BC,EAAAA,sBAAsB,GAAG,IAAI;EAC7BC,oBAAoB;EACpB,GAAGC,KAAAA;AACL,CAAC,EACDC,YAAY,EACZ;EACA,MAAM,CAACC,QAAQ,CAAC,GAAGC,QAAQ,CAACC,MAAM,EAAE,CAAC,CAAA;EACrC,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAGH,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AAO,EAAE,KAAK;AACdG,EAAAA,YAAY,EAAE,WAAW;AACzBN,EAAAA,MAAM,EAAE,KAAA;AACV,CAAC;;;;"}
@@ -129,7 +129,7 @@ const InputWrapper = styled.div.withConfig({
129
129
  font-size: ${props => props.$focused ? '14px' : '12px'} !important;
130
130
  }
131
131
 
132
- ${props => !props.$focused && css`
132
+ ${props => !props.$isMenuOpen && css`
133
133
  &:before {
134
134
  content: '${props.$editText}';
135
135
  position: absolute;
@@ -1 +1 @@
1
- {"version":3,"file":"MultiSelect.styled.js","sources":["../../../src/components/inputs/MultiSelect/MultiSelect.styled.js"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\nimport { ReactComponent as CloseIcon } from '../../../icons/close.svg';\nimport { components } from 'react-select';\nimport Select from 'react-select';\nimport CreatableSelect from 'react-select/creatable';\nimport { AsyncPaginate, withAsyncPaginate } from 'react-select-async-paginate';\n\nconst showMoreHeight = 114;\nconst AsyncCreatableSelectPaginate = withAsyncPaginate(CreatableSelect);\n\nconst shouldForwardProp = prop => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nconst sharedStyle = css`\n font-family: ${props => props.theme?.primaryFontFamily || 'Arial, sans-serif'};\n font-size: 12px;\n font-weight: 400;\n position: relative;\n`;\n\nexport const MultiSelectWrapper = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: relative;\n`;\n\nexport const InnerWrapper = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n ${props =>\n (props.$error || props.$warning) &&\n css`\n border: 1px solid;\n border-radius: 3px;\n padding: 4px;\n border-color: ${props.$error\n ? props.theme.getColor('red-500')\n : props.theme.getColor('orange-500')};\n `}\n`;\n\nexport const Label = styled.label\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('white'),\n props.theme.getColor('gray-700')\n )};\n flex-basis: 33.33%;\n font-size: 0.875rem;\n line-height: 1rem;\n cursor: pointer;\n height: 19px;\n display: flex;\n align-items: center;\n`;\n\nexport const MultiValue = styled(components.MultiValue).attrs(applyDefaultTheme)`\n && {\n border-radius: 3px;\n margin: 0;\n display: flex;\n align-items: center;\n border: none;\n\n ${props =>\n props.theme.themeProp(\n 'background-color',\n props.theme.getColor('gray-600'),\n props.theme.getColor('gray-800')\n )}\n\n ${props =>\n props.$isDisabled &&\n css`\n opacity: 0.6;\n cursor: not-allowed !important;\n\n & > * {\n pointer-events: none;\n cursor: not-allowed !important;\n }\n `}\n\n ${props =>\n props.$isReadOnly &&\n !props.$isDisabled &&\n css`\n cursor: default !important;\n `}\n\n \n & > div:first-of-type {\n font-size: 12px;\n min-height: 26px;\n display: flex;\n align-items: center;\n padding: ${props => (props.$isDisabled || props.$isReadOnly ? '0 8px' : '0 3px 0 8px')};\n color: ${props => props.theme.getColor('gray-100')};\n cursor: ${props =>\n props.$isDisabled ? 'not-allowed' : props.$isReadOnly ? 'default' : 'pointer'};\n }\n\n /* Target the Remove Button */\n .multi-select__multi-value__remove,\n & > div:last-of-type {\n display: flex;\n align-items: center;\n padding: 0 8px 0 5px;\n height: 26px;\n width: fit-content;\n cursor: pointer;\n background-color: transparent;\n\n ${props =>\n !props.$isDisabled &&\n !props.$isReadOnly &&\n css`\n &:hover {\n background-color: ${props.theme.getColor('red-500')} !important;\n border-radius: 0 3px 3px 0;\n }\n `}\n\n svg {\n stroke: white;\n stroke-width: 2px;\n width: 8px;\n }\n }\n }\n`;\n\nexport const MultiSelect = styled(Select)`\n ${sharedStyle}\n`;\nexport const CreatableMultiSelect = styled(CreatableSelect)`\n ${sharedStyle}\n`;\nexport const AsyncMultiSelect = styled(AsyncPaginate)`\n ${sharedStyle}\n`;\nexport const AsyncCreatableMultiSelect = styled(AsyncCreatableSelectPaginate)`\n ${sharedStyle}\n`;\n\nexport const InputWrapper = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: relative;\n display: flex;\n align-items: center;\n min-width: 150px;\n\n input {\n color: ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )} !important;\n font-size: ${props => (props.$focused ? '14px' : '12px')} !important;\n }\n\n ${props =>\n !props.$focused &&\n css`\n &:before {\n content: '${props.$editText}';\n position: absolute;\n left: 2px;\n color: ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-500')\n )};\n pointer-events: none;\n font-size: 12px;\n }\n `}\n\n ${props =>\n props.$isDisabled &&\n css`\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n `};\n`;\n\nexport const DropdownMenu = styled(components.Menu).attrs(applyDefaultTheme)`\n font-size: 14px;\n\n ${props =>\n props.theme.themeProp(\n 'background-color',\n props.theme.getColor('gray-600'),\n props.theme.getColor('white')\n )}\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n`;\n\nconst sharedOptionStyle = css`\n ${props =>\n props.isFocused &&\n css`\n ${props.theme.themeProp(\n 'background-color',\n props.theme.getColor('gray-500'),\n props.theme.getColor('gray-200')\n )}\n `}\n\n ${props =>\n props.isSelected &&\n css`\n ${props.theme.themeProp('background-color', 'transparent', 'transparent')}\n\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n `}\n\n ${props =>\n props.isFocused &&\n props.isSelected &&\n css`\n ${props.theme.themeProp(\n 'background-color',\n props.theme.getColor('gray-500'),\n props.theme.getColor('gray-200')\n )}\n `}\n\n :hover {\n cursor: pointer;\n }\n`;\n\nexport const Option = styled(components.Option).attrs(applyDefaultTheme)`\n ${sharedOptionStyle}\n padding: 8px 12px;\n`;\n\nexport const SelectedOption = styled(components.Option).attrs(applyDefaultTheme)`\n ${sharedOptionStyle}\n display: flex !important;\n justify-content: space-between;\n align-items: center;\n padding: 8px 12px;\n`;\n\nexport const DropdownOptionDeleteIcon = styled(CloseIcon)\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n stroke-width: 1px;\n width: 8px;\n ${props =>\n props.theme.themeProp(\n 'stroke',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n`;\n\nexport const ShowMoreWrapper = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n align-items: end;\n display: flex;\n flex-direction: column;\n height: 100%;\n left: 0;\n position: absolute;\n max-height: ${showMoreHeight + 16}px;\n top: 0;\n width: 100%;\n z-index: 2;\n cursor: pointer;\n color: ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('emerald-500')\n )};\n &:hover {\n text-decoration: underline;\n }\n`;\n\nexport const ShowMoreOverlay = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n height: 100%;\n max-height: ${showMoreHeight}px;\n ${props =>\n props.theme.themeProp(\n 'background',\n 'transparent linear-gradient(180deg, #12121200 0%, #12121230 40%, #12121279 70%, #121212 95%, #121212 100%) 0% 0% no-repeat padding-box',\n 'transparent linear-gradient(180deg, #fefefe00 0%, #fefefe30 40%, #fefefe79 70%, #fefefe 95%, #fefefe 100%) 0% 0% no-repeat padding-box'\n )}\n`;\n\nexport const ShowMoreText = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n font-size: 0.875rem;\n width: 100%;\n background-color: ${props => props.theme.themeProp('background-color', '#121212', '#fefefe')};\n`;\n\nexport const ErrorMessage = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n color: ${props =>\n props.$error\n ? props.theme.getColor('red-500')\n : props.$warning\n ? props.theme.getColor('orange-500')\n : 'inherit'};\n font-size: 0.75rem;\n margin-top: 8px;\n padding: 0 12px;\n`;\n"],"names":["showMoreHeight","AsyncCreatableSelectPaginate","withAsyncPaginate","CreatableSelect","shouldForwardProp","prop","startsWith","sharedStyle","css","props","theme","primaryFontFamily","MultiSelectWrapper","styled","div","withConfig","attrs","applyDefaultTheme","InnerWrapper","$error","$warning","getColor","Label","label","themeProp","MultiValue","components","$isDisabled","$isReadOnly","MultiSelect","Select","CreatableMultiSelect","AsyncMultiSelect","AsyncPaginate","AsyncCreatableMultiSelect","InputWrapper","$focused","$editText","DropdownMenu","Menu","sharedOptionStyle","isFocused","isSelected","Option","SelectedOption","DropdownOptionDeleteIcon","CloseIcon","ShowMoreWrapper","ShowMoreOverlay","ShowMoreText","ErrorMessage"],"mappings":";;;;;;;AAQA,MAAMA,cAAc,GAAG,GAAG,CAAA;AAC1B,MAAMC,4BAA4B,GAAGC,iBAAiB,CAACC,eAAe,CAAC,CAAA;AAEvE,MAAMC,iBAAiB,GAAGC,IAAI,IAAI;EAChC,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC,CAAA;AAClD,CAAC,CAAA;AAED,MAAMC,WAAW,GAAGC,GAAG,CAAA;AACvB,eAAiBC,EAAAA,KAAK,IAAIA,KAAK,CAACC,KAAK,EAAEC,iBAAiB,IAAI,mBAAmB,CAAA;AAC/E;AACA;AACA;AACA,CAAC,CAAA;AAEM,MAAMC,kBAAkB,GAAGC,MAAM,CAACC,GAAG,CACzCC,UAAU,CAAC;AACVX,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDY,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA,EAAC;AAEM,MAAMC,YAAY,GAAGL,MAAM,CAACC,GAAG,CACnCC,UAAU,CAAC;AACVX,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDY,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B,EAAIR,EAAAA,KAAK,IACL,CAACA,KAAK,CAACU,MAAM,IAAIV,KAAK,CAACW,QAAQ,KAC/BZ,GAAG,CAAA;AACP;AACA;AACA;AACA,oBA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AAC3B;AACA,cAAA,EAAgBjB,cAAc,CAAA;AAC9B,EAAA,EAAIS,KAAK,IACLA,KAAK,CAACC,KAAK,CAACc,SAAS,CACnB,YAAY,EACZ,wIAAwI,EACxI,wIACF,CAAC,CAAA;AACL,EAAC;AAEM,MAAMyB,YAAY,GAAGpC,MAAM,CAACC,GAAG,CACnCC,UAAU,CAAC;AACVX,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDY,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA;AACA,oBAAA,EAAsBR,KAAK,IAAIA,KAAK,CAACC,KAAK,CAACc,SAAS,CAAC,kBAAkB,EAAE,SAAS,EAAE,SAAS,CAAC,CAAA;AAC9F,EAAC;AAEM,MAAM0B,YAAY,GAAGrC,MAAM,CAACC,GAAG,CACnCC,UAAU,CAAC;AACVX,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDY,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B,SAAA,EAAWR,KAAK,IACZA,KAAK,CAACU,MAAM,GACRV,KAAK,CAACC,KAAK,CAACW,QAAQ,CAAC,SAAS,CAAC,GAC/BZ,KAAK,CAACW,QAAQ,GACZX,KAAK,CAACC,KAAK,CAACW,QAAQ,CAAC,YAAY,CAAC,GAClC,SAAS,CAAA;AACnB;AACA;AACA;AACA;;;;"}
1
+ {"version":3,"file":"MultiSelect.styled.js","sources":["../../../src/components/inputs/MultiSelect/MultiSelect.styled.js"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\nimport { ReactComponent as CloseIcon } from '../../../icons/close.svg';\nimport { components } from 'react-select';\nimport Select from 'react-select';\nimport CreatableSelect from 'react-select/creatable';\nimport { AsyncPaginate, withAsyncPaginate } from 'react-select-async-paginate';\n\nconst showMoreHeight = 114;\nconst AsyncCreatableSelectPaginate = withAsyncPaginate(CreatableSelect);\n\nconst shouldForwardProp = prop => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nconst sharedStyle = css`\n font-family: ${props => props.theme?.primaryFontFamily || 'Arial, sans-serif'};\n font-size: 12px;\n font-weight: 400;\n position: relative;\n`;\n\nexport const MultiSelectWrapper = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: relative;\n`;\n\nexport const InnerWrapper = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n ${props =>\n (props.$error || props.$warning) &&\n css`\n border: 1px solid;\n border-radius: 3px;\n padding: 4px;\n border-color: ${props.$error\n ? props.theme.getColor('red-500')\n : props.theme.getColor('orange-500')};\n `}\n`;\n\nexport const Label = styled.label\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('white'),\n props.theme.getColor('gray-700')\n )};\n flex-basis: 33.33%;\n font-size: 0.875rem;\n line-height: 1rem;\n cursor: pointer;\n height: 19px;\n display: flex;\n align-items: center;\n`;\n\nexport const MultiValue = styled(components.MultiValue).attrs(applyDefaultTheme)`\n && {\n border-radius: 3px;\n margin: 0;\n display: flex;\n align-items: center;\n border: none;\n\n ${props =>\n props.theme.themeProp(\n 'background-color',\n props.theme.getColor('gray-600'),\n props.theme.getColor('gray-800')\n )}\n\n ${props =>\n props.$isDisabled &&\n css`\n opacity: 0.6;\n cursor: not-allowed !important;\n\n & > * {\n pointer-events: none;\n cursor: not-allowed !important;\n }\n `}\n\n ${props =>\n props.$isReadOnly &&\n !props.$isDisabled &&\n css`\n cursor: default !important;\n `}\n\n \n & > div:first-of-type {\n font-size: 12px;\n min-height: 26px;\n display: flex;\n align-items: center;\n padding: ${props => (props.$isDisabled || props.$isReadOnly ? '0 8px' : '0 3px 0 8px')};\n color: ${props => props.theme.getColor('gray-100')};\n cursor: ${props =>\n props.$isDisabled ? 'not-allowed' : props.$isReadOnly ? 'default' : 'pointer'};\n }\n\n /* Target the Remove Button */\n .multi-select__multi-value__remove,\n & > div:last-of-type {\n display: flex;\n align-items: center;\n padding: 0 8px 0 5px;\n height: 26px;\n width: fit-content;\n cursor: pointer;\n background-color: transparent;\n\n ${props =>\n !props.$isDisabled &&\n !props.$isReadOnly &&\n css`\n &:hover {\n background-color: ${props.theme.getColor('red-500')} !important;\n border-radius: 0 3px 3px 0;\n }\n `}\n\n svg {\n stroke: white;\n stroke-width: 2px;\n width: 8px;\n }\n }\n }\n`;\n\nexport const MultiSelect = styled(Select)`\n ${sharedStyle}\n`;\nexport const CreatableMultiSelect = styled(CreatableSelect)`\n ${sharedStyle}\n`;\nexport const AsyncMultiSelect = styled(AsyncPaginate)`\n ${sharedStyle}\n`;\nexport const AsyncCreatableMultiSelect = styled(AsyncCreatableSelectPaginate)`\n ${sharedStyle}\n`;\n\nexport const InputWrapper = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: relative;\n display: flex;\n align-items: center;\n min-width: 150px;\n\n input {\n color: ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )} !important;\n font-size: ${props => (props.$focused ? '14px' : '12px')} !important;\n }\n\n ${props =>\n !props.$isMenuOpen &&\n css`\n &:before {\n content: '${props.$editText}';\n position: absolute;\n left: 2px;\n color: ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-500')\n )};\n pointer-events: none;\n font-size: 12px;\n }\n `}\n\n ${props =>\n props.$isDisabled &&\n css`\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n `};\n`;\n\nexport const DropdownMenu = styled(components.Menu).attrs(applyDefaultTheme)`\n font-size: 14px;\n\n ${props =>\n props.theme.themeProp(\n 'background-color',\n props.theme.getColor('gray-600'),\n props.theme.getColor('white')\n )}\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n`;\n\nconst sharedOptionStyle = css`\n ${props =>\n props.isFocused &&\n css`\n ${props.theme.themeProp(\n 'background-color',\n props.theme.getColor('gray-500'),\n props.theme.getColor('gray-200')\n )}\n `}\n\n ${props =>\n props.isSelected &&\n css`\n ${props.theme.themeProp('background-color', 'transparent', 'transparent')}\n\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n `}\n\n ${props =>\n props.isFocused &&\n props.isSelected &&\n css`\n ${props.theme.themeProp(\n 'background-color',\n props.theme.getColor('gray-500'),\n props.theme.getColor('gray-200')\n )}\n `}\n\n :hover {\n cursor: pointer;\n }\n`;\n\nexport const Option = styled(components.Option).attrs(applyDefaultTheme)`\n ${sharedOptionStyle}\n padding: 8px 12px;\n`;\n\nexport const SelectedOption = styled(components.Option).attrs(applyDefaultTheme)`\n ${sharedOptionStyle}\n display: flex !important;\n justify-content: space-between;\n align-items: center;\n padding: 8px 12px;\n`;\n\nexport const DropdownOptionDeleteIcon = styled(CloseIcon)\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n stroke-width: 1px;\n width: 8px;\n ${props =>\n props.theme.themeProp(\n 'stroke',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n`;\n\nexport const ShowMoreWrapper = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n align-items: end;\n display: flex;\n flex-direction: column;\n height: 100%;\n left: 0;\n position: absolute;\n max-height: ${showMoreHeight + 16}px;\n top: 0;\n width: 100%;\n z-index: 2;\n cursor: pointer;\n color: ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('emerald-500')\n )};\n &:hover {\n text-decoration: underline;\n }\n`;\n\nexport const ShowMoreOverlay = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n height: 100%;\n max-height: ${showMoreHeight}px;\n ${props =>\n props.theme.themeProp(\n 'background',\n 'transparent linear-gradient(180deg, #12121200 0%, #12121230 40%, #12121279 70%, #121212 95%, #121212 100%) 0% 0% no-repeat padding-box',\n 'transparent linear-gradient(180deg, #fefefe00 0%, #fefefe30 40%, #fefefe79 70%, #fefefe 95%, #fefefe 100%) 0% 0% no-repeat padding-box'\n )}\n`;\n\nexport const ShowMoreText = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n font-size: 0.875rem;\n width: 100%;\n background-color: ${props => props.theme.themeProp('background-color', '#121212', '#fefefe')};\n`;\n\nexport const ErrorMessage = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n color: ${props =>\n props.$error\n ? props.theme.getColor('red-500')\n : props.$warning\n ? props.theme.getColor('orange-500')\n : 'inherit'};\n font-size: 0.75rem;\n margin-top: 8px;\n padding: 0 12px;\n`;\n"],"names":["showMoreHeight","AsyncCreatableSelectPaginate","withAsyncPaginate","CreatableSelect","shouldForwardProp","prop","startsWith","sharedStyle","css","props","theme","primaryFontFamily","MultiSelectWrapper","styled","div","withConfig","attrs","applyDefaultTheme","InnerWrapper","$error","$warning","getColor","Label","label","themeProp","MultiValue","components","$isDisabled","$isReadOnly","MultiSelect","Select","CreatableMultiSelect","AsyncMultiSelect","AsyncPaginate","AsyncCreatableMultiSelect","InputWrapper","$focused","$isMenuOpen","$editText","DropdownMenu","Menu","sharedOptionStyle","isFocused","isSelected","Option","SelectedOption","DropdownOptionDeleteIcon","CloseIcon","ShowMoreWrapper","ShowMoreOverlay","ShowMoreText","ErrorMessage"],"mappings":";;;;;;;AAQA,MAAMA,cAAc,GAAG,GAAG,CAAA;AAC1B,MAAMC,4BAA4B,GAAGC,iBAAiB,CAACC,eAAe,CAAC,CAAA;AAEvE,MAAMC,iBAAiB,GAAGC,IAAI,IAAI;EAChC,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC,CAAA;AAClD,CAAC,CAAA;AAED,MAAMC,WAAW,GAAGC,GAAG,CAAA;AACvB,eAAiBC,E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AC/BZ,KAAK,CAACW,QAAQ,GACZX,KAAK,CAACC,KAAK,CAACW,QAAQ,CAAC,YAAY,CAAC,GAClC,SAAS,CAAA;AACnB;AACA;AACA;AACA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ntbjs/react-components",
3
- "version": "2.0.2-rc.6",
3
+ "version": "2.0.2-rc.8",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },