@xqmsg/ui-core 0.21.6 → 0.21.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.21.6",
2
+ "version": "0.21.7",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -1,3 +1,3 @@
1
1
  <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M2 12C0.89543 12 -3.91405e-08 11.1046 -8.74228e-08 10L-4.37114e-07 2C-4.85396e-07 0.895431 0.89543 -3.91405e-08 2 -8.74228e-08L10 -4.37114e-07C11.1046 -4.85396e-07 12 0.89543 12 2L12 10C12 11.1046 11.1046 12 10 12L2 12ZM6 2.5C6.13261 2.5 6.25979 2.55268 6.35355 2.64645L7.85355 4.14645C8.04881 4.34171 8.04881 4.65829 7.85355 4.85355C7.65829 5.04882 7.34171 5.04882 7.14645 4.85355L6 3.70711L4.85355 4.85355C4.65829 5.04882 4.34171 5.04882 4.14645 4.85355C3.95118 4.65829 3.95118 4.34171 4.14645 4.14645L5.64645 2.64645C5.74021 2.55268 5.86739 2.5 6 2.5ZM5.64645 9.35355C5.74021 9.44732 5.86739 9.5 6 9.5C6.13261 9.5 6.25978 9.44732 6.35355 9.35355L7.85355 7.85355C8.04882 7.65829 8.04882 7.34171 7.85355 7.14645C7.65829 6.95118 7.34171 6.95118 7.14645 7.14645L6 8.29289L4.85355 7.14645C4.65829 6.95118 4.34171 6.95118 4.14645 7.14645C3.95118 7.34171 3.95118 7.65829 4.14645 7.85355L5.64645 9.35355Z" fill="#0082FF"/>
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M2 12C0.89543 12 -3.91405e-08 11.1046 -8.74228e-08 10L-4.37114e-07 2C-4.85396e-07 0.895431 0.89543 -3.91405e-08 2 -8.74228e-08L10 -4.37114e-07C11.1046 -4.85396e-07 12 0.89543 12 2L12 10C12 11.1046 11.1046 12 10 12L2 12ZM6 2.5C6.13261 2.5 6.25979 2.55268 6.35355 2.64645L7.85355 4.14645C8.04881 4.34171 8.04881 4.65829 7.85355 4.85355C7.65829 5.04882 7.34171 5.04882 7.14645 4.85355L6 3.70711L4.85355 4.85355C4.65829 5.04882 4.34171 5.04882 4.14645 4.85355C3.95118 4.65829 3.95118 4.34171 4.14645 4.14645L5.64645 2.64645C5.74021 2.55268 5.86739 2.5 6 2.5ZM5.64645 9.35355C5.74021 9.44732 5.86739 9.5 6 9.5C6.13261 9.5 6.25978 9.44732 6.35355 9.35355L7.85355 7.85355C8.04882 7.65829 8.04882 7.34171 7.85355 7.14645C7.65829 6.95118 7.34171 6.95118 7.14645 7.14645L6 8.29289L4.85355 7.14645C4.65829 6.95118 4.34171 6.95118 4.14645 7.14645C3.95118 7.34171 3.95118 7.65829 4.14645 7.85355L5.64645 9.35355Z" fill="current"/>
3
3
  </svg>
@@ -3,11 +3,14 @@ import { ReactComponent as DropdownIcon } from './dropdown.svg';
3
3
 
4
4
  export interface DropdownProps {
5
5
  boxSize: number | string;
6
+ disabled?: boolean;
6
7
  }
7
8
 
8
9
  /**
9
10
  * A functional React component utilized to render the `Dropdown` icon component
10
11
  */
11
- export const Dropdown: React.FC<DropdownProps> = ({ boxSize }) => {
12
- return <DropdownIcon boxSize={boxSize} />;
12
+ export const Dropdown: React.FC<DropdownProps> = ({ boxSize, disabled }) => {
13
+ return (
14
+ <DropdownIcon boxSize={boxSize} fill={disabled ? '#3C3C4399' : '#0082FF'} />
15
+ );
13
16
  };
@@ -330,7 +330,7 @@ const StackedMultiSelect = React.forwardRef<
330
330
  _focus={{ boxShadow: 'none !important' }}
331
331
  />
332
332
  <Flex mr="4px" justifyContent="center" alignItems="center">
333
- <DropdownIcon boxSize="16px" />
333
+ <DropdownIcon boxSize="16px" disabled={disabled} />
334
334
  </Flex>
335
335
  </Flex>
336
336
  {isFocussed && (
@@ -288,34 +288,36 @@ const StackedPilledInput = React.forwardRef<
288
288
  </Text>
289
289
  ) : null}
290
290
  </Flex>
291
- <Flex flex={1} minWidth={isFocussed && !tokenIndex ? '20%' : 0}>
292
- <Input
293
- onKeyDown={onHandleKeyDown}
294
- type="text"
295
- padding={0}
296
- alignContent="flex-start"
297
- float="right"
298
- border="none"
299
- height="auto"
300
- color={tokenIndex !== null ? 'transparent' : colors.label.primary}
301
- _focus={{ boxShadow: 'none !important' }}
302
- value={localValue}
303
- onChange={e =>
304
- tokenIndex === null &&
305
- setLocalValue(
306
- e.target.value.trim().replace(',', '').length
307
- ? e.target.value
308
- : ''
309
- )
310
- }
311
- ref={inputRef}
312
- onFocus={() => setIsFocussed(true)}
313
- onBlur={() => {
314
- setIsFocussed(false);
315
- return setTokenIndex(null);
316
- }}
317
- />
318
- </Flex>
291
+ {!disabled && (
292
+ <Flex flex={1} minWidth={isFocussed && !tokenIndex ? '20%' : 0}>
293
+ <Input
294
+ onKeyDown={onHandleKeyDown}
295
+ type="text"
296
+ padding={0}
297
+ alignContent="flex-start"
298
+ float="right"
299
+ border="none"
300
+ height="auto"
301
+ color={tokenIndex !== null ? 'transparent' : colors.label.primary}
302
+ _focus={{ boxShadow: 'none !important' }}
303
+ value={localValue}
304
+ onChange={e =>
305
+ tokenIndex === null &&
306
+ setLocalValue(
307
+ e.target.value.trim().replace(',', '').length
308
+ ? e.target.value
309
+ : ''
310
+ )
311
+ }
312
+ ref={inputRef}
313
+ onFocus={() => setIsFocussed(true)}
314
+ onBlur={() => {
315
+ setIsFocussed(false);
316
+ return setTokenIndex(null);
317
+ }}
318
+ />
319
+ </Flex>
320
+ )}
319
321
  </Flex>
320
322
  </Box>
321
323
  );
@@ -212,7 +212,7 @@ const StackedSelect = React.forwardRef<HTMLInputElement, StackedSelectProps>(
212
212
  cursor={disabled ? 'not-allowed' : 'pointer'}
213
213
  onClick={() => !disabled && setIsFocussed(!isFocussed)}
214
214
  >
215
- <DropdownIcon boxSize="16px" />
215
+ <DropdownIcon boxSize="16px" disabled={disabled} />
216
216
  </InputRightElement>
217
217
  </InputGroup>
218
218
  {isFocussed && (