@vev/silke 1.0.10 → 1.0.12
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 +9 -0
- package/dist/chunk-4MB64AQL.js +22 -0
- package/dist/chunk-4MB64AQL.js.LEGAL.txt +8 -0
- package/dist/chunk-4MB64AQL.js.map +7 -0
- package/dist/index.js +9 -25
- package/dist/index.js.LEGAL.txt +6 -9
- package/dist/index.js.map +4 -4
- package/dist/silke-code-editor-HZRG3D6C.js +23 -0
- package/dist/silke-code-editor-HZRG3D6C.js.map +7 -0
- package/dist/styles.css +4338 -2599
- package/esbuild.config.mjs +2 -1
- package/jest.config.js +2 -1
- package/package.json +12 -8
- package/src/_variables.scss +121 -1
- package/src/components/index.ts +6 -0
- package/src/components/silke-autocomplete-field/autocomplete-item.tsx +15 -13
- package/src/components/silke-autocomplete-field/autocomplete-tags.tsx +14 -7
- package/src/components/silke-autocomplete-field/silke-autocomplete-field.mdx +31 -4
- package/src/components/silke-autocomplete-field/silke-autocomplete-field.scss +8 -6
- package/src/components/silke-autocomplete-field/silke-autocomplete-field.tsx +64 -23
- package/src/components/silke-box/silke-box.scss +21 -47
- package/src/components/silke-box/silke-box.tsx +23 -31
- package/src/components/silke-breadcrumbs/silke-breadcrumb.scss +3 -3
- package/src/components/silke-button/index.ts +3 -1
- package/src/components/silke-button/silke-big-button.scss +38 -0
- package/src/components/silke-button/silke-big-button.tsx +49 -0
- package/src/components/silke-button/silke-button-set.tsx +15 -3
- package/src/components/silke-button/silke-button.mdx +41 -19
- package/src/components/silke-button/silke-button.scss +97 -90
- package/src/components/silke-button/silke-button.tsx +20 -5
- package/src/components/silke-button/silke-file-select-button.tsx +86 -0
- package/src/components/silke-card/silke-card-grid.tsx +9 -9
- package/src/components/silke-card/silke-card.mdx +23 -9
- package/src/components/silke-card/silke-card.scss +92 -39
- package/src/components/silke-card/silke-card.tsx +50 -27
- package/src/components/silke-checkbox/silke-checkbox.scss +39 -17
- package/src/components/silke-checkbox/silke-checkbox.tsx +4 -1
- package/src/components/silke-code-editor/index.tsx +12 -0
- package/src/components/silke-code-editor/silke-code-editor.mdx +97 -0
- package/src/components/silke-code-editor/silke-code-editor.tsx +52 -0
- package/src/components/silke-code-snippet/silke-code-snippet.scss +2 -10
- package/src/components/silke-code-snippet/silke-code-snippet.tsx +10 -3
- package/src/components/silke-color-palettes/silke-color-palette.tsx +11 -2
- package/src/components/silke-color-picker/color-picker.scss +10 -6
- package/src/components/silke-color-picker/silke-color-info.tsx +14 -4
- package/src/components/silke-color-picker/silke-color-picker-button.tsx +4 -3
- package/src/components/silke-color-picker/silke-color-picker.tsx +4 -2
- package/src/components/silke-color-picker/silke-opacity-slider.tsx +11 -12
- package/src/components/silke-color-swatches/silke-color-swatch-button.tsx +10 -4
- package/src/components/silke-color-swatches/silke-swatches.tsx +2 -2
- package/src/components/silke-content-column/index.ts +1 -0
- package/src/components/silke-content-column/silke-content-column.mdx +7 -0
- package/src/components/silke-content-column/silke-content-column.scss +39 -0
- package/src/components/silke-content-column/silke-content-column.tsx +14 -0
- package/src/components/silke-context-menu/silke-context-menu-item.tsx +9 -4
- package/src/components/silke-context-menu/silke-context-menu.mdx +16 -12
- package/src/components/silke-context-menu/silke-context-menu.scss +16 -0
- package/src/components/silke-context-menu/silke-context-menu.tsx +62 -39
- package/src/components/silke-css-number-field/silke-css-context.tsx +1 -0
- package/src/components/silke-css-number-field/silke-css-number-field.scss +18 -3
- package/src/components/silke-css-number-field/silke-css-number-field.tsx +32 -13
- package/src/components/silke-css-number-field/utils.ts +2 -0
- package/src/components/silke-divider/silke-divider.scss +4 -2
- package/src/components/silke-drawer/silke-drawer.scss +3 -3
- package/src/components/silke-drawer/silke-drawer.tsx +3 -3
- package/src/components/silke-form/silke-form.tsx +1 -9
- package/src/components/silke-form-schema/fields/array-field-inline.tsx +2 -3
- package/src/components/silke-form-schema/fields/array-field-modal.tsx +1 -1
- package/src/components/silke-form-schema/fields/array-field.tsx +2 -2
- package/src/components/silke-form-schema/fields/event-field.tsx +120 -0
- package/src/components/silke-form-schema/fields/icon-field.tsx +1 -1
- package/src/components/silke-form-schema/fields/image-field.tsx +1 -1
- package/src/components/silke-form-schema/fields/link-field.tsx +8 -1
- package/src/components/silke-form-schema/fields/number-field.tsx +24 -8
- package/src/components/silke-form-schema/fields/object-field.tsx +1 -1
- package/src/components/silke-form-schema/fields/select-field.tsx +9 -2
- package/src/components/silke-form-schema/fields/styles.scss +2 -2
- package/src/components/silke-form-schema/fields/toggle-field.tsx +14 -13
- package/src/components/silke-form-schema/fields/upload-field.tsx +37 -0
- package/src/components/silke-form-schema/fields/utils/generate-image.ts +3 -4
- package/src/components/silke-form-schema/fields/utils/generate-title.ts +1 -3
- package/src/components/silke-form-schema/index.ts +1 -0
- package/src/components/silke-form-schema/silke-extended-fields-context.tsx +22 -0
- package/src/components/silke-form-schema/silke-schema-field.tsx +19 -6
- package/src/components/silke-icon/silke-icon.scss +3 -2
- package/src/components/silke-icon/silke-icon.tsx +7 -3
- package/src/components/silke-icon/silke-shape.tsx +3 -2
- package/src/components/silke-icon-picker/emoji-tab.tsx +2 -2
- package/src/components/silke-icon-picker/icons-tab.tsx +1 -1
- package/src/components/silke-icon-picker/silke-icon-picker.tsx +1 -1
- package/src/components/silke-iframe-portal/index.ts +4 -0
- package/src/components/silke-iframe-portal/silke-iframe-context.ts +6 -0
- package/src/components/silke-iframe-portal/silke-iframe-css-link.tsx +20 -0
- package/src/components/silke-iframe-portal/silke-iframe-portal.mdx +34 -0
- package/src/components/silke-iframe-portal/silke-iframe-portal.tsx +77 -0
- package/src/components/silke-iframe-portal/silke-iframe-script.tsx +20 -0
- package/src/components/silke-link/silke-link.scss +2 -2
- package/src/components/silke-link/silke-link.tsx +8 -9
- package/src/components/silke-list/silke-list.scss +1 -1
- package/src/components/silke-list-card/index.ts +1 -0
- package/src/components/silke-list-card/silke-list-card.mdx +50 -0
- package/src/components/silke-list-card/silke-list-card.scss +57 -0
- package/src/components/silke-list-card/silke-list-card.tsx +65 -0
- package/src/components/silke-loader/index.ts +1 -0
- package/src/components/silke-loader/silke-loader-overlay.tsx +63 -0
- package/src/components/silke-loader/silke-loader.scss +112 -0
- package/src/components/silke-loader/silke-loader.tsx +1 -0
- package/src/components/silke-modal/silke-confirmation-modal.tsx +1 -1
- package/src/components/silke-modal/silke-modal.mdx +1 -1
- package/src/components/silke-modal/silke-modal.scss +16 -10
- package/src/components/silke-modal/silke-modal.tsx +65 -47
- package/src/components/silke-navigation-link/silke-navigation-link.scss +69 -41
- package/src/components/silke-navigation-link/silke-navigation-link.tsx +26 -14
- package/src/components/silke-notification/confetti.tsx +164 -0
- package/src/components/silke-notification/silke-notification.mdx +137 -20
- package/src/components/silke-notification/silke-notification.scss +116 -89
- package/src/components/silke-notification/silke-notification.tsx +44 -113
- package/src/components/silke-object-field/silke-object-field.tsx +1 -1
- package/src/components/silke-overflow-menu/silke-overflow-menu.mdx +2 -2
- package/src/components/silke-overflow-menu/silke-overflow-menu.scss +12 -4
- package/src/components/silke-overflow-menu/silke-overflow-menu.tsx +53 -30
- package/src/components/silke-popover/silke-popover.mdx +2 -2
- package/src/components/silke-popover/silke-popover.tsx +23 -5
- package/src/components/silke-progress-indicator/silke-progress-indicator.scss +5 -5
- package/src/components/silke-radio-button/silke-radio-button-group.tsx +1 -1
- package/src/components/silke-radio-button/silke-radio-button.scss +24 -9
- package/src/components/silke-search-field/silke-search-field.tsx +10 -5
- package/src/components/silke-select-field/silke-select-field.mdx +11 -5
- package/src/components/silke-skeleton/silke-skeleton.scss +2 -2
- package/src/components/silke-slider/range-slider.scss +13 -10
- package/src/components/silke-slider/silke-slider.tsx +5 -0
- package/src/components/silke-sortable-list/silke-nested-sortable-item.tsx +105 -0
- package/src/components/silke-sortable-list/silke-nested-sortable-list.scss +37 -25
- package/src/components/silke-sortable-list/silke-nested-sortable-list.tsx +180 -127
- package/src/components/silke-sortable-list/silke-nested-sortable-utils.ts +53 -23
- package/src/components/silke-sortable-list/silke-sortable-item-wrapper.tsx +1 -1
- package/src/components/silke-sortable-list/silke-sortable-list.mdx +12 -16
- package/src/components/silke-sortable-list/silke-sortable-list.scss +39 -29
- package/src/components/silke-sortable-list/silke-sortable-list.tsx +27 -15
- package/src/components/silke-steps/index.ts +1 -0
- package/src/components/silke-steps/silke-steps.mdx +60 -0
- package/src/components/silke-steps/silke-steps.scss +14 -0
- package/src/components/silke-steps/silke-steps.tsx +53 -0
- package/src/components/silke-table/silke-table.mdx +44 -13
- package/src/components/silke-table/silke-table.scss +19 -9
- package/src/components/silke-table/silke-table.tsx +80 -71
- package/src/components/silke-table/table-row.tsx +11 -6
- package/src/components/silke-tabs/silke-tab.tsx +4 -0
- package/src/components/silke-tabs/silke-tabs.scss +18 -15
- package/src/components/silke-tabs/silke-tabs.tsx +4 -7
- package/src/components/silke-tag/silke-tag.mdx +36 -2
- package/src/components/silke-tag/silke-tag.scss +49 -30
- package/src/components/silke-tag/silke-tag.tsx +21 -6
- package/src/components/silke-text/silke-text-types.ts +2 -1
- package/src/components/silke-text/silke-text.mdx +28 -20
- package/src/components/silke-text/silke-text.scss +8 -7
- package/src/components/silke-text/silke-title.scss +1 -1
- package/src/components/silke-text-field/silke-text-field-outline.tsx +4 -4
- package/src/components/silke-text-field/silke-text-field.mdx +32 -14
- package/src/components/silke-text-field/silke-text-field.scss +41 -23
- package/src/components/silke-text-field/silke-text-field.tsx +13 -5
- package/src/components/silke-text-field/text-field-context.tsx +1 -1
- package/src/components/silke-theme-editor/index.ts +1 -0
- package/src/components/silke-theme-editor/silke-theme-editor.tsx +165 -0
- package/src/components/silke-tile/silke-tile.scss +13 -18
- package/src/components/silke-tile/silke-tile.tsx +11 -17
- package/src/components/silke-toggle/silke-toggle.scss +17 -9
- package/src/components/silke-toggle/silke-toggle.tsx +1 -1
- package/src/components/silke-toolbar/silke-toolbar.scss +1 -1
- package/src/components/silke-tooltip/silke-definition-tooltip.tsx +14 -6
- package/src/components/silke-tooltip/silke-icon-tooltip.tsx +48 -34
- package/src/components/silke-tooltip/silke-interactive-tooltip.tsx +5 -3
- package/src/components/silke-tooltip/silke-tooltip.mdx +69 -2
- package/src/components/silke-tooltip/silke-tooltip.scss +71 -46
- package/src/components/silke-tooltip/silke-tooltip.tsx +142 -52
- package/src/components/silke-tooltip/utils.ts +93 -0
- package/src/components/silke-upload-field/silke-upload-field.mdx +14 -0
- package/src/components/silke-upload-field/silke-upload-field.scss +26 -17
- package/src/components/silke-upload-field/silke-upload-field.tsx +37 -14
- package/src/docs/app.tsx +118 -25
- package/src/docs/components/code-block/code-block.scss +0 -2
- package/src/docs/components/code-block/code-block.tsx +17 -9
- package/src/hooks/drag-and-drop/use-drag.tsx +5 -1
- package/src/hooks/drag-and-drop/use-drop.tsx +5 -4
- package/src/icons.tsx +194 -10
- package/src/index.mdx +66 -1
- package/src/main.tsx +5 -2
- package/src/silke-theme-provider.tsx +51 -3
- package/src/styles/core.scss +56 -91
- package/webpack.docs.ts +1 -3
- package/webpack.config.ts +0 -131
|
@@ -4,29 +4,31 @@ import React, {
|
|
|
4
4
|
Children,
|
|
5
5
|
ReactNode,
|
|
6
6
|
SyntheticEvent,
|
|
7
|
-
useLayoutEffect,
|
|
8
7
|
useEffect,
|
|
8
|
+
useLayoutEffect,
|
|
9
9
|
useRef,
|
|
10
10
|
useState,
|
|
11
11
|
} from 'react';
|
|
12
|
-
import {
|
|
12
|
+
import { useCallbackRef, useFormField } from '../../hooks';
|
|
13
13
|
import { SilkeBox } from '../silke-box';
|
|
14
14
|
import { FormFieldProps } from '../silke-form';
|
|
15
15
|
import { SilkeOverflowMenuItem } from '../silke-overflow-menu';
|
|
16
16
|
import { SilkePopover } from '../silke-popover';
|
|
17
17
|
import { SilkeTextFieldItem } from '../silke-text-field';
|
|
18
18
|
import {
|
|
19
|
+
getInputSize,
|
|
19
20
|
SilkeTextFieldOutline,
|
|
20
21
|
SilkeTextFieldOutlineProps,
|
|
21
22
|
} from '../silke-text-field/silke-text-field-outline';
|
|
23
|
+
import textFieldStyles from '../silke-text-field/silke-text-field.scss';
|
|
22
24
|
import { useTextFieldContext } from '../silke-text-field/text-field-context';
|
|
23
25
|
import { useSilkeCSSContext } from './silke-css-context';
|
|
24
26
|
import styles from './silke-css-number-field.scss';
|
|
25
27
|
import {
|
|
28
|
+
convertCSSNumberFormat,
|
|
26
29
|
convertCSSNumberString,
|
|
27
30
|
FORMAT_LABELS,
|
|
28
31
|
roundCSSNumber,
|
|
29
|
-
convertCSSNumberFormat,
|
|
30
32
|
} from './utils';
|
|
31
33
|
|
|
32
34
|
export type SilkeCssNumberFieldProps = FormFieldProps<string> &
|
|
@@ -63,21 +65,27 @@ export function SilkeCssNumberField(props: SilkeCssNumberFieldProps) {
|
|
|
63
65
|
axis,
|
|
64
66
|
allowAuto,
|
|
65
67
|
autoFocus,
|
|
68
|
+
className,
|
|
66
69
|
onEnter,
|
|
67
70
|
onChange,
|
|
68
71
|
...rest
|
|
69
72
|
} = useFormField(props);
|
|
70
73
|
const [openFormat, setFormatOpen] = useState(false);
|
|
71
|
-
const textContext = useTextFieldContext();
|
|
72
74
|
const rootRef = useRef<HTMLDivElement>(null);
|
|
73
75
|
const numberRef = useRef<HTMLDivElement>(null);
|
|
74
76
|
const formatRef = useRef<HTMLDivElement>(null);
|
|
75
77
|
const context = useSilkeCSSContext();
|
|
78
|
+
const textContext = useTextFieldContext();
|
|
76
79
|
const isAuto = allowAuto && value === 'auto';
|
|
77
80
|
const isMixed = value === 'mixed';
|
|
78
81
|
const number = isAuto ? 'Auto' : isMixed ? 'Mixed' : parseFloat(value || '0') || 0;
|
|
79
82
|
const format = isAuto || isMixed ? '' : getCSSNumberFormat(value || '0');
|
|
80
83
|
|
|
84
|
+
let cl = styles.root;
|
|
85
|
+
if (openFormat) cl += ' ' + styles.openFormat;
|
|
86
|
+
if (className) cl += ' ' + className;
|
|
87
|
+
if (disabled) cl = styles.disabled;
|
|
88
|
+
|
|
81
89
|
const handleNumberChange = () => {
|
|
82
90
|
const formatEl = formatRef.current;
|
|
83
91
|
const numberEl = numberRef.current;
|
|
@@ -128,7 +136,11 @@ export function SilkeCssNumberField(props: SilkeCssNumberFieldProps) {
|
|
|
128
136
|
};
|
|
129
137
|
|
|
130
138
|
const handleFocus = (e: SyntheticEvent<HTMLDivElement>) => {
|
|
131
|
-
if (
|
|
139
|
+
if (
|
|
140
|
+
!disabled &&
|
|
141
|
+
!context.readonly &&
|
|
142
|
+
(e.currentTarget === formatRef.current || isAuto || isMixed)
|
|
143
|
+
)
|
|
132
144
|
setFormatOpen(true);
|
|
133
145
|
|
|
134
146
|
const selection = window.getSelection();
|
|
@@ -273,7 +285,6 @@ export function SilkeCssNumberField(props: SilkeCssNumberFieldProps) {
|
|
|
273
285
|
handleSelectText(e.currentTarget, true);
|
|
274
286
|
}
|
|
275
287
|
};
|
|
276
|
-
if (disabled) rest.className = (rest.className || '') + ' ' + styles.disabled;
|
|
277
288
|
|
|
278
289
|
const before: ReactNode[] = [];
|
|
279
290
|
const after: ReactNode[] = [];
|
|
@@ -332,9 +343,12 @@ export function SilkeCssNumberField(props: SilkeCssNumberFieldProps) {
|
|
|
332
343
|
window.addEventListener('mouseup', handleMouseUp);
|
|
333
344
|
};
|
|
334
345
|
|
|
346
|
+
const inputCl = styles.field + ' ' + textFieldStyles.input;
|
|
347
|
+
|
|
335
348
|
return (
|
|
336
349
|
<SilkeTextFieldOutline
|
|
337
350
|
{...rest}
|
|
351
|
+
className={cl}
|
|
338
352
|
onClick={handleFieldClick}
|
|
339
353
|
ref={rootRef}
|
|
340
354
|
hAlign="end"
|
|
@@ -344,11 +358,11 @@ export function SilkeCssNumberField(props: SilkeCssNumberFieldProps) {
|
|
|
344
358
|
{before}
|
|
345
359
|
<div
|
|
346
360
|
key="number"
|
|
347
|
-
className={
|
|
361
|
+
className={inputCl}
|
|
348
362
|
ref={numberRef}
|
|
349
363
|
role="textbox"
|
|
350
364
|
tabIndex={disabled ? -1 : undefined}
|
|
351
|
-
contentEditable
|
|
365
|
+
contentEditable={!context.readonly}
|
|
352
366
|
autoCorrect="off"
|
|
353
367
|
spellCheck={false}
|
|
354
368
|
onInput={disabled ? preventDefault : handleNumberChange}
|
|
@@ -366,14 +380,16 @@ export function SilkeCssNumberField(props: SilkeCssNumberFieldProps) {
|
|
|
366
380
|
role="textbox"
|
|
367
381
|
spellCheck={false}
|
|
368
382
|
className={styles.field}
|
|
369
|
-
contentEditable={(formats?.length || 0) > 1}
|
|
383
|
+
contentEditable={(formats?.length || 0) > 1 && !context.readonly}
|
|
370
384
|
onFocus={handleFocus}
|
|
371
385
|
onClick={handleFocus}
|
|
372
386
|
onBlur={handleFormatBlur}
|
|
373
387
|
onKeyDown={disabled ? preventDefault : handleFormatKeyDown}
|
|
374
388
|
onInput={disabled ? preventDefault : handleFormatChange}
|
|
375
389
|
/>
|
|
376
|
-
{!disabled &&
|
|
390
|
+
{!disabled && !context.readonly && !isAuto && (
|
|
391
|
+
<div className={styles.dragBar} onMouseDown={handleStartDrag} />
|
|
392
|
+
)}
|
|
377
393
|
{after}
|
|
378
394
|
|
|
379
395
|
{openFormat && (
|
|
@@ -381,13 +397,15 @@ export function SilkeCssNumberField(props: SilkeCssNumberFieldProps) {
|
|
|
381
397
|
anchor={rootRef}
|
|
382
398
|
targetOrigin="top-left"
|
|
383
399
|
anchorOrigin="bottom-left"
|
|
400
|
+
shadow="level2"
|
|
384
401
|
onRequestClose={() => setFormatOpen(false)}
|
|
385
402
|
>
|
|
386
|
-
<SilkeBox column bg="
|
|
403
|
+
<SilkeBox column bg="neutral-20" rounded overflow="hidden" className={styles.menu}>
|
|
387
404
|
{formats?.map((item) => (
|
|
388
405
|
<SilkeOverflowMenuItem
|
|
389
406
|
key={item}
|
|
390
|
-
size=
|
|
407
|
+
size="s"
|
|
408
|
+
style={{ justifyContent: 'start' }}
|
|
391
409
|
kind={item === format ? 'selected' : 'default'}
|
|
392
410
|
onMouseDown={() => handleFormatSelect(item)}
|
|
393
411
|
label={item in FORMAT_LABELS ? `${get(FORMAT_LABELS, item)} (${item})` : item}
|
|
@@ -396,8 +414,9 @@ export function SilkeCssNumberField(props: SilkeCssNumberFieldProps) {
|
|
|
396
414
|
{allowAuto && (
|
|
397
415
|
<SilkeOverflowMenuItem
|
|
398
416
|
label="Auto"
|
|
399
|
-
size=
|
|
417
|
+
size="s"
|
|
400
418
|
onMouseDown={() => onChange('auto')}
|
|
419
|
+
style={{ justifyContent: 'start' }}
|
|
401
420
|
/>
|
|
402
421
|
)}
|
|
403
422
|
</SilkeBox>
|
|
@@ -14,6 +14,7 @@ export const FORMAT_PRECISION = {
|
|
|
14
14
|
vw: 1,
|
|
15
15
|
vmax: 1,
|
|
16
16
|
vmin: 1,
|
|
17
|
+
s: 2,
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
export const FORMAT_LABELS = {
|
|
@@ -26,6 +27,7 @@ export const FORMAT_LABELS = {
|
|
|
26
27
|
em: 'Font-size relative',
|
|
27
28
|
deg: 'º',
|
|
28
29
|
rad: 'Radians',
|
|
30
|
+
s: 'Seconds',
|
|
29
31
|
};
|
|
30
32
|
|
|
31
33
|
export function roundCSSNumber(value: number, format: string, min?: number, max?: number): number {
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
@use "../../variables" as *;
|
|
2
2
|
|
|
3
3
|
.light {
|
|
4
|
-
background-color: rgba(var(--color-neutral-
|
|
4
|
+
background-color: rgba(var(--color-neutral-70-rgb), var(--opacity-level-light));
|
|
5
5
|
}
|
|
6
6
|
.dark {
|
|
7
|
-
background-color:
|
|
7
|
+
background-color: var(--color-neutral-0);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.vertical {
|
|
11
11
|
width: 1px;
|
|
12
|
+
min-width: 1px;
|
|
12
13
|
max-width: 1px;
|
|
13
14
|
height:100%;
|
|
14
15
|
}
|
|
15
16
|
.horizontal {
|
|
16
17
|
height: 1px;
|
|
17
18
|
max-height: 1px;
|
|
19
|
+
min-height: 1px;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
@each $name, $size in $space {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
right: 0;
|
|
6
6
|
bottom: 0;
|
|
7
7
|
z-index: 20;
|
|
8
|
-
background: rgba(var(--color-neutral-
|
|
8
|
+
background: rgba(var(--color-neutral-0-rgb), var(--opacity-level-intense));
|
|
9
9
|
pointer-events: none;
|
|
10
10
|
opacity: 0;
|
|
11
11
|
transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
height: 90px;
|
|
29
29
|
bottom: 0;
|
|
30
30
|
left: 0;
|
|
31
|
-
background: linear-gradient(180deg, rgba(var(--color-neutral-
|
|
31
|
+
background: linear-gradient(180deg, rgba(var(--color-neutral-5-rgb), 0) 0%, rgba(var(--color-neutral-5-rgb), var(--opacity-level-semiopaque)) 100%);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.content-inner:focus-visible {
|
|
40
|
-
box-shadow: 0 0 0 2px var(--color-neutral-
|
|
40
|
+
box-shadow: 0 0 0 2px var(--color-neutral-100);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
&.open {
|
|
@@ -12,7 +12,7 @@ import { SilkeTitleKind } from '../silke-text/silke-text-types';
|
|
|
12
12
|
const cl = classnames.bind(styles);
|
|
13
13
|
|
|
14
14
|
export interface SilkeDrawerProps {
|
|
15
|
-
title?:
|
|
15
|
+
title?: React.ReactNode;
|
|
16
16
|
titleKind?: SilkeTitleKind;
|
|
17
17
|
open: boolean;
|
|
18
18
|
onRequestClose: () => void;
|
|
@@ -46,7 +46,7 @@ export const SilkeDrawer = ({
|
|
|
46
46
|
}
|
|
47
47
|
}, [open, ref.current]);
|
|
48
48
|
|
|
49
|
-
useKeyUp('
|
|
49
|
+
useKeyUp('Escape', () => {
|
|
50
50
|
if (open) {
|
|
51
51
|
onRequestClose();
|
|
52
52
|
}
|
|
@@ -78,7 +78,7 @@ export const SilkeDrawer = ({
|
|
|
78
78
|
|
|
79
79
|
return (
|
|
80
80
|
<div className={cl('sidebar', { open })} id="sliding-sidebar" onTransitionEnd={onTransitionEnd}>
|
|
81
|
-
<SilkeBox bg="
|
|
81
|
+
<SilkeBox bg="neutral-5" className={cl('content', { fader: doDisplayFader })}>
|
|
82
82
|
<SilkeBox
|
|
83
83
|
pad="xl"
|
|
84
84
|
column
|
|
@@ -59,15 +59,7 @@ export function SilkeForm<T>({
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
return (
|
|
62
|
-
<SilkeBox
|
|
63
|
-
tag="form"
|
|
64
|
-
column
|
|
65
|
-
gap="l"
|
|
66
|
-
hAlign="start"
|
|
67
|
-
onSubmit={handleSubmit}
|
|
68
|
-
onReset={handleReset}
|
|
69
|
-
{...rest}
|
|
70
|
-
>
|
|
62
|
+
<SilkeBox tag="form" column gap="l" onSubmit={handleSubmit} onReset={handleReset} {...rest}>
|
|
71
63
|
<SilkeObjectField
|
|
72
64
|
name="form"
|
|
73
65
|
errors={errors}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useCallback, useRef } from 'react';
|
|
2
2
|
import { SilkeSchemaFields } from '../silke-schema-fields';
|
|
3
3
|
import { SilkeTextField } from '../../silke-text-field';
|
|
4
4
|
import { FieldRegisterModel, FormObjectProvider } from '../../silke-form/form-context';
|
|
@@ -7,7 +7,6 @@ import { SilkeBox } from '../../silke-box';
|
|
|
7
7
|
import { SilkeButton } from '../../silke-button';
|
|
8
8
|
import { generateTitle } from './utils';
|
|
9
9
|
import { VevProps } from '@vev/react';
|
|
10
|
-
import styles from './styles.scss';
|
|
11
10
|
|
|
12
11
|
type Props = {
|
|
13
12
|
selected: number;
|
|
@@ -27,7 +26,7 @@ export function ArrayFieldInline({ value, selected, schema, onChange, onDelete,
|
|
|
27
26
|
}, []);
|
|
28
27
|
|
|
29
28
|
return (
|
|
30
|
-
<SilkeBox column bg="
|
|
29
|
+
<SilkeBox column bg="neutral-5">
|
|
31
30
|
<SilkeBox pad="s" vAlign="center">
|
|
32
31
|
<SilkeBox hPad="s" vPad="s" flex>
|
|
33
32
|
<SilkeText weight="strong">
|
|
@@ -46,7 +46,7 @@ export function ArrayFieldModal({
|
|
|
46
46
|
hide={selected === undefined}
|
|
47
47
|
zIndex={90}
|
|
48
48
|
>
|
|
49
|
-
<SilkeBox column bg="
|
|
49
|
+
<SilkeBox column bg="neutral-5" className={styles.arrayFieldModal}>
|
|
50
50
|
<SilkeBox pad="s" vAlign="center">
|
|
51
51
|
<SilkeBox hPad="s" vPad="s" flex>
|
|
52
52
|
<SilkeText weight="strong">
|
|
@@ -74,7 +74,7 @@ const ArrayField = ({ value = [], schema, onChange }: SchemaFieldProps<ArrayFiel
|
|
|
74
74
|
)}
|
|
75
75
|
</SilkeBox>
|
|
76
76
|
</SilkeBox>
|
|
77
|
-
{schema.description && <SilkeText color="
|
|
77
|
+
{schema.description && <SilkeText color="neutral-80">{schema.description}</SilkeText>}
|
|
78
78
|
{selected !== undefined &&
|
|
79
79
|
(isModal ? (
|
|
80
80
|
<ArrayFieldModal
|
|
@@ -101,7 +101,7 @@ const ArrayField = ({ value = [], schema, onChange }: SchemaFieldProps<ArrayFiel
|
|
|
101
101
|
{!value.length && (
|
|
102
102
|
<>
|
|
103
103
|
<SilkeBox>
|
|
104
|
-
<SilkeText color="
|
|
104
|
+
<SilkeText color="neutral-40">No data</SilkeText>
|
|
105
105
|
</SilkeBox>
|
|
106
106
|
</>
|
|
107
107
|
)}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { EventField as EventFieldType, SchemaFieldProps, VevContentEvent } from '@vev/react';
|
|
3
|
+
import { SilkeBox } from '../../silke-box';
|
|
4
|
+
import { SilkeTextSmall } from '../../silke-text';
|
|
5
|
+
import { SilkeNotification } from '../../silke-notification';
|
|
6
|
+
import { SilkeTag } from '../../silke-tag';
|
|
7
|
+
import { SilkeIcon } from '../../silke-icon';
|
|
8
|
+
import ObjectField from './object-field';
|
|
9
|
+
|
|
10
|
+
const headerStyle = {
|
|
11
|
+
cursor: 'pointer',
|
|
12
|
+
fontWeight: '600',
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const EventField = ({ value = [], onChange, context }: SchemaFieldProps<EventFieldType>) => {
|
|
17
|
+
const [toggle, setToggle] = useState(false);
|
|
18
|
+
|
|
19
|
+
const pageEvents = context.events?.filter((event) => event.page === context.currentPage?.key);
|
|
20
|
+
const otherEvents = context.events?.filter(
|
|
21
|
+
(event) => event.page !== context.currentPage?.key || !event.page,
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
const renderEvents = (events: VevContentEvent[]) => {
|
|
25
|
+
const grouped = events.reduce((res, curr) => {
|
|
26
|
+
const { key } = curr.content;
|
|
27
|
+
if (!res[key]) res[key] = [];
|
|
28
|
+
res[key].push(curr);
|
|
29
|
+
return res;
|
|
30
|
+
}, {} as { [key: string]: VevContentEvent[] });
|
|
31
|
+
|
|
32
|
+
return Object.keys(grouped).map((key, i) => {
|
|
33
|
+
const name = events.find((e) => e.content.key === key)?.content?.name;
|
|
34
|
+
return (
|
|
35
|
+
<SilkeBox column key={key} gap="s">
|
|
36
|
+
<SilkeTextSmall>{name}</SilkeTextSmall>
|
|
37
|
+
<SilkeBox column gap="s">
|
|
38
|
+
{grouped[key].map((event, i) => {
|
|
39
|
+
const curr = `${event.content.key}:${event.name}`;
|
|
40
|
+
return (
|
|
41
|
+
<SilkeBox column key={curr}>
|
|
42
|
+
<SilkeBox gap="s" style={{ border: '1px solid #222' }}>
|
|
43
|
+
<SilkeTag
|
|
44
|
+
label={event.name}
|
|
45
|
+
style={{ cursor: 'pointer' }}
|
|
46
|
+
kind={value.find((e) => e.key === curr) ? 'green' : 'sand'}
|
|
47
|
+
onClick={() => {
|
|
48
|
+
if (value.find((e) => e.key === curr)) {
|
|
49
|
+
return onChange(value.filter((v) => v.key !== curr));
|
|
50
|
+
}
|
|
51
|
+
onChange([...value, { key: curr }]);
|
|
52
|
+
}}
|
|
53
|
+
></SilkeTag>
|
|
54
|
+
<SilkeBox column>
|
|
55
|
+
<SilkeBox> {event.description}</SilkeBox>
|
|
56
|
+
{value.find((v) => v.key === curr) && event.args && (
|
|
57
|
+
<SilkeBox vPad>
|
|
58
|
+
<ObjectField
|
|
59
|
+
schema={{
|
|
60
|
+
fields: event.args,
|
|
61
|
+
type: 'object',
|
|
62
|
+
name: 'args',
|
|
63
|
+
title: 'Arguments',
|
|
64
|
+
}}
|
|
65
|
+
value={value.find((v) => v.key === curr)?.args}
|
|
66
|
+
onChange={(val) => {
|
|
67
|
+
const currIndex = value.map((v) => v.key).indexOf(curr);
|
|
68
|
+
value[currIndex] = {
|
|
69
|
+
key: curr,
|
|
70
|
+
args: val,
|
|
71
|
+
};
|
|
72
|
+
currIndex >= 0 && onChange(value);
|
|
73
|
+
}}
|
|
74
|
+
label="Arguments"
|
|
75
|
+
context={context}
|
|
76
|
+
/>
|
|
77
|
+
</SilkeBox>
|
|
78
|
+
)}
|
|
79
|
+
</SilkeBox>
|
|
80
|
+
</SilkeBox>
|
|
81
|
+
</SilkeBox>
|
|
82
|
+
);
|
|
83
|
+
})}
|
|
84
|
+
</SilkeBox>
|
|
85
|
+
</SilkeBox>
|
|
86
|
+
);
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<SilkeBox flex column gap="m">
|
|
92
|
+
{pageEvents?.length ? (
|
|
93
|
+
<SilkeBox column gap="m">
|
|
94
|
+
<SilkeBox style={headerStyle}>Events on current page</SilkeBox>
|
|
95
|
+
{renderEvents(pageEvents)}
|
|
96
|
+
{otherEvents?.length && (
|
|
97
|
+
<SilkeBox column gap="m">
|
|
98
|
+
<SilkeBox onClick={() => setToggle(!toggle)} style={headerStyle}>
|
|
99
|
+
Events on other pages{' '}
|
|
100
|
+
<SilkeIcon
|
|
101
|
+
icon={!toggle ? 'caret.up' : 'caret.down'}
|
|
102
|
+
style={{ marginLeft: '6px' }}
|
|
103
|
+
/>
|
|
104
|
+
</SilkeBox>
|
|
105
|
+
{toggle && renderEvents(otherEvents)}
|
|
106
|
+
</SilkeBox>
|
|
107
|
+
)}
|
|
108
|
+
</SilkeBox>
|
|
109
|
+
) : (
|
|
110
|
+
<SilkeNotification
|
|
111
|
+
kind="warning"
|
|
112
|
+
title="No events in this projects"
|
|
113
|
+
subtitle="Add widgets with events to be able to select an event"
|
|
114
|
+
/>
|
|
115
|
+
)}
|
|
116
|
+
</SilkeBox>
|
|
117
|
+
);
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export default EventField;
|
|
@@ -28,7 +28,7 @@ const IconField = ({ value, schema, onChange }: SchemaFieldProps<IconFieldType>)
|
|
|
28
28
|
<SilkeBox flex vPad="s" align="center" style={{ justifyContent: 'space-between' }}>
|
|
29
29
|
<SilkeTextSmall>{getTitle(schema)}</SilkeTextSmall>
|
|
30
30
|
{schema.description && (
|
|
31
|
-
<SilkeTextSmall color="
|
|
31
|
+
<SilkeTextSmall color="neutral-80">{schema.description}</SilkeTextSmall>
|
|
32
32
|
)}
|
|
33
33
|
<SilkeBox align="center">
|
|
34
34
|
<SilkeBox style={{ height: '20px', width: '20px', marginRight: '20px' }}>
|
|
@@ -27,7 +27,7 @@ const ImageField = ({ value, schema, onChange }: SchemaFieldProps<ImageFieldType
|
|
|
27
27
|
<SilkeBox column flex vPad="s">
|
|
28
28
|
<SilkeTextSmall>{getTitle(schema)}</SilkeTextSmall>
|
|
29
29
|
{schema.description && (
|
|
30
|
-
<SilkeTextSmall color="
|
|
30
|
+
<SilkeTextSmall color="neutral-80">{schema.description}</SilkeTextSmall>
|
|
31
31
|
)}
|
|
32
32
|
<SilkeBox column>
|
|
33
33
|
<SilkeImage
|
|
@@ -3,7 +3,7 @@ import React, { useState } from 'react';
|
|
|
3
3
|
import { SilkeAutocompleteField } from '../../silke-autocomplete-field';
|
|
4
4
|
import { SilkeBox } from '../../silke-box';
|
|
5
5
|
import { SilkeToggle } from '../../silke-toggle';
|
|
6
|
-
import { SilkeTextSmall } from '../../silke-text';
|
|
6
|
+
import { SilkeText, SilkeTextSmall } from '../../silke-text';
|
|
7
7
|
|
|
8
8
|
import { useSchemaContext } from '../silke-schema-context';
|
|
9
9
|
import { getTitle } from './string-field';
|
|
@@ -84,6 +84,13 @@ const SelectField = (props: SchemaFieldProps<LinkFieldType>) => {
|
|
|
84
84
|
size="xs"
|
|
85
85
|
inline
|
|
86
86
|
inlineLabelWidth={80}
|
|
87
|
+
renderItem={(item) => {
|
|
88
|
+
return (
|
|
89
|
+
<SilkeText style={{ paddingLeft: '4px' }} size="small" title={item.item.label} overflow>
|
|
90
|
+
{item.item.label}
|
|
91
|
+
</SilkeText>
|
|
92
|
+
);
|
|
93
|
+
}}
|
|
87
94
|
/>
|
|
88
95
|
<SilkeBox>
|
|
89
96
|
<SilkeTextSmall flex>Open in new tab</SilkeTextSmall>
|
|
@@ -10,7 +10,7 @@ import { getTitle } from './string-field';
|
|
|
10
10
|
const NumberField = (props: SchemaFieldProps<NumberFieldType>) => {
|
|
11
11
|
const [errorMessage, setErrorMessage] = useState<string>();
|
|
12
12
|
const {
|
|
13
|
-
value
|
|
13
|
+
value,
|
|
14
14
|
onChange,
|
|
15
15
|
schema,
|
|
16
16
|
schema: {
|
|
@@ -27,8 +27,10 @@ const NumberField = (props: SchemaFieldProps<NumberFieldType>) => {
|
|
|
27
27
|
} = props || {};
|
|
28
28
|
|
|
29
29
|
useEffect(() => {
|
|
30
|
-
if (value
|
|
31
|
-
|
|
30
|
+
if (value) {
|
|
31
|
+
if (value < min) return setErrorMessage(`Value must be greater than ${min}`);
|
|
32
|
+
if (value > max) return setErrorMessage(`Value must be less than ${max}`);
|
|
33
|
+
}
|
|
32
34
|
setErrorMessage(undefined);
|
|
33
35
|
}, [value, min, max]);
|
|
34
36
|
|
|
@@ -36,15 +38,16 @@ const NumberField = (props: SchemaFieldProps<NumberFieldType>) => {
|
|
|
36
38
|
const format = props.schema?.options?.format;
|
|
37
39
|
|
|
38
40
|
if (display === 'slider') {
|
|
41
|
+
const sliderValue = value ?? 0;
|
|
39
42
|
return (
|
|
40
43
|
<SilkeBox column flex>
|
|
41
|
-
<SilkeText tag="label"
|
|
44
|
+
<SilkeText tag="label" color="neutral-100">
|
|
42
45
|
{title || name}
|
|
43
46
|
</SilkeText>
|
|
44
|
-
{description && <SilkeText color="
|
|
47
|
+
{description && <SilkeText color="neutral-80">{description}</SilkeText>}
|
|
45
48
|
<SilkeBox vPad="s">
|
|
46
49
|
<SilkeSlider
|
|
47
|
-
value={(
|
|
50
|
+
value={(sliderValue - min) / (max - min)}
|
|
48
51
|
onChange={(percentage) => {
|
|
49
52
|
const value = (percentage * (max - min) + min) / scale;
|
|
50
53
|
onChange(value);
|
|
@@ -67,13 +70,26 @@ const NumberField = (props: SchemaFieldProps<NumberFieldType>) => {
|
|
|
67
70
|
);
|
|
68
71
|
}
|
|
69
72
|
|
|
73
|
+
const scaledValue = value ? value * scale : value;
|
|
74
|
+
|
|
70
75
|
return (
|
|
71
76
|
<SilkeTextField
|
|
72
77
|
{...rest}
|
|
73
78
|
type="number"
|
|
74
|
-
value={
|
|
79
|
+
value={scaledValue}
|
|
75
80
|
error={errorMessage}
|
|
76
|
-
onChange={(value: number) =>
|
|
81
|
+
onChange={(value: number) => {
|
|
82
|
+
if (value) {
|
|
83
|
+
onChange(value / scale);
|
|
84
|
+
} else {
|
|
85
|
+
onChange(value);
|
|
86
|
+
}
|
|
87
|
+
}}
|
|
88
|
+
onBlur={() => {
|
|
89
|
+
if (!value) {
|
|
90
|
+
onChange(0);
|
|
91
|
+
}
|
|
92
|
+
}}
|
|
77
93
|
size="xs"
|
|
78
94
|
label={getTitle(schema)}
|
|
79
95
|
inline
|
|
@@ -15,7 +15,7 @@ export default function ObjectField({
|
|
|
15
15
|
<SilkeBox column flex style={{ paddingBottom: '16px' }}>
|
|
16
16
|
<SilkeTextSmall weight="strong">{getTitle(schema)}</SilkeTextSmall>
|
|
17
17
|
{schema.description && (
|
|
18
|
-
<SilkeTextSmall color="
|
|
18
|
+
<SilkeTextSmall color="neutral-80">{schema.description}</SilkeTextSmall>
|
|
19
19
|
)}
|
|
20
20
|
<SilkeObjectField value={value} onChange={onChange}>
|
|
21
21
|
<SilkeSchemaFields schema={(schema as any).fields} value={value} key={schema.name} noPad />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SchemaFieldProps, SelectField as SelectFieldType, SelectFieldItem } from '@vev/react';
|
|
2
2
|
import { isArray, isFunction, startCase } from 'lodash';
|
|
3
3
|
import React, { useEffect, useState } from 'react';
|
|
4
|
-
import { SilkeTextSmall } from '../../silke-text/silke-text';
|
|
4
|
+
import { SilkeText, SilkeTextSmall } from '../../silke-text/silke-text';
|
|
5
5
|
import { SilkeAutocompleteField } from '../../silke-autocomplete-field';
|
|
6
6
|
import { SilkeBox } from '../../silke-box';
|
|
7
7
|
import { SilkeCheckbox } from '../../silke-checkbox';
|
|
@@ -67,6 +67,13 @@ const SelectField = (props: SchemaFieldProps<SelectFieldType>) => {
|
|
|
67
67
|
size="xs"
|
|
68
68
|
inline
|
|
69
69
|
inlineLabelWidth={80}
|
|
70
|
+
renderItem={(item) => {
|
|
71
|
+
return (
|
|
72
|
+
<SilkeText style={{ paddingLeft: '4px' }} size="small" title={item.item.label} overflow>
|
|
73
|
+
{item.item.label}
|
|
74
|
+
</SilkeText>
|
|
75
|
+
);
|
|
76
|
+
}}
|
|
70
77
|
/>
|
|
71
78
|
);
|
|
72
79
|
}
|
|
@@ -87,7 +94,7 @@ const SelectField = (props: SchemaFieldProps<SelectFieldType>) => {
|
|
|
87
94
|
}
|
|
88
95
|
return (
|
|
89
96
|
<SilkeBox gap="xs">
|
|
90
|
-
<SilkeTextSmall color="
|
|
97
|
+
<SilkeTextSmall color="neutral-80" style={{ width: '80px' }}>
|
|
91
98
|
{getTitle(schema)}
|
|
92
99
|
</SilkeTextSmall>
|
|
93
100
|
<SilkeBox column>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
border-radius: 4px;
|
|
23
23
|
|
|
24
24
|
&:hover {
|
|
25
|
-
background-color: var(--neutral-
|
|
25
|
+
background-color: var(--neutral-20);
|
|
26
26
|
|
|
27
27
|
& .arrayItemButtons {
|
|
28
28
|
opacity: 1;
|
|
@@ -47,6 +47,6 @@
|
|
|
47
47
|
.arrayFieldModal {
|
|
48
48
|
width: 256px;
|
|
49
49
|
border-radius: 8px;
|
|
50
|
-
border-right: 1px solid var(--color-neutral-
|
|
50
|
+
border-right: 1px solid var(--color-neutral-0);
|
|
51
51
|
padding-bottom: 16px;
|
|
52
52
|
}
|
|
@@ -4,20 +4,21 @@ import { SilkeBox } from '../../silke-box';
|
|
|
4
4
|
import { SilkeToggle } from '../../silke-toggle';
|
|
5
5
|
import { SilkeTextSmall } from '../../silke-text';
|
|
6
6
|
|
|
7
|
-
const Toggle = (props: SchemaFieldProps<BooleanField>) =>
|
|
8
|
-
|
|
9
|
-
<SilkeBox
|
|
10
|
-
<SilkeBox
|
|
11
|
-
<
|
|
7
|
+
const Toggle = (props: SchemaFieldProps<BooleanField>) => {
|
|
8
|
+
return (
|
|
9
|
+
<SilkeBox flex>
|
|
10
|
+
<SilkeBox align="start" style={{ width: '80px' }}>
|
|
11
|
+
<SilkeBox vAlign="center" flex>
|
|
12
|
+
<SilkeTextSmall color="neutral-80">
|
|
13
|
+
{props.schema.title || props.schema.description || props.schema.name}
|
|
14
|
+
</SilkeTextSmall>
|
|
15
|
+
</SilkeBox>
|
|
16
|
+
</SilkeBox>
|
|
17
|
+
<SilkeBox flex pad="xs">
|
|
18
|
+
<SilkeToggle value={props.value || false} onChange={props.onChange} small />
|
|
12
19
|
</SilkeBox>
|
|
13
|
-
{props.schema.description && (
|
|
14
|
-
<SilkeTextSmall color="secondary">{props.schema.description}</SilkeTextSmall>
|
|
15
|
-
)}
|
|
16
|
-
</SilkeBox>
|
|
17
|
-
<SilkeBox flex pad="xs">
|
|
18
|
-
<SilkeToggle value={props.value || false} onChange={props.onChange} small />
|
|
19
20
|
</SilkeBox>
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
);
|
|
22
|
+
};
|
|
22
23
|
|
|
23
24
|
export default Toggle;
|