@vev/silke 1.0.12 → 1.0.14
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/CHANGELOG.md +15 -0
- package/dist/chunk-KMZFUBRE.js +22 -0
- package/dist/{chunk-4MB64AQL.js.map → chunk-KMZFUBRE.js.map} +3 -3
- package/dist/index.js +8 -8
- package/dist/index.js.map +4 -4
- package/dist/{silke-code-editor-HZRG3D6C.js → silke-code-editor-UX2ML2WG.js} +2 -2
- package/dist/styles.css +385 -101
- package/package.json +3 -3
- package/src/_variables.scss +0 -1
- package/src/components/silke-box/silke-box.scss +17 -0
- package/src/components/silke-box/silke-box.tsx +6 -2
- package/src/components/silke-button/silke-button.tsx +2 -0
- package/src/components/silke-checkbox/silke-checkbox.tsx +1 -1
- package/src/components/silke-form-schema/fields/event-field.tsx +3 -3
- package/src/components/silke-form-schema/fields/icon-field.tsx +1 -1
- package/src/components/silke-form-schema/fields/image-field.tsx +1 -3
- package/src/components/silke-form-schema/fields/link-field.tsx +3 -1
- package/src/components/silke-form-schema/fields/number-field.tsx +2 -4
- package/src/components/silke-form-schema/fields/select-field.tsx +49 -31
- package/src/components/silke-form-schema/fields/toggle-field.tsx +1 -1
- package/src/components/silke-form-schema/fields/upload-field.tsx +3 -2
- package/src/components/silke-form-schema/silke-schema-fields.tsx +1 -2
- package/src/components/silke-loader/silke-loader.tsx +6 -3
- package/src/components/silke-navigation-link/silke-navigation-link.scss +7 -0
- package/src/components/silke-navigation-link/silke-navigation-link.tsx +6 -1
- package/src/components/silke-overflow-menu/silke-overflow-menu.tsx +1 -1
- package/src/components/silke-radio-button/silke-radio-button.scss +1 -1
- package/src/components/silke-tag/silke-tag.scss +4 -0
- package/src/components/silke-tag/silke-tag.tsx +16 -3
- package/src/components/silke-text/index.ts +1 -0
- package/src/components/silke-tooltip/index.ts +1 -0
- package/src/components/silke-tooltip/silke-icon-tooltip.tsx +2 -13
- package/src/components/silke-tooltip/silke-shortcuts.tsx +43 -0
- package/src/components/silke-tooltip/silke-tooltip.scss +11 -5
- package/src/hooks/use-drop-zone.ts +5 -1
- package/src/icons.tsx +24 -1
- package/dist/chunk-4MB64AQL.js +0 -22
- /package/dist/{chunk-4MB64AQL.js.LEGAL.txt → chunk-KMZFUBRE.js.LEGAL.txt} +0 -0
- /package/dist/{silke-code-editor-HZRG3D6C.js.map → silke-code-editor-UX2ML2WG.js.map} +0 -0
|
@@ -93,7 +93,9 @@ const SelectField = (props: SchemaFieldProps<LinkFieldType>) => {
|
|
|
93
93
|
}}
|
|
94
94
|
/>
|
|
95
95
|
<SilkeBox>
|
|
96
|
-
<SilkeTextSmall flex>
|
|
96
|
+
<SilkeTextSmall weight="strong" flex>
|
|
97
|
+
Open in new tab
|
|
98
|
+
</SilkeTextSmall>
|
|
97
99
|
<SilkeToggle
|
|
98
100
|
small
|
|
99
101
|
value={target}
|
|
@@ -3,7 +3,7 @@ import React, { useEffect, useState } from 'react';
|
|
|
3
3
|
import { SilkeCssNumberField } from '../../silke-css-number-field';
|
|
4
4
|
import { SilkeBox } from '../../silke-box';
|
|
5
5
|
import { SilkeSlider } from '../../silke-slider';
|
|
6
|
-
import { SilkeText } from '../../silke-text';
|
|
6
|
+
import { SilkeText, SilkeTextSmall } from '../../silke-text';
|
|
7
7
|
import { SilkeTextField } from '../../silke-text-field';
|
|
8
8
|
import { getTitle } from './string-field';
|
|
9
9
|
|
|
@@ -41,9 +41,7 @@ const NumberField = (props: SchemaFieldProps<NumberFieldType>) => {
|
|
|
41
41
|
const sliderValue = value ?? 0;
|
|
42
42
|
return (
|
|
43
43
|
<SilkeBox column flex>
|
|
44
|
-
<
|
|
45
|
-
{title || name}
|
|
46
|
-
</SilkeText>
|
|
44
|
+
<SilkeTextSmall weight="strong">{title || name}</SilkeTextSmall>
|
|
47
45
|
{description && <SilkeText color="neutral-80">{description}</SilkeText>}
|
|
48
46
|
<SilkeBox vPad="s">
|
|
49
47
|
<SilkeSlider
|
|
@@ -57,47 +57,65 @@ const SelectField = (props: SchemaFieldProps<SelectFieldType>) => {
|
|
|
57
57
|
|
|
58
58
|
if (display === 'dropdown') {
|
|
59
59
|
return (
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
60
|
+
<SilkeBox gap="xs" style={{ alignItems: 'center' }}>
|
|
61
|
+
<SilkeTextSmall weight="strong" style={{ width: '80px' }}>
|
|
62
|
+
{getTitle(schema)}
|
|
63
|
+
</SilkeTextSmall>
|
|
64
|
+
<SilkeBox style={{ width: '140px' }}>
|
|
65
|
+
<SilkeSelectField
|
|
66
|
+
value={props.value}
|
|
67
|
+
multiple={multiselect}
|
|
68
|
+
name={name}
|
|
69
|
+
items={items}
|
|
70
|
+
inline
|
|
71
|
+
label=""
|
|
72
|
+
onChange={onChange}
|
|
73
|
+
size="xs"
|
|
74
|
+
renderItem={(item) => {
|
|
75
|
+
return (
|
|
76
|
+
<SilkeText
|
|
77
|
+
style={{ paddingLeft: '4px' }}
|
|
78
|
+
size="small"
|
|
79
|
+
title={item.item.label}
|
|
80
|
+
overflow
|
|
81
|
+
>
|
|
82
|
+
{item.item.label}
|
|
83
|
+
</SilkeText>
|
|
84
|
+
);
|
|
85
|
+
}}
|
|
86
|
+
/>
|
|
87
|
+
</SilkeBox>
|
|
88
|
+
</SilkeBox>
|
|
78
89
|
);
|
|
79
90
|
}
|
|
80
91
|
if (display === 'autocomplete') {
|
|
81
92
|
return (
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
+
<SilkeBox gap="xs" style={{ alignItems: 'center' }}>
|
|
94
|
+
<SilkeTextSmall weight="strong" style={{ width: '80px' }}>
|
|
95
|
+
{getTitle(schema)}
|
|
96
|
+
</SilkeTextSmall>
|
|
97
|
+
<SilkeBox style={{ width: '140px' }}>
|
|
98
|
+
<SilkeAutocompleteField
|
|
99
|
+
value={props.value}
|
|
100
|
+
multiple={multiselect}
|
|
101
|
+
name={name}
|
|
102
|
+
label=""
|
|
103
|
+
items={items}
|
|
104
|
+
onChange={onChange}
|
|
105
|
+
size="xs"
|
|
106
|
+
inline
|
|
107
|
+
inlineLabelWidth={80}
|
|
108
|
+
/>
|
|
109
|
+
</SilkeBox>
|
|
110
|
+
</SilkeBox>
|
|
93
111
|
);
|
|
94
112
|
}
|
|
95
113
|
return (
|
|
96
114
|
<SilkeBox gap="xs">
|
|
97
|
-
<SilkeTextSmall
|
|
115
|
+
<SilkeTextSmall weight="strong" style={{ width: '80px' }}>
|
|
98
116
|
{getTitle(schema)}
|
|
99
117
|
</SilkeTextSmall>
|
|
100
|
-
<SilkeBox column>
|
|
118
|
+
<SilkeBox column style={{ width: '100px' }}>
|
|
101
119
|
{items?.map((item, i) => (
|
|
102
120
|
<SilkeRadioButton key={i} {...item} name={name} size="small" />
|
|
103
121
|
))}
|
|
@@ -9,7 +9,7 @@ const Toggle = (props: SchemaFieldProps<BooleanField>) => {
|
|
|
9
9
|
<SilkeBox flex>
|
|
10
10
|
<SilkeBox align="start" style={{ width: '80px' }}>
|
|
11
11
|
<SilkeBox vAlign="center" flex>
|
|
12
|
-
<SilkeTextSmall
|
|
12
|
+
<SilkeTextSmall weight="strong">
|
|
13
13
|
{props.schema.title || props.schema.description || props.schema.name}
|
|
14
14
|
</SilkeTextSmall>
|
|
15
15
|
</SilkeBox>
|
|
@@ -7,10 +7,11 @@ import { startCase } from 'lodash';
|
|
|
7
7
|
|
|
8
8
|
const UploadField = (props: SchemaFieldProps<UploadFieldType>) => {
|
|
9
9
|
const { schema, onChange } = props;
|
|
10
|
+
const maxSize = schema.maxSize || 4096;
|
|
10
11
|
|
|
11
12
|
return (
|
|
12
13
|
<SilkeBox column flex vPad="s">
|
|
13
|
-
<SilkeTextSmall>{schema.title || startCase(schema.name)}</SilkeTextSmall>
|
|
14
|
+
<SilkeTextSmall weight="strong">{schema.title || startCase(schema.name)}</SilkeTextSmall>
|
|
14
15
|
{schema.description && (
|
|
15
16
|
<SilkeTextSmall color="neutral-80">{schema.description}</SilkeTextSmall>
|
|
16
17
|
)}
|
|
@@ -21,7 +22,7 @@ const UploadField = (props: SchemaFieldProps<UploadFieldType>) => {
|
|
|
21
22
|
multiple={false}
|
|
22
23
|
dropzoneStyle={{ width: '100%' }}
|
|
23
24
|
fileItemStyle={{ width: '100%' }}
|
|
24
|
-
maxSize={
|
|
25
|
+
maxSize={Math.min(76800, maxSize)} // Set absolute max size to 75 MB
|
|
25
26
|
name={props.schema.name}
|
|
26
27
|
value={props.value}
|
|
27
28
|
useFileModel
|
|
@@ -14,8 +14,7 @@ type SilkeSchemaFieldsProps<T> = {
|
|
|
14
14
|
export function SilkeSchemaFields<T>(props: SilkeSchemaFieldsProps<T>) {
|
|
15
15
|
const { schema = [], row, ...rest } = props;
|
|
16
16
|
return (
|
|
17
|
-
<SilkeBox flex column={!row} gap="m" style={{ width: '100%' }}>
|
|
18
|
-
{schema[0]?.type !== 'array' && <div />}
|
|
17
|
+
<SilkeBox flex column={!row} gap="m" vPad="m" style={{ width: '100%' }}>
|
|
19
18
|
{schema.map((field, index) => {
|
|
20
19
|
const comp = SilkeSchemaField({ field, ...rest });
|
|
21
20
|
return comp ? (
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BoxDivProps, BoxSize, SilkeBox } from '../silke-box';
|
|
3
3
|
import './silke-loader.scss';
|
|
4
|
+
import { SilkeTextSmall } from '../silke-text';
|
|
4
5
|
|
|
5
6
|
interface SilkeLoaderProps extends BoxDivProps {
|
|
6
7
|
message?: string;
|
|
@@ -22,9 +23,11 @@ export function SilkeLoader({
|
|
|
22
23
|
}: SilkeLoaderProps) {
|
|
23
24
|
return (
|
|
24
25
|
<SilkeBox column align="center" {...rest}>
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
<SilkeBox size={size}>
|
|
27
|
+
<LoaderSVG stop={stop} style={style} />
|
|
28
|
+
</SilkeBox>
|
|
29
|
+
{message && <SilkeTextSmall>{message}</SilkeTextSmall>}
|
|
30
|
+
{randomGenerator && <SilkeTextSmall>{randomGenerator()}</SilkeTextSmall>}
|
|
28
31
|
</SilkeBox>
|
|
29
32
|
);
|
|
30
33
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IEmojiIcon } from '@vev/utils';
|
|
2
2
|
import { isString } from 'lodash';
|
|
3
3
|
import React, { ReactNode } from 'react';
|
|
4
|
+
import { SilkeColor } from '../../';
|
|
4
5
|
import { BoxButtonProps, BoxLinkProps, SilkeBox } from '../silke-box';
|
|
5
6
|
import ButtonContext from '../silke-button/context';
|
|
6
7
|
import { SilkeIcon, SilkeIcons } from '../silke-icon';
|
|
@@ -13,6 +14,7 @@ type SilkeNavigationLinkProps = {
|
|
|
13
14
|
icon?: IEmojiIcon | SilkeIcons | React.ReactElement;
|
|
14
15
|
label: ReactNode;
|
|
15
16
|
linkClassName?: string;
|
|
17
|
+
color?: SilkeColor;
|
|
16
18
|
/**
|
|
17
19
|
* Buttons/icons shown only on hover
|
|
18
20
|
*/
|
|
@@ -31,15 +33,18 @@ export function SilkeNavigationLink({
|
|
|
31
33
|
children,
|
|
32
34
|
link,
|
|
33
35
|
rightButtons,
|
|
36
|
+
color,
|
|
34
37
|
align,
|
|
35
38
|
...rest
|
|
36
39
|
}: SilkeNavigationLinkProps) {
|
|
37
40
|
const cl = [styles.main];
|
|
41
|
+
const linkClass = [styles.link];
|
|
38
42
|
|
|
39
43
|
if (className) cl.push(className);
|
|
40
44
|
if (active) cl.push(styles.active);
|
|
41
45
|
if (rightButtons) cl.push(styles.hasRightButtons);
|
|
42
|
-
|
|
46
|
+
if (color) linkClass.push(styles[color]);
|
|
47
|
+
if (linkClassName) linkClass.push(linkClassName);
|
|
43
48
|
|
|
44
49
|
return (
|
|
45
50
|
<SilkeBox className={cl.join(' ')} gap="xxs" tag="div">
|
|
@@ -6,7 +6,7 @@ import { ButtonContext, SilkeButton, SilkeButtonProps } from '../silke-button';
|
|
|
6
6
|
import { SilkePopover, SilkePopoverProps } from '../silke-popover';
|
|
7
7
|
import styles from './silke-overflow-menu.scss';
|
|
8
8
|
|
|
9
|
-
type SilkeOverflowMenuProps = {
|
|
9
|
+
export type SilkeOverflowMenuProps = {
|
|
10
10
|
children?: React.ReactNode;
|
|
11
11
|
open?: boolean;
|
|
12
12
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BoxProps, SilkeBox } from '../silke-box';
|
|
2
|
+
import { BoxProps, BoxSpace, SilkeBox } from '../silke-box';
|
|
3
3
|
import { SilkeText } from '../silke-text';
|
|
4
4
|
import styles from './silke-tag.scss';
|
|
5
5
|
import { SilkeIcon, SilkeIcons } from '../silke-icon';
|
|
@@ -14,6 +14,7 @@ export type SilkeTagProps = {
|
|
|
14
14
|
size?: SilkeTagSize;
|
|
15
15
|
outline?: boolean;
|
|
16
16
|
icon?: SilkeIcons;
|
|
17
|
+
innerGap?: BoxSpace;
|
|
17
18
|
/**
|
|
18
19
|
* Will add a remove button to tag
|
|
19
20
|
*/
|
|
@@ -21,18 +22,30 @@ export type SilkeTagProps = {
|
|
|
21
22
|
} & BoxProps;
|
|
22
23
|
|
|
23
24
|
function SilkeTagComp(
|
|
24
|
-
{
|
|
25
|
+
{
|
|
26
|
+
className,
|
|
27
|
+
disabled,
|
|
28
|
+
kind,
|
|
29
|
+
label,
|
|
30
|
+
outline,
|
|
31
|
+
onRemove,
|
|
32
|
+
size,
|
|
33
|
+
icon,
|
|
34
|
+
innerGap = 'xs',
|
|
35
|
+
...rest
|
|
36
|
+
}: SilkeTagProps,
|
|
25
37
|
ref: any,
|
|
26
38
|
) {
|
|
27
39
|
const cl = [styles.tag, disabled ? styles.disabled : styles[kind || 'gray']];
|
|
28
40
|
if (className) cl.push(className);
|
|
29
41
|
if (outline) cl.push(styles.outline);
|
|
30
42
|
if (size) cl.push(styles[size]);
|
|
43
|
+
if (rest?.onClick) cl.push(styles.selectable);
|
|
31
44
|
|
|
32
45
|
return (
|
|
33
46
|
<SilkeBox {...rest} className={cl.join(' ')} hPad="xs" vAlign="center" ref={ref}>
|
|
34
47
|
<SilkeText overflow flex className={styles.label}>
|
|
35
|
-
<SilkeBox gap=
|
|
48
|
+
<SilkeBox gap={innerGap} align="center">
|
|
36
49
|
{icon && <SilkeIcon icon={icon} />}
|
|
37
50
|
<span>{label}</span>
|
|
38
51
|
</SilkeBox>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KeyboardEventCode } from '@vev/utils';
|
|
2
2
|
import { isString } from 'lodash';
|
|
3
3
|
import React, { useEffect, useRef, useState } from 'react';
|
|
4
4
|
import { SilkeBox } from '../silke-box';
|
|
5
5
|
import { SilkeIcon, SilkeIcons } from '../silke-icon';
|
|
6
|
+
import { SilkeShortcuts } from './silke-shortcuts';
|
|
6
7
|
import { SilkeTooltip, SilkeTooltipProps } from './silke-tooltip';
|
|
7
|
-
import styles from './silke-tooltip.scss';
|
|
8
8
|
|
|
9
9
|
type SilkeIconTooltipProps = {
|
|
10
10
|
icon?: SilkeIcons;
|
|
@@ -106,14 +106,3 @@ export function SilkeIconTooltip({
|
|
|
106
106
|
</>
|
|
107
107
|
);
|
|
108
108
|
}
|
|
109
|
-
|
|
110
|
-
export const SilkeShortcuts = ({ shortcuts }: { shortcuts?: KeyboardEventCode[] }) =>
|
|
111
|
-
shortcuts ? (
|
|
112
|
-
<SilkeBox gap="s" style={{ display: 'inline' }}>
|
|
113
|
-
{shortcuts.map((s, i) => (
|
|
114
|
-
<span key={i} className={styles.shortcut}>
|
|
115
|
-
{Keyboard.getFormatted(s)}
|
|
116
|
-
</span>
|
|
117
|
-
))}
|
|
118
|
-
</SilkeBox>
|
|
119
|
-
) : null;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Keyboard, KeyboardEventCode } from '@vev/utils';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { SilkeIconDefinitions } from '../../icons';
|
|
4
|
+
import { BoxDivProps, SilkeBox } from '../silke-box';
|
|
5
|
+
import { SilkeIcon } from '../silke-icon';
|
|
6
|
+
import styles from './silke-tooltip.scss';
|
|
7
|
+
|
|
8
|
+
type IconSymbol = keyof typeof SilkeIconDefinitions;
|
|
9
|
+
|
|
10
|
+
function isShortcutIcon(key: string) {
|
|
11
|
+
return SilkeIconDefinitions[key as IconSymbol] !== undefined;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const SilkeShortcuts = ({
|
|
15
|
+
shortcuts,
|
|
16
|
+
...rest
|
|
17
|
+
}: { shortcuts?: KeyboardEventCode[] } & BoxDivProps) =>
|
|
18
|
+
shortcuts ? (
|
|
19
|
+
<SilkeBox gap="s">
|
|
20
|
+
{shortcuts.map((s, i) => (
|
|
21
|
+
<SilkeBox key={i}>
|
|
22
|
+
<SilkeBox
|
|
23
|
+
className={styles.shortcut}
|
|
24
|
+
rounded="tiny"
|
|
25
|
+
bg="neutral-0"
|
|
26
|
+
pad="xs"
|
|
27
|
+
vAlign="center"
|
|
28
|
+
flex
|
|
29
|
+
gap="xs"
|
|
30
|
+
{...rest}
|
|
31
|
+
>
|
|
32
|
+
{Keyboard.getFormatted(s).map((keys) =>
|
|
33
|
+
keys
|
|
34
|
+
.split(' ')
|
|
35
|
+
.map((f) =>
|
|
36
|
+
isShortcutIcon(f) ? <SilkeIcon icon={f as IconSymbol} /> : <span>{f}</span>,
|
|
37
|
+
),
|
|
38
|
+
)}
|
|
39
|
+
</SilkeBox>
|
|
40
|
+
</SilkeBox>
|
|
41
|
+
))}
|
|
42
|
+
</SilkeBox>
|
|
43
|
+
) : null;
|
|
@@ -57,12 +57,18 @@ $border-color: rgba(
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.shortcut {
|
|
60
|
-
|
|
61
|
-
color: var(--color-neutral-100);
|
|
60
|
+
font-size: 12px;
|
|
62
61
|
border: 1px solid var(--color-neutral-20);
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
|
|
63
|
+
span {
|
|
64
|
+
line-height: 14px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
i {
|
|
68
|
+
line-height: 14px;
|
|
69
|
+
font-weight: 300;
|
|
70
|
+
}
|
|
71
|
+
|
|
66
72
|
}
|
|
67
73
|
|
|
68
74
|
|
|
@@ -18,16 +18,19 @@ export function useDropZone(
|
|
|
18
18
|
onDrop: (e: DragEvent) => void,
|
|
19
19
|
onEnter?: (e: DragEvent) => void,
|
|
20
20
|
onLeave?: (e: DragEvent) => void,
|
|
21
|
+
onOver?: (e: DragEvent) => void,
|
|
21
22
|
) {
|
|
22
23
|
const dropRef = useCallbackRef(onDrop);
|
|
23
24
|
const enterRef = useCallbackRef(onEnter);
|
|
24
25
|
const leaveRef = useCallbackRef(onLeave);
|
|
26
|
+
const overRef = useCallbackRef(onOver);
|
|
25
27
|
useEffect(() => {
|
|
26
28
|
const el = target.current;
|
|
27
29
|
if (el) {
|
|
28
30
|
let eventTarget: EventTarget | null;
|
|
29
31
|
preventDragDefault(el);
|
|
30
32
|
const onEnter = (e: DragEvent) => {
|
|
33
|
+
if (overRef.current) overRef.current(e);
|
|
31
34
|
if (eventTarget === e.target) return null;
|
|
32
35
|
eventTarget = e.target;
|
|
33
36
|
|
|
@@ -49,6 +52,7 @@ export function useDropZone(
|
|
|
49
52
|
e.preventDefault();
|
|
50
53
|
if (dropRef.current) dropRef.current(e);
|
|
51
54
|
};
|
|
55
|
+
|
|
52
56
|
el.addEventListener('dragenter', onEnter);
|
|
53
57
|
el.addEventListener('dragover', onEnter);
|
|
54
58
|
el.addEventListener('dragleave', onLeave);
|
|
@@ -60,5 +64,5 @@ export function useDropZone(
|
|
|
60
64
|
el.removeEventListener('drop', onDrop);
|
|
61
65
|
};
|
|
62
66
|
}
|
|
63
|
-
}, [target, dropRef, enterRef, leaveRef]);
|
|
67
|
+
}, [target, dropRef, enterRef, leaveRef, overRef]);
|
|
64
68
|
}
|
package/src/icons.tsx
CHANGED
|
@@ -5,7 +5,7 @@ export const SilkeIconDefinitions = {
|
|
|
5
5
|
add() {
|
|
6
6
|
return <i className="fal fa-plus" style={{ fontSize: '1.1em' }} />;
|
|
7
7
|
},
|
|
8
|
-
check: '
|
|
8
|
+
check: 'fa fa-check',
|
|
9
9
|
'check.circle': 'fas fa-check-circle',
|
|
10
10
|
close: 'fal fa-times',
|
|
11
11
|
delete: 'fal fa-trash',
|
|
@@ -37,6 +37,7 @@ export const SilkeIconDefinitions = {
|
|
|
37
37
|
rollback: 'fal fa-history',
|
|
38
38
|
settings: 'fal fa-cog',
|
|
39
39
|
search: 'fal fa-search',
|
|
40
|
+
'search.file': 'fal fa-file-magnifying-glass',
|
|
40
41
|
filter: 'fal fa-bars-sort',
|
|
41
42
|
copy: 'fal fa-copy',
|
|
42
43
|
paste: 'fal fa-paste',
|
|
@@ -51,6 +52,7 @@ export const SilkeIconDefinitions = {
|
|
|
51
52
|
lock: 'fal fa-lock',
|
|
52
53
|
unlock: 'fal fa-unlock',
|
|
53
54
|
compress: 'fal fa-compress-arrows-alt',
|
|
55
|
+
upload: 'fal fa-arrow-up-from-line',
|
|
54
56
|
crop: 'fal fa-crop-alt',
|
|
55
57
|
repeat: 'fal fa-repeat',
|
|
56
58
|
rotate: 'fal fa-rotate',
|
|
@@ -83,12 +85,16 @@ export const SilkeIconDefinitions = {
|
|
|
83
85
|
package: 'fal fa-cube',
|
|
84
86
|
'package.open': 'fal fa-box-open',
|
|
85
87
|
'select.all': 'fal fa-check-double',
|
|
88
|
+
'select.some.square': 'fal fa-square-minus',
|
|
89
|
+
'select.all.square': 'fas fa-square-check',
|
|
90
|
+
|
|
86
91
|
ban: 'fas fa-ban',
|
|
87
92
|
'error.triangle': 'fal fa-exclamation-triangle',
|
|
88
93
|
|
|
89
94
|
folder: 'fal fa-folder',
|
|
90
95
|
'folder.download': 'fal fa-folder-arrow-down',
|
|
91
96
|
'folder.open': 'fal fa-folder-open',
|
|
97
|
+
'folder.plus': 'fal fa-folder-plus',
|
|
92
98
|
folders: 'fal fa-folders',
|
|
93
99
|
file: 'fal fa-file',
|
|
94
100
|
|
|
@@ -98,6 +104,14 @@ export const SilkeIconDefinitions = {
|
|
|
98
104
|
'code.compare': 'fal fa-code-compare',
|
|
99
105
|
'code.history': 'fal fa-clock-rotate-left',
|
|
100
106
|
|
|
107
|
+
// KEYBOARD SYMBOLS
|
|
108
|
+
'keyboard.command': 'fa-light fa-command',
|
|
109
|
+
'keyboard.option': 'fa fa-option',
|
|
110
|
+
'keyboard.shift': 'fa fa-up',
|
|
111
|
+
'keyboard.backspace': 'fa fa-delete-left',
|
|
112
|
+
'keyboard.enter': 'fal fa-arrow-turn-down-left',
|
|
113
|
+
'keyboard.escape': 'fa fa-escape',
|
|
114
|
+
|
|
101
115
|
// ARROWS
|
|
102
116
|
arrows: 'fal fa-arrows',
|
|
103
117
|
'arrow.down': 'fal fa-arrow-down',
|
|
@@ -195,10 +209,12 @@ export const SilkeIconDefinitions = {
|
|
|
195
209
|
form: 'fal fa-input-text',
|
|
196
210
|
'curly-brackets': 'far fa-brackets-curly',
|
|
197
211
|
expand: 'fal fa-expand',
|
|
212
|
+
'request.feature': 'fal fa-messages-question',
|
|
198
213
|
'custom-component': CustomComponentIcon,
|
|
199
214
|
|
|
200
215
|
'project-plan': ProjectPlanRibbon,
|
|
201
216
|
diamond: 'fa-regular fa-gem',
|
|
217
|
+
crosshair: 'fa-light fa-crosshairs',
|
|
202
218
|
|
|
203
219
|
// ALignment icons
|
|
204
220
|
'align.text.right': 'fal fa-align-right',
|
|
@@ -330,6 +346,13 @@ export const SilkeIconDefinitions = {
|
|
|
330
346
|
// Content children
|
|
331
347
|
contentChild: 'fa-light fa-square-caret-right',
|
|
332
348
|
contentChildParent: ContentChildParent,
|
|
349
|
+
|
|
350
|
+
// Interactions
|
|
351
|
+
'interaction.icon': 'fa-regular fa-bolt',
|
|
352
|
+
'interaction.active': 'fa-solid fa-bolt',
|
|
353
|
+
'interaction.inactive': 'fa-thin fa-bolt',
|
|
354
|
+
'interaction.click': 'fa-light fa-hand-pointer',
|
|
355
|
+
'interaction.arrow': 'fa-regular fa-arrow-down',
|
|
333
356
|
};
|
|
334
357
|
|
|
335
358
|
function CustomComponentIcon({ className }: { className?: string }) {
|