@xqmsg/ui-core 0.21.5 → 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/dist/components/icons/dropdown/index.d.ts +1 -0
- package/dist/components/icons/index.d.ts +2 -1
- package/dist/components/icons/workspace/index.d.ts +8 -0
- package/dist/ui-core.cjs.development.js +24 -6
- package/dist/ui-core.cjs.development.js.map +1 -1
- package/dist/ui-core.cjs.production.min.js +1 -1
- package/dist/ui-core.cjs.production.min.js.map +1 -1
- package/dist/ui-core.esm.js +24 -7
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/icons/dropdown/dropdown.svg +1 -1
- package/src/components/icons/dropdown/index.tsx +5 -2
- package/src/components/icons/index.tsx +2 -0
- package/src/components/icons/workspace/index.tsx +14 -0
- package/src/components/icons/workspace/workspace.png +0 -0
- package/src/components/input/StackedMultiSelect/index.tsx +1 -1
- package/src/components/input/StackedPilledInput/index.tsx +30 -28
- package/src/components/input/StackedSelect/index.tsx +1 -1
package/package.json
CHANGED
|
@@ -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="
|
|
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
|
|
12
|
+
export const Dropdown: React.FC<DropdownProps> = ({ boxSize, disabled }) => {
|
|
13
|
+
return (
|
|
14
|
+
<DropdownIcon boxSize={boxSize} fill={disabled ? '#3C3C4399' : '#0082FF'} />
|
|
15
|
+
);
|
|
13
16
|
};
|
|
@@ -33,6 +33,7 @@ import { Vault } from './vault';
|
|
|
33
33
|
import { Question } from './question';
|
|
34
34
|
import { Video } from './video';
|
|
35
35
|
import { Page } from './page';
|
|
36
|
+
import { Workspace } from './workspace';
|
|
36
37
|
|
|
37
38
|
export {
|
|
38
39
|
Checkmark,
|
|
@@ -70,4 +71,5 @@ export {
|
|
|
70
71
|
Vault,
|
|
71
72
|
Video,
|
|
72
73
|
Warning,
|
|
74
|
+
Workspace,
|
|
73
75
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Image } from '@chakra-ui/react';
|
|
3
|
+
import path from './workspace.png';
|
|
4
|
+
|
|
5
|
+
export interface WorkspaceProps {
|
|
6
|
+
boxSize: number | string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A functional React component utilized to render the `Workspace` icon component
|
|
11
|
+
*/
|
|
12
|
+
export const Workspace: React.FC<WorkspaceProps> = ({ boxSize }) => {
|
|
13
|
+
return <Image src={path} boxSize={boxSize} />;
|
|
14
|
+
};
|
|
Binary file
|
|
@@ -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
|
-
|
|
292
|
-
<
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
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 && (
|