@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
package/esbuild.config.mjs
CHANGED
|
@@ -39,13 +39,14 @@ function buildSilke(watch) {
|
|
|
39
39
|
outdir: path.resolve(__dirname, './dist'),
|
|
40
40
|
bundle: true,
|
|
41
41
|
sourcemap: true,
|
|
42
|
-
minify: true,
|
|
42
|
+
minify: watch !== true,
|
|
43
43
|
splitting: true,
|
|
44
44
|
format: 'esm',
|
|
45
45
|
legalComments: 'linked',
|
|
46
46
|
watch,
|
|
47
47
|
target: ['es2020'],
|
|
48
48
|
external: Object.keys(pkg.peerDependencies || {}),
|
|
49
|
+
allowOverwrite: true,
|
|
49
50
|
plugins: [
|
|
50
51
|
{
|
|
51
52
|
name: 'raw',
|
package/jest.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vev/silke",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -14,9 +14,8 @@
|
|
|
14
14
|
"watch": "run-p watch:tsc watch:code",
|
|
15
15
|
"watch:code": "node esbuild.config.mjs --watch",
|
|
16
16
|
"watch:tsc": "tsc --project ./tsconfig.json --noEmit --watch",
|
|
17
|
-
"clean": "del
|
|
18
|
-
"tsc": "tsc --project ./tsconfig.json --noEmit"
|
|
19
|
-
"publish": "yarn build:types && npm publish --access public"
|
|
17
|
+
"clean": "del dist",
|
|
18
|
+
"tsc": "tsc --project ./tsconfig.json --noEmit"
|
|
20
19
|
},
|
|
21
20
|
"peerDependencies": {
|
|
22
21
|
"react": ">=16.0.0",
|
|
@@ -24,14 +23,19 @@
|
|
|
24
23
|
"react-router-dom": ">=5.0.0"
|
|
25
24
|
},
|
|
26
25
|
"dependencies": {
|
|
26
|
+
"@codemirror/lang-javascript": "^6.1.0",
|
|
27
|
+
"@codemirror/lang-css": "^6.0.0",
|
|
28
|
+
"@codemirror/lang-json": "^6.0.0",
|
|
27
29
|
"@mdx-js/loader": "^2.0.0-next.9",
|
|
28
30
|
"@mdx-js/mdx": "^2.0.0-next.9",
|
|
29
31
|
"@mdx-js/react": "^2.1.2",
|
|
30
|
-
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.
|
|
31
|
-
"@vev/react": "0.0.1
|
|
32
|
-
"@vev/utils": "1.0.
|
|
32
|
+
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
|
|
33
|
+
"@vev/react": "0.0.1",
|
|
34
|
+
"@vev/utils": "1.0.6",
|
|
35
|
+
"@uiw/react-codemirror": "^4.12.3",
|
|
36
|
+
"@uiw/codemirror-theme-dracula": "^4.12.3",
|
|
33
37
|
"classnames": ">=2.2.0",
|
|
34
|
-
"flux": "^4.0.
|
|
38
|
+
"flux": "^4.0.4",
|
|
35
39
|
"lodash": "^4.17.21",
|
|
36
40
|
"prismjs": "^1.27.0",
|
|
37
41
|
"project-name-generator": "^2.1.9",
|
package/src/_variables.scss
CHANGED
|
@@ -5,6 +5,126 @@
|
|
|
5
5
|
************************/
|
|
6
6
|
@import "./styles/math.scss";
|
|
7
7
|
|
|
8
|
+
$colors:
|
|
9
|
+
// Surface
|
|
10
|
+
"surface-0" transparent,
|
|
11
|
+
"surface-1" rgba(white,0.04),
|
|
12
|
+
"surface-2" rgba(white,0.06),
|
|
13
|
+
"surface-3" rgba(white,0.08),
|
|
14
|
+
"surface-4" rgba(white,0.12),
|
|
15
|
+
/**********
|
|
16
|
+
* Accent colors *
|
|
17
|
+
**********/
|
|
18
|
+
// Accent
|
|
19
|
+
"accent-10" #0D2759,
|
|
20
|
+
"accent-20" #1C53BF,
|
|
21
|
+
"accent-30" #256CFA,
|
|
22
|
+
"accent-40" #4584FF,
|
|
23
|
+
"accent-50" #80ABFF,
|
|
24
|
+
"accent-60" #CCDDFF,
|
|
25
|
+
|
|
26
|
+
// Feedback/Error
|
|
27
|
+
"error-10" #661018,
|
|
28
|
+
"error-20" #A61B27,
|
|
29
|
+
"error-30" #E52535,
|
|
30
|
+
"error-40" #F26D78,
|
|
31
|
+
"error-50" #F29199,
|
|
32
|
+
"error-60" #F2DADC,
|
|
33
|
+
|
|
34
|
+
// Feedback/Warning
|
|
35
|
+
"warning-10" #73500B,
|
|
36
|
+
"warning-20" #996B0F,
|
|
37
|
+
"warning-30" #F2C53D,
|
|
38
|
+
"warning-40" #F2D785,
|
|
39
|
+
"warning-50" #F2E0AA,
|
|
40
|
+
"warning-60" #F2E9CE,
|
|
41
|
+
|
|
42
|
+
// Feedback/Success
|
|
43
|
+
"success-10" #045944,
|
|
44
|
+
"success-20" #0E8C6D,
|
|
45
|
+
"success-30" #14CC9E,
|
|
46
|
+
"success-40" #4CD9B6,
|
|
47
|
+
"success-50" #89E5CE,
|
|
48
|
+
"success-60" #DAF2EC,
|
|
49
|
+
|
|
50
|
+
/**********
|
|
51
|
+
* Neutral colors *
|
|
52
|
+
**********/
|
|
53
|
+
"neutral-0" #131313,
|
|
54
|
+
"neutral-5" #1E1E1E,
|
|
55
|
+
"neutral-10" #252525,
|
|
56
|
+
"neutral-20" #2F2F2F,
|
|
57
|
+
"neutral-30" #3E3E3E,
|
|
58
|
+
"neutral-40" #535353,
|
|
59
|
+
"neutral-50" #6C6C6C,
|
|
60
|
+
"neutral-60" #848484,
|
|
61
|
+
"neutral-70" #A9A9A9,
|
|
62
|
+
"neutral-80" #C2C2C2,
|
|
63
|
+
"neutral-90" #DADADA,
|
|
64
|
+
"neutral-100" #FCFCFC,
|
|
65
|
+
|
|
66
|
+
/**********
|
|
67
|
+
* Support colors *
|
|
68
|
+
**********/
|
|
69
|
+
// Support/Primary
|
|
70
|
+
"support-primary-10" #3C302A,
|
|
71
|
+
"support-primary-20" #6A5549,
|
|
72
|
+
"support-primary-30" #A48A7B,
|
|
73
|
+
"support-primary-40" #C1AFA4,
|
|
74
|
+
"support-primary-50" #D5C9C3,
|
|
75
|
+
"support-primary-60" #EAE4E1,
|
|
76
|
+
// Support/Secondary
|
|
77
|
+
"support-secondary-10" #003366,
|
|
78
|
+
"support-secondary-20" #0059b2,
|
|
79
|
+
"support-secondary-30" #0d86ff,
|
|
80
|
+
"support-secondary-40" #4CA6FF,
|
|
81
|
+
"support-secondary-50" #80bfff,
|
|
82
|
+
"support-secondary-60" #e5f2ff,
|
|
83
|
+
// Support/tertiary
|
|
84
|
+
"support-tertiary-10" #591B3F,
|
|
85
|
+
"support-tertiary-20" #A63275,
|
|
86
|
+
"support-tertiary-30" #CC47A0,
|
|
87
|
+
"support-tertiary-40" #E065C2,
|
|
88
|
+
"support-tertiary-50" #E087CA,
|
|
89
|
+
"support-tertiary-60" #F2CEE9,
|
|
90
|
+
|
|
91
|
+
/**********
|
|
92
|
+
* Brand colors *
|
|
93
|
+
**********/
|
|
94
|
+
// Brand/Primary
|
|
95
|
+
"brand-primary-bright" #ffff00,
|
|
96
|
+
"brand-primary-10" #5a2820,
|
|
97
|
+
"brand-primary-20" #AA6739,
|
|
98
|
+
"brand-primary-30" #ECB54F,
|
|
99
|
+
"brand-primary-40" #F0C665,
|
|
100
|
+
"brand-primary-50" #F5D77C,
|
|
101
|
+
"brand-primary-60" #fae794,
|
|
102
|
+
// Brand/Secondary
|
|
103
|
+
"brand-secondary-bright" #01dccd,
|
|
104
|
+
"brand-secondary-10" #173343,
|
|
105
|
+
"brand-secondary-20" #296D79,
|
|
106
|
+
"brand-secondary-30" #57ada1,
|
|
107
|
+
"brand-secondary-40" #7DBCAC,
|
|
108
|
+
"brand-secondary-50" #9DCBBA,
|
|
109
|
+
"brand-secondary-60" #BCDACB,
|
|
110
|
+
// Brand/Tertiary
|
|
111
|
+
"brand-tertiary-bright" #FF0000,
|
|
112
|
+
"brand-tertiary-10" #4C1726,
|
|
113
|
+
"brand-tertiary-20" #9A1E2D,
|
|
114
|
+
"brand-tertiary-30" #E6332A,
|
|
115
|
+
"brand-tertiary-40" #F86A6A,
|
|
116
|
+
"brand-tertiary-50" #F89FB4,
|
|
117
|
+
"brand-tertiary-60" #EFD1DE,
|
|
118
|
+
// Brand/Quaternary
|
|
119
|
+
"brand-quaternary-10" #46372C,
|
|
120
|
+
"brand-quaternary-20" #735F52,
|
|
121
|
+
"brand-quaternary-30" #A48A7B,
|
|
122
|
+
"brand-quaternary-40" #BBA08E,
|
|
123
|
+
"brand-quaternary-50" #D3B7A1,
|
|
124
|
+
"brand-quaternary-60" #EACEB4,
|
|
125
|
+
|
|
126
|
+
"black" #000000;
|
|
127
|
+
|
|
8
128
|
/**********************
|
|
9
129
|
* FONT
|
|
10
130
|
************************/
|
|
@@ -83,7 +203,7 @@ $sizes:
|
|
|
83
203
|
|
|
84
204
|
@mixin font($size, $family: $font-family) {
|
|
85
205
|
font-family: $family;
|
|
86
|
-
color: var(--color-neutral-
|
|
206
|
+
color: var(--color-neutral-100);
|
|
87
207
|
@include fontSize($size);
|
|
88
208
|
}
|
|
89
209
|
|
package/src/components/index.ts
CHANGED
|
@@ -5,17 +5,21 @@ export * from './silke-box';
|
|
|
5
5
|
export * from './silke-breadcrumbs';
|
|
6
6
|
export * from './silke-button';
|
|
7
7
|
export * from './silke-card';
|
|
8
|
+
export * from './silke-code-editor';
|
|
8
9
|
export * from './silke-code-snippet';
|
|
9
10
|
export * from './silke-color-palettes';
|
|
10
11
|
export * from './silke-color-swatches';
|
|
12
|
+
export * from './silke-content-column';
|
|
11
13
|
export * from './silke-context-menu';
|
|
12
14
|
export * from './silke-divider';
|
|
13
15
|
export * from './silke-drawer';
|
|
14
16
|
export * from './silke-form-schema';
|
|
15
17
|
export * from './silke-icon';
|
|
18
|
+
export * from './silke-iframe-portal';
|
|
16
19
|
export * from './silke-image';
|
|
17
20
|
export * from './silke-link';
|
|
18
21
|
export * from './silke-list';
|
|
22
|
+
export * from './silke-list-card';
|
|
19
23
|
export * from './silke-loader';
|
|
20
24
|
export * from './silke-modal';
|
|
21
25
|
export * from './silke-navigation-link';
|
|
@@ -31,6 +35,7 @@ export * from './silke-table';
|
|
|
31
35
|
export * from './silke-tabs';
|
|
32
36
|
export * from './silke-tag';
|
|
33
37
|
export * from './silke-text';
|
|
38
|
+
export * from './silke-theme-editor';
|
|
34
39
|
export * from './silke-tile';
|
|
35
40
|
export * from './silke-toolbar';
|
|
36
41
|
export * from './silke-tooltip';
|
|
@@ -45,6 +50,7 @@ export * from './silke-icon-picker';
|
|
|
45
50
|
export * from './silke-object-field';
|
|
46
51
|
export * from './silke-radio-button';
|
|
47
52
|
export * from './silke-select-field';
|
|
53
|
+
export * from './silke-steps';
|
|
48
54
|
export * from './silke-text-field';
|
|
49
55
|
export * from './silke-toggle';
|
|
50
56
|
export * from './silke-upload-field';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
1
2
|
import { BoxSize, SilkeBox } from '../silke-box';
|
|
2
3
|
import { SilkeCheckbox } from '../silke-checkbox';
|
|
3
|
-
import React, { useEffect, useRef } from 'react';
|
|
4
|
-
import { Data, Entry } from './autocomplete-types';
|
|
5
4
|
import { SilkeText } from '../silke-text';
|
|
6
|
-
import {
|
|
5
|
+
import { Data, Entry } from './autocomplete-types';
|
|
7
6
|
import styles from './silke-autocomplete-field.scss';
|
|
8
7
|
|
|
9
8
|
export interface AutocompleteRenderItemProps<U> {
|
|
@@ -32,7 +31,7 @@ export default function AutocompleteItem<T, U extends Entry<T>>({
|
|
|
32
31
|
onMouseDown,
|
|
33
32
|
ItemRender,
|
|
34
33
|
}: AutocompleteItemProps<T, U>) {
|
|
35
|
-
const label = item.label || item.value || 'missing label';
|
|
34
|
+
const label = (item.label || item.value || 'missing label') as string;
|
|
36
35
|
const isDisabled = (item as Data<T>).disabled;
|
|
37
36
|
const ref = useRef<HTMLDivElement>(null);
|
|
38
37
|
|
|
@@ -44,10 +43,11 @@ export default function AutocompleteItem<T, U extends Entry<T>>({
|
|
|
44
43
|
<SilkeBox
|
|
45
44
|
ref={ref}
|
|
46
45
|
height={size || 'm'}
|
|
47
|
-
hPad={ItemRender ? undefined : '
|
|
48
|
-
bgHover={isDisabled ? undefined : 'neutral-
|
|
46
|
+
hPad={ItemRender ? undefined : 's'}
|
|
47
|
+
bgHover={isDisabled ? undefined : 'neutral-30'}
|
|
49
48
|
vAlign="center"
|
|
50
49
|
gap="xs"
|
|
50
|
+
rounded={size === 's' ? 'tiny' : 'small'}
|
|
51
51
|
className={cn}
|
|
52
52
|
onMouseDown={
|
|
53
53
|
isDisabled ? (e: React.MouseEvent<HTMLButtonElement>) => e.preventDefault() : onMouseDown
|
|
@@ -57,14 +57,16 @@ export default function AutocompleteItem<T, U extends Entry<T>>({
|
|
|
57
57
|
<ItemRender highlight={highlight} selected={selected} item={item} isDisabled={isDisabled} />
|
|
58
58
|
) : (
|
|
59
59
|
<>
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
{multiple && (
|
|
61
|
+
<SilkeBox size="s" align="center">
|
|
62
62
|
<SilkeCheckbox value={selected} style={{ pointerEvents: 'none' }} />
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
</SilkeBox>
|
|
64
|
+
)}
|
|
65
|
+
<SilkeText
|
|
66
|
+
tag={size === 's' ? 'small' : undefined}
|
|
67
|
+
overflow
|
|
68
|
+
color={isDisabled ? 'neutral-40' : undefined}
|
|
69
|
+
>
|
|
68
70
|
{label}
|
|
69
71
|
</SilkeText>
|
|
70
72
|
</>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import React from 'react';
|
|
1
|
+
import { SilkeTag } from '../silke-tag';
|
|
2
|
+
import React, { useEffect, useState, useRef } from 'react';
|
|
3
3
|
import { Data } from './autocomplete-types';
|
|
4
|
+
import { SilkeBox } from '../silke-box';
|
|
4
5
|
|
|
5
6
|
export interface AutocompleteTagsProps<T> {
|
|
6
7
|
showMaxTags?: number;
|
|
@@ -15,14 +16,20 @@ export default function AutocompleteTags<T>({
|
|
|
15
16
|
onRemove,
|
|
16
17
|
onRemoveAll,
|
|
17
18
|
}: AutocompleteTagsProps<T>) {
|
|
18
|
-
if (items.length > showMaxTags)
|
|
19
|
-
return <
|
|
19
|
+
if (showMaxTags && items.length > showMaxTags)
|
|
20
|
+
return <SilkeTag kind="blue" label={`${items.length} Items`} onRemove={onRemoveAll} />;
|
|
20
21
|
|
|
21
22
|
return (
|
|
22
|
-
|
|
23
|
+
<SilkeBox gap="xs" style={{ flexFlow: 'wrap', justifyContent: 'flex-start' }}>
|
|
23
24
|
{items.map((item, i) => (
|
|
24
|
-
<
|
|
25
|
+
<SilkeTag
|
|
26
|
+
kind="blue"
|
|
27
|
+
key={i}
|
|
28
|
+
label={item.label}
|
|
29
|
+
onRemove={() => onRemove(item.value)}
|
|
30
|
+
id={`tag_${i}`}
|
|
31
|
+
/>
|
|
25
32
|
))}
|
|
26
|
-
|
|
33
|
+
</SilkeBox>
|
|
27
34
|
);
|
|
28
35
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
```js
|
|
2
2
|
const items = ipsum.list((i) => ({ value: i, label: ipsum.name() }));
|
|
3
|
-
const [value, setValue] = React.useState(
|
|
3
|
+
const [value, setValue] = React.useState("");
|
|
4
4
|
<>
|
|
5
|
-
<h5>Value: {value ||
|
|
5
|
+
<h5>Value: {value || "No value"}</h5>
|
|
6
6
|
<SilkeAutocompleteField
|
|
7
7
|
label="Default"
|
|
8
8
|
name="Foobar"
|
|
@@ -10,6 +10,15 @@ const [value, setValue] = React.useState('');
|
|
|
10
10
|
value={value}
|
|
11
11
|
items={items}
|
|
12
12
|
/>
|
|
13
|
+
<h5>Value: {value || "No value"}</h5>
|
|
14
|
+
<SilkeAutocompleteField
|
|
15
|
+
label="Default"
|
|
16
|
+
kind="ghost"
|
|
17
|
+
name="Foobar"
|
|
18
|
+
onChange={setValue}
|
|
19
|
+
value={value}
|
|
20
|
+
items={items}
|
|
21
|
+
/>
|
|
13
22
|
</>;
|
|
14
23
|
```
|
|
15
24
|
|
|
@@ -19,7 +28,7 @@ const [value, setValue] = React.useState('');
|
|
|
19
28
|
const items = ipsum.list((i) => ({ value: i, label: ipsum.name() }));
|
|
20
29
|
const [value, setValue] = React.useState([]);
|
|
21
30
|
<>
|
|
22
|
-
<h5>Value: {value.join(
|
|
31
|
+
<h5>Value: {value.join(", ") || "No value"}</h5>
|
|
23
32
|
<SilkeAutocompleteField
|
|
24
33
|
label="Default"
|
|
25
34
|
name="Foobar"
|
|
@@ -36,7 +45,7 @@ const [value, setValue] = React.useState([]);
|
|
|
36
45
|
```js
|
|
37
46
|
const itemsArray = ["Banana", "Apple", "Carrot", "Chips"];
|
|
38
47
|
const [items, setitems] = React.useState(() =>
|
|
39
|
-
itemsArray.map(i => ({ value: i.toLowerCase(), label: i }))
|
|
48
|
+
itemsArray.map((i) => ({ value: i.toLowerCase(), label: i }))
|
|
40
49
|
);
|
|
41
50
|
const [value, setValue] = React.useState([]);
|
|
42
51
|
|
|
@@ -54,3 +63,21 @@ const [value, setValue] = React.useState([]);
|
|
|
54
63
|
}}
|
|
55
64
|
/>;
|
|
56
65
|
```
|
|
66
|
+
|
|
67
|
+
## Show all selected options
|
|
68
|
+
|
|
69
|
+
```js
|
|
70
|
+
const values = ipsum.list(30, () => ipsum.name(1).toLowerCase());
|
|
71
|
+
const items = values.map((i) => ({ value: i.toLowerCase(), label: i }));
|
|
72
|
+
|
|
73
|
+
<SilkeAutocompleteField
|
|
74
|
+
label="Default"
|
|
75
|
+
name="BigList"
|
|
76
|
+
placeholder="Write text to add new items"
|
|
77
|
+
multiple
|
|
78
|
+
value={values}
|
|
79
|
+
items={items}
|
|
80
|
+
onChange={() => undefined}
|
|
81
|
+
showMaxTags={Infinity}
|
|
82
|
+
/>;
|
|
83
|
+
```
|
|
@@ -11,15 +11,17 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.autocompleteItemHighlight {
|
|
14
|
-
background: var(--color-neutral-
|
|
14
|
+
background: var(--color-neutral-30);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.autocompleteDropdown {
|
|
18
18
|
border-radius: 8px;
|
|
19
|
+
padding:$space-xs;
|
|
19
20
|
filter: drop-shadow(0px 4px 16px rgba(0, 0, 0, 0.2));
|
|
20
|
-
margin-top:
|
|
21
|
-
|
|
22
|
-
&:focus {
|
|
23
|
-
outline: none;
|
|
24
|
-
}
|
|
21
|
+
margin-top: 2px;
|
|
25
22
|
}
|
|
23
|
+
|
|
24
|
+
.dropdownIcon {
|
|
25
|
+
font-size: 12px;
|
|
26
|
+
color: var(--color-neutral-70);
|
|
27
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getSearchReg } from '@vev/utils';
|
|
2
2
|
import { isEqual, isUndefined } from 'lodash';
|
|
3
3
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { useFormField, useInterval, useParentScroll, useWindowResize } from '../../hooks';
|
|
5
5
|
import { SilkeBox } from '../silke-box';
|
|
6
6
|
import { SilkeButton } from '../silke-button';
|
|
7
7
|
import { FormValidator } from '../silke-form';
|
|
@@ -25,6 +25,7 @@ export type SilkeAutocompleteFieldProps<T = any, U extends Entry<T> = any> = (
|
|
|
25
25
|
Omit<SilkeTextFieldProps, 'multiline' | 'maxLength' | 'minLength' | 'value'> & {
|
|
26
26
|
disableSearch?: boolean;
|
|
27
27
|
noReset?: boolean;
|
|
28
|
+
hideListArrow?: boolean;
|
|
28
29
|
|
|
29
30
|
maxDisplayedItems?: number;
|
|
30
31
|
|
|
@@ -40,6 +41,8 @@ export type SilkeAutocompleteFieldProps<T = any, U extends Entry<T> = any> = (
|
|
|
40
41
|
* Minimum number of characters in search for results to show
|
|
41
42
|
*/
|
|
42
43
|
minChars?: number;
|
|
44
|
+
/** Cypress tag */
|
|
45
|
+
'data-cy'?: string;
|
|
43
46
|
/**
|
|
44
47
|
* If a function is passed, an "Add item" entry will be shown in the list if nothing matches text search. This function will be the callback.
|
|
45
48
|
* @param value The value entered
|
|
@@ -124,7 +127,9 @@ export const useMatchingItemsOnTop = (
|
|
|
124
127
|
|
|
125
128
|
export function SilkeAutocompleteField<T>(props: SilkeAutocompleteFieldProps<T>) {
|
|
126
129
|
const {
|
|
130
|
+
autoFocus,
|
|
127
131
|
disableSearch,
|
|
132
|
+
hideListArrow,
|
|
128
133
|
items,
|
|
129
134
|
minChars = 0,
|
|
130
135
|
onAdd,
|
|
@@ -138,15 +143,15 @@ export function SilkeAutocompleteField<T>(props: SilkeAutocompleteFieldProps<T>)
|
|
|
138
143
|
flex,
|
|
139
144
|
anchorOrigin,
|
|
140
145
|
targetOrigin,
|
|
141
|
-
|
|
146
|
+
disabled,
|
|
147
|
+
maxDisplayedItems = 150,
|
|
142
148
|
onSearch,
|
|
143
149
|
...form
|
|
144
150
|
} = useFormField(props, autocompleteValidator);
|
|
145
|
-
|
|
146
151
|
const context = useTextFieldContext();
|
|
147
152
|
const size = form.size || context.size || 'm';
|
|
148
|
-
|
|
149
153
|
const mappedSize = getInputSize(size);
|
|
154
|
+
const isEmptyForm = Array.isArray(form.value) ? !form.value.length : !form.value;
|
|
150
155
|
|
|
151
156
|
const isSelected = (value: T): boolean => {
|
|
152
157
|
if (form.multiple) {
|
|
@@ -169,18 +174,30 @@ export function SilkeAutocompleteField<T>(props: SilkeAutocompleteFieldProps<T>)
|
|
|
169
174
|
return entry?.label || (form.value && form.value.toString()) || '';
|
|
170
175
|
}, [items, form.multiple, form.value]);
|
|
171
176
|
|
|
172
|
-
const [searchText,
|
|
177
|
+
const [searchText, _setSearchText] = useState(selectedLabel);
|
|
178
|
+
const [prevSearchText, setPrevSearchText] = useState(searchText);
|
|
173
179
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
174
180
|
const inputRef = useRef<HTMLInputElement>();
|
|
175
181
|
const dropdownRef = useRef<HTMLElement>();
|
|
176
182
|
const [open, setOpen] = useState(false);
|
|
177
183
|
const [highlight, setHighlight] = useState<undefined | number>(undefined);
|
|
178
184
|
|
|
185
|
+
/**
|
|
186
|
+
* Keep track of previous value, so we know when to remove an item in the list
|
|
187
|
+
*/
|
|
188
|
+
const setSearchText = useCallback((value: string | undefined) => {
|
|
189
|
+
_setSearchText((previousValue) => {
|
|
190
|
+
setPrevSearchText(previousValue);
|
|
191
|
+
return value;
|
|
192
|
+
});
|
|
193
|
+
}, []);
|
|
194
|
+
|
|
179
195
|
/**
|
|
180
196
|
* Set text field to display selected value
|
|
181
197
|
*/
|
|
182
198
|
const resetSearchText = useCallback(() => {
|
|
183
199
|
// Update display of selected item
|
|
200
|
+
setPrevSearchText('');
|
|
184
201
|
setSearchText(selectedLabel || '');
|
|
185
202
|
}, [selectedLabel]);
|
|
186
203
|
|
|
@@ -210,6 +227,7 @@ export function SilkeAutocompleteField<T>(props: SilkeAutocompleteFieldProps<T>)
|
|
|
210
227
|
if (form.multiple) !searchText && form.onChange([]);
|
|
211
228
|
else form.onChange('');
|
|
212
229
|
setSearchText('');
|
|
230
|
+
setPrevSearchText('');
|
|
213
231
|
|
|
214
232
|
setOpen(false);
|
|
215
233
|
};
|
|
@@ -346,6 +364,7 @@ export function SilkeAutocompleteField<T>(props: SilkeAutocompleteFieldProps<T>)
|
|
|
346
364
|
};
|
|
347
365
|
|
|
348
366
|
const displayReset = !form.noReset && (searchText || form.value?.length > 0);
|
|
367
|
+
const dataCy = props['data-cy'] || undefined;
|
|
349
368
|
|
|
350
369
|
return (
|
|
351
370
|
<>
|
|
@@ -357,19 +376,23 @@ export function SilkeAutocompleteField<T>(props: SilkeAutocompleteFieldProps<T>)
|
|
|
357
376
|
size={size}
|
|
358
377
|
flex={flex}
|
|
359
378
|
label={label}
|
|
360
|
-
|
|
379
|
+
autoFocus={autoFocus}
|
|
380
|
+
readOnly={disableSearch || form.readOnly || context.readOnly}
|
|
361
381
|
className={disableSearch ? styles.clickable : undefined}
|
|
362
382
|
error={form.error}
|
|
363
383
|
help={form.help}
|
|
364
384
|
width={form.width}
|
|
365
385
|
multiline={false}
|
|
386
|
+
disabled={disabled}
|
|
387
|
+
kind={props?.kind || 'default'}
|
|
388
|
+
data-cy={dataCy}
|
|
366
389
|
onFocus={(e) => {
|
|
367
390
|
inputRef.current = e.currentTarget as HTMLInputElement;
|
|
368
391
|
}}
|
|
369
392
|
onClick={(e: React.MouseEvent) => {
|
|
370
393
|
e.preventDefault();
|
|
371
394
|
e.stopPropagation();
|
|
372
|
-
setOpen((wasOpen) => !wasOpen);
|
|
395
|
+
!context.readOnly && setOpen((wasOpen) => !wasOpen);
|
|
373
396
|
}}
|
|
374
397
|
onChange={(text: string) => {
|
|
375
398
|
setOpen(true);
|
|
@@ -379,7 +402,9 @@ export function SilkeAutocompleteField<T>(props: SilkeAutocompleteFieldProps<T>)
|
|
|
379
402
|
onKeyUp={(e: React.KeyboardEvent) => {
|
|
380
403
|
switch (e.key) {
|
|
381
404
|
case 'Backspace': {
|
|
382
|
-
if (
|
|
405
|
+
if (prevSearchText?.length === 1) {
|
|
406
|
+
setPrevSearchText('');
|
|
407
|
+
} else if (form.multiple && form.value && !searchText) {
|
|
383
408
|
form.onChange(form.value.slice(0, -1));
|
|
384
409
|
}
|
|
385
410
|
break;
|
|
@@ -395,9 +420,16 @@ export function SilkeAutocompleteField<T>(props: SilkeAutocompleteFieldProps<T>)
|
|
|
395
420
|
}
|
|
396
421
|
}
|
|
397
422
|
setSearchText('');
|
|
423
|
+
setPrevSearchText('');
|
|
398
424
|
} else {
|
|
399
425
|
const item = highlight !== undefined && filteredDataEntries[highlight];
|
|
400
|
-
if (item)
|
|
426
|
+
if (item) {
|
|
427
|
+
handleSelect(item, highlight);
|
|
428
|
+
} else {
|
|
429
|
+
if (onAdd && searchText) {
|
|
430
|
+
onAdd(searchText);
|
|
431
|
+
}
|
|
432
|
+
}
|
|
401
433
|
}
|
|
402
434
|
break;
|
|
403
435
|
}
|
|
@@ -428,33 +460,40 @@ export function SilkeAutocompleteField<T>(props: SilkeAutocompleteFieldProps<T>)
|
|
|
428
460
|
setOpen(false);
|
|
429
461
|
}
|
|
430
462
|
}}
|
|
431
|
-
placeholder={placeholder}
|
|
463
|
+
placeholder={isEmptyForm ? placeholder : ''}
|
|
432
464
|
value={searchText}
|
|
433
465
|
>
|
|
434
466
|
{form.multiple && form.value?.length > 0 && (
|
|
435
|
-
<SilkeTextFieldItem before
|
|
436
|
-
<
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
467
|
+
<SilkeTextFieldItem before hPad="s" onClick={() => setOpen(!open)}>
|
|
468
|
+
<SilkeBox gap="xs" style={{ flexFlow: 'wrap', justifyContent: 'flex-start' }}>
|
|
469
|
+
<TagsRender
|
|
470
|
+
items={selectedDataItems}
|
|
471
|
+
showMaxTags={form.showMaxTags}
|
|
472
|
+
onRemove={handleRemoveSingle}
|
|
473
|
+
onRemoveAll={handleReset}
|
|
474
|
+
/>
|
|
475
|
+
</SilkeBox>
|
|
442
476
|
</SilkeTextFieldItem>
|
|
443
477
|
)}
|
|
444
478
|
<SilkeTextFieldItem
|
|
445
479
|
align="center"
|
|
446
480
|
hPad={mappedSize === 'large' ? 'm' : undefined}
|
|
447
|
-
style={{ paddingRight: mappedSize === 'tiny' ? '
|
|
448
|
-
onClick={() =>
|
|
481
|
+
style={{ paddingRight: mappedSize === 'tiny' ? '0px' : '8px' }}
|
|
482
|
+
onClick={() => {
|
|
483
|
+
if (!context.readOnly) {
|
|
484
|
+
setOpen(!open);
|
|
485
|
+
inputRef.current?.focus();
|
|
486
|
+
}
|
|
487
|
+
}}
|
|
449
488
|
>
|
|
450
489
|
{(() => {
|
|
451
490
|
return displayReset ? (
|
|
452
491
|
<SilkeButton icon="close" kind="ghost" size="base" onClick={handleReset} />
|
|
453
|
-
) : (
|
|
492
|
+
) : !hideListArrow ? (
|
|
454
493
|
<SilkeBox width="s" align="center">
|
|
455
|
-
<SilkeIcon icon={open ? 'up' : 'down'} />
|
|
494
|
+
<SilkeIcon icon={open ? 'up' : 'down'} className={styles.dropdownIcon} />
|
|
456
495
|
</SilkeBox>
|
|
457
|
-
);
|
|
496
|
+
) : null;
|
|
458
497
|
})()}
|
|
459
498
|
</SilkeTextFieldItem>
|
|
460
499
|
{form.children}
|
|
@@ -470,7 +509,8 @@ export function SilkeAutocompleteField<T>(props: SilkeAutocompleteFieldProps<T>)
|
|
|
470
509
|
>
|
|
471
510
|
<SilkeBox
|
|
472
511
|
role="listbox"
|
|
473
|
-
|
|
512
|
+
data-cy={dataCy ? dataCy + '-dropdown' : undefined}
|
|
513
|
+
bg="neutral-20"
|
|
474
514
|
column
|
|
475
515
|
style={{ maxHeight: 300 }}
|
|
476
516
|
scroll
|
|
@@ -492,6 +532,7 @@ export function SilkeAutocompleteField<T>(props: SilkeAutocompleteFieldProps<T>)
|
|
|
492
532
|
}
|
|
493
533
|
}
|
|
494
534
|
setSearchText('');
|
|
535
|
+
setPrevSearchText('');
|
|
495
536
|
} else {
|
|
496
537
|
const item = highlight !== undefined && filteredDataEntries[highlight];
|
|
497
538
|
if (item) handleSelect(item, highlight);
|